:root{color-scheme:dark;--paper:#e8dfc6;--gold:#d2b07a;--ink:#0e191a;--line:#46504b}*{box-sizing:border-box}body{margin:0;color:var(--paper);background:#101b1d;font:16px/1.6 "Microsoft YaHei",sans-serif}main{min-height:100dvh}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #686956;color:var(--paper);background:#23302c;padding:8px 15px;min-height:41px}button:hover,button.sel{background:#475046;border-color:var(--gold)}button.gold{background:#d8bc86;border-color:#d8bc86;color:#17211e;font-weight:700}button:disabled{opacity:.48;cursor:default}input,textarea,select{background:#162323;color:var(--paper);padding:9px;border:1px solid #687165;max-width:100%}input{min-width:0}header,.row,footer{display:flex;align-items:center;gap:9px;flex-wrap:wrap}h1,h2,p{margin:0}h1,h2{font-family:SimSun,serif}header{justify-content:space-between}.cover{min-height:100dvh;display:flex;align-items:center;padding:8vw;background:linear-gradient(90deg,#0c181cf2,#10202266 55%,transparent),url(media/cover.webp) center/cover}.cover h1{font-size:clamp(76px,12vw,156px);letter-spacing:.16em;line-height:1.2}.cover p{color:#d0c8af;margin:10px 0 28px}.cover form{margin-top:12px}.cover input{width:165px}.shell{max-width:1540px;margin:auto;padding:18px 3vw}.top{border-bottom:1px solid var(--line);padding-bottom:10px}.top b{font:700 25px SimSun,serif;letter-spacing:.18em}.top small,small{color:#b6b49f}.stage{position:relative;display:grid;grid-template-columns:minmax(200px,42%) 1fr;min-height:60vh;margin:18px 0;border:1px solid var(--line);background:#1a2625}.still{position:relative;min-height:220px;background-position:center;background-size:cover}.still:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#10191ae8,transparent 45%)}.still span{position:absolute;bottom:17px;left:18px;z-index:1;font:22px SimSun,serif}.action{padding:clamp(16px,3vw,42px);align-self:center}.action h2{font-size:clamp(26px,4vw,49px);margin:0 0 12px}.action p{line-height:1.8;white-space:pre-line;margin-bottom:16px}.action form,.choices{display:flex;gap:8px;flex-wrap:wrap}.action textarea{width:100%}.prop{width:80px;max-height:70px;object-fit:cover;mix-blend-mode:lighten}.desktools{display:flex;flex-wrap:wrap;gap:7px}.desktools button{display:flex;align-items:center;gap:7px}.desktools img{width:32px;height:32px;object-fit:cover}.push{margin-left:auto}.drawer,dialog{width:min(780px,94vw);max-height:93dvh;color:var(--paper);background:#192422;border:1px solid #948a6d;padding:16px}dialog::backdrop{background:#071010cb}dialog header{border-bottom:1px solid var(--line);margin-bottom:10px}dialog header button{margin-bottom:5px}#panel{overflow:auto;max-height:72dvh}.page{display:block;width:100%;height:auto;background:#dfd8c4}.readerbar{position:sticky;top:0;background:#192422;display:flex;align-items:center;gap:8px;padding:5px}.readerbar select{flex:1}.log{max-height:47vh;overflow:auto}.log p{padding:5px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.log b{color:var(--gold);margin-right:9px}form{display:flex;gap:6px}form input{flex:1}.grid{display:grid;grid-template-columns:repeat(16,1fr);width:min(100%,350px);background:#a69d7e;gap:1px;margin:8px 0}.grid button{min-height:0;aspect-ratio:1;padding:0;border:0;background:#ebe3cf}.grid .ink{background:#2d3b36}.grid button:disabled{opacity:1}.boardmap{height:150px;position:relative;background:linear-gradient(#1223,#1027),url(media/hall.webp) center/cover;margin:8px 0}.boardmap button{position:absolute;transform:translate(-50%,-50%);min-height:30px;font-size:12px;padding:3px 5px}.readmark{font-size:13px;color:var(--gold)}#toast:not(:empty){position:fixed;bottom:4vh;left:50%;transform:translateX(-50%);background:#f2dbad;color:#202c24;padding:8px 15px;z-index:10}dialog #toast{position:static;transform:none}@media(max-height:540px) and (orientation:landscape){.shell{padding:5px 2vw}.top{padding:0}.stage{min-height:54vh;margin:6px 0;grid-template-columns:31% 1fr}.still{min-height:152px}.action{padding:10px 16px}.action h2{font-size:24px;margin:0}.action p{margin-bottom:5px;font-size:14px}.prop{display:none}button{min-height:34px;padding:4px 9px}.desktools img{width:24px;height:24px}.grid{width:180px}.boardmap{height:105px}.cover p{margin:4px 0 10px}}@media(max-width:620px) and (orientation:portrait){.stage{grid-template-columns:1fr}.still{min-height:130px}}

dialog:has(.folio){width:min(1060px,98vw);padding:10px 14px;background:#322f27;border:1px solid #8d8065;box-shadow:0 16px 60px #0009}.folio{display:grid;grid-template-columns:minmax(95px,19%) 1fr;gap:8px;align-items:start;background:#292a23}.folio aside{position:sticky;top:0;display:grid;max-height:65vh;overflow:auto;gap:4px;padding:7px 0}.folio aside button{text-align:left;border:0;border-right:4px solid #5b6458;background:#41473b;color:#dfdbc6;font-size:13px}.folio aside button.sel{background:#d4c3a0;color:#302e26;border-color:#a45838}.folio article{min-width:0;background:#e8dfc9;padding:0 5px 8px}.folio .readerbar{z-index:1;color:#484337;background:#e1d4b8;border-bottom:1px solid #a49674;justify-content:space-between;font:15px SimSun,serif}.readerbar span{font:12px monospace}.readerbar button{min-height:32px}.stage:has(.boardmap){grid-template-columns:24% 1fr}.stage:has(.boardmap) .boardmap{height:clamp(170px,37vh,390px);width:100%;box-shadow:inset 0 0 45px #111a}.stage:has(.boardmap) .choices{display:block}.stage:has(.boardmap) .boardmap button{border-radius:2px 7px 2px 2px;border-left:4px solid #cea76b}.stage:has(.boardmap) .prop{display:none}
.foyer{min-height:100dvh;position:relative;isolation:isolate;display:grid;grid-template-rows:1fr auto;align-content:end;padding:clamp(22px,5vh,64px) 8vw 8vh;background:#102321 url(media/foyer.webp) center/cover}.foyer:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0a1518cc,transparent 65%);z-index:-1}.marquee{align-self:end;margin-bottom:5vh}.marquee h1{font:900 clamp(80px,14vw,205px)/1 SimSun,serif;color:#e5dcc5;letter-spacing:-.09em;transform:rotate(-3deg);transform-origin:left}.marquee p{color:#ceaa75;letter-spacing:.5em;margin:14px 0 0 6px}.titlemenu{display:grid;width:min(330px,60vw);gap:1px}.titlemenu button{text-align:left;font:600 clamp(20px,2vw,31px)/1.4 SimSun,serif;padding:11px 0 11px 20px;border:0;border-left:3px solid #94815a;background:linear-gradient(90deg,#101b18e8,transparent);transition:padding .16s,color .16s}.titlemenu button:first-child,.titlemenu button:hover,.titlemenu button:focus-visible{color:#f7ddb0;border-color:#cb634d;padding-left:34px}.ticket{background:#e5d6b6;color:#2d332b;max-width:440px;padding:16px 22px;box-shadow:6px 6px #08151599;transform:rotate(-.6deg)}.ticket>button:first-child{border:0;background:none;color:#605849;padding:0}.ticket label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}.ticket form{margin:10px 0}.ticket select,.ticket input{background:#f7ecd4;color:#2a342d}.waiting{min-height:100dvh;display:grid;align-content:center;gap:22px;padding:5vh 8vw;background:linear-gradient(#101913ae,#0a1215dd),url(media/parlor.webp) center/cover}.waiting header{border-bottom:1px solid #9a8a62;padding-bottom:10px}.waiting header b{font:28px SimSun,serif}.invite{text-align:center}.invite small,.invite strong{display:block}.invite strong{font:clamp(38px,6vw,80px)/1.2 monospace;letter-spacing:.12em;color:#f1d8a6}.seats{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.seatcard{border:1px dashed #667167;text-align:center;padding:15px 5px;color:#b4b6a8}.seatcard strong,.seatcard span{display:block}.seatcard strong{font:32px SimSun,serif}.seatcard.present{border:1px solid #c7b48e;background:#d1c3a5;color:#303731;transform:rotate(-1deg)}.waiting footer{justify-content:center}.shell{min-height:100dvh;display:flex;flex-direction:column}.stage{flex:1}.shell[data-kind=choice],.shell[data-kind=text],.shell[data-kind=draw],.shell[data-kind=ballot],.shell[data-kind=pair]{background:linear-gradient(#16202191,#11191be8),url(media/desk.webp) center/cover}.shell[data-kind=choice] .stage,.shell[data-kind=text] .stage,.shell[data-kind=draw] .stage,.shell[data-kind=ballot] .stage,.shell[data-kind=pair] .stage{display:block;background:#e5dbc2;color:#2e3932;align-content:center;align-self:center;width:min(840px,98%);border:7px double #ae9f7f;box-shadow:5px 6px 0 #978970,9px 11px 14px #0b100d77}.shell:is([data-kind=choice],[data-kind=text],[data-kind=draw],[data-kind=ballot],[data-kind=pair]) .still,.shell:is([data-kind=choice],[data-kind=text],[data-kind=draw],[data-kind=ballot],[data-kind=pair]) .prop{display:none}.shell[data-kind=choice] .choices button,.shell[data-kind=pair] .choices button,.shell[data-kind=ballot] .choices button{color:#29392f;background:#f5ead0;border:0;border-bottom:1px solid #a5997e;text-align:left;flex:1 1 100%}.shell[data-kind=pair] .choices button.sel{background:#b9c2a7}.shell[data-kind=visit] .still{background-size:contain;background-repeat:no-repeat;background-color:#162321}.still .pin{position:relative;z-index:2;display:block;font-size:12px;margin:3px 8px;padding:3px 8px;min-height:23px;background:#152522db;border:1px solid #bda675}.shell[data-kind=final] .stage,.shell[data-kind=end] .stage{display:block;text-align:center;background:linear-gradient(#111c1cd9,#0b1614df),url(media/cover.webp) center/cover;align-content:center}.shell:is([data-kind=final],[data-kind=end]) .still{display:none}.shell:is([data-kind=final],[data-kind=end]) .choices{justify-content:center}.desktools{border-top:1px solid #675f4c;padding:7px 0 0}.desktools button{border:0;border-bottom:2px solid #807054}.paperbutton{background:#d9c596;color:#25352d}
@media(max-height:530px) and (orientation:landscape){.foyer{grid-template-columns:1fr 1fr;grid-template-rows:1fr;align-items:center;gap:5%;padding:5vh 7vw}.marquee{align-self:center}.titlemenu,.ticket{background:#13211ede;width:100%}.ticket{background:#e5d6b6}.waiting{gap:8px;padding:8px 6vw}.seatcard{padding:5px}.invite strong{font-size:36px}.shell .stage{min-height:0}.shell .choices button{min-height:30px}}@media(max-width:580px){.seats{grid-template-columns:repeat(3,1fr)}}
.still .pin{position:absolute;margin:0;transform:translate(-50%,-50%);border-radius:12px;border-color:#cbb58b;background:#152122ef;box-shadow:0 0 0 2px #263e3f55;font-size:12px}.still .pin:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#d4ba87;margin-right:4px}.choices button.counter{flex:0 1 28%!important;min-width:80px;display:inline-flex;flex-direction:column;align-items:center;padding:5px;gap:3px}.choices .counter img{width:100%;max-height:70px;object-fit:cover;object-position:center 29%}.shell[data-kind=supply] .stage{background:linear-gradient(105deg,#14211de8,#26322aaa),url(media/desk.webp) center/cover}.shell[data-kind=supply] .still{background-size:cover}.ticket select{font-size:16px}.shell[data-kind=night]{background:#070e12}.shell[data-kind=night] .stage{background:#0a1519;border-color:#34474b}.shell[data-kind=night] .still{filter:grayscale(1) brightness(.6)}@media(max-height:530px){.choices .counter img{max-height:32px}.still .pin{font-size:11px;padding:2px 5px;min-height:22px}}
.interview{width:100%;display:grid;gap:.65rem}.interview:empty{display:none}.interview article{padding:.6rem .9rem;border-left:2px solid #af9771;background:#211e1d;color:#eee3d3}.interview article p{margin:.3rem 0}.interview article small{color:#dbbd92}.shell[data-kind=visit] .choices button{min-height:44px}.shell[data-kind=visit] .action{overflow-y:auto}
.still.zoomed{background-size:145% auto;background-position:center}.lens-note{width:100%;display:flex;gap:1rem;align-items:center}.lens-note b{color:#deb886}

.shell[data-kind=draw] .choices{display:grid;justify-items:start;align-items:start}
.shell[data-kind=draw] .grid{grid-template-columns:repeat(16,minmax(0,1fr));width:min(100%,352px)}
.shell[data-kind=draw] .grid button{min-width:0;min-height:0;width:100%;height:auto;aspect-ratio:1}
.shell[data-kind=draw] form{align-items:center}
@media(max-height:530px){.shell[data-kind=draw] .grid{width:min(100%,256px)}}
.walkstage{width:min(100%,960px);margin:auto;display:grid;gap:0;background:#162421;border:1px solid #655e4a;box-shadow:0 16px 42px #090e0dd9}.walkstage header,.walkbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 14px;color:#e8d6ae}.walkstage header b{font:600 20px Georgia,serif;letter-spacing:.12em}.walkstage canvas{display:block;width:100%;height:auto;touch-action:none;image-rendering:pixelated;cursor:crosshair}.walkbar span{font-size:13px;color:#d1c6ad}.walkbar .use{min-height:44px;background:#d4bb85;color:#1d2d27;border:1px solid #a99062}.walkbar button:disabled{opacity:.6}@media(orientation:landscape) and (max-height:620px){.walkstage{width:min(100%,calc((100dvh - 145px)*1.58))}.walkstage header{padding:2px 8px}.walkbar{padding:2px}.walkbar span{font-size:11px}}
.walk-notes{padding:4px 14px;background:#253630;color:#dccfab}.walk-notes summary{cursor:pointer}.shell .desktools [hidden]{display:none!important}
.walkidentity{display:inline-flex;align-items:center;gap:10px}.walkidentity img{width:46px;height:46px;object-fit:cover;object-position:50% 20%;border:1px solid #ad9875}@media(max-height:530px){.walkidentity img{width:28px;height:28px}}
.private-ticket{width:min(350px,88vw);padding:22px;background:#e8ddc0;color:#293730;border:5px double #ad9775}.private-ticket button{margin:4px}.private-ticket [aria-pressed=true]{background:#b99d63;color:#17251d}.private-ticket::backdrop{background:#0b171adb}

/* Shared print vocabulary. Live type stays above the illustrated surfaces. */
body{background:#0d2429;color:#ffedcb;font-family:"Microsoft YaHei",sans-serif}
.foyer:before{background:linear-gradient(90deg,#081d2433,transparent 65%)}
.marquee h1{color:#fff0c6;text-shadow:4px 4px #0a171e,8px 7px #d94e39;font-family:"Microsoft YaHei",sans-serif;letter-spacing:-.075em}
.marquee p{display:inline-block;background:#ffca48;color:#10262b;padding:3px 12px;font-weight:900;transform:rotate(-2deg)}
.titlemenu{gap:8px;background:transparent}.titlemenu button,.titlemenu button:first-child{border:2px solid #0b1b23;color:#ffedcb;background:#183538 url(media/ink.webp) center/100% 100%;padding:11px 30px;box-shadow:4px 4px #081a20}
.titlemenu button:first-child,.titlemenu button:hover,.gold,.walkbar .use{background:#ffca36 url(media/gold.webp) center/100% 100%;color:#172126;border:2px solid #111e25}
.ticket,.private-ticket,dialog:has(.folio),.shell:is([data-kind=choice],[data-kind=text],[data-kind=draw]) .stage{background:#ffebbc url(media/sheet.webp) center/100% 100%;color:#15292e;border:3px solid #101e28;box-shadow:5px 6px #091820}
.waiting{background:linear-gradient(#07182166,#071821b3),url(media/parlor.webp) center/cover}
.seatcard,.top,.desktools,.walkstage header,.walkbar{background:#13363a url(media/ink.webp) center/100% 100%;border:2px solid #0a1921;padding-inline:12px}
.shell .stage{border:3px solid #0c1c23}.action h2,.waiting header b,.walkstage header b{font-family:"Microsoft YaHei",sans-serif;font-weight:900}
.shell .action:not(:has(.grid)){padding-inline:clamp(16px,3vw,36px)}
.shell[data-kind=visit] .action,.shell[data-kind=night] .action,#drawer:not(:has(.folio)){background:#262740 url(media/speech.webp) center/100% 100%;padding:clamp(16px,3vw,36px);color:#fff0cc}
.shell:is([data-kind=read],[data-kind=key],[data-kind=supply],[data-kind=case]) .action{background:#235958 url(media/cloth.webp) center/100% 100%;color:#fff4db}
.walkstage{border:3px solid #101b22;box-shadow:5px 6px #09181d}.walkstage canvas{image-rendering:auto}.walkidentity img,.desktools img,.prop{border:2px solid #102128}
#toast:not(:empty){background:#b64032 url(media/red.webp) center/100% 100%;color:#fff4d9;text-shadow:1px 1px #282028}
.interview article{background:#ffeabe;color:#16292d;border:2px solid #13232c;box-shadow:3px 3px #0b1a21}.interview article small{color:#793e32}
.private-ticket button[aria-pressed=true]{background:#ffcb39;color:#122329;outline:2px solid #14212a}
@media(max-height:530px){.desktools,.walkbar,.top{padding-inline:5px}.shell[data-kind=visit] .action{padding:9px 14px}.titlemenu button{padding-block:5px}}
#drawer:has(.folio)>header{color:#192a30}
.folio.single-chapter{grid-template-columns:minmax(0,1fr)}.folio.single-chapter aside{display:none}
@media(max-height:530px) and (orientation:landscape){
 #drawer:has(.folio){inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:4px 8px}
 #drawer:has(.folio)>header{height:32px;margin:0;display:flex;align-items:center}
 #drawer:has(.folio)>header h2{font-size:16px;margin:0}
 #drawer:has(.folio) #panel{max-height:calc(100dvh - 43px)}
 .folio .readerbar{font:600 14px sans-serif;padding:2px 5px}.folio .readerbar span{font-size:14px}
}
@media(min-width:901px){.shell:has(.walkstage) .walkstage{width:min(960px,calc((100dvh - 196px)*1.578));margin:4px auto}}
@media(orientation:landscape) and (max-height:530px){
 .shell:has(.walkstage){padding:2px;display:grid;grid-template-columns:minmax(315px,1fr) minmax(165px,24%);grid-template-rows:auto 1fr;gap:3px;min-height:0}
 .shell:has(.walkstage)>.top{grid-column:2;grid-row:1;flex-wrap:wrap}.shell:has(.walkstage)>.top small{display:none}
 .shell:has(.walkstage) .walkstage{grid-column:1;grid-row:1/3;width:min(100%,calc((100dvh - 55px)*1.578));margin:0 auto}
 .shell:has(.walkstage) .walkstage header{display:none}.shell:has(.walkstage) .desktools{grid-column:2;grid-row:2;align-content:start;align-items:start;justify-content:start}
 .shell:has(.walkstage) .walkbar{min-height:40px}.shell:has(.walkstage) .desktools button{min-height:37px}
}
#drawer[data-panel=chat] .log p{padding:7px 12px;background:#fbe9bd;border:2px solid #16262d;color:#19282a;max-width:90%;border-radius:2px 14px 14px 14px}
#drawer[data-panel=private]{border-left:8px solid #e5b241}
#drawer[data-panel=log] .log p{border-bottom:1px dashed #ddbf83;padding-bottom:8px}
#drawer[data-panel=room] #panel>p:first-child strong{color:#ffd75d;letter-spacing:.2em}
.shell[data-kind=night] .action{border-left:6px solid #7771ae}.shell[data-kind=key] .action{border-left:6px solid #dfb354}
.shell[data-kind=supply] .choices{align-items:stretch}.shell[data-kind=case] .action{border-left:6px solid #e76845}
.test-report{width:min(100%,32rem);box-sizing:border-box;margin:4px auto 12px;padding:18px 22px;text-align:left;color:#202623;background:#f3e6c8 url('/formal/media/sheet.webp') center/cover;border:3px solid #202623;box-shadow:5px 5px 0 #172020}
.test-report h3{margin:.45em 0;font-size:1.45em}.shell .test-report p,.shell .test-report small{color:#242723}.test-report b{display:block;padding:.5em 0;border-block:1px dashed #6b5849}.test-report button{margin-top:.5em}
@media(max-width:600px){.waiting{grid-template-columns:minmax(0,1fr)}.waiting footer,.waiting .aicontrol{flex-wrap:wrap}.waiting .seats{grid-template-columns:repeat(3,minmax(0,1fr))}}
.scanViewport{max-width:100%;overflow-x:auto}.scanViewport.enlarged .page{width:max(175%,800px);max-width:none}
