:root { --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05080f; color: #c4ceda; font-family: var(--mono); overflow: hidden; -webkit-tap-highlight-color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }

#stage { position: fixed; inset: 0; }
#scene { position: absolute; left: 0; top: 0; }
#hits { position: absolute; inset: 0; }

.hit { position: absolute; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.hit.locked { cursor: default; }
.hit:focus-visible { outline: 1px dashed #ffd36b; outline-offset: 1px; }

.card-text { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.card-text[hidden] { display: none; }
.card-text p { margin: 0; font-size: clamp(16px, 2.2vw, 22px); line-height: 1.55; color: #fbeedd;
  text-shadow: 0 0 2px #05080f, 0 0 14px rgba(255, 200, 140, .45); min-height: 3em; }
.card-text button, .replay { font: inherit; font-size: 14px; min-height: 44px; padding: 0 18px; background: transparent; border: 0; cursor: pointer; }
.card-text button { color: #e6ecef; }
.card-text button:hover, .replay:hover { filter: brightness(1.3); }

.final-msg { position: absolute; left: 50%; transform: translateX(-50%); width: min(96vw, 1200px); margin: 0; text-align: center;
  font-weight: 700; font-size: clamp(20px, 3.2vw, 36px); line-height: 1.22; color: #fff6e0; pointer-events: none; }
.final-msg[hidden] { display: none; }
.final-msg .l { display: block; }
.final-msg .c { display: inline-block; opacity: 0; transform: translateY(10px) scale(.7); filter: blur(5px);
  animation: cIn .8s cubic-bezier(.2, .9, .3, 1.2) forwards;
  text-shadow: 0 0 2px #05080f, 0 0 12px rgba(255, 210, 140, .95), 0 0 30px rgba(255, 140, 60, .7), 0 0 60px rgba(255, 70, 130, .5); }
.final-msg .c.sp { width: .5em; }
@keyframes cIn { to { opacity: 1; transform: none; filter: none; } }
.replay { position: absolute; color: #ffd36b; text-shadow: 0 0 8px #ffae00; }
.replay[hidden] { display: none; }

.toast { position: fixed; left: 50%; bottom: 18px; z-index: 12; transform: translate(-50%, 30px); opacity: 0; max-width: 94vw;
  padding: 10px 16px; font-size: 13px; color: #e8efe9; text-align: center; background: #0a0f1c; border: 1px dashed #36476a;
  transition: transform .3s, opacity .3s; pointer-events: none; white-space: nowrap; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.lock { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; background: #05080f; color: #3d6a52; }
.lock[hidden] { display: none; }
.lock p { color: #c4ceda; letter-spacing: .1em; }

.admin { position: fixed; right: 8px; bottom: 8px; z-index: 15; font-size: 11px; color: #c9d6cd; background: #0a0f1c; border: 1px dashed #36476a;
  padding: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 94vw; }
.admin[hidden] { display: none; }
.admin b { color: #ffd36b; }
.admin input, .admin button { font: inherit; font-size: 11px; color: inherit; background: #05080f; border: 1px solid #34434f; padding: 3px 6px; }
.admin button { cursor: pointer; }
