/* ============================================================
     DESIGN TOKENS — "Stamped": a travel passport.
     Mint security paper, navy cover, rubber-stamp inks (red, blue,
     green, violet, gold). The clock still shifts green -> gold -> red.
     ============================================================ */
  :root{
    --ink:#EDF3EE;          /* page: passport security paper */
    --panel:#FFFDF6;        /* lifted paper (cards, tickets) */
    --panel-2:#F6F2E6;      /* chips / slots */
    --panel-3:#ECE6D4;      /* hover */
    --line:#D3DACF;
    --text:#1D2433;
    --muted:#4F596B;
    --muted-2:#677184;
    --brand:#2A4FB0;        /* blue ink: selection, links */
    --cta:#C8323C;          /* red ink: primary actions */
    --navy:#23395B;         /* passport cover */
    --navy-2:#172A44;
    --gold:#A8750B;
    --violet:#6A3FA0;
    --go:#2F7D4F;           /* green ink: correct */
    --no:#C8323C;           /* red ink: wrong */
    --accent:#2F7D4F;       /* reactive clock color, set live by JS */
    --display:"Bagel Fat One","Figtree",system-ui,sans-serif;
    --stamp:"Rubik Mono One",ui-monospace,monospace;
    --mono:"Courier Prime",ui-monospace,monospace;
    --r:14px;
    --r-lg:20px;
    color-scheme:light;
    font-synthesis:none;
  }
  *{box-sizing:border-box;margin:0;padding:0}
  html,body{height:100%}
  body{
    background-color:var(--ink);
    background-image:
      repeating-radial-gradient(circle at 105% -8%, transparent 0 11px, rgba(47,125,79,.065) 11px 12px),
      repeating-radial-gradient(circle at -15% 70%, transparent 0 15px, rgba(106,63,160,.045) 15px 16px);
    color:var(--text);
    font-family:"Figtree",system-ui,sans-serif;
    -webkit-font-smoothing:antialiased;
    overflow:hidden;
  }
  .mono{font-family:var(--mono);font-weight:700}
  button{font-family:inherit;color:inherit;cursor:pointer;border:none;background:none}
  button:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:8px}

  #app{position:fixed;left:0;right:0;top:0;bottom:0;height:100vh;height:100dvh;display:flex;flex-direction:column}

  /* ---------- generic screen / overlay ---------- */
  .screen{flex:1;display:none;flex-direction:column;min-height:0}
  .screen.show{display:flex}
  .overlay{position:absolute;inset:0;display:none;align-items:safe center;justify-content:center;overflow-y:auto;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
    background:rgba(23,42,68,.55);backdrop-filter:blur(6px);z-index:20;padding:20px}
  .overlay.show{display:flex}

  /* ---------- start screen ---------- */
  .start-wrap{margin:auto;max-width:560px;width:100%;padding:28px;text-align:center}
  .wordmark{font-weight:700;letter-spacing:-.04em;line-height:.92;
    font-size:clamp(56px,16vw,116px)}
  .wordmark .rush{color:var(--accent)}
  .tagline{color:var(--muted);font-size:clamp(15px,3.6vw,19px);margin-top:10px;letter-spacing:.01em}
  .rules{margin:26px auto 0;max-width:460px;text-align:left;display:grid;gap:10px}
  .rule{display:flex;gap:12px;align-items:flex-start;color:var(--muted);font-size:14.5px;line-height:1.45}
  .rule b{color:var(--text);font-weight:600}
  .rule .k{flex:none;width:26px;height:26px;border-radius:8px;background:var(--panel-2);
    display:grid;place-items:center;color:var(--accent);font-weight:700;font-size:13px;margin-top:1px}
  .btn-primary{margin-top:30px;width:100%;max-width:320px;padding:17px 22px;border-radius:var(--r);
    background:var(--cta);color:#FFFDF6;font-weight:800;font-size:18px;box-shadow:0 5px 0 #8F2029;letter-spacing:.01em;
    transition:transform .08s ease, filter .15s ease}
  .btn-primary:hover{filter:brightness(1.06)}
  .btn-primary:active{transform:translateY(1px)}
  .sources-note{margin-top:22px;color:var(--muted-2);font-size:12px;line-height:1.5}
  .sources-note a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}

  /* ---------- HUD ---------- */
  .hud{display:flex;align-items:center;justify-content:space-between;gap:16px;
    padding:14px clamp(14px,4vw,28px);border-bottom:1px solid var(--line)}
  .hud-stat{display:flex;flex-direction:column;min-width:64px}
  .hud-stat.right{align-items:flex-end;text-align:right}
  .hud-label{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted-2)}
  .hud-value{font-size:22px;font-weight:700;line-height:1.1}
  .hud-value.mono{font-size:21px}
  .streak{color:var(--accent)}

  /* clock cluster */
  .clock{position:relative;width:96px;height:96px;flex:none}
  .clock svg{position:absolute;inset:0;transform:rotate(-90deg)}
  .clock .track{stroke:var(--panel-2);fill:none}
  .clock .bar{stroke:var(--accent);fill:none;stroke-linecap:round;
    transition:stroke .25s linear}
  .clock-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
  .clock-sec{font-size:30px;font-weight:700;line-height:1;color:var(--accent);transition:color .25s linear}
  .clock-pts{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-top:3px}
  .clock-pts b{color:var(--text)}

  /* ---------- challenge stage ---------- */
  .stage-wrap{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;
    justify-content:safe center;gap:clamp(14px,3vh,26px);padding:clamp(16px,3vh,30px) 18px;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .prompt{text-align:center;max-width:640px}
  .eyebrow{font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted-2)}
  .prompt h2{font-size:clamp(20px,5vw,30px);font-weight:600;letter-spacing:-.02em;margin-top:7px;line-height:1.15}
  .prompt h2 .hi{color:var(--accent)}
  .prompt h2 .lo{color:var(--muted)}
  .prompt .src{font-size:11.5px;color:var(--muted-2);margin-top:8px}

  /* flags — real images so they render on every OS (Windows shows no emoji flags) */
  img.flag{width:30px;height:21px;object-fit:cover;border-radius:3px;flex:none;display:block;
    box-shadow:0 0 0 1px rgba(29,36,51,.18);background:var(--panel-3)}
  .rev-row img.flag{width:26px;height:18px}
  .slot .filledchip img.flag,.catslot .placed img.flag{width:28px;height:20px}
  .drag-ghost img.flag{width:28px;height:20px}
  .flag-fallback{display:inline-flex;align-items:center;justify-content:center;width:30px;height:21px;
    border-radius:3px;background:var(--panel-3);font-size:10px;font-weight:700;color:var(--muted);
    font-family:var(--mono);flex:none}

  /* country chip */
  .chip{display:flex;align-items:center;gap:11px;padding:13px 16px;border-radius:var(--r);
    background:var(--panel-2);border:1px solid var(--line);font-size:16px;font-weight:500;
    transition:background .12s ease,transform .08s ease,border-color .12s ease;text-align:left;width:100%;
    cursor:pointer;user-select:none;-webkit-user-select:none}
  .chip:hover{background:var(--panel-3)}
  .chip:active{transform:scale(.985);cursor:grabbing}
  .chip .flag{font-size:24px;line-height:1;flex:none}
  .chip.ghost{opacity:.32;pointer-events:none}

  /* drag-and-drop */
  .drag-src{opacity:.35}
  .drag-ghost{position:fixed;z-index:60;pointer-events:none;left:0;top:0;
    transform:translate(-50%,-50%) rotate(-1.5deg);display:flex;align-items:center;gap:10px;
    padding:11px 15px;border-radius:var(--r);background:var(--panel-3);border:1px solid var(--brand);
    font-size:15px;font-weight:600;box-shadow:0 12px 30px rgba(0,0,0,.45);white-space:nowrap}
  .slot.drop-hot,.catslot.drop-hot{border-style:solid;border-color:var(--brand);
    background:rgba(91,141,239,.10);box-shadow:0 0 0 1px var(--brand) inset}
  .dnd-pool.drop-hot{outline:1px dashed var(--brand);outline-offset:6px;border-radius:var(--r)}
  /* only draggable chips suppress native touch-scroll; tap-only challenges keep it */
  .dnd-pool .chip{cursor:grab;touch-action:none}
  .filledchip,.catslot .placed{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
  .filledchip:active,.catslot .placed:active{cursor:grabbing}

  /* lives */
  .lives{display:flex;gap:4px;margin-top:6px}
  .lives .heart, .nf-lives .heart{width:15px;height:15px;display:block;transition:opacity .15s}
  .heart.spent{opacity:.5}
  .heart.spent svg path{fill:#C3CABE}   /* lost: greyed out, not faint red */

  /* rank-4 ladder */
  .rank4{display:flex;flex-direction:column;gap:22px;width:100%;max-width:440px}
  .ladder{display:grid;gap:8px}
  .slot{display:flex;align-items:center;gap:12px;min-height:54px;padding:8px 14px;border-radius:var(--r);
    border:1px dashed var(--line);background:rgba(255,253,246,.55)}
  .slot .rankno{flex:none;width:30px;font-family:var(--mono);font-weight:700;font-size:15px;color:var(--muted-2)}
  .slot .poleword{flex:none;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted-2)}
  .slot.filled{border-style:solid;border-color:var(--line);background:var(--panel-2)}
  .slot .filledchip{display:flex;align-items:center;gap:11px;font-weight:500;font-size:16px;flex:1;min-width:0}
  .slot .filledchip .flag{font-size:23px}
  .pool{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  @media(max-width:430px){.pool{grid-template-columns:1fr}}

  /* assign-3 */
  .assign3{display:flex;flex-direction:column;gap:20px;width:100%;max-width:540px}
  .cats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
  @media(max-width:540px){.cats{grid-template-columns:1fr}}
  .catslot{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:var(--r);
    border:1px dashed var(--line);background:rgba(255,253,246,.55);min-height:118px}
  .catslot .catname{font-size:13.5px;font-weight:600;line-height:1.2;min-height:34px;display:flex;align-items:center}
  .catslot .catname .hi{color:var(--accent)}
  .catslot .catname .lo{color:var(--muted)}
  .catslot .drop{flex:1;display:grid;place-items:center;border-radius:10px;background:rgba(29,36,51,.035);
    color:var(--muted-2);font-size:12px;letter-spacing:.04em;min-height:52px}
  .catslot.filled{border-style:solid;background:var(--panel)}
  .catslot .placed{width:100%;display:flex;align-items:center;gap:9px;font-weight:500;font-size:15px;
    background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:10px 11px}
  .catslot .placed .flag{font-size:21px}
  .a3pool{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
  @media(max-width:540px){.a3pool{grid-template-columns:1fr}}

  /* ---------- category chips + new challenge layouts ---------- */
  .catchip{display:flex;flex-direction:column;gap:2px;min-width:0;text-align:left}
  .catchip-n{font-weight:600;font-size:14.5px;line-height:1.15}
  .catchip-d{font-size:10.5px;letter-spacing:.02em;color:var(--accent)}
  .chip.sel,.optbtn.sel{border-color:var(--brand);background:rgba(91,141,239,.12);box-shadow:0 0 0 1px var(--brand) inset}
  .rank-cat{display:flex;align-items:center;justify-content:center;gap:8px;font-size:18px;font-weight:700}
  .rank-cat img.flag{width:30px;height:21px}
  /* best-of-six grid */
  .grid6{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:100%;max-width:520px}
  @media(max-width:520px){.grid6{grid-template-columns:1fr}}
  /* this-or-that */
  .tot{display:flex;flex-direction:column;gap:14px;width:100%;max-width:520px}
  .tot-row{display:grid;gap:8px;padding-bottom:12px;border-bottom:1px solid var(--line)}
  .tot-row:last-child{border-bottom:none;padding-bottom:0}
  .tot-country{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px}
  .tot-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .optbtn{display:flex;align-items:center;text-align:left;padding:12px 14px;border-radius:var(--r);
    background:var(--panel-2);border:1px solid var(--line);cursor:pointer;transition:background .12s,border-color .12s}
  .optbtn:hover{background:var(--panel-3)}
  /* rapid fire */
  .rf{display:flex;flex-direction:column;gap:16px;width:100%;max-width:440px;align-items:center}
  .rf-dots{display:flex;gap:9px}
  .rf-dot{width:11px;height:11px;border-radius:50%;background:var(--line);transition:background .15s}
  .rf-dot.ok{background:var(--go)} .rf-dot.no{background:var(--no)} .rf-dot.cur{background:var(--brand)}
  .rf-cat{font-size:19px;font-weight:700;text-align:center}
  .rf-chips{display:grid;gap:9px;width:100%}
  /* elimination */
  .elim{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;max-width:560px}
  @media(max-width:520px){.elim{grid-template-columns:repeat(2,1fr)}}
  .elim .chip{padding:11px 10px;font-size:13.5px}
  .elim .chip img.flag{width:24px;height:17px}

  /* ---------- briefing screen ---------- */
  .brief-title{font-size:24px;font-weight:700;margin:6px 0 10px}
  .brief-how{font-size:15px;line-height:1.5;color:var(--muted)}
  .brief-how b{color:var(--text)}
  .brief-lbl{margin-top:18px;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted-2)}
  .brief-cats{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  @media(max-width:460px){.brief-cats{grid-template-columns:1fr}}
  .brief-cat{padding:11px 14px;border-radius:var(--r);background:var(--panel-2);border:1px solid var(--line)}

  /* ---------- "your pick" line in reveal rows ---------- */
  .rev-row{flex-wrap:wrap}
  .rev-you{flex-basis:100%;display:flex;align-items:center;gap:8px;margin-top:8px;padding-top:8px;
    border-top:1px dashed var(--line);font-size:13.5px;color:var(--no)}
  .rev-you img.flag{width:22px;height:15px}
  .rev-you-lbl{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--no);opacity:.85}
  .rev-you .val{color:var(--no);opacity:.9}
  .tot-rev{color:var(--muted)} .tot-rev .rev-you-lbl{white-space:nowrap;min-width:64px} .tot-rev .rev-you-lbl,.tot-rev .val{color:var(--muted)}
  .tot-rev.win{color:var(--text);font-weight:500} .tot-rev.win .rev-you-lbl,.tot-rev.win .val{color:var(--go);opacity:1}
  .tot-rev + .tot-rev{margin-top:0;padding-top:4px;border-top:0}

  /* ---------- action bar ---------- */
  .actionbar{padding:14px clamp(14px,4vw,28px) calc(16px + env(safe-area-inset-bottom));
    border-top:1px solid var(--line)}
  .lockin{width:100%;max-width:640px;margin:0 auto;display:block;padding:16px;border-radius:var(--r);
    background:var(--go);color:#FFFDF6;font-weight:800;font-size:17px;box-shadow:0 5px 0 #1F5A37;letter-spacing:.01em;
    transition:transform .08s ease,filter .15s ease}
  .lockin:hover{filter:brightness(1.05)}
  .lockin:active{transform:translateY(1px)}
  .lockin:disabled{background:var(--panel-3);color:var(--muted-2);cursor:not-allowed;box-shadow:none}

  /* ---------- reveal & gameover cards ---------- */
  .card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);
    padding:24px;max-width:480px;width:100%;max-height:90vh;max-height:90dvh;overflow-y:auto;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .verdict{font-size:13px;letter-spacing:.18em;text-transform:uppercase;font-weight:700}
  .verdict.good{color:var(--go)}
  .verdict.bad{color:var(--no)}
  .pts-earned{font-size:46px;font-weight:700;letter-spacing:-.02em;margin-top:4px;line-height:1}
  .pts-earned small{font-size:16px;color:var(--muted);font-weight:500;letter-spacing:0}
  .reveal-body{margin-top:18px;display:grid;gap:7px}
  .rev-row{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;background:var(--panel-2);font-size:15px}
  .rev-row .flag{font-size:20px}
  .rev-row .nm{flex:1 1 0;min-width:0;font-weight:500;overflow-wrap:anywhere}
  .rev-row .val{font-family:var(--mono);font-size:13px;color:var(--muted);flex:0 1 auto;max-width:55%;text-align:right;overflow-wrap:anywhere}
  .rev-row .pos{font-family:var(--mono);font-size:12px;color:var(--muted-2);width:30px;text-align:right}
  .rev-row.mark{box-shadow:inset 3px 0 0 var(--go)}
  .rev-row.miss{box-shadow:inset 3px 0 0 var(--no)}
  .rev-src{margin-top:14px;font-size:11.5px;color:var(--muted-2);line-height:1.5}
  .rev-src a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
  .score-line{margin-top:14px;display:flex;justify-content:space-between;font-size:14px;color:var(--muted)}
  .score-line b{color:var(--text);font-family:var(--mono)}
  .next-btn{margin-top:20px;width:100%;padding:15px;border-radius:var(--r);background:var(--navy);
    color:#F6F3E8;font-weight:800;font-size:16px;box-shadow:0 5px 0 var(--navy-2);transition:transform .08s ease,filter .15s}
  .next-btn:hover{filter:brightness(1.06)}.next-btn:active{transform:translateY(1px)}
  .next-hint{text-align:center;color:var(--muted-2);font-size:11.5px;margin-top:9px}

  .over-num{display:flex;gap:26px;margin-top:18px;flex-wrap:wrap}
  .over-num .b{font-size:38px;font-weight:700;font-family:var(--mono);line-height:1}
  .over-num .l{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted-2);margin-top:6px}

  /* ---------- motion ---------- */
  @keyframes pop{0%{transform:scale(.8);opacity:0}60%{transform:scale(1.04)}100%{transform:scale(1);opacity:1}}
  @keyframes shake{10%,90%{transform:translateX(-2px)}30%,70%{transform:translateX(4px)}50%{transform:translateX(-6px)}}
  @keyframes floatup{0%{transform:translateY(0);opacity:1}100%{transform:translateY(-46px);opacity:0}}
  .pop{animation:pop .26s cubic-bezier(.2,.8,.2,1)}
  .shake{animation:shake .4s}
  .float-pts{position:absolute;left:50%;top:42%;transform:translateX(-50%);pointer-events:none;
    font-weight:700;font-size:34px;color:var(--go);animation:floatup .8s ease-out forwards;z-index:30}
  @media(prefers-reduced-motion:reduce){
    .pop,.shake,.float-pts,.lockin,.btn-primary,.next-btn{animation:none!important;transition:none!important}
  }

/* ============================================================================
   MENU / AUTH / LEADERBOARD  (added in the modular rebuild)
   ============================================================================ */
/* Content screens scroll independently of the fixed app shell. The play screen
   is intentionally excluded — it pins its HUD + action bar and scrolls only the
   stage area. */
#screen-menu, #screen-auth, #screen-leaderboard, #screen-othergames{
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;   /* momentum scrolling on iOS */
  overscroll-behavior:contain;
}
.menu-wrap, .auth-wrap, .board-wrap{
  width:100%; max-width:620px; margin:0 auto;
  padding:48px 22px calc(60px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
@media (max-width:560px){
  .menu-wrap, .auth-wrap, .board-wrap{ padding-top:28px; }
}
.menu-lbl{
  margin:26px 0 14px; align-self:stretch; text-align:left;
  font-size:12px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted-2);
}
.user-bar{
  margin-top:20px; display:flex; gap:14px; align-items:center; justify-content:center;
  flex-wrap:wrap; font-size:14px;
}
.user-hi{ color:var(--text); } .user-hi.muted{ color:var(--muted); }
.link-btn{
  background:none; border:none; color:var(--brand); font:inherit; font-size:14px;
  cursor:pointer; padding:4px 2px; border-radius:8px;
}
.link-btn:hover{ text-decoration:underline; }
.link-btn.back{ align-self:flex-start; margin-bottom:14px; color:var(--muted); }

/* in-game navigation (play screen bar + brief/reveal cards + naming top) */
.ingame-nav{ display:flex; align-items:center; gap:14px; }
.play-nav{ justify-content:space-between; padding:10px clamp(14px,4vw,28px) 0; }
.card .ingame-nav{ justify-content:space-between; margin-bottom:16px; }
.ingame-nav .link-btn.danger{ color:var(--no); }
.ingame-nav .link-btn.danger:hover{ filter:brightness(1.12); text-decoration:underline; }

/* game cards */
.game-list{ width:100%; display:flex; flex-direction:column; gap:14px; }
.game-card{
  --card-accent:#5B8DEF;
  text-align:left; background:var(--panel); border:1px solid var(--line);
  border-left:4px solid var(--card-accent); border-radius:var(--r);
  padding:18px 20px; transition:border-color .15s, transform .12s;
}
.game-card:hover{ transform:translateY(-2px); }
.game-card-name{ font-size:20px; font-weight:700; }
.game-card-blurb{ margin-top:6px; color:var(--muted); font-size:14px; line-height:1.5; }
.game-card-actions{ margin-top:14px; display:flex; align-items:center; gap:16px; }
.btn-primary.sm{ padding:9px 22px; font-size:15px; width:auto; }

/* auth */
.auth-title{ font-size:26px; font-weight:700; margin-bottom:18px; }
.auth-tabs{ display:flex; gap:8px; margin-bottom:20px; }
.auth-tab{
  background:var(--panel-2); border:1px solid var(--line); color:var(--muted);
  font:inherit; font-size:14px; padding:8px 16px; border-radius:999px; cursor:pointer;
}
.auth-tab.on{ background:var(--navy); border-color:var(--navy); color:#F6F3E8; font-weight:700; }
.auth-form{ width:100%; max-width:360px; display:flex; flex-direction:column; gap:14px; }
.field{ display:flex; flex-direction:column; gap:6px; text-align:left; }
.field-lbl{ font-size:13px; color:var(--muted); }
.field-inp{
  background:var(--panel-2); border:1px solid var(--line); border-radius:12px;
  padding:12px 14px; color:var(--text); font:inherit; font-size:15px;
}
.field-inp:focus{ outline:none; border-color:var(--brand); }
.auth-form .btn-primary{ margin-top:6px; }
.auth-error{ margin-top:14px; color:var(--no); font-size:14px; min-height:20px; }

/* leaderboard */
.board-title{ font-size:24px; font-weight:700; }
.board-sub{ color:var(--muted-2); font-size:13px; margin:6px 0 22px; }
.board-body{ width:100%; display:flex; flex-direction:column; gap:6px; }
.board-row{
  display:flex; align-items:center; gap:14px; padding:12px 16px;
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
}
.board-row.you{ border-color:var(--brand); background:rgba(91,141,239,.10); }
.board-rank{ width:42px; color:var(--muted-2); font-weight:700; }
.board-name{ flex:1; text-align:left; }
.board-score{ font-weight:700; font-size:18px; }
.board-empty{ color:var(--muted); padding:30px 0; }
.board-empty.bad{ color:var(--no); }

/* game-over extras */
.over-status{ margin-top:14px; font-size:14px; }
.over-status.good{ color:var(--go); } .over-status.bad{ color:var(--no); } .over-status.muted{ color:var(--muted); }
.over-actions{ margin-top:16px; display:flex; gap:20px; justify-content:center; }

/* pending-score banner on the auth screen */
.auth-banner{
  width:100%; max-width:360px; margin-bottom:18px; padding:12px 14px;
  border-radius:12px; font-size:14px; line-height:1.4;
  color:var(--text); background:rgba(42,79,176,.08); border:1.5px dashed rgba(42,79,176,.45);
}

/* ============================================================================
   NAME-FROM MODE
   ============================================================================ */
#screen-namefrom{ overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.nf-wrap{
  width:100%; max-width:560px; margin:0 auto;
  padding:24px 22px calc(40px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; align-items:center;
}
.nf-top{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nf-stat-group{ display:flex; align-items:center; gap:16px; }
.nf-lives{ display:flex; gap:4px; }
.nf-named{ font-size:13px; color:var(--muted-2); letter-spacing:.04em; }

.nf-prompt{ margin-top:34px; display:flex; flex-direction:column; align-items:center; text-align:center; }
.nf-flag .flag{ width:96px; height:auto; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.45); }
.nf-flag .flag-fallback{ font-size:30px; }
.nf-ask{ margin-top:18px; font-size:14px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.nf-country{ margin-top:6px; font-size:34px; font-weight:700; letter-spacing:-.02em; line-height:1.1; }

.nf-input-row{ margin-top:26px; width:100%; max-width:440px; display:flex; gap:10px; }
.nf-input{
  flex:1; min-width:0; background:var(--panel-2); border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; color:var(--text); font:inherit; font-size:16px;   /* 16px = no iOS zoom */
}
.nf-input:focus{ outline:none; border-color:var(--brand); }
.nf-input:disabled{ opacity:.6; }
.nf-submit{
  flex:none; padding:0 22px; border-radius:12px; background:var(--navy); color:#F6F3E8;
  font-weight:700; font-size:16px; transition:filter .15s, transform .08s;
}
.nf-submit:hover{ filter:brightness(1.06); } .nf-submit:active{ transform:translateY(1px); }
.nf-submit:disabled{ background:var(--panel-3); color:var(--muted-2); cursor:default; }

.nf-feedback{ margin-top:18px; width:100%; max-width:440px; min-height:24px; text-align:center; font-size:14px; color:var(--muted); }
.nf-feedback .nf-verdict{ font-size:19px; font-weight:700; letter-spacing:-.01em; }
.nf-feedback .nf-sub{ margin-top:4px; font-size:13.5px; color:var(--muted); line-height:1.45; }
.nf-feedback.good .nf-verdict{ color:var(--go); }
.nf-feedback.bad .nf-verdict{ color:var(--no); }
.nf-feedback.warn{ color:var(--gold); }
.nf-suggest{ margin-top:10px; font-size:13px; color:var(--muted-2); line-height:1.5; }
.nf-suggest-lbl{ color:var(--muted); }
.nf-suggest-role{ color:var(--muted-2); }
.nf-link{ color:var(--brand); text-decoration:underline; text-underline-offset:2px; }
.nf-link:hover{ filter:brightness(1.15); }

.nf-history{ margin-top:22px; width:100%; max-width:440px; }
.nf-hist-lbl{ font-size:13px; color:var(--muted-2); line-height:1.5; text-align:center; }
.nf-hist-chips{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.nf-hist-chip{
  padding:7px 13px; border-radius:999px; background:var(--panel-2); border:1px solid var(--line);
  color:var(--text); font-size:13.5px; transition:background .12s, border-color .12s;
}
.nf-hist-chip:hover{ background:var(--panel-3); border-color:var(--brand); }

/* game over */
.nf-over{ min-height:60vh; display:flex; align-items:center; justify-content:center; padding:30px 20px; }
.nf-over-card{ width:100%; max-width:440px; text-align:center; }
.nf-over-big{ font-size:60px; font-weight:700; letter-spacing:-.02em; line-height:1; margin-top:10px; }
.nf-over-big .nf-over-unit{ display:block; font-size:14px; font-weight:500; color:var(--muted); letter-spacing:.04em; margin-top:8px; }
.nf-over-best{ margin-top:18px; font-size:16px; color:var(--go); font-weight:600; }
.nf-over-life{ margin-top:10px; font-size:13.5px; color:var(--muted-2); }
.nf-over-card .next-btn{ margin-top:24px; }

.nf-rule{ margin-top:10px; font-size:12px; color:var(--muted-2); letter-spacing:.02em; }

/* ============================================================================
   CLOSEST CITY (distance game) — self-contained, zoomable SVG map
   Element sizes (dot radii, line widths, font sizes) are set inline by the
   renderer so they scale with the zoom; CSS here is colours + layout only.
   ============================================================================ */
.screen.game-wide .stage-wrap{ max-width:1000px; width:100%; margin-inline:auto; }
.geo-wrap{ width:100%; display:flex; flex-direction:column; gap:16px; align-items:stretch; }
.geo-mapbox{ position:relative; width:100%; aspect-ratio:16/10; background:#86b3d0; border:1px solid var(--line);
  border-radius:var(--r); overflow:hidden; }
.geo-map{ display:block; width:100%; height:100%; }

/* zoom controls (shared by play + reveal maps) */
.geo-zoom{ position:absolute; right:8px; bottom:8px; display:flex; flex-direction:column; gap:6px; z-index:2; }
.geo-zoom-btn{ width:32px; height:32px; display:grid; place-items:center; border-radius:8px;
  background:rgba(14,23,38,.82); border:1px solid rgba(255,255,255,.18); color:#F6F3E8;
  font:700 18px/1 var(--mono,monospace); cursor:pointer; backdrop-filter:blur(2px); }
.geo-zoom-btn:hover{ background:rgba(30,45,70,.92); border-color:var(--brand); }

.geo-ocean{ fill:#86b3d0; }
.geo-tiles image{ image-rendering:auto; }



/* reveal: line/dot/label colours are set inline by the renderer
   (closest→farthest = green / yellow / orange / red). The fallbacks below just
   guarantee nothing ever renders pure black if an inline style is missing. */
.geo-dot{ stroke:#1D2433; fill:#cbd5e1; }
.geo-source{ fill:#C8323C; }
.geo-source-ring{ fill:rgba(255,253,246,.55); stroke:#C8323C; }

.geo-line{ fill:none; stroke:#94a3b8; stroke-linecap:round; opacity:.9; }

.geo-source-label{ fill:#23395B; font-weight:800; text-anchor:middle; paint-order:stroke; stroke:#FFFDF6; stroke-linejoin:round; }
.geo-citylabel{ fill:#1D2433; font-weight:800; text-anchor:middle; paint-order:stroke; stroke:#FFFDF6; stroke-linejoin:round; }
.geo-dist{ fill:#1D2433; font-weight:800; text-anchor:middle; paint-order:stroke; stroke:#FFFDF6; stroke-linejoin:round; }

.geo-options{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:560px){ .geo-options{ grid-template-columns:1fr; } }
.geo-optbtn{ display:flex; align-items:center; gap:11px; padding:14px 16px; border-radius:var(--r);
  background:var(--panel-2); border:1px solid var(--line); font-size:15px; font-weight:500; text-align:left;
  transition:background .12s, border-color .12s; }
.geo-optbtn:hover{ background:var(--panel-3); }
.geo-optbtn.sel{ border-color:var(--brand); background:rgba(91,141,239,.14); }
.geo-optnum{ flex:none; width:25px; height:25px; border-radius:50%; display:grid; place-items:center;
  background:var(--panel-3); font:700 13px var(--mono,monospace); }
.geo-optbtn.sel .geo-optnum{ background:var(--brand); color:#FFFDF6; }
.geo-optname{ min-width:0; }

.geo-revmap{ position:relative; width:100%; aspect-ratio:16/10; margin-bottom:10px; border-radius:10px; overflow:hidden; border:1px solid var(--line); }
.geo-revmap .geo-map{ width:100%; height:100%; }

/* ---- Closest City: group progression HUD + ranked reveal ---- */
.grp-pips{ display:inline-flex; gap:5px; vertical-align:middle; }
.grp-pip{ width:20px; height:20px; border-radius:6px; display:grid; place-items:center;
  font:700 12px var(--mono,monospace); background:var(--panel-3); border:1px solid var(--line); color:var(--muted-2); }
.grp-pip.p3{ background:var(--go); color:#FFFDF6; border-color:transparent; }
.grp-pip.p2{ background:#8CCB9F; color:#06210f; border-color:transparent; }
.grp-pip.p1{ background:#E7B43C; color:#231400; border-color:transparent; }
.grp-pip.p0{ background:var(--no); color:#FFFDF6; border-color:transparent; }
.grp-need{ margin-left:9px; font:700 13px var(--mono,monospace); color:var(--muted-2); vertical-align:middle; }
.grp-need.hit{ color:var(--go); }
.grp-status{ margin-top:12px; padding:9px 12px; border-radius:10px; font-weight:600; font-size:14px; }
.grp-status.good{ background:rgba(47,125,79,.12); color:var(--go); }
.grp-status.bad{ background:rgba(200,50,60,.10); color:var(--no); }

.geo-pick-ring{ fill:none; stroke:var(--brand); }
.rev-row.geo-rank{ display:flex; align-items:center; gap:10px; }
.rev-row.geo-rank .rk{ flex:none; width:26px; font:700 13px var(--mono,monospace); color:var(--muted-2); }
.rev-row.geo-rank .nm{ flex:1; min-width:0; }
.rev-row.geo-rank .val{ flex:none; font:600 13px var(--mono,monospace); color:var(--muted); }
.rev-row.geo-rank.best .rk{ color:var(--go); }
.rev-row.geo-rank.pick{ background:rgba(91,141,239,.12); border-radius:8px; padding:6px 8px; }
.rev-row.geo-rank.pick .nm{ color:var(--text); font-weight:600; }

/* "Other Games" navigation card — subtly set apart from playable games */
.game-card.other-card{ border-style:dashed; background:transparent; }
.game-card.other-card .game-card-name{ color:var(--muted); }

/* guest accounts */
.over-guest{ margin-top:8px; font-size:13.5px; color:var(--muted); }
.over-guest .link-btn{ font-size:13.5px; padding:0; }
.auth-form .link-btn{ align-self:center; color:var(--muted); }
.user-bar .link-btn + .link-btn{ margin-left:-4px; }

/* ============================================================================
   STAMPED THEME — passport, boarding-pass tickets, rubber-stamp verdicts.
   Visual layer only: every rule below restyles existing markup or the new
   menu / passport / ranks screens. Game logic is untouched.
   ============================================================================ */
h1,h2,h3{ font-weight:inherit; }

/* ---- headline type ---- */
.wordmark{ font-family:var(--display); font-weight:400; color:var(--navy); letter-spacing:.01em;
  font-size:clamp(40px,11vw,60px); line-height:1; transform:rotate(-2deg); }
.brand-row{ display:flex; align-items:center; gap:10px; }
.tagline{ color:var(--muted); font-size:15px; margin-top:8px; }
.prompt h2{ font-weight:800; letter-spacing:-.01em; color:var(--text); }
.prompt h2 .hi{ color:var(--cta); }
.pts-earned, .over-num .b, .nf-over-big, .board-title, .auth-title, .brief-title, .nf-country{
  font-family:var(--display); font-weight:400; letter-spacing:.01em; color:var(--navy); }
.pts-earned{ font-size:48px; }
.over-num .b{ font-size:40px; }
.eyebrow, .hud-label, .menu-lbl, .brief-lbl, .nf-ask{ font-family:var(--stamp); letter-spacing:.14em; font-size:10.5px; color:var(--muted-2); }
.menu-lbl{ font-size:11px; }

/* ---- rubber-stamp verdicts (Correct / Wrong / Run over…) ---- */
.verdict{ display:inline-block; font-family:var(--stamp); font-weight:400; font-size:13px; letter-spacing:.12em;
  padding:6px 11px 5px; border:3px solid currentColor; border-radius:8px; transform:rotate(-4deg);
  background:rgba(255,253,246,.6); mix-blend-mode:multiply; }
.verdict.good{ color:var(--go); }
.verdict.bad{ color:var(--no); }
.verdict.meh{ color:#B07A0C; }
@keyframes thunk{ 0%{ transform:rotate(-4deg) scale(1.9); opacity:0 } 55%{ transform:rotate(-4deg) scale(.94); opacity:1 } 100%{ transform:rotate(-4deg) scale(1) } }
.overlay.show .verdict{ animation:thunk .32s cubic-bezier(.2,.9,.25,1.2) both; }

/* ---- cards (briefing, reveal, game over) = a passport page ---- */
.card{ background-color:var(--panel);
  background-image:repeating-linear-gradient(115deg, transparent 0 5px, rgba(42,79,176,.045) 5px 6px);
  border:1px solid var(--line); box-shadow:0 10px 0 -3px var(--navy), 0 26px 40px -24px rgba(23,42,68,.55); }
.rev-row{ background:var(--panel-2); border:1px solid #E7E1CF; }
.rev-row .val, .rev-row .pos{ color:var(--muted); }
.brief-cat{ background:var(--panel-2); }

/* ---- HUD + clock ---- */
.hud{ border-bottom:1.5px dashed var(--line); background:rgba(255,253,246,.55); }
.clock .track{ stroke:var(--panel-3); }
.actionbar{ border-top:1.5px dashed var(--line); background:rgba(255,253,246,.55); }

/* ---- chips & options feel like paper tags ---- */
.chip, .optbtn, .geo-optbtn{ background:var(--panel); border-color:#DCD6C3; box-shadow:0 2px 0 #E2DCCA; }
.chip:hover, .optbtn:hover, .geo-optbtn:hover{ background:var(--panel-2); }
.slot{ border-color:#BFC8BB; }
.drag-ghost{ background:var(--panel); }
.geo-mapbox, .geo-revmap{ border:3px solid var(--navy); box-shadow:0 6px 0 -2px var(--navy-2); }

/* ---- forms ---- */
.field-inp, .nf-input{ background:var(--panel); border:1.5px solid #CFD6CB; }
.auth-tab{ background:var(--panel); }

/* ---- passport data page (home + passport screen) ---- */
.passport{ width:100%; background:var(--navy); border-radius:16px; padding:10px;
  box-shadow:0 10px 0 -4px var(--navy-2), 0 18px 30px -18px rgba(23,42,68,.6); text-align:left; }
.pp-page{ position:relative; overflow:hidden; border-radius:10px; padding:14px 14px 12px;
  background-color:#F7F5EC; background-image:repeating-linear-gradient(115deg, transparent 0 5px, rgba(42,79,176,.05) 5px 6px);
  display:flex; flex-direction:column; gap:10px; }
.pp-head{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.pp-kind{ font-family:var(--stamp); font-size:10px; letter-spacing:.14em; color:var(--navy); }
.pp-no{ font-family:var(--mono); font-size:12.5px; color:var(--muted); }
.pp-body{ display:flex; gap:12px; align-items:stretch; }
.pp-photo{ flex:none; width:84px; height:100px; border-radius:6px; background:#DFE8F4; border:1.5px solid #B9C6D8;
  display:flex; align-items:flex-end; justify-content:center; overflow:hidden; }
.pp-fields{ flex:1; min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; margin:0; }
.pp-fields dt{ font-size:9.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted-2); }
.pp-fields dd{ margin:0; font-family:var(--mono); font-weight:700; font-size:14px; overflow-wrap:anywhere; }
.pp-mrz{ font-family:var(--mono); font-size:11.5px; letter-spacing:.12em; color:#3B4456; white-space:nowrap; overflow:hidden; }
.pp-stamp{ position:absolute; left:22px; top:100px; transform:rotate(-14deg); border:2.5px solid var(--cta); color:var(--cta);
  border-radius:6px; padding:3px 8px; font-family:var(--stamp); font-size:10px; letter-spacing:.1em; opacity:.85;
  background:rgba(247,245,236,.6); pointer-events:none; }
.pp-stamp.ok{ border-color:var(--go); color:var(--go); }
.pp-actions{ display:flex; flex-wrap:wrap; gap:4px 14px; }
.pp-actions .link-btn{ font-weight:700; font-size:13.5px; padding:2px 0; }

/* ---- boarding-pass tickets (game list) ---- */
.game-list{ gap:12px; }
.ticket{ --tk:var(--navy); display:flex; width:100%; text-align:left; background:var(--panel); border-radius:14px; overflow:hidden;
  box-shadow:0 1px 0 #D6E3DA, 0 12px 24px -18px rgba(29,36,51,.5); position:relative; }
.ticket::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--tk); }
.tk-main{ flex:1; min-width:0; padding:13px 14px 12px 20px; display:flex; flex-direction:column; gap:4px; }
.tk-top{ display:flex; justify-content:space-between; gap:8px; font-family:var(--mono); font-size:11.5px; color:var(--muted); }
.tk-name{ font-family:var(--display); font-size:24px; line-height:1.05; color:var(--tk); }
.tk-blurb{ font-size:13.5px; line-height:1.45; color:var(--muted); }
.tk-actions{ margin-top:4px; display:flex; gap:14px; align-items:center; }
.tk-actions .link-btn{ font-weight:700; font-size:13.5px; padding:2px 0; }
.tk-note{ font-size:12.5px; color:var(--muted-2); }
.tk-perf{ width:0; border-left:2px dashed #CDD8CF; margin:10px 0; }
.tk-stub{ flex:none; width:92px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  background:var(--tk); color:#FFFDF6; font-weight:800; font-size:15.5px; transition:filter .15s; }
.tk-stub:hover{ filter:brightness(1.1); }
.tk-stub svg{ width:24px; height:24px; }
.ticket.connect{ background:transparent; box-shadow:none; border:2px dashed #B9C4B7; }
.ticket.connect::before{ display:none; }

/* ---- tab bar (Home / Passport / Ranks) ---- */
.tabbar{ display:none; flex:none; gap:6px; padding:8px max(12px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-right));
  background:rgba(237,243,238,.94); border-top:1.5px dashed var(--line); justify-content:center; }
.tabbar.show{ display:flex; }
.tab{ flex:1; max-width:150px; display:flex; flex-direction:column; align-items:center; gap:3px; padding:9px 0 7px;
  border-radius:12px 12px 4px 4px; background:var(--panel); color:var(--navy); font-weight:800; font-size:12px; }
.tab svg{ width:20px; height:20px; }
.tab.on{ background:var(--navy); color:#F6F3E8; }

/* ---- passport screen: stamp pages ---- */
.stamp-pages{ width:100%; margin-top:22px; text-align:left; background:var(--navy); border-radius:14px; padding:10px; }
.sp-tabs{ display:flex; gap:6px; overflow-x:auto; padding:2px 2px 8px; }
.sp-tab{ flex:none; padding:7px 11px; border-radius:9px 9px 3px 3px; font-weight:800; font-size:12.5px; color:#F6F3E8; background:rgba(246,243,232,.12); }
.sp-tab.on{ background:#F7F5EC; color:var(--navy); }
.sp-page{ background-color:#F7F5EC; background-image:repeating-radial-gradient(circle at 100% 0%, transparent 0 11px, rgba(47,125,79,.06) 11px 12px);
  border-radius:10px; padding:16px 14px; display:flex; flex-direction:column; gap:14px; }
.sp-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.sp-slot{ aspect-ratio:1; border-radius:50%; border:2.5px dashed #C4CDC0; display:grid; place-items:center;
  font-family:var(--stamp); font-size:9px; color:#A9B3A5; }
.sp-slot:nth-child(3n+2){ border-radius:8px; }
.sp-slot:nth-child(4n+3){ transform:rotate(-8deg); }
.sp-note{ font-size:14px; line-height:1.5; color:var(--muted); }
.sp-note b{ color:var(--text); }

/* ---- ranks screen ---- */
.rank-list{ width:100%; display:flex; flex-direction:column; gap:8px; }
.rank-pick{ display:flex; align-items:center; gap:12px; width:100%; padding:12px 14px; border-radius:12px; text-align:left;
  background:var(--panel); box-shadow:0 1px 0 #D6E3DA; }
.rank-pick:hover{ background:var(--panel-2); }
.rank-mono{ flex:none; width:38px; height:38px; border-radius:9px; display:grid; place-items:center; color:#FFFDF6;
  font-family:var(--stamp); font-size:14px; }
.rank-name{ flex:1; min-width:0; font-weight:800; font-size:15.5px; }
.rank-go{ font-size:13px; font-weight:700; color:var(--brand); }

/* ---- leaderboard ---- */
.board-row{ background:var(--panel); border-color:#E2DCCA; }
.board-row.you{ border:2px solid var(--brand); background:rgba(42,79,176,.06); }
.board-rank{ font-family:var(--mono); color:var(--muted); }
.board-row:nth-child(1) .board-rank{ color:var(--gold); }
.board-row:nth-child(-n+3) .board-rank{ font-family:var(--stamp); font-size:12px; }
.board-score{ font-family:var(--mono); }

/* ---- mascot ---- */
.pigeon{ display:inline-block; line-height:0; flex:none; }
.pigeon svg{ width:100%; height:100%; display:block; }
.menu-foot{ margin-top:18px; display:flex; align-items:flex-end; gap:10px; align-self:stretch; justify-content:center; }

@media(prefers-reduced-motion:reduce){ .overlay.show .verdict{ animation:none; } }
.clock-pts{ white-space:nowrap; font-size:10px; letter-spacing:.04em; }
/* map text is a picture, not copy: no selection highlight when dragging the map */
.geo-map, .geo-map text{ user-select:none; -webkit-user-select:none; }
.geo-labels text{ paint-order:stroke; stroke-linejoin:round; font-family:"Figtree",system-ui,sans-serif; }

/* ============================================================================
   TODAY'S FLIGHT — boarding pass on Home, the flight screen, and landing
   ============================================================================ */
.flight-slot{ width:100%; display:flex; flex-direction:column; gap:10px; text-align:left; }
.flight-slot .menu-lbl{ margin:22px 0 2px; }
.bp{ display:flex; width:100%; background:var(--panel); border-radius:14px; overflow:hidden; position:relative;
  box-shadow:0 1px 0 #D6E3DA, 0 14px 26px -16px rgba(29,36,51,.55); border:2px solid var(--cta); }
.bp.landed{ border-color:var(--go); }
.bp-loading, .bp-none{ display:block; padding:14px 16px; font-size:14px; color:var(--muted); border:2px dashed #C4CDC0; box-shadow:none; }
.bp-none b{ color:var(--text); }
.bp-main{ flex:1; min-width:0; padding:13px 14px 14px 18px; display:flex; flex-direction:column; gap:6px; }
.bp-route{ display:flex; align-items:center; gap:10px; color:var(--muted); }
.bp-from{ font-family:var(--stamp); font-size:13px; }
.bp-to{ font-family:var(--display); font-size:clamp(26px,7vw,36px); line-height:1; color:var(--cta); min-width:0; overflow-wrap:anywhere; }
.bp.landed .bp-to{ color:var(--go); }
.bp-stub{ flex:none; width:96px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  background:var(--cta); color:#FFFDF6; font-weight:800; font-size:16px; }
.bp.landed .bp-stub{ background:var(--go); }
.bp-stub svg{ width:26px; height:26px; }
.missed{ display:flex; flex-direction:column; gap:6px; }
.missed-row{ display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:12px; background:var(--panel); border:1.5px dashed #C4CDC0; text-align:left; }
.missed-date{ font-family:var(--mono); font-size:13px; color:var(--muted); width:96px; flex:none; }
.missed-c{ flex:1; min-width:0; font-weight:800; }
.missed-go{ font-size:13px; font-weight:800; color:var(--cta); }

#screen-flight{ overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; position:relative; }
.fl-wrap{ width:100%; max-width:760px; margin:0 auto; padding:14px 18px calc(24px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:14px; min-height:100%; }
.fl-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.fl-title{ display:flex; flex-direction:column; align-items:center; min-width:0; }
.fl-country{ font-family:var(--display); font-size:26px; line-height:1; color:var(--cta); }
.fl-no{ font-family:var(--mono); font-size:12px; color:var(--muted); }
.fl-clock{ position:relative; width:46px; height:46px; flex:none; }
.fl-top-pad{ width:46px; flex:none; }
.fl-clock svg{ width:100%; height:100%; transform:rotate(-90deg); }
.fl-clock-track{ fill:none; stroke:var(--panel-3); stroke-width:4; }
.fl-clock-bar{ fill:none; stroke:var(--go); stroke-width:4; stroke-linecap:round; stroke-dasharray:119.4; }
.fl-clock-sec{ position:absolute; inset:0; display:grid; place-items:center; font-weight:800; font-size:14px; }
.fl-marks{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.fl-mark{ width:44px; height:32px; border-radius:8px; border:2px dashed #B7C6BB; display:grid; place-items:center;
  font-weight:800; font-size:12px; color:#8A978D; }
.fl-mark.cur{ border-color:var(--navy); color:var(--navy); }
.fl-mark.ok{ border:2.5px solid var(--go); color:var(--go); font-family:var(--stamp); font-size:9px; transform:rotate(-5deg); }
.fl-mark.no{ border:2.5px solid var(--no); color:var(--no); transform:rotate(4deg); }
.fl-marks.big .fl-mark{ width:52px; height:40px; }
.fl-marks.big:has(li:nth-child(7)){ max-width:340px; margin:0 auto; }
.fl-marks:not(.big):has(li:nth-child(7)) .fl-mark{ width:30px; height:28px; font-size:10px; }
.fl-marks:not(.big):has(li:nth-child(7)){ gap:5px; }
.fl-score{ text-align:center; font-size:13px; color:var(--muted); }
.fl-score b{ font-family:var(--mono); color:var(--text); font-size:15px; }
.fl-stage{ display:flex; justify-content:center; width:100%; }
.fl-stage.wide > *{ width:100%; }
.fl-bar{ margin-top:auto; padding-top:10px; }
.fl-leave{ background:rgba(200,50,60,.08); color:#8F2029; border-radius:10px; padding:8px 12px; font-size:14px; margin-bottom:10px; }
.nf-round{ width:100%; max-width:440px; display:flex; flex-direction:column; align-items:center; gap:14px; }
.nf-round .nf-flag .flag{ width:96px; height:auto; border-radius:8px; }

.fl-land{ width:100%; max-width:520px; margin:0 auto; padding:24px 18px calc(30px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; }
.fl-welcome{ margin:0; font-family:var(--display); font-weight:400; font-size:clamp(30px,8vw,42px); line-height:1.05; color:var(--navy); }
.fl-page{ position:relative; width:100%; min-height:270px; display:grid; place-items:center; border-radius:14px; padding:16px;
  background-color:#F7F5EC; background-image:repeating-linear-gradient(115deg, transparent 0 5px, rgba(42,79,176,.05) 5px 6px);
  box-shadow:inset 14px 0 18px -14px rgba(29,36,51,.35), 0 8px 0 -3px var(--navy); }
.fl-page .stamp-mark{ animation:stampin .42s cubic-bezier(.2,.9,.25,1.2) both; }
@keyframes stampin{ 0%{ transform:rotate(-9deg) scale(2.1); opacity:0 } 60%{ transform:rotate(-9deg) scale(.93); opacity:1 } 100%{ transform:rotate(-9deg) scale(1) } }
.fl-pigeon{ position:absolute; right:6px; bottom:0; }
.stamp-mark{ display:inline-block; line-height:0; }
.stamp-mark svg{ display:block; }
.fl-stats{ display:flex; gap:22px; justify-content:center; flex-wrap:wrap; }
.fl-stats div{ display:flex; flex-direction:column; }
.fl-stats b{ font-family:var(--display); font-weight:400; font-size:30px; color:var(--navy); line-height:1.1; }
.fl-stats span{ font-size:12.5px; color:var(--muted); }
.fl-note{ margin:0; font-size:14px; color:var(--muted); }
.fl-acts{ width:100%; display:flex; flex-direction:column; gap:10px; align-items:center; }
.fl-acts .btn-primary, .fl-acts .next-btn{ margin:0; width:100%; max-width:340px; }
.fl-sharetext{ white-space:pre-wrap; text-align:left; font-family:var(--mono); font-size:13px; background:var(--panel); padding:10px; border-radius:10px; user-select:all; }
@media(prefers-reduced-motion:reduce){ .fl-page .stamp-mark{ animation:none; } }
/* passport pages: real stamps */
button.sp-tab{ border:0; cursor:pointer; font-family:inherit; }
.sp-head{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; }
.sp-title{ margin:0; font-family:var(--display); font-weight:400; font-size:26px; color:var(--navy); }
.sp-count{ font-size:13px; color:var(--muted); }
.sp-page .sp-grid{ grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:10px 8px; }
.sp-cell{ display:flex; flex-direction:column; align-items:center; gap:3px; text-align:center; min-width:0; }
.sp-slot-wrap{ height:82px; display:grid; place-items:center; }
.sp-name{ font-size:12px; font-weight:700; color:var(--muted-2); line-height:1.2; overflow-wrap:anywhere; }
.sp-cell.has .sp-name{ color:var(--text); }
.sp-extra{ font-size:11px; color:var(--gold); font-weight:800; }
/* friend postcard on Home + share card preview */
.invite{ width:100%; background:#FBF8EE; border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:6px; text-align:left;
  border:4px solid transparent; border-image:repeating-linear-gradient(45deg,#C8323C 0 10px,#FBF8EE 10px 18px,#2A4FB0 18px 28px,#FBF8EE 28px 36px) 4; }
.invite-kicker{ font-family:var(--stamp); font-size:10px; letter-spacing:.14em; color:var(--cta); }
.invite-line{ margin:0; font-size:16px; line-height:1.4; }
.invite-sub{ margin:0; font-size:13.5px; color:var(--muted); }
.invite-acts{ display:flex; align-items:center; gap:14px; margin-top:4px; }
.invite-acts .btn-primary{ margin:0; }
.fl-preview{ width:100%; display:flex; flex-direction:column; align-items:center; gap:10px; }
.fl-card-img{ width:100%; max-width:340px; border-radius:10px; box-shadow:0 10px 24px -12px rgba(23,42,68,.6); }
/* passport: endorsements, progress, country pages */
.endorse, .honours{ width:100%; text-align:left; }
.honours{ margin-bottom:14px; }
.endorse .menu-lbl{ margin:22px 0 8px; }
.endorse-row{ display:flex; gap:14px; flex-wrap:wrap; }
.endorse-item{ display:flex; align-items:center; gap:10px; background:var(--panel); border-radius:12px; padding:8px 14px 8px 8px; font-size:13.5px; font-weight:700; max-width:100%; }
.sp-bar{ height:8px; border-radius:999px; background:#DFE6E0; overflow:hidden; }
.sp-bar span{ display:block; height:100%; background:var(--cta); border-radius:999px; min-width:4px; }
button.sp-cell{ border:0; background:none; padding:4px 2px; border-radius:10px; cursor:pointer; font-family:inherit; }
button.sp-cell:hover{ background:rgba(42,79,176,.06); }
.cp-head{ width:100%; display:flex; flex-direction:column; align-items:center; gap:6px; }
.cp-flag img.flag{ width:84px; height:auto; border-radius:6px; box-shadow:0 6px 16px rgba(29,36,51,.25); }
.cp-name{ margin:0; font-family:var(--display); font-weight:400; font-size:clamp(30px,8vw,42px); color:var(--navy); line-height:1.05; text-align:center; }
.cp-region{ font-family:var(--stamp); font-size:10px; letter-spacing:.14em; color:var(--muted); text-transform:uppercase; }
.cp-page{ width:100%; margin-top:16px; display:flex; flex-direction:column; align-items:center; gap:14px; padding:18px 14px; border-radius:14px;
  background-color:#F7F5EC; background-image:repeating-linear-gradient(115deg, transparent 0 5px, rgba(42,79,176,.05) 5px 6px);
  box-shadow:inset 14px 0 18px -14px rgba(29,36,51,.35), 0 8px 0 -3px var(--navy); text-align:center; }
.cp-stamp{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; justify-content:center; text-align:left; }
.cp-info{ display:flex; flex-direction:column; gap:3px; font-size:14px; color:var(--muted); }
.cp-info b{ color:var(--text); font-size:16px; }
/* weekly boards: ticket line + ranks screen */
.tk-extra{ display:flex; flex-direction:column; gap:6px; margin-top:4px; }
.tk-week{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; font-size:12.5px; color:var(--muted); }
.tk-week img.flag{ width:20px; height:14px; }
.tk-week-you{ font-family:var(--stamp); font-size:9.5px; letter-spacing:.06em; color:var(--gold); border:1.5px solid currentColor; border-radius:5px; padding:2px 5px; }
.tk-week-left{ font-size:12px; color:var(--muted-2); }
.over-week{ margin-top:6px; font-weight:700; color:var(--navy); }
.rank-list{ gap:10px; }
.rk-tabs{ display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; }
.rk-tab{ flex:none; padding:8px 12px; border-radius:10px 10px 4px 4px; background:var(--panel); color:var(--navy); font-weight:800; font-size:13px; }
.rk-tab.on{ background:var(--navy); color:#F6F3E8; }
.rk-head{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; text-align:left; padding:4px 2px; }
.rk-title{ display:flex; align-items:center; gap:8px; font-family:var(--display); font-size:24px; color:var(--navy); line-height:1.1; }
.rk-title img.flag{ width:30px; height:21px; }
.rk-head .board-sub{ margin:0; text-align:left; line-height:1.45; }
.rk-you{ font-size:14px; background:rgba(168,117,11,.1); border:1.5px dashed var(--gold); border-radius:10px; padding:6px 10px; color:var(--text); }
.rk-you b{ font-family:var(--stamp); font-size:11px; letter-spacing:.06em; color:var(--gold); }
.rk-you.muted{ color:var(--muted); background:transparent; border-color:#C4CDC0; }
.rk-toggle{ display:flex; gap:4px; background:var(--panel-3); border-radius:999px; padding:3px; }
.rk-tg{ padding:5px 12px; border-radius:999px; font-size:12.5px; font-weight:700; color:var(--muted); }
.rk-tg.on{ background:var(--panel); color:var(--navy); box-shadow:0 1px 2px rgba(29,36,51,.15); }

/* ============================================================================
   HIGHER OR LOWER (round + mode) and PIN DROP
   ============================================================================ */
.hol{ width:100%; max-width:440px; display:flex; flex-direction:column; align-items:stretch; gap:10px; }
.hol-card{ position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; padding:16px 14px 18px; border-radius:16px;
  background:var(--panel); box-shadow:0 2px 0 #E2DCCA, 0 14px 26px -18px rgba(29,36,51,.5); text-align:center; overflow:hidden; }
.hol-card img.flag{ width:64px; height:auto; border-radius:5px; box-shadow:0 0 0 1px rgba(29,36,51,.15); }
.hol-name{ font-family:var(--display); font-size:26px; line-height:1.05; color:var(--navy); }
.hol-val{ font-family:var(--mono); font-weight:700; font-size:22px; color:var(--text); }
.hol-card.hidden .hol-val{ color:var(--muted-2); font-size:30px; }
.hol-card.ok{ box-shadow:0 0 0 3px var(--go), 0 14px 26px -18px rgba(29,36,51,.5); }
.hol-card.bad{ box-shadow:0 0 0 3px var(--no), 0 14px 26px -18px rgba(29,36,51,.5); }
.hol-vs{ align-self:center; font-family:var(--stamp); font-size:10px; letter-spacing:.14em; color:var(--muted); text-transform:uppercase;
  background:var(--ink); padding:4px 10px; border-radius:999px; margin:-18px 0; z-index:1; border:1.5px dashed var(--line); }
.hol-btns{ display:grid; grid-template-columns:1fr 1fr; gap:10px; width:100%; max-width:440px; }
.hol-btn{ min-height:58px; border-radius:14px; font-weight:800; font-size:18px; color:#FFFDF6; }
.hol-btn.more{ background:var(--go); box-shadow:0 5px 0 #1F5A37; }
.hol-btn.less{ background:var(--cta); box-shadow:0 5px 0 #8F2029; }
.hol-btn:disabled{ opacity:.45; cursor:default; }
.hol-btn:active:not(:disabled){ transform:translateY(2px); }

#screen-hol{ overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; position:relative; }
.holm{ width:100%; max-width:480px; margin:0 auto; padding:16px 18px calc(28px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; align-items:center; gap:14px; }
.holm-stats{ display:flex; gap:14px; font-size:13px; color:var(--muted); }
.holm-stats b{ font-family:var(--display); font-weight:400; font-size:22px; color:var(--cta); }
.holm-stat{ display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; }
.holm-stat h2{ margin:0; font-family:var(--display); font-weight:400; font-size:clamp(28px,8vw,38px); color:var(--navy); line-height:1.05; }
.holm-stat .src{ font-size:11.5px; color:var(--muted-2); }
.holm-cards{ width:100%; display:flex; flex-direction:column; gap:12px; transition:transform .26s ease, opacity .26s ease; }
.holm-cards.slide{ transform:translateY(-24px); opacity:0; }
.holm-clock{ position:absolute; left:0; right:0; bottom:0; height:5px; background:var(--panel-3); }
.holm-clock span{ display:block; height:100%; width:100%; background:var(--go); }
.holm-verdict{ font-family:var(--stamp); font-size:12px; letter-spacing:.1em; color:var(--no); border:2.5px solid currentColor; border-radius:7px; padding:4px 8px; transform:rotate(-4deg); margin-top:4px; }
.holm-q{ font-size:14px; color:var(--muted); text-align:center; }

.pin-box{ cursor:crosshair; }
.pin-hint{ margin:0; font-size:12.5px; color:var(--muted); text-align:center; }
@media(prefers-reduced-motion:reduce){ .holm-cards{ transition:none; } }

/* Name Someone — twists and country groups (step 8) */
.nf-twist{ display:inline-block; margin-top:10px; padding:4px 12px; border:2px solid var(--cta); border-radius:4px;
  color:var(--cta); font-family:var(--stamp); font-size:11px; letter-spacing:.12em; text-transform:uppercase; transform:rotate(-1.5deg); }
.nf-twist[hidden]{ display:none; }
.nf-flag.multi{ display:flex; justify-content:center; gap:10px; }
.nf-flag.multi .flag{ width:64px; }
.nf-country.group{ font-size:26px; }

/* Challenges — async 1v1 (step 9) */
.dl-home{ margin-top:6px; }
.dl-new{ display:flex; flex-direction:column; align-items:flex-start; gap:3px; width:100%; padding:14px 16px; text-align:left; cursor:pointer;
  background:var(--panel); border:2px dashed var(--navy); border-radius:12px; color:var(--navy); font:inherit; }
.dl-new:hover{ border-style:solid; }
.dl-new-t{ font-family:'Bagel Fat One', var(--display, sans-serif); font-size:20px; letter-spacing:.01em; }
.dl-new-t::before{ content:"⚔ "; color:var(--cta); }
.dl-new-s{ font-size:13px; color:var(--muted); }
.dl-list{ margin-top:8px; }
.dl-st{ font-family:var(--stamp); text-transform:uppercase; letter-spacing:.1em; font-size:10.5px; }
.dl-st.won{ color:var(--go); } .dl-st.lost{ color:var(--cta); } .dl-st.waiting{ color:var(--gold); }
.fl-land.duel .fl-pigeon{ position:static; display:block; margin:6px auto 0; }
.fl-welcome.won{ color:var(--go); } .fl-welcome.lost{ color:var(--cta); }
.dl-card{ margin:14px auto 0; max-width:420px; background:var(--panel); border:1.5px solid rgba(35,57,91,.18); border-radius:14px; padding:16px 18px; }
.dl-beat{ display:flex; align-items:baseline; justify-content:center; gap:8px; color:var(--navy); }
.dl-beat span{ font-family:var(--stamp); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.dl-beat b{ font-family:'Bagel Fat One', sans-serif; font-size:44px; font-weight:400; color:var(--cta); }
.dl-beat small{ color:var(--muted); }
.dl-rounds{ margin:10px 0 4px; padding:0; list-style:none; counter-reset:r; display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:14px; color:var(--navy); }
.dl-rounds li{ counter-increment:r; }
.dl-rounds li::before{ content:counter(r) " · "; font-family:var(--stamp); color:var(--muted); font-size:12px; }
.dl-h2h{ margin:14px auto 0; max-width:420px; background:var(--panel); border:1.5px solid rgba(35,57,91,.18); border-radius:14px; overflow:hidden; }
.dl-row{ display:grid; grid-template-columns:1fr 64px 64px; padding:9px 14px; border-top:1px dashed rgba(35,57,91,.15); font-size:15px; color:var(--navy); }
.dl-row:first-child{ border-top:0; }
.dl-row span:not(:first-child){ text-align:right; font-variant-numeric:tabular-nums; }
.dl-row.head{ font-family:var(--stamp); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.dl-row.head span:nth-child(3){ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dl-row.total{ font-weight:700; background:rgba(35,57,91,.05); border-top:1.5px solid rgba(35,57,91,.25); }
.dl-row .win{ color:var(--go); font-weight:700; }
.dl-more{ max-width:420px; margin:14px auto 0; }
.dl-other{ display:flex; justify-content:space-between; padding:6px 4px; border-bottom:1px dashed rgba(35,57,91,.15); color:var(--navy); }
.dl-share{ display:flex; flex-direction:column; align-items:stretch; gap:6px; }
.dl-share code{ word-break:break-all; font-size:12px; }
.next-btn.ghost{ background:transparent; color:var(--navy); box-shadow:none; border:1.5px solid rgba(35,57,91,.3); }
.fl-acts .dl-share{ width:100%; max-width:340px; }
.fl-acts .dl-share .btn-primary{ max-width:none; }
.dl-row span:first-child{ text-align:left; }

/* ============================================================================
   HOME AS A PASSPORT — cover, then the first spread (left: today, right: play).
   Phones stack the two pages with the binding stitched across.
   ============================================================================ */
#screen-menu{ padding:28px 16px calc(40px + env(safe-area-inset-bottom)); }
.book{ position:relative; width:100%; max-width:1080px; margin:0 auto; }

/* ---- cover ---- */
.cover{ position:relative; z-index:3; width:min(440px,100%); min-height:min(620px,82dvh); margin:0 auto;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; cursor:pointer;
  padding:40px 28px; border-radius:10px 22px 22px 10px; color:#E2C26E; text-align:center;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.07), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 2px, transparent 2px 5px),
    var(--navy);
  box-shadow: inset 10px 0 18px -10px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.05), 0 24px 50px -18px rgba(23,42,68,.7);
  transform-origin:left center; transition:transform .95s cubic-bezier(.6,.05,.3,1), opacity .95s ease; }
.cover::before{ content:""; position:absolute; left:14px; top:0; bottom:0; width:2px; background:rgba(0,0,0,.22); box-shadow:2px 0 0 rgba(255,255,255,.05); }
.cv-kicker{ font-family:var(--stamp); font-size:10px; letter-spacing:.24em; opacity:.85; }
.cv-title{ font-family:var(--display); font-weight:400; font-size:clamp(56px,15vw,82px); line-height:1; letter-spacing:.02em;
  color:#E8C976; text-shadow:0 1px 0 rgba(0,0,0,.35), 0 -1px 0 rgba(255,236,170,.25); }
.cv-emblem{ width:200px; height:200px; border-radius:50%; display:grid; place-items:center; position:relative;
  background:radial-gradient(circle, #F4EBD2 0 58%, transparent 59%), conic-gradient(from 0deg, #C9A24A, #F1D98E, #B88A2E, #F1D98E, #C9A24A);
  box-shadow:0 0 0 3px #23395B, 0 0 0 5px #D8B762, 0 10px 24px rgba(0,0,0,.35); }
.cv-emblem::after{ content:""; position:absolute; inset:16px; border-radius:50%; border:1.5px dashed rgba(35,57,91,.45); }
.cv-chip{ width:42px; height:28px; border:2px solid #D8B762; border-radius:6px; position:relative; opacity:.9; }
.cv-chip::before{ content:""; position:absolute; inset:5px 7px; border:1.5px solid #D8B762; border-radius:50%; }
.cv-hint{ font-family:var(--stamp); font-size:10px; letter-spacing:.2em; opacity:.7; animation:cvpulse 1.6s ease-in-out infinite; }
@keyframes cvpulse{ 50%{ opacity:.25 } }

.book.closed .spread{ display:none; }
.book.opening{ perspective:2200px; }
.book.opening .cover{ transform:rotateY(-105deg); opacity:0; }
.book.opening .spread{ display:flex; position:absolute; inset:0 0 auto 0; animation:spreadin .95s ease both; }
@keyframes spreadin{ from{ opacity:0; transform:scale(.96) } to{ opacity:1; transform:none } }
.book.open .spread{ animation:spreadin .5s ease both; }
.book.open.opened-before .spread{ animation:none; }
@media (prefers-reduced-motion: reduce){ .cover, .book .spread{ transition:none !important; animation:none !important; } }

/* ---- the open spread ---- */
.spread{ position:relative; display:flex; align-items:stretch; padding:10px; border-radius:20px;
  background:var(--navy); box-shadow:0 26px 60px -24px rgba(23,42,68,.6); }
.page{ position:relative; flex:1 1 0; min-width:0; padding:30px 30px 34px; text-align:left;
  background-color:#F5F8F1;
  background-image:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 13px, rgba(47,125,79,.06) 13px 14px),
    repeating-radial-gradient(circle at 0% 0%, transparent 0 19px, rgba(42,79,176,.04) 19px 20px); }
.page-left{ border-radius:12px 3px 3px 12px; box-shadow:inset -22px 0 26px -22px rgba(23,42,68,.35); }
.page-right{ border-radius:3px 12px 12px 3px; box-shadow:inset 22px 0 26px -22px rgba(23,42,68,.35); }
.spine{ flex:0 0 2px; background:repeating-linear-gradient(to bottom, rgba(23,42,68,.55) 0 7px, transparent 7px 12px); margin:22px 0; }
.pg-no{ position:absolute; bottom:12px; font-family:var(--mono); font-size:12px; color:var(--muted-2); }
.page-left .pg-no{ left:18px; } .page-right .pg-no{ right:18px; }
.pg-lbl{ font-family:var(--stamp); font-size:10.5px; letter-spacing:.16em; color:var(--muted-2); margin:0 0 12px; text-transform:uppercase; }

/* ---- left: identity strip ---- */
.id-strip{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px 14px; padding-bottom:18px; margin-bottom:20px; border-bottom:1.5px dashed rgba(35,57,91,.2); }
.id-photo{ width:62px; height:72px; border-radius:6px; background:#E3EBE2; display:grid; place-items:center; overflow:hidden; box-shadow:inset 0 0 0 1px rgba(35,57,91,.15); }
.id-kind{ font-family:var(--mono); font-size:11px; color:var(--muted-2); letter-spacing:.04em; }
.id-name{ font-family:var(--display); font-size:24px; color:var(--navy); line-height:1.1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.id-status{ display:inline-block; margin-top:4px; font-family:var(--stamp); font-size:9px; letter-spacing:.14em; padding:2px 6px; border:1.5px solid currentColor; border-radius:3px; color:var(--gold); text-transform:uppercase; }
.id-status.official{ color:var(--go); }
.id-stats{ display:flex; gap:16px; text-align:right; }
.id-stats b{ display:block; font-family:var(--display); font-weight:400; font-size:22px; color:var(--navy); line-height:1; }
.id-stats span{ font-size:11px; color:var(--muted-2); }
.id-claim{ grid-column:1 / -1; justify-self:start; background:none; border:0; padding:0; font:inherit; font-size:13px; font-weight:600; color:var(--brand); cursor:pointer; }
.id-claim:hover{ text-decoration:underline; }

/* ---- left: today's flight as the visa ---- */
.visa{ --visa:#C8323C; position:relative; padding:20px 20px 18px; border-radius:14px; background:var(--panel);
  border:2.5px solid var(--visa); box-shadow:0 0 0 5px var(--panel), 0 0 0 6.5px color-mix(in srgb, var(--visa) 35%, transparent), 0 14px 30px -18px rgba(23,42,68,.45); }
.visa.loading, .visa.none{ --visa:#677184; }
.visa-kicker{ font-family:var(--stamp); font-size:10.5px; letter-spacing:.16em; color:var(--visa); }
.visa-wait{ margin-top:10px; color:var(--muted); }
.visa-body{ display:flex; align-items:center; gap:10px; }
.visa-txt{ flex:1; min-width:0; }
.visa-to{ margin-top:12px; font-family:var(--mono); font-size:12px; color:var(--muted-2); text-transform:uppercase; letter-spacing:.08em; }
.visa-country{ font-family:var(--display); font-size:clamp(34px,6vw,48px); line-height:1.02; color:var(--navy); overflow-wrap:anywhere; }
.visa-line{ margin-top:8px; color:var(--muted); font-size:14.5px; line-height:1.4; }
.visa-go{ margin-top:16px; width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:16px 18px; border:0; border-radius:12px; cursor:pointer;
  background:var(--visa); color:#FFFDF6; font:inherit; font-size:18px; font-weight:800; box-shadow:0 4px 0 color-mix(in srgb, var(--visa) 70%, #000); }
.visa-go:active{ transform:translateY(2px); box-shadow:0 2px 0 color-mix(in srgb, var(--visa) 70%, #000); }
.visa-go span{ display:inline-flex; width:22px; height:22px; }
.visa-go svg{ width:22px; height:22px; }

/* ---- left: waiting on you ---- */
.todo{ margin-top:26px; }
.todo .invite{ margin-bottom:10px; }
.todo-list{ display:flex; flex-direction:column; gap:8px; }
.todo-row{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; width:100%; padding:11px 14px; cursor:pointer; text-align:left;
  background:var(--panel); border:1.5px solid rgba(35,57,91,.14); border-left:5px solid var(--ti); border-radius:10px; font:inherit; color:var(--text); }
.todo-row:hover{ border-color:rgba(35,57,91,.3); border-left-color:var(--ti); }
.todo-kind{ font-family:var(--stamp); font-size:9px; letter-spacing:.12em; color:var(--ti); text-transform:uppercase; }
.todo-txt{ font-size:14.5px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.todo-go{ font-size:13px; font-weight:700; color:var(--brand); white-space:nowrap; }
.ink-gold{ --ti:var(--gold); } .ink-go{ --ti:var(--go); } .ink-cta{ --ti:var(--cta); } .ink-navy{ --ti:var(--navy); } .ink-muted{ --ti:#8A93A3; }
.todo-none{ color:var(--muted); font-size:14px; padding:12px 14px; border:1.5px dashed rgba(35,57,91,.2); border-radius:10px; }

/* ---- right: modes as visa stamps ---- */
.modes{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.mode{ --tk:var(--navy); position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-height:128px; padding:16px 16px 14px; cursor:pointer; text-align:left;
  background:var(--panel); border:2.5px solid var(--tk); border-radius:14px; font:inherit; color:var(--text);
  transform:rotate(var(--tilt,0deg)); transition:transform .15s ease, box-shadow .15s ease; box-shadow:0 8px 18px -14px rgba(23,42,68,.5); }
.mode::after{ content:""; position:absolute; inset:4px; border:1px dashed color-mix(in srgb, var(--tk) 45%, transparent); border-radius:10px; pointer-events:none; }
.mode:hover{ transform:rotate(0deg) translateY(-2px); box-shadow:0 14px 24px -14px rgba(23,42,68,.55); }
.mode.wide{ grid-column:1 / -1; min-height:0; }
.mode-name{ font-family:var(--display); font-size:24px; line-height:1.05; color:var(--tk); }
.mode-hook{ font-size:14px; color:var(--muted); line-height:1.35; }
.mode-week{ margin-top:auto; display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted-2); }
.mode-week .flag{ width:18px; height:auto; border-radius:2px; }
.mode-week .tk-week-you{ font-family:var(--stamp); font-size:9px; letter-spacing:.1em; color:var(--tk); }
.page-right .dl-new{ margin-top:18px; }
.packs-row{ margin-top:12px; width:100%; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; padding:12px 14px; cursor:pointer; text-align:left;
  background:transparent; border:1.5px solid rgba(35,57,91,.18); border-radius:10px; font:inherit; color:var(--text); }
.packs-row b{ font-weight:800; color:var(--gold); }
.packs-row span{ font-size:13.5px; color:var(--muted); }
.page-right .sources-note{ margin-top:18px; font-size:11.5px; color:var(--muted-2); line-height:1.45; }

/* ---- bookmarks poking out of the right edge ---- */
.bookmarks{ position:absolute; top:60px; right:0; transform:translateX(100%); display:flex; flex-direction:column; gap:8px; z-index:-1; }
.bm{ --bm:var(--cta); display:flex; flex-direction:column; align-items:flex-start; gap:1px; width:118px; padding:10px 10px 10px 18px; margin-left:-10px; cursor:pointer;
  background:var(--bm); color:#FFFDF6; border:0; border-radius:0 10px 10px 0; font:inherit; text-align:left; box-shadow:0 6px 12px -8px rgba(0,0,0,.5);
  transition:transform .15s ease; }
.bm:hover{ transform:translateX(6px); }
.bm b{ font-family:var(--display); font-weight:400; font-size:15.5px; line-height:1; }
.bm span{ font-size:10.5px; opacity:.85; line-height:1.2; }
@media (max-width:1240px) and (min-width:861px){ .book{ max-width:calc(100% - 96px); margin-left:0; margin-right:auto; } }

/* ---- phones and narrow windows: stack the pages, bookmarks along the top ---- */
@media (max-width:860px){
  #screen-menu{ padding:22px 12px calc(30px + env(safe-area-inset-bottom)); }
  .book{ padding-top:40px; }
  .book.closed{ padding-top:0; }
  .spread{ flex-direction:column; padding:8px; }
  .page{ padding:22px 18px 30px; }
  .page-left{ border-radius:12px 12px 3px 3px; box-shadow:inset 0 -22px 26px -22px rgba(23,42,68,.35); }
  .page-right{ border-radius:3px 3px 12px 12px; box-shadow:inset 0 22px 26px -22px rgba(23,42,68,.35); }
  .spine{ flex:0 0 2px; margin:0 18px; background:repeating-linear-gradient(to right, rgba(23,42,68,.55) 0 7px, transparent 7px 12px); }
  .bookmarks{ top:0; right:14px; transform:none; flex-direction:row; z-index:0; }
  .bm{ width:auto; margin:0; padding:9px 12px 16px; border-radius:10px 10px 0 0; align-items:center; }
  .bm:hover{ transform:translateY(-3px); }
  .bm span{ display:none; }
  .bm b{ font-size:15px; }
  .book.opening .spread{ inset:40px 0 auto 0; }
  .id-strip{ grid-template-columns:auto 1fr; }
  .id-stats{ grid-column:1 / -1; justify-content:flex-start; text-align:left; gap:22px; }
  .modes{ gap:10px; }
  .mode{ min-height:116px; padding:14px 13px 12px; }
  .mode-name{ font-size:20px; }
  .mode-hook{ font-size:13px; }
}
.cover[hidden]{ display:none; }
.latest{ margin-top:26px; }
.latest-row{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; background:none; border:0; padding:0; cursor:pointer; }
.latest-row svg{ display:block; }
.latest-all{ margin-top:6px; background:none; border:0; padding:0; font:inherit; font-size:13px; font-weight:700; color:var(--brand); cursor:pointer; }
.bm{ width:124px; }
@media (max-width:860px){
  .bookmarks{ top:auto; bottom:calc(100% - 10px); z-index:-1; }
  .bm{ padding:9px 14px 18px; }
  .todo-row{ grid-template-columns:1fr auto; grid-template-areas:"kind go" "txt txt"; row-gap:3px; }
  .todo-kind{ grid-area:kind; } .todo-go{ grid-area:go; }
  .todo-txt{ grid-area:txt; white-space:normal; }
}
/* Passport and Boards scroll inside their screen (they used to spill over the tab bar on phones) */
#screen-passport, #screen-ranks{ overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.tabbar{ position:relative; z-index:5; }

/* keyboard hints only where there is a keyboard */
@media (hover:none), (pointer:coarse){ .kbd-hint{ display:none !important; } }
.nf-clock{ position:relative; inset:auto; width:100%; max-width:420px; margin:6px auto 10px; }
.nf-clock.off{ display:none; }
.verdict.meh{ color:#B07A0C; }

/* ===== version picker: For fun vs Competitive ===== */
.vp-scrim{ position:fixed; inset:0; z-index:60; background:rgba(20,28,45,.42); display:flex; align-items:flex-end; justify-content:center;
  opacity:0; transition:opacity .18s ease; }
.vp-scrim.show{ opacity:1; }
.vp-card{ width:100%; max-width:480px; background:var(--panel); border-radius:20px 20px 0 0; padding:20px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -10px 40px rgba(0,0,0,.18); display:flex; flex-direction:column; gap:12px; transform:translateY(24px); transition:transform .22s cubic-bezier(.2,.9,.25,1); }
.vp-scrim.show .vp-card{ transform:none; }
@media (min-width:700px){ .vp-scrim{ align-items:center; } .vp-card{ border-radius:20px; } }
.vp-title{ font-family:var(--display); font-size:26px; color:var(--navy); padding:0 4px; }
.vp-opt{ --k:var(--go); display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; cursor:pointer;
  padding:14px 16px; border-radius:14px; background:var(--panel-2); border:2px solid color-mix(in srgb, var(--k) 35%, transparent); font:inherit; color:var(--text); }
.vp-opt:hover, .vp-opt:focus-visible{ border-color:var(--k); outline:none; background:var(--panel-3); }
.vp-opt.comp{ --k:var(--no); }
.vp-kind{ font-family:var(--stamp); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--k); }
.vp-name{ font-family:var(--display); font-size:22px; line-height:1.1; color:var(--k); }
.vp-sub{ font-size:14px; color:var(--muted); }
.vp-foot{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; margin-top:4px; }
.vp-foot img.flag{ width:22px; height:15px; border-radius:2px; }
.vp-cancel{ align-self:center; }
.over-slot{ margin:12px 0 4px; font-size:14px; line-height:1.4; }
.over-slot.good{ color:var(--go); font-weight:600; }
.over-slot.muted{ color:var(--muted); }
.over-slot.bad{ color:var(--no); }
.over-slot-sub{ font-size:12px; color:var(--muted-2); font-weight:400; margin-top:4px; }
.fun-land .over-slot{ text-align:center; max-width:420px; margin:14px auto 4px; }

/* ===== daily landing: how everyone did ===== */
.fl-how{ width:100%; max-width:420px; margin:18px auto 6px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px 14px 10px; }
.fl-how-h{ font-family:var(--stamp); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--navy); margin:0 0 6px; }
.fl-how-lead{ margin:0 0 10px; font-size:15px; }
.fl-how-lead b{ color:var(--go); font-size:17px; }
.fl-how-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.fl-how-row{ display:grid; grid-template-columns:22px 1fr 50px 74px; align-items:center; gap:8px; padding:7px 0; border-top:1px dashed var(--line); font-size:14px; }
.fl-how-t{ text-align:left; }
.fl-how-n{ font-family:var(--mono); color:var(--muted-2); font-size:12px; }
.fl-how-you{ font-family:var(--mono); font-weight:700; text-align:right; }
.fl-how-row.ok .fl-how-you{ color:var(--go); } .fl-how-row.no .fl-how-you{ color:var(--no); }
.fl-how-pct{ font-size:12px; color:var(--muted); text-align:right; }

/* Higher or Lower: tap the country with more */
button.hol-card{ font:inherit; color:inherit; border:0; width:100%; cursor:pointer; transition:transform .12s ease, box-shadow .12s ease; }
button.hol-card:hover:not(:disabled){ transform:translateY(-2px); box-shadow:0 0 0 2px var(--brand), 0 14px 26px -18px rgba(29,36,51,.5); }
button.hol-card:active:not(:disabled){ transform:translateY(1px); }
button.hol-card:disabled{ cursor:default; }
.holm-verdict.good{ color:var(--go); }
.hol-hint{ text-align:center; font-size:13px; color:var(--muted); margin:2px 0 0; }
.holm-stat h2 .hi{ color:var(--go); }

/* ===== this week's visas (left page) ===== */
.vz{ margin:16px 0 4px; }
.vz-left{ color:var(--muted-2); letter-spacing:.04em; text-transform:none; }
.vz-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.vz-card{ --tk:var(--navy); display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; cursor:pointer; font:inherit; color:var(--text);
  padding:10px 11px; border-radius:12px; background:var(--panel); border:2px dashed color-mix(in srgb, var(--tk) 45%, transparent); }
.vz-card:hover, .vz-card:focus-visible{ border-style:solid; border-color:var(--tk); outline:none; }
.vz-card.done{ border-style:solid; border-color:color-mix(in srgb, var(--tk) 30%, transparent); background:var(--panel-2); }
.vz-mode{ font-family:var(--stamp); font-size:9px; letter-spacing:.12em; text-transform:uppercase; color:var(--tk); }
.vz-country{ display:flex; align-items:center; gap:6px; font-size:16px; line-height:1.15; }
.vz-country img{ width:22px; height:15px; border-radius:2px; flex:none; }
.vz-status{ font-size:12px; color:var(--muted); }
.vz-card.done .vz-status{ color:var(--go); font-weight:600; }

/* ===== notable people: "Meet someone from…" ===== */
.nb-card{ display:flex; gap:14px; align-items:flex-start; text-align:left; margin:14px auto 0; max-width:440px; padding:14px; border-radius:14px;
  background:var(--panel); border:1px solid var(--line); box-shadow:0 10px 24px -20px rgba(29,36,51,.6); color:var(--text); }
.nb-photo{ flex:none; display:grid; place-items:center; border-radius:50%; overflow:hidden; background:var(--panel-3); box-shadow:0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.nb-photo img{ width:100%; height:100%; object-fit:cover; object-position:50% 20%; display:block; }
.nb-photo.none span{ font-family:var(--display); color:var(--navy); font-size:120%; }
.nb-photo.none{ font-size:28px; }
.nb-body{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.nb-kicker{ font-family:var(--stamp); font-size:9.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--brand); }
.nb-name{ font-family:var(--display); font-size:20px; line-height:1.1; color:var(--navy); }
.nb-meta{ font-size:12.5px; color:var(--muted); font-weight:600; }
.nb-desc{ font-size:13.5px; line-height:1.4; color:var(--text); }
.nb-more{ font-size:13px; font-weight:600; color:var(--brand); margin-top:2px; }
.nb-met{ width:100%; max-width:440px; margin:16px auto 0; text-align:left; }
.nb-met-lbl{ font-size:12.5px; color:var(--muted); margin-bottom:6px; }
.nb-strip{ display:flex; flex-wrap:wrap; gap:6px; }
.nb-chip{ display:inline-flex; align-items:center; gap:7px; padding:3px 10px 3px 3px; border-radius:999px; background:var(--panel); border:1px solid var(--line);
  font:inherit; font-size:13px; color:var(--text); cursor:pointer; text-decoration:none; }
.nb-chip:hover{ border-color:var(--brand); }
.nb-chip .nb-photo{ box-shadow:none; font-size:13px !important; }
.cp-met{ margin-top:22px; text-align:left; }
.cp-met-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:12px; margin-top:8px; }
.cp-person{ display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; text-decoration:none; color:var(--text); }
.cp-person b{ font-size:13px; line-height:1.2; }
.cp-person span{ font-size:11.5px; color:var(--muted); }
.nb-card a{ text-decoration:none; }
.nb-card a.nb-more{ text-decoration:underline; text-underline-offset:2px; }

/* ===== make a game (builder) ===== */
#screen-build{ overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.bd-wrap{ width:100%; max-width:640px; margin:0 auto; padding:18px 16px 110px; display:flex; flex-direction:column; gap:10px; text-align:left; }
.bd-title{ font-family:var(--display); font-size:34px; color:var(--navy); margin:4px 0 0; line-height:1.05; }
.bd-lead{ margin:0 0 6px; color:var(--muted); font-size:15px; }
.bd-step{ display:flex; align-items:center; gap:10px; margin-top:14px; font-weight:700; font-size:16px; }
.bd-step b{ display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--navy); color:#FFFDF6; font-size:13px; }
.bd-themes{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.bd-theme{ display:flex; align-items:center; gap:8px; padding:11px 12px; border-radius:12px; background:var(--panel); border:2px solid var(--line);
  font:inherit; font-size:14px; font-weight:600; color:var(--text); cursor:pointer; text-align:left; }
.bd-theme.on{ border-color:var(--brand); background:color-mix(in srgb, var(--brand) 8%, var(--panel)); color:var(--brand); }
.bd-ico{ font-size:18px; }
.bd-catline{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:13px; color:var(--muted); }
.bd-cats{ display:flex; flex-wrap:wrap; gap:6px; }
.bd-cat{ padding:6px 11px; border-radius:999px; background:var(--panel); border:1.5px solid var(--line); font:inherit; font-size:13px; color:var(--text); cursor:pointer; }
.bd-cat.on{ background:var(--brand); border-color:var(--brand); color:#FFFDF6; }
.bd-rounds{ display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:8px; }
.bd-round{ display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:12px; background:var(--panel); border:2px solid var(--line);
  font:inherit; text-align:left; cursor:pointer; color:var(--text); }
.bd-round.on{ border-color:var(--go); background:color-mix(in srgb, var(--go) 7%, var(--panel)); }
.bd-round.on .bd-rn::before{ content:"✓ "; color:var(--go); }
.bd-round.dead{ border-style:dashed; opacity:.7; }
.bd-round.dead .bd-rh{ color:var(--no); }
.bd-rn{ font-weight:700; font-size:14px; }
.bd-rh{ font-size:12px; color:var(--muted); }
.bd-more{ align-self:flex-start; font-size:13px; }
.bd-lens{ display:flex; gap:8px; }
.bd-len{ flex:1; padding:11px 0; border-radius:12px; background:var(--panel); border:2px solid var(--line); font:inherit; font-weight:700; cursor:pointer; color:var(--text); }
.bd-len.on{ border-color:var(--navy); background:var(--navy); color:#FFFDF6; }
.bd-summary{ margin-top:16px; padding:12px 14px; border-radius:12px; background:var(--panel-2); display:flex; flex-direction:column; gap:2px; }
.bd-summary b{ font-family:var(--display); font-size:20px; color:var(--navy); font-weight:400; }
.bd-summary span{ font-size:13px; color:var(--muted); }
.bd-acts{ margin-top:6px; }
.bd-acts button:disabled{ opacity:.45; cursor:default; }
.bd-foot{ font-size:12px; color:var(--muted-2); text-align:center; margin:6px 0 0; }
.dl-title{ font-family:var(--display); font-size:18px; color:var(--navy); text-align:center; margin-bottom:6px; }

/* ===== first-time tour ===== */
.id-links{ grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:6px 16px; align-items:center; }
.id-help{ background:none; border:0; padding:0; font:inherit; font-size:13px; color:var(--muted); text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.tour{ position:fixed; inset:0; z-index:80; opacity:0; transition:opacity .2s ease; }
.tour.show{ opacity:1; }
.tour.center{ background:rgba(20,28,45,.55); display:flex; align-items:center; justify-content:center; padding:16px; }
.tour-hole{ position:fixed; border-radius:16px; box-shadow:0 0 0 9999px rgba(20,28,45,.58); pointer-events:none;
  outline:3px solid #FFD66B; outline-offset:2px; transition:left .3s ease, top .3s ease, width .3s ease, height .3s ease; }
.tour-card{ position:fixed; background:var(--panel); border-radius:18px; padding:16px; box-shadow:0 18px 40px -12px rgba(0,0,0,.45); color:var(--text);
  display:flex; flex-direction:column; gap:12px; transition:top .3s ease, bottom .3s ease, left .3s ease; }
.tour.center .tour-card{ position:relative; width:100%; max-width:400px; padding:22px 20px; }
.tour-head{ display:flex; gap:12px; align-items:flex-start; }
.tour.center .tour-head{ flex-direction:column; align-items:center; text-align:center; }
.tour-pigeon{ flex:none; }
.tour-title{ font-family:var(--display); font-size:21px; color:var(--navy); line-height:1.1; }
.tour.center .tour-title{ font-size:26px; }
.tour-body{ margin:4px 0 0; font-size:14.5px; line-height:1.45; color:var(--text); }
.tour-acts{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.tour-acts .next-btn{ width:auto; padding:10px 18px; margin:0; }
.tour.center .tour-acts{ flex-direction:column; }
.tour.center .tour-acts .btn-primary{ width:100%; }
.tour-dots{ display:flex; gap:5px; }
.tour-dots span{ width:7px; height:7px; border-radius:50%; background:var(--line); }
.tour-dots span.on{ background:var(--navy); }
.tour-name{ width:100%; font-size:17px; }
.tour-err{ color:var(--no); font-size:13px; min-height:0; }
.tour-err:empty{ display:none; }
@media (prefers-reduced-motion: reduce){ .tour, .tour-hole, .tour-card{ transition:none; } }

/* ===== passport + leaderboards as book spreads ===== */
.book-screen{ width:100%; max-width:1080px; margin:0 auto; padding:16px 16px 110px; }
@media (max-width:860px){ .book-screen{ padding:10px 10px 100px; } }
.pp-spread .page, .rk-spread .page{ padding-bottom:40px; }
.pp-spread .passport{ align-self:stretch; margin:0; }
.pp-stats{ display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin:14px 0 4px; }
.pp-stats div{ display:flex; flex-direction:column; align-items:center; padding:8px 4px; border-radius:10px; background:var(--panel-2); }
.pp-stats b{ font-family:var(--display); font-weight:400; font-size:22px; color:var(--navy); line-height:1.1; }
.pp-stats span{ font-size:11px; color:var(--muted); }
.pp-sec{ margin-top:20px; }
.pp-regions{ display:flex; flex-direction:column; gap:4px; }
.pp-region{ display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; gap:4px 10px; padding:9px 10px; border-radius:10px; border:1.5px solid transparent;
  background:none; font:inherit; color:var(--text); text-align:left; cursor:pointer; }
.pp-region:hover{ background:var(--panel-2); }
.pp-region.on{ border-color:var(--navy); background:var(--panel-2); }
.pp-rn{ font-weight:700; font-size:14.5px; }
.pp-seal{ color:var(--gold); font-weight:600; font-size:12px; }
.pp-rc{ font-family:var(--mono); font-size:12.5px; color:var(--muted); }
.pp-bar{ grid-column:1 / -1; height:5px; border-radius:3px; background:var(--panel-3); overflow:hidden; }
.pp-bar span{ display:block; height:100%; background:var(--cta); border-radius:3px; }
.pp-empty{ display:flex; flex-direction:column; align-items:center; gap:8px; margin:18px 0; text-align:center; }
.pp-todo-lbl{ margin-top:22px; }
.pp-todo{ display:flex; flex-wrap:wrap; gap:5px; }
.pp-chip{ display:inline-flex; align-items:center; gap:6px; padding:4px 9px 4px 5px; border-radius:999px; border:1px dashed #B7C6BB; background:none;
  font:inherit; font-size:12.5px; color:var(--muted); cursor:pointer; }
.pp-chip:hover{ border-style:solid; color:var(--text); }
.pp-chip img{ width:18px; height:12px; border-radius:2px; opacity:.75; }
.pp-spread .sp-grid{ grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); }
.pp-solo{ max-width:720px; margin:0 auto; }
.page-solo{ border-radius:12px; }
/* leaderboards */
.rk-h{ font-family:var(--display); font-weight:400; font-size:28px; color:var(--navy); margin:0 0 4px; line-height:1.1; }
.rk-lead{ margin:0 0 12px; font-size:13.5px; color:var(--muted); line-height:1.45; }
.rk-modes{ display:flex; flex-direction:column; gap:6px; }
.rk-m{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:12px; border:2px solid var(--line); background:var(--panel);
  font:inherit; color:var(--text); cursor:pointer; text-align:left; }
.rk-m.on{ border-color:var(--navy); background:var(--navy); color:#FFFDF6; }
.rk-m-n{ font-weight:700; }
.rk-m-you{ font-family:var(--mono); font-size:13px; opacity:.85; }
.rk-tiers{ display:flex; flex-wrap:wrap; gap:5px; }
.rk-tiers span{ padding:3px 9px; border-radius:999px; border:1.5px solid var(--gold); color:var(--gold); font-size:12px; font-weight:700; }
.rk-head{ display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.rk-podium{ display:grid; grid-template-columns:1fr 1fr 1fr; align-items:end; gap:8px; margin:6px 0 14px; }
.rk-pod{ display:flex; flex-direction:column; align-items:center; gap:2px; text-align:center; min-width:0; }
.rk-pod b{ font-size:13.5px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rk-pod .mono{ font-size:13px; color:var(--muted); }
.rk-medal{ font-size:26px; }
.rk-step{ width:100%; margin-top:6px; border-radius:10px 10px 4px 4px; background:var(--panel-3); font-family:var(--stamp); font-size:12px; color:var(--navy);
  display:grid; place-items:center; }
.rk-pod.p1 .rk-step{ height:74px; background:color-mix(in srgb, var(--gold) 28%, var(--panel)); }
.rk-pod.p2 .rk-step{ height:54px; }
.rk-pod.p3 .rk-step{ height:40px; }
.rk-pod.you b{ color:var(--brand); }
.rk-play{ margin-top:14px; width:100%; }
.rk-spread .board-row{ margin-bottom:6px; }
@media (max-width:860px){ .pp-stats b{ font-size:19px; } }
@media (max-width:860px){
  .rk-modes{ flex-direction:row; overflow-x:auto; gap:6px; padding-bottom:4px; scrollbar-width:none; }
  .rk-m{ flex:none; padding:9px 12px; gap:8px; }
  .rk-h{ font-size:24px; }
}

/* Closest City on wide screens: map and the four options side by side, all above the fold */
@media (min-width:900px) and (min-aspect-ratio:4/3){
  .geo-split{ display:grid; grid-template-columns:minmax(0, 1fr) 280px; align-items:center; gap:18px; max-width:1100px; margin:0 auto; }
  .geo-split .geo-mapbox{ aspect-ratio:auto; height:min(calc(100vh - 330px), 540px); min-height:300px; }
  .fl-wrap:has(.geo-split){ max-width:1100px; }
  #screen-play .geo-split .geo-mapbox{ height:min(calc(100vh - 400px), 520px); }
  .geo-split .geo-options{ grid-template-columns:1fr; }
}
.nf-pass{ display:block; margin:8px auto 0; font-size:13.5px; color:var(--muted); }

/* ===== live games ===== */
.lv .fl-welcome{ font-size:30px; }
.lv-share{ display:flex; flex-direction:column; align-items:center; gap:10px; margin:6px 0 4px; }
.lv-code{ font-family:var(--stamp); font-size:34px; letter-spacing:.22em; color:var(--navy); padding:6px 16px 6px 22px; border:3px dashed var(--navy); border-radius:12px; background:var(--panel); }
.lv-roster{ display:grid; grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)); gap:10px; width:100%; max-width:440px; margin:16px auto 6px; }
.lv-p{ display:flex; flex-direction:column; align-items:center; gap:2px; padding:10px 6px; border-radius:14px; background:var(--panel); border:2px solid var(--line); text-align:center; min-width:0;
  animation:lvin .3s ease both; }
.lv-p.me{ border-color:var(--brand); }
.lv-p b{ font-size:13px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lv-p span{ font-size:11px; color:var(--muted); min-height:14px; }
.lv-p.empty{ border-style:dashed; background:none; animation:none; }
.lv-p.empty b{ color:var(--muted-2); font-weight:500; }
.lv-seat{ display:grid; place-items:center; width:44px; height:44px; border-radius:50%; border:2px dashed var(--line); color:var(--muted-2); font-size:20px !important; }
@keyframes lvin{ from{ transform:scale(.8); opacity:0 } to{ transform:none; opacity:1 } }
.lv-limit{ display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px; margin:10px 0 4px; font-size:13px; color:var(--muted); }
.lv-limit > span{ margin-right:4px; font-weight:600; }
.lv-lim{ padding:6px 12px; border-radius:999px; border:1.5px solid var(--line); background:var(--panel); font:inherit; font-size:13px; font-weight:700; color:var(--text); cursor:pointer; }
.lv-lim.on{ background:var(--navy); border-color:var(--navy); color:#FFFDF6; }
.lv-lim:disabled{ cursor:default; }
.lv-lim:disabled:not(.on){ opacity:.55; }
.lv-wait{ margin-top:16px; padding-top:12px; border-top:1px dashed var(--line); }
.lv-wait-h{ font-weight:700; font-size:14px; color:var(--navy); margin-bottom:8px; }
.lv-scores{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.lv-scores li{ display:grid; grid-template-columns:22px 1fr auto 46px; gap:8px; align-items:center; padding:7px 10px; border-radius:10px; background:var(--panel-2); font-size:14px; }
.lv-scores li.me{ background:color-mix(in srgb, var(--brand) 10%, var(--panel)); }
.lv-scores li.gone{ opacity:.5; }
.lv-rk{ font-family:var(--mono); color:var(--muted-2); font-size:12px; }
.lv-nm{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lv-r{ font-family:var(--mono); font-size:12.5px; color:var(--go); }
.lv-scores b{ font-family:var(--mono); text-align:right; }
.lv-skip{ margin-top:8px; font-size:13px; }
.lv-podium{ width:100%; max-width:420px; margin:10px auto 8px; }
.fl-live-go{ margin-top:14px; font-family:var(--stamp); font-size:13px; letter-spacing:.14em; color:var(--brand); text-align:center; animation:pulse 1s ease infinite; }
@keyframes pulse{ 50%{ opacity:.4 } }
.fl-top-pad{ font-family:var(--mono); font-weight:800; font-size:16px; text-align:right; color:var(--navy); }
.fl-top-pad.low{ color:var(--no); }
.lv-podium{ display:flex; justify-content:center; }
.lv-podium .rk-pod{ flex:0 1 130px; }

/* ===== feedback button + sheet ===== */
.fb-btn{ position:fixed; left:14px; bottom:calc(14px + env(safe-area-inset-bottom)); z-index:50; display:flex; align-items:center; gap:6px; padding:8px 13px 8px 11px;
  border-radius:999px; border:1.5px solid var(--line); background:var(--panel); color:var(--navy); font:inherit; font-size:13px; font-weight:700; cursor:pointer;
  box-shadow:0 8px 20px -10px rgba(20,28,45,.5); }
.fb-btn:hover{ border-color:var(--brand); }
@media (max-width:860px){ .fb-btn{ bottom:calc(84px + env(safe-area-inset-bottom)); left:10px; padding:7px; } .fb-lbl{ display:none; } }
/* never mid-round, never on the cover */
body:has(#screen-play.show) .fb-btn, body:has(#screen-hol.show) .fb-btn, body:has(#screen-namefrom.show) .fb-btn,
body:has(#screen-flight.show .fl-wrap) .fb-btn, body:has(.book.closed) .fb-btn, body:has(.tour) .fb-btn{ display:none; }
.fb-lead{ margin:0; color:var(--muted); font-size:14px; line-height:1.45; }
.fb-kinds{ display:flex; flex-wrap:wrap; gap:6px; }
.fb-kind{ padding:7px 12px; border-radius:999px; border:1.5px solid var(--line); background:var(--panel-2); font:inherit; font-size:13.5px; cursor:pointer; color:var(--text); }
.fb-kind.on{ border-color:var(--navy); background:var(--navy); color:#FFFDF6; }
.fb-text{ width:100%; resize:vertical; min-height:96px; font:inherit; font-size:15px; }
.fb-note{ font-size:13px; color:var(--no); min-height:0; }
.fb-note:empty{ display:none; }
