/* MapTap SP — brand palette from piccini.app (BRAND_GUIDE blueprint mode). */
:root {
  --bg: #0D1B2A;
  --surface: #142640;
  --surface-2: #1B3A72;
  --ink: #E8E8E8;
  --muted: #8aa0bf;
  --amber: #F5A623;
  --green: #28a745;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }

/* ---- Map ---- */
#map { position: absolute; inset: 0; z-index: 0; background: var(--bg); }
.leaflet-control-container .leaflet-top { top: 76px; }
.leaflet-container { font-family: var(--body); background: var(--bg); }
.leaflet-control-attribution {
  background: rgba(13, 27, 42, 0.7) !important;
  color: var(--muted) !important;
  font-size: 10px;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

/* map pins (emoji divIcons) */
.pin { background: none !important; border: none !important; font-size: 26px; line-height: 1;
  text-align: center; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.answer-label {
  background: var(--surface); color: var(--ink); border: 1px solid var(--surface-2);
  border-radius: 6px; font-weight: 600; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.answer-label::before { border-top-color: var(--surface-2) !important; }

/* ---- Overlays / cards ---- */
.overlay { position: fixed; inset: 0; z-index: 2000;
  background: rgba(9, 18, 30, 0.82); backdrop-filter: blur(6px);
  display: flex; padding: 20px; overflow-y: auto; }
.overlay.center { align-items: center; justify-content: center; }
.card {
  background: var(--surface); border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px; padding: 28px 24px; width: 100%; max-width: 420px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.logo { font-family: var(--display); font-weight: 700; font-size: 40px; margin: 0 0 6px;
  letter-spacing: -0.5px; }
.logo .accent { color: var(--amber); }
.tagline { color: var(--ink); margin: 0 0 18px; line-height: 1.45; }
.howto { text-align: left; color: var(--muted); line-height: 1.6; margin: 0 0 22px; padding-left: 20px; }
.muted { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.credit { color: var(--muted); opacity: .6; font-size: 11px; margin-top: 18px; }

/* ---- Buttons ---- */
.btn { font-family: var(--display); font-weight: 600; font-size: 16px;
  border: none; border-radius: 12px; padding: 14px 18px; cursor: pointer; width: 100%;
  transition: transform .06s ease, filter .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: #1a1206; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { background: #3a4660; color: #8090a8; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--surface-2); }
.btn-ghost:hover { background: rgba(27,58,114,.25); }
.btn-text { background: none; color: var(--muted); border: none; font-size: 14px; padding: 8px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---- In-game HUD ---- */
.prompt-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: linear-gradient(to bottom, rgba(13,27,42,.95), rgba(13,27,42,.78));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.icon-btn { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--surface-2); background: var(--surface); color: var(--ink);
  font-size: 22px; line-height: 1; cursor: pointer; }
.prompt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.prompt-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.prompt-text strong { font-family: var(--display); font-size: 19px; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-meta { flex: 0 0 auto; text-align: right; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pill { background: var(--surface-2); color: var(--ink); padding: 2px 8px; border-radius: 999px; font-size: 11px; }

.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(13,27,42,.95), rgba(13,27,42,0)); }
.action-bar .btn { max-width: 460px; margin: 0 auto; display: block; }

/* ---- Round result sheet ---- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
  background: var(--surface); border-top-left-radius: 20px; border-top-right-radius: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); text-align: center;
  box-shadow: 0 -16px 40px rgba(0,0,0,.5); animation: slideup .22s ease; max-width: 520px; margin: 0 auto; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-points { font-family: var(--display); font-size: 44px; font-weight: 700; color: var(--amber); line-height: 1; }
.sheet-points small { font-size: 16px; color: var(--muted); }
.sheet-sub { color: var(--ink); font-size: 13px; margin-top: 4px; opacity: .85; }
.sheet-district { display: inline-block; margin: 10px auto 0; padding: 4px 12px; border-radius: 999px;
  background: rgba(40,167,69,.18); border: 1px solid var(--green); color: #7CFC00;
  font-family: var(--display); font-size: 13px; font-weight: 600; }
.sheet-dist { color: var(--muted); margin-top: 2px; font-size: 14px; }
.sheet-line { font-size: 18px; margin: 12px 0 10px; line-height: 1.35; }
.sheet-place { font-size: 15px; }
.sheet-blurb { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 16px; }
.sheet .btn { max-width: 460px; margin: 0 auto; }

/* ---- End screen ---- */
.end-title { font-family: var(--display); color: var(--muted); font-size: 15px;
  text-transform: uppercase; letter-spacing: 2px; margin: 0 0 6px; }
.end-total { font-family: var(--display); font-size: 46px; font-weight: 700; color: var(--amber); }
.end-grade { font-size: 18px; margin: 4px 0 14px; }
.end-grid { font-size: 30px; letter-spacing: 4px; margin-bottom: 8px; }
.end-streak { color: var(--muted); margin-bottom: 12px; }
.recap { list-style: none; padding: 0; margin: 0 0 18px; text-align: left;
  border-top: 1px solid rgba(255,255,255,.06); }
.recap li { display: flex; justify-content: space-between; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.recap li b { font-family: var(--display); color: var(--amber); }
.share-status { color: var(--muted); font-size: 12px; white-space: pre-wrap;
  word-break: break-word; margin-top: 12px; font-family: var(--body); }

@media (min-width: 600px) {
  .prompt-text strong { font-size: 22px; }
}
