:root{--mincho:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho","YuMincho",serif;--ink:#e8f3f2;color-scheme:dark;background:#1b3439;font-family:"Hiragino Maru Gothic ProN","Yu Gothic",sans-serif}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{display:flex;justify-content:center;background:radial-gradient(ellipse at 50% 45%,#2d4b51,#0e2125);-webkit-tap-highlight-color:transparent}
.game-frame{position:relative;width:min(100%,560px);height:100vh;height:100dvh;overflow:hidden;touch-action:none;isolation:isolate}
#scene{display:block;width:100%;height:100%;touch-action:none}
.start-panel{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(36px,9vh,72px);transition:opacity .6s;background:radial-gradient(ellipse at 50% 46%,#06171c55,#06171cb0)}
.title{margin:0;font-family:var(--mincho);font-weight:500;font-size:clamp(44px,14vw,72px);letter-spacing:.32em;margin-inline-start:.32em;color:var(--ink);text-shadow:0 2px 24px #000a;line-height:1}
/* Text controls in the same Mincho, hairline-bordered so they sit quietly on the dark water. */
.text-button{display:inline-flex;align-items:center;justify-content:center;min-width:9.5em;min-height:48px;padding:0 1.6em;font:500 17px/1 var(--mincho);letter-spacing:.18em;color:var(--ink);text-decoration:none;background:#061a1f66;border:1px solid #e8f3f273;border-radius:2px;cursor:pointer;touch-action:manipulation;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:background .2s,opacity .4s,transform .15s}
.text-button:hover{background:#e8f3f21f}
.text-button:active{transform:scale(.97)}
.text-button:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.text-button:disabled{opacity:.3;cursor:default}
.end-panel{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:24px 16px;text-align:center;color:var(--ink);background:#061317c7;animation:appear 2.4s both;font-family:"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic","Meiryo",sans-serif;line-height:1.7}
.end-mark{margin:0;font-family:var(--mincho);letter-spacing:.3em;color:#9fb4b2}
.end-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:28px}
.thanks-title{margin:32px 0 14px;font-size:16px;font-weight:normal}
.thanks-text{margin:0;font-size:13px;line-height:2;overflow-wrap:anywhere;color:#c3d2d0}
.creator{margin:24px 0 0;font-size:13px}
.creator a{color:#9fd3d6;text-underline-offset:4px}
.creator a:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.start-panel.leaving{opacity:0;pointer-events:none}
.pause-panel{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#315965bd;backdrop-filter:blur(14px)}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes appear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.start-panel,.text-button{transition:none}.end-panel{animation:none}}
