.app-shell { height: auto; min-height: 100vh; overflow: visible; }
body { font-size: 16px; line-height: 1.6; }
.topbar { align-items: center; padding: 20px max(24px, calc((100vw - 1200px) / 2)); }
.topbar h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.intro { margin: 4px 0 0; color: var(--muted); }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 10px; background: var(--surface); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { clip-path: none; width: auto; height: auto; overflow: visible; }
.vivian-workspace { width: 100%; max-width: 1200px; margin: 0 auto; }
.index-pane { border: 0; background: var(--surface); }
#reference-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
#reference-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 650; }
#reference-nav a:hover, #reference-nav a[aria-current] { color: var(--accent-strong); background: var(--surface-soft); }
.detail-pane { padding: 32px 24px 48px; overflow: visible; min-width: 0; }
.detail-pane:focus { outline: none; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: 1.2rem; line-height: 1.35; margin-bottom: 12px; }
h4 { font-size: 1rem; margin: 18px 0 6px; }
p { margin-bottom: 14px; }
li { margin-bottom: 6px; }
ul { padding-left: 22px; margin-top: 0; }
.lede { font-size: 1.1rem; max-width: 760px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; column-gap: 40px; padding: 28px 36px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft); margin-bottom: 24px; }
.hero-heading { grid-column: 1; grid-row: 1; }
.hero-body { grid-column: 1; grid-row: 2; }
.hero h2 { font-size: clamp(2rem, 4vw, 3rem); }
.vivian-portrait { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: 330px; object-fit: contain; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin: 22px 0 14px; }
.primary-link { background: var(--accent-strong); color: var(--surface); border-radius: 8px; padding: 12px 18px; text-decoration: none; font-weight: 650; }
.hero-caption { color: var(--muted); font-size: .9rem; margin: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.reference-card { border: 1px solid var(--border); border-radius: 12px; padding: 22px; background: var(--surface); margin-bottom: 20px; min-width: 0; }
.reference-card > :last-child { margin-bottom: 0; }
.guide-note { padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface-soft); border-radius: 4px; }
.unlock-grid, .activity-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.unlock-path, .activity-card { margin: 0; }
.unlock-grid { margin-bottom: 20px; }
.activity-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.activity-heading h3 { margin: 0; }
.activity-icon { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.activity-cost { padding-top: 14px; border-top: 1px solid var(--border); }
.activity-banner { display: block; width: 100%; height: auto; margin-top: 16px; }
details { overflow-wrap: anywhere; }
summary { cursor: pointer; min-height: 44px; padding: 8px 0; font-weight: 650; color: var(--accent-strong); }
details[open] > summary { margin-bottom: 12px; }
.technical details { border-top: 1px solid var(--border); margin-top: 12px; }
.walkthrough { counter-reset: step; list-style: none; padding: 0; max-width: 850px; }
.walkthrough li { counter-increment: step; position: relative; padding: 4px 0 18px 58px; }
.walkthrough li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); color: var(--accent-strong); font-weight: 700; }
.walkthrough h3 { margin-bottom: 6px; }
.preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; align-items: start; }
figure { margin: 0; min-width: 0; }
figcaption { font-size: .95rem; margin-top: 12px; color: var(--muted); }
.main-art { padding: 38px 18px 28px; background-color: #f4ead4; border-radius: 12px; background-size: 100% 100%; text-align: center; color: #30261a; }
.main-art h3 { font-size: 1.1rem; }
.main-art > strong { display: block; padding: 4px; border-radius: 6px; background: #f4ead4; }
.preview-banner { width: 100%; height: auto; display: block; }
.preview-paper { background-size: 100% 100%; padding: 20px 16px; }
.preview-paper p { margin-top: 10px; }
.all-art { display: block; width: 100px; height: auto; margin: 12px auto 4px; }
.game-label { display: block; font-weight: 700; border-top: 1px solid #a6946a; padding: 10px 0; }
.notice-art { padding: 20px; background: var(--surface-soft); border-radius: 12px; text-align: center; }
.notice-art > img { display: block; width: 100%; height: 240px; object-fit: contain; margin-bottom: 12px; }
.report-art { border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.report-row { background-size: 100% 100%; padding: 20px; color: #30261a; margin-bottom: 18px; }
.inline-art { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.cost-heading { display: flex; gap: 12px; align-items: start; }
.cost-heading .inline-art { flex-shrink: 0; }
@media (max-width: 900px) {
  .topbar { align-items: start; flex-direction: column; gap: 14px; }
  .hero { column-gap: 18px; padding: 24px; grid-template-columns: minmax(0,1fr) 180px; }
  .vivian-portrait { height: 280px; }
  .quick-grid { grid-template-columns: 1fr; gap: 0; }
  .preview-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .topbar { padding: 16px; }
  #reference-nav { padding: 8px; gap: 0; }
  #reference-nav a { padding: 8px 10px; }
  .detail-pane { padding: 24px 16px 32px; }
  .hero { grid-template-columns: minmax(0,1fr) 70px; padding: 20px; column-gap: 10px; row-gap: 14px; }
  .hero h2 { font-size: 1.8rem; margin-bottom: 0; }
  .hero-body { grid-column: 1 / span 2; }
  .vivian-portrait { grid-row: 1; width: 70px; height: 144px; }
  .hero-links { align-items: start; flex-direction: column; }
  .unlock-grid, .activity-grid { grid-template-columns: 1fr; }
  .reference-card { padding: 18px; }
  .activity-icon { width: 56px; height: 56px; }
}
