:root{
  --bg:#0b0f14;
  --card:#121a23;
  --text:#e7eef7;
  --muted:#9bb0c4;
  --line:#243241;

  --gold:#d8b15a;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  color:var(--text);
  background:var(--bg)
}
.wrap{max-width:820px;margin:0 auto;padding:16px}
.top{display:flex;align-items:center;justify-content:space-between}

h1{margin:0;font-size:28px;letter-spacing:.5px}
.sub{margin:6px 0 0;color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px}
.row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.smallrow{margin-top:-6px}
.label{color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.dot{opacity:.6;margin:0 8px}

.brand{display:flex;align-items:center;gap:14px}
.nav{display:flex;gap:10px;align-items:center}

.brandlink{color:var(--text);text-decoration:none}

:root{
  --ok:#1f6f3a;
  --bad:#ff3b30;
}

/* thicker border so it reads as a “status” */
.stat{ border-width:2px; }

/* Always-on (Σ + Shape) */
.stat[data-card="SUM"],
.stat[data-card="SH"]{
  border-color: var(--ok);
  box-shadow: 0 0 0 3px rgba(31,111,58,.14);
}

/* Locked hints (default red) */
.stat[data-card="POS"],
.stat[data-card="P"],
.stat[data-card="U"],
.stat[data-card="SSQ"]{
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(255,59,48,.12);
}

/* After reveal (turn green) */
.stat.revealed{
  border-color: var(--ok) !important;
  box-shadow: 0 0 0 3px rgba(31,111,58,.14) !important;
}


.stats{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:12px 0 16px}
@media (max-width: 720px){ .stats{grid-template-columns:repeat(3,1fr)} }

.stat{border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center}
.k{font-weight:800}
.v{font-size:20px;margin-top:4px}
.hint{color:var(--muted);font-size:12px;margin-top:6px}

.inputRow{display:flex;gap:10px}
input{
  flex:1;border-radius:12px;border:1px solid var(--line);
  padding:12px;font-size:16px;background:#0f151d;color:var(--text)
}
button{
  border-radius:12px;border:1px solid var(--line);
  padding:12px 14px;background:#1b2a3a;color:var(--text);
  cursor:pointer
}
button.ghost{background:transparent}
button:disabled{opacity:.5;cursor:not-allowed}

.msg{min-height:22px;color:var(--muted);margin:10px 2px;white-space:pre-wrap}
.board{display:flex;flex-direction:column;gap:10px;margin-top:10px}

.turn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.tiles{display:flex;gap:8px;justify-content:center}
.tile{
  width:40px;height:40px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  font-weight:900;
  font-size:18px;
  user-select:none;
}




/* tile colour changes (brighter green + much brighter yellow, consistent everywhere) */
.tile.g{ background:#218448; border-color:#218448; }  /* was #1f6f3a */
.tile.y{ background:#e0c63a; border-color:#e0c63a; }  /* brighter yellow */

.miniTile.g{ background:#218448; border-color:#218448; }
.miniTile.y{ background:#e0c63a; border-color:#e0c63a; }

.fp .ok{ background:rgba(33,132,72,.30); border-color:#218448; }
.fp .high{ background:rgba(224,198,58,.32); border-color:#e0c63a; }




.tile.b{background:#0f151d;border-color:var(--line)}

/* ONE-LINE feedback */
.fp{
  margin-top:10px;
  display:flex;
  justify-content:center;
  gap:10px;
  font-size:14px;
  white-space:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
}
.fp::-webkit-scrollbar{height:6px}
.fp .fpt{
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 8px;
  color:var(--text);
}
.fp .ok{background:rgba(31,111,58,.30);border-color:#1f6f3a}
.fp .low{background:rgba(60,90,140,.28);border-color:rgba(60,90,140,.9)}
.fp .high{background:rgba(122,106,30,.30);border-color:#7a6a1e}
.fp .bad{background:rgba(160,60,60,.28);border-color:rgba(160,60,60,.9)}

.actions{display:flex;gap:10px;margin-top:12px}
dialog{border:none;border-radius:14px;max-width:680px;width:92%}
.dlg{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:16px}

.toast{
  position:fixed;
  left:50%;
  top:18px;
  transform:translateX(-50%);
  background:#1b2a3a;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  font-weight:800;
  z-index:9999;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.fx{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  pointer-events:none;
  z-index:9998;
}

/* Mobile: scroll history inside card + keep input visible */
@media (max-width: 520px){
  .wrap{padding:12px}
  .card{padding:12px}

  .board{
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 10px;
  }

  .inputRow{
    position: sticky;
    bottom: 10px;
    z-index: 50;
    background: var(--card);
    padding: 10px 0 4px;
    flex-direction:column;
  }
  .inputRow input, .inputRow button{width:100%}

   
  .inputRow input{ padding: calc(12px * .80); }
  .inputRow button{ padding: calc(12px * .80) calc(14px * .80); }


  .actions{flex-direction:column}
  .actions button{width:100%}

  .tile{width:41px;height:41px;font-size:19px}
  .fp{font-size:12px;gap:7px}
  .fp .fpt{padding:4px 6px}
}

/* On-screen number pad */
.pad{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); /* keep 1–6 on one row */
  gap: 10px;
}

/* tighten spacing on phones */
@media (max-width: 520px){
  .pad{ gap: 8px; }
}
@media (max-width: 380px){
  .pad{ gap: 6px; }
}

.padbtn{
  padding: 12px 0;
  font-size: 17px;
  font-weight: 800;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f151d;
  color: var(--text);
}

/* tighten buttons on smaller phones */
@media (max-width: 520px){
  .padbtn{ padding: 11px 0; font-size: 16px; border-radius: 12px; }
}
@media (max-width: 380px){
  .padbtn{ padding: 10px 0; font-size: 15px; border-radius: 12px; }
}

/* LAST resort only (tiny screens) */
@media (max-width: 340px){
  .pad{ grid-template-columns: repeat(3, 1fr); }
}

/* Hide pad only on mouse/trackpad devices (not touch tablets) */
@media (min-width: 900px) and (hover:hover) and (pointer:fine){
  .pad{ display:none; }
}


/* Archive list */
.archList{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px}
@media (max-width: 720px){ .archList{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 420px){ .archList{grid-template-columns:1fr} }
.archItem{
  display:block;
  text-decoration:none;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  background:#0f151d;
}
.archItem:hover{border-color:#3a4b5d}

/* Ads */
.adwrap{margin:12px 0;min-height:90px}
@media (max-width: 520px){ .adwrap{ min-height: 60px; } }
.adwrap ins{background:transparent}

/* Footer */
.footer{padding-top:6px;padding-bottom:24px}
.footlinks{display:flex;gap:10px;align-items:center;color:var(--muted)}
.footlinks a{color:var(--muted);text-decoration:none}
.footlinks a:hover{color:var(--text)}
.sep{opacity:.6}
.fineprint{margin-top:8px;color:var(--muted);font-size:12px}

/* Privacy prose */
.prose h2{margin-top:0}
.prose p{color:var(--text);opacity:.92;line-height:1.45}
.muted{color:var(--muted)}

/* Consent */
.consent{
  position:fixed;
  inset:auto 0 0 0;
  padding:12px;
  z-index:10000;
}
.consentCard{
  max-width:820px;
  margin:0 auto;
  background:rgba(18,26,35,.96);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  backdrop-filter: blur(6px);
}
.consentText{max-width:560px}
.consentBtns{display:flex;gap:10px}
@media (max-width:520px){
  .consentCard{flex-direction:column;align-items:stretch}
  .consentBtns button{width:100%}
  .consentBtns{flex-direction:column}
}

/* Share dialog close X */
.dlg{ position: relative; }
.dlgX{
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.dlgX:hover{ opacity: 1; }

/* Menu dialog */
.menuDlg{border:none;padding:0;margin:0;background:transparent}
.menuDlg::backdrop{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.menuPanel{
  position: fixed;
  top: 72px;
  right: max(16px, calc((100vw - 820px)/2 + 16px));
  left: auto;
  margin: 0;

  width: min(420px, calc(100vw - 32px));
  background: rgba(18,26,35,.98);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);

  transform-origin: top right;
  animation: menuDrop .14s ease-out;
}
@keyframes menuDrop{
  from{ transform: translateY(-6px) scale(.98); opacity:.0; }
  to{ transform: translateY(0) scale(1); opacity:1; }
}
.menuHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.menuTitle{ font-weight:900; }
.menuList{display:flex;flex-direction:column;gap:10px}
.menuLink{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
}
.menuLink:hover{background: rgba(255,255,255,.06);border-color:#3a4b5d}
.menuLink.active{
  border-color:#ff3b30;
  box-shadow: 0 0 0 3px rgba(255,59,48,.18);
}
.mi{ width:20px; text-align:center; opacity:.9; }

/* Theme row */
.menuRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
}
.menuRowLeft{ display:flex; align-items:center; gap:10px; }

/* Switch */
.switch{ position:relative; display:inline-block; width:52px; height:30px; }
.switch input{ opacity:0; width:0; height:0; }
.slider{
  position:absolute; cursor:pointer;
  inset:0;
  background:#121a23;
  border:1px solid var(--line);
  border-radius:999px;
  transition:.18s;
}
.slider:before{
  content:"";
  position:absolute;
  height:22px; width:22px;
  left:4px; top:3px;
  background:#e7eef7;
  border-radius:999px;
  transition:.18s;
}
.switch input:checked + .slider{
  background: rgba(60,90,140,.38);
  border-color: rgba(60,90,140,.9);
}
.switch input:checked + .slider:before{
  transform: translateX(22px);
}

/* Light theme */
:root[data-theme="light"]{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0b0f14;
  --muted:#435565;
  --line:#d2dbe5;
}

/* Make common surfaces look right in light mode */
:root[data-theme="light"] input,
:root[data-theme="light"] .padbtn,
:root[data-theme="light"] .tile.b{
  background:#f0f3f7;
  color:var(--text);
}
:root[data-theme="light"] button{
  background:#e7eef7;
  color:var(--text);
}
:root[data-theme="light"] .menuPanel{ background: rgba(255,255,255,.98); }
:root[data-theme="light"] .menuLink,
:root[data-theme="light"] .menuRow{ background: rgba(11,15,20,.03); }
:root[data-theme="light"] .slider{
  background:#f0f3f7;
  border-color: var(--line);
}
:root[data-theme="light"] .slider:before{ background:#0b0f14; }

/* Consent in light mode */
:root[data-theme="light"] .consentCard{
  background: rgba(255,255,255,.96);
}

/* Optional: keep the menu under the header on tiny screens */
@media (max-width: 520px){
  .menuPanel{ top: 64px; }
}

/* Fix menu text contrast */
.menuPanel, .menuPanel *{ color: var(--text); }
.menuRow span{ color: var(--text); }

/* About page CTA buttons */
.seg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight: 900;
}
.seg:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}
.seg.on{
  border-color: rgba(216,177,90,.95);
  box-shadow: 0 0 0 3px rgba(216,177,90,.18);
}
:root[data-theme="light"] .seg{
  background: rgba(11,15,20,.03);
}


/* ============================
   PRIVACY HEADER TEST LAYOUT
   ============================ */

.brandH1{ margin:0; letter-spacing:0; }
.brandlink{
  display:flex;
  align-items:center;
  gap:10px;
}
.brandMark{ width:28px; height:28px; }


.brandName{
  font-size:22px;
  font-weight:900;
  letter-spacing:.2px;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
}

/* right controls */
.pillbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:800;
}
.pillbtn:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}

.iconbtn{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  padding:0;
  cursor:pointer;
}
.iconbtn:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}
.iconbtn:focus-visible,
.pillbtn:focus-visible{
  outline: 3px solid rgba(216,177,90,.25);
  outline-offset: 3px;
}

/* Info button: italic/bold "i" + gold outline (both themes) */
.infoBtn{
  border:2px solid var(--gold);
}
.infoBtn:hover{
  filter: brightness(1.02);
}
.iGlyph{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-1px);
}

/* Hamburger glyph sizing */
.hambars{
  font-size: 20px;
  line-height: 1;
}

/* Make the header a bit tighter on small screens */
@media (max-width: 520px){
  .brandName{ font-size:20px; }
  .pillbtn{ height:34px; }
  .iconbtn{ width:34px; height:34px; }
  .brandMark{ width:27px; height:27px; }
}

}

/* ===== Mode selector (Easy / Medium / Hard) ===== */
.modeSeg{
  display:inline-flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.seg{
  min-width:44px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
  text-decoration:none; /* covers <a class="seg"> too */
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.seg:hover{
  background: rgba(255,255,255,.06);
  border-color:#3a4b5d;
}

.seg.on{
  background:#1b2a3a;
  border-color:#3a4b5d;
}

/* Light theme tweaks */
:root[data-theme="light"] .seg{
  background: rgba(11,15,20,.03);
}

:root[data-theme="light"] .seg.on{
  background:#e7eef7;
}


/* Light theme: archive date tiles should not be dark */
:root[data-theme="light"] .archItem{
  background:#f0f3f7;
  color:var(--text);
  border-color:var(--line);
}

:root[data-theme="light"] .archItem:hover{
  background:#e7eef7;
  border-color:#b7c3cf;
}

/* Puzzle row: keep label left, date+mode hard right */
.row.puzzleRow{
  align-items:flex-start;
}

.puzzleMetaStack{
  margin-left:auto;            /* forces it to the far right */
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  text-align:right;
  gap:8px;
}

.monoDate{
  white-space:nowrap;
}

/* mode buttons sit under date, right-aligned */
.puzzleMetaStack .modeSeg{
  justify-content:flex-end;
  flex-wrap:wrap;
}



/* Puzzle row layout: keep mode inline, date pinned right */
.puzzleMeta{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;                 /* take the remaining row width */
  justify-content:flex-end;
  flex-wrap:wrap;         /* safe on small screens */
}

.modeSeg{
  display:inline-flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.monoDate{
  margin-left:auto;       /* pushes date to the far right */
  white-space:nowrap;
}





/* ============================
   HOME: SCROLL TUTORIAL + ABOUT
   ============================ */

:root{
  --cBlue: 76,142,255;
  --cGreen: 31,111,58;
  --cGold: 216,177,90;
  --cRed: 255,59,48;
}

.learnTitleRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.learnKicker{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.learnGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 720px){
  .learnGrid{ grid-template-columns: 1fr; }
}

.learnStep{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.03);
  position:relative;
  overflow:hidden;
}
:root[data-theme="light"] .learnStep{
  background: rgba(11,15,20,.03);
}

.learnStep::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  border-radius:14px 0 0 14px;
  background: rgba(var(--cBlue), .9);
}
.learnStep.s2::before{ background: rgba(var(--cGold), .95); }
.learnStep.s3::before{ background: rgba(var(--cGreen), .9); }

.learnH3{
  margin:0 0 6px;
  font-size:16px;
}
.learnP{
  margin:0;
  color:var(--muted);
  line-height:1.4;
}

.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.03);
  font-weight:800;
  font-size:13px;
}
:root[data-theme="light"] .chip{ background: rgba(11,15,20,.03); }

.miniTiles{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin:10px 0;
}
.miniTile{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--line);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:16px;
  user-select:none;
}
.miniTile.g{ background:#1f6f3a; border-color:#1f6f3a; }
.miniTile.y{ background:#7a6a1e; border-color:#7a6a1e; }
.miniTile.b{ background:#0f151d; border-color:var(--line); }
:root[data-theme="light"] .miniTile.b{ background:#f0f3f7; }

.learnExample{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.02);
}
:root[data-theme="light"] .learnExample{
  background: rgba(11,15,20,.02);
}

.learnExample .mono{
  display:block;
  white-space:pre-wrap;
  line-height:1.35;
  color:var(--text);
}

.learnCTA{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  align-items:center;
}
.learnCTA .muted{ margin:0; }

.aboutMini{
  display:flex;
  gap:12px;
  flex-direction:column;
}
.aboutMiniTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.aboutMini .muted{ line-height:1.45; }

/* Make Shape symbols (>, <, =) pop */
.shapeSym{
  font-weight: 1000;
  font-size: 1.25em;
  letter-spacing: 0.06em;
  display: inline-block;
  transform: translateY(-0.02em);
}

/* tighter guess */

.board{display:flex;flex-direction:column;gap:10px;margin-top:10px}

.turn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.tiles{display:flex;gap:8px;justify-content:center}

.tile{
  width:40px;height:40px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:10px;
  border:1px solid var(--line);
  font-weight:900;
  font-size:18px;
  user-select:none;
}



/* Extra punch inside mono blocks */
.mono .shapeSym{
  font-size: 1.35em;
}

/* Optional: make the whole Shape result stand out */
.shapeResult{
  font-weight: 1000;
  font-size: 1.35em;
  letter-spacing: 0.10em;
}

/* Tighten fingerprint cards on phones */
@media (max-width: 520px){
  .stats{
    gap: 8px;              /* was 10px */
    margin: 10px 0 12px;   /* was 12px 0 16px */
  }

  .stat{
    padding: 8px;          /* was 10px */
    border-radius: 12px;   /* keep */
  }

  .stat .k{
    font-size: 15px;
  }

  .stat .v{
    font-size: 18px;       /* was 20px */
    margin-top: 3px;       /* was 4px */
  }

  .stat .hint{
    font-size: 11px;       /* was 12px */
    margin-top: 4px;       /* was 6px */
    line-height: 1.15;
    white-space: nowrap;   /* helps keep "sum of squares" on one line */
  }

  /* Extra nudge just for the long label */
  .stat[data-card="SSQ"] .hint{
    font-size: 10.5px;
    letter-spacing: -0.2px;
  }
}




/* FINAL OVERRIDE: make board tiles + example mini tiles identical */
:root{
  --ngGreen:#218448;
  --ngYellow:#e0c63a;
}

.tile.g, .miniTile.g{
  background: var(--ngGreen) !important;
  border-color: var(--ngGreen) !important;
}

.tile.y, .miniTile.y{
  background: var(--ngYellow) !important;
  border-color: var(--ngYellow) !important;
}

/* Fingerprint pills match too */
.fp .ok{
  background: rgba(33,132,72,.30) !important;
  border-color: var(--ngGreen) !important;
}
.fp .high{
  background: rgba(224,198,58,.32) !important;
  border-color: var(--ngYellow) !important;
}


/* Smaller ad placeholder (only grows when an ad actually renders) */
.adwrap{
  min-height: 40px !important;     /* was 90px */
  margin: 10px 0 !important;
}

.adwrap ins{
  display:block;
  min-height: 40px;               /* keep a small slot */
  max-height: 120px;              /* stops huge empty gaps */
  overflow:hidden;
}

/* Mobile even tighter */
@media (max-width:520px){
  .adwrap{ min-height: 28px !important; }
  .adwrap ins{ min-height: 28px; max-height: 100px; }
}

/* feedback row layout */
.fp{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  padding-left:0 !important;
}

/* =========================
   LINK CONTRAST IMPROVEMENTS
   (single set for both themes)
   ========================= */

/* 1) Make normal text links brighter + clearly link-like */
a{
  color: rgba(var(--cBlue), .95);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover{
  color: rgba(var(--cBlue), 1);
}

/* Don’t underline “button-like” links */
.seg, .pillbtn, .menuLink, .archItem, .chip{
  text-decoration: none !important;
}

/* 2) Make the Strategy “section chips” readable (white/black text) */
.chip{
  color: var(--text) !important;                 /* stops “blue link text” */
  border-color: rgba(var(--cBlue), .55);
  background: rgba(var(--cBlue), .14);
}
.chip:hover{
  border-color: rgba(var(--cBlue), .95);
  background: rgba(var(--cBlue), .20);
}

/* Nice keyboard focus */
.chip:focus-visible, a:focus-visible{
  outline: 3px solid rgba(var(--cGold), .25);
  outline-offset: 3px;
  border-radius: 999px;
}




/* =========================
   FOOTER WRAP FIX
   ========================= */

/* wrap between links, not inside link text */
.footlinks{
  flex-wrap: wrap;
  row-gap: 6px;
  justify-content: center; /* optional: looks nicer on mobile */
}

/* keep “How to play” / “About/Support” on one line */
.footlinks a{
  white-space: nowrap;
}

/* on small screens, remove the dot separators so they don’t land awkwardly */
@media (max-width:520px){
  .footlinks{ gap: 14px; }
  .footlinks .sep{ display:none; }
}


/* Toast ("Boom!") theme fix */
:root{
  --toastBg: rgba(0,0,0,.78);
  --toastFg: rgba(255,255,255,.95);
  --toastBd: rgba(255,255,255,.14);
}
:root[data-theme="light"]{
  --toastBg: rgba(255,255,255,.92);
  --toastFg: #0b0f14;
  --toastBd: rgba(11,15,20,.14);
}

.toast{
  background: var(--toastBg);
  color: var(--toastFg);
  border: 1px solid var(--toastBd);
}

/* Shape value should never wrap */
.stat[data-card="SH"] .v{ white-space: nowrap; }

/* Row: label left, rest takes full width */
.row.puzzleRow{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* The right-hand column must be allowed to grow */
.row.puzzleRow .puzzleMetaStack{
  flex: 1 1 auto !important;
  min-width: 0 !important;

  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Push the mode buttons to the far right */
.row.puzzleRow .modeSeg{
  margin-left: auto !important;
}
/* ============================
   GLOBAL MENU (Glyphverse) — 2-COL ALWAYS + CRISPER

   ============================ */

:root{
  /* dark */
  --gvMenuBg: rgba(255,255,255,.06);
  --gvMenuBorder: rgba(255,255,255,.10);
  --gvMenuShadow: 0 18px 50px rgba(0,0,0,.45);

  --gvItemBg: rgba(255,255,255,.05);
  --gvItemBgHover: rgba(255,255,255,.08);
  --gvItemBorder: rgba(255,255,255,.10);
}

:root[data-theme="light"]{
  /* light (white glass, crisp) */
  --gvMenuBg: rgba(255,255,255,.92);
  --gvMenuBorder: rgba(11,15,20,.14);
  --gvMenuShadow: 0 16px 40px rgba(0,0,0,.18);

  --gvItemBg: rgba(255,255,255,.78);
  --gvItemBgHover: rgba(255,255,255,.92);
  --gvItemBorder: rgba(11,15,20,.14);
}

.gvMenuDlg{
  border: 0;
  padding: 0;
  background: transparent;
  width: min(760px, 94vw);
  color: inherit;
}

.gvMenuDlg::backdrop{ background: rgba(0,0,0,.55); }
:root[data-theme="light"] .gvMenuDlg::backdrop{ background: rgba(0,0,0,.28); }

.gvMenu{
  background: var(--gvMenuBg);
  border: 1px solid var(--gvMenuBorder);
  border-radius: 16px;
  box-shadow: var(--gvMenuShadow);

  /* IMPORTANT: allow scrolling (mobile cut-off fix) */
  overflow: auto;

  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  max-height: 80vh;
}

:root[data-theme="light"] .gvMenu{
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

.gvMenuTop{
  position: sticky;
  top: 0;
  z-index: 2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--gvMenuBorder);
  background: inherit; /* keeps header solid while scrolling */
}

.gvMenuTitle{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
}

.gvMenuX{
  border: 1px solid var(--gvItemBorder);
  background: var(--gvItemBg);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.gvMenuX:hover{ background: var(--gvItemBgHover); }

.gvMenuGrid{
  display:grid;
  /* ALWAYS two columns (even on mobile) */
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 10px;
  padding: 10px;
  align-items: start;
}

.gvCol{ min-width: 0; }

.gvCol:first-child{
  padding-right: 8px;
  border-right: 1px solid var(--gvMenuBorder);
}

.gvSection{ margin-bottom: 10px; }
.gvSection:last-child{ margin-bottom: 0; }

.gvSectionTitle{
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .70;
  margin: 0 0 8px;
}

.gvWelcome{
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--gvItemBorder);
  background: var(--gvItemBg);
  border-radius: 14px;
}

.gvWelcomeTitle{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 2px;
}
.gvWelcomeSub{
  font-size: 12px;
  line-height: 1.2;
  opacity: .85;
}

/* tight one-line items */
.gvRow,
.gvLink,
.gvGameLink{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--gvItemBorder);
  background: var(--gvItemBg);
  text-decoration: none;
  color: inherit;
  min-height: 38px;
}

.gvRow{ justify-content: space-between; }
.gvRowLeft{ display:flex; align-items:center; gap:10px; min-width:0; }

.gvLink:hover,
.gvGameLink:hover{ background: var(--gvItemBgHover); }

.gvIcon{
  width: 18px;
  display:inline-flex;
  justify-content:center;
  opacity: .95;
  flex: 0 0 auto;
}

.gvText{
  font-size: 13px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Game grids: 2 columns on desktop, 1 within the right column by default.
   (We keep 1 so the right column doesn't get too cramped on mobile.)
   If you want 2 inside the right column on desktop, see media rule below. */
.gvGameGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width:900px){
  .gvGameGrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* Active highlight */
.gvActive{
  outline: 2px solid rgba(255,255,255,.18);
  outline-offset: 0;
}
:root[data-theme="light"] .gvActive{
  outline-color: rgba(11,15,20,.18);
}

/* Slightly smaller switch in menu */
.gvSwitch{ transform: scale(.90); transform-origin: right center; }

/* Mobile tightening (still 2 cols) */
@media (max-width:520px){
  .gvMenuDlg{ width: 98vw; }
  .gvMenu{ max-height: 88vh; border-radius: 14px; }

  .gvMenuGrid{ gap: 8px; padding: 8px; }
  .gvCol:first-child{ padding-right: 6px; }

  .gvSectionTitle{ font-size: 10px; margin: 0 0 6px; letter-spacing: .18em; }

  .gvWelcome{ padding: 8px 8px; border-radius: 12px; }
  .gvWelcomeTitle{ font-size: 12px; }
  .gvWelcomeSub{ font-size: 11px; }

  .gvRow, .gvLink, .gvGameLink{
    padding: 8px 8px;
    border-radius: 12px;
    min-height: 34px;
    gap: 8px;
  }

  .gvText{ font-size: 12px; }
  .gvIcon{ width: 16px; }
  .gvSwitch{ transform: scale(.85); }
}


/* Center the dialog on desktop (override any left-aligned dialog styles) */
#menuDlg.gvMenuDlg[open]{
  position: fixed;
  inset: 0;      /* top/right/bottom/left = 0 */
  margin: auto;  /* centers it */
}



/* ===== Section gradient header wash (shared) ===== */
body::before{
  content:"";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 240px;
  pointer-events: none;
  z-index: 0;
  background: none;
}
#app, .wrap, main { position: relative; z-index: 1; }

/* LIGHT */
body.section-daily::before{
  background: linear-gradient(180deg,
    rgba(74,160,255,.30) 0%,
    rgba(74,160,255,.16) 38%,
    rgba(74,160,255,0) 100%
  );
}
body.section-quick::before{
  background: linear-gradient(180deg,
    rgba(46,200,140,.26) 0%,
    rgba(46,200,140,.14) 38%,
    rgba(46,200,140,0) 100%
  );
}
body.section-skills::before{
  background: linear-gradient(180deg,
    rgba(255,120,130,.26) 0%,
    rgba(255,120,130,.13) 38%,
    rgba(255,120,130,0) 100%
  );
}

/* DARK */
:root[data-theme="dark"] body.section-daily::before{
  background: linear-gradient(180deg,
    rgba(60,140,255,.22) 0%,
    rgba(60,140,255,.12) 42%,
    rgba(60,140,255,0) 100%
  );
}
:root[data-theme="dark"] body.section-quick::before{
  background: linear-gradient(180deg,
    rgba(60,220,170,.18) 0%,
    rgba(60,220,170,.10) 42%,
    rgba(60,220,170,0) 100%
  );
}
:root[data-theme="dark"] body.section-skills::before{
  background: linear-gradient(180deg,
    rgba(255,90,130,.18) 0%,
    rgba(255,90,130,.10) 42%,
    rgba(255,90,130,0) 100%
  );
}

/* Hub pages */
body.section-hub::before{
  background: linear-gradient(180deg,
    rgba(216,177,90,.22) 0%,
    rgba(216,177,90,.10) 38%,
    rgba(216,177,90,0) 100%
  );
}
:root[data-theme="dark"] body.section-hub::before{
  background: linear-gradient(180deg,
    rgba(216,177,90,.16) 0%,
    rgba(216,177,90,.08) 42%,
    rgba(216,177,90,0) 100%
  );
}

/* Achievements page */
body.section-achievements::before{
  background: linear-gradient(180deg,
    rgba(160,120,255,.26) 0%,
    rgba(160,120,255,.13) 38%,
    rgba(160,120,255,0) 100%
  );
}
:root[data-theme="dark"] body.section-achievements::before{
  background: linear-gradient(180deg,
    rgba(160,120,255,.18) 0%,
    rgba(160,120,255,.09) 42%,
    rgba(160,120,255,0) 100%
  );
}

/* Profile page */
body.section-profile::before{
  background: linear-gradient(180deg,
    rgba(74,160,255,.28) 0%,
    rgba(160,120,255,.14) 38%,
    rgba(74,160,255,0) 100%
  );
}
:root[data-theme="dark"] body.section-profile::before{
  background: linear-gradient(180deg,
    rgba(74,160,255,.20) 0%,
    rgba(160,120,255,.10) 42%,
    rgba(74,160,255,0) 100%
  );
}

/* Brain training page */
body.section-brain::before{
  background: linear-gradient(180deg,
    rgba(46,200,140,.26) 0%,
    rgba(255,120,130,.12) 38%,
    rgba(46,200,140,0) 100%
  );
}
:root[data-theme="dark"] body.section-brain::before{
  background: linear-gradient(180deg,
    rgba(46,200,140,.18) 0%,
    rgba(255,120,130,.08) 42%,
    rgba(46,200,140,0) 100%
  );
}


/* default */
.sub{
  font-size: 0.98rem;
  line-height: 1.25;
}

/* mobile tighten */
@media (max-width:520px){
  .sub{
    font-size: 0.90rem;   /* try 0.88–0.92 */
    line-height: 1.18;
  }
}


/* ============================
   GLYPHVERSE SPLASH (Hub overlay)
   ============================ */

/* Theme-aware vars */
:root{
  --gvBlue: 74,160,255;
  --gvGreen: 46,200,140;
  --gvRose: 255,120,130;

  --gvBackdrop: rgba(0,0,0,.70);

  --gvPanelBg: rgba(11,15,20,.92);
  --gvPanelBorder: rgba(255,255,255,.10);

  --gvText: rgba(231,238,247,.95);
  --gvMuted: rgba(155,176,196,.85);

  --gvPillBg: rgba(255,255,255,.06);
  --gvPillHover: rgba(255,255,255,.10);
  --gvPillBorder: rgba(255,255,255,.10);

  --gvShadow: 0 24px 80px rgba(0,0,0,.55);
}

:root[data-theme="light"]{
  --gvBackdrop: rgba(11,15,20,.38);

  --gvPanelBg: rgba(255,255,255,.96);
  --gvPanelBorder: rgba(11,15,20,.14);

  --gvText: #0b0f14;
  --gvMuted: rgba(67,85,101,.92);

  --gvPillBg: rgba(11,15,20,.03);
  --gvPillHover: rgba(11,15,20,.06);
  --gvPillBorder: rgba(11,15,20,.12);

  --gvShadow: 0 18px 50px rgba(0,0,0,.18);
}

/* Overlay */
.gvSplash{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background:
    radial-gradient(1100px 520px at 50% 0%,
      rgba(255,255,255,.08),
      rgba(255,255,255,0) 55%),
    var(--gvBackdrop);
  z-index: 99999;
}
.gvSplash.on{ display:flex; }
body.gvSplashOpen{ overflow:hidden; }

.gvSplashPanel{
  width: min(1100px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: var(--gvPanelBg);
  border: 1px solid var(--gvPanelBorder);
  border-radius: 18px;
  box-shadow: var(--gvShadow);
  color: var(--gvText);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  padding: 12px;
}

/* Top */
.gvSplashTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 2px 10px;
}
.gvBrand{ display:flex; align-items:center; gap:10px; min-width:0; }
.gvBrandTitle{
  font-weight: 950;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.1;
}
.gvBrandSub{ font-size: 12px; color: var(--gvMuted); margin-top: 2px; }

.gvSplashX{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--gvPillBorder);
  background: var(--gvPillBg);
  color: var(--gvText);
  font-size: 22px;
  cursor: pointer;
}
.gvSplashX:hover{ background: var(--gvPillHover); }

/* Hero */
.gvHero{
  padding: 4px 2px 10px;
}
.gvHeroKicker{
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 6px;
}
.gvHeroTitle{
  font-size: 20px;
  font-weight: 950;
  line-height: 1.12;
}
.gvHeroP{
  margin-top: 6px;
  color: var(--gvMuted);
  font-size: 12.5px;
  line-height: 1.35;
  text-wrap: balance;
}

/* Columns */
.gvCols{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 0 2px;
}

.gvCol{
  border: 1px solid var(--gvPillBorder);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  overflow:hidden;
}
:root[data-theme="light"] .gvCol{ background: rgba(255,255,255,.75); }

.gvColHead{
  padding: 9px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
:root[data-theme="light"] .gvColHead{ border-bottom-color: rgba(11,15,20,.10); }

.gvColHead::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  height: 4px;
  background: rgba(var(--gvBlue), .95);
}
.gvDaily .gvColHead::before{ background: rgba(var(--gvBlue), .95); }
.gvQuick .gvColHead::before{ background: rgba(var(--gvGreen), .92); }
.gvSkills .gvColHead::before{ background: rgba(var(--gvRose), .92); }

.gvColTitle{
  font-weight: 950;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gvColHint{ margin-top:4px; font-size: 12px; color: var(--gvMuted); }

/* Grid */
.gvGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 12px 8px;
}

/* Slim pill cards */
.gvPill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--gvPillBorder);
  background: var(--gvPillBg);
  color: var(--gvText);
  text-decoration:none;
  min-height: 46px;
}
.gvPill:hover{ background: var(--gvPillHover); transform: translateY(-1px); }

.gvPillText{ min-width:0; }
.gvPillName{
  font-weight: 950;
  font-size: 13px;
  line-height: 1.05;
}
.gvPillSub{
  margin-top: 2px;
  color: var(--gvMuted);
  font-size: 11.5px;
  line-height: 1.05;
}

.gvSplash .gvIcon{ width: 22px; height: 22px; flex: 0 0 auto; }

.gvPillSoon{
  opacity: .70;
  border-style: dashed;
}
:root[data-theme="light"] .gvPillSoon{ opacity: .65; }

/* Coming soon chips inside section */
.gvSoon{ padding: 0 12px 12px; }
.gvSoonLabel{
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .70;
  margin: 6px 2px 8px;
}
.gvSoonRow{ display:grid; grid-template-columns: 1fr; gap: 8px; }
.gvSoonRow2{ grid-template-columns: 1fr 1fr; }
.gvSoonPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 900;
}
:root[data-theme="light"] .gvSoonPill{
  border-color: rgba(11,15,20,.18);
  background: rgba(11,15,20,.03);
  color: rgba(11,15,20,.78);
}

/* Bottom */
.gvBottom{
  margin-top: 10px;
  padding: 10px 2px 2px;
  border-top: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}
:root[data-theme="light"] .gvBottom{ border-top-color: rgba(11,15,20,.10); }

.gvBottomLeft{ font-size: 12px; color: var(--gvMuted); }
.gvBottomRight{ display:flex; gap: 10px; flex-wrap:wrap; }

.gvGhost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--gvPillBorder);
  background: var(--gvPillBg);
  color: var(--gvText);
  text-decoration:none;
  font-size: 12px;
  font-weight: 950;
}
.gvGhost:hover{ background: var(--gvPillHover); }

/* Responsive */
@media (max-width: 900px){
  .gvCols{ grid-template-columns: 1fr; }
}

/* Mobile: keep slim pills, 2-up inside each section */
@media (max-width: 520px){
  .gvSplash{ padding: 10px; }
  .gvSplashPanel{ padding: 12px; max-height: 96vh; }

  .gvCols{ grid-template-columns: 1fr; gap: 10px; }

  .gvGrid{
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 10px 8px;
  }

  .gvPill{
    padding: 9px 8px;
    min-height: 44px;
    gap: 8px;
  }

  .gvSplash .gvIcon{ width: 20px; height: 20px; }

  .gvPillName{ font-size: 12.5px; }
  .gvPillSub{ font-size: 11px; }

  .gvPillName, .gvPillSub{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 16ch;
  }

  .gvSoonRow{ grid-template-columns: 1fr 1fr; }
}




/* Center all text in the splash header + hero */
#gvSplash .gvSplashTop,
#gvSplash .gvBrandText,
#gvSplash .gvHero{
  text-align: center;
}

/* Make the brand block center itself */
#gvSplash .gvBrand{
  justify-content: center;
}

/* Optional: keep the X on the far right (looks cleaner) */
#gvSplash .gvSplashTop{
  position: relative;
}
#gvSplash .gvSplashX{
  position: absolute;
  right: 12px;
  top: 10px;
}


/* ================================
   NumberGlyph UX tweaks (home)
   - hub pills pulse/glow + bigger icons
   - Σ/Shape mini help popovers
   - sequential flip tile animation helper
   - mobile compact sizing (fingerprint + turn rows)
   ================================ */

:root{
  --ngGold: rgba(255, 204, 64, 1);
  --ngGoldA: rgba(255, 204, 64, .34);
  --ngGoldB: rgba(255, 204, 64, .18);
  --ngInk: rgba(11,15,20,1);
}

:root[data-theme="light"]{
  --ngInk: rgba(250,252,255,1);
}

/* ---------- Splash hub: make options feel clickable + “alive” ---------- */
.gvSplash .gvPill{
  border: 1px solid var(--ngGoldA);
  box-shadow:
    0 0 0 1px rgba(255,204,64,.10),
    0 10px 24px rgba(0,0,0,.22);
  position: relative;
  overflow: hidden;
}

.gvSplash .gvPill:not(.gvPillSoon)::after{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius: inherit;
  pointer-events:none;
  box-shadow:
    0 0 0 1px rgba(255,204,64,.20),
    0 0 18px rgba(255,204,64,.10),
    0 0 36px rgba(255,204,64,.08);
  opacity: .22;
  animation: gvPillPulse 2.9s ease-in-out infinite;
}

@keyframes gvPillPulse{
  0%,100%{ transform: scale(1); opacity: .18; }
  50%{ transform: scale(1.012); opacity: .36; }
}

.gvSplash .gvPill .gvIcon{
  width: clamp(34px, 7.5vw, 46px);
  height: clamp(34px, 7.5vw, 46px);
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.25));
}

@media (hover:hover){
  .gvSplash .gvPill:not(.gvPillSoon):hover{
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px rgba(255,204,64,.18),
      0 14px 34px rgba(0,0,0,.28);
  }
}

/* disable constant pulsing for reduced motion */
@media (prefers-reduced-motion: reduce){
  .gvSplash .gvPill:not(.gvPillSoon)::after{ animation: none; }
}

/* ---------- Σ/Shape mini help (question mark + popover) ---------- */
.stats .stat{ position: relative; }

.fpHelp{
  position:absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,204,64,.40);
  background: rgba(255,204,64,.10);
  color: rgba(255,204,64,.95);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  padding: 0;
}

.fpHelp:hover{
  background: rgba(255,204,64,.16);
  border-color: rgba(255,204,64,.55);
}

.fpPop{
  position:absolute;
  top: 30px;
  right: 8px;
  width: min(260px, 72vw);
  z-index: 30;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(11,15,20,.92);
  color: rgba(255,255,255,.92);
  padding: 10px 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(-4px) scale(.98);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}

:root[data-theme="light"] .fpPop{
  background: rgba(250,252,255,.96);
  color: rgba(11,15,20,.90);
  border-color: rgba(11,15,20,.14);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}

.fpPop.on{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fpPopTitle{
  font-weight: 700;
  margin: 0 0 6px 0;
}

.fpPopText{
  font-size: 13px;
  line-height: 1.35;
  opacity: .95;
}

/* ---------- Flip helper tiles (used only during reveal, then replaced with normal tiles) ---------- */
.tile.tileFlip{
  position: relative;
  display: inline-block;
  perspective: 700px;
}

.tile.tileFlip .tileFlipInner{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 460ms cubic-bezier(.2,.7,.2,1);
}

.tile.tileFlip .tileFlipFace{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  backface-visibility: hidden;
  border-radius: inherit;
}

.tile.tileFlip .tileFlipFront{
  /* “blank” front face */
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
}

:root[data-theme="light"] .tile.tileFlip .tileFlipFront{
  background: rgba(11,15,20,.04);
  border-color: rgba(11,15,20,.12);
}

.tile.tileFlip .tileFlipBack{
  transform: rotateY(180deg);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

/* approximate colours during flip only (final look comes from replacement tile spans) */
.tileFlipBack.g{ background: rgba(72, 201, 124, .28); border-color: rgba(72, 201, 124, .45); }
.tileFlipBack.y{ background: rgba(255, 205, 64, .22); border-color: rgba(255, 205, 64, .44); }
.tileFlipBack.b{ background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }

.tile.tileFlip.reveal .tileFlipInner{
  transform: rotateY(180deg);
}

@media (prefers-reduced-motion: reduce){
  .tile.tileFlip .tileFlipInner{ transition: none; }
}

/* ---------- Mobile compact sizing (fingerprints + turn rows) ---------- */
/* This is the “~20% less tall” pass on small screens */
@media (max-width: 520px){
  /* fingerprint cards: slightly shorter */
  .stats .stat{
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .stats .stat .k{ margin-bottom: 2px; }
  .stats .stat .v{ line-height: 1.1; }
  .stats .stat .hint{ margin-top: 2px; }

  /* board rows: tighten vertical rhythm */
  .turn{ gap: 8px; }
  .turn .tiles{ gap: 6px; }

  /* tiles: reduce overall size ~20% */
  .turn .tile{
    width: 38px;
    height: 38px;
    font-size: 16px;
    line-height: 38px;
  }

  /* hint pills under guess: ~20% smaller */
  .turn .fp{ gap: 6px; }
  .turn .fp .fpt{
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.1;
  }
}

/* =========================
   FP help popover: mobile fix
   - narrower
   - centered under the ? so it doesn't go off-screen
   ========================= */
@media (max-width: 520px) {
  /* ensure the card is a positioning context */
  .stat { position: relative; }

  /* match your popover class (these cover common names I used) */
  .fpHelpPop,
  .fpHelpPopover,
  .fpHelpTip,
  .stat .helpPop,
  .stat .helpPopover {
    /* make it fit on small screens */
    width: min(260px, calc(100vw - 24px)) !important;
    max-width: min(260px, calc(100vw - 24px)) !important;

    /* center it (prevents drifting off the left edge) */
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;

    /* make the text wrap nicely */
    white-space: normal !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    padding: 10px 10px !important;
    box-sizing: border-box !important;
  }

  /* If you have a little arrow/pointer, keep it centered too */
  .fpHelpPop::before,
  .fpHelpPopover::before,
  .fpHelpTip::before,
  .stat .helpPop::before,
  .stat .helpPopover::before {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
}

/* Mobile: help popover should be fixed-position (viewport) and wrap nicely */
@media (max-width: 520px){
  .fpHelpPop {
    position: fixed !important;
    max-width: calc(100vw - 16px) !important;
    width: min(280px, calc(100vw - 16px)) !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    z-index: 9999 !important;
  }
}

/* Splash hero: centered copy + face on right */
.gvHeroWithFace{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:14px;
}

.gvHeroWithFace .gvHeroCopy{
  text-align:center;
}

.gvHeroFace{
  width:84px;
  height:84px;
  border-radius:999px;
  object-fit:cover;
  border:2px solid rgba(255,215,0,.35);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}

/* Mobile: keep copy centered, drop face under */
@media (max-width:520px){
  /* 3-column trick: empty left spacer + centered copy + face on the right */
  .gvHeroWithFace{
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
  }

  /* force the copy into the CENTER column */
  .gvHeroWithFace .gvHeroCopy{
    grid-column: 2;
    text-align: center;
  }

  /* force the face into the RIGHT column */
  .gvHeroWithFace .gvHeroFace{
    grid-column: 3;
    justify-self: end;
    align-self: center;

    width: 56px;
    height: 56px;
    margin-top: 0;
  }
}

@media (max-width:520px){
  .fpPop{ width:min(280px, calc(100vw - 16px)); max-width:calc(100vw - 16px); }
}

/* ==========================
   Splash pills: less “sunken”, more “pop”
   Paste at bottom of style-test.css
   ========================== */

/* Base pill styling (default = flatter, crisper) */
.gvPill{
  border: 1px solid rgba(255, 215, 0, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 6px 14px rgba(0,0,0,0.10);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, filter 140ms ease;
  will-change: transform;
}

/* Hover = “invite” (lift + clearer edge) */
.gvPill:hover{
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    0 14px 28px rgba(0,0,0,0.14);
  filter: brightness(1.03);
}

/* Press = snappy */
.gvPill:active{
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 10px 20px rgba(0,0,0,0.12);
}

/* Keyboard focus (also looks “premium”) */
.gvPill:focus-visible{
  outline: 3px solid rgba(255, 215, 0, 0.45);
  outline-offset: 2px;
}

/* Make “Coming soon” feel flatter */
.gvPill.gvPillSoon{
  border-color: rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 4px 10px rgba(0,0,0,0.08);
  filter: none;
}

/* Dark theme: slightly stronger shadow so it still pops */
:root[data-theme="dark"] .gvPill{
  border-color: rgba(255, 215, 0, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 10px 22px rgba(0,0,0,0.32);
}
:root[data-theme="dark"] .gvPill:hover{
  border-color: rgba(255, 215, 0, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 18px 38px rgba(0,0,0,0.38);
}



/* --- MENU: constrain SVG logo icons --- */
.gvGameLink .gvIcon{
  width: 28px;              /* icon box size */
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gvIconImg{
  width: 25px;              /* actual logo size */
  height: 25px;
  display: block;
  max-width: 25px;
  max-height: 25px;
}

/* If you have any generic rule like img{width:100%} somewhere, this prevents it from blowing up */
.gvGameLink .gvIcon img{
  width: 25px !important;
  height: 25px !important;
}




/* Gold trace for the Games Hub row */
.gvLink[data-action="hub"]{
  position: relative;
}

.gvLink[data-action="hub"]::after{
  content: "";
  position: absolute;
  inset: -2px;              /* trace sits slightly outside */
  border-radius: inherit;
  border: 2px solid rgba(212, 175, 55, 0.85);   /* gold */
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),         /* soft outer glow */
    0 10px 22px rgba(0, 0, 0, 0.10);            /* subtle lift */
  pointer-events: none;
}

.gvLink[data-action="hub"]:hover::after{
  border-color: rgba(212, 175, 55, 0.95);
  box-shadow:
    0 0 0 5px rgba(212, 175, 55, 0.16),
    0 12px 26px rgba(0, 0, 0, 0.12);
}



.agMoreWrap{
  margin-top: 12px;
  display:flex;
  justify-content:center;
}

/* reuse .seg look; just make it feel like a CTA */
.agMoreBtn{
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  animation: agMorePulse 2.8s ease-in-out infinite;
}


/* Green Ko-fi dollar sign button */
.pillbtn.kofi{
  color: #22c55e;
  font-size: 18px;
  font-weight: 900;
  padding: 0 10px;
  letter-spacing: 0;
}
.pillbtn.kofi:hover{
  color: #16a34a;
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.08);
}
:root[data-theme="light"] .pillbtn.kofi:hover{
  background: rgba(34,197,94,.06);
}

/* Bigger top-left logo across the site */
.brandH1 .brandMark{
  width: 36px;
  height: 36px;
}

/* Optional: slightly bigger on desktop */
@media (min-width: 860px){
  .brandH1 .brandMark{
    width: 40px;
    height: 40px;
  }
}
