/* Sketchy Maps: the app's palette (Pindrop/Shared/Shared.swift, GlobeView.swift). */
:root {
  --ink: #1c2933; --accent: #e3572e; --good: #299e70; --paper: #f5f2eb;
  --space: #0d1421; --muted: rgba(28, 41, 51, 0.6); --soft: rgba(28, 41, 51, 0.08);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0.15em 0; line-height: 1.2; }
.sub { color: var(--muted); margin: 0; font-size: 0.95rem; }
.center { text-align: center; }

button, .big { font: inherit; font-weight: 600; border: 0; border-radius: 16px; cursor: pointer; }
.big { display: block; width: 100%; padding: 16px; background: var(--ink); color: #fff; font-size: 1.05rem; text-align: center; text-decoration: none; }
.big:disabled { opacity: 0.4; cursor: default; }
.soft { padding: 16px; background: var(--soft); color: var(--ink); font-size: 1.05rem; }
.soft:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- the game */
body.game { overscroll-behavior: none; }
body.game[data-screen="tap"] { background: var(--space); overflow: hidden; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); padding: 24px; text-align: center; }

.hdr { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.hdr .title { flex: 1; }
.dots { display: flex; gap: 6px; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(28, 41, 51, 0.18); }
.dots span.done { background: var(--good); }
.dots span.now { background: var(--ink); }
.help { width: 24px; height: 24px; border-radius: 50%; background: var(--soft); color: var(--ink); text-decoration: none; display: grid; place-items: center; font-size: 0.85rem; }

.tap { position: fixed; inset: 0; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; display: block; }
.card { background: rgba(245, 242, 235, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 18px; padding: 14px; }
.qcard { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto; }
.zoom { position: absolute; right: 12px; bottom: calc(140px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }   /* in thumb reach, clear of Lock it in / Next */
.zoom button { width: 40px; height: 40px; border-radius: 12px; background: rgba(245, 242, 235, 0.85); color: var(--ink); font-size: 1.3rem; line-height: 1; }
.bottom { position: absolute; left: 16px; right: 16px; bottom: calc(10px + var(--safe-b)); max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.pill { background: rgba(245, 242, 235, 0.92); border-radius: 999px; padding: 10px 16px; font-weight: 600; }

.draw { display: flex; flex-direction: column; gap: 10px; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); min-height: 100vh; min-height: 100dvh; max-width: 560px; margin: 0 auto; }
.padwrap { flex: 1; min-height: 240px; display: flex; justify-content: center; align-items: center; }
#pad { background: #fff; border-radius: 18px; outline: 2px dashed rgba(28, 41, 51, 0.12); outline-offset: -2px; touch-action: none; cursor: crosshair; display: block; }
.controls { display: flex; gap: 10px; }
.controls > * { flex: 1; }
.controls .big { flex: 2; }
.drawresult .row { display: flex; align-items: baseline; gap: 10px; font-size: 1.15rem; }
.drawresult .verdict { flex: 1; color: rgba(28, 41, 51, 0.7); font-size: 1rem; }
.legend { display: flex; gap: 14px; font-size: 0.8rem; margin-top: 4px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .yours { color: var(--accent); } .legend .yours::before { background: var(--accent); }
.legend .real { color: var(--good); } .legend .real::before { background: var(--good); }

.end { max-width: 560px; margin: 0 auto; padding: calc(20px + var(--safe-t)) 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.end .kicker { text-align: center; color: var(--muted); font-weight: 600; margin: 0; }
.end .total { text-align: center; font-size: 56px; font-weight: 800; margin: 0; line-height: 1; }
.results { list-style: none; margin: 0; padding: 0 4px; }
.results li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(28, 41, 51, 0.1); }
.results li span:last-child { color: rgba(28, 41, 51, 0.7); white-space: nowrap; }
.streak { text-align: center; font-weight: 600; margin: 0; }
.share { white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #fff; border-radius: 12px; padding: 12px; margin: 0; user-select: all; -webkit-user-select: all; }
.getapp { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 16px; margin-top: 6px; }
.getapp img { border-radius: 14px; flex: none; }
.getapp h2 { margin: 0 0 4px; font-size: 1.15rem; }
.getapp p { margin: 0 0 12px; color: rgba(28, 41, 51, 0.75); font-size: 0.95rem; line-height: 1.4; }
.big.soon { background: var(--soft); color: var(--muted); cursor: default; }
.foot { display: flex; justify-content: center; gap: 18px; font-size: 0.9rem; padding-top: 6px; }
.foot a { color: var(--muted); }

.howto { position: fixed; inset: 0; background: rgba(13, 20, 33, 0.55); display: grid; place-items: center; padding: 20px; z-index: 10; }
.howto .card { max-width: 420px; background: var(--paper); padding: 22px; }
.howto h2 { margin: 0 0 10px; }
.howto p { line-height: 1.45; margin: 0 0 12px; }

/* ---------- text pages */
.page { max-width: 680px; margin: 0 auto; padding: 28px 20px 48px; line-height: 1.55; }
.page header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page header img { border-radius: 10px; }
.page header a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.page h1 { font-size: 1.8rem; margin: 0.3em 0 0.5em; }
.page h2 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
.page .updated { color: var(--muted); font-size: 0.9rem; }
.page .play { display: inline-block; width: auto; padding: 12px 22px; margin-top: 12px; }
.page footer { margin-top: 40px; display: flex; gap: 18px; font-size: 0.9rem; }
.page footer a { color: var(--muted); }
.page dt { font-weight: 600; margin-top: 12px; }
.page dd { margin: 2px 0 0; }
