/* A flat, tile-contained RPG presentation. World geometry and hit areas agree. */
:root{--paper:#17283e;--cream:#22384f;--ink:#f6edce;--muted:#b1c7c3;--green:#346e6c;--line:#738c9e;--gold:#e6b657;background:#132637;color:var(--ink)}
body{background:#132637}.home{background:linear-gradient(135deg,#142b3c,#294c49);min-height:1140px}
.topbar{background:#192a41;color:#f8ecc5;border-bottom:2px solid #789599}.brand{color:#f9e9bb}.brand small{color:#a9cecb}
h1,h2{color:#fff0c9}#intro p,.hero-tags,.eyebrow,label>span,.field-label{color:#b8d1cd}#intro h1{font-family:Georgia,serif}#setup{padding-bottom:30px}select{color:#f8edcc;background-color:#23394e;border:2px solid #6a8794;border-radius:3px}.setting-note{font-size:11px;line-height:1.5;color:#a8c7ca;margin:6px 0 14px}.gender-picker button,.segmented,.toggle-row i{background:#243c50;color:#dce6d8;border-radius:3px}.gender-picker button[aria-pressed=true],.segmented button[aria-pressed=true]{background:#3d6164;border-color:#d9bf76}.session-picker button{color:#b7c9c4}.session-picker button[aria-pressed=true]{color:#f9d67e;border-color:#f9d67e}.primary{border:2px solid #e9cf88;border-radius:3px;background:#326d69;box-shadow:0 4px #0c2631}.primary:hover{background:#40857c}.secondary{background:#30495e;color:#f8edcc;border:1px solid #7a919c;border-radius:3px}.quiet{color:inherit}
#stage{background:#376445!important;border:4px solid #162d35;border-radius:3px!important;box-shadow:inset 0 0 0 3px #7f9670}#stage:before,#stage:after{display:none!important}.stage-caption{display:none}.pixel-board{filter:none!important;border:4px solid #586e5a;box-shadow:0 0 0 3px #b8ba91,0 0 0 7px #254b40;overflow:visible}
.pixel-board .world-object,.pixel-board .world-object.actor,.pixel-board .world-object.prop,.pixel-board .world-object.fixture{width:76px;height:76px;transform:translate(-50%,-50%);filter:none!important;margin:0;border-radius:0;pointer-events:auto;overflow:hidden;touch-action:none}
.pixel-board .world-object .object-img{inset:0px 2px 15px;width:72px;height:61px;object-fit:contain;image-rendering:pixelated;filter:none!important}
.pixel-board .world-object.prop .object-img{inset:9px;width:58px;height:58px}
.pixel-board .world-object .actor-hit{display:none!important}.pixel-board .world-object.actor .role-badge{top:auto!important;bottom:3px!important;left:3px;transform:none!important;max-width:70px;width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:15px;height:16px;padding:0 2px;text-align:center;letter-spacing:0;border-radius:1px;background:#15283e;color:#fff1c9;border:1px solid #7b929d;box-shadow:none;pointer-events:none}
.pixel-board .world-object.actor .role-me{background:#8a5d24;border-color:#f3d276;color:#fff8da}.pixel-board .world-object.actor .role-you{background:#265975;border-color:#72d2e4;color:#fff}
.pixel-board .world-object.actor .selection-ring,.pixel-board .world-object.targeted .selection-ring{width:74px!important;height:74px!important;inset:1px!important;border-radius:0;border:0;background:none;box-shadow:none;animation:none}
.pixel-board .world-object.actor.controlled .selection-ring{border:4px solid #54e7f1;background:#54e7f114;box-shadow:inset 0 0 0 2px #164b65;animation:none}.pixel-board .world-object.targeted .selection-ring{border:3px solid #ffe294}
.pixel-board .world-object.carried,.pixel-board .world-object.on-surface{width:27px;height:27px;transform:translate(-50%,-50%);background:#172e45;border:2px solid #e3d1a3;border-radius:2px;z-index:4!important}.pixel-board .world-object.carried .object-img,.pixel-board .world-object.on-surface .object-img{inset:1px;width:21px;height:21px}.pixel-board .world-object .object-label{display:none!important}
.pixel-board .world-object.walking .object-img{animation:pixel-step .23s steps(2,end) infinite}.pixel-board .acting .object-img{animation:pixel-act .3s steps(2,end) infinite alternate}@keyframes pixel-step{50%{transform:translateY(-2px)}}@keyframes pixel-act{to{transform:translateY(-3px)}}
.pixel-board .grid-floor [data-x]:hover{fill:#e1d6af}.pixel-board .grid-floor .drop-cell{fill:#a7d7cb!important;stroke:#3a8a93!important;stroke-width:3}.placement-cell{width:70px;height:70px;border-radius:1px;border-color:#49d5d8;background:#214d5466;color:#fff4c3}
.playing{--cream:#23384e;--ink:#f8edce;--line:#6f8796;background:#213c3f;color:#f8edce}.playing .topbar{background:#17293f;box-shadow:none;border-bottom:1px solid #617f8d}.playing #scene-buffer{background:#172c3e;flex-basis:68px;height:68px;padding:4px 8px 0}.scene-tab{background:#243e53;color:#cde0dd;border:2px solid #6c8b97;border-radius:3px;box-shadow:inset 0 0 0 2px #152c3e}.scene-tab.selected{background:#655126;color:#fff4cc;border:2px solid #edc46b;box-shadow:inset 0 0 0 2px #967331}.scene-tab.urgent{border-color:#ef9a76}.scene-slot{border-color:#526e7a;background:#243d4a;color:#88a5a4;border-radius:3px}#scene-tabs{height:49px}.scene-tab>strong{font-size:20px}.scene-tab>span{font-size:9px}.scene-tab i{background:#162b3f}.scene-tab i b{background:#e9bf63}#arrival-label{color:#b7cfcb;font-size:9px}
.playing #cue{background:#1d3249;border-bottom:2px solid #79969e;box-shadow:none;height:140px;flex-basis:140px;padding:3px 8px 6px}.playing #cue-line,.playing #cue-line[lang^=zh]{font-family:Georgia,'Noto Serif',serif;color:#fff0ca;font-size:20px;font-weight:600;letter-spacing:0;line-height:24px;max-height:48px}.playing #cue-pinyin{color:#bfd5d0}.playing .speaker-chip{color:#bcd7d0}.playing .speaker-chip b{background:#b78a35;color:#fff5d4;border-radius:1px}.playing #selected-scene-label{color:#b4d0cc}.playing #cue-translation{background:#20384e;color:#fff1cf;border-color:#e0c17e;border-radius:2px}
.playing .cue-bottom #replay-control,.playing .cue-bottom #meaning-button{background:#2e5662;color:#f9edcd;border:2px solid #7ba7ad;border-radius:3px;box-shadow:inset 0 0 0 2px #172e46}.playing .cue-bottom #meaning-button{background:#344b60;border-color:#829aaa}.playing #replay-speed-button{background:transparent;color:#f9e5b0;border-color:#6b8f9b}.playing .cue-bottom #pinyin-button{background:#344c5c;color:#fff0c7;border-radius:2px}
.playing #stage-wrap{padding:5px 0;background:#325843}.playing .mini-button,.playing .icon-button{border:2px solid #78959c;background:#213a50;color:#fbebc1;border-radius:3px;box-shadow:inset 0 0 0 1px #0f263a}#view-tools{bottom:8px;right:8px;opacity:.8}.playing #queue-panel{background:#172a40;border-top:2px solid #82969e;box-shadow:none}.playing #queue-list .queue-card{background:#2a4255;border:1px solid #78949b;border-radius:2px;box-shadow:none}.playing #queue-list .queue-card.accepted{background:#315450;border-color:#8ab9a8}.playing #queue-toggle{background:#355b62;color:#fff0c9;border-radius:3px}.playing .empty-queue{color:#b4cfca}.queue-scene{color:#b8cfca}.queue-pictures img,.result-cast img,.cast-card img,.gender-picker img,.context-pair img{image-rendering:pixelated}
#context-menu,.playing #context-menu{background:#1d334b;border:2px solid #9ab0ae;border-radius:3px;box-shadow:0 8px 0 #14243080;color:#fff1cf;backdrop-filter:none}.context-title small,.context-footer{color:#bdd1cd}.action-button{background:#34516a;color:#fff1cf;border:1px solid #69899a;border-radius:2px}.action-button:hover{background:#456d7a}.swap-note{color:#eed79e}.context-actions{max-height:240px;overflow-y:auto}
dialog{background:#1b3047;color:#f5edcf;border:3px solid #8ca7ad;border-radius:4px;box-shadow:0 0 0 3px #102536}dialog p,dialog small,.guide-list{color:#bcd1cc}.cast-card{background:#2c475b;border-color:#688891;color:#f9edcc;border-radius:3px}.cast-card small{color:#b8d3cb}.dialog-actions .secondary{background:#304b60;color:#fff1d0}.result-score{color:#f3ce75}#replay-speed-menu{background:#20374d;color:#fff0cd;border:2px solid #93a6a8;border-radius:3px}#replay-speed-menu button{color:#fff0cd}#replay-speed-menu button[aria-checked=true],#replay-speed-menu button:hover{background:#41656b}#replay-speed-menu small{color:#b8d1ca}
.actor-drag-ghost{background:none!important;border:0!important;box-shadow:none!important;pointer-events:none}.actor-drag-ghost img{image-rendering:pixelated}.actor-drag-ghost span{background:#1d354d;color:#fff1cd;border:1px solid #a3c1c3;border-radius:2px}.drawing-route .actor-drag-ghost img,.drawing-route .actor-drag-tether{display:none}.drawing-route .actor-drag-ghost{width:18px;height:18px;border:3px solid #75edee!important;border-radius:50%;transform:translate(-50%,-50%)}.drawing-route .actor-drag-ghost span{display:none}.drawing-route .drag-source .object-img{opacity:1!important}
@media(max-width:700px){.home{min-height:0;height:auto;overflow:visible}.home #stage-wrap{height:390px;min-height:0}.home #intro{padding-top:16px}.playing #cue{flex-basis:140px}.playing #stage{border-width:2px}}
@media(max-height:650px){.playing #cue{height:126px;flex-basis:126px}.playing #scene-buffer{height:64px;flex-basis:64px}.playing #cue-line{font-size:18px;line-height:21px;max-height:42px}}
@media(prefers-reduced-motion:reduce){.pixel-board .world-object .object-img{animation:none!important}}

.cast-card.me,.cast-card.you{color:#17283e}.cast-card.me small,.cast-card.you small{color:#365962}

.movement-speed-field{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;margin-top:16px}.movement-speed-field>span:first-child{font-size:13px;font-weight:600}.movement-speed-field output{color:#f3ce75;font-variant-numeric:tabular-nums;font-weight:700}.movement-speed-field input[type=range]{grid-column:1/-1;width:100%;height:36px;margin:0;accent-color:#72d9d4;cursor:pointer;touch-action:pan-y}.movement-speed-field .speed-limits{grid-column:1/-1;display:flex;justify-content:space-between;font-size:11px;color:#b8d1cd}.movement-speed-field input:focus-visible{outline:2px solid #f3ce75;outline-offset:2px}

.endpoint-ghost{pointer-events:auto;position:absolute;z-index:6;width:72px;height:72px;transform:translate(-50%,-50%);padding:0;background:#72d9d41a;border:2px dashed #91f5ed;border-radius:5px;touch-action:none;cursor:grab;box-shadow:0 0 0 2px #18384f88}.endpoint-ghost[hidden]{display:none}.endpoint-ghost img{width:65px;height:57px;object-fit:contain;image-rendering:pixelated;opacity:.5;pointer-events:none}.endpoint-ghost .ghost-badge{position:absolute;bottom:0;left:0;right:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#204c5acc;color:#c5fff6;font-size:10px;line-height:14px;pointer-events:none}.endpoint-ghost:after{content:'＋';position:absolute;right:1px;top:0;color:#effff2;background:#1d514e;border-radius:2px;font-size:15px;line-height:17px}.endpoint-ghost.controlled{border-color:#ffe6a5}.endpoint-ghost.invalid{border-color:#f5997f}.endpoint-ghost.drag-source{opacity:.4}.world-object.actor.has-endpoint{cursor:default}.pixel-board .world-object.actor.stunned .object-img{animation:stun-shake .15s steps(2,end) infinite!important;filter:sepia(.4)!important}.world-object.actor.stunned:after{content:'✦ ✦';position:absolute;top:0;left:0;right:0;font-size:16px;color:#ffdb73;pointer-events:none}.pixel-board .world-object.actor.yielding .object-img{opacity:.6}@keyframes stun-shake{50%{transform:translateX(3px)}}

@media(prefers-reduced-motion:reduce){.pixel-board .world-object.actor.stunned .object-img{animation:none!important}}
