:root { color-scheme: dark; --ink: #f4f1ea; --accent: #ffd23f; --red: #e2372b; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font-family: "Press Start 2P", "Courier New", monospace; font-size: 13px; line-height: 1.7; -webkit-font-smoothing: none; overflow: hidden; touch-action: none; }
#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; text-align: center; text-shadow: 0 0 6px #000, 0 2px 2px #000; }
#obj { position: absolute; top: 4vh; left: 0; right: 0; font-size: clamp(18px, 3vw, 34px); font-weight: 700; transition: opacity .2s; }
#flash { position: absolute; top: 30vh; left: 0; right: 0; font-size: clamp(20px, 3.4vw, 38px); color: var(--accent); }
#cap { position: absolute; bottom: 18vh; left: 0; right: 0; font-size: 16px; color: #9fd3ff; opacity: .85; }
#sub { position: absolute; bottom: 7vh; left: 8vw; right: 8vw; font-size: clamp(17px, 2.6vw, 30px); white-space: pre-line; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s; }
#loading { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #000; z-index: 5; }
.spin { width: 46px; height: 46px; border-radius: 50%; border: 5px solid #333; border-top-color: var(--accent); animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
#menu { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 6; padding: 16px;
  background: radial-gradient(ellipse at 50% 30%, #1d1d2a 0%, #060608 70%); }
.card { width: min(520px, 100%); text-align: center; }
.logo { width: min(320px, 70%); height: auto; display: block; margin: 0 auto 4px; }
h1 { margin: 0; font-size: clamp(22px, 5vw, 36px); line-height: 1.3; color: var(--red); text-shadow: 0 3px 0 #000; letter-spacing: .5px; }
.by { margin: 4px 0 22px; opacity: .7; font-size: 15px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
button { font: inherit; font-size: 13px; min-height: 48px; padding: 10px 20px; border-radius: 12px; border: 2px solid #000; background: var(--accent); color: #111; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 #000; }
button:disabled { background: #444; color: #999; cursor: default; }
button:focus-visible, select:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.small button { font-size: 11px; min-height: 44px; background: #2a2a36; color: var(--ink); border-color: #555; box-shadow: none; }
.pick { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; font-size: 16px; }
select { font: inherit; font-size: 16px; min-height: 44px; padding: 6px 10px; border-radius: 10px; background: #16161e; color: var(--ink); border: 1px solid #555; max-width: 70vw; }
details { margin-top: 18px; text-align: left; background: #111118; border: 1px solid #333; border-radius: 12px; padding: 10px 14px; font-size: 10px; line-height: 1.9; }
summary { cursor: pointer; font-weight: 700; }
#menuBtn { position: fixed; top: 10px; right: 10px; z-index: 4; min-height: 44px; width: 44px; padding: 0; font-size: 20px; background: rgba(20,20,28,.7); color: #fff; border-color: #444; box-shadow: none; }
#touch { position: fixed; inset: 0; display: none; z-index: 2; }
body.touch #touch { display: block; }
#stick { position: absolute; display: none; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); }
#knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.4); }
#sprintBtn { position: absolute; right: 18px; bottom: 22px; width: 72px; height: 72px; border-radius: 50%; padding: 0; background: rgba(255,210,63,.35); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }
#sprintBtn.on { background: rgba(255,210,63,.85); color: #111; }
body.in-vr #menuBtn { display: none; }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } #fade { transition: none; } }
.form { display: grid; gap: 12px; margin: 0 auto 8px; max-width: 420px; text-align: left; }
.field { display: grid; gap: 6px; font-size: 12px; }
.field input:not([type=range]) { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: #16161e; color: var(--ink); border: 1px solid #555; }
.colrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.colrow label { display: flex; gap: 6px; align-items: center; }
.colrow input { width: 84px; accent-color: var(--accent); }
#swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #000; box-shadow: 0 0 0 1px #555; }
.note { font-size: 10px; opacity: .75; min-height: 1.2em; margin: 8px 0 0; }
#net { position: absolute; top: 12px; left: 12px; font-size: 10px; text-align: left; opacity: .85; white-space: pre-line; }
#cross { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1px rgba(0,0,0,.6); pointer-events: none; z-index: 3; }
body.in-vr #cross { display: none; }
#coins { position: absolute; top: 12px; right: 66px; font-size: 12px; color: var(--accent); }

#closed { position: fixed; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #000; color: #fff; z-index: 30; font-size: 22px; text-align: center; }
#closed button { font: inherit; padding: 10px 18px; }
#modPw { width: 180px; }
