/* Subject > language or field > English book type. Keep covers at full width. */
#sec-psychology .book-card.book-summary-cover{--cover:#207cab;--spine:#17618d;--foil:#fff;color:#fff;border-color:#87cbe9}
#sec-psychology .book-card.book-summary-cover:hover{color:#fff;border-color:#bceaff}
#sec-psychology .book-summary-cover::before{border-color:#d5f0ff66}
#sec-psychology .book-summary-cover .book-subtitle{color:#fff}
#sec-psychology .book-summary-cover .book-open,#sec-psychology .book-summary-cover .book-summary-art{border-color:#d5f0ff66}
.book-summary-art{display:block;height:34px;margin-top:5px;overflow:hidden;border:1px solid #d6bd8755}
.book-summary-art svg{display:block;width:100%;height:100%;object-fit:cover}
.book-summary-cover .book-subtitle{font-size:7px}
.subject-group{margin-bottom:28px;scroll-margin-top:130px}
.subject-group.hidden,.english-shelf.hidden{display:none}
.subject-group>.cat-header{margin-bottom:18px}
.subject-group>.cat{margin-bottom:28px}
.subject-group>.cat:last-child{margin-bottom:0}
.subject-group>.cat>.cat-header{gap:8px;margin-bottom:12px;padding:0 0 0 10px;border-bottom:0;border-left:2px solid #a78c5366}
.subject-group>.cat>.cat-header .cat-title{font-size:15px;font-weight:700;color:var(--accent2)}
.subject-group>.cat>.cat-header .cat-icon{font-size:16px}
.subject-group>.cat>.cat-header .cat-count{font-size:12px;background:transparent;padding:0 3px}
.english-shelf+.english-shelf{margin-top:18px}
.english-shelf>.subcat-header{margin:0 0 10px;font-size:13px;font-weight:600;color:var(--muted)}
.english-shelf .subcat-count{margin-left:2px}
.sb-subject-title{font-weight:700;color:var(--text)}
.sb-subject-links{margin:2px 0 8px 19px;padding-left:6px;border-left:1px solid var(--border)}
.sb-subject-links .sb-link{font-size:13px;padding:6px 8px}
.sb-subject-links .sb-link-icon{font-size:14px;width:17px}

/* Atlas and workbook covers share the dimensions of the religion textbooks. */
:is(#sec-encyclopedia, #sec-society, .book-category) .learning-books, #sec-society .religion-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 132px));
  gap: 16px;
  max-width: none;
  padding: 2px 7px 14px 0;
  margin-bottom: 6px;
  align-items: start;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card {
  --cover: #263b37;
  --spine: #152924;
  --foil: #dec891;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 174px;
  padding: 8px 12px 8px 18px;
  border: 1px solid #81704c;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(90deg, var(--spine), var(--cover) 9px, var(--spine) 11px, var(--cover) 15px);
  color: #f0e6cd;
  box-shadow: 1px 2px 0 #897d65, 3px 3px 0 #171718, 5px 6px 7px #0005;
  isolation: isolate;
  overflow: visible;
  transition: transform .18s, box-shadow .18s;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card::before {
  content: ""; position: absolute; inset: 7px 7px 8px 13px;
  border: 1px solid #c0a86a44; pointer-events: none;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card::after {
  content: ""; position: absolute; top: 4px; bottom: 2px; right: -5px; width: 4px;
  background: repeating-linear-gradient(90deg, #b9af96 0 1px, #e2dbc7 1px 2px);
  border: 1px solid #87785d; border-radius: 0 2px 2px 0; z-index: -1;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card:hover {
  border-color: #e8a040; color: #fff1cd; transform: translateY(-3px) rotate(-1deg);
  box-shadow: 1px 2px 0 #aa9877, 3px 3px 0 #171718, 6px 9px 12px #0006;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card:focus-visible {
  outline: 3px solid #e8a040; outline-offset: 6px;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .book-card.hidden,
#sec-society .religion-volume.hidden { display: none; }
.book-card > span { flex-shrink: 0; }
.book-spine { position: absolute; left: 1px; bottom: 14px; writing-mode: vertical-rl; font: 6px Georgia, serif; letter-spacing: .08em; color: var(--foil); }
.book-imprint { font-size: 6px; line-height: 1.5; letter-spacing: .12em; color: var(--foil); }
.book-kind { font-size: 8px; line-height: 1.4; letter-spacing: .2em; color: var(--foil); margin-top: 5px; }
.book-title { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 21px; font-weight: 700; line-height: 1.3; margin-top: 4px; letter-spacing: .02em; }
.book-format { font-size: 9px; line-height: 1.5; margin-top: 3px; color: #e4d8bf; }
.book-subtitle { font-size: 8px; line-height: 1.5; color: #d0c6b0; margin-top: 4px; }
.book-count { display: flex; align-items: baseline; gap: 3px; color: var(--foil); margin-top: auto; line-height: 1.2; }
.book-count strong { font-family: Georgia, serif; font-size: 24px; font-weight: 400; font-variant-numeric: tabular-nums; }
.book-count > span { font-size: 9px; }
.book-count .book-feature { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 14px; padding-bottom: 3px; }
.book-open { display: flex; justify-content: space-between; align-items: baseline; gap: 3px; border-top: 1px solid #a78c5355; padding-top: 4px; margin-top: 5px; font-size: 8px; line-height: 1.5; color: var(--foil); }
.book-atlas .book-title { font-size: 16px; line-height: 1.3; margin-top: 3px; }
.book-atlas .book-format { font-size: 8px; margin-top: 3px; }
.book-atlas .book-open { margin-top: auto; }
.book-flags { display: grid; grid-template-columns: repeat(3, 24px); gap: 5px 6px; margin-top: 7px; }
.book-flags img { display: block; width: 24px; height: 16px; object-fit: contain; background: #e7e0d1; box-shadow: 0 0 0 1px #ffffff26; }
.book-photo { display: block; height: 43px; margin-top: 6px; border: 1px solid #c0a86a55; }
.book-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.book-language .book-title { font-size: 19px; letter-spacing: .02em; }
.book-language .book-title-long { font-size: 16px; letter-spacing: 0; }
.book-edition { display: flex; flex-direction: column; gap: 1px; margin-top: 5px; color: #e4d8bf; }
.book-edition > span { font-size: 7px; line-height: 1.4; }
.book-edition strong { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 20px; line-height: 1.3; font-weight: 600; }
.book-level-words strong { font-size: 15px; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-english { --cover: #293d50; --spine: #182b3c; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-english-exam { --cover: #45312c; --spine: #2c1c18; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-korean { --cover: #3e3049; --spine: #281e31; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-spanish { --cover: #4b3827; --spine: #312215; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-french { --cover: #283c48; --spine: #172933; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-chinese { --cover: #492c31; --spine: #30191e; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-german { --cover: #3d3c2b; --spine: #272619; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-russian { --cover: #33364b; --spine: #1e2236; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-italian { --cover: #304431; --spine: #1c2d1d; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-portuguese { --cover: #26443d; --spine: #142e27; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-jlpt { --cover: #3e3448; --spine: #282031; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-kokugo { --cover: #484032; --spine: #2e281d; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-flags { --cover: #23434a; --spine: #122b31; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-capitals { --cover: #353c4c; --spine: #202838; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-sangoku { --cover: #45332a; --spine: #2b1e16; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-world { --cover: #253647; --spine: #122232; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-japan { --cover: #492d35; --spine: #301b22; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-politics { --cover: #344036; --spine: #202c22; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-geography { --cover: #234341; --spine: #142d2b; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-heritage { --cover: #454029; --spine: #2b2918; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-ethics { --cover: #3b304b; --spine: #261d32; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-civics { --cover: #3b3f48; --spine: #252932; }
@media (max-width: 700px) {
  :is(#sec-encyclopedia, #sec-society, .book-category) .learning-books, #sec-society .religion-shelf { grid-template-columns: repeat(3, minmax(0, 108px)); gap: 14px 12px; max-width: 355px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .book-card { height: 156px; padding: 8px 8px 7px 15px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .book-card::before { inset: 6px 5px 6px 11px; }
  .book-imprint { font-size: 5px; letter-spacing: .08em; }
  .book-kind { font-size: 7px; margin-top: 4px; }
  .book-title { font-size: 17px; }
  .book-format { font-size: 8px; }
  .book-count strong { font-size: 21px; }
  .book-count .book-feature { font-size: 12px; }
  .book-open { font-size: 7px; padding-top: 3px; margin-top: 4px; }
  .book-atlas .book-title { font-size: 14px; }
  .book-flags { grid-template-columns: repeat(3, 20px); gap: 4px 5px; margin-top: 6px; }
  .book-flags img { width: 20px; height: 13px; }
  .book-photo { height: 37px; margin-top: 5px; }
  .book-language .book-title { font-size: 17px; }
  .book-language .book-title-long { font-size: 14px; }
  .book-language .book-title-extra-long { font-size: 13px; }
  .book-edition { margin-top: 4px; }
  .book-edition strong { font-size: 18px; }
  .book-level-words strong { font-size: 13px; }
}
@media (max-width: 350px) {
  :is(#sec-encyclopedia, #sec-society, .book-category) .learning-books, #sec-society .religion-shelf { gap: 12px 10px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .book-card { height: 164px; padding-left: 13px; padding-right: 7px; }
  .book-title { font-size: 15px; }
  .book-atlas .book-title { font-size: 12px; }
  .book-atlas .book-format { font-size: 7px; }
  .book-flags { grid-template-columns: repeat(3, 17px); gap: 4px; }
  .book-flags img { width: 17px; height: 12px; }
  .book-open { font-size: 6.5px; }
  .book-language .book-title { font-size: 15px; }
  .book-language .book-title-long { font-size: 12px; }
  .book-language .book-title-extra-long { font-size: 10.5px; }
  .book-edition > span { font-size: 6px; }
  .book-edition strong { font-size: 17px; }
  .book-level-words strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#sec-encyclopedia, #sec-society, .book-category) .book-card { transition: none; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .book-card:hover { transform: none; }
}

/* Compact editions for exercises, practical tools, games, and articles. */
.book-collection .book-topic { font-size: 8px; line-height: 1.4; margin-top: 4px; color: #d0c6b0; }
.book-collection .book-title { font-size: 19px; line-height: 1.35; letter-spacing: 0; margin-top: 5px; }
.book-collection .book-title-long { font-size: 16px; }
.book-collection .book-title > span, .book-detail > span { display: block; }
.book-bottom { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding-top: 5px; }
.book-detail { font-size: 8px; line-height: 1.5; color: #ded3bd; }
.book-collection .book-count { margin-top: 0; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-math { --cover: #283d48; --spine: #162a34; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-math2 { --cover: #2e443e; --spine: #192f29; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-math3 { --cover: #39374d; --spine: #242136; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-invest { --cover: #344236; --spine: #1e2d20; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-law { --cover: #42352b; --spine: #2b2017; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-law-quiz { --cover: #303e4c; --spine: #1b2937; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-law-takken { --cover: #41432d; --spine: #2b2d1a; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-chem { --cover: #24433e; --spine: #122d28; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-space { --cover: #31344d; --spine: #1c1e35; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-works { --cover: #463c30; --spine: #2c241a; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-sports { --cover: #314332; --spine: #1d2e1f; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-life { --cover: #49343e; --spine: #301f28; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-travel { --cover: #344b43; --spine: #22362f; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-calc { --cover: #2c3e46; --spine: #172931; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-games { --cover: #453449; --spine: #2c1e31; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-eng { --cover: #3b3e42; --spine: #23272c; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-blog { --cover: #493a30; --spine: #30251c; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-blog-tools { --cover: #34414a; --spine: #202c35; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-blog-notes { --cover: #443343; --spine: #2b1e2a; }
@media (max-width: 700px) {
  .book-collection .book-topic { font-size: 7px; margin-top: 3px; }
  .book-collection .book-title { font-size: 16px; margin-top: 4px; }
  .book-collection .book-title-long { font-size: 13px; }
  .book-detail { font-size: 7px; }
  .book-bottom { gap: 4px; padding-top: 4px; }
}
@media (max-width: 350px) {
  .book-collection .book-topic { font-size: 6.5px; }
  .book-collection .book-title { font-size: 14px; }
  .book-collection .book-title-long { font-size: 10.5px; }
  .book-detail { font-size: 6.5px; }
}

/* Only the Tokyo stroll volume uses the light illustrated travel cover. */
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover {
  --cover: #e7eddd;
  --spine: #b7c7a6;
  --foil: #3f5b3c;
  color: #2e5046;
  border-color: #a8b59a;
  padding: 8px 11px 8px 18px;
}
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover::before { border-color: #80977555; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover:hover { color: #2e5046; border-color: #a3b68f; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-imprint { color: #4e6449; font-size: 6px; letter-spacing: .04em; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-kind { color: #4e6449; margin-top: 4px; font-size: 8px; letter-spacing: .04em; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-title { margin-top: 3px; color: #2e5046; font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.25; letter-spacing: .015em; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-cover-art { display: block; width: 100%; height: 60px; object-fit: cover; margin: 5px 0 0; border-radius: 3px; flex-shrink: 0; }
:is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-open { margin-top: auto; padding-top: 4px; color: #3f5b3c; border-top-color: #80977555; font-size: 7px; line-height: 1.5; }
@media (max-width: 700px) {
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover { height: 156px; padding: 7px 8px 7px 15px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-imprint { font-size: 5px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-kind { font-size: 7px; margin-top: 3px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-title { font-size: 14px; margin-top: 3px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-cover-art { height: 55px; margin-top: 4px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-open { font-size: 6.5px; padding-top: 3px; }
}
@media (max-width: 350px) {
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover { padding-left: 13px; padding-right: 7px; }
  :is(#sec-encyclopedia, #sec-society, .book-category) .tokyo-stroll-cover .book-open { flex-wrap: wrap; column-gap: 2px; row-gap: 0; }
}

/* Religion has a warm amber cover, distinct from the purple ethics volume. */
:is(#sec-encyclopedia, #sec-society, .book-category) .tone-religion { --cover: #805327; --spine: #503315; }

:is(#sec-encyclopedia, #sec-society, .book-category) .tone-history-years { --cover: #315c85; --spine: #193653; }

:is(#sec-encyclopedia, #sec-society, .book-category) .tone-history-people { --cover: #8b4527; --spine: #542817; }
