:root{color-scheme:dark;--ink:#211d31;--cream:#fff0d3;--gold:#e7bb79;--rose:#ee9cba;--quiet:#b6a8c1}*{box-sizing:border-box}html{background:#171523}body{margin:0;color:var(--cream);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh;min-height:100dvh;background:radial-gradient(ellipse at 15% 0,#43304d 0,transparent 58%),radial-gradient(ellipse at 100% 100%,#283b48 0,transparent 60%),#171523;overscroll-behavior:none}button{font:inherit;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,canvas:focus-visible{outline:3px solid #ade3d3;outline-offset:4px}button:disabled{opacity:.4;cursor:default}.cabinet{width:min(1120px,calc(100% - 48px));margin:0 auto;padding:28px 0 16px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:20px}.wordmark{display:flex;align-items:center;gap:12px}.seal{display:grid;place-items:center;width:42px;height:42px;border:1px solid #e7bb7966;border-radius:50%;font-size:28px;color:var(--gold)}.wordmark strong{display:block;letter-spacing:.2em;font-size:11px;font-weight:750}.wordmark span:not(.seal){display:block;color:var(--quiet);font-family:Georgia,serif;font-style:italic;font-size:14px;margin-top:4px}nav{display:flex;gap:8px}.tool{background:#ffffff05;border:1px solid #d8b88d33;border-radius:8px;padding:10px 14px;font-size:12px;min-height:44px}.tool:hover{background:#e7bb7915;border-color:#e7bb7977}.stage-shell{padding:8px;border:1px solid #c39b7955;border-radius:16px;background:linear-gradient(140deg,#564052,#282333 48%,#50444b);box-shadow:0 24px 65px #05071077,0 0 0 5px #13121b, inset 0 1px #f9d79b33}.stage{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:8px;background:#211c35}canvas{display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges;touch-action:none}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.overlay:empty{display:none}.overlay>*{pointer-events:auto}.title-card{width:47%;margin-left:47%;padding:14px 18px 20px 0}.eyebrow{color:var(--gold);font-size:clamp(8px,1vw,12px);letter-spacing:.2em;font-weight:750;margin:0 0 12px}.title-card h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(26px,5vw,60px);font-weight:500;line-height:.97;letter-spacing:-.05em;text-shadow:0 3px 0 #432c4b;margin:0 0 10px}.title-card h1 em{font-style:normal;color:#ffbdcf}.subtitle{font-size:clamp(8px,1.2vw,14px);letter-spacing:.2em;color:#f1ca93;margin:0 0 20px}.story-line{font-family:Georgia,serif;font-size:clamp(12px,1.5vw,18px);line-height:1.6;color:#e9d3d8;max-width:330px;margin:0 0 22px}.actions{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.primary,.secondary,.choice{border-radius:7px;font-size:14px;font-weight:650;min-height:44px;padding:12px 20px;letter-spacing:.03em}.primary{background:linear-gradient(#f5d697,#ddb078);color:#392637;border:1px solid #ffe8b7;box-shadow:0 3px 0 #895c53,0 6px 16px #19121e44}.primary:hover{filter:brightness(1.07);transform:translateY(-1px)}.secondary{background:#2a233bd9;border:1px solid #c3919b88;color:#ffe0dc;box-shadow:0 3px #17162766}.secondary:hover{background:#4b3453}.menu-card{max-width:82%;width:480px;border:1px solid #f2c88a77;box-shadow:0 12px 40px #08071588,inset 0 0 0 4px #b9936f12;border-radius:12px;padding:28px;background:linear-gradient(135deg,#332840f5,#252238f7);text-align:center}.menu-card h2{font-family:Georgia,serif;font-size:clamp(22px,3vw,38px);font-weight:500;margin:8px 0 10px;color:#ffe1b4}.menu-card p{font-size:clamp(11px,1.3vw,15px);color:#d7c7da;line-height:1.6;margin:8px auto 20px;max-width:370px}.menu-card .actions{align-items:center}.menu-card .actions button{min-width:210px}.menu-card .small-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:14px}.menu-card .small-actions button{font-size:12px;min-height:40px;padding:8px 12px}.world-number{letter-spacing:.16em;color:var(--rose);font-size:11px}.star-row{color:#ffde91;letter-spacing:9px;font-size:24px;margin:4px 0 14px}.ending-card{position:absolute;top:6%;text-align:center;max-width:85%;padding:12px 10px}.ending-card h2{font-size:clamp(18px,3.6vw,42px);font-family:Georgia,serif;font-weight:500;color:#fff0d2;margin:4px}.ending-card blockquote{font-family:Georgia,serif;font-size:clamp(16px,2.4vw,28px);font-style:italic;line-height:1.5;color:#fff1e4;margin:18px 0;text-shadow:0 2px 2px #554864}.ending-card .actions{align-items:center}.ending-card p{font-size:12px;color:#f1d5d8}.ending-card button{min-height:40px;padding:8px 16px}.secret-line{animation:reveal 2s both;animation-delay:.9s}@keyframes reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.pause-button{position:absolute;right:8px;top:4px;min-width:36px;min-height:30px;background:#362c4f;border:1px solid #b88c9777;border-radius:5px;color:#f8dcab;font-size:15px}.pause-button[hidden]{display:none}.toast{position:absolute;bottom:12px;left:50%;transform:translate(-50%,8px);max-width:90%;padding:8px 13px;border:1px solid #dcb78c66;border-radius:7px;background:#241e34ec;color:#ffe8cd;font-size:clamp(10px,1.3vw,14px);text-align:center;line-height:1.5;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s}.toast.visible{opacity:1;transform:translate(-50%,0)}footer{display:flex;justify-content:space-between;gap:15px;padding:18px 4px 0;color:var(--quiet);font-size:10px;letter-spacing:.04em}footer i{font-style:normal;color:#cf9f7e;margin:0 6px}.footer-right{font-size:9px;letter-spacing:.12em}.touch-controls{display:none;align-items:center;justify-content:space-between;gap:20px;padding:14px 10px 4px;user-select:none;touch-action:none}.dpad{display:flex;align-items:center;gap:5px}.vertical{display:flex;flex-direction:column;gap:5px}.touch-controls button{display:grid;place-items:center;touch-action:none;user-select:none;-webkit-user-select:none;min-width:52px;min-height:45px;border:1px solid #c9a7ab66;background:linear-gradient(#493b59,#302b43);border-radius:10px;font-size:20px;box-shadow:0 3px #10121f}.touch-controls button.pressed{background:#8c5f7d;transform:translateY(2px);box-shadow:none}.touch-controls .jump-button{width:78px;height:78px;border-radius:50%;background:linear-gradient(#db8fac,#a35780);color:#ffe6d1;font-size:28px;border:2px solid #f1bed1;line-height:1;gap:0;align-content:center}.jump-button span{font-size:8px;letter-spacing:.2em;margin-top:5px}.touch-note{font:italic 13px/1.6 Georgia,serif;color:#c7b2c9;text-align:center}.force-touch .touch-controls{display:flex}dialog{padding:0;border:1px solid #d6ae8066;border-radius:14px;background:linear-gradient(145deg,#362b46,#211f32);color:var(--cream);box-shadow:0 20px 100px #0009;max-width:min(560px,94vw);max-height:86dvh}dialog::backdrop{background:#100f1ddd;backdrop-filter:blur(4px)}.modal-inner{padding:30px;position:relative;overflow:auto;max-height:86dvh}.modal-close{position:absolute;right:8px;top:6px;background:none;border:0;font-size:27px;min-width:40px;min-height:40px;color:#dfb8c8}dialog h2{font:30px Georgia,serif;color:#ffe3b0;margin:6px 0 20px}dialog p{font-size:14px;line-height:1.7;color:#d9ccde}dialog h3{font-size:12px;letter-spacing:.15em;color:var(--rose);margin-top:24px}.controls-list{display:grid;grid-template-columns:100px 1fr;gap:10px;font-size:13px;line-height:1.6}.controls-list dt{color:#ffdeb1}.controls-list dd{margin:0;color:#d9c9df}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #d6ae8022;padding:15px 0;font-size:14px}.choice{background:#4d395a;border:1px solid #b48d9c;min-width:112px;padding:8px 12px;font-size:12px}.world-map{display:flex;flex-direction:column;gap:10px}.world-choice{display:flex;align-items:center;gap:14px;text-align:left;background:#ffffff05;border:1px solid #baa0b044;border-radius:8px;padding:14px;min-height:60px}.world-choice .badge{font-size:24px;color:#ecc98a}.world-choice strong{display:block;font:18px Georgia,serif}.world-choice small{display:block;color:#c7b1ce;font-size:11px;margin-top:5px}.footnote{font-size:11px!important;color:#b3a4bb!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}
@media(pointer:coarse){.touch-controls{display:flex}.footer-right{display:none}.cabinet{width:calc(100% - 20px);padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}}
@media(max-width:640px){.cabinet{width:calc(100% - 16px);padding-top:12px}.masthead{padding:0 3px 12px}.wordmark{gap:7px}.seal{width:29px;height:29px;font-size:20px}.wordmark strong{font-size:8px;letter-spacing:.12em}.wordmark span:not(.seal){font-size:11px}.tool{font-size:10px;padding:6px 9px}nav{gap:4px}.stage-shell{padding:4px;border-radius:10px}.stage{border-radius:6px}.title-card{padding:8px 8px 8px 0;margin-left:46%;width:49%}.title-card h1{font-size:clamp(23px,6vw,37px)}.title-card .eyebrow{font-size:7px;margin-bottom:7px;letter-spacing:.12em}.subtitle{font-size:7px;margin-bottom:13px;letter-spacing:.1em}.story-line{display:none}.title-card .actions{gap:7px}.title-card .primary,.title-card .secondary{font-size:11px;padding:8px 13px;min-height:40px}.menu-card{padding:14px;width:82%}.menu-card h2{font-size:24px;margin:5px}.menu-card p{font-size:11px;line-height:1.45;margin:6px 0 12px}.menu-card .primary,.menu-card .secondary{min-height:40px;padding:8px 14px;font-size:12px}.menu-card .small-actions{margin-top:8px;gap:7px}.menu-card .small-actions button{min-height:36px}.world-number{font-size:8px}.star-row{font-size:16px;margin:0 0 6px}.ending-card{top:3%}.ending-card h2{font-size:21px}.ending-card blockquote{font-size:15px;margin:7px 0}.ending-card p{font-size:10px;margin:8px}.ending-card button{font-size:10px;min-height:34px}.pause-button{right:5px;top:2px;min-height:24px;min-width:25px;font-size:12px}.toast{font-size:10px;bottom:6px;padding:5px 8px}footer{justify-content:center;font-size:9px;padding-top:14px}.footer-right{display:none}.modal-inner{padding:26px 20px}.touch-note{font-size:11px}.touch-controls{gap:9px;padding:12px 6px}.touch-controls button{min-width:46px;min-height:42px}.touch-controls .jump-button{width:73px;height:73px}.controls-list{grid-template-columns:80px 1fr}}
@media(max-height:500px) and (orientation:landscape){.cabinet{width:min(920px,calc(100% - 26px));padding:6px 0}.masthead{padding-bottom:5px}.wordmark span:not(.seal),footer,.touch-note{display:none}.seal{width:24px;height:24px;font-size:17px}.tool{min-height:30px;padding:4px 10px}.stage-shell{max-width:calc((100dvh - 46px)*16/9);margin:auto}.touch-controls{position:fixed;left:6px;right:6px;bottom:max(4px,env(safe-area-inset-bottom));z-index:2;pointer-events:none;padding:0}.touch-controls button{pointer-events:auto;opacity:.68;min-width:44px;min-height:34px}.touch-controls .jump-button{width:62px;height:62px}.vertical{gap:2px}.stage{border-radius:4px}.title-card h1{font-size:29px}.title-card .primary,.title-card .secondary{min-height:35px}.toast{bottom:42px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition:none!important}}
/* Menus stay usable on short phone screens without clipping their buttons. */
.menu-card{max-height:calc(100% - 12px);overflow:auto;scrollbar-width:thin}.ending-card{max-height:100%;overflow:auto;left:7.5%;right:7.5%;border-radius:12px;background:linear-gradient(#302740dc,#302740b8,transparent);text-shadow:0 1px 3px #211c39}.ending-card .actions{padding-bottom:7px}.reduced-motion .secret-line{animation:none}.reduced-motion .toast{transition:none}
@media(max-width:640px){.ending-card{top:0;left:3%;right:3%;max-width:94%;padding:7px 9px}.ending-card .eyebrow{font-size:7px;margin:3px 0 6px}.ending-card h2{font-size:18px}.ending-card p{font-size:9px;margin:5px}.ending-card blockquote{font-size:15px;margin:8px 0}.ending-card .actions{padding-bottom:4px}.menu-card .actions button{min-width:0}.menu-card .small-actions{flex-wrap:nowrap}.menu-card .small-actions button{font-size:10px;padding:6px 8px}}
