/* Courier Prime is hosted here (SIL Open Font License, see /fonts/LICENSE-CourierPrime.txt). Nothing loads from Google. */
@font-face{font-family:"Courier Prime";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/courier-prime-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Courier Prime";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/courier-prime-latin-700-normal.woff2) format("woff2")}
:root {
  --bg: #f7f2e8;
  --card: #fffdf8;
  --ink: #1d2a24;
  --muted: #6b7a72;
  --line: #e2dccd;
  --brand: #1f4d3a;
  --brand-ink: #ffffff;
  --good: #2e9e5b;
  --warn: #e0b030;
  --bad: #c9c3b4;
  --err: #b3402f;
  --radius: 16px;
  --key-bg: #ffffff; --key-ink: #14201a; --key-edge: #b8b09c; --key-down: #d9d1bd;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a16; --card: #1b2520; --ink: #eef3ef; --muted: #98a89f; --line: #2b3832;
    --brand: #3f9b6e; --brand-ink: #08130d; --bad: #3a4640; --err: #ff8a78;
    --key-bg: #55675f; --key-ink: #ffffff; --key-edge: #0b100d; --key-down: #7f9489;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
}
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; text-align: center; line-height: 1.1; font-family: "Courier Prime", "American Typewriter", "Courier New", Courier, monospace; font-weight: 700; font-size: 24px; letter-spacing: 2px; }
.top h1 small { display: block; font-weight: 400; font-size: 12px; letter-spacing: .6px; color: var(--muted); margin-top: 3px; }
.top-right { justify-self: end; display: flex; gap: 4px; }
.icon-btn { background: none; border: 0; color: var(--ink); font-size: 20px; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; }
.icon-btn:active { background: var(--line); }
.meta { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 6px; letter-spacing: .3px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-left: 6px; }

.clue { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.clue-word {
  flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 7vw, 32px); font-weight: 700; text-transform: capitalize;
  overflow-wrap: anywhere;
}
.how { text-align: center; color: var(--muted); font-size: 14px; margin: 6px 0 14px; }

form { display: grid; gap: 10px; }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.field input {
  font: inherit; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 14px; width: 100%;
}
.field input:focus { outline: none; border-color: var(--brand); }
.primary {
  font: inherit; font-weight: 700; font-size: 17px; background: var(--brand); color: var(--brand-ink);
  border: 0; border-radius: 12px; padding: 15px; cursor: pointer;
}
.primary:disabled { opacity: .5; }
.ghost { background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 12px; padding: 10px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.error { color: var(--err); min-height: 20px; margin: 8px 2px 0; font-size: 14px; }

.hints { margin: 6px 0; }
.hint-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0 0; overflow: hidden; }
.hint-bar i { display: block; height: 100%; width: 0; background: var(--brand); }
.hints ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.hints li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }

.attempts { display: grid; gap: 8px; margin-top: 14px; }
.row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row-words { font-weight: 700; font-size: 17px; text-transform: capitalize; overflow-wrap: anywhere; }
.tiles { display: flex; gap: 5px; flex: none; }
.tile { width: 26px; height: 26px; border-radius: 7px; background: var(--bad); }
.tile.correct, .tile.gold { background: var(--good); }
.tile.silver { background: var(--warn); }
.row-msg { color: var(--muted); font-size: 13px; margin-top: 6px; }
.legend { color: var(--muted); font-size: 12px; text-align: center; margin: 10px 0; }

.result { margin-top: 14px; background: var(--card); border: 2px solid var(--brand); border-radius: var(--radius); padding: 16px; text-align: center; }
.result h2 { margin: 0 0 4px; font-family: Georgia, serif; }
.answer { font-size: 24px; font-weight: 800; text-transform: capitalize; margin: 6px 0 12px; }
.result .primary { width: 100%; margin-top: 10px; }
.countdown { color: var(--muted); font-size: 14px; margin-top: 12px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; align-items: end; justify-items: center; z-index: 15; }
.modal[hidden] { display: none; }
.sheet { background: var(--bg); width: 100%; max-width: 520px; max-height: 88dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); position: relative; }
.sheet h2 { margin: 0 0 10px; font-family: Georgia, serif; }
.sheet p, .sheet li { line-height: 1.45; }
.close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 30px; color: var(--muted); cursor: pointer; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin: 12px 0; }
.stats-grid b { display: block; font-size: 26px; }
.stats-grid span { font-size: 11px; color: var(--muted); }
.bar { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.bar i { display: block; height: 18px; background: var(--brand); border-radius: 4px; min-width: 18px; color: var(--brand-ink); font-style: normal; font-size: 12px; text-align: right; padding: 0 5px; line-height: 18px; }
.arch { display: grid; gap: 6px; margin-top: 8px; }
.arch button { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; border-radius: 10px; padding: 12px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---- timer and scoring ---- */
.top-right .icon-btn { width: 40px; }
.timer { display: flex; justify-content: center; align-items: baseline; gap: 14px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.timer[hidden] { display: none; }
.clock { font-size: 22px; font-weight: 700; }
.speed { font-size: 14px; color: var(--muted); }
.speed.hot { color: var(--warn); font-weight: 700; }
.score-big { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.score-big small { font-size: 16px; font-weight: 600; color: var(--muted); }
.breakdown { list-style: none; padding: 0; margin: 10px 0; text-align: left; font-size: 14px; }
.breakdown li { display: flex; justify-content: space-between; padding: 5px 2px; border-bottom: 1px dashed var(--line); }
.breakdown li:last-child { border-bottom: 0; }
.breakdown .neg { color: var(--err); }
.rankline { margin: 8px 0; font-weight: 600; }
.practice { color: var(--muted); font-size: 13px; margin: 6px 0; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btn-row .primary { margin: 0; width: 100%; }
.secondary { font: inherit; font-weight: 700; font-size: 17px; background: none; color: var(--brand); border: 2px solid var(--brand); border-radius: 12px; padding: 13px; cursor: pointer; }
.lb { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.lb li { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.lb li.you { border-color: var(--brand); border-width: 2px; }
.lb .rk { font-weight: 800; color: var(--muted); text-align: center; }
.lb .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .nm small { display: block; color: var(--muted); font-size: 12px; }
.lb .pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.namebox { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 8px 0; }
.namebox input { font: inherit; font-size: 16px; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 10px; padding: 10px; width: 100%; }
.namebox button { font: inherit; font-weight: 700; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 0 16px; cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }

/* three puzzles a day */
.slots{display:flex;gap:8px;margin:4px 0 8px}
.slots button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;border:2px solid var(--line,#d9d4c7);border-radius:12px;background:var(--card,#fff);color:inherit;font:inherit;font-size:13px;cursor:pointer}
.slots button b{font-size:14px;text-transform:capitalize}
.slots button.on{border-color:var(--brand,#1f4d3a);box-shadow:0 0 0 1px var(--brand,#1f4d3a) inset}
.slots button:disabled{opacity:.5;cursor:default}
.slots button small{opacity:.92;font-weight:600}
.daytotal{margin:6px 0;font-weight:600}

/* hints: gold button, definitions button */
.hint-row{display:flex;gap:8px}
.hint-row button{flex:1}
.hint-gold{position:relative;overflow:hidden;border:0;border-radius:14px;padding:13px 12px;font:inherit;font-weight:800;font-size:15px;color:#3a2600;cursor:pointer;
  background:linear-gradient(135deg,#ffe27a,#f5b301 55%,#ffd24d);box-shadow:0 3px 0 #b87d00,0 8px 16px rgba(245,179,1,.35);transition:transform .08s,box-shadow .08s}
.hint-gold::after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.65),transparent);transform:skewX(-20deg);animation:shine 3.2s ease-in-out infinite}
.hint-gold:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #b87d00,0 4px 10px rgba(245,179,1,.3)}
.hint-gold:disabled{filter:grayscale(.55) brightness(1.02);box-shadow:none;cursor:default}
.hint-gold:disabled::after{animation:none;opacity:0}
.hint-gold.give{background:linear-gradient(135deg,#ffb09a,#e8573a);color:#3b0b00;box-shadow:0 3px 0 #a53a22,0 8px 16px rgba(232,87,58,.3)}
.hint-gold small{display:block;font-weight:600;font-size:12px;opacity:.8}
.def-btn{border:2px solid #4a7fd0;background:transparent;color:#4a7fd0;border-radius:14px;padding:11px 12px;font:inherit;font-weight:700;font-size:14px;cursor:pointer}
.def-btn small{display:block;font-weight:600;font-size:12px;opacity:.8}
.def-btn:disabled{opacity:.5}
.hint-bar i{background:linear-gradient(90deg,#f5b301,#ffe27a)}
.defs{margin-top:8px;background:var(--card);border:1px solid #4a7fd0;border-radius:10px;padding:8px 12px;font-size:14px;display:grid;gap:4px}
.defs b{color:#4a7fd0}
@keyframes shine{0%,60%{left:-60%}100%{left:130%}}
@media (prefers-reduced-motion:reduce){.hint-gold::after{animation:none}}

.def{font-style:normal;text-transform:none;letter-spacing:0;font-size:14px;color:#4a7fd0;margin:0 2px}

.daynav{display:flex;justify-content:space-between;gap:8px;margin:0 0 6px}
.daynav button,.linkbtn{background:none;border:0;color:var(--muted);font:inherit;font-size:13px;cursor:pointer;padding:6px 4px;text-decoration:underline}
.daynav button:disabled{opacity:.4;text-decoration:none}
.foot{text-align:center;margin:18px 0 8px}

/* header: big FOSOCONI with the subtitle spread to exactly the same width underneath */
.top h1 { display: block; width: max-content; justify-self: center; font-size: 28px; letter-spacing: 1px; }
.top h1 .brand { display: block; margin-right: -1px; } /* cancels the trailing letter space so it centers exactly */
.top h1 small { display: block; width: 100%; text-align: center; font-size: 11px; margin-top: 2px; }
.top h1 small span { display: inline-block; white-space: nowrap; }
.help-btn { background: none; border: 0; color: var(--ink); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: "Courier Prime", "American Typewriter", "Courier New", Courier, monospace; font-weight: 700; font-size: 11px; line-height: 1; text-transform: uppercase; letter-spacing: .3px; }
.help-btn:active { background: var(--line); }
.help-btn span { display: block; text-align: center; }

/* true-centered title, one icon each side, the rest in a row underneath */
.top > :first-child { justify-self: start; }
.top-right { justify-self: end; }
.subbar { display: flex; justify-content: center; gap: 8px; padding: 8px 0 2px; }
.subbar button { flex: 1; white-space: nowrap; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 12px; padding: 8px 4px; border-radius: 99px; cursor: pointer; }
.subbar button:active { background: var(--line); }

/* ---- compact play screen: clue, answers, guess and hints fit on one phone screen ---- */
main { padding-bottom: 8px; }
.top { padding: 6px 0; }
.top h1 { font-size: 32px; }
.top h1 small { font-size: 12px; margin-top: 1px; }
.help-btn, .icon-btn { height: 38px; }
.subbar { padding: 6px 0 0; gap: 6px; }
.subbar button { padding: 6px 4px; font-size: 11.5px; }
.slots { margin: 6px 0 2px; gap: 6px; }
.slots button { padding: 5px 2px; font-size: 11px; border-radius: 10px; }
.slots button b { font-size: 13px; }
.daynav { margin: 0; }
.daynav button { padding: 2px 4px; font-size: 12px; }
.meta { margin: 4px 0 2px; font-size: 12px; }
.chip { padding: 1px 7px; font-size: 10px; margin-left: 4px; }
.clue { margin: 4px 0; gap: 8px; }
.clue-word { padding: 15px 6px; font-size: clamp(21px, 6.6vw, 29px); }
.timer { margin: 2px 0; }
.clock { font-size: 18px; }
.speed { font-size: 13px; }
.how { display: none; }
form { gap: 6px; }
.field { gap: 2px; font-size: 11px; }
.field input { padding: 11px 12px; font-size: 17px; }
.def { font-size: 13px; }
.primary { padding: 13px; font-size: 16px; }
.error { min-height: 0; margin: 4px 2px 0; font-size: 13px; }
.error:empty { display: none; }
.hints { margin: 6px 0 0; }
.hint-gold { padding: 8px 10px; font-size: 14px; }
.def-btn { padding: 7px 10px; font-size: 13px; }
.hint-row { align-items: stretch; }
.hint-bar { margin: 6px 0 0; height: 5px; }
.hints ul { margin: 6px 0 0; gap: 4px; }
.hints li { padding: 6px 10px; font-size: 13px; }
.foot { display: none; }

/* finished puzzle: the result takes over the screen, so there is nothing to scroll past */
main.done .clue, main.done .attempts, main.done .legend, main.done .how, main.done #error, main.done .timer { display: none; }
.result { margin-top: 8px; padding: 14px 14px 12px; animation: pop .3s ease-out; }
.result h2 { margin: 0 0 6px; font-size: 22px; }
.result .answer { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; text-transform: capitalize; margin: 2px 0 6px; }
.result .score-big { font-size: 40px; margin: 2px 0; }
.result .primary { width: 100%; margin-top: 10px; }
.how-scored { margin-top: 10px; text-align: left; font-size: 14px; }
.how-scored summary { cursor: pointer; color: var(--muted); text-align: center; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

/* the hidden attribute must always win over component display rules */
[hidden] { display: none !important; }
main.done #guess-form, main.done #hints { display: none !important; }

/* guess feedback: words marked right or wrong, rhyme badge */
.row-words { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.gw.ok { color: var(--good); } .gw.no { color: var(--err); }
.dot { color: var(--muted); }
.rbadge { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--bad); color: var(--ink); white-space: nowrap; }
.rbadge.gold { background: var(--good); color: #fff; } .rbadge.silver { background: var(--warn); color: #3a2600; }
.field input.ok { border-color: var(--good); } .field input.bad { border-color: var(--err); }

/* first-time tour */
.modal.tour{align-items:center;background:rgba(10,20,15,.72)}
.modal.tour .sheet{border-radius:22px;max-width:380px;width:calc(100% - 32px);padding:26px 22px 20px;text-align:center}
.modal.tour #modal-close{display:none}
.tour-card h2{margin:0 0 4px;font-family:Georgia,serif;font-size:24px}
.tour-brand{font-family:"Courier Prime","American Typewriter","Courier New",monospace;letter-spacing:2px;display:block;font-size:30px}
.tour-sub{font-family:"Courier Prime","Courier New",monospace;color:var(--muted);margin-bottom:10px}
.tour-card p{margin:10px 0}
.tour-card .muted{color:var(--muted);font-size:14px}
.tour-clue,.tour-pairs>div,.tour-rhyme{display:flex;gap:10px;justify-content:center;margin:14px 0}
.tour-pairs{display:grid;gap:10px;margin:16px 0}
.tour-clue span,.tc{background:var(--card);border:2px solid var(--line);border-radius:12px;padding:10px 16px;font-weight:800;letter-spacing:2px;font-size:18px}
.tc{min-width:112px}
.ta,.tw{border-radius:12px;padding:10px 16px;font-weight:800;letter-spacing:2px;font-size:18px;background:var(--good);color:#fff;min-width:96px;opacity:0;animation:tourIn .5s ease forwards}
.ta.a1{animation-delay:.35s}.ta.a2{animation-delay:1s}
.tw:nth-child(1){animation-delay:.2s}.tw:nth-child(2){animation-delay:.7s}
.tour-badge{display:inline-block;background:rgba(46,158,91,.15);color:var(--good);font-weight:800;border-radius:999px;padding:5px 14px;opacity:0;animation:tourIn .5s ease 1.3s forwards}
.tour-fake{display:inline-block;padding:12px 26px;border-radius:14px}
.tour-hint{margin:14px 0}
@keyframes tourIn{from{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:none}}
.tour-dots{display:flex;gap:7px;justify-content:center;margin:18px 0 14px}
.tour-dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.tour-dots i.on{background:var(--brand);width:22px;border-radius:6px}
.tour-next{width:100%;padding:15px;font-size:17px;font-weight:800}
.linkbtn{background:none;border:0;color:var(--muted);font:inherit;font-size:14px;margin-top:10px;padding:6px;cursor:pointer;text-decoration:underline}

.tour-levels{display:flex;gap:8px;justify-content:center;margin:12px 0}
.tour-levels span{border:2px solid var(--line);border-radius:999px;padding:6px 14px;font-weight:800;font-size:14px;background:var(--card)}
.tour-lead{margin:6px 0 12px;font-size:15px}
.tour-ex{display:grid;gap:9px;margin:4px 0 10px}
.tour-row{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:8px 10px}
.tour-clues{display:flex;gap:8px;justify-content:center;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;font-weight:700}
.tour-clues span+span::before{content:"\00b7";margin-right:8px}
.tour-answers{display:flex;gap:8px;justify-content:center;align-items:center;margin-top:6px;flex-wrap:wrap}
.tour-row .tw{min-width:0;padding:7px 14px;font-size:16px;animation-delay:calc(var(--d) + .25s)}
.tour-row .tw:nth-child(2){animation-delay:calc(var(--d) + .6s)}
.tour-row .tour-badge{font-size:12px;padding:4px 10px;animation-delay:calc(var(--d) + .95s)}
/* live green tick + tap to start */
.inwrap{position:relative;display:block}
.inwrap input{width:100%}
.tick{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:var(--good);color:#fff;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:800;text-transform:none;letter-spacing:0;pointer-events:none}
.tick[hidden]{display:none}
.tick.pop{animation:tickPop .55s ease}
@keyframes tickPop{0%{transform:translateY(-50%) scale(.4);opacity:0}55%{transform:translateY(-50%) scale(1.25);opacity:1}100%{transform:translateY(-50%) scale(1)}}
.field input.ok{background:rgba(46,158,91,.10);box-shadow:0 0 0 3px rgba(46,158,91,.25);transition:box-shadow .3s}
.gate{position:fixed;inset:0;z-index:9;border:0;margin:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;cursor:pointer;
  background:radial-gradient(circle at 50% 40%,#2c6b52,#173a2c);color:#fff;font:inherit;padding:24px}
.gate[hidden]{display:none}
.gate-brand{font-family:"Courier Prime","American Typewriter","Courier New",monospace;font-weight:700;letter-spacing:6px;font-size:30px;opacity:1}
.gate-kind{font-family:Georgia,serif;font-size:38px;font-weight:700;margin-top:18px}
.gate-sub{opacity:.8;font-size:16px}
.start-btn{display:block;width:100%;max-width:340px;margin:0 auto;border:0;cursor:pointer;font-family:inherit;background:linear-gradient(180deg,#ffd75a,#f5b301);color:#3a2600;border-radius:22px;padding:22px 38px;font-weight:900;font-size:28px;letter-spacing:3px;text-align:center;box-shadow:0 6px 0 #b87d00,0 14px 30px rgba(0,0,0,.28);animation:gatePulse 1.6s ease-in-out infinite}
.start-btn:active,.gate:active .start-btn{transform:translateY(4px);box-shadow:0 2px 0 #b87d00}
.gate-go{margin-top:34px}
.gate-note{margin-top:22px;opacity:.92;font-size:14px;font-weight:600}.gate-note+.gate-note{margin-top:6px}
@keyframes gatePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
.tour-row .tw{padding:6px 11px;font-size:15px;letter-spacing:1px}
.tour-row .tour-badge{padding:3px 8px;font-size:11px}
.tour-answers{gap:6px;flex-wrap:nowrap}

/* tour v3: numbered steps, arrow cells, back button */
.tour-steps{list-style:none;margin:12px 0 4px;padding:0;display:grid;gap:12px;text-align:left}
.tour-steps li{display:grid;grid-template-columns:30px 1fr;gap:12px;align-items:start;line-height:1.35;font-size:15px}
.tour-steps li>b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--brand);color:var(--brand-ink);font-size:15px}
.tour-row{display:grid;gap:5px;justify-items:center}
.tour-cells{display:flex;gap:12px;justify-content:center}
.tour-cell{display:grid;justify-items:center;gap:1px}
.tour-cell .cw{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.5px;font-weight:700}
.tour-cell i{font-style:normal;color:var(--muted);font-size:12px;line-height:1}
.tour-row .tour-badge{font-size:12px;padding:3px 10px}
.tour-nav{display:flex;gap:10px}
.tour-back{flex:0 0 30%;font-size:16px;padding:15px 0}
.tour-nav .tour-next{flex:1}

.tour-ex{gap:7px;margin:4px 0 12px}
.tour-row{padding:6px 8px;gap:3px}

/* tour v4: animated demo phone */
.demo{margin:6px 0 2px;text-align:left}
.demo-cap{min-height:42px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:700;font-size:15px;line-height:1.25;margin-bottom:6px;padding:0 4px}
.demo-cap.in{animation:capIn .4s ease}
@keyframes capIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.demo-screen{position:relative;border:2px solid var(--line);border-radius:18px;padding:9px;background:var(--bg);overflow:hidden;pointer-events:none;user-select:none;min-height:318px}
.demo .clue{margin:0 0 6px;gap:8px}
.demo .clue-word{padding:10px 6px;font-size:21px;transition:box-shadow .3s}
.demo .clue.hl .clue-word{box-shadow:0 0 0 3px rgba(245,179,1,.7)}
.demo-form{display:grid;gap:5px}
.demo .field{gap:2px;font-size:10px}
.demo .field input{padding:8px 11px;font-size:16px;width:100%}
.demo .def{font-size:12px}
.demo .primary{padding:10px;font-size:15px;transition:transform .15s}
.demo .hints{margin:8px 0 0}
.demo .hint-gold{padding:7px 8px;font-size:13px}
.demo .hint-gold small{display:block;font-size:11px;font-weight:600;opacity:.8}
.demo .def-btn{padding:6px 8px;font-size:12px}
.demo .hints ul{margin:6px 0 0;gap:4px;list-style:none;padding:0;display:grid;min-height:0}
.demo .hints li{padding:5px 9px;font-size:12px;animation:capIn .35s ease}
.demo .press{transform:translateY(2px) scale(.97)}
.demo-result{display:grid;align-content:center;min-height:296px}
.demo-result .result{margin:0;animation:pop .3s ease-out}
.demo-result .tour-badge{opacity:1;animation:none;margin-top:6px;font-size:12px}
.demo-finger{position:absolute;left:50%;top:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border-radius:50%;background:rgba(40,40,40,.3);border:2px solid rgba(255,255,255,.95);box-shadow:0 3px 10px rgba(0,0,0,.35);transition:left .5s ease,top .5s ease,opacity .25s;opacity:0;z-index:2}
.demo-finger.tap{animation:fingerTap .35s ease}
@keyframes fingerTap{0%{transform:scale(1)}40%{transform:scale(.7);background:rgba(40,40,40,.5)}100%{transform:scale(1)}}
.tour-pts{list-style:none;margin:10px 0 4px;padding:0;display:grid;gap:12px;text-align:left}
.tour-pts li{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start;line-height:1.35;font-size:15px}
.tour-pts li>span{font-size:24px;text-align:center}
.modal.tour .sheet{max-height:94dvh}
.demo-hints .demo-screen{min-height:388px}
.demo-hints .demo-result{min-height:366px}

/* tour card 1: short steps with pop-out chips */
.tour-steps{gap:14px}
.tour-steps li{font-size:17px;align-items:center}
.tour-steps li>span{display:grid;gap:6px}
.chips{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-style:normal}
.chips i{font-style:normal;font-weight:900;letter-spacing:1.5px;text-transform:uppercase;font-size:15px;border-radius:10px;padding:6px 12px}
.chips .cc{background:linear-gradient(180deg,#ffd75a,#f5b301);color:#3a2600;box-shadow:0 2px 0 #b87d00}
.chips .ca{background:var(--good);color:#fff;box-shadow:0 2px 0 #1f7a43}
.chips .ok{background:rgba(46,158,91,.15);color:var(--good);font-size:12px;letter-spacing:0;padding:4px 9px;text-transform:none}
.tour-lead{font-size:16px;font-weight:700}
.tour-steps li>span{display:block}
.tour-steps .chips{margin-top:7px}
.pairs{display:grid;gap:7px;margin-top:7px;font-style:normal}
.pr{display:flex;align-items:center;gap:9px}
.pr i{font-style:normal;font-weight:900;letter-spacing:1.5px;text-transform:uppercase;font-size:15px;border-radius:10px;padding:6px 12px}
.pr .cc{background:linear-gradient(180deg,#ffd75a,#f5b301);color:#3a2600;box-shadow:0 2px 0 #b87d00}
.pr .ca{background:var(--good);color:#fff;box-shadow:0 2px 0 #1f7a43}
.pr u{text-decoration:none;font-weight:900;font-size:22px;line-height:1;color:var(--muted)}
.pr .cc{min-width:92px;text-align:center}
.pr .ca{min-width:64px;text-align:center}
.primary.last{background:var(--err);color:#fff;animation:lastPulse 1.4s ease-in-out infinite}
@keyframes lastPulse{0%,100%{box-shadow:0 0 0 0 rgba(179,64,47,.45)}50%{box-shadow:0 0 0 6px rgba(179,64,47,0)}}
.tour-levels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0 12px}
.tour-levels span{border:2px solid var(--line);border-radius:12px;padding:8px 4px;background:var(--card);font-weight:800;font-size:14px}

/* tutorial card: compact so it fits one screen */
.modal.tour .sheet{padding:16px 18px 12px;max-height:none;overflow:visible}
.tour-card h2{font-size:21px}
.tour-brand{font-size:26px}
.tour-sub{margin-bottom:4px;font-size:14px}
.tour-lead{margin:4px 0 6px}
.tour-levels{margin:6px 0 8px}
.tour-levels span{padding:6px 4px}
.tour-steps{gap:10px;margin:8px 0 2px}
.tour-steps li{font-size:16px}
.tour-steps .chips,.pairs{margin-top:5px}
.chips i,.pr i{padding:5px 11px;font-size:14px}
.chips .ok{padding:4px 8px;font-size:12px}
.pairs{gap:5px}
.tour-dots{margin:10px 0 10px}
.tour-next,.tour-back{padding:13px 0}
.tour-nav .tour-next{padding:13px}
.linkbtn{margin-top:4px;padding:4px}
.demo-cap{min-height:38px;font-size:14px;margin-bottom:4px}
.tour-pts{gap:10px}

/* notes */
.linkbtn{display:block;margin:10px auto 0;background:none;border:0;color:inherit;text-decoration:underline;opacity:.75;font:inherit;font-size:14px;padding:6px}
.ideabox{margin:12px 0 4px;padding:10px 12px;border-radius:12px;background:rgba(212,175,55,.16);border:1px solid rgba(212,175,55,.5);display:grid;gap:2px;text-align:center}
.ideabox span{font-size:13px;opacity:.8}
.seg{display:flex;gap:6px;margin:6px 0 10px}.seg button{flex:1;padding:8px;border-radius:10px;border:1px solid rgba(128,128,128,.4);background:none;color:inherit;font:inherit}
.seg button.on{background:rgba(212,175,55,.25);border-color:#d4af37;font-weight:700}
.noterow{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
#modal textarea,#modal #note-contact,.noterow input{width:100%;box-sizing:border-box;padding:10px;border-radius:10px;border:1px solid rgba(128,128,128,.4);background:transparent;color:inherit;font:inherit;margin-bottom:8px}
.secondary.wide{display:block;width:100%;margin-top:8px}

/* answer reveal: clue, arrow down, answer, then why */
.reveal{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 6px}
.rv{display:grid;justify-items:center;gap:2px}
.rv-clue{font-weight:700;font-size:17px;text-transform:capitalize;padding:4px 14px;border-radius:99px;background:rgba(212,175,55,.2);border:1px solid rgba(212,175,55,.6)}
.rv-arrow{font-size:22px;line-height:1;opacity:.7}
.rv-ans{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:26px;text-transform:capitalize;padding:2px 14px;border-radius:12px;background:rgba(46,160,67,.18);border:1px solid rgba(46,160,67,.6)}
.why{text-align:left;font-size:14px;margin:4px 0 10px;opacity:.9}
.why ul{margin:0;padding:0;list-style:none;display:grid;gap:4px}
.why li:last-child{opacity:.8}

/* home screen */
.home{position:fixed;inset:0;z-index:8;overflow-y:auto;background:var(--bg);color:var(--ink)}
.home[hidden]{display:none}
.home-in{max-width:460px;margin:0 auto;padding:22px 16px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px;min-height:100%;box-sizing:border-box}
.home-top{text-align:center;margin-top:6px}
.home-brand{margin:0;font-family:"Courier Prime","American Typewriter","Courier New",monospace;font-weight:700;letter-spacing:5px;font-size:34px;color:var(--brand)}
.home-sub{margin:2px 0 0;font-family:Georgia,serif;font-style:italic;opacity:.75}
.home-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px}
.home-label{display:block;font-size:13px;font-weight:700;opacity:.7;margin-bottom:6px}
.home-card .namebox{margin:0}
.home-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.home-stats div{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 4px;text-align:center;display:grid;gap:2px}
.home-stats b{font-size:20px}.home-stats span{font-size:11px;opacity:.7}
.home-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.home-tile{display:grid;justify-items:center;gap:4px;padding:14px 8px;border-radius:14px;border:1px solid var(--line);background:var(--card);color:inherit;font:inherit;font-weight:700;cursor:pointer}
.home-tile span{font-size:24px}
.home-tile:active{background:var(--line)}
.home-idea{padding:13px;border-radius:14px;border:2px dashed rgba(212,175,55,.8);background:rgba(212,175,55,.14);color:inherit;font:inherit;font-weight:700;cursor:pointer}
.home-play{margin-top:auto;padding-top:8px;display:grid;gap:6px;text-align:center;position:sticky;bottom:0;background:linear-gradient(transparent,var(--bg) 30%)}
.home-play small{opacity:.7;font-size:13px}

/* bigger buttons and text outside the game frame */
.subbar{gap:8px;padding:10px 0 4px}
.subbar button{font-size:15px;padding:11px 6px;font-weight:600}
.home-in{max-width:480px;gap:16px}
.home-brand{font-size:40px}.home-sub{font-size:19px}
.home-label{font-size:15px}.home-label2{margin-top:12px}.home-label2 em{font-style:normal;font-weight:500;opacity:.8}
.home-card .namebox input,.home-email{font-size:19px;padding:13px}
.home-email{width:100%;box-sizing:border-box;font:inherit;font-size:19px;background:var(--card);color:var(--ink);border:2px solid var(--line);border-radius:10px;padding:13px}
.home-card .namebox button{font-size:18px;padding:0 20px}
.home-stats b{font-size:26px}.home-stats span{font-size:13px}
.home-tile{font-size:19px;padding:20px 8px}.home-tile span{font-size:32px}
.home-idea{font-size:19px;padding:17px}
.home-play{gap:8px;padding-top:12px}
.home-play #home-what{font-size:22px;font-family:Georgia,serif}
.home-play small{font-size:15px}
.gate-kind{font-size:42px}.gate-sub{font-size:19px}.gate-note{font-size:16px}
.sheet{font-size:17px}.sheet h2{font-size:28px}
.sheet .primary,.sheet .secondary,.sheet button.primary{font-size:19px;padding:15px}
.sheet input,.sheet textarea{font-size:18px}
.linkbtn{font-size:16px}.ideabox b{font-size:18px}.ideabox span{font-size:15px}
.home-play{background:var(--bg);padding-bottom:10px;margin-top:auto}

/* instant check of a player's own clue */
.vcheck{margin:2px 0 10px;padding:10px 12px;border-radius:12px;border:2px solid var(--line);background:var(--card);font-size:16px}
.vcheck b{display:block;font-size:19px;margin-bottom:4px}
.vcheck ul{margin:0;padding:0;list-style:none;display:grid;gap:3px}
.vcheck.works{border-color:var(--good);background:rgba(46,158,91,.12)} .vcheck.works b{color:var(--good)}
.vcheck.fix{border-color:var(--err);background:rgba(179,64,47,.08)} .vcheck.fix b{color:var(--err)}
.vcheck.unsure{border-color:var(--warn)}
.vcheck li.yes{color:var(--good)} .vcheck li.no{color:var(--err);font-weight:700} .vcheck li.maybe{opacity:.8}

/* archive calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 6px; font-size: 18px; }
.cal-head button { background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 44px; height: 44px; font-size: 24px; cursor: pointer; }
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal em { text-align: center; font-style: normal; font-size: 12px; color: var(--muted, #888); padding: 2px 0; }
.cal-off { text-align: center; padding: 12px 0; opacity: .3; font-size: 14px; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; border-radius: 10px; padding: 8px 0 7px; cursor: pointer; }
.cal-day b { font-weight: 600; font-size: 15px; }
.cal-day.today { border-color: #e0b030; box-shadow: 0 0 0 1px #e0b030; }
.cal-day i { display: flex; gap: 3px; }
.cal u, .cal-key u { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1px solid var(--line); text-decoration: none; }
.cal u.won, .cal-key u.won { background: #3a9d63; border-color: #3a9d63; }
.cal u.lost, .cal-key u.lost { background: #c0584a; border-color: #c0584a; }
.cal u.part, .cal-key u.part { background: #e0b030; border-color: #e0b030; }
.cal-key { font-size: 12px; line-height: 1.8; }
.crowd { margin: 6px 0; font-size: 14px; color: var(--muted, #888); }

/* tutorial: how words rhyme */
.tour-rhyme { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 12px; text-align: left; }
.tour-rhyme li { font-size: 15px; line-height: 1.35; }
.tour-rhyme .rr { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 10px; border-radius: 10px; font-size: 15px; }
.tour-rhyme .rr i { font-style: normal; font-weight: 700; }
.tour-rhyme .rr u { text-decoration: none; margin-left: auto; font-size: 12px; opacity: .7; }
.tour-rhyme .rr.good { background: rgba(46,158,91,.14); color: var(--good); }
.tour-rhyme .rr.bad { background: rgba(192,88,74,.14); color: #c0584a; }
.tour-note { font-size: 13px; line-height: 1.4; margin: 6px 0 0; opacity: .85; text-align: left; }

/* spelling hint: close to an answer but not a word */
.near { display: block; font-style: normal; font-size: 14px; font-weight: 600; color: #b8860b; margin-top: 6px; }
.near[hidden] { display: none; }

/* letter tiles for the answer boxes */
#guess-form .inwrap.tiled input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; font-size: 16px; }
.tiles { display: flex; gap: 6px; justify-content: center; cursor: text; }
.tiles .t { flex: 1 1 0; min-width: 0; max-width: 46px; aspect-ratio: 1; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 10px; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; user-select: none; }
.tiles .t.f { border-color: var(--muted, #999); }
.tiles .t.cur { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,77,58,.25); }
.tiles .t.gap { box-shadow: -4px 0 0 0 var(--err); }
.tiles .t.mk-ok { background: rgba(46,158,91,.20); border-color: var(--good); }
.tiles .t.mk-bad { background: rgba(192,88,74,.20); border-color: var(--err); }
.inwrap.tiled input.ok ~ .tiles .t.f { background: rgba(46,158,91,.22); border-color: var(--good); }
.inwrap.tiled input.bad ~ .tiles .t.f { background: rgba(192,88,74,.18); border-color: var(--err); }
.inwrap.tiled .tick { position: static; display: inline-block; transform: none; margin: 8px 0 0; }
.inwrap.tiled .tick.pop { animation: tickPop2 .55s ease; }
@keyframes tickPop2 { 0% { transform: scale(.4); opacity: 0; } 55% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); } }
.inwrap.tiled .tick[hidden] { display: none; }
#guess-form .field input.ok { box-shadow: none; background: transparent; }

/* tutorial demo: same letter tiles as the real game, a bit smaller */
.demo .inwrap.tiled input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.demo .tiles { gap: 4px; justify-content: flex-start; }
.demo .tiles .t { max-width: 30px; font-size: 15px; border-radius: 7px; border-width: 2px; cursor: default; }
.demo .inwrap.tiled .tick { margin: 4px 0 0; }

/* tutorial: How words rhyme, animated syllable breakdown */
.rhy { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px 10px; margin: 8px 0 4px; }
.rhy .demo-cap { min-height: 56px; }
.rhy-stage { display: grid; gap: 10px; justify-items: end; justify-content: center; margin: 6px auto 0; min-height: 112px; align-content: center; }
.rhy .rw { display: flex; gap: 6px; justify-content: flex-end; }
.rhy .sy { padding: 10px 10px; min-width: 50px; text-align: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; font-size: 20px; transition: background .3s, border-color .3s, color .3s, opacity .3s, transform .3s; }
.rhy .sy.ok { background: rgba(46,158,91,.22); border-color: var(--good); transform: translateY(-2px); }
.rhy .sy.bad { background: rgba(192,88,74,.20); border-color: var(--err); transform: translateY(-2px); }
.rhy .sy.skip { opacity: .4; border-style: dashed; }
.rhy-badge { min-height: 26px; margin-top: 10px; text-align: center; font-weight: 800; font-size: 16px; opacity: 0; transition: opacity .3s; }
.rhy-badge.show { opacity: 1; }
.rhy-badge.good { color: var(--good); }
.rhy-badge.no { color: var(--err); }
.rhy .sy.hl { background: #fff3b0; border-color: #e0b400; transform: translateY(-3px) scale(1.06); }
.rhy-badge { min-height: 40px; line-height: 1.25; padding: 0 6px; }

.rhy .rw { transition: opacity .4s; }
.rhy .rw.pend { opacity: 0; }
.rhy .sy.skip { opacity: .7; color: #5b5b5b; background: #f1efe8; }
.rhy .demo-cap { color: var(--ink); }
.tour-card .tour-note { font-size: 15px; font-weight: 600; opacity: 1; color: var(--ink); text-align: center; margin-top: 10px; }

/* rhyme tutorial: work in light and dark mode */
.rhy .sy { background: rgba(127,127,127,.14); color: var(--ink); border-color: rgba(127,127,127,.45); }
.rhy .sy.ok { background: rgba(46,158,91,.30); border-color: var(--good); color: var(--ink); }
.rhy .sy.bad { background: rgba(192,88,74,.30); border-color: var(--err); color: var(--ink); }
.rhy .sy.skip { background: transparent; color: var(--ink); opacity: .55; border-style: dashed; }
.rhy .sy.hl { background: #ffe066; border-color: #e0b400; color: #1b1b1b; }

.home-legal{margin:2px 0 0;text-align:center;font-size:12px;line-height:1.7;opacity:.65}
.home-legal a{color:inherit;text-decoration:underline}

/* end-of-day share card */
.sharecard{margin:14px 0 8px;padding:12px;border-radius:14px;border:2px solid var(--brand);background:var(--card);display:grid;gap:8px;text-align:center}
.sharecard b{font-size:16px}
.sharepre{margin:0;padding:10px;border-radius:10px;background:rgba(128,128,128,.12);font:inherit;font-size:17px;line-height:1.5;white-space:pre-wrap;word-break:break-word;text-align:left}
.sharecard .btn-row{margin-top:2px}
.sharecard .primary{font-size:20px;padding:16px}
.sharecard .secondary{font-size:18px}

.lbtabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;background:var(--line);border-radius:12px;padding:4px;margin:6px 0 10px}
.lbtabs button{font:inherit;font-weight:700;font-size:14px;background:transparent;color:var(--muted);border:0;border-radius:9px;padding:9px 0;cursor:pointer}
.lbtabs button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.lb li.podium{padding:12px 10px}
.lb li.podium .rk{font-size:20px}
.lb li.podium .pts{font-size:18px}

.streak-pill{font:inherit;font-weight:800;font-size:15px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:99px;padding:0 10px;height:32px;align-self:center;cursor:pointer;font-variant-numeric:tabular-nums}
.streak-pill.risk{border-color:#e08a00;animation:pillpulse 2s ease-in-out infinite}
@keyframes pillpulse{50%{box-shadow:0 0 0 3px rgba(224,138,0,.25)}}
@media (prefers-reduced-motion:reduce){.streak-pill.risk{animation:none}}
.home-streak{display:block;margin-top:6px;font-weight:700}
.streakline{font-weight:800;font-size:18px;margin:4px 0}
.madeby{margin:-2px 0 6px;text-align:center;font-size:13px;color:var(--muted,#6b6b6b)}.madeby b{color:var(--ink,inherit)}
.idea-badge{font-style:normal;font-size:.85em;margin-left:4px;vertical-align:baseline}
.lb .flame{font-style:normal;font-size:12px;font-weight:700;color:#e08a00;margin-left:5px;letter-spacing:-1px}
/* username sign-in and the name pill that stays at the top */
.whoami { display: block; margin: 6px auto 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami[hidden] { display: none; }
.signin { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: var(--bg); color: var(--ink); }
.signin[hidden] { display: none; }
.signin-in { max-width: 460px; margin: 0 auto; padding: 36px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; box-sizing: border-box; }
.signin h2 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 24px; }
.signin-sub { margin: 0 0 14px; opacity: .85; line-height: 1.4; }
.signin-input { font: inherit; font-size: 20px; font-weight: 700; width: 100%; box-sizing: border-box; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 14px; }
.signin .primary, .signin .secondary { width: 100%; margin-top: 10px; padding: 14px; font-size: 18px; }
.signin-q { margin: 6px 0 0; line-height: 1.4; }
.home-switch { display: block; margin: 6px 0 0; font-size: 13px; }

.hear{display:block;margin:0 auto 6px;font:inherit;font-weight:700;font-size:14px;background:none;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:6px 14px;cursor:pointer}
.hear:active{background:var(--line)}
.altline{list-style:none;margin-left:-20px;padding:8px 10px;border-radius:10px;background:var(--card);border:1px solid var(--brand)}

.grp-list{list-style:none;padding:0;margin:10px 0;display:grid;gap:6px}
.grp-row{width:100%;display:grid;grid-template-columns:40px 1fr auto;gap:8px;align-items:center;text-align:left;font:inherit;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:10px;padding:10px;cursor:pointer}
.grp-ic{font-size:26px;text-align:center}
.grp-nm{font-weight:700}
.grp-nm small{display:block;color:var(--muted);font-weight:400;font-size:12px}
.iconpick{display:grid;grid-template-columns:repeat(8,1fr);gap:6px;margin:8px 0}
.iconpick button{font-size:22px;padding:6px 0;background:var(--card);border:2px solid var(--line);border-radius:10px;cursor:pointer}
.iconpick button.on{border-color:var(--brand)}
.modal h2 .grp-ic{font-size:28px;vertical-align:middle;margin-right:4px}
.linkbtn.wide,.primary.wide{width:100%}
.subbar{gap:6px}.subbar button{font-size:13px;padding:10px 2px}

/* profile screen: username and email live here, not on Home */
.home-top{position:relative}
.avatar-btn{position:absolute;top:0;right:0;width:44px;height:44px;border-radius:50%;border:2px solid var(--brand);background:var(--card);color:var(--brand);font:inherit;font-weight:800;font-size:19px;cursor:pointer;display:grid;place-items:center;padding:0}
.avatar-btn:active{background:var(--line)}
.profile{position:fixed;inset:0;z-index:12;overflow-y:auto;background:var(--bg);color:var(--ink)}
.profile[hidden]{display:none}
.profile-in{max-width:460px;margin:0 auto;padding:28px 16px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px;box-sizing:border-box;position:relative}
.profile-in h2{margin:0;text-align:center;font-family:Georgia,serif;font-size:26px}
.profile-close{position:absolute;top:10px;right:12px;width:44px;height:44px;border:0;background:none;color:var(--ink);font-size:32px;line-height:1;cursor:pointer}
.profile-pic{width:84px;height:84px;border-radius:50%;margin:6px auto 0;border:3px solid var(--brand);background:var(--card);color:var(--brand);display:grid;place-items:center;font-size:38px;font-weight:800}
/* the sheet's X stays on screen while a long sheet scrolls */
.sheet #modal-close{position:sticky;top:0;float:right;margin:-12px -6px 0 0;width:44px;height:44px;z-index:3;color:var(--ink);background:var(--bg);border-radius:50%;font-size:30px;line-height:1}
.grp-done{margin-top:14px}

/* ---- home: one screen, no scrolling. Compact tiles, modest START ---- */
.home{overflow:hidden}
.home .home-in{max-width:440px;height:100dvh;min-height:0;box-sizing:border-box;gap:clamp(6px,1.6dvh,12px);padding:calc(10px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom))}
.home .home-top{margin-top:0;padding:0 52px}
.home .home-brand{font-size:clamp(26px,4.6dvh,34px);letter-spacing:4px}
.home .home-sub{font-size:clamp(14px,2.2dvh,17px);margin-top:0}
.home .avatar-btn{width:42px;height:42px;top:2px}
.home .home-stats{gap:6px}
.home .home-stats div{padding:6px 2px;border-radius:10px}
.home .home-stats b{font-size:clamp(17px,3dvh,21px)}
.home .home-stats span{font-size:11px}
.home .home-grid{grid-template-columns:repeat(3,1fr);gap:8px}
.home .home-tile{padding:clamp(8px,1.5dvh,12px) 4px;font-size:13px;font-weight:700;gap:2px;border-radius:12px}
.home .home-tile span{font-size:clamp(20px,3.2dvh,25px)}
.home .home-idea{font-size:15px;padding:clamp(9px,1.5dvh,12px);border-radius:12px}
.home .home-legal{margin:0;font-size:11px;line-height:1.5}
.home .home-play{position:static;margin-top:auto;padding:0;gap:2px;background:none}
.home .home-play .start-btn{font-size:clamp(20px,3.4dvh,26px);padding:clamp(10px,1.8dvh,14px);letter-spacing:5px;border-radius:14px}
.home .home-play #home-what{font-size:clamp(15px,2.4dvh,18px);margin-top:4px}
.home .home-play small{font-size:12px}
.home .home-streak{margin-top:2px;font-size:13px}

/* ---- profile: picture, details, form ---- */
.avatar-btn{background-size:cover;background-position:center;overflow:hidden}
.avatar-btn.has-photo,.profile-pic.has-photo{color:transparent}
.profile-pic{position:relative;background-size:cover;background-position:center;cursor:pointer;font:inherit;font-weight:800;padding:0;width:104px;height:104px;font-size:44px}
.pic-badge{position:absolute;right:-4px;bottom:-4px;width:30px;height:30px;border-radius:50%;background:var(--brand);color:var(--brand-ink);display:grid;place-items:center;font-style:normal;font-size:15px;border:2px solid var(--bg)}
.profile-ident{display:grid;gap:2px;text-align:center;justify-items:center}
.profile-ident b{font-family:Georgia,serif;font-size:24px}
.profile-ident span{opacity:.75;font-size:15px;word-break:break-all}
.profile-ident span[hidden]{display:none}
.profile-rm{margin:-6px auto 0;font-size:13px}
.profile-rm[hidden]{display:none}
.profile-in h2{display:none}

.home .home-tile.home-idea{border:2px dashed rgba(212,175,55,.8);background:rgba(212,175,55,.14);color:inherit;font-size:13px;padding:clamp(8px,1.5dvh,12px) 4px}

/* home: use the spare height. Tiles grow with the screen, never past it. */
.home .home-in{gap:clamp(8px,2dvh,18px)}
.home .home-top{padding-top:clamp(0px,1dvh,10px)}
.home .home-brand{font-size:clamp(28px,5.4dvh,44px)}
.home .home-sub{font-size:clamp(15px,2.5dvh,20px)}
.home .home-stats div{padding:clamp(8px,1.6dvh,16px) 2px}
.home .home-stats b{font-size:clamp(19px,3.6dvh,30px)}
.home .home-stats span{font-size:clamp(11px,1.6dvh,13px)}
.home .home-grid{flex:1 1 0;min-height:0;grid-auto-rows:1fr;gap:clamp(8px,1.6dvh,14px)}
.home .home-tile,.home .home-tile.home-idea{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(2px,.8dvh,8px);font-size:clamp(13px,2.1dvh,16px);padding:4px}
.home .home-tile span{font-size:clamp(24px,4.6dvh,40px)}
.home .home-legal{font-size:clamp(11px,1.6dvh,13px)}
.home .home-play .start-btn{font-size:clamp(22px,3.8dvh,30px);padding:clamp(12px,2.2dvh,18px)}
.home .home-play #home-what{font-size:clamp(16px,2.7dvh,20px)}
.home .home-play small{font-size:clamp(12px,1.8dvh,14px)}

/* home: streak pill, top left, balances the profile circle */
.streak-btn{position:absolute;top:2px;left:0;height:42px;min-width:56px;padding:0 12px;border-radius:999px;border:2px solid rgba(212,175,55,.85);background:rgba(212,175,55,.14);color:var(--ink);font:inherit;font-weight:800;font-size:17px;cursor:pointer;display:grid;place-items:center}
.streak-btn.zero{border-color:var(--line);background:var(--card);opacity:.75}
.streak-btn.risk{animation:none;border-style:dashed}
.streak-btn:active{background:var(--line)}
.home .home-top{padding-left:68px;padding-right:56px}
.home .home-brand{letter-spacing:3px;font-size:clamp(24px,4.6dvh,38px)}
.home .avatar-btn{width:58px;height:58px;top:0;font-size:25px}
.home .streak-btn{top:8px;min-width:64px}
.home .home-top{padding-left:72px;padding-right:72px}
.home .avatar-btn{width:64px;height:64px;font-size:27px}
.home .streak-btn{width:64px;min-width:0;padding:0;top:11px}

/* ---- on-screen keyboard (touch phones) ---- */
.kbd{position:fixed;left:0;right:0;bottom:0;z-index:9;background:var(--bg);border-top:1px solid var(--line);padding:8px 4px calc(8px + env(safe-area-inset-bottom));display:grid;gap:6px;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.kbd[hidden]{display:none}
.krow{display:flex;gap:5px;justify-content:center}
.krow.k2{padding:0 14px}
.key{flex:1 1 0;min-width:0;height:clamp(40px,6.4dvh,52px);border:0;border-radius:7px;background:var(--key-bg);color:var(--key-ink);box-shadow:0 2px 0 var(--key-edge);font:inherit;font-weight:800;font-size:23px;text-transform:uppercase;cursor:pointer;-webkit-tap-highlight-color:transparent;padding:0}
.key:active{background:var(--key-down);transform:translateY(1px);box-shadow:0 1px 0 var(--key-edge)}
.key.wide{flex:1.55 1 0;font-size:14px}
.key[data-k="back"]{font-size:30px;line-height:1}
.key-pop{position:fixed;z-index:60;width:60px;height:64px;margin-left:-30px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--key-bg);color:var(--key-ink);font-weight:800;font-size:38px;text-transform:uppercase;pointer-events:none;box-shadow:0 8px 18px rgba(0,0,0,.35),0 0 0 2px var(--brand);animation:keypop .09s ease-out}
.key-pop[hidden]{display:none}
@keyframes keypop{from{transform:scale(.7) translateY(8px);opacity:.4}to{transform:none;opacity:1}}
.key.go{background:var(--brand);color:var(--brand-ink);letter-spacing:.5px}
body.kbd-show{padding-bottom:var(--kbd-h,200px)}
/* with the keyboard up, drop the extras so the play area fits above it; Enter on the keyboard replaces Guess */
body.kbd-show #submit,body.kbd-show .whoami,body.kbd-show .daynav{display:none}
body.kbd-show .clue-word{padding-top:10px;padding-bottom:10px}
body.kbd-show .slots{margin:2px 0}

/* ---- finished puzzle: the whole result card fits one screen ---- */
body.puzzle-done .whoami,body.puzzle-done #hear{display:none}
body.puzzle-done .result{margin-top:4px;padding:10px 12px 8px}
body.puzzle-done .result h2{font-size:20px;margin:0 0 2px}
body.puzzle-done .result>div:first-of-type+div{font-size:14px}
body.puzzle-done .reveal{margin:2px 0}
body.puzzle-done .rv{gap:2px}
body.puzzle-done .rv-arrow{line-height:1;font-size:14px}
body.puzzle-done .rv-clue{font-size:14px;padding:3px 12px}
body.puzzle-done .result .answer,body.puzzle-done .rv-ans{font-size:24px}
body.puzzle-done .why{font-size:13.5px;line-height:1.3;margin:4px 0}
body.puzzle-done .why p{margin:1px 0}
body.puzzle-done .result .score-big{font-size:36px;margin:0}
body.puzzle-done .rankline,body.puzzle-done .streakline{display:inline-block;margin:2px 7px;font-size:15px}
body.puzzle-done .result .primary{margin-top:6px;padding:12px}
body.puzzle-done .btn-row{margin-top:6px}
body.puzzle-done .btn-row .secondary{padding:10px}
body.puzzle-done .linkbtn#note-open,body.puzzle-done .how-scored summary{font-size:12px;padding:2px}
body.puzzle-done .how-scored{margin:2px 0}

/* ---- after the third puzzle: the day card (answer, points, share) fits one screen too ---- */
body.puzzle-done .meta{font-size:11.5px;margin:2px 0}
body.last-result .sharepre,body.last-result .sharecard>b,body.last-result .ideabox{display:none}
body.last-result .result{padding:8px 12px}
body.last-result .daytotal{margin:2px 0;font-size:15px}
body.last-result .sharecard{margin:8px 0 6px;padding:8px;gap:6px;grid-template-columns:1fr 1fr}
body.last-result .sharecard .btn-row{display:contents}
body.last-result .sharecard #share-pic{grid-column:1/-1}
body.last-result .sharecard .primary{font-size:18px;padding:11px;margin:0}
body.last-result .sharecard .secondary{font-size:16px;padding:10px;margin:0}
body.last-result .result>#board,body.last-result #idea-open{margin-top:6px;padding:10px;font-size:16px}
body.last-result #note-open,body.last-result .how-scored{display:inline-block;margin:0 8px}
body.last-result .countdown{margin-top:4px;font-size:13px}
/* streak pill in the play header: flame and number on one line, never wrapped */
.streak-pill{white-space:nowrap;flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;padding:0 9px;line-height:1}
.top h1{min-width:0}
/* last card: Leaderboard is in the top bar, so drop the big button and keep the page to one screen */
body.last-result .result>#board{display:none}
body.last-result .why{font-size:13px;line-height:1.25}
.top h1{font-size:clamp(22px,7.2vw,30px)}
.streak-pill{padding:0 8px;height:30px;font-size:14px}
/* header balance: How To Play on the left, streak over Stats on the right, same size and type */
.top-right{flex-direction:column;align-items:center;justify-content:center;gap:2px;width:44px;height:44px}
.top-right .streak-pill{background:none;border:0;padding:0;height:auto;font-size:13px;line-height:1;font-weight:700;color:var(--ink)}
.top-right .streak-pill.risk{color:#ffb347}
.top-right .icon-btn{width:44px;height:auto;min-height:0;padding:0;background:none;border:0;border-radius:12px;color:var(--ink);font-family:"Courier Prime","American Typewriter","Courier New",Courier,monospace;font-weight:700;font-size:11px;line-height:1;text-transform:uppercase;letter-spacing:.3px}
.top-right .icon-btn:active{background:var(--line)}
/* the word you are typing in: soft yellow outline on its boxes, bright yellow on the letter that takes the next key */
.inwrap.active .tiles .t:not(.mk-ok):not(.mk-bad){border-color:rgba(255,200,40,.22)}
.inwrap.active input.ok ~ .tiles .t.f,.inwrap.active input.bad ~ .tiles .t.f{border-color:rgba(255,200,40,.3)}
.tiles .t.cur{border-color:#ffc828;box-shadow:0 0 0 3px rgba(255,200,40,.28)}
.error.note{color:var(--good);font-weight:600}
.giveup-row{text-align:center;margin:14px 0 0}
.giveup-row .linkbtn{font-size:13px;opacity:.7}
.modal-actions{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.modal-actions .primary{width:100%}
.giveup-link{display:block;margin:10px auto 0;background:none;border:1px solid var(--line);color:var(--muted);font:inherit;font-size:13px;padding:6px 14px;border-radius:999px;cursor:pointer}
.giveup-link:active{background:var(--line)}
.pill-row{display:flex;justify-content:center;gap:8px;margin-top:10px}
.pill-row .giveup-link{margin:0}
.home-feedback{margin:6px auto 0}
.tw-list{margin:8px 0 8px;padding-left:20px;display:grid;gap:8px;text-align:left}
#tw-go{width:100%}
.home .home-legal{margin-top:8px}

.nextday{display:block;width:100%;margin:8px 0;font-size:20px}
.nextday small{display:block;font-weight:400;font-size:12px;opacity:.85;margin-top:2px}
body.last-result .nextday{padding:11px;font-size:18px}
.home .home-play .start-btn[data-next="1"]{letter-spacing:1px}

.krow.knum{display:none}
body.kbd-name .krow.knum{display:flex}
.krow.kname{display:none}
.key.shift{display:none;position:relative;font-size:24px}
/* The username keyboard (not the one used while playing): number row, three letter rows with Shift and Delete the same width,
   then a space bar with a green Continue key. Letters show in the case they will type. */
body.kbd-name .krow.kname{display:flex}
body.kbd-name .genter{display:none}
body.kbd-name .key.shift{display:block}
body.kbd-name .key.shift,body.kbd-name .key[data-k="back"]{flex:1.5 1 0;font-size:22px}
body.kbd-name .key[data-k="back"]{font-size:30px}
body.kbd-name .key{text-transform:none}
body.kbd-name .key-pop{text-transform:none}
body.kbd-name .krow.k2{padding:0 4%}
.key.space{flex:5 1 0;text-transform:none;font-size:16px;font-weight:700;letter-spacing:.4px}
.key.ngo{flex:2 1 0;text-transform:none;font-size:17px;font-weight:800}
.key.shift.on{background:var(--ink);color:var(--bg)}
.key.shift.lock{background:var(--brand);color:var(--brand-ink)}
.key.shift.lock::after{content:"";position:absolute;left:32%;right:32%;bottom:7px;height:3px;border-radius:2px;background:currentColor}
body.kbd-name .kbd{z-index:40}
body.kbd-name .signin-in{padding-bottom:calc(var(--kbd-h,260px) + 16px)}
body.kbd-name{padding-bottom:0}

.tour-step{text-align:center;font-weight:700;font-size:15px;letter-spacing:.3px;color:var(--brand);margin:12px 0 0}
.tour-step+.tour-dots{margin-top:8px}
.tour-dots i{width:10px;height:10px;background:#5b6a64}
.tour-dots i.on{width:26px;background:var(--brand)}

.rhy-track{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px}
.rt-label{font-weight:700;font-size:14px;min-width:120px;text-align:center;color:var(--brand)}
.rt-arrow{width:38px;height:34px;border-radius:10px;border:1.5px solid var(--brand);background:transparent;color:var(--brand);font-size:24px;line-height:1;font-family:inherit;cursor:pointer;padding:0}
.rt-arrow:active{background:var(--brand);color:var(--brand-ink)}
.rhy-dots{display:flex;gap:8px;justify-content:center;margin-top:8px}
.rd{width:11px;height:11px;border-radius:50%;border:0;padding:0;background:#5b6a64;cursor:pointer}
.rd.on{background:var(--brand);transform:scale(1.25)}

.pairnote{margin:6px 2px 0;padding:8px 10px;border-radius:10px;background:rgba(255,200,40,.12);border:1px solid rgba(255,200,40,.45);font-size:14px;line-height:1.35;text-align:center}
.pairnote[hidden]{display:none}

.top-left{justify-self:start;display:flex;flex-direction:row;gap:10px;align-items:flex-start;width:auto;max-width:none}
.top-link{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:40px;background:none;border:0;border-radius:12px;padding:2px 0;color:var(--ink);cursor:pointer;font-family:"Courier Prime","American Typewriter","Courier New",Courier,monospace;font-weight:700}
.top-link i{font-style:normal;font-size:22px;line-height:1.1}
.top-link span{font-size:11px;letter-spacing:.5px;text-transform:uppercase;line-height:1}
.top-link:active{background:var(--line)}
/* Play header: three even columns so the title sits dead center */
.top{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.top-left{gap:2px}
.top-link{min-width:44px;padding:0}
.top-right{justify-self:end}

.tick.alt{background:#e8b923;color:#1d1a0e}
/* Leaderboard day picker */
.lbday{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 8px}
.lbday span{display:flex;flex-direction:column;align-items:center;line-height:1.2}
.lbday span b{font-size:17px}
.lbday span small{font-size:12px;opacity:.7}
.lbday button{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:inherit;font-size:26px;line-height:1;cursor:pointer}
.lbday button:disabled{opacity:.3;cursor:default}

/* email sign-in (shown only when the server says sign-in is live) */
.esign-code{letter-spacing:.3em;text-align:center;font-size:28px}
.esign-wait{margin:10px 0 0;font-size:15px}
.esign-wait[hidden]{display:none}
.signin .primary:disabled{opacity:.6}
.acct-text{margin:0 0 10px;line-height:1.4}
.acct-text b{word-break:break-all}
.acct-note{margin:0 0 8px;font-size:14px;line-height:1.4;opacity:.8}
.acct-note[hidden]{display:none}
.acct-btn{width:100%;margin-top:4px;padding:13px;font-size:17px}
#acct-in[hidden],#acct-out[hidden],#esign-step1[hidden],#esign-step2[hidden],#acct[hidden]{display:none}

/* No connection and New day bars: small, above everything, with one action */
.bar{position:fixed;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:40;display:flex;align-items:center;gap:10px;background:var(--ink);color:var(--bg);padding:12px 14px;border-radius:14px;font-size:14px;line-height:1.35;box-shadow:0 6px 24px rgba(0,0,0,.25)}
.bar[hidden]{display:none}
.bar span{flex:1}
.bar button{font:inherit;font-weight:700;font-size:14px;background:var(--bg);color:var(--ink);border:0;border-radius:99px;padding:8px 14px;cursor:pointer;white-space:nowrap}
.bar button:disabled{opacity:.6}
.bar.newday{background:var(--brand);color:#fff}
.bar.newday button{background:#fff;color:var(--brand)}
body.kbd-show .bar{bottom:calc(var(--kbd-h,200px) + 8px)} /* above the on-screen keyboard, so Enter and Delete stay reachable */
.bar .bar-x{padding:4px 10px;font-size:20px;line-height:1;background:none;color:inherit}

/* ---- result screen redesign (10/13): one hero score, one big next step, icon tiles instead of a stack of buttons ---- */
.result .res-hero { margin: 10px 0 2px; padding: 14px 12px 10px; border-radius: 16px; background: linear-gradient(160deg, rgba(63,155,110,.22), rgba(224,176,48,.14)); border: 1px solid rgba(63,155,110,.4); }
body .result .res-hero .score-big { font-size: 54px; margin: 0; line-height: 1; letter-spacing: -1px; }
.res-stats { display: flex; gap: 8px; margin: 12px 0 2px; }
.res-stats:empty { display: none; }
.res-stats > div { flex: 1; min-width: 0; padding: 8px 4px; border-radius: 12px; background: rgba(127,127,127,.15); display: grid; gap: 1px; }
.res-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.res-stats small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
body .result .res-hero .crowd { margin: 8px 0 0; font-size: 13px; }
.res-hero .practice { margin-top: 8px; font-size: 13px; color: var(--muted); }
.res-hero .how-scored { margin-top: 4px; }
.res-hero .how-scored summary { font-size: 13px; padding: 6px; }
body .result .primary.cta { font-size: 20px; padding: 16px; margin-top: 12px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.28); }
body .result .primary.cta:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
.cta.nextday small { display: block; font-size: 12px; font-weight: 600; opacity: .75; margin-top: 2px; }
.result .sharepre { margin: 12px 0 0; font-size: 15px; line-height: 1.45; padding: 10px 12px; }
.acts { display: grid; gap: 8px; margin-top: 10px; }
.acts.a4 { grid-template-columns: repeat(4, 1fr); }
.acts.a2 { grid-template-columns: 1fr 1fr; }
.acts.a3 { grid-template-columns: repeat(3, 1fr); }
.act { font: inherit; font-weight: 700; font-size: 11.5px; letter-spacing: -.1px; display: grid; justify-items: center; gap: 5px; padding: 12px 2px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; min-width: 0; }
.act span { white-space: nowrap; }
.act svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.act.main { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.act.main svg { stroke: var(--brand-ink); }
.act:active { transform: scale(.96); }
.minilinks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 14px; margin-top: 8px; }
.minilinks button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; padding: 8px 4px; cursor: pointer; text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { .result .res-hero, .result .acts, .result .cta { animation: pop .35s ease-out both; } .result .acts { animation-delay: .08s; } }

/* ---- friends, tappable leaderboard rows and the player card (10/13) ---- */
.lb li.tap { cursor: pointer; transition: transform .1s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.lb li.tap:active { transform: scale(.985); }
.lb li.tap:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.lb .chev { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 20px; }
.tiphint { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.friendhint { margin: 6px 0; padding: 12px; border-radius: 12px; background: rgba(224,176,48,.16); border: 1px solid rgba(224,176,48,.5); font-size: 14px; text-align: left; }
.lbscope { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 8px; }
.lbscope button { font: inherit; font-weight: 800; font-size: 15px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lbscope button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lbscope button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pc-back { display: block; margin: 0 0 6px; padding: 4px 0; font-size: 15px; text-decoration: none; color: var(--brand); font-weight: 700; text-align: left; }
.pc-top { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.pc-top h2 { margin: 0; font-size: 24px; text-align: left; } .pc-top h2 small { font-size: 14px; color: var(--muted); font-weight: 400; }
.pc-top .muted { margin: 2px 0 0; text-align: left; }
.pc-av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 24px; }
.pc-friend { margin-bottom: 4px; }
.pc-verdict { text-align: center; font-size: 17px; margin: 8px 0; padding: 10px; border-radius: 12px; background: rgba(127,127,127,.14); }
.pc-verdict.lose { background: rgba(217,83,79,.16); } .pc-verdict.win { background: rgba(46,158,91,.2); }
.pc-none { text-align: center; color: var(--muted); padding: 18px 0; }
#modal-body .res-stats { margin: 8px 0 10px; }
.pc-slot { margin: 10px 0; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.pc-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 16px; }
.pc-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.pc-col { display: grid; gap: 1px; justify-items: center; padding: 8px 4px; border-radius: 10px; background: rgba(127,127,127,.12); border: 2px solid transparent; min-width: 0; }
.pc-col.win { background: rgba(46,158,91,.2); border-color: var(--good); }
.pc-col.off { opacity: .6; }
.pc-col small { font-size: 12px; color: var(--muted); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-col b { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pc-col span { font-size: 12.5px; color: var(--muted); }
.pc-how { margin-top: 8px; font-size: 14px; }
.pc-how summary { cursor: pointer; color: var(--muted); text-align: center; padding: 4px; }
.pc-lists { display: grid; gap: 8px; margin-top: 4px; } .pc-lists.two { grid-template-columns: 1fr 1fr; }
.pc-lists small { display: block; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.pc-lists .breakdown { margin: 0; font-size: 13px; }
.pc-top { padding-right: 36px; } .pc-top > div { min-width: 0; } .pc-top h2 { overflow-wrap: anywhere; font-size: 22px; line-height: 1.15; }
#modal-body .res-stats > div { text-align: center; }

/* clue words never wrap or spill out of their box: one line, centered, shrunk to fit by fitClue() in app.js */
.clue-word { white-space: nowrap; overflow: hidden; overflow-wrap: normal; display: flex; align-items: center; justify-content: center; min-width: 0; }

/* a word being checked: the tiles pulse softly until the answer arrives */
@keyframes checkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.inwrap.checking .tiles { animation: checkPulse .8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .inwrap.checking .tiles { animation: none; opacity: .6; } }

/* ---------- play levels ---------- */
.home-levels{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;width:100%;text-align:left;padding:10px 16px;margin:0 0 clamp(8px,1.6dvh,12px);border-radius:14px;border:2px solid #e9b53c;background:linear-gradient(135deg,#1b2b4d,#14203a);color:#fff;font:inherit;cursor:pointer}
.home-levels span{grid-row:1/3;font-size:28px}
.home-levels b{font-size:19px;color:#e9b53c;line-height:1.1}
.home-levels small{font-size:13px;color:#b9c6e3;font-weight:700}
.home-levels:active{filter:brightness(1.15)}
.lv-back{display:block;margin:2px 0 4px;background:none;border:0;color:var(--brand);font:inherit;font-weight:800;font-size:15px;padding:6px 2px;cursor:pointer}
.levels{position:fixed;inset:0;z-index:14;display:flex;flex-direction:column;background:#14203a;color:#fff}
.levels[hidden]{display:none}
.lv-top{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;background:#0f1a30;border-bottom:1px solid #26365a;z-index:5}
.lv-x{width:40px;height:40px;border:0;border-radius:12px;background:#26365a;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.lv-title{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.lv-title b{font-size:20px;letter-spacing:1px;color:#e9b53c;line-height:1}
.lv-title small{font-size:13px;font-weight:700;color:#9fb0d3}
.lv-stats{display:flex;align-items:center;gap:8px}
.lv-pill{background:#26365a;color:#fff;border:0;padding:6px 12px;border-radius:999px;font:inherit;font-weight:800;font-size:15px}
#lv-stars{color:#e9b53c;cursor:pointer}
.lv-map{position:relative;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;background:#14203a;-webkit-overflow-scrolling:touch}
.lv-inner{position:relative;width:100%}
.lv-zone{position:absolute;left:0;right:0}
.lv-svg{position:absolute;left:0;top:0;pointer-events:none}
.lv-zlabel{position:absolute;left:0;right:0;display:flex;justify-content:center;pointer-events:none}
.lv-zlabel span{background:#0f1a30;border:2px solid var(--zc);color:#fff;border-radius:999px;padding:5px 16px;font-weight:900;font-size:12px;letter-spacing:1.2px;text-transform:uppercase}
.lv-zlabel em{font-style:normal;color:#9fb0d3;font-weight:700}
.lv-node{position:absolute}
.lv-node>button{border-radius:50%;border:4px solid #3a4d7a;background:#1d2c4d;color:#fff;display:flex;align-items:center;justify-content:center;padding:0;font:inherit;font-weight:900;font-size:22px;box-shadow:0 5px 0 #0a1426;cursor:pointer}
.lv-node.done>button{background:var(--zc);border-color:#fff}
.lv-node.cur>button{background:#e9b53c;border-color:#fff;box-shadow:0 5px 0 #a47a16;animation:lvpulse 1.5s ease-out infinite}
.lv-node .lv-lab{position:absolute;left:0;right:0;text-align:center;font-weight:800;font-size:12px;color:#8d9bbb}
.lv-node.cur .lv-lab{color:#e9b53c}
.lv-node .lv-st{position:absolute;left:0;right:0;display:flex;justify-content:center;gap:2px}
.lv-node .lv-crown{position:absolute;right:-14px;top:-12px;width:28px;height:28px;border-radius:50%;background:#e9b53c;display:flex;align-items:center;justify-content:center;border:2px solid #14203a}
.lv-node.shake>button{animation:lvshake .45s ease-in-out}
.lv-node.popin>button{animation:lvpop .6s ease-out both}
.lv-avatar{position:absolute;width:44px;height:44px;transition:left 1s ease-in-out,top 1s ease-in-out;z-index:4;pointer-events:none}
.lv-avatar i{display:flex;width:44px;height:44px;border-radius:50%;background:#e9b53c;border:3px solid #fff;align-items:center;justify-content:center;font-style:normal;font-weight:900;font-size:22px;color:#14203a;box-shadow:0 4px 10px rgba(0,0,0,.4);animation:lvbob 1.3s ease-in-out infinite}
.lv-avatar:after{content:"";position:absolute;left:14px;top:41px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:10px solid #fff}
.lv-soon{position:absolute;left:16px;right:16px;text-align:center;background:#0f1a30;border:2px dashed #3a4d7a;border-radius:16px;padding:14px 12px;color:#b9c6e3;font-weight:800;font-size:14px;line-height:1.4}
.lv-soon b{display:block;color:#e9b53c;font-size:16px;margin-bottom:2px}
.lv-foot{flex:0 0 auto;padding:12px 18px calc(16px + env(safe-area-inset-bottom));background:#0f1a30;border-top:1px solid #26365a;z-index:5}
.lv-play{width:100%;height:56px;border-radius:16px;border:0;background:#e9b53c;color:#14203a;font:inherit;font-weight:900;font-size:18px;box-shadow:0 5px 0 #a47a16;cursor:pointer}
.lv-play:disabled{opacity:.6}
.lv-banner{position:absolute;left:16px;right:16px;top:calc(76px + env(safe-area-inset-top));z-index:20;background:#3fb97a;color:#0b2a1a;border-radius:16px;padding:14px 18px;font-weight:900;font-size:17px;text-align:center;box-shadow:0 8px 20px rgba(0,0,0,.35);animation:lvdown .4s ease-out both}
.lv-toast{position:absolute;left:24px;right:24px;bottom:110px;z-index:20;background:#26365a;color:#fff;border-radius:14px;padding:12px 16px;font-weight:800;font-size:15px;text-align:center;border:2px solid #3a4d7a}
@keyframes lvpulse{0%{box-shadow:0 5px 0 #a47a16,0 0 0 0 rgba(233,181,60,.65)}100%{box-shadow:0 5px 0 #a47a16,0 0 0 22px rgba(233,181,60,0)}}
@keyframes lvbob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes lvshake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
@keyframes lvpop{0%{transform:scale(.4);opacity:.2}60%{transform:scale(1.18);opacity:1}100%{transform:scale(1)}}
@keyframes lvdown{0%{transform:translateY(-140%)}100%{transform:translateY(0)}}
.lv-res-stars{display:flex;justify-content:center;gap:10px;margin:4px 0 2px}
.lv-res-stars svg{animation:lvpop .5s ease-out both}
.lv-res-stars svg:nth-child(2){animation-delay:.25s}.lv-res-stars svg:nth-child(3){animation-delay:.5s}
.lv-res-line{text-align:center;font-weight:700;color:var(--muted);margin-bottom:8px}
@media (prefers-reduced-motion:reduce){.lv-node.cur>button,.lv-avatar i,.lv-banner,.lv-res-stars svg{animation:none}.lv-avatar{transition:none}}

.lv-brk{margin:4px 0 8px;border:1px solid var(--line);border-radius:14px;background:var(--card);padding:10px 12px}
.lv-brk-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;text-align:center}
.lv-brk-stats b{display:block;font-size:18px}
.lv-brk-stats small{color:var(--muted);font-size:12px}
.lv-gap{margin:6px 0 4px;text-align:center;font-weight:800;font-size:14px}
.lv-tiers{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.lv-tiers li{display:grid;grid-template-columns:54px 1fr 20px;align-items:center;gap:6px;font-size:13px;color:var(--muted);padding:2px 6px;border-radius:8px}
.lv-tiers li.on{background:rgba(233,181,60,.18);color:var(--ink);font-weight:800}
.lv-tiers li span{display:flex;gap:1px}.lv-tiers li em{font-style:normal}.lv-tiers li b{color:var(--good)}
.lv-avatar i.has-photo{background-size:cover;background-position:center;color:transparent}

/* friends: button at the top right of the profile, and the Friends screen */
.profile-friends{position:absolute;top:14px;right:62px;display:flex;align-items:center;gap:6px;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:99px;background:var(--card);color:var(--ink);font:inherit;font-weight:800;font-size:14px;cursor:pointer}
.profile-friends svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.pf-count{min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#d64545;color:#fff;font-style:normal;font-size:12px;font-weight:900;line-height:18px;text-align:center;box-sizing:border-box}
.fr-sec{margin:16px 0 4px;font-size:13px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#6b7280)}
.fr-list{list-style:none;padding:0;margin:6px 0;display:grid;gap:6px}
.fr-row{display:flex;align-items:center;gap:8px;justify-content:space-between;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.fr-name{font:inherit;font-weight:800;color:var(--ink);background:none;border:0;padding:6px 0;text-align:left;cursor:pointer;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.fr-actions{display:flex;gap:6px;flex:0 0 auto}
.fr-actions button{font:inherit;font-weight:800;font-size:13px;padding:8px 12px;border-radius:99px;border:1px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer}
.fr-actions button.yes{background:var(--brand,#2e8b57);border-color:var(--brand,#2e8b57);color:#fff}
.fr-found{margin:8px 0}
.fr-empty{margin:6px 0;color:var(--muted,#6b7280);font-size:14px}
.profile-in{padding-top:70px}
/* Mind-Bender */
.home .home-tile.home-mb{grid-column:1/-1;background:#1f4d3a;color:#f7f2e8;border-color:#1f4d3a;font-size:14px}
.home .home-tile.home-mb small{font-weight:400;opacity:.85;font-size:11px}
.mb-list{display:grid;gap:8px;margin:12px 0 4px}
.mb-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 14px;border:1px solid var(--line,#d9d4c7);border-radius:12px;background:var(--card,#fff);color:inherit;font:inherit;cursor:pointer;text-align:left}
.mb-row small{opacity:.8}

/* Battle */
.home .home-tile.home-battle{background:#7a2e2e;border-color:#7a2e2e}
.bt-vs{display:flex;align-items:center;justify-content:center;gap:14px;margin:10px 0}
.bt-vs i{font-style:normal;opacity:.6;font-size:13px}
.bt-side{flex:1;max-width:150px;text-align:center;padding:12px 8px;border:2px solid var(--line,#d9d4c7);border-radius:14px}
.bt-side small{display:block;opacity:.8;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt-side b{font-size:24px}
.bt-side.bt-won{border-color:#3fb97a;box-shadow:0 0 0 3px rgba(63,185,122,.18)}
.bt-table{margin:6px 0 10px}
.bt-row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;text-align:center;padding:8px 0;border-top:1px solid var(--line,#d9d4c7)}
.bt-row span{font-size:12px;opacity:.7;padding:0 10px}
.bt-row b{font-size:17px;opacity:.75}
.bt-row b.bt-best{opacity:1;color:#2f9e63}

/* ---- Home makeover (10/15): chunky raised buttons, letter-bubble title, START on top, mode cards. Same colors as before. ---- */
.home{overflow-y:auto!important}
.home .home-in{height:auto!important;min-height:100dvh;gap:clamp(8px,1.6dvh,14px)!important;padding-top:calc(14px + env(safe-area-inset-top))!important;max-width:440px}
.home .home-top{padding:0!important}
.home .home-brand{display:flex;justify-content:center;gap:5px;letter-spacing:0!important;font-size:inherit!important;margin:44px 0 0}
.home .home-brand i{font-style:normal;width:clamp(30px,9vw,38px);height:clamp(30px,9vw,38px);border-radius:50%;display:grid;place-items:center;font:800 clamp(16px,4.8vw,20px)/1 system-ui,sans-serif;color:#fff;box-shadow:0 3px 0 rgba(0,0,0,.28)}
.home .home-brand i:nth-child(1){background:#2e9e5b}.home .home-brand i:nth-child(2){background:#e0902a}.home .home-brand i:nth-child(3){background:#3a7fd0}
.home .home-brand i:nth-child(4){background:#d8503f}.home .home-brand i:nth-child(5){background:#8a5bd0}.home .home-brand i:nth-child(6){background:#e0b030;color:#3a2600}
.home .home-brand i:nth-child(7){background:#1f8f8f}.home .home-brand i:nth-child(8){background:#c9553f}
.home .home-sub{margin-top:8px!important;font-size:clamp(14px,2.2dvh,17px)!important}
.home .avatar-btn,.home .streak-btn{top:0!important;width:48px!important;height:48px!important;min-width:0!important;padding:0!important;font-size:20px!important;box-shadow:0 3px 0 rgba(0,0,0,.18)}
.home .home-play{order:0;padding:14px 12px 12px!important;border-radius:22px;background:var(--brand)!important;color:var(--brand-ink);box-shadow:0 6px 0 rgba(0,0,0,.28);gap:4px!important;margin:0!important}
.home .home-play #home-what{font-size:clamp(17px,2.6dvh,20px)!important;font-family:Georgia,serif;margin:4px 0 0!important}
.home .home-play small{color:var(--brand-ink);opacity:.85}
.home .home-play .start-btn{max-width:none;animation:none;font-size:clamp(26px,4.4dvh,32px)!important;padding:clamp(14px,2.4dvh,20px)!important;letter-spacing:6px!important;border-radius:18px!important}
.home .home-stats{gap:6px;order:0}
.home .home-stats div{background:var(--card);border:2px solid var(--line);border-radius:14px!important;padding:7px 2px!important}
.home .home-levels{margin:0;padding:14px 18px;border-radius:20px;border:0;box-shadow:0 6px 0 #0b1530,inset 0 0 0 2px #e9b53c}
.home .home-levels span{font-size:34px}.home .home-levels b{font-size:24px}
.home .home-levels:active,.home .home-tile:active,.home .home-play .start-btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(0,0,0,.28)}
.home .home-duo{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.home .home-duo .home-tile.home-mb{grid-column:auto;padding:16px 8px;border-radius:20px;border:0;font-size:19px;box-shadow:0 6px 0 rgba(0,0,0,.3);color:#fff}
.home .home-duo .home-tile.home-mb span{font-size:32px}
.home .home-duo .home-tile.home-mb small{font-size:12px;opacity:.9;font-weight:600}
.home .home-duo .home-battle{background:linear-gradient(180deg,#b94545,#8f3030)!important}
.home .home-duo .home-tile.home-mb:not(.home-battle){background:linear-gradient(180deg,#2f7a5b,#1f5a42)!important}
.home .home-grid .home-tile{border:2px solid var(--line);box-shadow:0 3px 0 var(--line);border-radius:14px}
.home .home-grid .home-tile.home-idea{border:2px dashed rgba(212,175,55,.8);box-shadow:none}
.home .home-in>*{flex-shrink:0}
.home .home-feedback{position:static!important}
.home .home-grid{flex:0 0 auto!important;min-height:auto!important;grid-auto-rows:auto!important}

/* ---- Home cleanup (10/15): plain wordmark instead of letter bubbles, flatter cleaner buttons ---- */
.home .home-brand{display:block;margin:46px 0 0;font:900 clamp(34px,10vw,44px)/1 system-ui,-apple-system,"Segoe UI",Inter,sans-serif!important;letter-spacing:1px!important;text-transform:uppercase;color:var(--brand);text-align:center}
.home .home-brand::after{content:"";display:block;width:56px;height:4px;border-radius:2px;background:#e9b53c;margin:9px auto 0}
.home .home-sub{margin-top:10px!important}
.home .avatar-btn,.home .streak-btn{box-shadow:none!important;border-width:2px}
.home .home-play{border-radius:18px;box-shadow:0 1px 2px rgba(0,0,0,.12),0 6px 18px rgba(0,0,0,.12)}
.home .home-play .start-btn{background:#f5b301!important;border-radius:12px!important;box-shadow:none!important;letter-spacing:4px!important;font-size:clamp(22px,3.8dvh,28px)!important;padding:clamp(13px,2.2dvh,17px)!important}
.home .home-play .start-btn:active{transform:scale(.98);filter:brightness(.95);box-shadow:none!important}
.home .home-levels{border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.15);padding:12px 16px}
.home .home-levels span{font-size:28px}.home .home-levels b{font-size:20px}
.home .home-duo{gap:10px}
.home .home-duo .home-tile.home-mb{border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.15);padding:14px 8px;font-size:17px}
.home .home-duo .home-tile.home-mb span{font-size:26px}
.home .home-duo .home-battle{background:#a63c3c!important}
.home .home-duo .home-tile.home-mb:not(.home-battle){background:#1f5a42!important}
.home .home-grid .home-tile{border:1px solid var(--line);box-shadow:none;border-radius:14px;font-size:14px;padding:12px 4px}
.home .home-grid .home-tile span{font-size:22px}
.home .home-grid .home-tile.home-idea{border:1px dashed rgba(212,175,55,.9)}
.home .home-levels:active,.home .home-tile:active{transform:scale(.98);box-shadow:none}
.home .home-stats div{border-width:1px;box-shadow:none}

/* ---- Home v3 (10/15): a dark green top band (title, START, stats) over a cream menu, and a two-column layout on computers ---- */
.home .home-in{padding:0!important;gap:0!important;max-width:460px;min-height:100dvh}
.home .home-hero{background:#173f2f;color:#fff;padding:calc(14px + env(safe-area-inset-top)) 16px 22px;border-radius:0 0 28px 28px;display:flex;flex-direction:column;gap:14px;position:relative;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.home .home-modes{padding:20px 16px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;flex:1}
.home .home-top{position:relative}
.home .home-brand{color:#fff!important;margin-top:40px!important}
.home .home-sub{color:#cfe3d8;opacity:1!important}
.home .home-hero .avatar-btn{background-color:rgba(255,255,255,.12);background-size:cover;background-position:center;border-color:rgba(255,255,255,.7);color:#fff}
.home .home-hero .streak-btn{background-color:rgba(255,255,255,.12);border-color:#e9b53c;color:#fff}
.home .home-hero .streak-btn.zero{border-color:rgba(255,255,255,.35);opacity:1}
.home .home-hero .home-play{background:none!important;box-shadow:none!important;padding:0!important;color:#fff}
.home .home-hero .home-play #home-what{color:#fff}
.home .home-hero .home-play small{color:#cfe3d8}
.home .home-hero .home-stats div{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);color:#fff}
.home .home-hero .home-stats span{color:#cfe3d8;opacity:1}
.home .home-modes .home-legal{margin-top:auto;padding-top:8px}
@media (prefers-color-scheme:dark){.home .home-hero{background:#0e2a1f;box-shadow:0 8px 24px rgba(0,0,0,.5)}}
/* computers: the green band becomes a left panel, the menu fills the right */
@media (min-width:900px) and (min-height:560px){
  .home{background:var(--bg)}
  .home .home-in{max-width:1120px!important;display:grid!important;grid-template-columns:minmax(340px,430px) 1fr;gap:28px!important;padding:28px!important;align-items:stretch;min-height:100dvh}
  .home .home-hero{border-radius:28px;padding:28px 26px;justify-content:center;gap:22px;position:sticky;top:28px;height:calc(100dvh - 56px);min-height:520px}
  .home .home-hero .home-top{padding:0}
  .home .home-brand{font-size:clamp(44px,4.4vw,58px)!important;margin-top:56px!important}
  .home .home-hero .home-play .start-btn{font-size:30px!important;padding:20px!important}
  .home .home-hero .home-play #home-what{font-size:22px!important}
  .home .home-modes{padding:0;gap:18px;justify-content:center}
  .home .home-modes .home-legal{margin-top:6px}
  .home .home-levels{padding:22px 26px;border-radius:20px}
  .home .home-levels span{font-size:40px}.home .home-levels b{font-size:28px}.home .home-levels small{font-size:15px}
  .home .home-duo{gap:18px}
  .home .home-duo .home-tile.home-mb{padding:28px 12px;font-size:22px;border-radius:20px}
  .home .home-duo .home-tile.home-mb span{font-size:40px}
  .home .home-duo .home-tile.home-mb small{font-size:14px}
  .home .home-grid{gap:14px}
  .home .home-grid .home-tile{padding:20px 8px;font-size:16px;border-radius:16px}
  .home .home-grid .home-tile span{font-size:30px}
  .home .home-tile:hover,.home .home-levels:hover,.home .home-play .start-btn:hover{filter:brightness(1.06);cursor:pointer}
  .home .home-grid .home-tile:hover{border-color:var(--brand)}
}

.lv-foot{display:flex;flex-direction:column;gap:10px}
.lv-mb{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto auto;column-gap:10px;align-items:center;width:100%;text-align:left;padding:9px 14px;border-radius:14px;border:1px solid #3a2f63;background:linear-gradient(135deg,#2a1f4d,#1d1538);color:#fff;font:inherit;cursor:pointer}
.lv-mb span{grid-row:1/3;font-size:26px}.lv-mb b{font-size:16px;color:#c9b6ff;line-height:1.15}.lv-mb small{font-size:12px;color:#a99bd6;font-weight:700}
.lv-mb i{grid-row:1/3;font-style:normal;font-size:26px;color:#c9b6ff}
.lv-mb:active{filter:brightness(1.15)}
.mb-rules{margin:6px 0 4px;padding-left:20px;display:grid;gap:6px;font-size:15px;line-height:1.35}
.home .home-duo{grid-template-columns:1fr}
.home .home-duo .home-tile.home-battle{display:flex;align-items:center;justify-content:center;gap:12px;padding:16px}
.home .home-duo .home-tile.home-battle span{font-size:30px}

.lv-mb span{grid-column:1}.lv-mb b{grid-column:2;grid-row:1}.lv-mb small{grid-column:2;grid-row:2}.lv-mb i{grid-column:3}
.home .home-duo .home-tile.home-battle{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:14px;justify-items:start;align-items:center;text-align:left;padding:14px 20px}
.home .home-duo .home-tile.home-battle span{grid-row:1/3;font-size:34px}
.home .home-duo .home-tile.home-battle small{font-size:13px}

/* the streak is just a label now: no circle, not tappable */
.home .streak-btn,.home .home-hero .streak-btn,.home .home-hero .streak-btn.zero{background:none!important;background-color:transparent!important;border:0!important;box-shadow:none!important;pointer-events:auto;cursor:pointer;width:auto!important;min-width:0!important;padding:0 2px!important;height:48px!important;font-size:24px!important;justify-content:start}
.home .streak-btn.risk{border:0!important}

/* ---- raised buttons on Home (10/15: Evan likes the raised look): solid colors, a darker bottom edge, presses down when tapped ---- */
.home .home-hero .home-play .start-btn{background:#f5b301!important;box-shadow:0 5px 0 #b87d00!important}
.home .home-levels{background:#14203a!important;box-shadow:0 5px 0 #070d1c,inset 0 0 0 2px #e9b53c!important}
.home .home-duo .home-tile.home-battle{background:#a63c3c!important;box-shadow:0 5px 0 #6b2020!important}
.home .home-grid .home-tile{box-shadow:0 4px 0 var(--line)!important}
.home .home-grid .home-tile.home-idea{box-shadow:0 4px 0 rgba(212,175,55,.45)!important}
.home .home-hero .home-stats div{box-shadow:0 3px 0 rgba(0,0,0,.25)}
.home .home-hero .avatar-btn{box-shadow:0 3px 0 rgba(0,0,0,.3)}
.home .home-play .start-btn:active{transform:translateY(4px)!important;box-shadow:0 1px 0 #b87d00!important}
.home .home-levels:active{transform:translateY(4px)!important;box-shadow:0 1px 0 #070d1c,inset 0 0 0 2px #e9b53c!important}
.home .home-duo .home-tile.home-battle:active{transform:translateY(4px)!important;box-shadow:0 1px 0 #6b2020!important}
.home .home-grid .home-tile:active{transform:translateY(3px)!important;box-shadow:0 1px 0 var(--line)!important}
.home .home-modes{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
.home .home-modes{gap:16px}

/* Delete my account (profile) */
.del-card{background:transparent!important;box-shadow:none!important;border:0!important;text-align:center}
.del-card #del-open{font-size:13px;opacity:.7;color:inherit}
.del-card #del-box{margin-top:8px;text-align:left}
.del-card #del-go{width:100%;margin-top:8px}

/* 10/16: streak sentence under START removed (the streak shows top left); FOSO Battle matches the FOSO Levels button */
#home-streak{display:none!important}
.home .home-duo .home-tile.home-battle{
  display:grid!important;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:12px;align-items:center;justify-items:start;text-align:left;width:100%;
  padding:14px 18px!important;border-radius:20px!important;background:#a63c3c!important;
  box-shadow:0 5px 0 #6b2020,inset 0 0 0 2px #f4d9b0!important}
.home .home-duo .home-tile.home-battle span{grid-row:1/3;font-size:34px}
.home .home-duo .home-tile.home-battle b{font-size:24px;line-height:1.15;color:#fff}
.home .home-duo .home-tile.home-battle small{font-size:13px}
.home .home-duo .home-tile.home-battle:active{transform:translateY(4px)!important;box-shadow:0 1px 0 #6b2020,inset 0 0 0 2px #f4d9b0!important}
@media (min-width:900px){.home .home-duo .home-tile.home-battle{padding:22px 26px!important}.home .home-duo .home-tile.home-battle span{font-size:40px}.home .home-duo .home-tile.home-battle b{font-size:28px}.home .home-duo .home-tile.home-battle small{font-size:15px}}
.home .home-duo .home-tile.home-battle{row-gap:0;align-content:center}
.home .home-duo .home-tile.home-battle b{font-weight:800;font-size:22px;align-self:end}
.home .home-duo .home-tile.home-battle small{align-self:start;margin:0;line-height:1.2}
/* FOSO Levels and FOSO Battles: identical size */
.home .home-levels,.home .home-duo .home-tile.home-battle{box-sizing:border-box;width:100%;min-height:68px;padding:12px 18px!important;border-radius:20px!important}
.home .home-levels b,.home .home-duo .home-tile.home-battle b{font-size:22px!important;line-height:1.15;font-weight:800}
.home .home-levels small,.home .home-duo .home-tile.home-battle small{font-size:13px!important;line-height:1.2;margin:0}
.home .home-levels span,.home .home-duo .home-tile.home-battle span{font-size:34px!important}
@media (min-width:900px){.home .home-levels,.home .home-duo .home-tile.home-battle{min-height:96px;padding:20px 26px!important}.home .home-levels b,.home .home-duo .home-tile.home-battle b{font-size:28px!important}.home .home-levels small,.home .home-duo .home-tile.home-battle small{font-size:15px!important}.home .home-levels span,.home .home-duo .home-tile.home-battle span{font-size:40px!important}}

/* FOSO Battles matchmaking screens */
.bt-find{text-align:center;padding:10px 4px}
.bt-find h2{margin:10px 0 6px}
.bt-find p{margin:0 0 16px;line-height:1.45;opacity:.85}
.bt-spin{width:46px;height:46px;margin:6px auto 0;border-radius:50%;border:5px solid rgba(166,60,60,.25);border-top-color:#a63c3c;animation:btspin .9s linear infinite}
@keyframes btspin{to{transform:rotate(360deg)}}
.bt-found{font-size:48px;line-height:1;animation:btpop .35s ease-out}
@keyframes btpop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
.bt-find .cta{width:100%;margin-bottom:8px}
@media (prefers-reduced-motion:reduce){.bt-spin,.bt-found{animation:none}}

/* player-made puzzles for friends and groups */
.home-notice{margin:0}
.home-notice button{width:100%;display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:center;text-align:left;padding:12px 16px;border-radius:16px;border:0;background:#fff4d6;color:#3b2c00;box-shadow:inset 0 0 0 2px #e9b53c;font:inherit;cursor:pointer}
.home-notice span{font-size:26px;grid-row:1/3}
.home-notice b{font-size:16px;line-height:1.2}
.home-notice small{font-size:13px;color:#6b5200}
.cp-clue{display:flex;gap:10px;justify-content:center;margin:10px 0}
.cp-clue b{flex:1;text-align:center;padding:12px 8px;border-radius:12px;background:var(--brand);color:#fff;font-size:20px;text-transform:capitalize}
.cp-log{list-style:none;margin:8px 0;padding:0}
.cp-log li{padding:6px 0;border-bottom:1px solid var(--line)}
.mk-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px}
.mk-grid .signin-input{width:100%;box-sizing:border-box}
.cp-board{list-style:none;margin:6px 0;padding:0}
.cp-board li{display:flex;justify-content:space-between;align-items:center;padding:8px 4px;border-bottom:1px solid var(--line)}
.cp-board li.you{font-weight:700}
.cp-board .nm small{display:block;color:var(--muted);font-size:12px;font-weight:400}
.mk-status{margin:12px 0;padding:12px 14px;border-radius:10px;font-size:1.05rem;font-weight:700;line-height:1.35}
.mk-status.ok{background:#e3f4e6;color:#14532d}
.mk-status.bad{background:#fde8e8;color:#991b1b}
.mk-hint{text-align:center;margin:6px 0 0}
#mk-send:disabled{opacity:.45}
/* the home title uses the same typewriter lettering as the play screen header */
.home .home-brand{font-family:"Courier Prime","American Typewriter","Courier New",Courier,monospace!important;font-weight:700!important;letter-spacing:3px!important}
/* home screen: red number badges, a "?" help button, and a quiet row for the less used links */
.tile-badge{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:#d64545;color:#fff;font-style:normal;font-size:12px;font-weight:900;line-height:20px;text-align:center;box-sizing:border-box;border:2px solid #fff;font-family:system-ui,sans-serif}
.tile-badge.inline{position:static;flex:none;margin-right:8px}
.home .home-grid .home-tile{position:relative}
.home .home-top .avatar-btn{overflow:visible}
.home .home-top .help-btn{position:absolute;top:2px;right:52px;width:34px;height:34px;margin-top:4px;border-radius:50%;border:2px solid rgba(255,255,255,.55);background:transparent;color:#fff;font:800 17px/1 system-ui,sans-serif;cursor:pointer;padding:0}
.home .home-top .help-btn:active{background:rgba(255,255,255,.18)}
.home-more{display:flex;justify-content:center;gap:22px;margin:6px 0 2px}
.home-more button{background:none;border:0;color:var(--muted);font:inherit;font-size:14px;font-weight:600;padding:12px 6px;min-height:44px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
/* home screen v2: pinned bottom bar, "Your week" strip, "Make a puzzle" card (the old tiles and link row are gone) */
.home .home-in{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
.home-sec{margin:6px 2px 6px;font:800 12px system-ui,sans-serif;letter-spacing:.8px;text-transform:uppercase;color:var(--muted)}
.week-row{display:flex;justify-content:space-between;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:10px 12px}
.week-row div{display:grid;justify-items:center;gap:4px;font:700 11px system-ui,sans-serif;color:var(--muted)}
.week-row i{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:15px;background:var(--line)}
.week-row i.on{background:#fde9c7}
.week-row i.today{outline:2px solid var(--brand);outline-offset:1px}
.home-make{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#fff3d6;border:2px dashed #e9b53c;border-radius:16px;padding:12px 14px;color:#3a2600;font:inherit;cursor:pointer}
.home-make span{font-size:28px}
.home-make b{font-size:15px;font-weight:700}
.home-make small{display:block;font-weight:600;font-size:12px;opacity:.8;margin-top:2px}
.home-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;z-index:9;display:grid;grid-template-columns:repeat(5,1fr);background:var(--card);border-top:1px solid var(--line);padding:6px 4px calc(8px + env(safe-area-inset-bottom));box-sizing:border-box}
.home-bar button{position:relative;background:none;border:0;display:grid;justify-items:center;gap:2px;font:700 11px system-ui,sans-serif;color:var(--ink);padding:6px 0;min-height:52px;cursor:pointer}
.home-bar button span{font-size:24px}
.home-bar button:active{background:var(--line)}
.home-bar .tile-badge{top:0;right:calc(50% - 26px)}
body:not(.bar-on) .home-bar{display:none}
/* home screen v3: everything fits on one phone screen with no scrolling (the four stat boxes live under Stats) */
.home{overflow-y:auto!important}
.home .home-in{height:auto!important;min-height:100dvh!important;max-width:460px;display:flex!important;flex-direction:column;gap:0!important;padding:0 0 calc(66px + env(safe-area-inset-bottom))!important;box-sizing:border-box}
.home .home-hero{flex:0 0 auto;gap:clamp(4px,1dvh,10px)!important;padding:calc(8px + env(safe-area-inset-top)) 16px clamp(10px,2dvh,18px)!important}
.home .home-hero .home-stats{display:none!important}
.home .home-modes{flex:1 1 auto;min-height:0;padding:clamp(8px,1.6dvh,14px) 16px 0!important;gap:clamp(6px,1.3dvh,12px)!important;display:grid!important;grid-template-columns:1fr 1fr;grid-auto-rows:min-content;align-content:start}
.home .home-modes>*{grid-column:1/-1}
.home .home-modes>.home-levels,.home .home-modes>.home-duo{grid-column:auto}
.home .home-duo{display:block!important}
.home .home-levels{grid-template-columns:1fr!important;grid-template-rows:auto!important;justify-items:center;text-align:center;row-gap:2px;padding:clamp(8px,1.5dvh,12px) 6px!important;margin:0!important;height:100%;box-sizing:border-box}
.home .home-levels span{font-size:clamp(24px,4dvh,32px)!important;grid-row:auto!important}
.home .home-levels b{font-size:clamp(17px,2.6dvh,21px)!important;grid-row:auto!important}
.home .home-levels small{font-size:11px!important;grid-row:auto!important;line-height:1.2}
.home .home-duo .home-tile.home-mb{padding:clamp(8px,1.5dvh,12px) 6px!important;font-size:clamp(17px,2.6dvh,21px)!important;height:100%;box-sizing:border-box;align-content:center}
.home .home-duo .home-tile.home-mb span{font-size:clamp(24px,4dvh,32px)!important}
.home .home-duo .home-tile.home-mb small{font-size:11px!important;line-height:1.2}
.home .home-sec{margin:2px 2px 4px}
.week-row{padding:clamp(6px,1.2dvh,10px) 12px}
.week-row i{width:clamp(24px,3.6dvh,30px);height:clamp(24px,3.6dvh,30px)}
.home-make{padding:clamp(8px,1.4dvh,12px) 14px}
.home .home-modes .home-legal{margin-top:auto;padding-top:0;font-size:10px;line-height:1.3}
.home .home-feedback{padding:4px 12px;font-size:12px}
.home .home-duo .home-tile.home-mb{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto!important;justify-items:center;text-align:center;row-gap:2px}
.home .home-duo .home-tile.home-mb span,.home .home-duo .home-tile.home-mb b,.home .home-duo .home-tile.home-mb small{grid-row:auto!important;grid-column:auto!important}
/* full-screen panels: from the home screen, Leaders, Groups, Archive, Ideas and the rest open as a whole screen with a big X (game dialogs and the intro tour keep their small sheets) */
body:has(#home:not([hidden])) .modal:not(.tour){background:var(--bg);align-items:stretch}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet{max-width:520px;height:100dvh;max-height:none;border-radius:0;padding:calc(14px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));box-sizing:border-box}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet #modal-close{width:48px;height:48px;font-size:34px;border:1px solid var(--line);background:var(--card);margin:-4px -6px 0 0}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet h2{padding-right:56px}
/* Your stats screen */
.st-hero{display:grid;justify-items:center;gap:0;padding:18px 12px;margin:6px 0 12px;border-radius:20px;background:#173f2f;color:#fff;text-align:center}
.st-hero span{font-size:34px;line-height:1}.st-hero b{font-size:56px;line-height:1.05;font-weight:900;font-family:"Courier Prime","American Typewriter","Courier New",monospace}.st-hero small{font-size:14px;color:#cfe3d8}
.st-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px}
.st-tile{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px 10px;text-align:center}
.st-tile b{display:block;font-size:28px;font-weight:900}.st-tile span{font-size:12px;color:var(--muted);font-weight:600}
.st-h{margin:16px 2px 8px;font:800 12px system-ui,sans-serif;letter-spacing:.8px;text-transform:uppercase;color:var(--muted)}
.st-bars{display:grid;gap:8px;margin-bottom:14px}
.st-bar{display:grid;grid-template-columns:20px 1fr 34px;align-items:center;gap:8px;font-weight:700}
.st-bar em{font-style:normal;color:var(--muted);text-align:center}
.st-bar span{height:20px;background:var(--line);border-radius:10px;overflow:hidden;display:block}
.st-bar span i{display:block;height:100%;background:var(--brand);border-radius:10px}
.st-bar b{text-align:right}
.home-bar button{font-size:10.5px}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet #modal-close{position:fixed;float:none;top:calc(10px + env(safe-area-inset-top));right:max(14px,calc(50% - 246px));margin:0;z-index:5}
/* no scrollbar on the home screen (it still scrolls on a very short phone) */
.home{scrollbar-width:none;-ms-overflow-style:none}
.home::-webkit-scrollbar{display:none;width:0;height:0}
/* the X gets its own strip at the top of a full-screen panel, so it never covers a title, tab or button */
body:has(#home:not([hidden])) .modal:not(.tour) .sheet{padding-top:calc(68px + env(safe-area-inset-top))!important}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet #modal-close{background:var(--card)}
/* the how to play tour gets the same X in its corner */
.modal.tour .sheet #modal-close{display:block!important;position:absolute;float:none;top:10px;right:10px;margin:0;width:48px;height:48px;font-size:34px;line-height:1;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);z-index:3}
/* How to play is a full-screen panel like the rest, with the X in the same spot */
.modal.tour{background:var(--bg)!important;align-items:stretch!important}
.modal.tour .sheet{max-width:520px!important;width:100%!important;height:100dvh!important;max-height:none!important;border-radius:0!important;box-sizing:border-box;padding:calc(68px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom))!important;display:flex;flex-direction:column;justify-content:center;overflow-y:auto}
.modal.tour .sheet #modal-close{position:fixed!important;top:calc(10px + env(safe-area-inset-top))!important;right:max(14px,calc(50% - 246px))!important;margin:0!important;z-index:5}
/* FOSO Levels menu: pick a pack */
.lvhub{position:fixed;inset:0;z-index:14;display:flex;flex-direction:column;background:radial-gradient(120% 60% at 50% 0,#22345c 0,#14203a 60%);color:#fff;overflow-y:auto;-webkit-overflow-scrolling:touch}
.lvhub[hidden]{display:none}
.lvh-top{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:520px;margin:0 auto;box-sizing:border-box;padding:calc(10px + env(safe-area-inset-top)) 14px 6px 20px}
.lvh-title{display:flex;flex-direction:column;gap:3px}
.lvh-title b{font-family:Georgia,serif;font-size:30px;line-height:1;color:#e9b53c;letter-spacing:.5px}
.lvh-title small{font-size:14px;font-weight:700;color:#9fb0d3}
.lvh-x{width:48px;height:48px;border-radius:50%;border:1px solid #3a4d7a;background:#1d2c4d;color:#fff;font-size:34px;line-height:1;cursor:pointer;flex:0 0 auto}
.lvh-list{width:100%;max-width:520px;margin:0 auto;box-sizing:border-box;padding:14px 16px calc(24px + env(safe-area-inset-bottom));display:grid;gap:16px}
.lvh-card{position:relative;display:grid;grid-template-columns:auto 1fr;column-gap:14px;row-gap:12px;align-items:center;width:100%;text-align:left;padding:18px 16px 16px;border-radius:22px;color:#fff;font:inherit;cursor:pointer;border:2px solid transparent;overflow:hidden}
.lvh-card:active{transform:translateY(2px);filter:brightness(1.1)}
.lvh-pack{background:linear-gradient(145deg,#2c4a7e,#1b2c52);border-color:#e9b53c;box-shadow:0 6px 0 #0a1426,0 0 28px rgba(233,181,60,.18)}
.lvh-mind{background:linear-gradient(145deg,#33265f,#1d1538);border-color:#7b62d6;box-shadow:0 6px 0 #0a1426,0 0 28px rgba(123,98,214,.2)}
.lvh-badge{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;font-size:34px;background:rgba(255,255,255,.1);border:2px solid rgba(255,255,255,.25)}
.lvh-body{display:grid;gap:3px;min-width:0}
.lvh-body em{font-style:normal;font-size:11px;font-weight:900;letter-spacing:1.4px;text-transform:uppercase}
.lvh-pack em{color:#e9b53c}.lvh-mind em{color:#b9a5ff}
.lvh-body b{font-family:Georgia,serif;font-size:26px;line-height:1.1}
.lvh-body small{font-size:14px;font-weight:700;color:#b9c6e3;line-height:1.3}
.lvh-bar{display:block;height:10px;border-radius:6px;background:rgba(0,0,0,.35);overflow:hidden;margin-top:6px}
.lvh-bar i{display:block;height:100%;background:linear-gradient(90deg,#e9b53c,#ffd96b);border-radius:6px}
.lvh-meta{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:800;color:#d5def2;margin-top:2px}
.lvh-go{grid-column:1/3;display:block;text-align:center;padding:13px;border-radius:14px;font-weight:900;font-size:17px}
.lvh-pack .lvh-go{background:#e9b53c;color:#14203a;box-shadow:0 4px 0 #a47a16}
.lvh-mind .lvh-go{background:#7b62d6;color:#fff;box-shadow:0 4px 0 #4a3a96}
.lvh-soon{border:2px dashed #3a4d7a;border-radius:18px;padding:16px;text-align:center;color:#9fb0d3;font-weight:700;font-size:14px;line-height:1.4}
.lvh-soon b{display:block;color:#c9d4ee;font-size:16px;margin-bottom:2px}
/* map polish: richer zones, a real road, bigger glossy level buttons */
.lv-map{background:#14203a}
.lv-decor{position:absolute;opacity:.4;pointer-events:none;filter:saturate(.9);animation:lvfloat 4s ease-in-out infinite;animation-delay:var(--d)}
@keyframes lvfloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.lv-zlabel span{display:inline-flex;align-items:center;gap:8px;padding:8px 18px;font-size:13px;background:linear-gradient(180deg,#1a2a4d,#0f1a30);box-shadow:0 4px 0 rgba(0,0,0,.35),0 0 18px color-mix(in srgb,var(--zc) 40%,transparent)}
.lv-zlabel span i{font-style:normal;font-size:18px}
.lv-node>button{position:relative;border-width:5px;background:radial-gradient(circle at 35% 28%,#2c4376,#1a2847 70%);box-shadow:0 6px 0 #0a1426,inset 0 3px 0 rgba(255,255,255,.12)}
.lv-node.done>button{background:radial-gradient(circle at 35% 28%,color-mix(in srgb,var(--zc) 70%,#fff),var(--zc) 70%);border-color:#fff;box-shadow:0 6px 0 color-mix(in srgb,var(--zc) 45%,#000),0 0 16px color-mix(in srgb,var(--zc) 55%,transparent),inset 0 3px 0 rgba(255,255,255,.4)}
.lv-node.cur>button{background:radial-gradient(circle at 35% 28%,#ffe28a,#e9b53c 70%);box-shadow:0 6px 0 #a47a16,inset 0 3px 0 rgba(255,255,255,.5)}
.lv-glow{position:absolute;left:50%;top:50%;width:150%;height:150%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,rgba(233,181,60,.55) 0,rgba(233,181,60,0) 68%);animation:lvglow 1.8s ease-in-out infinite;pointer-events:none}
@keyframes lvglow{0%,100%{opacity:.6;transform:translate(-50%,-50%) scale(.92)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}}
.lv-num{position:absolute;left:6px;top:3px;font-size:12px;font-weight:900;opacity:.85;line-height:1}
.lv-node.done .lv-num{color:#fff}.lv-node.cur .lv-num{color:#14203a}
.lv-node .lv-st{background:#0f1a30;border-radius:99px;padding:3px 8px;width:max-content;left:50%;right:auto;transform:translateX(-50%);border:1px solid #26365a}
.lv-node .lv-lab{font-size:12px;background:#0f1a30;border-radius:99px;padding:2px 10px;width:max-content;left:50%;right:auto;transform:translateX(-50%);border:1px solid #26365a}
.lv-node .lv-crown{width:32px;height:32px;right:-16px;top:-14px;background:linear-gradient(180deg,#ffe28a,#e9b53c);box-shadow:0 2px 6px rgba(0,0,0,.4)}
.lv-avatar{margin-left:2px}
@media (prefers-reduced-motion:reduce){.lv-decor,.lv-glow{animation:none}}

/* 10/20 desktop: wide two-panel home. Green panel on the left (sticky, as tall as the window), menu on the right, bar centered at the bottom. Phones are untouched. */
@media (min-width:900px){
  .home .home-in{display:grid!important;grid-template-columns:minmax(360px,440px) 1fr!important;max-width:1180px!important;margin:0 auto;gap:32px!important;padding:32px 32px 110px!important;min-height:100dvh!important;align-items:start!important}
  .home .home-hero{position:sticky!important;top:32px!important;height:calc(100dvh - 130px)!important;min-height:440px!important;border-radius:28px!important;justify-content:center!important;padding:28px 26px!important;gap:18px!important}
  .home .home-brand{font-size:clamp(44px,4.4vw,60px)!important;margin-top:64px!important}
  .home .home-hero .home-play .start-btn{font-size:30px!important;padding:20px!important}
  .home .home-hero .home-play #home-what{font-size:22px!important}
  .home .home-modes{display:grid!important;grid-template-columns:1fr 1fr!important;gap:20px!important;padding:0!important;align-content:start;width:100%}
  .home .home-modes>*{grid-column:1/-1}
  .home .home-modes>.home-levels,.home .home-modes>.home-duo{grid-column:auto}
  .home .home-levels,.home .home-duo .home-tile.home-mb{min-height:190px;border-radius:22px!important;padding:26px 14px!important}
  .home .home-levels span,.home .home-duo .home-tile.home-mb span{font-size:46px!important}
  .home .home-levels b,.home .home-duo .home-tile.home-mb b{font-size:28px!important}
  .home .home-levels small,.home .home-duo .home-tile.home-mb small{font-size:15px!important}
  .home .home-sec{font-size:13px;margin:6px 2px 8px}
  .week-row{padding:16px 22px;border-radius:20px}
  .week-row i{width:40px;height:40px}
  .home-make{padding:20px 22px;border-radius:20px}
  .home-make span{font-size:38px}.home-make b{font-size:19px}.home-make small{font-size:14px}
  .home .home-modes .home-legal{font-size:12px;margin-top:8px}
  .home-bar{max-width:1000px!important;bottom:14px!important;border:1px solid var(--line)!important;border-radius:22px!important;box-shadow:0 8px 28px rgba(0,0,0,.14)}
  .home-bar button{min-height:60px}
  .home .home-levels:hover,.home .home-duo .home-tile.home-mb:hover,.home .home-play .start-btn:hover,.home-make:hover{filter:brightness(1.06);cursor:pointer}
}

.home-beat{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#fff1e0;border:2px solid #f0a64a;border-radius:16px;padding:12px 14px;color:#4a2a00;font:inherit;cursor:pointer;margin:0 0 6px}
.home-beat[hidden]{display:none}
.home-beat span{font-size:26px}.home-beat b{flex:1;font-size:14px;font-weight:700;line-height:1.3}.home-beat i{font-style:normal;font-size:26px}
@media (prefers-color-scheme:dark){.home-beat{background:#3a2a14;border-color:#a8691f;color:#ffe2bd}}

/* 10/20 treasure map: the Levels screen is old parchment with a dashed trail, gold coins for beaten levels and a red X where you are */
.levels{background:#5a3a1a}
.lv-top,.lv-foot{background:#4a2e14;border-color:#2e1a08}
.lv-x{background:#6b4423}.lv-pill{background:#6b4423}
.lv-title b{color:#f3d27a}.lv-title small{color:#e3c99a}
.lv-map{background:radial-gradient(ellipse at 20% 12%,#f0dca6 0,#e4c887 55%,#d6b370 100%);box-shadow:inset 0 0 70px rgba(90,55,15,.5)}
.lv-zone{background:linear-gradient(180deg,rgba(140,90,35,.14),rgba(140,90,35,0) 60%),repeating-linear-gradient(115deg,rgba(120,80,30,.045) 0 2px,transparent 2px 9px)!important}
.lv-zlabel span{background:#f6e7bb;border:2px solid #7a4a1c;color:#4a2e14;box-shadow:0 3px 0 rgba(74,46,20,.35)}
.lv-zlabel em{color:#7a5a34}
.lv-decor{opacity:.55;filter:sepia(.5)}
.lv-node>button{background:#d9bd83;border:4px solid #8a5a2b;color:#4a2e14;box-shadow:0 5px 0 #6b4423}
.lv-node.done>button{background:radial-gradient(circle at 35% 30%,#ffe58a,#e0a526 70%);border-color:#8a5a16;color:#5a3a00}
.lv-node.done svg{stroke:#5a3a00}
.lv-node.cur>button{background:#c0392b;border-color:#fff3d1;box-shadow:0 5px 0 #7d2018;color:#fff}
.lv-node.cur svg polygon{fill:#fff}
.lv-node .lv-lab{color:#7a5a34}.lv-node.cur .lv-lab{color:#b3261e}
.lv-node.locked svg{stroke:#8a5a2b}.lv-node.locked svg rect{fill:#8a5a2b}
.lv-node .lv-crown{background:#c0392b;border-color:#fff3d1}.lv-node .lv-crown svg path{fill:#fff3d1}
.lv-soon{background:#f6e7bb;border-color:#8a5a2b;color:#4a2e14}.lv-soon b{color:#b3261e}
.lv-avatar i{background:#c0392b;border-color:#fff3d1}.lv-avatar:after{border-top-color:#fff3d1}
.lv-play{background:#e0a526;color:#3a2200;box-shadow:0 5px 0 #8a5a16}
.lv-toast{background:#4a2e14}
.lv-node .lv-lab{background:#f6e7bb!important;border:1px solid #8a5a2b;color:#5a3a1a!important}
.lv-node.cur .lv-lab{background:#c0392b!important;border-color:#7d2018;color:#fff!important}
#submit[hidden],[data-d="guess"][hidden]{display:none!important}

/* jungle treasure map: deep green jungle, a sandy dashed trail, gold coins, treasure and a red X at the end */
.levels{background:#17381f}
.lv-top,.lv-foot{background:#10291a;border-color:#0a1a10}
.lv-x,.lv-pill{background:#25533a}
.lv-title b{color:#ffd34d}.lv-title small{color:#bfe0c4}
.lv-map{background:radial-gradient(circle at 18% 8%,#2f6b3d 0,transparent 45%),radial-gradient(circle at 85% 40%,#2a6236 0,transparent 40%),radial-gradient(circle at 20% 80%,#2b6a45 0,transparent 42%),#1f4d2c;box-shadow:inset 0 0 60px rgba(0,0,0,.45)}
.lv-zone{background:repeating-radial-gradient(circle at 30% 20%,rgba(255,255,255,.035) 0 6px,transparent 6px 26px)!important}
.lv-decor{opacity:.9;filter:none}
.lv-zlabel span{background:#f6e7bb;border-color:#7a4a1c;color:#3d2610}
.lv-node>button{background:#4a3520;border:4px solid #c9a35a;color:#f6e7bb;box-shadow:0 5px 0 #20140a}
.lv-node.locked svg{stroke:#c9a35a}.lv-node.locked svg rect{fill:#c9a35a}
.lv-node .lv-lab{background:#f6e7bb!important;color:#3d2610!important;border-color:#7a4a1c}
.lv-soon{background:#f6e7bb;border-color:#7a4a1c;color:#3d2610}
.lv-chest{position:absolute;font-size:60px;line-height:1;pointer-events:none;filter:drop-shadow(0 4px 4px rgba(0,0,0,.5))}
.lv-xmark{position:absolute;width:80px;text-align:center;font:900 54px/1 Georgia,serif;color:#e0392b;pointer-events:none;text-shadow:0 2px 0 #7d2018,0 0 12px rgba(0,0,0,.4);transform:rotate(-6deg)}

.fr-sug{margin:-2px 0 8px;border:1px solid var(--line);border-radius:14px;background:var(--card);overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.12)}
.fr-sug[hidden]{display:none}
.fr-sug button{display:flex;justify-content:space-between;align-items:center;width:100%;padding:12px 14px;background:none;border:0;border-bottom:1px solid var(--line);font:inherit;color:var(--ink);cursor:pointer;text-align:left}
.fr-sug button:last-child{border-bottom:0}.fr-sug button:hover,.fr-sug button:active{background:var(--line)}
.fr-sug small{color:var(--muted);font-weight:700}.fr-sug-none{padding:12px 14px;color:var(--muted)}
/* detailed jungle background: a pre-rendered picture (public/jungle.webp, made by scripts/make-jungle.py) tiled down the map. It sits on the scrolling content, not the box, so scrolling stays smooth. */
.lv-map{background:#0a1020!important;box-shadow:none!important}
.lv-inner{max-width:560px;margin:0 auto;background:#0a1020;transform:translateZ(0)}
.lv-zone{background:none!important}
.lv-decor{display:none}
.lv-chest{display:none}
/* no visible scroll bar on Home (it still scrolls if the screen is short) */
.home,.lv-map{scrollbar-width:none;-ms-overflow-style:none}
.home::-webkit-scrollbar,.lv-map::-webkit-scrollbar{display:none;width:0;height:0}

/* chat */
.ch-list{display:flex;flex-direction:column;gap:8px;height:min(46dvh,420px);overflow-y:auto;padding:4px 2px;margin:6px 0 10px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}
.ch-msg{max-width:84%;align-self:flex-start;background:var(--card);border:1px solid var(--line);border-radius:14px 14px 14px 4px;padding:6px 12px;margin:0 6px}
.ch-msg.mine{align-self:flex-end;background:#d9f0e2;border-color:#a9d9bb;border-radius:14px 14px 4px 14px;color:#0e2a1a}
.ch-msg small{display:block;font-weight:800;font-size:11px;color:var(--muted)}.ch-msg.mine small{color:#3b6b4d}
.ch-msg p{margin:2px 0;font-size:15px;line-height:1.35;word-break:break-word;white-space:pre-wrap}
.ch-rep{background:none;border:0;color:var(--muted);font:inherit;font-size:11px;text-decoration:underline;padding:2px 0;cursor:pointer}
#ch-form{display:flex;gap:8px}#ch-form input{flex:1;min-width:0;padding:12px;border-radius:12px;border:2px solid var(--line);background:var(--card);color:var(--ink);font:inherit;font-size:16px}
#ch-form button{width:auto;padding:0 18px}
.ch-foot{display:flex;justify-content:center;margin:4px 0}
.ch-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#e0392b;margin-right:8px}

/* no visible scroll bars anywhere (everything still scrolls) */
html,body,*{scrollbar-width:none;-ms-overflow-style:none}
*::-webkit-scrollbar{display:none;width:0;height:0}

/* Levels map, dark zone scenes (public/zones/z0..z4.webp, made by scripts/make-zones.mjs): jungle, beach, desert, winter, night sky. Pre-rendered pictures keep scrolling smooth. */
.lv-zone{background-color:#0a1020!important;background-repeat:no-repeat!important;background-size:cover!important;background-position:center bottom!important}
.lv-zone[data-z="0"]{background-image:url(/zones/z0.webp)!important}
.lv-zone[data-z="1"]{background-image:url(/zones/z1.webp)!important}
.lv-zone[data-z="2"]{background-image:url(/zones/z2.webp)!important}
.lv-zone[data-z="3"]{background-image:url(/zones/z3.webp)!important}
.lv-zone[data-z="4"]{background-image:url(/zones/z4.webp)!important;background-position:center top!important}
.lv-zlabel span{background:rgba(8,12,28,.78);backdrop-filter:none;box-shadow:none;font-size:12px;letter-spacing:1.6px;color:#eaf0ff;border-width:1px}
.lv-zlabel em{color:#9db0d6}
/* Levels map chrome in the same dark navy as the rest of the game: quiet nodes, no wood or parchment */
.levels{background:#0a1020}
.lv-top,.lv-foot{background:#0d1428;border-color:#1c2a4a}
.lv-x,.lv-pill{background:#1a2744}
.lv-title b{color:#eaf0ff}.lv-title small{color:#9db0d6}
.lv-node>button{background:#141d36;border:3px solid #4b5e8c;color:#eaf0ff;box-shadow:0 4px 0 rgba(0,0,0,.45)}
.lv-node.locked svg{stroke:#8d9bbb}.lv-node.locked svg rect{fill:#8d9bbb}
.lv-node.done>button{background:var(--zc);border-color:rgba(255,255,255,.55)}
.lv-node.cur>button{background:#e9b53c;border-color:#fff3c4;color:#1a1402}
.lv-node .lv-lab{background:rgba(8,12,28,.8)!important;color:#c9d6f2!important;border-color:#2a3a5e}
.lv-soon{background:rgba(8,12,28,.85);border-color:#2a3a5e;color:#c9d6f2}
.lv-soon b{color:#eaf0ff}
.lv-xmark{color:#e9b53c;text-shadow:0 0 14px rgba(233,181,60,.5);font-size:44px}
/* challenge link banner on Home */
.home-challenge{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:#e6f0ff;border:2px solid #5b8fe0;border-radius:16px;padding:12px 14px;color:#10294d;font:inherit;cursor:pointer;margin:0 0 6px}
.home-challenge[hidden]{display:none}
.home-challenge span{font-size:26px}.home-challenge b{flex:1;font-size:14px;font-weight:700;line-height:1.3}.home-challenge i{font-style:normal;font-size:26px}
@media (prefers-color-scheme:dark){.home-challenge{background:#14264a;border-color:#3f6cb8;color:#d6e6ff}}
.milestone{margin:10px 0 4px;text-align:center;font-weight:700;font-size:14px;color:#a8691f}
@media (prefers-color-scheme:dark){.milestone{color:#ffcf8a}}

/* "Post it on" row: computers only (phones use the share sheet) */
.social { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; font-size: 13px; color: var(--muted, #6b7280); }
.social button { font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.social button:hover { border-color: var(--brand); }

/* fog of war on the Levels map: hides the map ahead, lifts when a level is beaten */
.lv-fog{position:absolute;left:0;right:0;top:0;height:0;pointer-events:none;background:rgba(214,222,236,.78);-webkit-backdrop-filter:grayscale(1) blur(4px);backdrop-filter:grayscale(1) blur(4px);-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 140px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 140px),transparent);transition:height 2.2s cubic-bezier(.4,0,.2,1)}
.lv-fog.gone{visibility:hidden;transition:height 2.2s cubic-bezier(.4,0,.2,1),visibility 0s 2.2s}
@media (prefers-reduced-motion:reduce){.lv-fog{transition:none}}

.lv-fog{overflow:hidden}
@keyframes lvshimmer{0%{background-position:0 0}100%{background-position:-200% 0}}

/* Tap to start on a level: level number, difficulty chip, zone, stars on offer */
.gate-sub{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.gate-diff{display:inline-block;padding:5px 16px;border-radius:999px;font-weight:900;font-size:15px;letter-spacing:1.5px;text-transform:uppercase;color:#fff;border:2px solid rgba(255,255,255,.85)}
.gate-diff.d-easy{background:#2f9e63}.gate-diff.d-medium{background:#c98f12}.gate-diff.d-hard{background:#c8473a}
.gate-zone{font-weight:900;font-size:14px;letter-spacing:2px;text-transform:uppercase}
.gate-stars{display:flex;gap:10px;justify-content:center;margin-top:26px}
.gate-stars svg{filter:drop-shadow(0 2px 0 rgba(0,0,0,.25))}
.gate-stars[hidden],.gate-tip[hidden]{display:none}
.gate-tip{opacity:.85;font-size:14px;font-weight:700;margin-top:4px}
.gate-stars+.gate-tip+.gate-go,.gate-tip+.gate-go{margin-top:28px}
.gate-stars polygon{fill:rgba(255,255,255,.3)!important;stroke:#fff;stroke-width:1;stroke-linejoin:round}

.nudge{margin:12px 0 4px;padding:12px 14px;border-radius:14px;background:#fff7e0;border:2px solid #e9b53c;text-align:center;color:#3a2a05}
.nudge[hidden]{display:none}
.nudge b{display:block;font-size:15px}.nudge span{display:block;font-size:13px;margin:4px 0 8px;opacity:.85}
.nudge button.primary{padding:10px 18px;font-size:15px}
.nudge .linkbtn{margin-left:8px}
#install .ib{display:inline;font-size:13px}
#install span + span{margin-top:-4px}

/* level Start screen: the FOSOCONI name leads, the level number sits under it; the notes under START are italic */
.gate-note{font-style:normal}
.gate.is-level .gate-brand{font-size:36px;letter-spacing:6px;opacity:1}
.gate.is-level .gate-kind{font-size:30px;margin-top:10px}

.lv-node.veiled{opacity:0;pointer-events:none}
.lv-node{transition:opacity 1.2s ease}
.lv-node.popin{transition:none}

.lbmode{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--line);border-radius:12px;padding:4px;margin:6px 0 10px}
.lbmode button{font:inherit;font-weight:800;font-size:14px;background:transparent;color:var(--muted);border:0;border-radius:9px;padding:9px 0;cursor:pointer}
.lbmode button.on{background:var(--brand);color:var(--brand-ink)}
.lb .pts small{font-weight:700;font-size:12px;opacity:.7}

/* Level and battle result cards fit one phone screen without scrolling */
.bt-btns{display:flex;gap:8px;margin-top:6px}.bt-btns .cta{flex:1;width:auto;margin:0;padding:12px 6px;font-size:17px}
body.compact-result .result{padding:8px 12px}
body.compact-result .result h2{margin:2px 0 4px;font-size:22px}
body.compact-result .bt-vs{margin:4px 0}
body.compact-result .bt-side{padding:6px 8px}
body.compact-result .bt-side b{font-size:22px}
body.compact-result .bt-table{margin:2px 0 4px}
body.compact-result .bt-row{padding:3px 0}
body.compact-result .bt-row b{font-size:16px}
body.compact-result .lv-res-line{margin-bottom:4px;font-size:14px;line-height:1.25}
body.compact-result .reveal{margin:2px 0}
body.compact-result .rv{gap:0}
body.compact-result .rv-arrow{font-size:14px}
body.compact-result .rv-clue{font-size:14px;padding:2px 12px}
body.compact-result .rv-ans{font-size:23px;padding:1px 14px}
body.compact-result .why{font-size:13px;line-height:1.25;margin:4px 0 6px}
body.compact-result .why p,body.compact-result .why li{margin:1px 0}
body.compact-result .minilinks{margin-top:2px}
body.compact-result .minilinks button{padding:4px}
body.compact-result .lv-brk-stats small{font-size:11px}
body.compact-result .result .res-hero{margin:6px 0 2px;padding:8px 10px 6px}
body.compact-result .result .res-hero .score-big{font-size:42px!important}
body.compact-result .res-stats{margin:6px 0 0}
body.compact-result .res-stats>div{padding:4px}
body.compact-result .res-stats b{font-size:17px}
body.compact-result .res-hero .how-scored summary{padding:3px}
body.compact-result .acts{margin-top:6px}
body.compact-result .act{padding:7px 2px 6px;gap:3px}
body.compact-result .act svg{width:22px;height:22px}
body.compact-result .result .cta{padding-top:11px;padding-bottom:11px;margin-top:6px}
body.compact-result .act{grid-auto-flow:column;justify-content:center;align-items:center;gap:8px;padding:9px 4px;font-size:14px}
body.compact-result:not(.kbd-show){padding-bottom:calc(8px + env(safe-area-inset-bottom))}
body.compact-result .daynav{display:none}
body.compact-result .result h2{font-size:20px}
body.compact-result .rv-ans{font-size:21px}
body.compact-result .result .res-hero .crowd{margin:4px 0 0;font-size:12px}
body.compact-result .res-hero .how-scored{margin-top:0}
.acts.a1{grid-template-columns:1fr}
body.compact-result .acts.a4 .act{grid-auto-flow:row;gap:2px;padding:6px 2px 5px;font-size:12px}
body.compact-result .acts.a4 .act svg{width:20px;height:20px}
body.compact-result .act span{overflow:hidden;text-overflow:ellipsis}
body.compact-result .milestone{margin:6px 0 0;font-size:14px}
body.compact-result .countdown{margin-top:2px;font-size:13px}
body.compact-result .minilinks{gap:0 10px}
body.compact-result .nextday small{display:none}
body.compact-result .result .minilinks button{font-size:12.5px;padding:3px 2px}
body.compact-result .result .minilinks{flex-wrap:nowrap;gap:0 8px}
body.compact-result .minilinks #idea-open,body.compact-result .minilinks #replay,body.compact-result .minilinks #note-open{display:inline-block;margin:0}
body.compact-result #idea-open,body.compact-result #note-open,body.compact-result #replay{padding:3px 2px!important;font-size:12.5px!important;margin:0!important}
body.compact-result .result .minilinks button{white-space:nowrap}
body.compact-result .result .res-hero .score-big{font-size:38px!important}
body.compact-result .milestone{margin:4px 0 0;font-size:13px}
body.compact-result .countdown{margin-top:0}
/* Username screen with the on-screen keyboard: its own Continue key does the job, so the page button would only sit half
   hidden behind it (in-app browsers like X's are short). A smaller header keeps the card above the keyboard. */
body.kbd-name #signin-go{display:none}
body.kbd-name .signin-in{padding-top:16px}
body.kbd-name .signin-in .home-top{margin-bottom:8px}
body.kbd-name .signin-in .home-brand{font-size:30px}

/* Avatars (built-in Avataaars choices, see public/avatar.js): a small circle next to names, the initial when there is none */
.av{flex:none;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--brand) center/cover no-repeat;color:var(--brand-ink);font-style:normal;font-weight:800;font-size:15px;line-height:1;overflow:hidden}
.av.has-av{color:transparent;background-color:transparent}
.lb li { grid-template-columns: 32px 34px 1fr auto; }
.lb li.podium .av{width:38px;height:38px}
.pc-av.av{width:52px;height:52px;font-size:24px}
.fr-row .av{width:30px;height:30px;font-size:13px}
.fr-row .fr-name{flex:1;text-align:left}
.bt-av.av{display:grid;width:44px;height:44px;margin:0 auto 4px;font-size:18px}
body.compact-result .bt-av.av{width:34px;height:34px}
/* The avatar maker */
.avm-top{display:flex;align-items:center;justify-content:center;gap:14px;margin:4px 0 10px}
.avm-pic{display:block;width:112px;height:112px;border-radius:50%;background:var(--line) center/cover no-repeat;border:3px solid var(--brand)}
.avm-list{max-height:min(46vh,380px);overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin-bottom:10px;-webkit-overflow-scrolling:touch}
.avm-row{margin:0 0 10px}
.avm-lab{display:block;font-size:13px;font-weight:700;color:var(--muted);margin:0 0 5px}
.avm-items{display:flex;flex-wrap:wrap;gap:6px}
.avm-opt{font:inherit;font-size:13px;padding:5px 10px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer}
.avm-opt.on{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}
.avm-sw{width:30px;height:30px;border-radius:50%;border:1px solid rgba(0,0,0,.2);cursor:pointer;padding:0}
.avm-sw.on{box-shadow:0 0 0 3px var(--card),0 0 0 5px var(--brand)}
.avm-rm{display:block;margin:2px auto 8px}
.dob-row{display:grid;grid-template-columns:1.4fr 1fr 1.1fr;gap:8px;margin-bottom:12px}
.dob-row .signin-input{font-size:17px;padding:12px 8px;appearance:auto}

.namecard .namerow{display:flex;gap:8px;margin-top:10px}
.namecard .namerow input{flex:1;min-width:0;font:inherit;font-size:17px;padding:10px 12px;border:2px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink)}
.namecard .namerow .primary{flex:0 0 auto;padding:10px 18px}
.namecard .error{margin-top:6px}
.remind-opt{display:flex;align-items:center;gap:10px;font-size:15px;margin:10px 0 14px;text-align:left;cursor:pointer}
.remind-opt input{width:22px;height:22px;flex:0 0 auto;accent-color:var(--brand)}

/* 10/26 desktop home, per Evan: a real website header instead of the phone tab bar. Brand on the left, the menu in a row,
   streak and profile at the top right. Below: the green START panel on the left, the modes on the right. Phones are untouched. */
@media (min-width:900px){
  .home,.home-bar{--edge:max(28px,calc(50% - 562px))} /* lines up with the content below (1180 wide, 28 padding) */
  .home-bar{position:fixed!important;top:0!important;bottom:auto!important;left:0!important;right:0!important;transform:none!important;width:auto!important;max-width:none!important;height:72px;display:flex!important;align-items:center;justify-content:flex-end;gap:4px;padding:0 calc(var(--edge) + 150px) 0 var(--edge)!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;box-shadow:0 2px 14px rgba(0,0,0,.06)!important;background:var(--card);z-index:20}
  .home-bar::before{content:"FOSOCONI";margin-right:auto;font:700 26px "Courier Prime","Courier New",monospace;letter-spacing:4px;color:var(--brand)}
  .home-bar button{display:flex!important;align-items:center;gap:7px;min-height:44px!important;padding:0 14px!important;border-radius:12px;font:600 15px system-ui,sans-serif!important;white-space:nowrap}
  .home-bar button span{font-size:19px!important}
  .home-bar button:hover{background:var(--line)}
  .home-bar .tile-badge{top:4px;right:4px}
  .home .home-hero .avatar-btn{position:fixed!important;top:13px!important;right:var(--edge)!important;left:auto!important;width:46px!important;height:46px!important;z-index:21;box-shadow:none!important;border:0!important;background:var(--brand)!important;color:#fff!important;font-size:20px!important}
  .home .home-hero .streak-btn{position:fixed!important;top:12px!important;right:calc(var(--edge) + 62px)!important;left:auto!important;z-index:21;height:48px!important;font-size:22px!important;color:var(--ink)!important}
  .home .home-hero .streak-btn b{color:var(--ink)!important}
  .home .home-in{padding:104px 28px 40px!important;max-width:1180px!important;grid-template-columns:minmax(380px,460px) 1fr!important;gap:32px!important;min-height:auto!important}
  .home .home-hero{position:sticky!important;top:104px!important;height:auto!important;min-height:480px!important;justify-content:center!important;padding:44px 34px!important}
  .home .home-hero{z-index:21}  /* sticky makes its own layer: lift it so the profile and streak it holds sit above the header */
  .home .home-brand{margin-top:0!important}
  .home .home-modes{padding-bottom:0!important}
}
@media (min-width:900px) and (prefers-color-scheme:dark){.home-bar{box-shadow:0 2px 14px rgba(0,0,0,.4)!important}}

/* 10/26 desktop: the green panel shows your stats, today's top players and the countdown under START */
.home-today{display:none}
@media (min-width:900px){
  .home .home-hero .home-stats{display:grid!important;grid-template-columns:repeat(4,1fr);gap:8px}
  .home .home-hero .home-stats div{padding:10px 2px!important;border-radius:12px}
  .home .home-hero .home-stats b{font-size:22px!important}.home .home-hero .home-stats span{font-size:11.5px!important}
  .home .home-today{display:block;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);border-radius:16px;padding:12px 14px;color:#fff}
  .home .home-today:empty{display:none}
  .home-today .ht-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px}
  .home-today .ht-head b{font-size:14px;letter-spacing:.4px;text-transform:uppercase;color:#f5d36b}
  .home-today .ht-head span{font-size:12px;color:#cfe3d8}
  .home-today ol{list-style:none;margin:0;padding:0;display:grid;gap:4px}
  .home-today li{display:grid;grid-template-columns:22px 28px 1fr auto;align-items:center;gap:8px;padding:3px 6px;border-radius:10px;font-size:14px}
  .home-today li.me{background:rgba(245,179,1,.18)}
  .home-today li.empty{display:block;color:#cfe3d8;font-size:13px;text-align:center;padding:8px 0}
  .home-today .rk{font-weight:800;color:#cfe3d8;text-align:center}
  .home-today li b{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .home-today .pts{font-weight:800;color:#f5d36b}
  .home-today .av{width:26px;height:26px;font-size:12px}
  .home-today .ht-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:12.5px;color:#cfe3d8}
  .home-today .ht-foot .linkbtn{color:#fff;font-weight:700;padding:0;margin:0;font-size:13px}
  .home-today .ht-foot b{color:#fff;font-variant-numeric:tabular-nums}
  .home .home-hero{justify-content:flex-start!important;gap:16px!important;padding:36px 30px 28px!important}
}

/* 10/26 desktop, per Evan: no scrolling. The page is exactly the window: header, then both columns fill the rest,
   and every block scales with the window height (smaller laptop screens get smaller tiles, never a scrollbar). */
@media (min-width:900px){
  .home .home-in{height:calc(100dvh - 72px)!important;min-height:0!important;margin-top:72px!important;padding:clamp(12px,2.6vh,30px) 28px!important;box-sizing:border-box;align-items:stretch!important;grid-template-rows:minmax(0,1fr)!important}
  .home .home-hero{position:relative!important;top:auto!important;height:auto!important;min-height:0!important;overflow:hidden;padding:clamp(14px,3vh,34px) 30px!important;gap:clamp(6px,1.5vh,16px)!important;justify-content:flex-start!important}
  .home .home-brand{font-size:clamp(28px,5.6vh,56px)!important;line-height:1}
  .home .home-hero .home-sub{font-size:clamp(13px,2vh,17px)!important;margin:0!important}
  .home .home-hero .home-play{gap:clamp(2px,.6vh,6px)!important}
  .home .home-hero .home-play .start-btn{font-size:clamp(20px,3.8vh,30px)!important;padding:clamp(8px,2vh,20px)!important}
  .home .home-hero .home-play #home-what{font-size:clamp(15px,2.5vh,22px)!important}
  .home .home-hero .home-stats div{padding:clamp(4px,1vh,10px) 2px!important}
  .home .home-hero .home-stats b{font-size:clamp(15px,2.6vh,22px)!important}
  .home .home-today{flex:1 1 auto;min-height:0;overflow:hidden;padding:clamp(6px,1.4vh,12px) 14px!important}
  .home .home-modes{height:100%!important;min-height:0!important;grid-template-rows:minmax(0,1fr)!important;grid-auto-rows:auto!important;gap:clamp(8px,1.8vh,20px)!important;align-content:stretch!important;overflow:hidden}
  .home .home-levels,.home .home-duo,.home .home-duo .home-tile.home-mb{min-height:0!important;height:100%!important;box-sizing:border-box}
  .home .home-levels,.home .home-duo .home-tile.home-mb{padding:clamp(8px,2vh,26px) 14px!important}
  .home .home-levels span,.home .home-duo .home-tile.home-mb span{font-size:clamp(26px,5vh,46px)!important}
  .home .home-levels b,.home .home-duo .home-tile.home-mb b{font-size:clamp(20px,3.4vh,28px)!important}
  .home .home-sec{margin:0 2px clamp(4px,.8vh,8px)!important}
  .home .week-row{padding:clamp(6px,1.4vh,16px) 22px!important}
  .home .week-row i{width:clamp(26px,4.4vh,40px)!important;height:clamp(26px,4.4vh,40px)!important}
  .home .home-make{padding:clamp(8px,1.8vh,20px) 22px!important}
  .home .home-make span{font-size:clamp(26px,4.6vh,38px)!important}
  .home .home-modes .home-feedback{margin:0 auto!important}
  .home .home-modes .home-legal{margin:0!important;font-size:11px!important;line-height:1.4}
}
@media (min-width:900px){
  .home .home-in{max-height:820px}
  .home .home-hero{justify-content:center!important}
  .home .home-today{flex:0 1 auto}
  .home .home-levels,.home .home-duo .home-tile.home-mb{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:clamp(2px,.8vh,8px)!important;text-align:center!important}
  .home .home-levels small,.home .home-duo .home-tile.home-mb small{margin:0!important}
}
@media (min-width:900px){
  .home .home-levels>*,.home .home-duo .home-tile.home-mb>*{align-self:center!important;justify-self:center!important;grid-row:auto!important;grid-column:auto!important}
  .home .home-in{margin-top:max(72px,calc(72px + (100dvh - 72px - 820px) / 2))!important}
}

/* 10/27 desktop puzzle screen, per Evan: it was the phone column in the middle of a laptop. Wider page, bigger clue, tiles and
   buttons, so it fills a computer screen. Phones are untouched. */
@media (min-width:900px){
  body{max-width:880px!important;padding:0 36px 40px!important}
  .top{padding:18px 0!important}
  .top h1 .brand{font-size:34px!important;letter-spacing:5px}
  .top h1 small{font-size:14px!important}
  .top-link{transform:scale(1.15);transform-origin:left center}
  .slots{gap:14px!important;margin-top:16px!important}
  .slots button{padding:14px 10px!important;font-size:18px!important;border-radius:16px!important}
  .slots button small{font-size:13px!important}
  .daynav button{font-size:15px!important}
  .meta{font-size:15px!important;margin:10px 0!important}
  .clue{gap:18px!important}
  .clue-word{font-size:clamp(40px,5vh,60px)!important;padding:clamp(22px,4.2vh,40px) 16px!important;border-radius:22px!important}
  .hear{font-size:16px!important;padding:8px 18px!important}
  .timer .clock{font-size:26px!important}.timer .speed{font-size:20px!important}
  .field>span:first-child{font-size:14px!important}
  .tiles .t{max-width:68px!important;font-size:32px!important;border-radius:14px!important;border-width:3px!important}
  .tiles{gap:10px!important}
  .primary#submit{font-size:22px!important;padding:18px!important;border-radius:16px!important}
  .hint-row button{font-size:18px!important;padding:16px!important}
  .giveup-link{font-size:15px!important}
  .result{font-size:17px}
}
@media (min-width:900px){
  .slots button b{font-size:19px!important}.slots button{font-size:14px!important;padding:12px 8px!important}
  .field>span:first-child{display:block;text-align:center}
  .clue-word{padding:clamp(16px,3.4vh,40px) 16px!important}
  .tiles .t{max-width:clamp(52px,8vh,68px)!important}
}

/* 10/27 desktop Levels, per Evan: the map fills the whole window instead of a phone-width strip; the play button stays a sensible size */
@media (min-width:900px){
  .lv-inner{max-width:none!important}
  .lv-foot{align-items:center}
  .lv-foot>*{width:100%;max-width:560px}
  .lv-node button{cursor:pointer}
}
/* Phones (10/28, Evan): the home screen is one fixed screen like an app, never scrolls. Everything sizes to the
   screen height, the tiles take whatever room is left, and Terms and Privacy sit just above the bottom bar. */
@media (max-width:899px){
  .home{overflow:hidden!important;overscroll-behavior:none}
  .home .home-in{height:100dvh!important;min-height:0!important;max-height:100dvh;overflow:hidden;padding-bottom:calc(66px + env(safe-area-inset-bottom))!important}
  .home .home-hero{flex:0 0 auto;gap:clamp(2px,.9dvh,12px)!important;padding:calc(clamp(6px,1.2dvh,12px) + env(safe-area-inset-top)) 16px clamp(8px,1.8dvh,20px)!important}
  .home .home-hero .home-brand{font-size:clamp(24px,5dvh,40px)!important}
  .home .home-brand::after{margin-top:clamp(3px,.9dvh,9px)!important}
  .home .home-hero .home-sub{font-size:clamp(13px,2.2dvh,19px)!important}
  .home .home-hero .home-play{gap:clamp(0px,.5dvh,6px)!important}
  .home .home-hero .home-play .start-btn{font-size:clamp(20px,3.6dvh,30px)!important;padding:clamp(7px,1.7dvh,18px)!important}
  .home .home-hero .home-play #home-what{font-size:clamp(15px,2.6dvh,22px)!important;margin-top:clamp(0px,.5dvh,6px)!important}
  .home .home-hero .home-play small{font-size:clamp(11px,1.6dvh,14px)!important}
  .home .home-hero .avatar-btn{width:clamp(40px,6.4dvh,56px)!important;height:clamp(40px,6.4dvh,56px)!important}
  .home .home-modes{flex:1 1 0!important;min-height:0!important;overflow:hidden;display:grid!important;grid-template-rows:minmax(0,230px);grid-auto-rows:auto;align-content:space-between!important;padding:clamp(6px,1.4dvh,16px) 16px clamp(4px,.8dvh,8px)!important;gap:clamp(4px,1dvh,12px)!important}
  .home .home-levels,.home .home-duo,.home .home-duo .home-tile.home-mb{min-height:0!important;height:100%!important;box-sizing:border-box}
  .home .home-levels,.home .home-duo .home-tile.home-mb{padding:clamp(4px,1.2dvh,14px) 6px!important;align-content:center!important}
  .home .home-levels span,.home .home-duo .home-tile.home-mb span{font-size:clamp(20px,4dvh,34px)!important}
  .home .home-levels b,.home .home-duo .home-tile.home-mb b{font-size:clamp(16px,2.6dvh,22px)!important}
  .home .home-beat{margin:0!important;padding:clamp(5px,1.1dvh,12px) 14px!important}
  .home .home-beat span,.home .home-beat i{font-size:clamp(20px,3.2dvh,26px)}
  .home .home-beat b{font-size:clamp(12px,1.8dvh,14px)}
  .home .home-sec{margin:0 2px clamp(2px,.6dvh,6px)!important;font-size:clamp(10px,1.5dvh,12px)!important}
  .home .week-row{padding:clamp(4px,1dvh,10px) 12px!important}
  .home .week-row div{gap:clamp(1px,.4dvh,4px)}
  .home .week-row i{width:clamp(20px,3.4dvh,30px)!important;height:clamp(20px,3.4dvh,30px)!important;font-size:clamp(11px,1.8dvh,15px)}
  .home .home-make{padding:clamp(5px,1.2dvh,12px) 14px!important}
  .home .home-make span{font-size:clamp(20px,3.6dvh,28px)!important}
  .home .home-make b{font-size:clamp(13px,1.9dvh,15px)!important}
  .home .home-modes .home-legal{margin:0!important;padding:0!important;font-size:clamp(10px,1.5dvh,12px)!important;line-height:1.35!important;position:relative;z-index:1}
  .home .home-modes .home-legal br{display:none}
  .home .home-modes .home-legal a{display:inline-block;padding:2px 6px}
  .home .home-modes .home-feedback{margin:0 auto!important;padding:2px 10px!important}
}
/* very short screens (small phones in the browser): drop the two section labels and the day line */
@media (max-width:899px) and (max-height:620px){
  .home .home-sec{display:none!important}
  .home .home-hero .home-play #home-day{display:none!important}
  .home .home-sub{display:none!important}
}
/* A friend's or group's puzzle plays like the daily: letter tiles and the FOSOCONI keyboard over the sheet (10/28) */
.cp-wrap{display:block;padding:6px;margin:0 0 12px;border-radius:14px;border:2px solid transparent;cursor:pointer}
.cp-wrap.active{border-color:#e9b53c}
.cp-lab{margin-top:4px}
body.kbd-cp .kbd{z-index:40}
body.kbd-cp .modal .sheet{padding-bottom:calc(var(--kbd-h, 220px) + 16px)!important}
/* Levels: a page of pack squares, Pack 1 open, the rest locked (10/28). One screen, no scrolling. */
.lvhub{overflow:hidden!important}
.lvh-list{flex:1 1 0;min-height:0;display:flex!important;flex-direction:column;gap:clamp(8px,1.6dvh,16px)!important;padding-top:clamp(6px,1.2dvh,14px)!important}
.lvh-grid{flex:1 1 0;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:clamp(8px,1.4dvh,14px)}
.lvh-sq{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(1px,.5dvh,5px);min-height:0;padding:8px;border-radius:20px;border:2px solid #3a4d7a;background:linear-gradient(145deg,#24365e,#16233f);color:#fff;font:inherit;text-align:center;cursor:pointer;overflow:hidden;box-shadow:0 5px 0 #0a1426}
.lvh-sq:active{transform:translateY(2px)}
.lvh-sq .lvh-ic{font-size:clamp(24px,4.6dvh,40px);line-height:1}
.lvh-sq em{font-style:normal;font-size:clamp(11px,1.6dvh,13px);font-weight:900;letter-spacing:1.4px;text-transform:uppercase;color:#e9b53c}
.lvh-sq b{font-family:Georgia,serif;font-size:clamp(16px,2.6dvh,22px);line-height:1.1}
.lvh-sq small{font-size:clamp(11px,1.6dvh,13px);font-weight:700;color:#b9c6e3;line-height:1.25}
.lvh-sq .lvh-bar{width:80%;margin:2px 0 0;height:8px}
.lvh-open{border-color:#e9b53c;background:linear-gradient(145deg,#2c4a7e,#1b2c52);box-shadow:0 5px 0 #0a1426,0 0 24px rgba(233,181,60,.22)}
.lvh-open .lvh-go{grid-column:auto;margin-top:clamp(2px,.6dvh,6px);padding:clamp(4px,.9dvh,8px) 16px;border-radius:12px;font-size:clamp(13px,1.9dvh,15px);background:#e9b53c;color:#14203a;box-shadow:0 3px 0 #a47a16}
.lvh-lock{background:linear-gradient(145deg,#1c2a48,#121c33);border-style:dashed;opacity:.85}
.lvh-lock em{color:#8fa0c4}
.lvh-lock .lvh-ic{filter:grayscale(.2)}
.lvh-mind{flex:0 0 auto;grid-template-columns:auto 1fr auto!important;padding:clamp(8px,1.4dvh,14px) 14px!important;row-gap:0!important}
.lvh-mind .lvh-badge{width:clamp(40px,6dvh,56px);height:clamp(40px,6dvh,56px);font-size:clamp(22px,3.4dvh,30px)}
.lvh-mind .lvh-body b{font-size:clamp(18px,2.8dvh,24px)}
.lvh-mind .lvh-body small{font-size:clamp(11px,1.6dvh,13px)}
.lvh-mind .lvh-go{grid-column:auto!important;padding:0 4px!important;background:none!important;box-shadow:none!important;font-size:30px!important;color:#b9a5ff!important}
@media (min-width:900px){.lvh-list,.lvh-top{max-width:760px!important}.lvh-grid{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,minmax(0,1fr))}}
@media (max-height:700px){.lvh-open b{display:none}.lvh-sq{gap:1px}.lvh-open .lvh-go{margin-top:2px}}
/* Result buttons (10/29): four in a row on a phone, and "Leaderboard" never touches the edges. The last button gets a little more room,
   the gap is tighter, and the labels shrink a touch on narrow phones. */
.acts.a4{grid-template-columns:1fr 1.08fr .9fr 1.5fr;gap:6px}
.acts.a4 .act{padding-left:4px;padding-right:4px;min-width:0}
.acts.a4 .act span{font-size:clamp(10.5px,3vw,13px);letter-spacing:-.2px;max-width:100%;overflow:hidden;text-overflow:clip}
.a2hs-btn{display:flex;align-items:center;gap:12px;width:100%;text-align:left;margin:0 0 12px;padding:12px 14px;border-radius:16px;border:2px solid var(--line);background:var(--card);color:var(--ink);font:inherit;cursor:pointer}
.a2hs-btn[hidden]{display:none}
.a2hs-btn span{font-size:28px}.a2hs-btn b{flex:1;font-size:15px}.a2hs-btn small{display:block;font-weight:600;font-size:12px;color:var(--muted);margin-top:2px}.a2hs-btn i{font-style:normal;font-size:26px;color:var(--muted)}
.a2hs-steps{margin:4px 0 8px;padding-left:22px;line-height:1.5}.a2hs-steps li{margin:4px 0}
/* Morning reminder offer on Home (same slot and size as the friend banner) and the profile switch (10/29) */
.home-remind{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;column-gap:10px;width:100%;box-sizing:border-box;background:#e9f3ff;border:2px solid #7aa7e0;border-radius:16px;padding:clamp(6px,1.1dvh,12px) 14px;color:#0f2a4a}
.home-remind[hidden]{display:none}
.home-remind span{font-size:clamp(20px,3.2dvh,26px)}
.home-remind b{font-size:clamp(13px,1.9dvh,15px);line-height:1.25}
.home-remind .primary{padding:6px 18px;font-size:14px;border-radius:10px;width:auto}
.home-remind .hr-x{background:none;border:0;font-size:26px;line-height:1;color:inherit;opacity:.6;padding:0 2px;cursor:pointer}
@media (prefers-color-scheme:dark){.home-remind{background:#14273f;border-color:#3d6aa3;color:#d8e8ff}}
.home .home-modes .home-remind{grid-column:1/-1}
.prem-card .remind-opt{margin:0}
.prem-card .remind-opt span{display:grid;gap:2px}.prem-card small{font-size:12px;color:var(--muted);font-weight:600}
.cp-done{display:grid;justify-items:center;gap:4px;margin:14px 0 16px;padding:18px 12px;border-radius:18px;background:rgba(46,158,91,.16);border:2px solid var(--good, #2e9e5b);text-align:center}
.cp-done b{font-size:28px}.cp-done span{font-family:Georgia,serif;font-size:24px;font-weight:700}.cp-done small{font-size:13px;color:var(--muted);font-weight:700}
/* Chat fills the space above the phone keyboard (chatFit in app.js) */
.sheet.ch-sheet{display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}
.sheet.ch-sheet #modal-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.sheet.ch-sheet .ch-list{flex:1 1 auto;height:auto;min-height:60px}
.sheet.ch-sheet #ch-form,.sheet.ch-sheet .grp-done,.sheet.ch-sheet h2{flex:0 0 auto}
/* Profile: Notifications on/off switch (10/29) */
.prem-row{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer}
.prem-row span{display:grid;gap:3px}.prem-row b{font-size:17px}.prem-row small{font-size:13px;color:var(--muted);font-weight:600;line-height:1.3}
.switch{appearance:none;-webkit-appearance:none;flex:0 0 auto;width:52px;height:32px;border-radius:16px;background:var(--line);position:relative;cursor:pointer;transition:background .2s;margin:0}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.switch:checked{background:var(--good,#2e9e5b)}.switch:checked::after{transform:translateX(20px)}
.switch:disabled{opacity:.45;cursor:default}
/* The bottom menu stays on every screen except a puzzle being played (10/29, Evan): Home, the Levels screens, the profile
   and every panel opened from them. Panels end above it on phones and below it (the header) on computers. */
:root{--barh:calc(66px + env(safe-area-inset-bottom))}
body.bar-on .home-bar{z-index:30}
@media (max-width:899px){
  body.bar-on .modal:not(.tour),body.bar-on .lvhub,body.bar-on .levels,body.bar-on .profile{bottom:var(--barh)!important}
  body.bar-on .modal:not(.tour) .sheet{height:100%!important}
}
@media (min-width:900px){
  body.bar-on .modal:not(.tour),body.bar-on .lvhub,body.bar-on .levels,body.bar-on .profile{top:72px!important}
  body.bar-on .modal:not(.tour) .sheet{height:100%!important;max-height:none}
}
.home-bar .bar-me,.home-bar .bar-streak{display:none}
@media (min-width:900px){
  .home-bar{padding-left:var(--edge,28px)!important;padding-right:var(--edge,28px)!important}
  .home-bar .bar-streak{display:flex;align-items:center;font:700 22px system-ui,sans-serif;color:var(--ink);margin-left:8px}
  .home-bar .bar-me{display:grid!important;place-items:center;width:46px!important;height:46px!important;min-height:0!important;padding:0!important;border-radius:50%!important;border:0;background:var(--brand) center/cover no-repeat;color:#fff;font:700 20px system-ui,sans-serif!important;cursor:pointer;margin-left:6px}
  .home .home-hero .avatar-btn,.home .home-hero .streak-btn{visibility:hidden}
}
.prem-card{display:grid;gap:12px}
.prem-h{margin:0;font-size:18px}
.prem-note{font-size:13px;color:var(--muted);font-weight:600}.prem-note[hidden]{display:none}
.prem-all{padding-bottom:10px;border-bottom:1px solid var(--line)}
.prem-row b{font-size:16px}

/* ==== GLASS LOOK (Evan approved 10/31, live 11/1) ====
   Rule: things that float over the game are glass (keyboard, bottom menu, computer header); things you play with stay
   solid (START, cards, clue words, letter tiles). A soft color wash sits behind everything so the glass has color to blur. */
:root{--wash-c:#f4efe5;--wash:radial-gradient(60% 45% at 8% 12%,rgba(46,158,91,.22),transparent 70%),radial-gradient(55% 40% at 96% 28%,rgba(233,181,60,.26),transparent 70%),radial-gradient(60% 45% at 18% 92%,rgba(80,120,220,.18),transparent 70%),radial-gradient(50% 40% at 92% 88%,rgba(200,80,80,.16),transparent 70%);
  --glass:rgba(255,255,255,.5);--glass-b:rgba(255,255,255,.75);--glass-sh:0 10px 30px rgba(20,40,30,.12),inset 0 1px 0 rgba(255,255,255,.9);--glass-blur:blur(20px) saturate(180%)}
@media (prefers-color-scheme:dark){:root{--wash-c:#0f1613;--wash:radial-gradient(60% 45% at 8% 12%,rgba(46,158,91,.24),transparent 70%),radial-gradient(55% 40% at 96% 28%,rgba(233,181,60,.14),transparent 70%),radial-gradient(60% 45% at 18% 92%,rgba(80,120,220,.16),transparent 70%),radial-gradient(50% 40% at 92% 88%,rgba(200,80,80,.12),transparent 70%);
  --glass:rgba(28,36,32,.5);--glass-b:rgba(255,255,255,.14);--glass-sh:0 10px 30px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.12)}}
/* the wash: a fixed layer behind the page (works on iPhone, unlike a fixed background), and on the full-screen layers */
html{background:var(--wash-c)!important}
body{background:transparent!important}
body::before{content:"";position:fixed;inset:0;z-index:-1;background-color:var(--wash-c);background-image:var(--wash);pointer-events:none}
.home,.profile{background-color:var(--wash-c)!important;background-image:var(--wash)!important}
body:has(#home:not([hidden])) .modal:not(.tour){background-color:var(--wash-c)!important;background-image:var(--wash)!important}
body:has(#home:not([hidden])) .modal:not(.tour) .sheet{background:transparent!important}
.sheet #modal-close{background:var(--card)!important;box-shadow:0 2px 10px rgba(0,0,0,.25)}
/* glass keyboard */
.kbd{background:var(--glass)!important;-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);border-top:1px solid var(--glass-b)!important}
.key:not(.go){background:rgba(255,255,255,.62)!important;box-shadow:0 2px 6px rgba(0,0,0,.08),inset 0 1px 0 rgba(255,255,255,.9)!important}
@media (prefers-color-scheme:dark){.key:not(.go){background:rgba(255,255,255,.12)!important;box-shadow:0 2px 6px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.15)!important}}
/* glass menus: floating frosted pill on phones, frosted header on computers */
@media (max-width:899px){
  :root{--barh:calc(84px + env(safe-area-inset-bottom))}
  .home-bar{left:12px!important;right:12px!important;width:auto!important;transform:none!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;padding:4px!important;border-radius:30px!important;border:1px solid var(--glass-b)!important;background:var(--glass)!important;-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-sh)!important;max-width:520px;margin:0 auto}
  .home-bar button{border-radius:24px}
  .home .home-in{padding-bottom:calc(86px + env(safe-area-inset-bottom))!important}
  body.bar-on .modal:not(.tour),body.bar-on .lvhub,body.bar-on .levels,body.bar-on .profile{bottom:0!important}
  body.bar-on .modal:not(.tour) .sheet{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  body.bar-on .lvhub{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  body.bar-on .levels .lv-foot{padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}
  body.bar-on .profile{padding-bottom:90px}
}
@media (min-width:900px){
  .home-bar{top:10px!important;left:16px!important;right:16px!important;border-radius:22px!important;border:1px solid var(--glass-b)!important;background:var(--glass)!important;-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-sh)!important}
}

/* No double-tap zoom anywhere in the game (pinch zoom and scrolling still work). */
html,body,*{touch-action:manipulation}

/* 10/31 touchscreen computers (on-screen keyboard on a wide screen): keep room for the keyboard so Hint and Definitions
   are never hidden under it (the 10/27 desktop body padding above is !important), and keep the keyboard phone-sized. */
@media (min-width:900px){
  body.kbd-show{padding-bottom:var(--kbd-h,200px)!important}
  .kbd{left:50%;right:auto;width:min(760px,100%);transform:translateX(-50%);border-radius:16px 16px 0 0;border:1px solid var(--line);border-bottom:0}
  .kbd .key{height:46px}
}
/* name card after the first daily: the result's full-width button rule squeezed the username box to nothing */
.result .namecard .namerow .primary{width:auto;margin-top:0}
.namecard .namerow input{background:#fff;color:#1d2b24;border-color:#d8cfbd}
@media (min-width:900px){
  body.kbd-show .top{padding:6px 0!important}
  body.kbd-show .clue-word{padding-top:6px!important;padding-bottom:6px!important}
}
@media (min-width:900px) and (max-height:820px){
  body.kbd-show #hear{display:none}
  body.kbd-show .tabs,body.kbd-show .diff-tabs{transform:scale(.85);transform-origin:center top;margin-bottom:-8px}
}
/* 10/31 per Evan: on computers the top menu stays on every screen, a puzzle in play included (it covers the game's own small header) */
/* 10/31 computers, puzzle in play: the whole puzzle fits one screen (no scrolling), keyboard or not */
@media (min-width:900px) and (max-height:900px){
  body:not(.bar-on) .top{padding:10px 0 4px!important}
  body:not(.bar-on) .top h1 small{display:none}
  body:not(.bar-on) .top h1 .brand{font-size:26px!important}
  body:not(.bar-on) #slots>button{padding-top:6px;padding-bottom:6px}
  body:not(.bar-on) #slots>button small{display:none}
  body:not(.bar-on) .hint-row>button{min-height:0;padding-top:8px;padding-bottom:8px}
}
@media (min-width:900px) and (max-height:720px){
  body:not(.bar-on) #meta{display:none}
  body:not(.bar-on) .clue-word{font-size:34px!important}
  body:not(.bar-on) .field>span:first-child{font-size:11px}
  body:not(.bar-on) .tiles .t,body:not(.bar-on) .tiles>*{width:42px!important;height:42px!important}
  body.kbd-show .kbd .key{height:40px}
  body.kbd-show .kbd{gap:4px;padding-top:6px}
}
@media (min-width:900px){
  body:not(.bar-on){padding-bottom:12px!important}
  body.kbd-show{padding-bottom:var(--kbd-h,200px)!important}
}
@media (min-width:900px) and (max-height:680px){
  body:not(.bar-on) .clue-word{padding-top:2px!important;padding-bottom:2px!important}
  body:not(.bar-on) .timer{margin:0}
}

/* the floating glass menu sits 10px lower on computers, so the puzzle starts a little lower too */
@media (min-width:900px){:root{--menu-clear:92px}}
/* 10/31 computers: the top menu replaces the game's own small header during a puzzle (its logo area goes Home), so nothing hides behind the menu */
@media (min-width:900px){
  body:not(.bar-on) .top{display:none!important}
  body:not(.bar-on){padding-top:var(--menu-clear,84px)!important}
  body:not(.bar-on) .home-bar{cursor:default}
}
@media (min-width:900px) and (max-height:1000px){
  body:not(.bar-on) #slots>button{padding-top:6px;padding-bottom:6px}
  body:not(.bar-on) #slots>button small{display:none}
  body:not(.bar-on) .hint-row>button{min-height:0;padding-top:8px;padding-bottom:8px}
  body:not(.bar-on) .clue-word{padding-top:6px!important;padding-bottom:6px!important}
}
@media (min-width:900px){
  body:not(.bar-on){padding-top:var(--menu-clear,80px)!important}
  body:not(.bar-on) main>#slots,body:not(.bar-on) #slots{margin-top:4px!important}
}
@media (min-width:900px) and (max-height:720px){
  body:not(.bar-on) main{padding-bottom:0!important;margin-bottom:0!important}
  body:not(.bar-on) .hints,body:not(.bar-on) .pill-row{margin-bottom:0!important;padding-bottom:0!important}
}
@media (min-width:900px) and (max-height:720px){body:not(.bar-on){padding-top:calc(var(--menu-clear,80px) - 4px)!important}}
/* 10/31 per Evan: no scrolling while a puzzle is in play (phones and computers) */
html.in-play,html.in-play body{overflow:hidden!important;overscroll-behavior:none}
/* short phones (iPhone SE size): with scrolling locked, the whole puzzle has to fit above the FOSOCONI keyboard */
@media (max-width:899px) and (max-height:760px){
  html.in-play .top h1 small{display:none}
  html.in-play #slots>button small{display:none}
  html.in-play #slots>button{padding-top:6px;padding-bottom:6px}
  html.in-play #meta{display:none}
  html.in-play #hear{display:none}
  html.in-play .clue-word{padding-top:6px!important;padding-bottom:6px!important}
  html.in-play .hint-row>button{min-height:0;padding-top:6px;padding-bottom:6px}
}
@media (max-width:400px){.kbd .key.go{font-size:12px;letter-spacing:0}}
/* phones: when the morning reminder card is showing, the Levels and Battles tiles drop their small captions so nothing spills out of them */
@media (max-width:899px){.home .home-modes:has(.home-remind:not([hidden])) :is(.home-tile,.home-levels,.home-duo) small{display:none}}
@media (max-width:899px) and (max-height:760px){
  .home .home-remind{column-gap:8px;padding:6px 10px}
  .home .home-remind span{font-size:18px}
  .home .home-remind b{font-size:12.5px;line-height:1.2}
  .home .home-remind .primary{padding:5px 12px;font-size:13px}
}
/* give up: one confirmation, a clear red Give up button under Keep playing */
.gu-do{display:block;width:100%;margin-top:10px;font:inherit;font-weight:700;font-size:16px;background:none;border:2px solid var(--err,#c0392b);color:var(--err,#c0392b);border-radius:12px;padding:12px;cursor:pointer}
.gu-do:disabled{opacity:.5}
/* dark mode glass keyboard: frosted keys you can actually see (11/1, Evan: the keyboard looked unchanged in dark mode) */
@media (prefers-color-scheme:dark){
  .kbd{background:rgba(255,255,255,.07)!important;border-top:1px solid rgba(255,255,255,.18)!important}
  .key:not(.go){background:linear-gradient(180deg,rgba(255,255,255,.26),rgba(255,255,255,.13))!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;box-shadow:0 3px 8px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.35)!important}
  .key:not(.go):active{background:rgba(255,255,255,.34)!important}
}
/* 11/3 per Evan: Home drops the Your week strip; FOSO Levels and FOSO Battles get the room (bigger tiles) */
.home .home-week{display:none!important}
@media (max-width:899px){
  .home .home-modes>.home-levels,.home .home-modes .home-duo .home-tile.home-mb{min-height:clamp(118px,17dvh,176px)}
  .home .home-modes>.home-levels,.home .home-modes .home-duo .home-tile.home-mb{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:clamp(4px,.9dvh,10px);text-align:center;padding:10px 10px}
  .home .home-modes .home-levels span,.home .home-modes .home-duo .home-tile.home-mb span{font-size:clamp(34px,5.6dvh,50px)!important;line-height:1}
  .home .home-modes .home-levels b,.home .home-modes .home-duo .home-tile.home-mb b{font-size:clamp(21px,3.1dvh,27px)!important;line-height:1.1}
  .home .home-modes .home-levels small,.home .home-modes .home-duo .home-tile.home-mb small{font-size:clamp(12px,1.75dvh,15px)!important;line-height:1.25;max-width:22ch}
}
@media (min-width:900px){
  .home .home-modes .home-levels span,.home .home-modes .home-duo .home-tile.home-mb span{font-size:clamp(48px,8dvh,84px)!important;line-height:1}
  .home .home-modes .home-levels b,.home .home-modes .home-duo .home-tile.home-mb b{font-size:clamp(28px,4.4dvh,44px)!important}
  .home .home-modes .home-levels small,.home .home-modes .home-duo .home-tile.home-mb small{font-size:clamp(15px,2.2dvh,20px)!important;max-width:24ch;line-height:1.3}
  .home .home-modes .home-levels,.home .home-modes .home-duo .home-tile.home-mb{gap:clamp(8px,1.6dvh,16px)!important}
}
@media (max-width:899px){
  .home .home-modes .home-levels b,.home .home-modes .home-duo .home-tile.home-mb b{font-size:clamp(19px,2.7dvh,24px)!important;white-space:normal;text-wrap:balance;overflow-wrap:break-word}
}
@media (max-width:899px){
  .home .home-modes .home-levels b,.home .home-modes .home-duo .home-tile.home-mb b{font-size:min(clamp(18px,2.7dvh,24px),5.2vw)!important;width:100%;text-align:center}
  .home .home-modes .home-levels small,.home .home-modes .home-duo .home-tile.home-mb small{width:100%;text-align:center;margin:0 auto}
}

/* Streak pop-up (tap the streak on Home, or the header streak on computers) */
.streak-note{margin:6px 0 12px;color:var(--muted);text-align:center}
.streak-week{margin:4px 0 12px}
.modal .streak-week{display:flex}
#modal-body h2:has(+ .streak-note){text-align:center}
.home-bar button.bar-streak{background:none;border:0;padding:0 6px;cursor:pointer;border-radius:10px}
.home .home-top .streak-btn,.home .home-top .avatar-btn{z-index:3}
.streak-note{font-size:17px}
#modal-body .streak-week{max-width:480px;margin:4px auto 14px}
#modal-body .streak-note{max-width:480px;margin-left:auto;margin-right:auto}

/* Pressed key (set per finger by the keyboard code, so it shows even when the tap landed in a gap) */
.key.down{background:var(--key-down);transform:translateY(1px);box-shadow:0 1px 0 var(--key-edge)}

/* ===== HOME B (Evan and team, 11/6): one green page, the big button says what it does, Levels and Battles as slim full-width rows,
   Make a puzzle and Share FOSOCONI side by side, and the menu strip in the same green so it stands out ===== */
:root{--home-green:#173f2f}
@media (prefers-color-scheme:dark){:root{--home-green:#0e2a1f}}
html body #home{background:var(--home-green)!important}
html body #home .home-in,html body #home .home-modes{background:transparent!important}
html body #home .home-hero{box-shadow:none!important}
html body #home #home-what{display:none!important}
html body #home .home-play .start-btn{letter-spacing:1px!important;font-size:clamp(20px,3.2dvh,26px)!important;white-space:nowrap}
html body #home #home-day{font-size:clamp(15px,2.3dvh,18px)!important;font-weight:700!important;color:#fff!important;opacity:1!important;margin-top:clamp(6px,1.2dvh,12px)!important}
html body #home .home-row{display:grid!important;grid-template-columns:44px 1fr 16px!important;grid-template-rows:auto auto!important;column-gap:12px!important;align-items:center!important;justify-items:start!important;text-align:left!important;width:100%!important;min-height:0!important;height:auto!important;margin:0!important;padding:clamp(10px,1.6dvh,14px) 16px!important;border-radius:16px!important;cursor:pointer;font:inherit}
html body #home .home-row span{grid-row:1/3!important;justify-self:center;font-size:clamp(26px,3.6dvh,32px)!important;line-height:1!important;margin:0!important}
html body #home .home-row b{grid-column:2;font-size:clamp(18px,2.6dvh,21px)!important;line-height:1.15!important;margin:0!important;text-align:left!important}
html body #home .home-row small{grid-column:2;display:block!important;font-size:13px!important;font-weight:600!important;opacity:.9;margin:0!important;text-align:left!important}
html body #home .home-row::after{content:"\203A";grid-column:3;grid-row:1/3;font-size:26px;line-height:1;opacity:.75;position:static!important;background:none!important}
html body #home .home-battle-row{background:#a63c3c!important;color:#fff!important;border:0!important;box-shadow:0 1px 2px rgba(0,0,0,.25)!important}
html body #home .home-battle-row b{color:#fff!important}
html body #home .home-sec{text-align:center!important;font-size:clamp(17px,2.4dvh,20px)!important;color:#fff!important;letter-spacing:1.5px!important;margin:clamp(4px,1dvh,10px) 0 8px!important}
html body #home .home-friends{display:grid;grid-template-columns:1fr 1fr;gap:10px}
html body #home .home-friends .home-make{margin:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;text-align:center!important;gap:4px!important;padding:clamp(10px,1.6dvh,14px) 8px!important;width:100%!important;min-height:0!important}
html body #home .home-friends .home-make span{font-size:clamp(24px,3.4dvh,30px)!important;margin:0!important}
html body #home .home-friends .home-make b{font-size:15px!important;text-align:center!important;display:flex;flex-direction:column;align-items:center;gap:2px}
html body #home .home-friends .home-make small{font-size:12px!important;font-weight:500!important;display:block}
html body #home .home-friends .home-share{background:#fff!important;border:1.5px solid #fff!important;color:#173f2f!important}
html body #home .home-friends .home-share b,html body #home .home-friends .home-share small{color:#173f2f!important}
html body #home .home-legal,html body #home .home-legal a{color:#bcd3c6!important}
html body #home .home-remind,html body #home .home-beat,html body #home .home-challenge,html body #home .home-notice{box-shadow:none!important}
/* the menu strip (bottom pill on phones, top bar on computers) in the same green, white labels */
html body .home-bar{background:var(--home-green)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border-color:rgba(255,255,255,.18)!important;box-shadow:0 6px 20px rgba(0,0,0,.25)!important}
html body .home-bar button{color:#fff!important}
html body .home-bar .bar-streak{color:#fff!important}
html body #home .home-modes{display:flex!important;flex-direction:column!important;grid-template-columns:none!important}
html body #home .home-modes>.home-row{align-self:stretch!important;height:auto!important;flex:0 0 auto!important}
html body .home-bar::before{color:#fff!important}
html body #home .home-row b,html body #home .home-row small{justify-self:start!important;align-self:center!important;width:auto!important}

/* Home button on the Tap to start screen (Evan 11/7): shown only while that screen is up */
.gate-home{display:none;position:fixed;top:calc(12px + env(safe-area-inset-top));left:12px;z-index:11;border:1px solid rgba(255,255,255,.35);background:rgba(0,0,0,.18);color:#fff;font:700 15px/1 inherit;padding:10px 14px;border-radius:999px;cursor:pointer}
.gate:not([hidden]) + .gate-home{display:block}
@media (min-width:900px){.gate-home{top:calc(var(--menu-clear,92px) + 8px)}}

/* ===== SIMPLE LANDING (Evan 11/8): menu top left, streak and picture top right, the icon and name, the tagline, one big PLAY
   (Sign up beside it for guests), the date. Once today is done: SEE YOUR RESULTS plus Levels, Battles, Make one.
   Everything else lives in the menu (#drawer). Notices (a puzzle from a friend, reminders) still show under the date. ===== */
html body #home .home-in{min-height:100dvh!important;display:flex!important;flex-direction:column!important;justify-content:center!important;max-width:460px!important;margin:0 auto!important;padding:clamp(70px,10dvh,110px) 24px 32px!important}
html body #home .home-hero{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;padding:0!important;background:transparent!important}
html body #home .home-top{position:static!important;padding:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;margin:0!important}
html body #home .menu-btn{position:fixed;top:calc(14px + env(safe-area-inset-top));left:16px;z-index:5;width:48px;height:48px;border:0;background:transparent;color:#fff;font-size:28px;line-height:1;cursor:pointer;border-radius:50%}
html body #home .menu-btn:active{background:rgba(255,255,255,.12)}
html body #home .home-top .avatar-btn{position:fixed!important;top:calc(14px + env(safe-area-inset-top))!important;right:16px!important;left:auto!important;width:48px!important;height:48px!important;z-index:5}
html body #home .home-top .streak-btn{position:fixed!important;top:calc(14px + env(safe-area-inset-top))!important;right:72px!important;left:auto!important;z-index:5;font-size:20px!important}
html body #home .home-top .help-btn{display:none!important}
html body #home .home-icon{width:clamp(76px,11dvh,96px);height:clamp(76px,11dvh,96px);border-radius:22px;background:#1f4d3a;border:2px solid rgba(255,255,255,.25);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9%}
html body #home .home-icon b{font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(22px,3.1dvh,28px);color:#f7f2e8;letter-spacing:1px}
html body #home .home-icon i{width:64%;height:6px;border-radius:3px;background:#e0b030}
html body #home .home-brand{color:#fff!important;font-size:clamp(34px,5.4dvh,44px)!important;letter-spacing:5px!important;margin-top:clamp(12px,2.4dvh,22px)!important}
html body #home .home-sub{color:#e0b030!important;font-family:"Courier Prime","Courier New",monospace!important;font-weight:700!important;font-size:19px!important;margin:4px 0 0!important;opacity:1!important}
html body #home .home-tag{margin:clamp(16px,3dvh,26px) 0 0;color:#fff;font-size:clamp(19px,2.8dvh,23px);font-weight:600;line-height:1.3}
html body #home .home-ex{margin:12px 0 0;color:#bcd3c6;font-size:16px}
html body #home .home-ex b{color:#fff}
html body #home .home-done{margin:clamp(16px,3dvh,26px) 0 0;color:#fff;display:flex;flex-direction:column;gap:8px}
html body #home .home-done b{font-size:clamp(22px,3dvh,26px)}
html body #home .home-done small{font-size:16px;color:#bcd3c6}
html body #home .home-done em{font-style:normal;font-weight:800;color:#fff}
html body #home .home-play{display:flex!important;flex-wrap:wrap!important;gap:12px!important;justify-content:center!important;width:100%!important;margin-top:clamp(22px,4dvh,34px)!important}
html body #home .home-play .start-btn{flex:1 1 0!important;max-width:300px!important;width:auto!important;margin:0!important;padding:16px 10px!important;border-radius:32px!important;font-size:20px!important;letter-spacing:2px!important;animation:none}
html body #home .home-signup{flex:1 1 0;max-width:160px;border:2px solid #fff;background:transparent;color:#fff;border-radius:32px;font:inherit;font-weight:800;font-size:18px;cursor:pointer;padding:14px 0}
html body #home .home-signup[hidden]{display:none}
html body #home #home-day{flex-basis:100%!important;margin-top:clamp(18px,3dvh,28px)!important;font-size:17px!important;font-weight:800!important;color:#fff!important}
html body #home .home-more{display:flex;gap:10px;width:100%;margin-top:18px}
html body #home .home-more[hidden]{display:none}
html body #home .home-more button{flex:1;border-radius:14px;padding:12px 4px;font:inherit;font-weight:800;font-size:15px;color:#fff;background:rgba(255,255,255,.1);border:1.5px solid rgba(255,255,255,.3);cursor:pointer}
html body #home .home-more button.bt{background:#a63c3c;border-color:#a63c3c}
html body #home .home-stats,html body #home .home-today,html body #home #home-levels,html body #home #home-battle,html body #home .home-week,
html body #home .home-friends,html body #home .home-sec,html body #home .home-legal,html body #home #home-streak{display:none!important}
html body #home .home-modes{padding:0!important;margin-top:18px!important;gap:10px!important}
/* the menu */
.drawer{position:fixed;inset:0;z-index:60}
.drawer[hidden]{display:none}
.drawer-dim{position:absolute;inset:0;background:rgba(0,0,0,.45);opacity:0;transition:opacity .2s}
.drawer-in{position:absolute;top:0;bottom:0;left:0;width:min(310px,84vw);background:#fff;color:#173f2f;overflow-y:auto;padding:calc(18px + env(safe-area-inset-top)) 0 calc(18px + env(safe-area-inset-bottom));transform:translateX(-100%);transition:transform .22s ease;display:flex;flex-direction:column}
.drawer.open .drawer-dim{opacity:1}.drawer.open .drawer-in{transform:none}
.drawer-in>button{display:flex;align-items:center;gap:14px;width:100%;border:0;border-bottom:1px solid #f0f0f0;background:none;text-align:left;padding:13px 22px;font:inherit;font-size:17px;font-weight:600;color:#173f2f;cursor:pointer}
.drawer-in>button:active{background:#f3f3ef}
.drawer-in>button.drawer-me{border-bottom:1px solid #e3e3e3;padding:8px 20px 16px}
.drawer-av{flex:none;width:46px;height:46px;border-radius:50%;background:#e0b030 center/cover;color:#173f2f;display:grid;place-items:center;font-weight:900;font-size:20px}
.drawer-me b{display:block;font-size:18px}.drawer-me small{display:block;font-size:13px;color:#666;font-weight:500}
.drawer-legal{margin:auto 0 0;padding:18px 22px 4px;font-size:12px;color:#888;line-height:1.6}
.drawer-legal a{color:#888}
@media (prefers-color-scheme:dark){.drawer-in{background:#1c2420;color:#eef3ef}.drawer-in>button{color:#eef3ef;border-color:#2a332e}.drawer-in>button:active{background:#26302b}.drawer-me small{color:#a9b6ae}}
html body.home-up .home-bar{display:none!important}
html body #home .home-top .avatar-btn{display:grid!important}
html body #home .home-top .streak-btn{display:grid!important}
html body #home .home-more button,html body #home .home-more button *{text-decoration:none!important}
html body #home .home-top .avatar-btn,html body #home .home-top .streak-btn{visibility:visible!important}
html body #home .home-top .streak-btn,html body #home .home-top .streak-btn b{color:#fff!important}
html body #home .home-top .avatar-btn{border:2px solid rgba(255,255,255,.7)!important;color:#fff!important;background-color:rgba(255,255,255,.12)}
/* Levels purple and Battles red stand out in the menu and on the finished screen (Evan 11/8) */
.drawer-in>button[data-go="levels"],.drawer-in>button[data-go="battle"]{margin:6px 14px;width:auto;border:0;border-radius:12px;color:#fff;font-weight:800}
.drawer-in>button[data-go="levels"]{background:linear-gradient(180deg,#7b4fc9,#5a35a0)}
.drawer-in>button[data-go="battle"]{background:linear-gradient(180deg,#c24848,#932f2f)}
.drawer-in>button[data-go="levels"]:active,.drawer-in>button[data-go="battle"]:active{filter:brightness(1.12)}
html body #home .home-more button#more-levels{background:linear-gradient(180deg,#7b4fc9,#5a35a0);border-color:#7b4fc9}
html body #home .home-more button.bt{background:linear-gradient(180deg,#c24848,#932f2f);border-color:#c24848}
/* How To Play on one card (Evan 11/8) */
.howto{text-align:left;padding:4px 2px 2px}
.howto h2{margin:0 0 4px;font-size:28px}
.ht-lead{margin:0 0 12px;font-size:17px;font-weight:600}
.ht-rules,.ht-more{margin:0 0 14px;padding-left:20px;font-size:15px;line-height:1.45}
.ht-rules li,.ht-more li{margin:4px 0}
.ht-h{margin:6px 0 8px;font-weight:800;font-size:16px}
.ht-ex{margin:0 0 14px}
.ht-ex p{margin:6px 0 0;font-size:14px;line-height:1.4}
.ht-clue{display:flex;gap:8px;margin-bottom:8px}
.ht-clue i{font-style:normal;font-weight:800;font-size:15px;background:#173f2f;color:#fff;border-radius:8px;padding:5px 11px}
.ht-row{display:flex;gap:16px}
.ht-word{display:flex;gap:4px}
.ht-word i{width:34px;height:38px;display:grid;place-items:center;font-style:normal;font-weight:800;font-size:19px;border-radius:7px;color:#fff}
.ht-word i.ok{background:#3f9a5c}.ht-word i.bad{background:#c24848}
.ht-acct,.ht-note{margin:12px 0 0;font-size:14px;padding-top:12px;border-top:1px solid rgba(127,127,127,.25)}
.ht-acct .linkbtn{margin:0;padding:0;font-size:14px;font-weight:800;color:inherit}
.ht-note{border-top:0;padding-top:0;margin-top:8px;color:var(--muted)}
.howto .ht-go{animation:none!important;display:block;width:100%;margin:16px 0 0;padding:14px 0;font-size:19px;letter-spacing:2px}
.ht-links{margin:8px 0 0;text-align:center;font-size:13px;color:var(--muted)}
.ht-links .linkbtn{margin:0;font-size:13px}
.ht-links .linkbtn,.ht-acct .linkbtn{display:inline!important;width:auto!important}
.ht-name{margin:0 0 10px;font-size:15px;color:var(--muted)}.ht-name b{color:inherit;letter-spacing:1px}

/* Today's board on the day's last result, and the guest-name line (Evan 11/16) */
.dayboard{margin:14px 0;padding:14px 16px;border-radius:16px;background:var(--card);border:1px solid var(--line);text-align:left}
.dayboard:empty{display:none}
.dayboard .db-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px}
.dayboard .db-head span{font-size:14px;opacity:.75}
.dayboard ul{list-style:none;margin:0;padding:0}
.dayboard li{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px}
.dayboard li .rk{width:28px;text-align:center;font-weight:700}
.dayboard li b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dayboard li .pts{font-weight:700}
.dayboard li.you{background:rgba(239,201,90,.22);outline:2px solid rgba(239,201,90,.7)}
.dayboard li.gap{justify-content:center;padding:0;opacity:.5}
.youtag{font-style:normal;font-weight:600;opacity:.7;font-size:.9em}
.guestline{display:flex;flex-direction:column;gap:8px;margin-top:10px;font-size:15px}
.guestline .primary{align-self:flex-start;width:auto;margin:0;padding:9px 18px}
.dayboard .linkish{margin-top:10px;background:none;border:0;padding:0;font:inherit;font-weight:700;color:inherit;text-decoration:underline;cursor:pointer}
.dayboard li.tap{cursor:pointer}
.dayboard li.tap:active{transform:scale(.985)}

/* Email reminder for guests on the day's last result (Evan 11/17) */
.mailcard{margin:14px 0;padding:14px 16px;border-radius:16px;background:var(--card);border:1px solid var(--line);display:flex;flex-direction:column;gap:6px;text-align:left}
.mailcard span{font-size:14px;opacity:.75}
.mailcard .mc-row{display:flex;gap:8px;margin-top:4px}
.mailcard .mc-row input{flex:1;min-width:0;font-size:16px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:#fff;color:#1b2a22}
.mailcard .mc-row .primary{width:auto;margin:0;padding:10px 16px;white-space:nowrap}
.mailcard .mc-age{font-size:14px;display:flex;gap:8px;align-items:center}
.mailcard .mc-err{margin:0;font-size:14px;color:#c0392b;min-height:0}
.mailcard .mc-err:empty{display:none}

/* COMPUTER PUZZLE (Evan 11/17): the phone layout, bigger, in one centered column; no on-screen keyboard; quieter hint buttons */
.type-tip{display:none}
html.computer.in-play .type-tip{display:block;text-align:center;font-size:14px;opacity:.6;margin:10px 0 0}
html.computer.in-play main{max-width:640px!important;margin-left:auto!important;margin-right:auto!important;padding-top:3vh!important}
html.computer.in-play .slots{max-width:640px;margin-left:auto;margin-right:auto}
html.computer.in-play .clue{gap:14px!important}
html.computer.in-play .clue-word{font-size:44px!important;padding:16px 10px!important}
html.computer.in-play .timer{margin:14px 0 6px!important}
html.computer.in-play .tiles{gap:10px!important}
html.computer.in-play .tiles .t{flex:0 0 auto!important;width:72px!important;max-width:72px!important;height:72px!important;font-size:34px!important;border-radius:14px!important}
html.computer.in-play .field>span:first-child{font-size:14px!important;letter-spacing:.06em}
html.computer.in-play .field{margin-bottom:14px!important}
html.computer.in-play .hints{margin-top:18px!important}
html.computer.in-play .hint-row{display:flex!important;justify-content:center!important;gap:10px!important}
html.computer.in-play .hint-row button{flex:0 0 auto!important;width:auto!important;min-height:0!important;padding:10px 18px!important;font-size:15px!important;border-radius:12px!important;box-shadow:none!important}
html.computer.in-play .hint-row button small,html.computer.in-play .hint-row button .sub{font-size:12px!important}
html.computer.in-play .pill-row{margin-top:8px!important}
/* 11/17: the Levels / Battles / Make one row sat on the hero's rounded bottom edge, which clipped the outer buttons' corners */
html body #home .home-more{margin-bottom:22px}
html.computer.in-play .field .def,html.computer.in-play .field .near{display:block;text-align:center;margin:8px auto 0;max-width:520px;font-size:15px}
html.computer.in-play .field .def[hidden],html.computer.in-play .field .near[hidden]{display:none}

/* Letters a hint gave are green, so it is clear they are right (Evan 11/17) */
.tiles .t.hl{background:rgba(46,158,91,.22)!important;border-color:var(--good)!important;color:#1d6b3f!important}
/* Computers (11/17): the page scrolls if it does not fit (definitions open on a short laptop screen), with room at the bottom like the phone */
html.computer.in-play,html.computer.in-play body{overflow-y:auto!important}
html.computer.in-play main{padding-bottom:140px!important}
@media (max-height:880px){
  html.computer.in-play main{padding-top:1vh!important}
  html.computer.in-play #hear{display:none!important}
  html.computer.in-play .clue-word{font-size:36px!important;padding:10px 8px!important}
  html.computer.in-play .timer{margin:8px 0 4px!important}
  html.computer.in-play .tiles .t{width:60px!important;max-width:60px!important;height:60px!important;font-size:28px!important}
  html.computer.in-play .field{margin-bottom:8px!important}
  html.computer.in-play .field .def{margin-top:4px!important}
  html.computer.in-play .hints{margin-top:10px!important}
}

/* Levels map walker (Evan 11/17): a waddle while it hops along the trail; a FOSO tile for players with no name or picture yet */
.lv-avatar.walking i{animation:lvwaddle .25s ease-in-out infinite alternate}
@keyframes lvwaddle{from{transform:rotate(-9deg)}to{transform:rotate(9deg)}}
.lv-avatar i.foso{background:#1f4d3a!important;color:#f3dc9c!important;border-radius:12px!important;border-color:#f3dc9c!important;font-family:Georgia,serif}

/* New-feature dot on Levels, Battles and the menu button until tried once (11/17) */
#more-levels,#more-battle,#drawer [data-go],#home-menu{position:relative}
.newdot{position:absolute;top:6px;right:8px;width:10px;height:10px;border-radius:50%;background:#ff3b30;box-shadow:0 0 0 2px #fff;animation:newdot 1.6s ease-in-out infinite;pointer-events:none}
#home-menu .newdot{top:2px;right:2px}
@keyframes newdot{0%,100%{transform:scale(1)}50%{transform:scale(1.25)}}
@media (prefers-reduced-motion:reduce){.newdot{animation:none}}

/* First-time intro for Levels and Battles (11/18) */
.modeintro h2{margin:0 0 14px}
.modeintro ul{list-style:none;padding:0;margin:0 0 22px;display:grid;gap:10px}
.modeintro li{position:relative;padding-left:24px;font-size:16px;line-height:1.4}
.modeintro li::before{content:'';position:absolute;left:4px;top:.55em;width:9px;height:9px;border-radius:50%;background:#7b5cd6}
.modeintro.mi-bt li::before{background:#d64545}
.modeintro #mi-go{width:100%}

/* QUICK START for first-time ad players (11/18): one-card How To Play over Easy puzzle 1 */
.howto.qs h2{font-size:24px}
.qs-lead{font-size:16px;line-height:1.45;margin:6px 0 14px}
.qs .ht-ex{display:flex;flex-direction:column;align-items:center;margin:0 0 6px}
.qs-arrow{font-size:20px;color:#6b7f74;margin:2px 0 6px}
.qs-pop{opacity:0;transform:scale(.6);animation:qsPop .28s ease-out forwards}
@keyframes qsPop{to{opacity:1;transform:none}}
.qs-note{font-size:14px;margin:12px 0 0;text-align:center}
.qs-small{font-size:12px;color:#6b7f74;text-align:center;margin:8px 0 0}
.hint-gold.qs-pulse{animation:qsPulse 1.2s ease-in-out 4}
@keyframes qsPulse{50%{transform:scale(1.06);box-shadow:0 0 0 6px rgba(245,179,1,.35)}}

/* Levels menu v2 (11/18, Evan: the pack squares clipped on phones): Pack 1 wide card, locked packs in one small row */
.lvh-list{justify-content:flex-start}
.lvh-pack{flex:0 0 auto}
.lvh-pack .lvh-go{white-space:nowrap}
.lvh-more p{margin:0 0 8px;text-align:center;font-size:13px;font-weight:800;color:#9fb0d3}
.lvh-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.lvh-mini{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 2px 10px;border-radius:14px;border:2px dashed #3a4d7a;background:linear-gradient(145deg,#1c2a48,#121c33);color:#8fa0c4;font:inherit;cursor:pointer;opacity:.9}
.lvh-mini .lvh-ic{font-size:24px;line-height:1}
.lvh-mini em{font-style:normal;font-size:11px;font-weight:900;letter-spacing:.8px;text-transform:uppercase;white-space:nowrap}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:380px){.lvh-mini em{font-size:10px;letter-spacing:.2px}}

/* LEGENDARY (11/19): the unlock card after the day, the Home button, the crown on the board */
.lgcard{display:grid;gap:6px;margin:10px 0;padding:14px;border-radius:16px;background:linear-gradient(145deg,#3a2a74,#1f1640);border:2px solid #8b6fe8;color:#fff;text-align:center}
.lgcard b{font-size:18px}.lgcard span{font-size:14px;color:#d9cffc;line-height:1.35}
.lgcard .primary{background:#8b6fe8;border-color:#8b6fe8;color:#fff;margin-top:4px}
.home-legend{display:block;width:100%;max-width:420px;margin:8px auto 0;padding:12px 16px;border-radius:14px;border:2px solid #8b6fe8;background:linear-gradient(145deg,#3a2a74,#1f1640);color:#fff;font:inherit;font-weight:900;font-size:16px;cursor:pointer}
.home-legend[hidden]{display:none}
.lb .crown{font-style:normal;margin-left:4px}
body.legend-play #meta{display:block!important;color:#5b3fc4;font-weight:800;text-align:center}
body.legend-play #meta .chip{display:none}
/* Legendary Guess button stays up with the on-screen keyboard, and its confirm sheet (11/19) */
body.kbd-show.legend-play #submit{display:block!important;width:100%;max-width:420px;margin:10px auto 0;background:#6b4fd8;border-color:#6b4fd8}
.lgconfirm{text-align:center}.lgc-words{font-family:Georgia,serif;font-size:26px;font-weight:700;margin:6px 0}
.lgc-btns{display:flex;gap:10px;margin-top:14px}.lgc-btns button{flex:1}
/* Leaderboard header v2 (Evan 11/19, option B): title with a small Everyone / Friends switch, one row of period chips */
.lbhead{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap}
.lbhead h2{white-space:nowrap;font-size:clamp(24px,7.5vw,32px)}
.lbhead h2{margin:0}
.lbhead .lbscope{display:inline-flex!important;gap:0;margin:0;padding:3px;border-radius:20px;background:var(--line)}
.lbhead .lbscope button{padding:6px 11px!important;font-size:13px!important;border:0!important;border-radius:16px!important;background:transparent!important;color:var(--muted)!important}
.lbhead .lbscope button svg{width:15px;height:15px}
.lbhead .lbscope button.on{background:var(--ink)!important;color:var(--card)!important}
.lbchips{display:flex!important;gap:6px!important;background:none!important;padding:0!important;overflow-x:auto;scrollbar-width:none;margin:8px 0 6px!important}
.lbchips::-webkit-scrollbar{display:none}
.lbchips button{flex:0 0 auto;padding:6px 10px!important;border-radius:18px!important;background:var(--line)!important;font-size:13px!important;white-space:nowrap}
.lbchips button.on{background:var(--ink)!important;color:var(--card)!important}
.lbchips button.lg{background:rgba(107,79,216,.18)!important;color:#7b5cf0!important;box-shadow:inset 0 0 0 1.5px #7b5cf0}
.lbchips button.lg.on{background:#6b4fd8!important;color:#fff!important}
@media (max-width:380px){.lbchips button{padding:5px 8px!important;font-size:12px!important}.lbhead .lbscope button{padding:5px 8px!important;font-size:12px!important}}
.lbchips{gap:5px!important}
.lbchips button{padding:6px 7px!important;flex:1 0 auto}
.lbhead h2{font-size:26px!important}
.lbhead .lbscope button svg{display:none}
.lbhead .lbscope button{padding:5px 9px!important}.lbhead{min-width:0}.lbhead h2{flex:0 1 auto;min-width:0}
/* START screen tone by difficulty (Evan 11/20) */
.gate[data-tone="easy"]{background:radial-gradient(circle at 50% 40%,#2c6b52,#173a2c)}
.gate[data-tone="medium"]{background:radial-gradient(circle at 50% 40%,#8a6a12,#3f300a)}
.gate[data-tone="hard"]{background:radial-gradient(circle at 50% 40%,#8a2f28,#3d1411)}
.gate[data-tone="legendary"]{background:radial-gradient(circle at 50% 40%,#5b3fc4,#1f1446)}
/* Legendary pop-up after the day's three (Evan 11/20) */
#modal.lgpop-on .sheet,#modal.lgpop-on .modal-card{background:linear-gradient(160deg,#4a33a8,#1d1240)!important;color:#fff;min-height:72vh;display:flex;flex-direction:column;justify-content:center}
.lgpop{text-align:center;color:#fff;padding:8px 4px}
.lgpop-crown{font-size:64px;line-height:1;animation:lgBob 2.4s ease-in-out infinite}
@keyframes lgBob{50%{transform:translateY(-6px)}}
.lgpop h2{font-family:Georgia,serif;font-size:32px;margin:10px 0 6px;color:#fff}
.lgpop-lead{color:#e3dbff;font-size:16px;margin:0 0 14px}
.lgpop-list{list-style:none;padding:0;margin:0 auto 20px;max-width:340px;text-align:left;display:grid;gap:10px}
.lgpop-list li{background:rgba(255,255,255,.1);border-radius:12px;padding:10px 12px;font-size:15px;color:#f1edff}
.lgpop-list b{color:#fff}
.lgpop-go{display:block;width:100%;max-width:340px;margin:0 auto;padding:16px;border:0;border-radius:14px;background:#f2c94c;color:#2a1a00;font:inherit;font-weight:900;font-size:19px;cursor:pointer;box-shadow:0 4px 0 #b88d16}
.lgpop-later{display:block;margin:12px auto 0;background:none;border:0;color:#cfc3fb;font:inherit;font-weight:700;font-size:15px;cursor:pointer}

/* Feedback round (Evan 11/20) */
.why-link{display:block;margin:2px auto 8px;background:none;border:0;color:inherit;font:inherit;font-size:14px;font-weight:600;text-decoration:underline;cursor:pointer;opacity:.95}
.why .cw{font-style:normal;font-weight:700}
.home-signup{text-transform:uppercase;letter-spacing:.04em}
.secondary.cta{display:block;width:100%;margin-top:8px;padding:12px;border-radius:14px;border:2px solid currentColor;background:none;color:inherit;font:inherit;font-weight:700;cursor:pointer}
/* Tier colors on the puzzle tabs and clue tiles, same palette as the START screens (green, yellow, red, purple) */
:root{--t-easy:#2f9e6b;--t-medium:#c99a1e;--t-hard:#d4503f;--t-legendary:#6d4fd8}
.slots button[data-tier]{border-color:var(--tc)}
.slots button[data-tier].on{background:color-mix(in srgb,var(--tc) 16%,var(--card,#fff));box-shadow:0 0 0 1px var(--tc) inset}
.slots button[data-tier] b::before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--tc);margin-right:6px}
.slots button[data-tier="easy"]{--tc:var(--t-easy)}.slots button[data-tier="medium"]{--tc:var(--t-medium)}.slots button[data-tier="hard"]{--tc:var(--t-hard)}
body[data-tier] .clue-word{border-bottom:5px solid var(--tc)}
body[data-tier="easy"]{--tc:var(--t-easy)}body[data-tier="medium"]{--tc:var(--t-medium)}body[data-tier="hard"]{--tc:var(--t-hard)}body[data-tier="legendary"]{--tc:var(--t-legendary)}
.tier-pill{display:inline-block;margin-left:8px;padding:2px 9px;border-radius:999px;background:var(--tc);color:#fff;font-size:11px;font-weight:800;letter-spacing:.06em;vertical-align:middle}
/* leaderboard pages of 25 (11/20) */
.lbpager{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 4px}
.lbpager span{font-weight:700;font-size:15px}
.lbpager button{min-width:96px;padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:inherit;font:inherit;font-weight:700;font-size:15px;cursor:pointer}
.lbpager button:disabled{opacity:.35;cursor:default}
.rankline .linkbtn{margin:0 0 0 6px;padding:0 2px;font-size:inherit}
/* 11/20: the stuck nudge on the Hint button (after 25 s with no right word and no hint) */
.hint-gold.stuck{animation:qsPulse 1.2s ease-in-out 5;box-shadow:0 0 0 3px rgba(240,180,0,.55)}
/* Warm-up (11/21): a new player's first 3 puzzles */
.gate-skipwarm{position:fixed;top:calc(12px + env(safe-area-inset-top));right:12px;z-index:11;border:1px solid rgba(255,255,255,.35);background:rgba(0,0,0,.18);color:#fff;font:700 15px/1 inherit;padding:10px 14px;border-radius:999px;cursor:pointer}
.gate[hidden] ~ .gate-skipwarm{display:none}
@media (min-width:900px){.gate-skipwarm{top:calc(var(--menu-clear,92px) + 8px)}}
.gate.is-warm .gate-tip{font-size:19px;line-height:1.35;max-width:22em;font-weight:600}
/* 12/1: warm-up 1 how-to, laid out as clue words then answer (Evan) */
.gate-tip .wt-p,.gate-tip .wt-lbl,.gate-tip .wt-ex{display:block}
.gate-tip .wt-p{font-weight:700}
.gate-tip .wt-lbl{font-size:12px;letter-spacing:2px;font-weight:800;opacity:.7;margin:14px 0 4px}
.gate-tip .wt-ex{font-size:24px;font-weight:900;margin-bottom:16px}
.gate-tip .wt-ans{color:#f4cf5c}
.warm-dots{display:flex;gap:8px;justify-content:center;margin:4px 0 2px}
.warm-dots i{width:12px;height:12px;border-radius:50%;background:rgba(0,0,0,.15)}
.warm-dots i.on{background:#2f9e5b}
/* 11/21: the Home wordmark's gold line under FOSOCONI on every START screen too */
.gate-brand{display:block}
.gate-brand::after{content:"";display:block;width:56px;height:4px;border-radius:2px;background:#e9b53c;margin:9px auto 0}
/* Today's Puzzles and past days (11/21, restyled like the Instagram answer posts) */
body #modal.da-on.modal:not(.tour),body:has(#home) #modal.da-on.modal:not(.tour){background:#214d3a!important}
body #modal.da-on.modal:not(.tour) .sheet,body:has(#home) #modal.da-on.modal:not(.tour) .sheet{background:#214d3a!important;color:#f7f2e8;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}
.da{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding-bottom:8px}
.da-brand{text-align:center;font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:30px;letter-spacing:5px;margin-top:4px}
.da-bar{width:110px;height:6px;border-radius:3px;background:#e0b030;margin:-4px auto 2px}
.da-nav{position:relative;display:flex;align-items:center;justify-content:center;min-height:48px}
.da-nav button{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid rgba(247,242,232,.35);background:rgba(255,255,255,.08);color:#f7f2e8;font-size:28px;line-height:1;cursor:pointer}
.da-nav #da-prev{left:0}.da-nav #da-next{right:0}
.da-nav button:disabled{opacity:.25;cursor:default}
.da-title{text-align:center;padding:0 52px}
.da-kick{font-size:17px;font-weight:800;letter-spacing:4px;color:#cfe0d6}
.da-date{font-size:15px;font-weight:700;color:#cfe0d6;margin-top:4px}
.da-meta{text-align:center;font-weight:800;font-size:17px;color:#e0b030}
.da-card{--c:#3f9a5c;background:#2c5746;border-radius:18px;border-left:10px solid var(--c);padding:14px 12px 16px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.da-card[data-tone="medium"]{--c:#e0b030}.da-card[data-tone="hard"]{--c:#c4484a}.da-card[data-tone="legendary"]{--c:#8f6bff}
.da-lab{color:var(--c);font-size:15px;font-weight:800;letter-spacing:4px;text-transform:uppercase}
.da-cw{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.da-w{background:#f7f2e8;color:#214d3a;font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:clamp(22px,6.5vw,30px);padding:6px 16px;border-radius:12px;text-transform:capitalize}
.da-tiles{display:flex;gap:4px;max-width:100%;align-items:center;justify-content:center;flex-wrap:nowrap}
.da-t{width:var(--s);height:var(--s);border-radius:7px;background:var(--c);color:#1d3f30;display:flex;align-items:center;justify-content:center;font-family:Georgia,"Times New Roman",serif;font-weight:700;font-size:calc(var(--s)*.55)}
.da-card[data-tone="legendary"] .da-t{color:#fff}
.da-dash{font-weight:800;font-size:20px;margin:0 6px}
.da-st{font-size:15px;font-weight:700;color:#f7f2e8;opacity:.92}
.da-whyl{background:none;border:0;color:#cfe0d6;text-decoration:underline;font:inherit;font-size:14px;cursor:pointer;padding:0}
.da-why{margin:0;padding-left:18px;text-align:left;font-size:15px;line-height:1.45;color:#f7f2e8}
.da-card.locked{padding:16px 12px}
.da-play{border:0;border-radius:999px;padding:10px 22px;font:inherit;font-weight:800;font-size:16px;background:#f7f2e8;color:#214d3a;cursor:pointer}
.da-acts{display:flex;gap:10px;justify-content:center;margin-top:4px}
.da-acts button{flex:1;max-width:200px;padding:13px;border-radius:12px;font:inherit;font-weight:800;font-size:16px;border:1px solid rgba(247,242,232,.4);background:transparent;color:#f7f2e8;cursor:pointer}
.da-acts button.primary{background:#e0b030;color:#214d3a;border-color:#e0b030}
.da-foot{text-align:center;font-weight:800;font-size:16px;opacity:.9}
/* 11/21 per Evan: the colored boxes back (green, yellow, red, purple) with the post-style lettering */
.da-card{border-left:0;--dk:#1d4a38}
.da-card[data-tone="easy"]{background:linear-gradient(160deg,#3a8a5c,#24603f);--dk:#1d4a38}
.da-card[data-tone="medium"]{background:linear-gradient(160deg,#c99a1e,#93700f);--dk:#5c4508}
.da-card[data-tone="hard"]{background:linear-gradient(160deg,#b8463f,#7e2822);--dk:#6a1d18}
.da-card[data-tone="legendary"]{background:linear-gradient(160deg,#7254e0,#3f2a9e);--dk:#2e1f78}
.da-lab{color:#f7f2e8;opacity:.95}
.da-t,.da-card[data-tone="legendary"] .da-t{background:#f7f2e8;color:var(--dk)}
.da-w{color:var(--dk)}
.da-whyl{color:#f7f2e8}
.da-card.locked{opacity:.9}
.da-kick{white-space:nowrap;font-size:clamp(13px,4vw,17px);letter-spacing:3px}.da-title{padding:0 50px}

/* ===== SHARING REWARDS AND FOSO LINKS (Evan 11/22) ===== */
html body #home .home-grow{display:flex;flex-wrap:wrap;gap:10px;width:100%;margin-top:14px}
html body #home .home-grow button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:14px;padding:13px 6px;min-height:50px;font:inherit;font-weight:800;font-size:15px;color:#fff;cursor:pointer;border:1.5px solid transparent}
html body #home .home-grow button span{font-size:19px;line-height:1}
html body #home #grow-invite{background:linear-gradient(180deg,#2f8fe0,#1f6fbf);border-color:#2f8fe0;color:#fff}
html body #home #grow-make{background:linear-gradient(180deg,#7b4fc9,#5a35a0);border-color:#7b4fc9}
html body #home .home-grow small{flex-basis:100%;text-align:center;font-size:13px;font-weight:600;color:rgba(255,255,255,.85);cursor:pointer;padding:2px 0}
html body #home .home-grow small b{color:#f3c84b}
.av.ring1,.avatar-btn.ring1,.profile-pic.ring1{box-shadow:0 0 0 3px #c07a3e}
.av.ring2,.avatar-btn.ring2,.profile-pic.ring2{box-shadow:0 0 0 3px #c9ced6,0 0 8px rgba(201,206,214,.7)}
.av.ring3,.avatar-btn.ring3,.profile-pic.ring3{box-shadow:0 0 0 3px #e6b422,0 0 12px rgba(230,180,34,.8)}
.gold-name,.nm.gold-name{color:#c9971c!important;font-weight:800}
@media (prefers-color-scheme: dark){.gold-name,.nm.gold-name{color:#f3c84b!important}}
.amb{font-style:normal;margin-left:3px}
.profile-rewards{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:8px;border-radius:14px;padding:11px 12px;font:inherit;font-weight:800;font-size:16px;color:#1d1405;background:linear-gradient(180deg,#f0c14b,#d29b1e);border:0;cursor:pointer}
.profile-rewards small{font-weight:600;font-size:12.5px;opacity:.85}
.rw-top{display:flex;align-items:center;gap:14px;margin:6px 0 12px}
.rw-top .av.big{width:58px;height:58px;font-size:24px}
.rw-top b{display:block;font-size:19px}
.rw-top small{color:var(--muted)}
.rw-count{display:flex;align-items:baseline;gap:8px}
.rw-count b{font-size:34px;line-height:1}
.rw-count span{font-weight:600;color:var(--muted)}
.rw-bar{height:10px;border-radius:6px;background:rgba(127,127,127,.2);overflow:hidden;margin:10px 0 6px}
.rw-bar i{display:block;height:100%;background:linear-gradient(90deg,#e6b422,#f3d36b);border-radius:6px}
.rw-next{font-weight:700;margin:0 0 12px}
.rw-how{font-size:13px;margin:8px 0 14px}
.rw-grid{list-style:none;padding:0;margin:0 0 14px;display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.rw-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;padding:12px 8px;border-radius:14px;background:rgba(127,127,127,.1);border:1.5px solid rgba(127,127,127,.2);opacity:.75}
.rw-card.on{opacity:1;background:rgba(230,180,34,.14);border-color:#e6b422}
.rw-card .rw-ic{font-size:28px;line-height:1.1}
.rw-card b{font-size:14px}
.rw-card small{font-size:12px;color:var(--muted)}
.rw-card.on small{color:#a87a10;font-weight:700}
.rw-h{font-size:16px;margin:14px 0 8px}
.rw-themes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}
.rw-theme{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 2px;border-radius:12px;border:2px solid transparent;background:rgba(127,127,127,.1);font:inherit;font-size:12px;font-weight:700;color:inherit;cursor:pointer}
.rw-theme.on{border-color:#e6b422}
.rw-theme i{display:inline-block;width:18px;height:20px;border-radius:4px;margin:0 1px;background:var(--th)}
.rw-theme i:nth-child(2){opacity:.75}.rw-theme i:nth-child(3){opacity:.5}
.th-classic{--th:#2e9e5b}.th-ocean{--th:#1f7fbf}.th-grape{--th:#7b4fc9}.th-sunset{--th:#e2672c}
body.theme-ocean .inwrap.tiled input.ok ~ .tiles .t.f,body.theme-ocean .t.mk-ok{background:rgba(31,127,191,.25)!important;border-color:#1f7fbf!important}
body.theme-grape .inwrap.tiled input.ok ~ .tiles .t.f,body.theme-grape .t.mk-ok{background:rgba(123,79,201,.25)!important;border-color:#7b4fc9!important}
body.theme-sunset .inwrap.tiled input.ok ~ .tiles .t.f,body.theme-sunset .t.mk-ok{background:rgba(226,103,44,.25)!important;border-color:#e2672c!important}
.foso-card{background:linear-gradient(180deg,#4a3585,#3b2a6b);color:#f7f2e8;border-radius:18px;padding:16px 12px 18px;text-align:center;margin:6px 0 12px}
.foso-card small{color:#f3c84b;font-weight:800;font-size:14px}
.foso-card .cp-clue b{color:#f7f2e8}
.foso-card>span{display:flex;justify-content:space-around;margin-top:8px}
.foso-card .ft{display:inline-flex;gap:4px}
.foso-card .ft u{display:inline-block;width:20px;height:26px;border:2px solid rgba(247,242,232,.55);border-radius:6px}
.my-fosos{list-style:none;padding:0;margin:0 0 12px}
.my-fosos li{display:grid;grid-template-columns:1fr auto;gap:0 8px;padding:9px 0;border-bottom:1px solid rgba(127,127,127,.2)}
.my-fosos small{grid-column:1;color:var(--muted)}
.my-fosos span{grid-column:2;grid-row:1/3;align-self:center;font-weight:700;font-size:13px}
.my-fosos em{font-style:normal;color:#c24848}
html body .avatar-btn.ring1,html body .profile-pic.ring1{border-color:#c07a3e!important;box-shadow:0 0 0 2px #c07a3e!important}
html body .avatar-btn.ring2,html body .profile-pic.ring2{border-color:#dfe3ea!important;box-shadow:0 0 0 2px #c9ced6,0 0 10px rgba(220,225,235,.8)!important}
html body .avatar-btn.ring3,html body .profile-pic.ring3{border-color:#e6b422!important;box-shadow:0 0 0 2px #e6b422,0 0 12px rgba(230,180,34,.85)!important}
.cp-crowd{text-align:center;font-weight:800;font-size:16px;margin:4px 0 8px;color:#7b4fc9}
html body #home #grow-invite{flex:1 1 100%;font-size:17px;min-height:56px}
html body #home .home-grow button.grow-link{flex:1 1 100%;background:none;border:0;min-height:40px;padding:4px;font-weight:700;font-size:15px;color:#fff;gap:6px}
html body #home .home-grow button.grow-link u{text-underline-offset:3px}
html body #home #grow-make.grow-link{background:none;border:0;box-shadow:none}
html body #home .home-icon{display:none} /* Evan 11/22: the FOSO tile is the phone icon only; Home shows the FOSOCONI name */
html body #home .home-grow small{font-size:15px;line-height:1.35;padding:4px 8px;color:#fff}
html body #home .home-grow small u{color:#f3c84b;text-underline-offset:3px;white-space:nowrap}

/* ===== HOME GLASS (Evan 11/22): the home page gets the glass look the panels have. Light mode: a cream wash with soft color glows
   and DARK green text (never white on the light background); dark mode keeps the deep green with the glows. The big gold button,
   the blue Invite friends and the purple Legendary stay solid. ===== */
:root{--strip:env(safe-area-inset-top,0px);--hg-ink:#173f2f;--hg-soft:#4a6658;--hg-gold:#9a6a00}
@media (prefers-color-scheme:light){
  /* the strip behind the phone's clock is one solid color, so Home starts that color and the glows fade in below it (Evan 11/27) */
  html body #home{background:linear-gradient(to bottom,#f5f0e4 0,#f5f0e4 var(--strip),rgba(245,240,228,0) calc(var(--strip) + 160px)),radial-gradient(60% 40% at 10% 5%,rgba(46,158,91,.30),transparent 70%),radial-gradient(50% 35% at 95% 25%,rgba(240,184,0,.30),transparent 70%),radial-gradient(60% 45% at 10% 90%,rgba(47,143,224,.22),transparent 70%),radial-gradient(55% 40% at 90% 85%,rgba(226,103,44,.18),transparent 70%),#f5f0e4!important;color:var(--hg-ink)}
  html body #home .menu-btn,html body #home .home-brand,html body #home .home-tag,html body #home #home-day,html body #home .home-done,html body #home .home-done em,html body #home .home-ex b,html body #home .home-sec{color:var(--hg-ink)!important}
  html body #home .home-top .streak-btn,html body #home .home-top .streak-btn b{color:var(--hg-ink)!important}
  html body #home .home-ex,html body #home .home-done small,html body #home .home-legal,html body #home .home-legal a{color:var(--hg-soft)!important}
  html body #home .home-sub{color:var(--hg-gold)!important}
  html body #home .menu-btn:active{background:rgba(23,63,47,.1)}
  html body #home .home-top .avatar-btn:not(.has-photo){background:var(--hg-ink)!important;color:#fff!important}
  html body #home .home-signup{border-color:var(--hg-ink)!important;color:var(--hg-ink)!important}
  html body #home .home-grow{background:rgba(255,255,255,.5);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.75);border-radius:22px;padding:14px;box-shadow:0 6px 24px rgba(0,0,0,.06)}
  html body #home .home-grow small{color:var(--hg-ink)!important}
  html body #home .home-grow small b,html body #home .home-grow small u{color:var(--hg-gold)!important}
  html body #home #grow-invite{box-shadow:0 8px 22px rgba(31,111,191,.3)}
}
@media (prefers-color-scheme:dark){
  html body #home{background:linear-gradient(to bottom,#0e2a1f 0,#0e2a1f var(--strip),rgba(14,42,31,0) calc(var(--strip) + 160px)),radial-gradient(60% 40% at 15% 10%,rgba(64,170,120,.45),transparent 70%),radial-gradient(50% 35% at 90% 30%,rgba(240,184,0,.20),transparent 70%),radial-gradient(60% 45% at 20% 85%,rgba(47,143,224,.28),transparent 70%),radial-gradient(55% 40% at 85% 90%,rgba(123,79,201,.28),transparent 70%),#0e2a1f!important}
  html body #home .home-grow{background:rgba(255,255,255,.07);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.18);border-radius:22px;padding:14px}
}
/* The gold line sits under FOSOCONI with even space above and below it (Evan 11/22) */
html body #home .home-brand{padding-left:5px!important;line-height:1.05!important}
html body #home .home-brand::after{margin:6px auto 14px!important;position:relative;left:-2.5px}
html body #home .home-sub{margin-top:0!important}
/* Home on computers (Evan 11/22): everything a size up so the page fills the screen */
@media (min-width:900px) and (min-height:600px){
  html body #home .home-in{max-width:700px!important}
  html body #home .home-brand{font-size:clamp(64px,10dvh,96px)!important;letter-spacing:10px!important}
  html body #home .home-brand{padding-left:10px!important;line-height:1.05!important} /* the letter spacing after the last letter, so the word and its gold line share one center */
  html body #home .home-brand::after{width:clamp(72px,9dvh,96px)!important;height:6px!important;border-radius:3px!important;margin:clamp(6px,1dvh,10px) auto clamp(16px,2.4dvh,22px)!important;position:relative;left:-5px}
  html body #home .home-sub{font-size:clamp(24px,3.4dvh,32px)!important}
  html body #home .home-tag{font-size:clamp(28px,4dvh,38px)!important}
  html body #home .home-ex,html body #home .home-done small{font-size:clamp(20px,2.6dvh,24px)!important}
  html body #home .home-done b{font-size:clamp(30px,4.2dvh,40px)!important}
  html body #home .home-play{gap:14px!important;width:100%!important;max-width:none!important}
  html body #home .home-play .start-btn{flex:1 1 auto!important;max-width:520px!important;min-width:0!important;padding-left:24px!important;padding-right:24px!important;white-space:nowrap}
  html body #home .home-legend{max-width:none!important}
  html body #home .home-play .start-btn{font-size:clamp(28px,4dvh,36px)!important;padding:clamp(20px,2.8dvh,28px) 0!important}
  html body #home .home-signup{flex:0 0 200px!important;max-width:200px!important;font-size:22px!important;border-radius:40px!important}
  html body #home #home-day{font-size:clamp(20px,2.8dvh,24px)!important}
  html body #home .home-grow{padding:18px!important}
  html body #home #grow-invite{font-size:clamp(22px,3dvh,26px)!important;min-height:clamp(64px,8.5dvh,80px)!important}
  html body #home #grow-invite span{font-size:28px!important}
  html body #home .home-grow small{font-size:clamp(17px,2.3dvh,20px)!important}
  html body #home .home-legend{font-size:clamp(20px,2.8dvh,24px)!important;padding:clamp(16px,2.2dvh,22px)!important;width:100%!important}
  html body #home .menu-btn{width:60px;height:60px;font-size:36px;top:20px;left:24px}
  html body #home .home-top .avatar-btn{width:60px!important;height:60px!important;font-size:24px!important;top:20px!important;right:24px!important}
  html body #home .home-top .streak-btn{right:96px!important;top:30px!important;font-size:24px!important}
}
/* PLAY and SIGN UP stacked, same width and height, centered (Evan 11/22): PLAY on top, SIGN UP under it, as wide as the Invite friends panel */
html body #home .home-play{display:flex!important;flex-direction:column!important;align-items:stretch!important;flex-wrap:nowrap!important;gap:12px!important}
html body #home .home-play .start-btn,html body #home .home-play .home-signup{width:100%!important;max-width:none!important;flex:0 0 auto!important;margin:0!important;box-sizing:border-box!important;min-height:clamp(60px,8dvh,76px)!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important}
html body #home .home-play .start-btn{order:1}
html body #home .home-play .home-signup{order:2;font-size:clamp(18px,2.6dvh,22px)!important;border-radius:999px!important}
html body #home .home-play #home-what,html body #home .home-play small{order:3}
@media (min-width:900px) and (min-height:600px){
  html body #home .home-play .start-btn,html body #home .home-play .home-signup{min-height:clamp(68px,9dvh,84px)!important}
}
html body #home .home-in{justify-content:safe center!important} /* a tall page starts below the top icons instead of sliding under them */
html body #home .home-play [hidden]{display:none!important} /* the stacked-button rule must never show a hidden SIGN UP (signed-in players, finished day) */
/* Player survey (Evan 11/23) */
.svy-card{display:flex;flex-direction:column;gap:6px;text-align:center;padding:14px;margin:10px 0;border-radius:16px;background:linear-gradient(180deg,rgba(230,180,34,.16),rgba(230,180,34,.06));border:1.5px solid #e6b422}
.svy-card>b{font-size:16px}.svy-card span{font-size:14px}
.svy-card div{display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:4px}
.svy-q{margin:0 0 16px}.svy-q h3{font-size:16px;margin:0 0 8px}
.svy-stars{display:flex;gap:6px}.svy-stars button{font-size:34px;line-height:1;background:none;border:0;color:rgba(127,127,127,.4);cursor:pointer;padding:2px}
.svy-stars button.on{color:#e6b422}
.svy-opts{display:flex;flex-wrap:wrap;gap:8px}
.svy-opts button{font:inherit;font-size:14px;font-weight:600;padding:9px 12px;border-radius:999px;border:1.5px solid rgba(127,127,127,.35);background:rgba(127,127,127,.08);color:inherit;cursor:pointer}
.svy-opts button.on{background:#1f4d3a;border-color:#1f4d3a;color:#fff}
.svy-q input,.svy-q textarea,html body .svy-q input[type=text],html body .svy-q input[type=email]{width:100%;box-sizing:border-box;margin-top:8px;font:inherit;font-size:15px;padding:10px;border-radius:10px;border:1.5px solid rgba(127,127,127,.45);background:rgba(127,127,127,.1);color:inherit;-webkit-text-fill-color:currentColor;opacity:1}
.svy-err{color:#c24848;font-weight:700}
/* Challenge this clue (Evan 11/23) */
.chl-link{display:block;margin:6px auto 0;font:inherit;font-size:14px;font-weight:700;padding:8px 14px;border-radius:999px;border:1.5px solid #d0473b;background:rgba(208,71,59,.1);color:#a3291f;cursor:pointer}
@media (prefers-color-scheme:dark){.chl-link{color:#ffb3ab;background:rgba(208,71,59,.2)}}
.chl-pz{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px;border-radius:14px;background:rgba(127,127,127,.1);margin:4px 0 12px}
.chl-pz span{font-size:14px;color:var(--muted,#6b7a72);font-weight:600}.chl-pz b{font-size:20px}
.chl-h{font-size:16px;margin:0 0 8px}
.chl-opts{flex-direction:column;align-items:stretch}.chl-opts button{text-align:left;border-radius:12px}
.chl-in{width:100%;box-sizing:border-box;margin-top:10px;font:inherit;font-size:15px;padding:10px;border-radius:10px;border:1.5px solid rgba(127,127,127,.35);background:rgba(127,127,127,.1);color:inherit;-webkit-text-fill-color:currentColor}
/* Today's talk (Evan 11/23) */
.talk-row{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
.talk-btn{font:inherit;font-size:14px;font-weight:700;padding:8px 14px;border-radius:999px;border:1.5px solid #2f8fe0;background:rgba(47,143,224,.1);color:#1f6fbf;cursor:pointer}
.talk-row .chl-link{margin:0}
.tk-sum{font-size:13.5px;line-height:1.5;padding:10px 12px;border-radius:12px;background:rgba(194,72,72,.08);border:1px solid rgba(194,72,72,.25);margin:0 0 12px}
.tk-new{margin:0 0 12px}.tk-new textarea{width:100%;box-sizing:border-box;font:inherit;font-size:15px;padding:10px;border-radius:10px;border:1.5px solid rgba(127,127,127,.35);background:rgba(127,127,127,.1);color:inherit;-webkit-text-fill-color:currentColor}
.tk-new>div{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.tk-new .primary{padding:9px 22px}
.tk-list{list-style:none;padding:0;margin:0 0 12px}
.tk-c{padding:10px 0;border-bottom:1px solid rgba(127,127,127,.2)}
.tk-c.team{background:rgba(230,180,34,.12);border-radius:12px;padding:10px;border:1.5px solid #e6b422;margin-bottom:8px}
.tk-h{display:flex;align-items:baseline;gap:8px}.tk-h small{margin-left:auto;color:var(--muted,#6b7a72)}
.tk-team{font-style:normal;font-size:11px;font-weight:800;background:#e6b422;color:#1d1405;border-radius:999px;padding:1px 8px}
.tk-flag{font-size:13px;color:#a33a3a;margin-top:4px}
.tk-c p{margin:4px 0 0}
.tk-a{display:flex;gap:10px;margin-top:6px}
.tk-a button{font:inherit;font-size:13px;background:none;border:1px solid rgba(127,127,127,.3);border-radius:999px;padding:3px 10px;color:inherit;cursor:pointer}
.tk-like.on{background:rgba(47,143,224,.15);border-color:#2f8fe0}
.tk-empty{color:var(--muted,#6b7a72);padding:12px 0;text-align:center}
html body #home .home-hot-old{display:block;margin:12px auto 0;font:inherit;font-size:15px;padding:8px 16px;border-radius:999px;border:1.5px solid rgba(226,103,44,.6);background:rgba(226,103,44,.12);color:#8a3a12;cursor:pointer}
html body #home .home-hot[hidden]{display:none}
html body #home .home-hot b{color:#8a3a12}
@media (prefers-color-scheme:dark){html body #home .home-hot,html body #home .home-hot b{color:#ffcfb0}}
.svy-q input::placeholder,.svy-q textarea::placeholder,.chl-in::placeholder,.tk-new textarea::placeholder{color:currentColor;opacity:.55;-webkit-text-fill-color:currentColor}

/* Home talk panel (Evan 11/24) */
html body #home .home-talk{width:100%;margin-top:14px;border-radius:22px;padding:14px;text-align:center;box-sizing:border-box}
html body #home .home-talk[hidden]{display:none}
html body #home .home-talk h2{margin:0;font-size:18px;font-weight:800}
html body #home .home-talk small{display:block;margin:4px 0 10px;font-size:14px;font-weight:600;opacity:.85}
html body #home .ht-row{display:flex;gap:8px}
html body #home .ht-row button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 4px;border-radius:14px;font:inherit;cursor:pointer;color:#fff;border:0}
html body #home .ht-row button b{font-size:15px;font-weight:800}
html body #home .ht-row button i{font-style:normal;font-size:14px;font-weight:700;opacity:.95}
html body #home .ht-row .ht-1{background:#2e9e5b}
html body #home .ht-row .ht-2{background:#d9a400;color:#2a2000}
html body #home .ht-row .ht-3{background:#d0473b}
html body #home .ht-row button.locked{opacity:.55}
@media (prefers-color-scheme:light){
  html body #home .home-talk{background:rgba(255,255,255,.5);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.75);box-shadow:0 6px 24px rgba(0,0,0,.06);color:var(--hg-ink)}
}
@media (prefers-color-scheme:dark){
  html body #home .home-talk{background:rgba(255,255,255,.07);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.18);color:#fff}
}
html body #home .home-talk{padding:10px 12px;margin-top:12px}
html body #home .home-talk h2{font-size:16px;display:inline}
html body #home .home-talk small{display:inline;margin:0 0 0 6px;font-size:13px}
html body #home .ht-row{margin-top:8px}
html body #home .ht-row button{flex-direction:row;justify-content:center;gap:6px;padding:8px 4px}
html body #home .ht-row button b{font-size:14px}
html body #home .ht-row button i{font-size:13px}
html body #home .ht-row button{white-space:nowrap;padding:7px 2px;gap:4px;min-width:0}
html body #home .ht-row button b,html body #home .ht-row button i{white-space:nowrap}
html body #home .home-talk{margin-top:10px;padding:9px 10px}

/* Legendary pill on the Home talk panel; 4 pills wrap two by two (Evan 11/25) */
html body #home .ht-row{flex-wrap:wrap}
html body #home .ht-row button{flex:1 1 28%}
html body #home .ht-row .ht-4{background:#6b4bd8;flex-basis:100%}
/* Result tiles with three buttons: icon above the label so Leaderboard is never cut off (Evan 11/25) */
body.compact-result .acts.a3 .act{grid-auto-flow:row;gap:3px;padding:8px 2px 7px;font-size:13px}
body.compact-result .acts.a3 .act span{overflow:visible;text-overflow:clip}

/* ===== HOLIDAY: Thanksgiving (Evan 11/26). html.hol-thanks is set by paintHoliday() in app.js on that date only. Warm autumn
   glows on Home, a greeting under the tagline, a few slow falling leaves (none with reduced motion). Text colors are unchanged. ===== */
@media (prefers-color-scheme:light){
  html.hol-thanks body #home{background:radial-gradient(60% 40% at 10% 5%,rgba(214,120,40,.32),transparent 70%),radial-gradient(50% 35% at 95% 25%,rgba(240,184,0,.34),transparent 70%),radial-gradient(60% 45% at 10% 90%,rgba(176,64,40,.20),transparent 70%),radial-gradient(55% 40% at 90% 85%,rgba(140,110,40,.22),transparent 70%),#f8efe0!important}
  html.hol-thanks body #home .hol-line{color:#9a4a12}
}
@media (prefers-color-scheme:dark){
  html.hol-thanks body #home{background:radial-gradient(60% 40% at 15% 10%,rgba(214,120,40,.40),transparent 70%),radial-gradient(50% 35% at 90% 30%,rgba(240,184,0,.24),transparent 70%),radial-gradient(60% 45% at 20% 85%,rgba(176,64,40,.32),transparent 70%),radial-gradient(55% 40% at 85% 90%,rgba(110,80,40,.34),transparent 70%),#2a1d12!important}
  html.hol-thanks body #home .hol-line{color:#ffcf9a}
}
html body #home .hol-line{margin:2px 0 0;font-size:18px;font-weight:800;text-align:center}
html body #home .hol-leaves{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0}
html body #home .hol-leaves i{position:absolute;top:-40px;font-style:normal;opacity:.75;animation:hol-fall linear infinite}
@keyframes hol-fall{0%{transform:translate(0,-40px) rotate(0)}50%{transform:translate(30px,50vh) rotate(160deg)}100%{transform:translate(-10px,105vh) rotate(320deg)}}
@media (prefers-reduced-motion:reduce){html body #home .hol-leaves{display:none}}
html.hol-thanks body #home{isolation:isolate}
html body #home .hol-leaves{z-index:-1}

/* the safe-area strip above Home (behind the phone's clock) matches the holiday wash, not the green page */
@media (prefers-color-scheme:light){html.hol-thanks:has(#home:not([hidden])),html.hol-thanks body:has(#home:not([hidden])){background:#f8efe0!important}}
@media (prefers-color-scheme:dark){html.hol-thanks:has(#home:not([hidden])),html.hol-thanks body:has(#home:not([hidden])){background:#2a1d12!important}}
/* the strip above Home is the page wash (body::before), not theme-color: tint it too on the holiday while Home is up */
@media (prefers-color-scheme:light){html.hol-thanks body:has(#home:not([hidden]))::before{background:#f8efe0!important}}
@media (prefers-color-scheme:dark){html.hol-thanks body:has(#home:not([hidden]))::before{background:#2a1d12!important}}

.da-tiles.da-stack{flex-direction:column;gap:6px}
.da-tiles.da-stack>div{display:flex;gap:4px;justify-content:center}

/* Look switch in the profile (Evan 11/26) */
.look-seg{display:flex;gap:6px;margin-top:8px}
.look-seg button{flex:1;font:inherit;font-size:14px;font-weight:700;padding:9px 4px;border-radius:12px;border:1.5px solid rgba(127,127,127,.4);background:transparent;color:inherit;cursor:pointer}
.look-seg button.on{background:#2e9e5b;border-color:#2e9e5b;color:#fff}

/* Make your avatar nudge (Evan 11/26) */
#profile-avatar.av-cta{display:block;width:100%;max-width:340px;margin:10px auto 4px;padding:14px 16px;border-radius:16px;background:#2e9e5b!important;color:#fff!important;opacity:1!important;font-size:18px;font-weight:800;text-decoration:none;border:0;box-shadow:0 4px 14px rgba(46,158,91,.35)}
#profile-avatar.av-cta small{display:block;margin-top:4px;font-size:13px;font-weight:600;opacity:.92}
.avatar-btn .av-dot,.profile-pic .av-dot{top:0;right:0;width:13px;height:13px}
.profile-pic{position:relative}
#profile-avatar.av-cta small{color:#fff!important}

/* Avatar maker v2 (Evan 11/26) */
.avm2{display:flex;flex-direction:column;min-height:0}
.avm2 .avm-head{display:flex;justify-content:center;margin:0 0 10px}
.avm2 .avm-pic{width:132px;height:132px}
.avm-tabs{display:flex;gap:6px;margin:0 0 10px;overflow-x:auto}
.avm-tabs button{flex:1 0 auto;font:inherit;font-size:15px;font-weight:800;padding:9px 12px;border-radius:999px;border:1.5px solid rgba(127,127,127,.4);background:transparent;color:inherit;cursor:pointer}
.avm-tabs button.on{background:#2e9e5b;border-color:#2e9e5b;color:#fff}
.avm-body{overflow-y:auto;-webkit-overflow-scrolling:touch;max-height:min(48vh,420px);padding:2px 2px 6px}
.avm-hint{margin:0 0 10px;text-align:center;font-size:14px;opacity:.85}
.avm-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.avm-looks{grid-template-columns:repeat(3,1fr);gap:10px}
.avm-th{aspect-ratio:1;border-radius:16px;border:2px solid rgba(127,127,127,.3);background:rgba(127,127,127,.12) center/cover no-repeat;cursor:pointer;padding:0}
.avm-th.on{border-color:#2e9e5b;box-shadow:0 0 0 3px rgba(46,158,91,.45)}
.avm-sws{display:flex;flex-wrap:wrap;gap:10px}
.avm2 .avm-sw{width:40px;height:40px}
.avm2 .avm-row{margin:0 0 16px}
.avm2 .avm-lab{font-size:14px;margin:0 0 8px}
.avm-more{margin-top:12px}
.avm-foot{margin-top:10px}
.avm-links{display:flex;justify-content:center;gap:18px;margin-top:8px}
.avm-tabs{overflow:visible;gap:4px}
.avm-tabs button{flex:1 1 0;min-width:0;padding:9px 2px;font-size:14px}
/* With an avatar already: still a real button, outlined (Evan 11/27) */
#profile-avatar:not(.av-cta){display:block;width:100%;max-width:none;margin:10px 0 4px;padding:12px 16px;border-radius:16px;border:2px solid #2e9e5b!important;background:transparent!important;color:#2e9e5b!important;font-size:17px;font-weight:800;text-decoration:none}
@media (prefers-color-scheme:dark){#profile-avatar:not(.av-cta){color:#7fd6a2!important}}

/* Puzzle reviewers card, owner only (Evan 11/27) */
.team-p{margin:4px 0 10px;font-size:14px;opacity:.85}
.team-row{display:flex;gap:8px}
.team-row input{flex:1;min-width:0;font:inherit;font-size:16px;padding:10px;border-radius:10px;border:1.5px solid rgba(127,127,127,.45);background:rgba(127,127,127,.1);color:inherit}
.team-out{margin-top:10px;font-size:14px}
.team-acts{display:flex;gap:8px;margin-top:8px}
.team-acts button{flex:1}
.team-card .team-row button,.team-card .team-acts button{width:auto;margin:0;min-width:0;box-sizing:border-box}
.team-card .team-row button{flex:0 0 auto;padding:0 16px}
.team-card{grid-template-columns:minmax(0,1fr)}

/* Morning reminder pop-up (Evan 11/27) */
.rm-pop{text-align:center;padding:6px 4px 2px}
.rm-pop .rm-bell{font-size:46px;line-height:1}
.rm-pop h2{margin:8px 0 6px}
.rm-pop p{margin:0 0 16px;opacity:.9}
.rm-pop .linkbtn{display:block;margin:10px auto 0}
/* Home scrolls on phones again (Evan 11/27): the simple Home grew (Invite friends, Today's Talk, Legendary), so on shorter phones
   the bottom was cut off with no way to reach it. Short content still sits in the middle; tall content scrolls. */
@media (max-width:899px){
  .home{overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .home .home-in{height:auto!important;min-height:100dvh!important;max-height:none!important;overflow:visible!important}
}
@media (max-width:899px){
  html body #home .home-in{position:relative!important}
  html body #home .menu-btn,html body #home .home-top .avatar-btn,html body #home .home-top .streak-btn{position:absolute!important} /* scroll away with Home instead of floating over the title */
}
@media (max-width:899px){html body #home .home-in{padding-top:calc(64px + env(safe-area-inset-top))!important}} /* room for the menu, streak and picture above the title */
@media (max-width:899px){html body #home .home-hero,html body #home .home-top{position:static!important}} /* so the corner icons sit at the top of Home, not beside the title */

/* Talk button on the colored answer cards: solid cream like the clue chips so it reads on green, yellow, red and purple (Evan 11/27) */
.da-talk.talk-btn{background:#f6f1e7!important;color:#1d3b2e!important;border:0!important;box-shadow:0 2px 8px rgba(0,0,0,.18);font-weight:800}

/* Review results for the owner (Evan 11/27) */
.tr select{width:100%;font:inherit;font-size:16px;padding:10px;border-radius:10px;margin:4px 0 12px;background:rgba(127,127,127,.12);color:inherit;border:1.5px solid rgba(127,127,127,.4)}
.tr-who>div{margin:0 0 8px;font-size:15px}.tr-who small{display:block;opacity:.75;font-size:13px}
.tr-sum{display:flex;flex-wrap:wrap;gap:8px 14px;margin:8px 0 4px;font-weight:700;font-size:14px}
.tr-need,.tr-key{font-size:13px;opacity:.75;margin:4px 0 10px}
.tr-list{list-style:none;margin:10px 0 0;padding:0}
.tr-list li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid rgba(127,127,127,.2)}
.tr-a small{display:block;opacity:.75;font-size:12px}.tr-a em{display:block;font-style:normal;font-size:12px;color:#e07a6b}
.tr-s{font-size:12px;font-weight:800;opacity:.85}.tr-approved .tr-s{color:#3fb56f}.tr-rejected .tr-s{color:#e07a6b}

/* Pack 2 NEW tag (Evan 11/28) */
.lvh-new{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:6px;background:#e5484d;color:#fff;font-style:normal;font-size:10px;font-weight:800;letter-spacing:.06em;vertical-align:middle}
.lvh-lock .lvh-new{margin:2px 0 0}

/* Legendary close miss, the answer's spaces (Evan 11/29) */
.inwrap .tiles.tpl .t:not(.mk-ok){border-color:rgba(255,255,255,.55)!important}
.inwrap .tiles.tpl .t.slot{border-style:dashed;border-color:rgba(255,255,255,.4)!important;background:transparent}
.inwrap .tiles.tpl .t.slot.cur{border-style:solid;border-color:#fff!important;box-shadow:0 0 0 3px rgba(255,255,255,.18)}

/* Friend-played card (Evan 11/30): never cut off (the row it sits in may not shrink or clip), shorter two-line text */
html body #home .home-modes{overflow:visible!important;flex-shrink:0!important}
html body #home .home-beat b{display:flex;flex-direction:column;gap:2px;font-size:15px!important;line-height:1.25}
html body #home .home-beat b small{font-size:13px;font-weight:600;opacity:.8}

/* Legendary result: every guess under the answer (Evan 11/30) */
main.done .attempts.shown{display:grid;margin:14px auto 0;max-width:560px}
.attempts .att-head{margin:0 0 2px;font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);text-align:center}
/* In-game header: FOSO only, the subtitle lives on Home and the START screen (Evan 11/30) */
.top h1 small{display:none!important}
