/* ——— Tokens ——— */
:root {
  --bg: #14161d;
  --surface: #1c1f28;
  --surface-2: #262a36;
  --ink: #efe6d2;
  --muted: #aaa18e;
  --accent: #b9381f;
  --accent-ink: #fbf5e6;
  --gold: #c9a24a;
  --field: #e8dec6;
  --field-2: #ddd1b4;
  --field-ink: #1a1710;
  --field-muted: #5d5543;

  --font-display: 'Young Serif', Georgia, serif;
  --font-text: 'Source Serif 4', Georgia, serif;
  --font-dev: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-head: clamp(1.9rem, 1.3rem + 2.6vw, 3.25rem);
  --step-display: clamp(2.2rem, 1rem + 3vw, 3.5rem);

  --gutter: clamp(16px, 2vw, 28px);
  --gap: 12px;
  --section: clamp(96px, 12vw, 200px);
  --bar-h: 60px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); text-decoration-color: var(--ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 0.98; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); line-height: 1.1; }
p { text-wrap: pretty; }
[lang="sa"], .dev { font-family: var(--font-dev); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; z-index: 100; }
.skip:focus { top: 8px; }

/* reading level */
[data-level="full"] .lvl-simple { display: none; }
[data-level="simple"] .lvl-full { display: none; }

/* ——— Top bar ——— */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter); background: var(--bg);
}
.wordmark { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }
.bar-links { display: flex; gap: 20px; margin-left: auto; }
.bar-links a { text-decoration: none; font-size: var(--step-small); font-weight: 600; opacity: 0.9; }
.bar-links a:hover { opacity: 1; text-decoration: underline; }
.level { display: flex; background: var(--surface-2); }
.level button, .level-inline button { padding: 8px 14px; font-size: var(--step-small); font-weight: 600; color: var(--ink); min-height: 40px; }
.level button[aria-pressed="true"], .level-inline button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.link-button { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; padding: 0; font: inherit; }
.link-button:hover { color: var(--accent-ink); text-decoration-color: var(--ink); }

/* ——— Buttons ——— */
.button, .button-field {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 16px 28px; text-decoration: none; font-weight: 600; font-size: var(--step-body);
  transition: transform 160ms var(--ease), background 160ms var(--ease); min-height: 52px;
}
.button:hover, .button-field:hover { background: #c8432a; color: var(--accent-ink); transform: translateY(-1px); }
.button:active, .button-field:active { transform: translateY(1px); }
.button-field.alt { background: var(--field-ink); color: var(--field); }
.button-field.alt:hover { background: #332d22; }

/* ——— Hero / intro / books split ——— */
.stage-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
  padding: var(--gap) var(--gutter) 0; align-items: start;
}
.stage-left { min-width: 0; }
.stage-right { position: sticky; top: calc(var(--bar-h) + var(--gap)); height: calc(100svh - var(--bar-h) - var(--gap) * 2); }
.plate { position: relative; height: 100%; overflow: hidden; background: var(--surface-2); }
.plate-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  opacity: 0; transition: opacity 1.6s ease;
}
.plate-img.is-on { opacity: 1; transform: scale(1.045); }
.plate-img { transform: scale(1); transition: opacity 1.6s ease, transform 7s linear; }
.plate-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: var(--surface); color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 20px; font-size: 15px; z-index: 2;
}
.plate-bar span:last-child { font-weight: 600; }

.hero-sheet {
  background: var(--surface); min-height: calc(100svh - var(--bar-h) - var(--gap) * 2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 72px clamp(24px, 4vw, 56px) 120px;
}
.hero-sheet h1 { font-size: var(--step-display); max-width: 20ch; }
.hero-lead { margin-top: 28px; max-width: 42ch; font-size: var(--step-lead); line-height: 1.4; }
.hero-sheet .button { margin-top: 36px; }
.hero-note { margin-top: 28px; font-size: var(--step-small); color: var(--muted); max-width: 40ch; }
.hero-note .link-button { color: var(--ink); font-size: inherit; }

.intro { padding: 120px 0 120px calc(15% - var(--gutter)); max-width: calc(15% + 380px); }
.intro p { font-size: 1.0625rem; line-height: 1.55; margin-bottom: 1.2em; color: var(--ink); }
.intro p.intro-first { color: var(--ink); font-weight: 600; }

.books { padding: 40px 0 var(--section) calc(15% - var(--gutter)); max-width: 640px; }
.books h2 { margin-bottom: 20px; }
.books-hint { color: var(--muted); font-size: var(--step-body); margin-bottom: 36px; max-width: 46ch; }
.book-list { list-style: none; }
.book-row { display: block; }
.book-row button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 16px;
  min-height: 58px; padding: 12px 0; color: var(--muted); font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem); transition: color 200ms var(--ease);
}
.book-row button .book-sargas { font-family: var(--font-text); font-size: 15px; color: var(--muted); }
.book-row button:hover, .book-row.is-active button { color: var(--ink); }
.book-row.is-active button .book-sargas { color: var(--gold); }
.book-detail { display: none; padding: 4px 0 28px; max-width: 46ch; }
.book-row.is-active .book-detail { display: block; }
.book-detail .book-where { color: var(--gold); font-size: var(--step-small); font-weight: 600; margin-bottom: 8px; }
.book-detail p.book-sum { font-size: 1rem; line-height: 1.55; }
.book-cast { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; background: var(--surface-2);
  color: var(--ink); font-size: var(--step-small); font-weight: 600; text-decoration: none;
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.chip:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--accent); color: var(--accent-ink); }

/* ——— Courts drag row ——— */
.courts { padding: var(--section) 0 0; }
.courts-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--gutter); gap: 24px; }
.courts-count { color: var(--muted); font-size: var(--step-body); }
.courts-hint { padding: 16px var(--gutter) 32px; color: var(--muted); max-width: 60ch; }
.drag-row {
  display: flex; gap: var(--gap); height: 68svh; min-height: 420px; max-height: 820px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; padding: 0 var(--gutter) 0 6vw; scroll-padding-left: 6vw;
  scrollbar-width: none; cursor: grab;
}
.drag-row::-webkit-scrollbar { display: none; }
.drag-row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.module { flex: 0 0 auto; height: 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: var(--gap); }
.module.tall { width: calc(68svh * 0.75); }
.module.pair { width: calc((68svh - 12px) / 2 * 1.333); }
.module.wide { width: calc(68svh * 1.25); }
.module.court-label { width: 320px; justify-content: flex-end; padding-bottom: 8px; }
.module.court-label h3 { font-size: clamp(1.6rem, 2.4vw, 2.4rem); line-height: 1; }
.module.court-label p { color: var(--muted); margin-top: 12px; font-size: 1rem; max-width: 22ch; }
.tile { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--surface-2); display: block; text-decoration: none; color: var(--ink); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; transition: transform 700ms var(--ease); }
.tile:hover img { transform: scale(1.03); }
.tile .tile-name { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); padding: 10px 14px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.tile .tile-name span:last-child { font-weight: 400; color: var(--muted); font-family: var(--font-dev); }
.module.wide .tile img { object-position: center 30%; }

/* ——— Index ——— */
.index { padding: var(--section) var(--gutter) 0; }
.index-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px var(--gap); align-items: end; margin-bottom: 40px; }
.index-controls { display: grid; gap: 16px; }
.search input {
  width: 100%; background: var(--surface-2); border: 0; padding: 14px 18px; min-height: 52px; color: var(--ink);
  font-size: var(--step-body);
}
.search input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kcells { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kcells .kcell-label { font-size: var(--step-small); color: var(--muted); margin-right: 8px; }
.kcell {
  width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-2);
  font-size: var(--step-small); font-weight: 600; color: var(--ink);
}
.kcell[aria-pressed="true"] { background: var(--gold); color: var(--field-ink); }
.index-count { color: var(--muted); font-size: var(--step-small); }

.index-split { display: grid; grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.index-stage { position: sticky; top: calc(var(--bar-h) + 12px); display: grid; gap: 16px; }
.stage-media { position: relative; aspect-ratio: 4 / 5; max-height: 46vh; background: var(--surface-2); overflow: hidden; }
.stage-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.stage-media .stage-plate { position: absolute; inset: 0; }
.stage-media .stage-plate img { opacity: 0.35; }
.stage-media .stage-plate-text { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.stage-media .stage-plate-text span { font-family: var(--font-dev); font-size: clamp(3rem, 8vw, 6rem); line-height: 1; color: var(--ink); }
.stage-media .stage-plate-text small { display: block; margin-top: 12px; color: var(--ink); font-size: var(--step-small); font-weight: 600; }
.stage-text { display: grid; gap: 6px; }
.stage-dev { font-size: var(--step-lead); color: var(--gold); line-height: 1.2; }
.stage-name { font-size: var(--step-head); line-height: 0.98; }
.stage-role { color: var(--muted); font-size: 1rem; line-height: 1.45; max-width: 40ch; }
.stage-kandas { display: flex; gap: 6px; margin-top: 8px; }
.stage-kandas span { width: 36px; height: 36px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.stage-kandas span.on { background: var(--gold); color: var(--field-ink); }
.kinweb { width: 100%; height: auto; margin-top: 8px; }
.kinweb text { font-family: var(--font-text); fill: var(--ink); font-size: 13px; font-weight: 600; }
.kinweb .kin-type { fill: var(--muted); font-size: 10.5px; font-weight: 400; }
.kinweb line { stroke: var(--surface-2); stroke-width: 2; }
.kinweb .kin-node rect { fill: var(--surface-2); transition: fill 160ms var(--ease); }
.kinweb .kin-node:hover rect, .kinweb .kin-node:focus rect { fill: var(--accent); }
.kinweb .kin-node { cursor: pointer; }
.kinweb .kin-center rect { fill: var(--accent); }
.kinweb .kin-center text { fill: var(--accent-ink); }

.index-list { min-width: 0; }
.group-band { background: var(--surface); padding: 14px 18px; margin: 48px 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.group-band:first-child { margin-top: 0; }
.group-band h3 { font-size: var(--step-lead); }
.group-band span { color: var(--muted); font-size: var(--step-small); }
.row { border: 0; }
.row-head {
  width: 100%; text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  min-height: 58px; padding: 10px 18px; color: var(--ink); transition: background 160ms var(--ease);
}
.row-head:hover { background: var(--surface); }
.row.is-active .row-head { background: var(--surface-2); }
.row-name { font-family: var(--font-display); font-size: clamp(1.2rem, 1.5vw, 1.5rem); line-height: 1.1; }
.row-role { display: block; font-family: var(--font-text); font-size: 16px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.row-cells { display: flex; gap: 3px; }
.row-cells i { width: 12px; height: 12px; background: var(--surface-2); display: block; }
.row-cells i.on { background: var(--gold); }
.row.is-active .row-cells i { background: var(--surface); }
.row.is-active .row-cells i.on { background: var(--gold); }
.row-detail { display: none; padding: 20px 18px 36px; background: var(--surface); }
.row.is-active .row-detail { display: block; }
.detail-also { color: var(--gold); font-size: var(--step-small); font-weight: 600; margin-bottom: 14px; }
.detail-bio { max-width: 62ch; font-size: var(--step-body); line-height: 1.6; }
.detail-bio + .detail-bio { margin-top: 0.9em; }
.detail-h { font-family: var(--font-text); font-weight: 600; font-size: var(--step-body); margin: 24px 0 8px; color: var(--ink); }
.detail-facts { list-style: none; max-width: 62ch; }
.detail-facts li { padding-left: 18px; position: relative; margin-bottom: 8px; font-size: 1rem; line-height: 1.5; }
.detail-facts li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--accent); }
.detail-fate { max-width: 62ch; font-size: 1rem; color: var(--muted); }
.detail-kin { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-kin .chip small { font-weight: 400; color: var(--muted); margin-right: 6px; }
.detail-kin .chip:hover small { color: var(--accent-ink); }
.detail-share { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.empty { padding: 48px 18px; color: var(--muted); }

/* ——— Families ——— */
.families { padding: var(--section) var(--gutter) 0; }
.fam-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.tabs { display: flex; gap: 4px; background: var(--surface); }
.tabs button { padding: 12px 18px; min-height: 48px; font-size: var(--step-body); color: var(--muted); font-weight: 600; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tabs button:hover:not([aria-selected="true"]) { color: var(--ink); }
.fam-body { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.fam-text h3 { font-size: var(--step-head); margin-bottom: 16px; }
.fam-text p { max-width: 36ch; color: var(--ink); }
.fam-hint { margin-top: 16px; color: var(--muted); font-size: var(--step-small); }
.tree-wrap { background: var(--surface); padding: clamp(12px, 2vw, 28px); overflow-x: auto; }
.tree { width: 100%; height: auto; min-width: 720px; }
.tree text { font-family: var(--font-text); fill: var(--ink); font-size: 18px; font-weight: 600; pointer-events: none; }
.tree .tree-node rect { fill: var(--surface-2); transition: fill 160ms var(--ease); }
.tree .tree-node.deva rect { fill: #2c3346; }
.tree .tree-node:hover rect, .tree .tree-node:focus rect { fill: var(--accent); }
.tree .tree-node { cursor: pointer; }
.tree .tree-node.marry rect { fill: var(--gold); }
.tree .tree-node.marry text { fill: var(--field-ink); }
.tree line, .tree path { stroke: #3a4052; stroke-width: 2; fill: none; }
.tree .spouse { stroke: var(--gold); stroke-width: 3; }
.tree { min-width: 1000px; }

/* ——— World ——— */
.world { padding: var(--section) var(--gutter) 0; }
.world-head { margin-bottom: 40px; }
.world-hint { color: var(--muted); max-width: 60ch; margin: 16px 0 28px; }
.world-split { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.world-stage .wstage-h { margin-top: 16px; }
.world-stage .detail-kin { gap: 6px; }
.world-stage .stage-media { max-height: 42vh; }
.row-type { display: inline-block; color: var(--gold); font-size: 13px; font-weight: 600; margin-right: 8px; }

/* ——— Play ——— */
.field { background: var(--field); color: var(--field-ink); }
.field ::selection { background: var(--field-ink); color: var(--field); }
.play { margin-top: var(--section); padding: var(--section) var(--gutter); }
.play-inner { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.play-text h2 { margin-bottom: 20px; }
.play-text p { max-width: 36ch; }
.score { margin-top: 28px; font-family: var(--font-display); font-size: var(--step-head); color: var(--accent); }
.riddle { background: var(--field-2); padding: clamp(24px, 3vw, 44px); }
.riddle-clue { font-family: var(--font-display); font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.2; min-height: 3.6em; }
.riddle-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.riddle-choices button {
  background: var(--field); color: var(--field-ink); padding: 16px 18px; text-align: left; min-height: 56px;
  font-weight: 600; font-size: var(--step-body); transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.riddle-choices button:hover { background: #fff6e1; transform: translateY(-1px); }
.riddle-choices button.right { background: #3f6b45; color: #f3f0e6; }
.riddle-choices button.wrong { background: var(--accent); color: var(--accent-ink); }
.riddle-choices button:disabled { cursor: default; transform: none; }
.riddle-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.riddle-result { margin-top: 20px; font-size: var(--step-body); min-height: 1.6em; }
.riddle-result a { text-decoration-color: var(--field-ink); }

/* ——— About ——— */
.about { padding: var(--section) var(--gutter); display: grid; justify-content: center; }
.letter { max-width: 560px; }
.letter-portrait { width: 56px; height: 56px; object-fit: cover; object-position: center 10%; border-radius: 50%; margin-bottom: 28px; }
.letter h2 { margin-bottom: 20px; }
.letter p { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 1.1em; }
.letter-sources { color: var(--muted); font-size: 1rem; }


/* ——— Footer ——— */
.foot { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }
.foot-image { background: var(--surface-2); overflow: hidden; }
.foot-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.foot-menu { background: var(--surface); padding: 72px clamp(28px, 6vw, 96px); display: flex; flex-direction: column; }
.foot-mark { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 56px; }
.foot-menu nav { display: flex; flex-direction: column; gap: 22px; }
.foot-menu nav a {
  font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.5rem); text-decoration: none; line-height: 1;
  transition: transform 200ms var(--ease), color 200ms var(--ease); width: fit-content;
}
.foot-menu nav:hover a { color: var(--muted); }
.foot-menu nav a:hover { color: var(--ink); transform: translateX(12px); }
.foot-small { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 15px; color: var(--muted); }
.foot-small a { color: var(--ink); }
.foot-legal { margin-top: auto; padding-top: 48px; font-size: 13px; color: var(--muted); }

/* ——— Motion ——— */
html.motion .rise { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
html.motion .rise.in { opacity: 1; transform: none; }
html.motion .row, html.motion .module { transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html.motion .rise { opacity: 1; transform: none; }
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .index-split { grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); }
}
@media (max-width: 900px) {
  .bar-links { display: none; }
  .stage-split { grid-template-columns: 1fr; padding: var(--gap) var(--gutter) 0; }
  .stage-right { position: sticky; top: calc(var(--bar-h) + var(--gap)); height: 52svh; order: -1; }
  .stage-left { position: relative; z-index: 2; background: var(--bg); }
  .hero-sheet { min-height: 0; padding: 56px 24px 72px; margin-top: var(--gap); }
  .hero-sheet h1 { font-size: clamp(1.9rem, 7.6vw, 2.8rem); }
  .intro { padding: 72px 0 72px 0; max-width: 78%; }
  .books { padding: 24px 0 var(--section) 0; }
  .index-head { grid-template-columns: 1fr; }
  .index-split { grid-template-columns: 1fr; gap: 24px; }
  .index-stage { position: sticky; top: var(--bar-h); z-index: 3; background: var(--bg); grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding-bottom: 12px; }
  .stage-text { min-width: 0; }
  .index-split, .index-list { min-width: 0; }
  .stage-media { aspect-ratio: 4 / 5; }
  .stage-name { font-size: clamp(1.4rem, 5vw, 1.9rem); }
  .stage-role { font-size: 0.95rem; }
  .kinweb { display: none; }
  .stage-kandas { gap: 4px; flex-wrap: wrap; }
  .stage-kandas span { width: 26px; height: 26px; font-size: 12px; }
  .fam-body { grid-template-columns: 1fr; }
  .world-split { grid-template-columns: 1fr; gap: 24px; }
  .world-stage { order: -1; }
  .world-stage .wstage-h, .world-stage #wstage-owners { display: none; }
  .play-inner { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; min-height: 0; }
  .foot-image { height: 50svh; }
  .foot-small { grid-template-columns: 1fr; }
  .module.tall { width: 72vw; } .module.pair { width: 64vw; } .module.wide { width: 88vw; }
  .drag-row { height: 62svh; min-height: 360px; padding-left: var(--gutter); scroll-padding-left: var(--gutter); gap: 8px; scroll-snap-type: x mandatory; }
  .module.court-label { width: 220px; }
}
@media (max-width: 520px) {
  .riddle-choices { grid-template-columns: 1fr; }
  .row-head { padding: 10px 12px; }
  .row-detail { padding: 16px 12px 28px; }
  .group-band { padding: 12px; }
  .level button { padding: 8px 10px; }
  .plate-bar { font-size: 13px; padding: 0 14px; }
}
