@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(quicksand.woff2) format("woff2");
}
/* Layout: one portrait bucket (6 cells wide) scaled to fit under a slim HUD bar. Deliberately single dark theme, like the original. */
:root {
  --bg: #0f0f0f;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --line: #3a3a3a;
  --accent: #7ed321;
  --ui: "Quicksand", "Century Gothic", system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html { height: 100%; box-sizing: border-box; padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); }
body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--bg); color: var(--fg); font-family: var(--ui);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#app { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding-inline: 16px; padding-block: 0 8px; }
header { width: 100%; max-width: 520px; display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.stat { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.stat small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 16px; line-height: 1.15; }
.spacer { flex: 1; }
button {
  font: 700 13px/1 var(--ui); color: var(--fg); background: transparent;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; min-width: 44px;
}
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .3; cursor: default; }
button.armed { border-color: #ff4d4d; color: #ff4d4d; }
button.muted { opacity: .4; text-decoration: line-through; }
#stage { flex: 1; min-height: 0; width: 100%; max-width: 520px; position: relative; display: flex; justify-content: center; align-items: flex-start; }
canvas { display: block; touch-action: none; }
#board { position: relative; }
#info {
  position: absolute; left: 8px; bottom: 8px; width: 32px; height: 32px; min-width: 0; padding: 0;
  border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 15px;
}
.sheet {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: color-mix(in srgb, var(--bg) 82%, transparent);
}
.sheet-card {
  position: relative; box-sizing: border-box; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  background: #1a1a1a; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px;
  font-size: 14px; line-height: 1.5; -webkit-user-select: text; user-select: text;
}
.sheet-card h2 { margin: 0; font-size: 20px; padding-right: 40px; }
.sheet-card h3 { margin: 10px 0 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sheet-card p { margin: 0; }
.sheet-card address { font-style: normal; }
.sheet-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.sheet-card .en { margin-top: 8px; color: var(--muted); font-size: 13px; }
.sheet-card a { color: var(--accent); }
.close { position: absolute; top: 12px; right: 12px; min-width: 0; width: 34px; height: 34px; padding: 0; font-size: 18px; }
#over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 72%, transparent); }
.card { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 24px; }
.card .eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #ff4d4d; }
.card .big { margin: 0; font-size: 52px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.card p { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.card button { margin-top: 12px; background: var(--accent); color: #0f0f0f; border-color: var(--accent); font-size: 16px; padding: 12px 24px; }
