/* castlands website. Layout follows the agreed reference (hero, page guide,
   tabbed how-to, rails, numbered rows; a library page and a detail page);
   colour and texture follow the native App (app/Sources/Theme.swift,
   design/style.v2.css): paper surfaces, fine ink outlines, monospace type and
   the orange selection. Light only, like the App. */
:root {
  color-scheme: light;
  --ink: #191919;
  --muted: #77766f;
  --line: #252521;
  --orange: #ff6827;
  --orange-ink: #c5490c;
  --orange-light: #fff1e3;
  --hover: #ffebd6;
  --surface: #fdfdf9;
  --paper: #f6f7f2;
  --placeholder: #f3f1e9;
  --blue: #045ff2;
  --border: 1.5px solid var(--line);
  --soft-line: #d6d5cc;
  --shadow: 4px 4px 0 var(--ink);
  --mono: 'SFMono-Regular', ui-monospace, Menlo, Consolas, 'Liberation Mono', 'PingFang SC', 'Hiragino Sans', 'Noto Sans CJK SC', 'WenQuanYi Zen Hei', monospace;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--mono); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; opacity: .42; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }
.pixel { image-rendering: pixelated; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(880px, 100% - 2 * var(--gutter)); }
.dots { background-color: var(--surface); background-image: radial-gradient(circle, #a9a99f .75px, transparent 1px); background-size: 18px 18px; background-position: 9px 9px; }
.muted { color: var(--muted); }
.accent { color: var(--orange-ink); }
.kicker { font-size: 12px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.kicker.accent { color: var(--orange-ink); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; flex: none; }
.icon.fill { fill: currentColor; stroke: none; }

/* ---- Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; padding: 0; transition: padding .2s; }
.header-inner { height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 var(--gutter); background: var(--surface); border-bottom: var(--border); transition: .2s; }
.site-header.floating { padding: 10px var(--gutter) 0; }
.site-header.floating .header-inner { height: 56px; border: var(--border); box-shadow: var(--shadow); max-width: 1240px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.logo .symbol { width: 34px; height: 34px; }
.logo .wordmark { height: 28px; width: auto; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 7px 14px; font-size: 14px; white-space: nowrap; border: 1.5px solid transparent; }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--orange-light); border-color: var(--orange); color: var(--orange-ink); }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: var(--border); }
.lang button { padding: 3px 9px; font-size: 12px; }
.lang button + button { border-left: var(--border); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.lang button:hover:not([aria-pressed="true"]) { background: var(--hover); }
.soon-pill { font-size: 12px; padding: 4px 10px; background: var(--orange-light); border: 1.5px solid var(--orange); color: var(--orange-ink); white-space: nowrap; }
.menu-button { display: none; width: 38px; height: 38px; border: var(--border); place-items: center; }
.mobile-nav { border-bottom: var(--border); background: var(--surface); padding: 8px var(--gutter) 16px; }
.mobile-nav a { display: grid; grid-template-columns: 40px 1fr auto; padding: 14px 0; border-bottom: 1px solid var(--soft-line); text-decoration: none; font-size: 18px; }
.mobile-nav b { font-weight: 400; color: var(--orange-ink); font-size: 13px; padding-top: 4px; }

/* ---- Buttons ----------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border: var(--border); background: var(--surface); text-decoration: none; font-size: 15px; white-space: nowrap; transition: transform .12s, box-shadow .12s, background .12s; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.primary { background: var(--orange); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: #ff7a3f; }
.btn.outline { background: transparent; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.small.primary { box-shadow: 3px 3px 0 var(--ink); }
.text-link { text-decoration: none; font-size: 14px; color: var(--orange-ink); white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: var(--border); background: var(--surface); }
.icon-button:hover { background: var(--hover); }

/* ---- Hero ---------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--border); background:
  radial-gradient(circle at 12% 18%, #ffe0c9 0, transparent 34%), radial-gradient(circle at 88% 72%, #dbe6ff 0, transparent 36%), var(--paper); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, #b9b8ad .8px, transparent 1.1px); background-size: 22px 22px; opacity: .7; pointer-events: none; }
.hero-inner { position: relative; width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 5vw, 56px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-mark { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.hero-mark .wordmark { width: min(560px, 80vw); height: auto; }
.tagline img { height: clamp(30px, 4vw, 46px); width: auto; }
.tagline-text { font-size: clamp(18px, 2.4vw, 26px); color: #4b4fa6; letter-spacing: .5px; }
.hero-lede { margin-top: 18px; max-width: 620px; font-size: clamp(15px, 1.6vw, 18px); color: #44433e; }
.hero-chips { display: flex; gap: 0; margin-top: 18px; }
.chip-ink { padding: 6px 14px; font-size: clamp(15px, 1.8vw, 20px); background: var(--blue); color: #fff; border: var(--border); box-shadow: 4px 4px 0 var(--orange); }
.chip-ink.alt { background: var(--ink); transform: translateY(4px); box-shadow: 4px 4px 0 #ffcf3f; }
.hero-motto { margin-top: 14px; font-size: 12px; letter-spacing: 3px; color: var(--muted); }
.hero-stage { width: min(760px, 100%); margin-top: clamp(24px, 4vw, 36px); }
.desk { border: var(--border); background: var(--surface); box-shadow: 8px 8px 0 var(--ink); text-align: left; }
.desk-bar { height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: var(--border); font-size: 12px; color: var(--muted); }
.desk-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5c56; }
.desk-size { margin-left: auto; }
.hero-video { aspect-ratio: 16 / 10; container-type: size; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.availability { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.availability i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px #ff682733; }

/* ---- Video slots: recordings only; an empty slot says so --------------------------- */
.video-slot { position: relative; background: var(--placeholder); overflow: hidden; }
.video-slot video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.video-slot.empty { display: grid; place-items: center; }
.slot-backdrop { position: absolute; inset: 0; }
.slot-backdrop > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(1.05); opacity: .55; }
.slot-note { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 14px 18px; margin: 16px; background: var(--surface); border: var(--border); box-shadow: var(--shadow); max-width: 320px; }
.slot-note .icon { width: 26px; height: 26px; color: var(--orange); }
.slot-note strong { font-weight: 500; font-size: 15px; }
.slot-note small { font-size: 12px; color: var(--muted); }
.mock-widgets { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, 40cqh); gap: 4cqh; justify-content: center; align-content: center; background: linear-gradient(160deg, #e9edf7 0%, #f7efe6 55%, #fbe3d8 100%); }
.mock-widgets span { aspect-ratio: 1; border-radius: 17%; overflow: hidden; box-shadow: 0 6px 18px #2a24190f, 0 0 0 .5px #19191926; opacity: .75; }
.mock-widgets img { width: 100%; height: 100%; object-fit: cover; }
.cast-backdrop { position: absolute; inset: 0; background: var(--orange-light); display: grid; place-items: center; }
.cast-backdrop img { height: 72%; width: auto; opacity: .35; }

/* ---- Page guide (本页导览) ---------------------------------------------------------- */
.page-guide { position: sticky; top: 68px; z-index: 20; background: var(--surface); border-bottom: var(--border); }
.page-guide .wrap { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
.guide-label { display: flex; align-items: center; padding: 0 20px 0 0; font-size: 12px; color: var(--orange-ink); white-space: nowrap; }
.page-guide a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-left: var(--border); text-decoration: none; font-size: 15px; min-width: 0; }
.page-guide a:last-child { border-right: var(--border); }
.page-guide a b { font-weight: 400; font-size: 12px; color: var(--orange-ink); }
.page-guide a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-guide a .icon { margin-left: auto; width: 16px; height: 16px; color: var(--muted); }
.page-guide a:hover { background: var(--hover); }
.page-guide a.active { background: var(--orange-light); }

/* ---- Sections --------------------------------------------------------------------- */
main > section:not(.library-main) { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { text-align: center; display: grid; justify-items: center; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 52px); line-height: 1.18; font-weight: 500; letter-spacing: -1px; max-width: 14em; }
.section-head p { margin-top: 16px; color: var(--muted); max-width: 640px; }

/* Overview: story card and showcase frame */
.overview { border-bottom: var(--border); }
.overview-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.story-card { position: relative; display: flex; flex-direction: column; padding: clamp(24px, 4vw, 44px); background: var(--surface); border: var(--border); border-left: 4px solid var(--orange); box-shadow: 10px 10px 0 #3c3a8f; }
.story-card h2 { margin-top: 18px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; font-weight: 500; letter-spacing: -1px; }
.story-card > p:not(.kicker) { margin-top: 18px; color: #4b4a44; }
.numbers { margin-top: auto; padding-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--soft-line); }
.numbers dt { font-size: clamp(22px, 2.6vw, 30px); color: var(--orange-ink); line-height: 1.1; }
.numbers dd { font-size: 12px; color: var(--muted); margin-top: 4px; }
.showcase { margin: 0; display: flex; flex-direction: column; border: var(--border); background: var(--surface); }
.showcase-top, .showcase-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.showcase-top { border-bottom: var(--border); }
.showcase-top span:last-child { color: var(--orange-ink); }
.showcase-bottom { border-top: var(--border); }
.showcase-body { flex: 1; display: grid; place-items: center; padding: clamp(16px, 3vw, 32px); }
.showcase-body img { width: 100%; height: auto; border: var(--border); box-shadow: 6px 6px 0 var(--ink); }

/* How to play: tab cards and one panel */
.play { border-bottom: var(--border); background: var(--surface); }
.step-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.step-tabs button { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-align: left; border: var(--border); background: var(--paper); min-width: 0; }
.step-tabs button b { font-weight: 400; font-size: 24px; }
.step-tabs button strong { display: block; font-size: 12px; letter-spacing: 1.5px; font-weight: 500; }
.step-tabs button small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-tabs button span { min-width: 0; }
.step-tabs button:hover { background: var(--hover); }
.step-tabs button[aria-selected="true"] { background: var(--orange-light); border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.step-tabs button[aria-selected="true"] b, .step-tabs button[aria-selected="true"] strong { color: var(--orange-ink); }
.step-panels { margin-top: 10px; border: var(--border); background: var(--surface); }
.step-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 420px; }
.panel-copy { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.panel-copy h3 { font-size: clamp(24px, 3vw, 36px); line-height: 1.25; font-weight: 500; }
.panel-copy p:not(.kicker) { color: #4b4a44; }
.ticks { width: 100%; border-top: 1px solid var(--soft-line); counter-reset: tick; }
.ticks li { counter-increment: tick; display: grid; grid-template-columns: 40px 1fr; padding: 10px 0; border-bottom: 1px solid var(--soft-line); font-size: 14px; }
.ticks li::before { content: counter(tick, decimal-leading-zero); color: var(--orange-ink); font-size: 12px; padding-top: 2px; }
.panel-art { border-left: var(--border); display: grid; place-items: center; padding: 28px; overflow: hidden; }
.art-cast { position: relative; width: min(260px, 70%); aspect-ratio: 3 / 4; background: var(--orange-light); border: 2px solid var(--orange); display: grid; place-items: center; }
.art-cast img { height: 84%; width: auto; }
.art-cast .check { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--orange); color: #fff; }
.art-cast .check .icon { stroke-width: 2.6; }
.art-layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(340px, 90%); }
.art-layouts div { aspect-ratio: 1.3; border: var(--border); background: var(--surface); display: grid; place-items: center; align-content: center; gap: 10px; }
.art-layouts div.on { background: var(--orange-light); border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.art-layouts small { font-size: 12px; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(var(--c), 14px); gap: 4px; }
.mini-grid i { width: 14px; height: 14px; background: var(--ink); }
.art-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(360px, 92%); }
.art-scenes div { position: relative; border: var(--border); background: var(--surface); padding: 4px 4px 6px; }
.art-scenes img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.art-scenes b { position: absolute; top: 9px; left: 9px; font-weight: 400; font-size: 11px; background: var(--surface); border: 1px solid var(--line); padding: 0 4px; box-shadow: 2px 2px 0 #19191945; }
.art-scenes span { display: block; font-size: 12px; padding: 4px 2px 0; }
.art-route { width: min(330px, 86%); }
.route-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8%; padding: 0; }
.route-grid span { aspect-ratio: 1; border-radius: 17%; overflow: hidden; box-shadow: 0 0 0 .5px #19191940; }
.route-grid img { width: 100%; height: 100%; object-fit: cover; }
.route-grid svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--orange); stroke-width: 3; stroke-dasharray: 7 6; }
.route-grid svg .head { stroke-dasharray: none; }

/* Cast and scene rails */
.cast { border-bottom: var(--border); }
.rail-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 16px; }
.rail-head h3 { font-size: 24px; font-weight: 500; margin-top: 4px; }
.rail-head .muted { font-size: 13px; margin-top: 4px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 44px; }
.mini-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border: var(--border); background: var(--surface); text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.mini-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.mini-figure { width: 76px; height: 76px; background: var(--orange-light); border: 1.5px solid var(--orange); display: grid; place-items: center; overflow: hidden; }
.mini-figure img { height: 88%; width: auto; }
.mini-copy { display: grid; gap: 2px; min-width: 0; }
.mini-copy strong { font-weight: 500; font-size: 17px; }
.mini-copy small { font-size: 12px; color: var(--muted); }
.mini-copy small.accent { color: var(--orange-ink); }
.mini-card.soon { border-style: dashed; background: transparent; }
.mini-card.soon .mini-figure { background: transparent; border-style: dashed; border-color: var(--muted); color: var(--muted); }
.rank-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.rank-card { display: grid; grid-template-columns: 26px 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: var(--border); background: var(--surface); }
.rank-card b { font-weight: 400; color: var(--orange-ink); font-size: 14px; }
.rank-card img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.rank-card strong { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-card small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-cta { display: flex; justify-content: center; margin-top: 40px; }

/* FAQ rows, numbered like the reference's guides */
.faq { background: var(--surface); }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: var(--border); background: var(--paper); }
.faq-list details[open] { background: var(--surface); box-shadow: var(--shadow); }
.faq-list summary { display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px; gap: 12px; align-items: center; padding: 18px 20px; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary b { font-weight: 400; font-size: 18px; color: var(--muted); }
.faq-list summary strong { display: block; font-size: 17px; font-weight: 500; }
.faq-list summary small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.faq-list summary i { width: 36px; height: 36px; display: grid; place-items: center; font-style: normal; background: var(--orange-light); border: 1.5px solid var(--orange); color: var(--orange-ink); transition: transform .2s; }
.faq-list details[open] summary i { transform: rotate(90deg); }
.faq-list details p { padding: 0 20px 20px 88px; color: #4b4a44; font-size: 14px; }

/* ---- Footer and floating button ------------------------------------------------------- */
.site-footer { border-top: var(--border); padding: 48px 0 28px; font-size: 13px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.footer-grid h4 { font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.footer-grid div { display: grid; gap: 8px; justify-items: start; }
.footer-grid a { text-decoration: none; color: var(--muted); }
.footer-grid a:hover { color: var(--orange-ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 25; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--orange); color: #fff; border: var(--border); box-shadow: var(--shadow); text-decoration: none; font-size: 14px; }
.fab:hover { background: #ff7a3f; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 16px; font-size: 13px; transition: .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Performers library (like the reference's play community) ------------------------------ */
.site-header.solid.floating { padding: 0; }
.site-header.solid.floating .header-inner { height: 68px; border-width: 0 0 1.5px; box-shadow: none; max-width: none; }
.library { width: min(1320px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 28px 0 72px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.library-side, .library-rank { position: sticky; top: 92px; border: var(--border); background: var(--surface); padding: 16px; }
.library-side h2, .library-rank h2 { font-size: 18px; font-weight: 500; padding-bottom: 12px; border-bottom: 1px solid var(--soft-line); }
.filters { display: grid; gap: 6px; margin-top: 12px; }
.filters button { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1.5px solid transparent; text-align: left; font-size: 14px; }
.filters button b { font-weight: 400; font-size: 12px; color: var(--muted); }
.filters button:hover:not(:disabled) { background: var(--hover); }
.filters button[aria-pressed="true"] { background: var(--orange-light); border-color: var(--orange); color: var(--orange-ink); }
.filters button[aria-pressed="true"] b { color: var(--orange-ink); }
.library-head h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; line-height: 1.2; }
.library-head h1 small { font-size: 14px; color: var(--orange-ink); font-weight: 400; vertical-align: middle; }
.library-head p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.library-tools { margin: 24px 0 16px; padding-top: 16px; border-top: var(--border); }
.search { display: flex; align-items: center; gap: 10px; border: var(--border); background: var(--surface); padding: 0 12px; max-width: 420px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 0; font: 14px var(--mono); color: var(--ink); outline: none; }
.search:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.perf-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); border: var(--border); background: var(--surface); transition: transform .15s, box-shadow .15s; }
.perf-card:not(.soon):hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.perf-figure { display: grid; place-items: center; background: var(--orange-light); border-right: var(--border); min-height: 210px; }
.perf-figure img { height: 82%; max-height: 200px; width: auto; }
.perf-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; border: 1px solid var(--line); padding: 0 7px; background: var(--surface); white-space: nowrap; }
.tag.hot { background: var(--orange-light); border-color: var(--orange); color: var(--orange-ink); }
.perf-body h3 { font-size: 22px; font-weight: 500; }
.perf-body h3 a { text-decoration: none; }
.perf-body p { font-size: 13px; color: var(--muted); }
.perf-stats { display: grid; gap: 4px; font-size: 12px; color: #55544e; }
.perf-stats li { display: flex; gap: 6px; align-items: center; }
.perf-stats .icon { width: 14px; height: 14px; color: var(--orange); }
.perf-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--soft-line); }
.perf-card.soon { border-style: dashed; background: transparent; }
.perf-card.soon .perf-figure { background: transparent; border-right-style: dashed; color: var(--muted); }
.perf-card.soon .perf-figure .icon { width: 36px; height: 36px; stroke-width: 1.2; }
.empty-note { padding: 40px; text-align: center; color: var(--muted); border: 1.5px dashed var(--soft-line); }
.rank-list { margin-top: 6px; }
.rank-list li { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--soft-line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list b { font-weight: 400; font-size: 13px; color: var(--orange-ink); }
.rank-list img { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); }
.rank-list strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list small { display: block; font-size: 11px; color: var(--muted); }
.rank-list em { grid-column: 3; font-style: normal; font-size: 11px; color: var(--orange-ink); margin-top: -4px; }
.library-rank .muted { font-size: 12px; margin-top: 8px; }

/* ---- Performer detail (like the reference's play page) ------------------------------------------ */
.detail { padding: 24px 0 80px; }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--orange-ink); }
.detail-grid { margin-top: 18px; padding-top: 24px; border-top: var(--border); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery-main { border: var(--border); background: var(--surface); box-shadow: 8px 8px 0 var(--ink); }
.gallery-main .video-slot { aspect-ratio: 1; }
.gallery-caption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: var(--border); font-size: 13px; }
.gallery-caption strong { font-weight: 500; }
.gallery-caption span { color: var(--muted); text-align: right; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.gallery-thumbs button { position: relative; border: var(--border); background: var(--surface); padding: 3px 3px 4px; text-align: left; min-width: 0; }
.gallery-thumbs button img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-thumbs .thumb-cast { display: block; aspect-ratio: 1; background: var(--orange-light); overflow: hidden; }
.gallery-thumbs .thumb-cast img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.gallery-thumbs small { display: block; font-size: 11px; padding: 3px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-thumbs em { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; padding: 0 4px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.gallery-thumbs button:hover { background: var(--hover); }
.gallery-thumbs button[aria-selected="true"] { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.profile { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.profile-kicker { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.profile-kicker span:first-child { color: var(--orange-ink); }
.profile-kicker b { font-weight: 400; }
.profile h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.1; font-weight: 500; letter-spacing: -1px; }
.profile-en { color: var(--muted); font-size: 14px; margin-top: -8px; }
.profile-desc { color: #4b4a44; }
.action-panel { border: var(--border); background: var(--surface); padding: 16px; display: grid; gap: 14px; }
.action-main { display: flex; gap: 10px; flex-wrap: wrap; }
.action-main .btn { flex: 1; }
.share-targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.share-targets a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 6px; border: var(--border); background: var(--paper); text-decoration: none; font-size: 13px; }
.share-targets a:hover { background: var(--hover); }
.link-box { display: flex; border: var(--border); min-width: 0; }
.link-box input { flex: 1; min-width: 0; border: 0; padding: 9px 10px; font: 12px var(--mono); background: var(--paper); color: var(--muted); }
.link-box button { padding: 0 14px; border-left: var(--border); font-size: 13px; white-space: nowrap; background: var(--surface); }
.link-box button:hover { background: var(--hover); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--soft-line); padding-top: 12px; }
.facts div { min-width: 0; }
.facts div + div { padding-left: 14px; border-left: 1px solid var(--soft-line); }
.facts dt { font-size: 22px; color: var(--orange-ink); line-height: 1.2; }
.facts dd { font-size: 12px; color: var(--muted); }
.detail-tabs { display: flex; gap: 24px; border-bottom: var(--border); margin-top: 10px; }
.detail-tabs button { padding: 10px 0; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.detail-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.act-list { display: grid; gap: 8px; }
.act-list button { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; padding: 10px; border: var(--border); background: var(--surface); }
.act-list button:hover { background: var(--hover); }
.act-list li.current button { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); background: var(--orange-light); }
.act-list img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); }
.act-copy { display: grid; gap: 2px; min-width: 0; }
.act-copy small { font-size: 11px; color: var(--muted); }
.act-copy strong { font-size: 16px; font-weight: 500; }
.act-copy span { font-size: 13px; color: #55544e; }
.act-state { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); border: 1px dashed var(--muted); padding: 1px 6px; white-space: nowrap; }
.act-state.ready { color: var(--orange-ink); border: 1.5px solid var(--orange); }
.act-state .icon { width: 12px; height: 12px; }
.adapt-table { border: var(--border); background: var(--surface); font-size: 13px; }
.adapt-row { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 12px; padding: 9px 12px; align-items: center; }
.adapt-row + .adapt-row { border-top: 1px solid var(--soft-line); }
.adapt-row.head { background: var(--paper); color: var(--muted); font-size: 12px; border-bottom: var(--border); }
.adapt-row span:first-child { display: flex; align-items: center; gap: 8px; }
.adapt-row img { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--line); }

/* ---- Responsive ---------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .library { grid-template-columns: minmax(0, 1fr); }
  .library-side, .library-rank { position: static; }
  .library-side { padding: 0; border: 0; background: none; }
  .library-side h2 { display: none; }
  .filters { display: flex; overflow-x: auto; margin: 0; }
  .filters button { flex: none; border: var(--border); background: var(--surface); }
}
@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav, .soon-pill { display: none; }
  .menu-button { display: grid; }
  .page-guide { top: 68px; }
  .page-guide .wrap { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .guide-label { display: none; }
  .page-guide a { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 12px; font-size: 13px; }
  .page-guide a:first-of-type { border-left: 0; }
  .page-guide a:last-child { border-right: 0; }
  .page-guide a .icon { display: none; }
  .overview-grid, .step-panel, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-art { border-left: 0; border-top: var(--border); min-height: 300px; }
  .step-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { position: static; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid > .logo { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .logo .wordmark { height: 24px; }
  .logo .symbol { width: 30px; height: 30px; }
  .site-header.floating { padding: 8px 10px 0; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .step-tabs button { padding: 12px; gap: 10px; }
  .step-tabs button b { font-size: 18px; }
  .rail { grid-auto-columns: 82%; }
  .rank-rail { grid-auto-columns: 70%; }
  .faq-list summary { grid-template-columns: 34px minmax(0, 1fr) 32px; padding: 14px; }
  .faq-list summary i { width: 30px; height: 30px; }
  .faq-list details p { padding: 0 14px 16px 60px; }
  .perf-card { grid-template-columns: 110px minmax(0, 1fr); }
  .perf-figure { min-height: 180px; }
  .gallery-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .gallery-thumbs small, .gallery-thumbs em { display: none; }
  .share-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-list button { grid-template-columns: 52px minmax(0, 1fr); }
  .act-list img { width: 52px; height: 52px; }
  .act-state { grid-column: 2; justify-self: start; }
  .adapt-row { grid-template-columns: 1fr 1fr; }
  .adapt-row span:last-child { grid-column: 1 / -1; color: var(--orange-ink); }
  .adapt-row.head span:last-child { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fab span { display: none; }
  .fab { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
