@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg:#111916;
  --panel:#1a2420;
  --panel-dark:#151e1a;
  --raised:#22302a;
  --text:#f3eee2;
  --muted:#b6beb2;
  --gold:#dbbb81;
  --gold-dark:#222015;
  --line:#39453d;
  --page:min(100%, 590px);
  --sans: system-ui, "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  background:var(--bg);
  color:var(--text);
  font: 15px/1.55 var(--sans);
}
* {box-sizing:border-box}
body {margin:0; min-height:100dvh; background:radial-gradient(ellipse at 50% 0%, #20302a 0, var(--bg) 430px)}
h1,h2,h3,p {margin:0}
button,input,textarea {font:inherit}
button {cursor:pointer; color:inherit; background:none; border:none; -webkit-tap-highlight-color:transparent}
button:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:2px solid var(--gold); outline-offset:2px}
button:active {filter:brightness(.9)}
button[hidden], [hidden] {display:none}
svg {width:22px; height:22px; flex-shrink:0; vertical-align:middle}
.top {position:sticky; top:0; z-index:2; background:var(--bg); border-bottom:1px solid #ffffff0e}
.top-inner {margin:auto; width:var(--page); height:63px; padding:0 21px; display:flex; gap:12px; align-items:center; justify-content:space-between}
.brand {display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing:.095em}
.brand-mark {width:36px; height:36px; display:grid; place-items:center; color:var(--gold); border:1px solid #907c53; border-radius:10px}
.brand-mark svg {width:23px; height:23px}
.icon-btn {height:44px; min-width:44px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px}
.top-action {min-height:44px; padding:0 2px 0 12px; color:var(--gold); font-weight:650; white-space:nowrap}
.header-title {margin-right:auto; font-weight:650; letter-spacing:.04em}
.main {width:var(--page); margin:0 auto; padding:16px 20px 112px}
.hero {min-height:327px; border-radius:18px; overflow:hidden; position:relative; isolation:isolate; padding:18px; display:flex; flex-direction:column; justify-content:space-between; border:1px solid #a58e626b; background:#111a16}
.hero::before,.hero::after {content:""; position:absolute; inset:0; z-index:-1; pointer-events:none}
.hero::before {background:url("table-read.webp") 62% 34%/cover no-repeat}
.hero::after {background:linear-gradient(0deg,#101714 0%,#101714f5 12%,#10171487 50%,#10171408 85%),linear-gradient(90deg,#0e1513a0,#0e151300 81%)}
.viewfinder {display:inline-grid; place-items:center; width:36px; height:36px; border-radius:8px; color:#ebd3a7; background:#11181591}
.hero-content {padding:6px 1px 1px}
.hero h1 {font-family:var(--serif); font-weight:750; line-height:1.2; font-size:clamp(37px,11vw,53px); letter-spacing:.055em; margin:4px 0 8px}
.eyebrow {color:var(--gold); font-size:11px; font-weight:650; letter-spacing:.18em}
.hero .eyebrow {letter-spacing:.19em; font-size:10px}
.hero-caption {color:#dfdfd1; font-size:13px}
.hero-actions {display:flex; flex-wrap:wrap; gap:8px; margin-top:17px}
.btn {min-height:44px; padding:8px 14px; border:1px solid transparent; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; gap:7px; font-weight:700; font-size:13px; text-align:center}
.btn svg {width:17px; height:17px}
.primary {background:var(--gold); color:var(--gold-dark)}
.secondary {border-color:#786e54; background:#15211be0; color:var(--text)}
.ordinary-grid {display:grid; gap:10px}
#ordinary-openings {scroll-margin-top:76px}
.ordinary-card {display:grid; gap:6px; min-width:0; text-align:left; padding:16px; border:1px solid var(--line); border-radius:11px; background:#1c2822}
.ordinary-role {color:var(--gold); font-size:13px}
.ordinary-card strong {font:700 23px/1.35 var(--serif)}
.ordinary-summary {color:var(--muted); font-size:14px; line-height:1.55}
.ordinary-enter {color:var(--gold); font-size:13px; margin-top:4px}
.section-top {display:flex; align-items:end; justify-content:space-between; gap:12px; margin:24px 0 11px}
.section-top h2 {font-size:19px; letter-spacing:.04em}
.link {min-height:44px; color:var(--gold); font-size:13px; padding:0 3px; display:inline-flex; gap:6px; align-items:center; white-space:nowrap}
.link svg {width:15px;height:15px}
.stack {display:grid; gap:9px}
.tile {width:100%; min-height:72px; padding:10px 12px; display:flex; align-items:center; gap:12px; text-align:left; background:var(--panel); border:1px solid var(--line); border-radius:11px}
.tile-icon {display:grid; place-items:center; min-width:43px; height:43px; border:1px solid #766746; border-radius:8px; color:var(--gold); background:#2d3024}
.tile-main {flex:1; min-width:0}
.tile-main strong,.tile-main small {display:block; overflow-wrap:anywhere}
.tile-main strong {font-size:15px; font-weight:750; letter-spacing:.035em}
.tile-main small {margin-top:3px; color:var(--muted); font-size:12px}
.tile > svg:last-child {width:16px; height:16px; color:var(--gold)}
.tile.selected {border-color:#b69b64; background:#293326}
.bottom {position:fixed; left:0; right:0; bottom:0; z-index:3; background:var(--bg); border-top:1px solid var(--line)}
.bottom-inner {width:var(--page); margin:auto; display:flex; align-items:center; justify-content:stretch; gap:10px; padding:9px 20px 12px}
.nav-item {flex:1; min-height:49px; display:grid; place-items:center; align-content:center; gap:3px; color:var(--muted); font-size:11px; letter-spacing:.06em; border-radius:9px}
.nav-item[aria-current="page"] {color:var(--gold); background:#273029}
.nav-item svg {width:20px; height:20px}
.bar-btn {flex:1; min-width:0; padding-inline:7px}
.resume {margin-top:12px}
.page-heading {padding:7px 0 17px}
.page-heading h1 {font-family:var(--serif); font-size:35px; line-height:1.3; letter-spacing:.05em}
.page-heading p {margin-top:7px; color:var(--muted); font-size:13px}
.steps {display:flex; gap:7px; margin-bottom:15px}
.steps button {flex:1; min-height:42px; padding:3px 2px; border-bottom:2px solid var(--line); font-size:13px; color:var(--muted)}
.steps button[aria-current="step"] {border-color:var(--gold); color:var(--gold); font-weight:700}
.panel {padding:14px; border-radius:12px; background:var(--panel); border:1px solid var(--line)}
.panel + .panel, .panel + .stack, .stack + .panel {margin-top:12px}
.panel h2 {font-size:16px; margin-bottom:10px}
.panel h2:last-child {margin:0}
.panel p {overflow-wrap:anywhere}
.subtle {color:var(--muted); font-size:13px}
.field {display:grid; gap:6px; margin:12px 0; font-size:13px; font-weight:650}
.field:last-child {margin-bottom:0}
input,textarea {color:var(--text); display:block; width:100%; min-width:0; min-height:45px; padding:10px 12px; border:1px solid #4e5b50; background:var(--panel-dark); border-radius:7px; font-size:16px; font-weight:400}
input::placeholder,textarea::placeholder {color:#a4aca1; opacity:1}
textarea {resize:vertical; min-height:77px}
.option-group + .option-group {border-top:1px solid var(--line); padding-top:14px; margin-top:13px}
.option-group h3 {font-size:15px; line-height:1.35; font-weight:690; letter-spacing:.02em}
.option-group h3 small {font-size:11px; font-weight:500; color:var(--muted); margin-left:8px}
.choice-row {display:flex; flex-wrap:wrap; gap:7px; margin:11px 0 1px}
.chip {border:1px solid #526256; min-height:43px; max-width:100%; text-wrap:balance; border-radius:9px; padding:6px 10px; color:var(--text); background:#17211c; font-size:13px}
.chip[aria-pressed="true"] {color:var(--gold-dark); border-color:var(--gold); background:var(--gold); font-weight:700}
.custom-choice {margin-top:4px}
.custom-choice summary {font-size:12px; padding:10px 0 4px}
.custom-choice .field {margin-top:5px}
.custom-choice label {font-size:12px; color:var(--muted)}
.start-choices {margin-top:12px}
.extra-settings summary {font-size:14px}
.extra-settings > summary {font-weight:650}
.extra-settings > summary + .option-group {margin-top:11px}
.oc-depth > summary {font-size:15px; font-weight:700; min-height:34px}
.oc-depth > summary span {margin-left:5px; font-size:11px; font-weight:500}
.oc-depth[open] > summary {margin-bottom:13px}
.oc-depth:not([open]) > summary {min-height:24px}
.live:first-child {margin-top:0; border-top:0; padding-top:0}
.choices-heading {margin:19px 0 9px; font-size:16px}
.live {margin-top:13px; border-top:1px solid var(--line); padding-top:11px}
.live .quote {margin-top:8px; font:15px/1.85 var(--serif); white-space:pre-wrap; overflow-wrap:anywhere}
details {margin-top:12px}
summary {cursor:pointer; padding:4px 0; color:var(--gold); min-height:36px}
.preview-hero {border-radius:13px; background:#181e18; border:1px solid #786849; padding:18px; margin-bottom:13px}
.preview-hero h1 {font:700 34px/1.28 var(--serif); margin:7px 0 8px; overflow-wrap:anywhere}
.preview-hero p {font-size:13px; color:var(--muted); overflow-wrap:anywhere}
.script-nav {display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:0 0 12px}
.script-nav .btn {padding-inline:7px}
.scene {margin-bottom:13px; scroll-margin-top:76px}
.scene h2 {font-family:var(--serif); font-size:22px; margin:5px 0 9px}
.scene p {white-space:pre-wrap; line-height:1.85}
.scene p + p {margin-top:9px}
.scene .script-body {padding:12px 0 0; border-top:1px solid var(--line); font-family:var(--serif); font-size:16px}
.scene .script-body:first-child {border:0; padding:0}
.library-empty {padding:23px 16px; text-align:center}
.library-empty .btn {margin-top:16px}
.lib-row {display:flex; min-width:0; gap:5px; padding:7px; background:var(--panel); border:1px solid var(--line); border-radius:11px}
.lib-row .tile {border:0; padding:4px; background:none; min-height:52px}
.lib-row .icon-btn {margin:auto 0; color:var(--muted); min-width:42px}
.lib-row .icon-btn svg {width:18px;height:18px}
.preview-play {margin-top:13px}
.service-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.service {display:grid; align-content:center; gap:2px; min-height:59px}
.service small {font-size:11px; opacity:.86}
.api-actions {display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
#api-status:not(:empty), #play-status:not(:empty) {margin:8px 0}
.btn:disabled,.chip:disabled {opacity:.62; cursor:wait}
.round-head {display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:7px}
.round-head h2 {margin:0}
.fork-btn {font-size:12px; min-height:36px; padding-inline:10px}
.play-turn {scroll-margin-top:76px}
.memo-entry p {white-space:pre-wrap; overflow-wrap:anywhere; margin-top:8px; line-height:1.75}
.memo-entry strong {font-size:12px; color:var(--muted)}
.memo-submit {margin-top:12px}
.play-turn p {white-space:pre-wrap; overflow-wrap:anywhere; margin-top:6px; line-height:1.8}
.play-turn strong {font-size:13px; color:var(--gold)}
.player-turn {background:var(--raised)}
.play-compose {scroll-margin-bottom:20px}
.play-compose .stack button {justify-content:flex-start; text-align:left}
.play-opening {margin-bottom:12px}
.toast {position:fixed; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 30px); bottom:86px; z-index:6; background:#f0e5d0; color:#1f251f; border-radius:9px; padding:9px 14px; box-shadow:0 8px 25px #0006}
@media (max-width:360px) {
  .main,.top-inner,.bottom-inner {padding-left:14px; padding-right:14px}
  .hero {padding:14px; min-height:300px}
  .hero-actions .btn {padding-inline:10px}
  .lib-row .icon-btn {min-width:36px}
}
@media (min-width:600px) {
  .hero {min-height:370px; padding:24px}
  .hero::before {background-position:50% 36%}
}
