:root {
  color-scheme: dark;
  --background: #090a0d;
  --surface: #0e1015;
  --text: #f3eee5;
  --muted: #beb7ac;
  --amber: #eeb171;
  --blue: #5e95e5;
  --line: rgb(238 177 113 / 23%);
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { background: var(--background); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--background); }
a { color: inherit; text-decoration: none; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
picture { display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100; padding: .8rem 1rem; background: var(--amber); color: #15100b; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header {
  position: relative;
  z-index: 10;
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: .65rem clamp(1rem, 3vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #14100d, #0b0c10 60%, #0d111b);
}
.brand { display: inline-flex; align-items: center; gap: .8rem; min-height: 44px; }
.brand-mark { display: grid; place-content: center; width: 42px; height: 42px; flex-shrink: 0; border: 1px solid var(--amber); border-radius: 50%; color: var(--amber); font-size: 1.3rem; font-weight: 700; line-height: 1; text-align: center; }
.brand-mark > span { font-size: .625rem; margin-top: 2px; letter-spacing: .08em; }
.brand-name { font-size: clamp(.875rem, 1.05vw, 1.125rem); font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.brand-name > span { color: var(--amber); }
.desktop-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.5rem); }
.desktop-nav a { display: grid; align-items: center; min-height: 44px; font-size: .875rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; }
.desktop-nav a:hover, .desktop-nav a[aria-current] { color: var(--amber); border-bottom-color: var(--amber); }
.mobile-menu { display: none; }
.more-menu { position: relative; }
.more-menu summary { display: flex; align-items: center; min-height: 44px; gap: .6rem; cursor: pointer; list-style: none; color: var(--muted); font-size: .875rem; letter-spacing: .13em; text-transform: uppercase; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu[open] summary, .more-menu[data-current] summary { color: var(--amber); }
.more-menu nav { position: absolute; top: calc(100% + 8px); right: 0; display: grid; width: 245px; padding: .75rem 1rem; border: 1px solid var(--line); background: #101117; box-shadow: 0 20px 30px rgb(0 0 0 / 45%); }
.desktop-nav .more-menu nav a { min-height: 48px; letter-spacing: .04em; text-transform: none; border-bottom: 1px solid var(--line); }
.desktop-nav .more-menu nav a:last-child { border-bottom: 0; }
.home-stage { height: calc(100svh - 152px); min-height: 340px; background: #050608; }
.home-stage .stage-picture, .home-stage img { width: 100%; height: 100%; }
.home-stage img { object-fit: contain; }
.home-caption { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 76px; padding: .875rem clamp(1rem, 3vw, 3.5rem); border-top: 1px solid var(--line); background: linear-gradient(90deg, #13100e, #0a0d13); }
.home-caption h1 { margin: 0; font-size: clamp(1rem, 1.4vw, 1.4rem); font-weight: 450; letter-spacing: .035em; }
.direction-link { display: inline-flex; align-items: center; gap: 1.3rem; min-height: 44px; color: var(--amber); font-size: .875rem; font-weight: 650; letter-spacing: .08em; }
.direction-link > span { font-size: 1.35rem; transition: transform .2s ease; }
.direction-link:hover > span { transform: translateX(4px); }
.chapter-stage { background: #050608; border-bottom: 1px solid var(--line); }
.chapter-stage img { width: 100%; height: auto; max-height: calc(100svh - 76px); object-fit: contain; }
.chapter-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); width: min(100% - 6rem, 1250px); margin: 0 auto; padding: clamp(4rem, 8vw, 8rem) 0; align-items: center; }
.eyebrow { margin: 0 0 1.2rem; color: var(--amber); font-size: .875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.chapter-intro h1 { margin: 0; font-size: clamp(2.7rem, 5.1vw, 5.75rem); font-weight: 650; line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; }
.chapter-copy p { margin: 0 0 1.6rem; color: var(--muted); font-size: 1.125rem; line-height: 1.8; max-width: 58ch; }
.ensemble-gallery { width: min(100% - 6rem, 1344px); margin: 0 auto; padding-bottom: clamp(4rem, 8vw, 8rem); scroll-margin-top: 2rem; }
.character-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.5rem; padding: 0; margin: 0; list-style: none; }
.character-grid > li { min-width: 0; scroll-margin-top: 2rem; }
.character-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); background: linear-gradient(135deg, #19120f, #101117); transition: border-color .2s ease, box-shadow .2s ease; }
.character-card:hover, .character-card:focus-visible { border-color: var(--amber); box-shadow: 0 8px 30px rgb(0 0 0 / 30%); }
.character-card img { width: 100%; height: auto; aspect-ratio: 941 / 1672; object-fit: contain; background: #050608; }
.character-card-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; aspect-ratio: 941 / 1672; background: radial-gradient(ellipse at 50% 35%, #322116, #111218 75%); color: var(--amber); }
.character-card-placeholder > span { display: grid; place-items: center; width: 7rem; height: 7rem; border: 1px solid var(--line); border-radius: 50%; font-size: 2.5rem; }
.character-card-placeholder p { margin-top: 1.5rem; font-size: .875rem; letter-spacing: .08em; color: var(--muted); }
.character-card-caption { display: flex; flex-direction: column; flex: 1; align-items: start; gap: 1rem; padding: 1.4rem; border-top: 1px solid var(--line); }
.character-card h2 { margin: 0; font-size: clamp(1.3rem, 1.8vw, 1.8rem); line-height: 1.25; font-weight: 600; text-wrap: balance; overflow-wrap: anywhere; }
.character-card-role { margin: 0; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.character-card-action { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: auto; gap: 1rem; color: var(--amber); font-size: .875rem; letter-spacing: .035em; }
.character-card-action > span { font-size: 1.5rem; }
.character-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem clamp(1.25rem, 3vw, 3.5rem); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.character-bar a { display: inline-flex; align-items: center; min-height: 44px; color: var(--amber); }
.character-page .chapter-stage img { max-height: calc(100svh - 130px); }
.character-intro { width: min(100% - 6rem, 1100px); margin: 0 auto; padding: clamp(3rem, 6vw, 6rem) 0; }
.character-intro h1 { max-width: 20ch; margin: 0; font-size: clamp(2.5rem, 5.1vw, 5rem); line-height: 1.08; font-weight: 650; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.character-role { margin: 1.5rem 0 0; color: var(--amber); font-size: 1.2rem; }
.character-bio { max-width: 68ch; margin-top: 2.5rem; font-size: 1.125rem; line-height: 1.85; color: var(--muted); overflow-wrap: anywhere; }
.character-bio p { margin: 0 0 1.5rem; white-space: pre-line; }
.character-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.character-pagination a { display: flex; flex-direction: column; justify-content: center; gap: .5rem; min-height: 44px; line-height: 1.5; }
.character-pagination a:hover { color: var(--amber); }
.character-pagination a > span { color: var(--muted); font-size: .8rem; letter-spacing: .08em; }
.character-pagination .character-overview { color: var(--amber); font-size: .875rem; }
.character-next { text-align: right; }
.klaus-scene { position: relative; width: min(100%, calc((100svh - 130px) * 1672 / 941)); margin: 0 auto; }
.character-page .klaus-scene img { max-height: none; }
.paper-hotspot { position: absolute; left: 53.5%; top: 47%; width: 6.4%; height: 50%; min-width: 44px; border-radius: 3px; }
.paper-hotspot:hover, .paper-hotspot:focus-visible { outline: 2px dashed var(--amber); outline-offset: 4px; }
.paper-callout { position: absolute; left: calc(100% + 14px); top: 65%; display: flex; align-items: center; gap: .7rem; width: 186px; padding: .7rem .9rem; background: rgb(9 10 13 / 92%); border: 1px solid var(--line); border-radius: 3px; color: var(--amber); font-size: .875rem; line-height: 1.5; }
.paper-callout > span { font-size: 1.5rem; }
.paper-text-link { margin-top: 1.5rem; }
.paper-open { overflow: hidden; }
.paper-dialog { color-scheme: light; width: min(620px, calc(100% - 2rem)); max-height: calc(100svh - 2rem); padding: 0; border: 0; color: #302b26; background: #f5eddd; box-shadow: 0 24px 90px rgb(0 0 0 / 65%); overflow-y: auto; overscroll-behavior: contain; }
.paper-dialog::backdrop { background: rgb(0 0 0 / 78%); backdrop-filter: blur(4px); }
.paper-dialog form { position: sticky; top: 0; z-index: 1; display: flex; justify-content: end; padding: .5rem 1rem; background: #f5eddd; border-bottom: 1px dashed #bbaf9b; }
.paper-close { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 44px; padding: .25rem .5rem; font: inherit; font-size: .875rem; color: #514332; background: transparent; border: 0; cursor: pointer; }
.paper-close > span { font-size: 1.7rem; }
.paper-close:focus-visible { outline-color: #785325; outline-offset: 0; }
.paper-sheet { padding: clamp(1.5rem, 5vw, 3.5rem); background: repeating-linear-gradient(0deg, transparent 0 139px, rgb(94 76 50 / 10%) 139px 140px), linear-gradient(90deg, #e8ddc9, #faf5e9 8%, #f7f0e2 92%, #e8ddc9); }
.paper-eyebrow { margin: 0 0 1.2rem; color: #6c5a41; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.paper-sheet h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.1; font-weight: 600; }
.paper-subtitle { margin: 1rem 0 2rem; font-size: .9375rem; color: #6c5a41; }
.paper-sheet .character-bio { margin-top: 0; color: #302b26; font-size: 1.0625rem; line-height: 1.85; }
.paper-sheet .character-bio p:last-child { margin-bottom: 0; }
.paper-dialog[open] .paper-sheet { animation: unroll .25s ease-out; transform-origin: top; }
@keyframes unroll { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 721px) and (max-width: 1100px) { .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; min-height: 96px; border-top: 1px solid var(--line); padding: 1.4rem clamp(1rem, 3vw, 3.5rem); color: var(--muted); font-size: .875rem; }
.site-footer > a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer > a:first-child { color: var(--amber); font-weight: 600; }
.site-footer > a:hover { color: var(--text); }
.site-footer > nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-footer > nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer > nav a:hover, .site-footer > nav a[aria-current] { color: var(--amber); }
@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary { display: flex; align-items: center; justify-content: end; gap: .6rem; min-height: 44px; min-width: 70px; font-size: .875rem; color: var(--amber); cursor: pointer; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-lines { width: 16px; height: 8px; border-block: 1px solid currentColor; }
  .mobile-menu nav { position: absolute; top: calc(100% - 1px); right: 0; display: grid; width: min(100vw, 330px); max-height: min(75svh, 34rem); overflow-y: auto; overscroll-behavior: contain; padding: 1rem; background: #101117; border: 1px solid var(--line); box-shadow: 0 20px 30px rgb(0 0 0 / 45%); }
  .mobile-menu nav a { display: flex; align-items: center; min-height: 52px; padding: .75rem 1rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .mobile-menu nav a:last-child { border-bottom: 0; }
  .mobile-menu nav a[aria-current] { color: var(--amber); }
}
@media (max-width: 720px) {
  .site-header { min-height: 68px; padding: .65rem 1rem; gap: .7rem; }
  .brand { gap: .6rem; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.05rem; }
  .brand-name { font-size: .875rem; letter-spacing: .025em; }
  .home-stage { height: auto; min-height: 0; }
  .home-stage img { width: 100%; height: auto; object-fit: contain; }
  .home-caption { display: grid; justify-content: center; text-align: center; gap: .2rem; padding: 1rem; min-height: 112px; }
  .home-caption h1 { font-size: 1rem; }
  .home-caption .direction-link { justify-content: center; }
  .chapter-stage img { max-height: none; }
  .chapter-intro { grid-template-columns: 1fr; width: calc(100% - 2.5rem); padding: 3.5rem 0 4rem; gap: 1.8rem; }
  .chapter-intro h1 { font-size: clamp(2.8rem, 11vw, 4.3rem); }
  .chapter-copy p { font-size: 1.0625rem; }
  .ensemble-gallery { width: calc(100% - 2.5rem); padding-bottom: 4rem; }
  .character-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .character-card h2 { font-size: 1.65rem; }
  .character-page .chapter-stage img { max-height: none; }
  .character-intro { width: calc(100% - 2.5rem); padding: 3rem 0; }
  .character-intro h1 { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .character-pagination { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .character-pagination .character-overview { grid-row: 1; grid-column: 1 / -1; }
  .character-next { grid-column: 2; }
  .klaus-scene { width: 100%; }
  .paper-hotspot { left: 63.5%; top: 56%; width: 10.5%; height: 31.5%; }
  .paper-callout { left: auto; right: calc(100% + 12px); top: 65%; width: 171px; flex-direction: row-reverse; font-size: .8125rem; }
  .paper-callout > span { transform: rotate(180deg); }
  .site-footer { flex-direction: column; align-items: start; gap: .25rem; padding: 1.3rem 1.25rem; }
}
@media (max-width: 360px) { .brand-name { max-width: 150px; font-size: .8rem; } }
@media (min-width: 721px) and (max-height: 550px) { .home-stage { height: auto; } .home-stage img { height: auto; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
