/* Shared look for the arcade's phone games. */
:root {
  --bg: #1b1420;
  --panel: #2a1f31;
  --ink: #f4ead5;
  --dim: #a8977f;
  --gold: #f2c14e;
  --gold-deep: #b8862b;
  --red: #e4572e;
  --green: #7bd389;
  --blue: #8ecae6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body { display: flex; justify-content: center; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

#app {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  user-select: none;
  -webkit-user-select: none;
}

.overlay {
  position: fixed; inset: 0;
  z-index: 10;
  background: rgba(15, 10, 18, 0.96);
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px;
}
.overlay.center { align-items: center; }
.card { width: 100%; max-width: 440px; text-align: center; }
.card h1 { font-size: 36px; color: var(--gold); margin: 10px 0 6px; line-height: 1.1; }
.card h2 { font-size: 18px; color: var(--gold); margin: 28px 0 8px; }
.card p { font-size: 17px; line-height: 1.45; margin: 8px 0; }
.card .dim { color: var(--dim); font-size: 15px; }
.hero { font-size: 84px; line-height: 1; margin-top: 8px; }

.warn {
  background: #e4572e22;
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  font-size: 15px;
  margin: 12px 0;
}
.warn b { color: var(--red); }

.primary {
  display: inline-block;
  margin-top: 16px;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1a05;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 0 var(--gold-deep);
}
.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }
.quiet {
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--dim);
  background: none;
  color: var(--dim);
  font-weight: 700;
  font-size: 14px;
}

.countdown { font-size: 120px; font-weight: 800; color: var(--gold); line-height: 1; margin: 16px 0; }

.big-number { font-size: 40px; font-weight: 800; color: var(--gold); margin: 12px 0 0; }
.sub-number { color: var(--dim); font-size: 15px; margin: 4px 0 0; }

form.carve { margin-top: 18px; }
form.carve label { display: block; font-size: 15px; color: var(--dim); }
.row { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.row .primary { margin-top: 0; padding: 12px 18px; font-size: 16px; }
.row input {
  flex: 1; min-width: 0; max-width: 220px;
  font: inherit; font-size: 18px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid #4a3b4f;
  background: var(--panel);
  color: var(--ink);
}
.row input:focus { outline: none; border-color: var(--gold); }
.carved { font-weight: 700; color: var(--gold); }

.hall { list-style: none; padding: 0; margin: 0; text-align: left; }
.hall li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-areas: "rank who pts" "rank what pts";
  column-gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}
.hall li:nth-child(odd) { background: #ffffff08; }
.hall li.me { background: #f2c14e26; outline: 2px solid var(--gold); }
.hall .rank { grid-area: rank; align-self: center; color: var(--dim); font-weight: 700; }
.hall .who { grid-area: who; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall .what { grid-area: what; color: var(--dim); font-size: 13px; }
.hall .pts { grid-area: pts; align-self: center; font-weight: 800; color: var(--gold); font-size: 18px; }
.hall li.empty, .hall li.note { display: block; color: var(--dim); text-align: center; background: none; font-size: 14px; }

.debug {
  position: fixed; left: 4px; bottom: 4px; z-index: 20;
  font: 11px/1.3 ui-monospace, Consolas, monospace;
  color: #9f9; background: #000b; padding: 4px 6px; border-radius: 6px;
  pointer-events: none; white-space: pre;
}
