/* Layout concept: an institutional financial-site look. Deep navy bands, white surfaces,
   hairline rules, small radii, gold used only as a thin accent. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eaeff5;
  --ink: #16202e;
  --ink-2: #435063;
  --ink-3: #7a8698;
  --line: #dbe1e9;
  --line-strong: #c3ccd8;
  --navy: #0c2b55;
  --navy-2: #163f78;
  --navy-ink: #ffffff;
  --gold: #a88545;
  --link: #164a8f;
  --band: #0c2b55;
  --band-2: #0a2347;
  --band-ink: #ffffff;
  --band-ink-2: #c4d1e3;
  --cta: #0c2b55;
  --cta-hover: #163f78;
  --cta-ink: #ffffff;
  --pr-bg: #eef1f5;
  --pr-ink: #4a5667;
  --cover-a: #0f2f5c;
  --cover-b: #1b4580;
  --radius: 4px;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --latin: "Montserrat", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Single light theme by design: the page stays white in every viewer theme. */

/* ===== Base ======================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.85; letter-spacing: .03em;
  line-break: strict; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
a { color: var(--link); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.45; letter-spacing: .04em; text-wrap: balance; font-weight: 700; }
h1, h2, h3, .book-title, .core-title, .theme-title { word-break: auto-phrase; }
img { max-width: 100%; }
small { font-size: .8em; }
.nb { display: inline-block; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 880px; }
.center { text-align: center; margin-top: 3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ===== PR bar / header ============================================ */
.pr-bar {
  background: var(--pr-bg); color: var(--pr-ink); font-size: 11.5px; line-height: 1.6; text-align: center;
  padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
}
.pr-label { display: inline-block; font-family: var(--latin); font-weight: 600; font-size: 10px; letter-spacing: .12em; padding: 0 6px; margin-right: 8px; color: var(--pr-bg); background: var(--pr-ink); border-radius: 2px; }

.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .12em; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 3px; background: var(--navy); position: relative; }
.brand-mark::before {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 9px; height: 16px;
  background: linear-gradient(90deg, var(--navy-ink) 0 3px, transparent 3px 7px, var(--navy-ink) 7px 10px, transparent 10px 14px, var(--navy-ink) 14px 18px);
}
.brand-mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 2px; background: var(--gold); }
.site-nav { display: flex; gap: 4px 28px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }
.header-search { margin-left: auto; }
.header-search input {
  width: 240px; max-width: 100%; font: inherit; font-size: 13.5px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.header-search input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  .site-header { position: static; }
  .header-inner { gap: 4px 18px; min-height: 0; }
  .header-search { margin-left: 0; width: 100%; padding-bottom: 6px; }
  .header-search input { width: 100%; }
  .site-nav { font-size: 13px; gap: 0 18px; }
}

/* ===== Buttons ==================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .06em; line-height: 1.4;
  padding: 12px 22px; min-height: 46px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-primary::after, .btn-secondary::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); margin-left: 2px; flex: none; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-accent { background: var(--cta); color: var(--cta-ink); }
.btn-accent:hover { background: var(--cta-hover); }
.btn-ghost { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-small { font-size: 13px; padding: 9px 16px; min-height: 40px; }

/* ===== Hero (deep navy band) ====================================== */
.hero {
  position: relative; overflow: hidden; color: var(--band-ink);
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, var(--band) 0%, var(--band-2) 100%);
  padding-block: 84px 72px;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--gold), transparent 70%); }
.eyebrow { margin: 0 0 18px; font-family: var(--latin); font-size: 12px; font-weight: 600; letter-spacing: .24em; color: var(--gold); }
.hero h1 { font-size: clamp(30px, 5vw, 50px); margin: 0 0 28px; letter-spacing: .06em; line-height: 1.4; color: var(--band-ink); }
.lead { max-width: 640px; font-size: clamp(15px, 1.9vw, 16.5px); color: var(--band-ink-2); margin: 0 0 14px; line-height: 2; }
.lead strong { color: var(--band-ink); font-weight: 700; }
.signature { color: var(--band-ink-2); margin: 0 0 32px; letter-spacing: .12em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-accent { background: #ffffff; color: #0c2b55; }
.hero .btn-accent:hover { background: #e9eef5; }
.hero .btn-ghost { background: transparent; color: var(--band-ink); border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { border-color: var(--band-ink); background: rgba(255,255,255,.06); }
.stats { display: flex; margin: 44px 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); max-width: 520px; }
.stats div { margin: 0; padding: 18px 28px 0 0; flex: 1; }
.stats div + div { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.18); }
.stats dt { font-size: 12px; color: var(--band-ink-2); letter-spacing: .14em; }
.stats dd { margin: 4px 0 0; font-family: var(--latin); font-size: 34px; font-weight: 600; line-height: 1.2; color: var(--band-ink); font-variant-numeric: tabular-nums; }
.stats small { font-family: var(--sans); font-size: 13px; margin-left: 4px; color: var(--band-ink-2); font-weight: 500; }
@media (max-width: 520px) {
  .br-wide { display: none; }
  .hero { padding-block: 56px 52px; }
  .stats div { padding-right: 14px; } .stats div + div { padding-left: 14px; }
  .stats dd { font-size: 26px; }
}

.hero-inner { display: grid; gap: 48px; align-items: end; }
.shelf { display: none; }
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 340px; }
  .shelf { display: block; }
}
.shelf-books { display: flex; align-items: flex-end; gap: 3px; height: 250px; padding: 0 8px; border-bottom: 3px solid var(--gold); }
.shelf-books a {
  flex: 1; height: var(--h); border-radius: 1px;
  background:
    linear-gradient(180deg, transparent 10%, rgba(201,168,106,.8) 10% 11%, transparent 11% 87%, rgba(201,168,106,.8) 87% 88%, transparent 88%),
    linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,0) 60%),
    hsl(214 45% calc(26% + var(--hue) * .07%));
  transition: transform .2s;
}
.shelf-books a:hover, .shelf-books a:focus-visible { transform: translateY(-8px); }
.shelf-caption { margin: 12px 0 0; font-size: 11.5px; color: var(--band-ink-2); text-align: center; letter-spacing: .14em; }

/* ===== Sections =================================================== */
.section { padding-block: 88px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-eyebrow { margin: 0 0 6px; font-family: var(--latin); font-size: 12px; font-weight: 600; letter-spacing: .26em; color: var(--gold); }
.section-title { font-size: clamp(23px, 3.2vw, 31px); margin: 0 0 14px; color: var(--navy); letter-spacing: .06em; }
.section-title::after { content: ""; display: block; width: 40px; height: 2px; background: var(--gold); margin-top: 16px; }
.section-lead { color: var(--ink-2); margin: 0 0 40px; max-width: 680px; }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: step; border: 1px solid var(--line); background: var(--surface); }
.steps li { padding: 26px 28px; display: grid; gap: 6px; counter-increment: step; }
.steps li + li { border-left: 1px solid var(--line); }
.steps li::before { content: "STEP 0" counter(step); font-family: var(--latin); font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--gold); }
.steps strong { font-size: 17px; color: var(--navy); }
.steps span { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.steps-section { padding-bottom: 24px; }
@media (max-width: 820px) { .steps li + li { border-left: 0; border-top: 1px solid var(--line); } }

/* ===== Core 30 (face-out covers) ================================= */
.core-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 44px 28px; }
.core-card { display: flex; flex-direction: column; gap: 4px; }
.core-no { margin-top: 16px; font-family: var(--latin); font-size: 11.5px; font-weight: 600; color: var(--gold); text-decoration: none; letter-spacing: .14em; }
.core-title { font-weight: 700; font-size: 16.5px; line-height: 1.55; margin: 0; }
.core-title a { color: var(--ink); text-decoration: none; }
.core-title a:hover { color: var(--navy); text-decoration: underline; }
.core-original { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; letter-spacing: .02em; }
.core-reason { margin: 10px 0 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); line-height: 1.8; flex: 1; }
.core-card .btn { align-self: stretch; }

.cover {
  position: relative; display: block; aspect-ratio: 2 / 3; max-width: 100%; overflow: hidden;
  border-radius: 2px 4px 4px 2px; background: var(--surface-2);
  box-shadow: 0 1px 2px rgba(12, 30, 60, .14), 0 12px 28px rgba(12, 30, 60, .14);
  transition: transform .25s, box-shadow .25s;
}
.cover:hover, .cover:focus-visible { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(12, 30, 60, .16), 0 20px 36px rgba(12, 30, 60, .2); }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.1) 60%, transparent); pointer-events: none; z-index: 2; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity .3s; }
.cover.has-image img { opacity: 1; }
.cover-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 22% 13% 13% 17%; color: #f5f1e8;
  background:
    linear-gradient(180deg, transparent 0 68%, rgba(201,168,106,.85) 68% calc(68% + 1px), transparent calc(68% + 1px)),
    linear-gradient(160deg, var(--cover-b), var(--cover-a));
}
.cover-fallback::before { content: ""; position: absolute; left: 17%; top: 12%; width: 22px; height: 2px; background: #c9a86a; }
.cf-title { font-weight: 700; font-size: clamp(14px, 1.5vw, 17px); line-height: 1.55; letter-spacing: .05em; word-break: auto-phrase; overflow-wrap: anywhere; }
.cf-author { font-size: 10.5px; letter-spacing: .12em; opacity: .8; }
.cover.has-image .cover-fallback { visibility: hidden; }
@media (max-width: 520px) {
  .core-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; }
  .cf-title { font-size: 13px; }
}

.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list a {
  display: inline-flex; align-items: baseline; gap: 8px; font-size: 13.5px; line-height: 1.5;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 12px;
  color: var(--ink); text-decoration: none;
}
.chip-list a:hover { border-color: var(--navy); color: var(--navy); }
.chip-no { font-family: var(--latin); font-size: 10.5px; color: var(--gold); font-weight: 600; letter-spacing: .06em; }

/* ===== Theme grid ================================================= */
.theme-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.theme-card a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; background: var(--surface);
  padding: 26px 26px 22px; color: var(--ink); text-decoration: none; position: relative; transition: background-color .15s;
}
.theme-card a::before { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 3px; background: var(--gold); transition: width .25s; }
.theme-card a:hover { background: var(--surface-2); }
.theme-card a:hover::before { width: 100%; }
.theme-num { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; display: flex; align-items: baseline; gap: 10px; }
.theme-num b { font-family: var(--latin); font-weight: 600; font-size: 26px; color: var(--navy); letter-spacing: .02em; line-height: 1; }
.theme-title { font-weight: 700; font-size: 16.5px; line-height: 1.6; color: var(--navy); margin-top: 8px; }
.theme-sub { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.theme-count { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ===== Theme / sub-page hero ===================================== */
.theme-hero { padding-block: 52px 44px; background: var(--surface); border-bottom: 1px solid var(--line); }
.theme-hero .eyebrow { font-family: var(--sans); letter-spacing: .14em; font-weight: 700; margin-bottom: 10px; }
.theme-hero h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 8px; color: var(--navy); }
.theme-hero h1::after { content: ""; display: block; width: 40px; height: 2px; background: var(--gold); margin-top: 18px; }
.theme-subtitle { font-size: 17px; color: var(--ink-2); margin: 0 0 16px; font-weight: 500; }
.theme-desc { max-width: 760px; color: var(--ink-2); margin: 16px 0 18px; }
.breadcrumb { font-size: 12.5px; color: var(--ink-3); margin: 0 0 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.theme-toc { margin-top: 10px; }
.theme-toc summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--link); margin-bottom: 14px; }

/* ===== Book cards ================================================= */
.book-list { display: grid; gap: 20px; }
.book { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px 28px; overflow: hidden; }
.book::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy); }
.book:target { box-shadow: 0 0 0 2px var(--gold); }
.book-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.book-no { font-family: var(--latin); font-size: 11.5px; font-weight: 600; color: var(--gold); text-decoration: none; letter-spacing: .14em; }
.book-theme { font-size: 12px; color: var(--ink-3); }
.book-title { font-size: clamp(19px, 2.4vw, 22px); margin: 6px 0 2px; line-height: 1.55; color: var(--navy); }
.book-original { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; overflow-wrap: anywhere; }
.book-jp-extra { margin: 0; font-size: 12px; color: var(--ink-3); }
.book-meta {
  margin: 16px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.7; display: flex; flex-wrap: wrap; gap: 0 4px; overflow-wrap: anywhere;
}
.book-meta span:not(:last-child)::after { content: "／"; color: var(--line-strong); margin-left: 4px; }
.book-summary { margin: 16px 0 0; font-size: 15px; line-height: 1.95; }
.badges { margin: 12px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 2px; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--bg); }
.badge-check { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.book-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 520px) {
  .book { padding: 24px 20px 22px 24px; }
  .book-links .btn { flex: 1 1 100%; }
}

/* ===== Pager ====================================================== */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 44px; background: var(--line); border: 1px solid var(--line); }
.pager > * { background: var(--surface); }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; color: var(--navy); text-decoration: none; font-weight: 700; line-height: 1.55; }
.pager a:hover { background: var(--surface-2); }
.pager small { font-weight: 500; color: var(--ink-3); font-size: 12px; letter-spacing: .1em; }
.pager-next { text-align: right; }
@media (max-width: 520px) { .pager { grid-template-columns: 1fr; } .pager-next { text-align: left; } }

/* ===== Filter (all books) ======================================= */
.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.filter input[type="search"], .filter select {
  font: inherit; font-size: 15px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); min-height: 46px;
}
.filter input:focus, .filter select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
.filter-q { flex: 1 1 280px; }
.filter-q input { width: 100%; }
.filter-ch { flex: 0 1 300px; max-width: 100%; }
.filter-ch select { width: 100%; }
.filter-jp { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.filter-jp input { accent-color: var(--navy); width: 16px; height: 16px; }
.result-count { margin: 16px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--ink-2); padding: 48px 0; }
.page-all .header-search { display: none; }

/* ===== Prose (about) ============================================= */
.prose h2 { font-size: 20px; margin: 44px 0 12px; color: var(--navy); padding-left: 14px; border-left: 3px solid var(--gold); line-height: 1.5; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }

/* ===== Footer (navy band) ======================================= */
.site-footer { background: var(--band-2); color: var(--band-ink-2); padding-block: 56px 64px; font-size: 13px; border-top: 3px solid var(--gold); }
.site-footer a { color: var(--band-ink); }
.footer-brand { font-weight: 700; font-size: 18px; letter-spacing: .14em; color: var(--band-ink); margin: 0; }
.footer-tagline { margin: 4px 0 22px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 18px 0; margin-bottom: 18px; border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-nav a { text-decoration: none; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; }
.disclosure { color: var(--band-ink); font-weight: 700; margin: 12px 0 6px; }
.fine { margin: 3px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cover, .theme-card a, .theme-card a::before, .shelf-books a { transition: none; }
  .cover:hover, .shelf-books a:hover { transform: none; }
}

/* ===== Concept: goal panel, three freedoms, four-step roadmap ===== */
@media (min-width: 980px) { .hero-inner { grid-template-columns: minmax(0, 1fr) 360px; align-items: center; } }
.goal { border: 1px solid rgba(255,255,255,.22); border-top: 3px solid var(--gold); background: rgba(255,255,255,.05); padding: 30px 30px 26px; }
.goal-label { margin: 0 0 10px; font-family: var(--latin); font-size: 12px; font-weight: 600; letter-spacing: .26em; color: var(--gold); }
.goal-title { margin: 0 0 22px; font-size: 19px; font-weight: 700; line-height: 1.7; color: var(--band-ink); }
.goal-stats { margin: 0; display: grid; gap: 0; }
.goal-stats div { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.18); }
.goal-stats dt { font-size: 12px; letter-spacing: .14em; color: var(--band-ink-2); }
.goal-stats dd { margin: 2px 0 0; font-family: var(--latin); font-size: 38px; font-weight: 600; line-height: 1.25; color: var(--band-ink); font-variant-numeric: tabular-nums; }
.goal-stats small { font-family: var(--sans); font-size: 14px; font-weight: 500; margin: 0 4px; color: var(--band-ink-2); }
.goal-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); font-size: 11.5px; line-height: 1.7; color: var(--band-ink-2); }

.freedoms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); border: 1px solid var(--line); }
.freedom { padding: 34px 30px 30px; min-width: 0; }
.freedom + .freedom { border-left: 1px solid var(--line); }
@media (max-width: 919px) { .freedom + .freedom { border-left: 0; border-top: 1px solid var(--line); } }
.freedom-en { margin: 0; font-family: var(--latin); font-size: 12px; font-weight: 600; letter-spacing: .26em; color: var(--gold); }
.freedom h3 { margin: 6px 0 16px; font-size: 21px; color: var(--navy); }
.freedom-pain { margin: 0 0 12px; padding-left: 14px; border-left: 2px solid var(--line-strong); font-size: 13.5px; line-height: 1.85; color: var(--ink-3); }
.freedom-gain { margin: 0 0 22px; font-size: 15px; line-height: 1.9; color: var(--ink); }
.freedom-label { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .12em; color: var(--ink-3); }

.flow { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-strong); background: var(--bg); }
.flow li { position: relative; min-width: 0; }
.flow li + li { border-left: 1px solid var(--line-strong); }
.flow a, .flow-goal { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 20px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 14.5px; line-height: 1.6; }
.flow a:hover { background: var(--surface-2); }
.flow span { font-family: var(--latin); font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--gold); }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--bg); border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); transform: rotate(45deg); z-index: 1; }
.flow-goal { background: var(--band); color: var(--band-ink); }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow li + li { border-left: 0; border-top: 1px solid var(--line-strong); }
  .flow li:not(:last-child)::after { right: auto; left: 28px; top: auto; bottom: -6px; margin: 0; transform: rotate(135deg); }
}

.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; }
.stage { display: grid; gap: 24px 48px; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; scroll-margin-top: 96px; }
@media (max-width: 860px) { .stage { grid-template-columns: 1fr; } }
.stage-head { border-top: 3px solid var(--navy); padding-top: 18px; }
.stage-no { margin: 0; font-family: var(--latin); font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--gold); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stage-no b { font-size: 34px; letter-spacing: .02em; color: var(--navy); line-height: 1; font-weight: 600; }
.stage h3 { margin: 12px 0 10px; font-size: 22px; color: var(--navy); }
.stage-lead { margin: 0 0 12px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.stage-count { margin: 0; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage .theme-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stage .theme-card a { padding: 20px 22px 16px; }
.stage .theme-title { margin-top: 0; font-size: 15.5px; }

.closing p { color: var(--ink-2); }
.closing .note, .note { font-size: 12.5px; line-height: 1.8; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px; }
.hero h1 { font-size: clamp(27px, 4.2vw, 44px); }

/* ===== Book of the day =========================================== */
.daily { border-bottom: 1px solid var(--line); }
.daily-date { font-weight: 700; color: var(--navy); }
.daily-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; padding: 36px; border: 1px solid var(--line); border-top: 3px solid var(--gold); background: var(--surface); }
.daily-cover { width: 200px; }
.daily-body { min-width: 0; }
.daily-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }
.daily-meta span:first-child { font-family: var(--latin); font-weight: 600; color: var(--gold); letter-spacing: .14em; }
.daily-meta a { color: var(--ink-2); }
.daily-title { margin: 8px 0 2px; font-size: clamp(22px, 2.8vw, 28px); color: var(--navy); line-height: 1.5; }
.daily-original { margin: 0; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.daily-author { margin: 14px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.daily-summary { margin: 16px 0 0; font-size: 15.5px; line-height: 2; }
.daily-shuffle { margin-top: 18px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: .22em; }
.daily-shuffle:hover { text-decoration-thickness: 2px; }
@media (max-width: 680px) {
  .daily-card { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }
  .daily-cover { width: 150px; }
}
@media (min-width: 761px) and (max-width: 1240px) { .header-inner { gap: 20px; } .site-nav { gap: 4px 20px; } .header-search input { width: 180px; } }
/* Keep the header on one row: tighter brand, and the header search (also on the all-books page) hides on mid widths. */
.brand { letter-spacing: .06em; }
@media (min-width: 761px) { .header-inner { flex-wrap: nowrap; } .site-nav { flex-wrap: nowrap; } .header-search input { width: 200px; } }
@media (min-width: 761px) and (max-width: 1239px) { .header-search { display: none; } .site-nav { margin-left: auto; } }
@media (min-width: 761px) and (max-width: 960px) { .brand { font-size: 15px; } .site-nav { font-size: 13px; gap: 4px 14px; } }
/* The hero is a single column now that the goal panel is gone. */
@media (min-width: 980px) { .hero-inner { grid-template-columns: minmax(0, 1fr); } }

/* ===== Worry search ============================================== */
.worry { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.worry-form { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin-top: 8px; }
.worry-form textarea {
  flex: 1 1 420px; min-width: 0; font: inherit; font-size: 16px; line-height: 1.8; padding: 14px 16px; resize: vertical;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.worry-form textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
.worry-form .btn { flex: 0 0 auto; align-self: flex-end; min-width: 160px; justify-content: center; }
.worry-examples { margin-top: 20px; }
.worry-examples p { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.worry-chip {
  font: inherit; font-size: 13.5px; line-height: 1.5; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 12px; color: var(--ink);
}
.worry-chip:hover { border-color: var(--navy); color: var(--navy); }
.worry-result { margin-top: 36px; }
.worry-answer { margin: 0 0 24px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); }
.worry-answer h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.worry-answer p { margin: 0; line-height: 1.9; }
.worry-answer p + p { margin-top: 6px; }
.worry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.worry-book { padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); }
.worry-book .daily-title { font-size: 20px; }
.worry-book .daily-summary { font-size: 15px; }
.worry-book .book-links { margin-top: 16px; }
.worry-more { margin: 20px 0 0; font-size: 13.5px; color: var(--ink-2); }
.worry-noscript { margin-top: 16px; font-size: 14px; }
@media (max-width: 520px) {
  .worry-form .btn { flex: 1 1 100%; }
  .worry-book { padding: 20px; }
}

/* ===== Gacha ====================================================== */
.gacha { border-bottom: 1px solid var(--line); }
.gacha-stage { display: flex; justify-content: center; margin: 8px 0 40px; }
.gacha-button {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 176px; height: 176px; border-radius: 50%; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .08em; color: #fff;
  background: radial-gradient(circle at 35% 30%, var(--navy-2), var(--navy) 70%);
  border: 0; box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--gold), 0 14px 30px rgba(12, 30, 60, .28);
  transition: transform .15s, box-shadow .15s;
}
.gacha-button:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px var(--surface), 0 0 0 8px var(--gold), 0 18px 36px rgba(12, 30, 60, .32); }
.gacha-button:active { transform: translateY(1px) scale(.98); }
.gacha-button[disabled] { cursor: progress; }
.gacha-dice { width: 46px; height: 46px; color: #e9d5a6; }
.gacha.is-spinning .gacha-dice { animation: gacha-roll .7s linear infinite; }
@keyframes gacha-roll { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.gacha-button[aria-busy] span { font-size: 12.5px; letter-spacing: .02em; }

.gacha-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gacha-slot { display: flex; align-items: center; justify-content: center; min-height: 180px; }
.capsule {
  position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(180deg, var(--gold) 0 50%, var(--surface) 50%);
  border: 2px solid var(--line-strong); box-shadow: inset 0 -10px 18px rgba(12, 30, 60, .08), 0 10px 22px rgba(12, 30, 60, .12);
}
.capsule::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: var(--line-strong); }
.capsule::after { content: "？"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--navy); }
.gacha.is-spinning .capsule { animation: gacha-shake .3s ease-in-out infinite; }
.gacha.is-spinning .gacha-slot:nth-child(2) .capsule { animation-delay: .1s; }
.gacha.is-spinning .gacha-slot:nth-child(3) .capsule { animation-delay: .2s; }
.gacha.is-spinning .capsule.is-last { animation-duration: .16s; animation-delay: 0s; }
@keyframes gacha-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) translateY(-3px); } 75% { transform: rotate(12deg) translateY(-3px); } }

.gacha-card {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start;
  padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  animation: gacha-pop .45s cubic-bezier(.2, .8, .3, 1.2) both;
}
.gacha-card .cover { width: 120px; margin-bottom: 18px; }
.gacha-card .cf-title { font-size: 13px; }
.gacha-card .daily-title { font-size: 18px; margin-top: 6px; }
.gacha-card .daily-summary { font-size: 14px; line-height: 1.85; margin-top: 12px; flex: 1; }
.gacha-card .daily-author { width: 100%; }
.gacha-card .btn { margin-top: 18px; align-self: stretch; justify-content: center; }
@keyframes gacha-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .gacha-slots { grid-template-columns: 1fr; gap: 16px; }
  .gacha-slot { min-height: 0; }
  .gacha-slots:not(.is-drawn) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capsule { width: 84px; height: 84px; }
  .capsule::after { font-size: 24px; }
}
@media (max-width: 520px) {
  .gacha-button { width: 152px; height: 152px; font-size: 15px; }
  .gacha-card { padding: 22px 20px; }
  .gacha-card .cover { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .gacha.is-spinning .gacha-dice, .gacha.is-spinning .capsule, .gacha.is-spinning .capsule.is-last, .gacha-card { animation: none; }
}
.gacha-card .cf-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.gacha-card .cf-author { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.gacha-card .cover-fallback { padding: 20% 11% 11% 15%; }
/* Six header links: keep the brand on one line and give the search box room only on wide screens. */
.brand { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1439px) { .header-search { display: none; } .site-nav { margin-left: auto; } }
@media (min-width: 761px) and (max-width: 1080px) { .brand { font-size: 15px; } .site-nav { font-size: 13px; gap: 4px 14px; } }
@media (min-width: 761px) and (max-width: 900px) { .brand span:last-child { font-size: 14px; } .site-nav { gap: 4px 10px; font-size: 12.5px; } }
@media (min-width: 761px) and (max-width: 820px) { .brand .brand-name { font-size: 13px; } .site-nav { gap: 4px 8px; font-size: 12px; } .header-inner { gap: 14px; } }
@media (min-width: 761px) and (max-width: 800px) { .brand .brand-name { font-size: 12px; letter-spacing: .02em; } .site-nav { gap: 4px 7px; font-size: 11.5px; } .header-inner { gap: 10px; } }

/* ===== 教養 ======================================================= */
.kyoyo .stage-count { margin: -8px 0 32px; }
.kyoyo-group + .kyoyo-group { margin-top: 44px; }
.kyoyo-group h3 { margin: 0 0 16px; padding-left: 12px; border-left: 3px solid var(--gold); font-size: 19px; color: var(--navy); }
@media (max-width: 760px) { .brand { white-space: normal; min-width: 0; } .brand .brand-name { font-size: 15px; letter-spacing: .02em; } }
.theme-grid { background: transparent; border: 0; gap: 0; } .theme-grid .theme-card { border: 1px solid var(--line); margin: 0 -1px -1px 0; background: var(--surface); }

/* =====================================================================
   Simplified layout: compact header on phones, search-first hero,
   short top page (details live on /themes/ and /core/)
   ===================================================================== */

/* PR bar: full sentence on wide screens, one short line on phones */
.pr-short { display: none; }
@media (max-width: 760px) {
  .pr-long { display: none; }
  .pr-short { display: inline; }
  .pr-bar { padding-block: 4px; font-size: 11px; }
}

/* Header menu (phones) */
.menu { display: none; }
@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .site-header { position: sticky; }
  .header-inner { flex-wrap: nowrap; min-height: 56px; gap: 10px; padding-top: 6px; padding-bottom: 6px; position: relative; }
  .site-nav, .header-search { display: none; }
  .brand { white-space: normal; min-width: 0; flex: 1 1 auto; gap: 10px; }
  .brand .brand-mark { width: 30px; height: 30px; }
  .brand .brand-name { font-size: 14px; line-height: 1.35; letter-spacing: .02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .menu { display: block; flex: none; }
  .menu > summary {
    list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    width: 48px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--navy);
  }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; }
  .menu-icon { position: relative; margin-top: 2px; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .menu-label { font-size: 9.5px; letter-spacing: .04em; margin-top: 6px; line-height: 1; }
  .menu[open] > summary { background: var(--surface-2); }
  .menu-panel {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(12, 30, 60, .14); padding: 12px 16px 16px; max-height: calc(100vh - 90px); overflow-y: auto;
  }
  .menu-search input {
    width: 100%; font: inherit; font-size: 16px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  }
  .menu-panel nav { display: grid; margin-top: 8px; }
  .menu-panel nav a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
  .menu-panel nav a:last-child { border-bottom: 0; }
}

/* Hero with the worry search built in */
.hero { padding-block: 64px 56px; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 28px; }
.hero-search { max-width: 760px; background: var(--surface); color: var(--ink); border-radius: 6px; padding: 18px 18px 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.hero-search-label { display: block; margin: 0 0 10px; font-weight: 700; font-size: 15px; color: var(--navy); }
.hero-search-row { display: flex; gap: 10px; align-items: stretch; }
.hero-search textarea {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; line-height: 1.7; padding: 10px 14px; resize: vertical; min-height: 52px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.hero-search textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 18%, transparent); }
.hero-search .btn { flex: none; min-width: 128px; justify-content: center; }
.hero-chips { margin-top: 12px; }
.hero-chips .worry-chip { font-size: 13px; padding: 6px 11px; }
.worry-results .worry-result { margin-top: 0; }
.worry-results:has(.worry-result[hidden]) { display: none; }
.worry-results { padding-block: 40px 8px; }
@media (max-width: 760px) {
  .hero { padding-block: 32px 28px; }
  .hero h1 { font-size: 26px; margin-bottom: 12px; }
  .hero .lead { font-size: 14px; line-height: 1.85; margin-bottom: 18px; }
  .hero-search { padding: 14px 14px 12px; }
  .hero-search-row { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .hero-chips { gap: 6px; }
}

/* Sections are shorter overall */
.section { padding-block: 64px; }
.section-lead { margin-bottom: 28px; }
@media (max-width: 760px) {
  .section { padding-block: 44px; }
  .section-title { font-size: 22px; }
  .section-title::after { margin-top: 12px; }
  .section-lead { font-size: 14.5px; margin-bottom: 22px; }
}

/* Book of the day: cover beside the text on every screen */
.daily-card { grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 28px; }
.daily-cover { width: 150px; }
.daily-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
@media (max-width: 680px) {
  .daily-card { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .daily-cover { width: 92px; }
  .daily-cover .cf-title { font-size: 11px; }
  .daily-cover .cf-author { display: none; }
  .daily-title { font-size: 18px; }
  .daily-original { display: none; }
  .daily-author { margin-top: 8px; padding: 6px 0; font-size: 11.5px; }
  .daily-summary { font-size: 14px; line-height: 1.8; margin-top: 10px; -webkit-line-clamp: 3; }
  .daily-card .book-links { grid-column: 1 / -1; margin-top: 4px; }
  .daily-card .book-links .btn-secondary { display: none; }
  .daily-card .daily-shuffle { margin-top: 10px; }
}

/* Gacha: smaller machine; compact cards on phones */
.gacha-stage { margin: 0 0 28px; }
.gacha-button { width: 148px; height: 148px; font-size: 15px; }
.gacha-slot { min-height: 120px; }
.capsule { width: 88px; height: 88px; }
@media (max-width: 900px) {
  .gacha-button { width: 128px; height: 128px; font-size: 14px; }
  .gacha-dice { width: 38px; height: 38px; }
  .capsule { width: 64px; height: 64px; }
  .capsule::after { font-size: 20px; }
  .gacha-slot { min-height: 80px; }
  .gacha-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 14px; padding: 16px; align-items: start; }
  .gacha-card .cover { width: 84px; margin: 0; grid-row: span 5; }
  .gacha-card .cf-author { display: none; }
  .gacha-card .daily-title { font-size: 16px; margin-top: 4px; }
  .gacha-card .daily-author { font-size: 11.5px; padding: 4px 0; margin-top: 6px; }
  .gacha-card .daily-summary { font-size: 13.5px; -webkit-line-clamp: 3; margin-top: 6px; }
  .gacha-card .btn { grid-column: 1 / -1; margin-top: 12px; }
}

/* Four steps as compact cards; full theme lists live on /themes/ */
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.step-card > a, .step-goal { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 22px 18px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; position: relative; }
.step-card > a:hover { border-color: var(--navy); }
.step-no { font-size: 12px; color: var(--gold); letter-spacing: .1em; font-weight: 700; }
.step-no b { font-family: var(--latin); font-size: 18px; margin-left: 2px; }
.step-title { font-weight: 700; font-size: 17px; color: var(--navy); line-height: 1.5; }
.step-lead { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); flex: 1; }
.step-count { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.step-go { width: 8px; height: 8px; border-top: 1.5px solid var(--navy); border-right: 1.5px solid var(--navy); transform: rotate(45deg); }
.step-goal { background: var(--band); border-color: var(--band); justify-content: center; }
.step-goal .step-no { color: #c9a86a; }
.step-goal .step-title { color: var(--band-ink); }
.kyoyo-card { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; padding: 20px 22px 16px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--bg); color: var(--ink); text-decoration: none; scroll-margin-top: 96px; }
.kyoyo-card:hover { border-color: var(--navy); border-left-color: var(--gold); }
.kyoyo-card-title { font-weight: 700; font-size: 17px; color: var(--navy); }
.kyoyo-card-lead { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
@media (max-width: 520px) {
  .step-cards { grid-template-columns: 1fr; gap: 10px; }
  .step-card > a, .step-goal { padding: 16px 16px 14px; }
  .step-lead { font-size: 13px; }
}

/* Core 30 as a shelf: all 30 scroll sideways on phones, 12 show on wide screens */
.shelf { list-style: none; margin: 0; padding: 4px 2px 8px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 20px; }
.shelf-item { min-width: 0; }
.shelf-item .cover { width: 100%; }
.shelf-item .cf-title { font-size: 12.5px; }
.shelf-title { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--navy); text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.shelf-title:hover { text-decoration: underline; }
@media (min-width: 761px) { .shelf-item:nth-child(n+13) { display: none; } }
@media (max-width: 760px) {
  .shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: -16px; padding: 4px 16px 12px; scrollbar-width: thin; }
  .shelf-item { flex: 0 0 116px; scroll-snap-align: start; }
}

/* Freedoms: shorter */
.freedom { padding: 26px 24px 22px; }
.freedom-gain { margin-bottom: 0; }
@media (max-width: 760px) {
  .freedoms { grid-template-columns: 1fr; }
  .freedom + .freedom { border-left: 0; border-top: 1px solid var(--line); }
  .freedom { padding: 20px 18px; }
  .freedom h3 { font-size: 18px; margin-bottom: 10px; }
}

/* Theme list page */
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.jump-links a { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--navy); text-decoration: none; background: var(--surface); }
.jump-links a:hover { border-color: var(--navy); }
.kyoyo { scroll-margin-top: 72px; }

/* All-books: load more */
.more-btn { min-width: 260px; justify-content: center; }
.brand-name .nb { display: inline-block; }
@media (min-width: 1100px) { .step-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1099px) { .step-goal { grid-column: 1 / -1; } }

/* Logo: open book (logo idea 2) */
.brand-mark { background: none; border-radius: 0; }
.brand-mark::before, .brand-mark::after { content: none; }
.brand-mark svg { display: block; width: 100%; height: 100%; }

/* ===== Gacha machine ============================================== */
.gacha-stage { margin: 4px 0 32px; }
.gacha-machine { position: relative; display: flex; flex-direction: column; align-items: center; }
.gacha-dome {
  position: relative; width: 220px; height: 170px; overflow: hidden;
  border-radius: 110px 110px 22px 22px;
  background:
    radial-gradient(ellipse 46% 34% at 30% 24%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f6f8fb 0%, #e3e9f1 100%);
  border: 3px solid var(--navy); border-bottom-width: 12px;
  box-shadow: inset 0 -16px 24px rgba(12, 43, 85, .10), 0 14px 28px rgba(12, 30, 60, .16);
}
.gacha-dome::after { /* glass glint over the balls */
  content: ""; position: absolute; left: 22px; top: 16px; width: 26px; height: 64px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)); transform: rotate(18deg); pointer-events: none;
}
.gacha-dome i {
  position: absolute; left: var(--x); top: var(--y); width: 36px; height: 36px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .7) 0 14%, transparent 16%),
    linear-gradient(180deg, hsl(var(--h) 62% 56%) 0 50%, #fff 50%);
  border: 2px solid rgba(12, 43, 85, .28);
  box-shadow: inset 0 -4px 6px rgba(12, 43, 85, .12);
}
.gacha.is-spinning .gacha-dome i { animation: gacha-tumble .55s ease-in-out var(--d) infinite alternate; }
.gacha.is-spinning .gacha-dome i:nth-child(3n) { animation-duration: .42s; }
.gacha.is-spinning .gacha-dome i:nth-child(3n+1) { animation-duration: .68s; }
@keyframes gacha-tumble {
  0% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(10px, -58px) rotate(160deg); }
  100% { transform: translate(-8px, -18px) rotate(320deg); }
}
.gacha-machine .gacha-button { position: relative; z-index: 1; margin-top: -30px; }
.gacha-machine .gacha-button::after { /* idle pulse that invites a press */
  content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--gold);
  opacity: 0; animation: gacha-pulse 2.4s ease-out infinite; pointer-events: none;
}
.gacha.is-spinning .gacha-button::after { animation: none; }
@keyframes gacha-pulse { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
.gacha.is-spinning .gacha-button { transform: scale(.97); }
.gacha-count { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }

/* Result capsules: two coloured halves that split open */
.capsule {
  overflow: visible; border: 0; background: none; box-shadow: none;
  filter: drop-shadow(0 10px 14px rgba(12, 30, 60, .16));
}
.capsule::before { display: none; }
.capsule .cap-top, .capsule .cap-bottom {
  position: absolute; left: 0; right: 0; height: 50%; border: 2px solid rgba(12, 43, 85, .3);
  transition: transform .38s cubic-bezier(.3, .7, .3, 1), opacity .38s;
}
.capsule .cap-top {
  top: 0; border-radius: 999px 999px 0 0; border-bottom-width: 1px;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .65) 0 12%, transparent 14%),
    linear-gradient(180deg, hsl(var(--cap, 38) 62% 60%), hsl(var(--cap, 38) 58% 48%));
}
.capsule .cap-bottom {
  bottom: 0; border-radius: 0 0 999px 999px; border-top-width: 1px;
  background: linear-gradient(180deg, #fff, #eef2f7);
}
.capsule::after { z-index: 1; inset: 0 0 50% 0; padding-top: 4px; color: #fff; text-shadow: 0 1px 2px rgba(12, 30, 60, .35); font-size: 20px; }
.capsule.is-open { animation: none !important; }
.capsule.is-open::after { opacity: 0; transition: opacity .15s; }
.capsule.is-open .cap-top { transform: translate(-14px, -34px) rotate(-28deg); opacity: 0; }
.capsule.is-open .cap-bottom { transform: translate(10px, 22px) rotate(16deg); opacity: 0; }
.gacha-slot { position: relative; }
.gacha-slot.is-bursting::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, .95) 0 30%, rgba(168, 133, 69, .45) 55%, transparent 70%);
  animation: gacha-burst .5s ease-out forwards; pointer-events: none;
}
@keyframes gacha-burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }

/* Cards take the colour of the capsule they came from, with a light sweep */
.gacha-card { position: relative; overflow: hidden; border-top: 4px solid hsl(var(--cap, 38) 58% 50%); }
.gacha-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  animation: gacha-sweep .9s ease-out .25s both;
}
@keyframes gacha-sweep { from { transform: translateX(0); } to { transform: translateX(400%); } }

@media (max-width: 900px) {
  .gacha-dome { width: 190px; height: 148px; }
  .gacha-dome i { width: 30px; height: 30px; left: calc(var(--x) * .86); top: calc(var(--y) * .86); }
  .capsule::after { font-size: 15px; padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .gacha.is-spinning .gacha-dome i, .gacha-machine .gacha-button::after, .gacha-card::after, .gacha-slot.is-bursting::before { animation: none; }
  .capsule .cap-top, .capsule .cap-bottom { transition: none; }
}
.gacha-button[aria-busy] span { white-space: pre-line; text-align: center; line-height: 1.5; }
