
:root{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;color:#f2f3f1;background:#0b1827;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-height:100svh;background:radial-gradient(ellipse 82% 38% at 50% -10%,#2b4c61 0%,#0c1c2c 63%,#091522 100%);}
button,input{font:inherit}button{cursor:pointer}
.app{width:min(100% - 26px,452px);margin:0 auto;padding:23px 0 32px}
.header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 9px}
.wordmark{font-size:15px;font-weight:900;letter-spacing:.2em;line-height:1.1}.mark{color:#ffc69d;margin-right:6px}
.tag{border:1px solid #406072;border-radius:999px;padding:6px 11px;color:#a7c5cf;letter-spacing:.08em;font-size:10px;font-weight:800;white-space:nowrap}
.subheading{margin:0 0 17px;font-size:12px;color:#97aebc;letter-spacing:.035em}
.frame{padding:9px;border-radius:21px;background:linear-gradient(160deg,#517488 0%,#1d364b 17%,#0d2337 77%,#30485b 100%);box-shadow:0 20px 55px #0008,inset 0 1px 0 #bbd0d355;border:1px solid #7191a33c}
.stage{position:relative;overflow:hidden;border-radius:13px;background:#071623;aspect-ratio:9 / 16;touch-action:none}
canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none;}
.screen{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:0 21px 45px;pointer-events:none;opacity:0;transition:opacity .18s}
.screen.visible{opacity:1}
.screen-card{width:100%;background:linear-gradient(145deg,#092034e8,#163952eb);border:1px solid #a5d4dd64;box-shadow:0 16px 50px #0009;backdrop-filter:blur(12px);border-radius:16px;padding:18px 18px 17px;text-align:center}
.eyebrow{margin:0 0 7px;font-size:10px;letter-spacing:.22em;font-weight:800;color:#98cfdb}
.screen-title{font-size:23px;margin:0 0 6px;letter-spacing:.04em;font-weight:900}
.screen-copy{font-size:12px;line-height:1.7;color:#c5d5dd;margin:0}
.meta{display:flex;justify-content:space-between;padding:12px 5px 3px;gap:10px;align-items:center}
.meta-item{font-size:11px;font-weight:700;letter-spacing:.07em;color:#9db2c2}
.meta-item b{font-size:17px;color:#f4f3eb;letter-spacing:.035em}
.dot-heart{color:#efb29e;font-size:18px;letter-spacing:2px}
.progressbar{background:#20394b;height:3px;border-radius:999px;overflow:hidden;margin:9px 1px 0}
.progressbar>div{width:0;height:100%;background:linear-gradient(90deg,#69b4c6,#ffc5a2);transition:width .22s}
.controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:15px 0 10px}
.btn{border:1px solid #52758a;background:#183449;color:#e5f2f5;min-height:48px;border-radius:12px;font-size:12px;font-weight:850;letter-spacing:.03em;transition:background .15s,transform .15s}
.btn:active{transform:scale(.985)}
.btn.primary{background:#f3c6a6;border-color:#f3c6a6;color:#132a38;font-weight:900}
.btn.ghost{background:#102738;color:#a9c2ce}
.btn.recording{background:#d95867;border-color:#f09598;color:#fff}
.btn[disabled]{opacity:.48;cursor:not-allowed}
#auto[hidden]{display:none}
.controls:not(.dev-mode) #record{grid-column:1 / -1}
.footer-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:16px 1px 5px}
.linkish{background:none;border:0;padding:4px 0;color:#bdd5dd;text-decoration:underline;text-underline-offset:3px;font-size:12px;font-weight:700}
.credit{font-size:10px;color:#819eae;line-height:1.5;text-align:right}
.help{border-top:1px solid #355164;margin-top:17px;padding-top:12px;color:#8fa9b8;font-size:11px;line-height:1.8}
.help strong{color:#c5dbe0}
.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
@media(min-width:620px){.app{padding-top:25px}.stage{max-height:715px;margin:auto;width:auto}}
@media(prefers-reduced-motion:reduce){.screen,.progressbar>div{transition:none}}

.game-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 12px}
.game-options label{font-size:12px;font-weight:700;color:#a7c5cf;display:flex;flex-direction:column;gap:5px}
.game-options select{width:100%;min-width:0;border-radius:11px;background:#1a3449;color:#fff1e8;border:1px solid #4c7589;padding:10px 9px;font:inherit}
.game-options select:focus-visible{outline:2px solid #ffc69d;outline-offset:2px}
@media(max-width:360px){.game-options{grid-template-columns:1fr}}


.gallery-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 10px}
.gallery-actions .btn{flex:1;min-width:125px}
#galleryProgress{font-size:11px;color:#b9d4dd;margin:auto}
.art-gallery{margin:10px 0 14px;padding:12px;border:1px solid #456477;border-radius:15px;background:#112a3b}
.art-gallery[hidden]{display:none}
.gallery-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.gallery-head h2{font-size:16px;margin:0}
.gallery-head .btn{min-height:36px;padding:0 16px}
.gallery-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.gallery-filters input,.gallery-filters select{min-width:0;width:100%;background:#193c51;border:1px solid #517689;border-radius:9px;color:#f4f8fa;padding:10px;font:inherit;font-size:12px}
.gallery-tiles{max-height:410px;overflow-y:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.gallery-tile{border:1px solid #446477;background:#20394c;color:#f8f8f2;border-radius:10px;padding:5px;min-width:0;text-align:left;cursor:pointer}
.gallery-tile[aria-pressed="true"]{border-color:#ffcba9;box-shadow:0 0 0 2px #ffcba955}
.gallery-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px;background:#294e60}
.gallery-tile span{font-size:10px;display:block;margin:5px 1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gallery-empty{font-size:12px;color:#bdd3dd;grid-column:1/-1}
@media(max-width:360px){.gallery-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-filters{grid-template-columns:1fr}}

.gallery-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;flex:1;padding:0 15px}

.audio-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;flex-wrap:wrap;margin:-2px 0 0}
.sound-volume-label{font-size:11px;color:#b7d2dd;font-weight:800}
.sound-volume{width:clamp(100px,29vw,170px);max-width:100%;accent-color:#f3c6a6;cursor:pointer;min-height:28px}
#soundVolumeValue{min-width:34px;text-align:right;font-variant-numeric:tabular-nums;font-size:11px;color:#d9e9ed;font-weight:800}
.sound-volume:focus-visible{outline:2px solid #ffc69d;outline-offset:2px}
@media(max-width:360px){.audio-actions{justify-content:center}}
.sound-switch{min-height:34px;padding:5px 12px;border:1px solid #52758a;border-radius:999px;background:#173248;color:#cbe4e9;font-size:11px;font-weight:800}
.sound-switch:hover{border-color:#fac8a3}
.sound-switch:focus-visible{outline:2px solid #ffc69d;outline-offset:3px}
.sound-switch[aria-pressed="false"]{opacity:.72}

.sound-preview{background:#224055;color:#e9f1f4;border:1px solid #58778b;border-radius:9px;font-size:11px;font-weight:800;min-height:34px;padding:5px 10px;white-space:nowrap}
.sound-preview:hover{border-color:#ffc69d}
.sound-preview:focus-visible{outline:2px solid #ffc69d;outline-offset:2px}

.speed-options{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0}
.game-options .speed-options label{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:12px;color:#c3d8df;white-space:nowrap}
.speed-options select{width:min(175px,40vw);min-height:40px}
.speed-hint{font-size:11px;color:#b4c8d4}
.record-format-status{grid-column:1/-1;text-align:center;font-size:11px;color:#b9d4dd;min-height:1.2em}
.record-format-status:empty{display:none}
@media(max-width:390px){.speed-options{align-items:flex-start}.speed-hint{width:100%}}

.game-options .video-assist-option{grid-column:1/-1;display:flex;flex-direction:row;align-items:center;gap:9px;background:#193548;border:1px solid #52768b;border-radius:11px;padding:11px 12px;color:#ebf4f7;font-size:12px;cursor:pointer}
.video-assist-option input{width:18px;height:18px;accent-color:#f3c6a6;flex-shrink:0}
.item-status{grid-column:1/-1;margin:0;color:#aac4d2;font-size:11px}

.lang-control{margin-left:auto;display:flex;align-items:center}
.lang-control select{font:inherit;font-size:12px;max-width:145px;min-height:36px;padding:6px 7px;border:1px solid #688193;border-radius:8px;background:#172f44;color:#fff}
.lang-control select:focus-visible{outline:2px solid #f3c6a6;outline-offset:2px}
.header{flex-wrap:wrap;gap:8px}
.game-options .video-assist-option span{white-space:normal}
@media(max-width:400px){.lang-control select{max-width:122px;font-size:11px}}

/* Never expose Admin recording controls on public pages, even when layout rules use display:flex. */
.game-options .cinema-option[hidden]{display:none!important}
.game-options .cinema-option{border-color:#ad8ad5;background:#282341}

/* Preserve hidden state on non-touch/desktop layouts. */
.game-options #mobileAssistOption[hidden]{display:none!important}
