/* Nunito, self-hosted (Latin). Variable weight 400-900. Nothing waits on a third-party server. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/nunito-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #f7f2ea; --bg2: #efe6d8; --card: #ffffff; --ink: #221f33; --mute: #7a7590; --line: #e7dfd0;
  --me: #ff5f6d; --opp: #14b8a6;
  --me-d: color-mix(in srgb, var(--me) 76%, #000); --opp-d: color-mix(in srgb, var(--opp) 76%, #000);
  --me-l: color-mix(in srgb, var(--me) 62%, #fff); --opp-l: color-mix(in srgb, var(--opp) 62%, #fff);
  --gold: #ffc43d; --gold-d: #e0a000; --ok: #22c55e; --bad: #ef4444;
  --shadow: 0 14px 30px -16px rgba(34, 31, 51, .35);
  --r: 22px;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121f; --bg2: #1b1829; --card: #231f36; --ink: #f4f1ff; --mute: #a29cc0; --line: #342f4d;
    --shadow: 0 14px 30px -16px rgba(0, 0, 0, .7);
  }
  meta[name=theme-color] { content: #14121f }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 10% -10%, color-mix(in srgb, var(--me) 14%, transparent), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, color-mix(in srgb, var(--opp) 14%, transparent), transparent 60%);
  background-attachment: fixed;
  min-height: 100dvh; overflow-x: hidden;
}
#app { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px calc(86px + env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; display: flex; flex-direction: column; }
.screen { display: flex; flex-direction: column; gap: 14px; animation: screenIn .35s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h2 { font-size: 26px; font-weight: 900; }
.muted { color: var(--mute); font-weight: 700; margin: 0; }
.center { text-align: center; }
.status { min-height: 1.3em; margin: 6px 0 0; text-align: center; font-weight: 800; color: var(--mute); font-size: 14px; }
.status.err { color: var(--bad); }
.lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; color: var(--mute); margin: 0 0 6px; }

/* ---------- cards & buttons ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn {
  font: inherit; font-weight: 900; font-size: 16px; color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 16px; padding: 12px 18px; cursor: pointer;
  transition: transform .08s, filter .15s, border-bottom-width .08s; user-select: none; position: relative; overflow: hidden;
}
.btn:hover { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--me); border-color: var(--me-d); color: #fff; }
.btn.big { width: 100%; padding: 16px; font-size: 18px; }
.btn.small { padding: 8px 12px; font-size: 14px; border-bottom-width: 4px; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }
.iconbtn { font: inherit; font-size: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); width: 42px; height: 42px; border-radius: 14px; cursor: pointer; box-shadow: var(--shadow); }
.iconbtn:active { transform: scale(.94); }
.field {
  width: 100%; font: inherit; font-weight: 800; font-size: 18px; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--me); box-shadow: 0 0 0 4px color-mix(in srgb, var(--me) 20%, transparent); }
.field.code { text-transform: uppercase; letter-spacing: .25em; text-align: center; }

/* ---------- home ---------- */
.logo { text-align: center; padding: 18px 0 4px; }
.logo h1 { font-size: 46px; font-weight: 900; margin-top: 8px; }
.tag { color: var(--mute); font-weight: 800; margin: 4px 0 0; }
.logo-tiles { display: inline-flex; gap: 8px; }
.logo-tiles span {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-weight: 900; font-size: 28px; color: #fff;
  background: linear-gradient(160deg, var(--me), var(--me-d)); box-shadow: 0 5px 0 var(--me-d);
  animation: bob 3s ease-in-out infinite;
}
.logo-tiles span:nth-child(2) { background: linear-gradient(160deg, var(--gold), var(--gold-d)); box-shadow: 0 5px 0 var(--gold-d); animation-delay: .25s; color: #3b2a00; }
.logo-tiles span:nth-child(3) { background: linear-gradient(160deg, var(--opp), var(--opp-d)); box-shadow: 0 5px 0 var(--opp-d); animation-delay: .5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-7px) rotate(3deg) } }
.invite { background: color-mix(in srgb, var(--gold) 25%, var(--card)); border: 2px dashed var(--gold-d); border-radius: 14px; padding: 10px 12px; font-weight: 800; margin-bottom: 14px; text-align: center; }
.avrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.avrow button { font-size: 24px; width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; transition: transform .12s; }
.avrow button:hover { transform: translateY(-2px); }
.avrow button[aria-checked=true] { border-color: var(--me); background: color-mix(in srgb, var(--me) 14%, var(--card)); transform: scale(1.08); }
.or { display: flex; align-items: center; gap: 10px; color: var(--mute); font-weight: 800; font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.joinrow { display: flex; gap: 10px; }
.levelcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lvl-badge { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 20px; color: #3b2a00; background: radial-gradient(circle at 30% 25%, #ffe38a, var(--gold)); box-shadow: 0 3px 0 var(--gold-d); }
.lvl-body { flex: 1; min-width: 0; }
.lvl-top { display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; margin-bottom: 6px; }
.lvl-top span { color: var(--mute); }
.bar { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ff9f43); border-radius: 99px; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.how { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; font-weight: 700; color: var(--mute); }
.how summary { cursor: pointer; font-weight: 900; color: var(--ink); }
.how ol { padding-left: 20px; margin: 10px 0; line-height: 1.5; }
.how p { margin: 0 0 4px; line-height: 1.5; }

/* ---------- scoreboard ---------- */
#topbar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 14px; }
.pcard { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px 10px; box-shadow: var(--shadow); min-width: 0; }
.pcard.opp { justify-content: flex-end; }
.pcard .av { font-size: 26px; line-height: 1; }
.pmeta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pmeta.right { align-items: flex-end; }
.pmeta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sc { font-weight: 900; font-size: 28px; min-width: 1ch; text-align: center; }
.pcard.me .sc { color: var(--me); } .pcard.opp .sc { color: var(--opp); }
.sc.bump { animation: bump .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 0% { transform: scale(1) } 40% { transform: scale(1.7) rotate(-6deg) } 100% { transform: scale(1) } }
.pips { display: flex; gap: 4px; flex-wrap: wrap; }
.pmeta.right .pips { justify-content: flex-end; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg2); transition: background .3s, transform .3s; }
.pcard.me .pips i.on { background: var(--me); transform: scale(1.15); } .pcard.opp .pips i.on { background: var(--opp); transform: scale(1.15); }
.vs { text-align: center; line-height: 1.15; } .vs span { display: block; font-weight: 900; font-size: 13px; } .vs small { color: var(--mute); font-weight: 800; font-size: 11px; }

/* ---------- lobby ---------- */
.roomcode { font-size: 36px; font-weight: 900; letter-spacing: .14em; padding-left: .14em; color: var(--me); }
.sharebox { margin: 12px 0; } .sharebox .field { font-size: 14px; text-align: center; }
.versus { display: flex; align-items: center; justify-content: space-around; gap: 6px; }
.vplayer { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 16px; min-width: 0; }
.vplayer b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bigav { font-size: 44px; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 4px solid var(--line); }
.vplayer.me .bigav { border-color: var(--me); } .vplayer.opp .bigav { border-color: var(--opp); }
.vplayer.opp.waiting .bigav { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .6 } }
.vsdot { font-weight: 900; color: var(--mute); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.seg button { font: inherit; font-weight: 900; font-size: 18px; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; }
.seg button.on { background: var(--me); color: #fff; border-color: var(--me-d); }

/* ---------- tiles ---------- */
.tile { --size: clamp(92px, 27vw, 128px); width: var(--size); height: var(--size); perspective: 700px; flex: none; }
.tile.big { --size: clamp(110px, 32vw, 150px); }
.tile .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.tile.flipped .inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 26px;
  display: grid; place-items: center; font-weight: 900; font-size: calc(var(--size) * .58); line-height: 1;
}
.face.front {
  color: color-mix(in srgb, var(--ink) 35%, transparent); background:
    repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--ink) 5%, transparent) 10px 20px), var(--card);
  border: 3px dashed var(--line); font-size: calc(var(--size) * .45);
}
.face.back { transform: rotateY(180deg); color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.tile.me .face.back { background: linear-gradient(160deg, var(--me-l), var(--me) 55%, var(--me-d)); box-shadow: 0 8px 0 var(--me-d), 0 18px 28px -10px color-mix(in srgb, var(--me) 60%, transparent); }
.tile.opp .face.back { background: linear-gradient(160deg, var(--opp-l), var(--opp) 55%, var(--opp-d)); box-shadow: 0 8px 0 var(--opp-d), 0 18px 28px -10px color-mix(in srgb, var(--opp) 60%, transparent); }
.tile.pop { animation: pop .45s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes pop { 0% { transform: scale(.7) } 100% { transform: scale(1) } }
.tile.locked .face.front { border-style: solid; border-color: var(--me); color: var(--me); }

/* ---------- pick ---------- */
.stagehead { text-align: center; padding-top: 6px; }
.pickrow { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-weight: 800; font-size: 14px; color: var(--mute); box-shadow: var(--shadow); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mute); animation: blink 1.2s infinite; }
.chip.ok { color: var(--opp-d); } .chip.ok .dot { background: var(--ok); animation: none; }
@keyframes blink { 50% { opacity: .25 } }
.kbd { display: flex; flex-direction: column; gap: 7px; align-items: center; margin: 4px 0; }
.kbd .row { display: flex; gap: 5px; justify-content: center; width: 100%; }
.kbd button {
  flex: 1; max-width: 46px; aspect-ratio: 1 / 1.15; font: inherit; font-weight: 900; font-size: clamp(16px, 4.6vw, 21px); color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 11px; cursor: pointer; transition: transform .08s;
}
.kbd button:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.kbd button.sel { background: var(--me); color: #fff; border-color: var(--me-d); transform: translateY(-3px) scale(1.08); }
.kbd button:disabled { opacity: .5; }

/* ---------- round ---------- */
.timerbar { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.timerbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--opp), var(--gold) 60%, var(--bad)); background-size: 300% 100%; background-position: 0 0; border-radius: 99px; transform-origin: left; }
.tilerow { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 26px); margin-top: 8px; }
.tilewrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.who { font-size: 12px; font-weight: 900; color: var(--mute); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrows { font-size: 64px; line-height: 1; font-weight: 900; color: var(--ink); opacity: .82; margin: 0 -2px; }
.rule { text-align: center; margin: 2px 0 0; font-weight: 800; color: var(--mute); min-height: 1.4em; }
.rule b { color: var(--ink); }
.diff { align-self: center; font-weight: 900; font-size: 13px; padding: 5px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); animation: pop .5s both; }
.diff.t0 { color: #16a34a } .diff.t1 { color: #0891b2 } .diff.t2 { color: #ea580c } .diff.t3 { color: #dc2626 } .diff.t4 { color: #a21caf }
.countdown { height: 96px; display: grid; place-items: center; font-size: 76px; font-weight: 900; color: var(--gold-d); }
.countdown span { display: block; animation: cd .9s ease-out both; }
.countdown span.go { color: var(--ok); font-size: 64px; }
@keyframes cd { 0% { transform: scale(2.2); opacity: 0 } 25% { opacity: 1 } 100% { transform: scale(.9); opacity: .15 } }
#guessform { display: flex; gap: 10px; }
.field.guess { font-size: 22px; text-align: center; letter-spacing: .04em; text-transform: lowercase; }
.field.guess:disabled { opacity: .5; }
#guessform.shake { animation: shake .4s; }
#guessform.shake .field { border-color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-9px) } 40%, 80% { transform: translateX(9px) } }
#guessform .btn { padding-inline: 22px; }
.feedback { text-align: center; margin: 0; min-height: 1.4em; font-weight: 800; color: var(--bad); }
.feedback.ok { color: var(--ok); }
.oppchip { align-self: center; }
.hint { align-self: center; background: color-mix(in srgb, var(--gold) 25%, var(--card)); border: 2px dashed var(--gold-d); border-radius: 14px; padding: 10px 16px; font-weight: 800; text-align: center; animation: pop .5s both; }
.hint code { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3em; font-size: 20px; margin-top: 4px; }

/* ---------- result ---------- */
.resultcard { overflow: hidden; position: relative; }
.r-emoji { font-size: 64px; animation: pop .6s cubic-bezier(.2, 1.7, .4, 1) both; }
.resultcard h2 { margin: 6px 0 2px; }
.wordtiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 16px 0 10px; }
.wordtiles span { min-width: 32px; height: 40px; padding: 0 3px; display: grid; place-items: center; font-weight: 900; font-size: 20px; text-transform: uppercase; border-radius: 9px; background: var(--bg); border: 2px solid var(--line); animation: letterIn .4s cubic-bezier(.2, 1.7, .4, 1) both; }
.wordtiles span.edge { background: var(--gold); border-color: var(--gold-d); color: #3b2a00; box-shadow: 0 3px 0 var(--gold-d); }
@keyframes letterIn { from { transform: translateY(-14px) scale(.5); opacity: 0 } to { transform: none; opacity: 1 } }
.r-stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stat { background: var(--bg); border-radius: 14px; padding: 8px 14px; font-weight: 800; font-size: 13px; color: var(--mute); }
.stat b { display: block; font-size: 20px; color: var(--ink); }
.xp { margin-top: 14px; font-weight: 900; color: var(--gold-d); animation: pop .6s .5s cubic-bezier(.2, 1.7, .4, 1) both; }
.xp small { display: block; color: var(--mute); font-weight: 800; font-size: 12px; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-weight: 800; font-size: 14px; }
.chips span.long { background: color-mix(in srgb, var(--opp) 18%, var(--card)); border-color: var(--opp); }
#btn-ready .ring { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: rgba(255, 255, 255, .55); transform-origin: left; transform: scaleX(0); }

/* ---------- final ---------- */
.trophy { font-size: 78px; animation: trophy 1.6s ease-in-out infinite; }
@keyframes trophy { 50% { transform: translateY(-8px) rotate(5deg) } }
.f-score { display: flex; justify-content: center; align-items: baseline; gap: 14px; font-size: 52px; font-weight: 900; margin: 4px 0; }
.f-score span:first-child { color: var(--me); } .f-score span:last-child { color: var(--opp); } .f-score i { color: var(--mute); font-style: normal; }
.recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recap li { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 8px 12px; background: var(--bg); border-radius: 12px; }
.recap li .n { color: var(--mute); width: 22px; font-size: 13px; }
.recap li .w { flex: 1; text-transform: uppercase; letter-spacing: .06em; }
.recap li .t { color: var(--mute); font-size: 13px; }

/* ---------- footer / misc ---------- */
#foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; pointer-events: none; }
#foot > * { pointer-events: auto; }
.ping { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--mute); }
.ping i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.ping.mid i { background: var(--gold); } .ping.bad i { background: var(--bad); }
#reactbar { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 6px; z-index: 5; }
#reactbar button { font-size: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; transition: transform .1s; }
#reactbar button:active { transform: scale(.8); }
#floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.floater { position: absolute; bottom: 90px; font-size: 40px; animation: floatUp 2.6s ease-out forwards; text-align: center; }
.floater small { display: block; font-size: 11px; font-weight: 900; color: var(--mute); }
@keyframes floatUp { 0% { transform: translateY(0) scale(.4); opacity: 0 } 15% { opacity: 1; transform: translateY(-30px) scale(1.2) } 100% { transform: translateY(-62vh) translateX(var(--dx, 0)) scale(1); opacity: 0 } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
#toasts { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); font-weight: 800; padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow); max-width: min(92vw, 420px); animation: toastIn .35s cubic-bezier(.2, 1.4, .4, 1), toastOut .3s 3.2s forwards; text-align: center; font-size: 14px; }
.toast.ach { display: flex; align-items: center; gap: 12px; text-align: left; background: linear-gradient(120deg, #3b2a00, #6b4a00); color: #fff3c4; border: 2px solid var(--gold); }
.toast.ach .i { font-size: 32px; } .toast.ach b { display: block; color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
@keyframes toastIn { from { transform: translateY(-30px) scale(.8); opacity: 0 } }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0 } }
.conn { position: fixed; inset: 0; z-index: 45; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(4px); display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 18px; padding: 30px; }
.conn small { display: block; color: var(--mute); font-weight: 700; margin-top: 8px; font-size: 14px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--me); margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 8, 20, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0 } }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); animation: sheet .3s cubic-bezier(.2, 1, .3, 1); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0 } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.statgrid .stat { text-align: center; background: var(--card); border: 1px solid var(--line); }
.achgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ach .i { font-size: 28px; } .ach b { display: block; font-size: 14px; } .ach small { color: var(--mute); font-weight: 700; font-size: 12px; line-height: 1.2; display: block; }
.ach.locked { opacity: .45; filter: grayscale(1); }

@media (max-height: 700px) { .countdown { height: 70px; font-size: 56px; } .logo { padding-top: 4px; } }

/* ---------- mobile polish ---------- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
.field.guess { font-size: 22px; }
body:has(#guess:focus) #reactbar, body:has(#guess:focus) #foot { display: none; }
@media (max-width: 400px) {
  #app { padding-left: 12px; padding-right: 12px; }
  .pcard { padding: 6px 8px; gap: 5px; } .pcard .av { font-size: 22px; } .sc { font-size: 24px; }
  .pips i { width: 7px; height: 7px; } .logo h1 { font-size: 38px; }
  #reactbar { gap: 4px; } #reactbar button { width: 40px; height: 40px; font-size: 20px; }
}
@media (max-height: 640px) {
  .tile { --size: clamp(70px, 22vw, 96px); } .tile.big { --size: clamp(84px, 26vw, 110px); }
  .countdown { height: 56px; font-size: 44px; } h2 { font-size: 22px; }
}


.colrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; }
.colrow button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.colrow button[aria-checked=true] { box-shadow: 0 0 0 3px var(--ink); }
.txtbtn { font: inherit; font-weight: 800; font-size: 13px; color: var(--mute); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; cursor: pointer; }
.ach .i:empty, .toast.ach .i:empty { display: none; }

body:has(#reactbar:not([hidden])) #app { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
body:has(#guess:focus) #app { padding-bottom: 12px !important; }

/* ================= v4 polish ================= */
/* ambient loops stay off; motion is for feedback only */
.logo-tiles span, .trophy, .chip .dot, .vplayer.opp.waiting .bigav, .hint { animation: none !important; }
.screen { animation-duration: .18s; }
.countdown { display: none; }
.build { font-size: 11px; opacity: .5; margin: 4px 0 0; }

/* lock the page to the visual viewport (no keyboard zoom/jump) */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; width: 100%; }
#app { position: fixed; top: var(--vvt, 0px); left: 0; right: 0; margin: 0 auto; height: var(--vvh, 100dvh); min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.kb #foot, body.kb #rule, body.kb #diff, body.kb .stagehead { display: none !important; }
body.kb #app { padding-top: 8px; padding-bottom: 8px !important; gap: 0; }
body.kb #topbar { margin-bottom: 8px; }
body.kb .pips { display: none; }
body.kb .screen { gap: 8px; }
body.kb .tile { --size: 62px; } body.kb .tile .face.back { box-shadow: 0 4px 0 var(--me-d); border-radius: 16px; } body.kb .tile.opp .face.back { box-shadow: 0 4px 0 var(--opp-d); }
body.kb .tilerow { margin: 0; gap: 14px; } body.kb .tilewrap { gap: 4px; } body.kb .arrows { font-size: 40px; } body.kb .who { display: none; }
body.kb .timerbar { height: 5px; }
body.kb .hint { padding: 5px 10px; font-size: 13px; } body.kb .hint code { font-size: 15px; margin-top: 0; }
body.kb .chip { padding: 4px 10px; font-size: 12px; }

/* reactions: each emoji has its own personality */
#reactbar button .e, .floater .e { display: inline-block; transform-origin: 50% 70%; }
#reactbar button.hit[data-k=heart] .e, .floater .e[data-k=heart] { animation: heartPound .9s ease-out; }
#reactbar button.hit[data-k=fire] .e, .floater .e[data-k=fire] { animation: fireWiggle .9s ease-in-out; }
#reactbar button.hit[data-k=clap] .e, .floater .e[data-k=clap] { animation: clap .8s ease-in-out; }
#reactbar button.hit[data-k=laugh] .e, .floater .e[data-k=laugh] { animation: laugh .8s ease-in-out; }
#reactbar button.hit[data-k=cry] .e, .floater .e[data-k=cry] { animation: cry .9s ease-in-out; }
#reactbar button.hit[data-k=angry] .e, .floater .e[data-k=angry] { animation: angry .6s ease-in-out; }
#reactbar button.hit[data-k=melt] .e, .floater .e[data-k=melt] { animation: melt .9s ease-in-out; }
@keyframes heartPound { 0% { transform: scale(1) } 14% { transform: scale(1.65) } 28% { transform: scale(1.05) } 42% { transform: scale(1.55) } 70%, 100% { transform: scale(1) } }
@keyframes fireWiggle { 0%, 100% { transform: rotate(0) scale(1) } 18% { transform: rotate(-16deg) scale(1.15, 1.4) } 38% { transform: rotate(13deg) scale(1.05, 1.45) } 58% { transform: rotate(-11deg) scale(1.15, 1.3) } 78% { transform: rotate(8deg) scale(1.05, 1.35) } }
@keyframes clap { 0%, 100% { transform: scale(1) rotate(0) } 15% { transform: scale(1.35) rotate(-20deg) } 30% { transform: scale(.8) rotate(8deg) } 45% { transform: scale(1.35) rotate(-20deg) } 60% { transform: scale(.8) rotate(8deg) } 78% { transform: scale(1.2) rotate(-10deg) } }
@keyframes laugh { 0%, 100% { transform: translateY(0) rotate(0) } 15% { transform: translateY(-9px) rotate(-14deg) } 30% { transform: translateY(0) rotate(11deg) } 45% { transform: translateY(-9px) rotate(-14deg) } 60% { transform: translateY(0) rotate(11deg) } 78% { transform: translateY(-5px) rotate(-6deg) } }
@keyframes cry { 0%, 100% { transform: translateY(0) scale(1) } 22% { transform: translateY(5px) scale(1.18, .88) } 44% { transform: translateY(-3px) scale(.92, 1.12) } 66% { transform: translateY(5px) scale(1.18, .88) } }
@keyframes angry { 0%, 100% { transform: translateX(0) scale(1) } 15% { transform: translateX(-6px) scale(1.3) } 30% { transform: translateX(6px) scale(1.3) } 45% { transform: translateX(-5px) scale(1.25) } 60% { transform: translateX(5px) scale(1.2) } 80% { transform: translateX(-2px) scale(1.1) } }
@keyframes melt { 0%, 100% { transform: scale(1) } 30% { transform: scale(1.35, .6) translateY(6px) } 55% { transform: scale(.85, 1.3) translateY(-4px) } 75% { transform: scale(1.15, .85) } }
#reactbar button { transition: transform .1s; } #reactbar button:active { transform: scale(.85); }
.floater { font-size: 44px; } .floater.poof { font-size: 34px; font-weight: 900; color: var(--mute); bottom: 40%; animation: poof 2s ease-out forwards; }
@keyframes poof { 0% { transform: scale(.3); opacity: 0 } 20% { transform: scale(1.3); opacity: 1 } 100% { transform: translateY(-40px) scale(2); opacity: 0 } }

/* fart button (winner only) */
.fartbtn { width: 100%; background: color-mix(in srgb, var(--gold) 28%, var(--card)); border-color: var(--gold-d); }
.fartbtn.hit { animation: squish .35s ease-out; }
@keyframes squish { 0% { transform: scale(1) } 30% { transform: scale(1.06, .88) } 60% { transform: scale(.97, 1.05) } 100% { transform: scale(1) } }
body.farted #app { animation: farted .7s ease-out; }
@keyframes farted { 0%, 100% { transform: translate(0) } 10% { transform: translate(-7px, 2px) } 20% { transform: translate(7px, -2px) } 30% { transform: translate(-6px, 2px) } 45% { transform: translate(5px) } 60% { transform: translate(-3px) } 80% { transform: translate(2px) } }

/* tactile polish */
.kbd button { transition: transform .06s, background .1s; }
.btn { transition: transform .08s, border-bottom-width .08s, filter .12s; }
.tile .inner { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.pips i { transition: background .2s, transform .25s cubic-bezier(.3, 1.8, .5, 1); }

/* ================= v4 flow: one persistent input ================= */
#app { display: flex; flex-direction: column; padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
main { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
#reactbar { position: static !important; bottom: auto !important; padding: 4px 0; gap: 6px; flex: none; }
#reactbar button { width: 38px; height: 38px; font-size: 19px; }
#foot { position: static !important; padding: 4px 0 0; flex: none; }
#dock { flex: none; padding: 6px 0 2px; }
#dock form { display: flex; gap: 8px; }
#guess[data-mode=pick] { text-transform: uppercase; text-align: center; font-size: 28px; font-weight: 900; }
#guess[data-mode=result] { opacity: .55; }
body:has(#reactbar:not([hidden])) #app { padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
body.kb .tile.big { --size: 84px; }
body.kb .pickrow { gap: 8px; margin: 0; }
body.kb .r-stats, body.kb #examples-card, body.kb .resultcard .muted { display: none; }
body.kb .resultcard { padding: 12px; } body.kb .wordtiles { margin: 8px 0 4px; } body.kb .resultcard h2 { font-size: 22px; }
body.kb .xp { margin-top: 6px; }

/* centre emoji in their boxes */
.avrow button, #reactbar button { display: grid; place-items: center; padding: 0; line-height: 1; }
.avrow button { font-size: 24px; } #reactbar button .e { display: block; line-height: 1; }

/* keep reactions visible while typing; tighter result card on phones */
body:has(#guess:focus) #reactbar { display: flex !important; }
body.kb .resultcard { padding: 8px 12px; } body.kb .xp small { display: none; } body.kb .r-sub, body.kb #r-sub { display: none; }
body.kb .wordtiles span { min-width: 26px; height: 32px; font-size: 16px; } body.kb .resultcard h2 { margin: 0; font-size: 20px; }
body.kb .fartbtn { padding: 10px; }

/* GO cue: obvious, instant, non-blocking */
#gosign { position: fixed; left: 0; right: 0; top: 32%; text-align: center; font-size: clamp(88px, 28vw, 150px); font-weight: 900; letter-spacing: .04em; color: #fff; -webkit-text-stroke: 3px var(--me-d); text-shadow: 0 8px 0 var(--me-d), 0 0 40px color-mix(in srgb, var(--me) 70%, transparent); pointer-events: none; z-index: 35; opacity: 0; }
#gosign.on { animation: goPop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes goPop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0 } 25% { transform: scale(1.15) rotate(3deg); opacity: 1 } 70% { transform: scale(1); opacity: 1 } 100% { transform: scale(1.4); opacity: 0 } }
#app.goflash::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 34; border: 6px solid var(--ok); border-radius: 0; animation: goBorder .6s ease-out forwards; }
@keyframes goBorder { 0% { opacity: 1; background: color-mix(in srgb, var(--ok) 22%, transparent) } 100% { opacity: 0; background: transparent } }

.small-note { font-size: 13px; margin: 8px 0 12px; line-height: 1.35; }
#home-actions .btnrow { margin-top: 4px; }
.roomcode { font-size: clamp(24px, 8vw, 36px) !important; word-break: break-all; }

#topbar { cursor: pointer; }

/* ================= v12: characters, customisation, crowns, streaks ================= */
.avsvg, .icsvg { display: block; width: 100%; height: 100%; overflow: visible; }
.av, .bigav { font-size: 0 !important; }
.pcard .av { width: 38px; height: 40px; flex: none; }
.bigav { width: 92px !important; height: 92px !important; border: none !important; background: none !important; }
.bigav .qmark, .av .qmark { font-size: 40px; font-weight: 900; color: var(--mute); display: grid; place-items: center; height: 100%; }
.vplayer.me .bigav, .vplayer.opp .bigav { border: none !important; }
.mepreview { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
.mepreview .av { width: 58px; height: 62px; flex: none; }
.mp-name { flex: 1; font-weight: 900; font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { display: inline-flex; vertical-align: -2px; margin-left: 4px; }
.crown.t1 { color: #cd7f32; } .crown.t2 { color: #c0c8d4; } .crown.t3 { color: #ffc43d; filter: drop-shadow(0 0 4px rgba(255, 196, 61, .6)); }
.streak { color: var(--gold-d); font-weight: 900; font-size: 11px; line-height: 1; }
.avpreview { width: 150px; height: 160px; margin: 4px auto 14px; }
.cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.cgrid button { position: relative; aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; padding: 8px 6px 4px; overflow: visible; }
.cgrid button[aria-checked=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.cgrid.cols { grid-template-columns: repeat(8, 1fr); }
.cgrid.cols button { border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 2px var(--line); padding: 0; }
.cgrid.cols button[aria-checked=true] { box-shadow: 0 0 0 3px var(--ink); }
.cgrid button.locked { opacity: .4; filter: grayscale(1); }
.cgrid button.locked::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 10V8a6 6 0 1 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1zm2 0h8V8a4 4 0 1 0-8 0z' fill='%23888'/%3E%3C/svg%3E") center / contain no-repeat; }
.recap .t { display: flex; align-items: center; gap: 6px; }
.recap .mini { width: 24px; height: 26px; display: inline-block; }
#reactbar button .e { display: block; width: 26px; height: 26px; }
.floater .e { display: block; width: 50px; height: 50px; }
.floater .e.puffbig { width: var(--sz, 50px); height: var(--sz, 50px); }
.floater small { display: block; text-align: center; }
.tile.hot .face.back { box-shadow: 0 8px 0 var(--me-d), 0 0 0 4px rgba(255, 196, 61, .55), 0 0 30px 8px rgba(255, 196, 61, .55); }
.tile.opp.hot .face.back { box-shadow: 0 8px 0 var(--opp-d), 0 0 0 4px rgba(255, 196, 61, .55), 0 0 30px 8px rgba(255, 196, 61, .55); }
.tile.hot2 .face.back { box-shadow: 0 8px 0 var(--me-d), 0 0 0 5px #ffc43d, 0 0 46px 14px rgba(255, 196, 61, .8); }
.tile.opp.hot2 .face.back { box-shadow: 0 8px 0 var(--opp-d), 0 0 0 5px #ffc43d, 0 0 46px 14px rgba(255, 196, 61, .8); }
.small-note { font-size: 13px; margin: 8px 0 12px; line-height: 1.35; }
#btn-reconnect { margin-top: 8px; }
.roomcode { font-size: clamp(24px, 8vw, 36px) !important; word-break: break-all; }
html[data-theme=ocean] { --bg: #08161f; --bg2: #0e2230; --card: #10283a; --ink: #e8f6ff; --mute: #8fb3c7; --line: #1c3d55; }
html[data-theme=sunset] { --bg: #1d0f1c; --bg2: #2a1426; --card: #2c1829; --ink: #fff1e8; --mute: #c9a3b3; --line: #44253d; }
html[data-theme=forest] { --bg: #0d1a12; --bg2: #13271b; --card: #16301f; --ink: #eafff0; --mute: #8fb99b; --line: #244632; }
html[data-theme=candy] { --bg: #fff0f6; --bg2: #ffe0ee; --card: #ffffff; --ink: #3b1030; --mute: #a06a8c; --line: #f6cfe2; }

/* ================= v13: app shell ================= */
.hero { text-align: center; padding: 6px 0 0; }
.hero h1 { font-size: 38px; font-weight: 900; margin-top: 6px; }
.hero .logo-tiles span { width: 44px; height: 44px; font-size: 23px; border-radius: 13px; }
.profilechip { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px 14px; }
.profilechip:active { transform: scale(.985); }
.profilechip .av { width: 54px; height: 58px; flex: none; }
.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pc-name { font-weight: 900; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-sub { font-size: 12px; font-weight: 800; color: var(--mute); }
.chev { font-size: 26px; color: var(--mute); font-weight: 900; }
.goalspeek { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px; }
.gp-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; } .gp-head span { color: var(--mute); font-weight: 900; }
.gp-rows { display: flex; flex-direction: column; gap: 6px; }
.gp-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; color: var(--mute); }
.gp-row.done { color: var(--ok); } .gp-p { flex: none; }
.playcard .btn.big { margin-top: 4px; }
#tabbar { display: flex; flex: none; gap: 2px; margin: 0 -16px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent); border-top: 1px solid var(--line); }
#tabbar[hidden] { display: none; }
#tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; font: inherit; border: 0; background: none; color: var(--mute); cursor: pointer; border-radius: 14px; }
#tabbar button .tl { font-size: 11px; font-weight: 900; }
#tabbar button.on { color: var(--me); }
#tabbar button:active { transform: scale(.92); }
.dotbadge { position: absolute; top: 4px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--me); border: 2px solid var(--card); }
.tabhead { padding: 4px 2px 0; } .tabhead h2 { font-size: 28px; } .tabhead p { margin-top: 2px; }
.stage { text-align: center; padding: 16px 16px 14px; }
.stage-av { width: 150px; height: 158px; margin: 4px auto 8px; } .stage-name { font-weight: 900; font-size: 20px; margin-bottom: 10px; }
.stage .btnrow { justify-content: center; } .stage .btnrow .btn { flex: 0 0 auto; }
.cattabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cattabs::-webkit-scrollbar { display: none; }
.cattabs button { flex: none; font: inherit; font-weight: 900; font-size: 14px; padding: 9px 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); color: var(--mute); cursor: pointer; }
.cattabs button.on { background: var(--me); border-color: var(--me-d); color: #fff; }
.cgrid .item { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 8px 4px 6px; aspect-ratio: auto; gap: 4px; }
.cgrid .item .iv { display: block; width: 100%; height: 74px; } .cgrid .item .in { font-size: 11px; font-weight: 800; color: var(--mute); line-height: 1.1; text-align: center; }
.cgrid .item[aria-checked=true] .in { color: var(--ink); }
.cgrid .item:active, .themecard:active, .cgrid.cols button:active { transform: scale(.94); }
.cgrid.mini { grid-template-columns: repeat(6, 1fr); gap: 6px; } .cgrid.mini button { aspect-ratio: 1; padding: 4px 2px; border-radius: 12px; } .cgrid.mini .iv { display: block; width: 100%; height: 100%; }
.themegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.themecard { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: var(--ink); }
.themecard[aria-checked=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.themecard .tp { display: block; width: 100%; height: 54px; border-radius: 10px; } .themecard .tn { font-size: 12px; font-weight: 900; }
.goal { display: flex; align-items: center; gap: 12px; padding: 14px; }
.g-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; } .g-main b { font-size: 15px; }
.g-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.xpchip { font-size: 12px; font-weight: 900; color: var(--gold-d); background: color-mix(in srgb, var(--gold) 20%, var(--card)); padding: 3px 9px; border-radius: 99px; }
.goal.ready { border-color: var(--gold-d); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 45%, transparent), var(--shadow); }
.goal.claimed { opacity: .6; } .tick { color: var(--ok); display: grid; place-items: center; height: 32px; }
.goal.bonus { border-style: dashed; }
.bar.big { height: 14px; margin: 10px 0 4px; }
.mehero { text-align: center; position: relative; padding: 20px 16px 18px; }
.gearbtn { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; }
.me-av { width: 132px; height: 140px; margin: 0 auto 6px; } .mehero h2 { font-size: 26px; }
.crownrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--mute); }
.crownrow.on { color: var(--gold-d); } .crownrow .crown { margin: 0; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.statgrid .stat { text-align: center; background: var(--card); border: 1px solid var(--line); padding: 10px 6px; }
.statgrid .stat b { font-size: 20px; }
.switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; padding: 0; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.switch[aria-checked=true] { background: var(--ok); } .switch[aria-checked=true] i { transform: translateX(22px); }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 800; }
.nameedit { gap: 8px; } .nameedit .field { flex: 1; } .nameedit .btn { flex: 0 0 auto; }
.danger-btn { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); width: 100%; margin-top: 6px; }
.danger .btnrow .danger-btn { margin-top: 0; }
.changelog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.changelog li { display: flex; gap: 12px; font-size: 14px; line-height: 1.35; } .changelog b { flex: none; width: 38px; color: var(--me); } .changelog span { color: var(--mute); font-weight: 700; }
.sheet { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.sheet .lbl { margin-top: 16px; }
.overlay { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.overlay[hidden] { display: none; }
.welcome-card, .cel-card { width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 14px; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.wdots { display: flex; justify-content: center; gap: 6px; } .wdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .wdots i.on { background: var(--me); width: 22px; border-radius: 99px; }
.w-prev { width: 150px; height: 158px; margin: 0 auto; }
.how3 { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.h3c { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; } .h3c span { color: var(--mute); font-weight: 700; font-size: 14px; }
.cel-badge { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 56px; font-weight: 900; color: #3b2a00; background: radial-gradient(circle at 30% 25%, #ffe38a, var(--gold)); box-shadow: 0 8px 0 var(--gold-d), 0 0 60px rgba(255, 196, 61, .5); }
.cel-card h2 { font-size: 34px; }
.r-av { width: 96px; height: 102px; margin: 0 auto 4px; } .r-av[hidden] { display: none; }
.lvlprog { margin-top: 14px; text-align: left; } .lp-top { display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; margin-bottom: 6px; } .lp-top span { color: var(--mute); }
#offline { position: fixed; top: 0; left: 0; right: 0; z-index: 80; background: var(--bad); color: #fff; text-align: center; font-weight: 800; font-size: 13px; padding: calc(6px + env(safe-area-inset-top)) 10px 6px; }
#offline[hidden] { display: none; }
.how a, .build a { color: var(--me); font-weight: 800; }
.build { font-size: 12px; opacity: .7; }
a.skip { position: absolute; left: -999px; }
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (max-width: 400px) { .cgrid { gap: 8px; } .cgrid .item .iv { height: 64px; } .stage-av { width: 126px; height: 134px; } }
@media (max-height: 640px) { .stage-av { width: 100px; height: 106px; } }
body.kb #tabbar { display: none; }

.recap li.empty { justify-content: center; color: var(--mute); font-weight: 700; background: none; }
.playcard .status:empty { display: none; }
.cattabs { mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }

/* ================= v14: modes, twists, power-ups ================= */
.evrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.evrow[hidden] { display: none; }
.evchip { font-size: 13px; font-weight: 900; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); }
.evchip.twist { color: #a78bfa; border-color: color-mix(in srgb, #8b5cf6 55%, var(--line)); }
.evchip.golden { color: var(--gold-d); border-color: var(--gold-d); background: color-mix(in srgb, var(--gold) 16%, var(--card)); }
.evchip.lightning { color: #38bdf8; border-color: color-mix(in srgb, #38bdf8 55%, var(--line)); }
#gosign.gold { color: #ffd23f; -webkit-text-stroke-color: #b8891a; text-shadow: 0 8px 0 #b8891a, 0 0 40px rgba(255, 196, 61, .8); }
.pubar { display: flex; justify-content: center; gap: 10px; }
.pubar .btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; }
.pubar .btn .n { font-size: 12px; background: var(--bg2); border-radius: 99px; padding: 1px 8px; min-width: 22px; text-align: center; }
.hint.clue { border-color: var(--me); background: color-mix(in srgb, var(--me) 14%, var(--card)); }
.hint.clue code { color: var(--ink); }
#dock.frozen .field.guess { border-color: #38bdf8; background: color-mix(in srgb, #38bdf8 14%, var(--bg)); box-shadow: 0 0 0 4px rgba(56, 189, 248, .25); }
#dock.frozen .field.guess::placeholder { color: #38bdf8; opacity: 1; }
.rules-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rule .lbl { margin-top: 10px; }
.seg { grid-template-columns: repeat(var(--n, 4), 1fr); margin-bottom: 8px; }
.seg button:disabled { opacity: .75; cursor: default; }
.seg button.on:disabled { opacity: 1; }
.switch:disabled { opacity: .75; cursor: default; }
.awards { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.award { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.award .mini { width: 26px; height: 28px; flex: none; } .award .al { color: var(--mute); font-weight: 800; flex: 1; text-align: left; } .award b { font-size: 14px; }

/* keep the round's twist/event visible while the keyboard is up */
body.kb #diff.evrow:not([hidden]) { display: flex !important; }
body.kb .evchip { padding: 3px 10px; font-size: 12px; }
.vplayer { gap: 12px; }

/* ================= v15: stats ================= */
.formcard { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px; }
.fdots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 14px; }
.fd { width: 14px; height: 14px; border-radius: 50%; display: inline-block; background: var(--line); }
.fd.w { background: var(--ok); } .fd.l { background: var(--bad); opacity: .85; } .fd.t { background: var(--mute); opacity: .6; }
.scard { display: flex; flex-direction: column; gap: 10px; } .scard .lbl { margin: 0; }
.scard .statgrid { margin: 0; } .statgrid.two { grid-template-columns: repeat(2, 1fr); }
.stylecard { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--me) 18%, var(--card)), var(--card)); }
.stylecard b { font-size: 26px; letter-spacing: -.02em; }
.bignum { display: flex; align-items: baseline; gap: 10px; } .bignum b { font-size: 38px; letter-spacing: -.02em; }
.spark { position: relative; height: 54px; background: var(--bg); border-radius: 12px; padding: 4px 8px; }
.spark svg { width: 100%; height: 100%; display: block; }
.spark i { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; }
.spark .sp-best { border: 2px solid var(--ok); background: var(--card); } .spark .sp-last { background: var(--me); }
.trend { margin: 0; font-weight: 800; font-size: 13px; } .trend.up { color: var(--ok); } .trend.down { color: var(--gold-d); }
.sbar { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sbar .sl { flex: none; width: 74px; font-weight: 900; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar .sb { flex: 1; height: 10px; border-radius: 99px; background: var(--bg2); overflow: hidden; } .sbar .sb i { display: block; height: 100%; background: linear-gradient(90deg, var(--me), color-mix(in srgb, var(--me) 55%, var(--gold))); border-radius: 99px; }
.sbar .sv { flex: none; font-size: 12px; color: var(--mute); min-width: 52px; text-align: right; font-weight: 800; }
.rival { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); } .rival:first-of-type { border-top: 0; padding-top: 0; }
.rv-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; } .rv-top span { color: var(--mute); font-weight: 800; font-size: 12px; }
.mestats { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; font-weight: 800; color: var(--mute); } .mestats b { color: var(--ink); font-size: 15px; }
.goalspeek, .goal { display: none; }

.sbar .sl { width: 96px; }

/* ================= v16: persistence / transfer ================= */
.modal { z-index: 95; }
.linkbtn { background: none; border: 0; color: var(--me); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; padding: 6px; }
.xcode { font-size: clamp(26px, 8vw, 34px); font-weight: 900; letter-spacing: .12em; text-align: center; padding: 18px 8px; margin: 12px 0 6px; background: var(--bg); border: 2px dashed var(--line); border-radius: 16px; color: var(--me); user-select: all; -webkit-user-select: all; }

/* ================= v17: stats visualisations ================= */
.filterbar { position: sticky; top: 0; z-index: 4; margin: 0 -2px; padding: 6px 2px 8px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.filterbar .cattabs { padding-bottom: 0; }
.vsep { flex: none; width: 1px; background: var(--line); margin: 4px 4px; }
.cattabs.inline { padding: 0 0 4px; }
.sh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sh b { font-size: 18px; letter-spacing: -.01em; } .sh small { font-size: 12px; font-weight: 700; text-align: right; }
.chart { width: 100%; } .chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart.donut { width: 116px; flex: none; }
.ov { display: flex; align-items: center; gap: 14px; } .ov-k { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov-k .stat { padding: 8px 4px; } .ov-k .stat b { font-size: 19px; }
.chart-empty { padding: 18px 12px; text-align: center; color: var(--mute); font-weight: 700; font-size: 13px; border: 1.5px dashed var(--line); border-radius: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 800; color: var(--mute); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fdots.long { gap: 4px; } .fdots.long .fd { width: 9px; height: 9px; }
.statgrid.four { grid-template-columns: repeat(4, 1fr); gap: 6px; } .statgrid.four .stat { padding: 8px 2px; font-size: 10.5px; } .statgrid.four .stat b { font-size: 16px; }
.alpha { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.at { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; color: var(--ink); cursor: pointer; padding: 0; line-height: 1.15; }
.at b { font-size: 15px; } .at small { font-size: 9px; font-weight: 800; opacity: .9; }
.at.none { background: var(--bg2); color: var(--mute); } .at.sel { border-color: var(--ink); } .at:active { transform: scale(.92); }
.detail { display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 14px; padding: 12px; font-size: 13px; font-weight: 700; } .detail b { font-size: 14px; } .detail .ex { color: var(--ink); }
.cloud { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; line-height: 1.1; font-weight: 900; }
.rec { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); } .rec:first-of-type { border-top: 0; }
.rec .ra { color: var(--mute); font-weight: 800; font-size: 13px; } .rec small { grid-column: 1 / -1; }
.chart.wmap { max-width: 440px; margin: 0 auto; cursor: pointer; }
.chart.mini { margin-top: -2px; }

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

/* ================= v19 ================= */
.rlinks { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.chipbtn { font: inherit; font-weight: 800; font-size: 14px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.chipbtn:active { transform: scale(.95); }
.wl .chips { margin-bottom: 4px; }

/* ================= v19: account ================= */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font: inherit; font-weight: 800; font-size: 16px; color: #1f1f1f; background: #fff; border: 1px solid #dadce0; border-radius: 14px; padding: 13px 16px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.gbtn .gl { display: grid; place-items: center; width: 20px; height: 20px; } .gbtn:active { transform: scale(.98); }
.acct { display: flex; flex-direction: column; gap: 10px; }
.acct-top { display: flex; gap: 12px; align-items: center; }
.acct-pic { width: 52px; height: 52px; border-radius: 50%; flex: none; object-fit: cover; border: 2px solid var(--line); }
.acct-pic.ph { display: grid; place-items: center; background: var(--me); color: #fff; font-weight: 900; font-size: 22px; }
.acct-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .acct-b b, .acct-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syncpill { align-self: flex-start; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 99px; background: var(--bg2); color: var(--mute); }
.syncpill.ok { color: var(--ok); } .syncpill.error, .syncpill.needs-auth { color: var(--bad); } .syncpill.behind { color: var(--gold-d); }
.syncprompt { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; } .syncprompt .sp-t { display: flex; flex-direction: column; gap: 2px; padding-right: 30px; }
.syncprompt.warn { border-color: var(--gold-d); } .xbtn { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; font-size: 14px; box-shadow: none; }
.linkbtn.danger { color: var(--bad); align-self: center; } .err { color: var(--bad); }
.welcome-card .or { margin: 4px 0; }

.about { padding: 4px 4px 0; } .about h2 { font-size: 16px; margin-bottom: 6px; } .about p { color: var(--mute); font-weight: 700; font-size: 14px; line-height: 1.55; margin: 0 0 8px; }

.how3 .h3c { padding: 14px; }
.build a { text-decoration: none; }

.rankline { margin: 12px 2px 16px; } .rankline .lp-top b { font-size: 15px; } #btn-quick + .rankline + #home-actions { border-top: 2px dashed var(--line); padding-top: 14px; }
.conn .btn { margin-top: 18px; }
.streakline { margin: -8px 2px 14px; font-size: 13px; font-weight: 800; color: var(--mute); display: flex; align-items: center; gap: 6px; } .streakline:empty { display: none; } .streakline svg { width: 18px; height: 18px; } .streakline.risk { color: var(--gold-d); }

/* rank frames: a glow that follows the avatar's outline, by tier */
[data-tier] > svg, [data-frame] > svg { overflow: visible; }
[data-tier="0"] > svg { filter: drop-shadow(0 0 1.5px #cd7f32) drop-shadow(0 0 3px #cd7f3299); }
[data-tier="1"] > svg { filter: drop-shadow(0 0 1.5px #d4dbe6) drop-shadow(0 0 4px #c0c8d4aa); }
[data-tier="2"] > svg { filter: drop-shadow(0 0 1.5px #ffd23f) drop-shadow(0 0 5px #ffd23fbb); }
[data-tier="3"] > svg { filter: drop-shadow(0 0 1.5px #7de3d9) drop-shadow(0 0 6px #7de3d9cc); }
[data-tier="4"] > svg { filter: drop-shadow(0 0 1.5px #8fd0ff) drop-shadow(0 0 7px #62b4ffdd); }
[data-tier="5"] > svg { animation: masterGlow 3.2s linear infinite; }
@keyframes masterGlow { 0% { filter: drop-shadow(0 0 2px #c77dff) drop-shadow(0 0 8px #c77dffdd); } 33% { filter: drop-shadow(0 0 2px #ff7eb6) drop-shadow(0 0 8px #ff7eb6dd); } 66% { filter: drop-shadow(0 0 2px #ffd23f) drop-shadow(0 0 8px #ffd23fdd); } 100% { filter: drop-shadow(0 0 2px #c77dff) drop-shadow(0 0 8px #c77dffdd); } }
body.calm [data-tier="5"] > svg { animation: none; filter: drop-shadow(0 0 2px #c77dff) drop-shadow(0 0 7px #c77dffcc); }
.records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; } .records .recbox { background: var(--bg2); border-radius: 14px; padding: 10px 12px; } .records .recbox { min-width: 0; text-align: left; } .records .recbox b { display: block; font-size: 16px; letter-spacing: -.01em; overflow-wrap: anywhere; } .records .recbox span { display: block; margin-top: 2px; } .records .recbox span { font-size: 11px; font-weight: 800; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.sigword { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg2); border-radius: 14px; padding: 10px 12px; margin: 10px 0; text-align: left; } .sigword b { font-size: 20px; letter-spacing: .08em; text-transform: uppercase; } .sigword small { display: block; color: var(--mute); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.wordpick { display: flex; flex-wrap: wrap; gap: 8px; } .wordpick button { font: inherit; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); } .wordpick button.on { border-color: var(--gold-d); background: color-mix(in srgb, var(--gold) 25%, var(--card)); }

/* earning: rarity, banners, titles, emblems, locks */
.r-rare { --rc: #4aa3ff; } .r-epic { --rc: #b86bff; } .r-legendary { --rc: #ffd23f; }
.cgrid .item.r-rare, .cgrid .item.r-epic, .cgrid .item.r-legendary, .bancard.r-rare, .bancard.r-epic, .bancard.r-legendary, .titlepill.r-rare, .titlepill.r-epic, .titlepill.r-legendary { border-color: color-mix(in srgb, var(--rc) 70%, var(--line)); }
.cgrid .item.r-legendary, .bancard.r-legendary, .titlepill.r-legendary { box-shadow: 0 0 14px -4px var(--rc); }
.cgrid button[aria-checked=true].r-rare, .cgrid button[aria-checked=true].r-epic, .cgrid button[aria-checked=true].r-legendary { border-color: var(--ink); }
.newpill { position: absolute; top: 5px; left: 5px; font-style: normal; font-size: 9px; font-weight: 900; letter-spacing: .06em; padding: 2px 6px; border-radius: 99px; background: var(--me); color: #fff; z-index: 2; }
.cattabs button.hasnew::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--gold); vertical-align: 2px; }
.nope { animation: nope .35s; } @keyframes nope { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.collection { margin: 2px 2px 12px; } .collection span { display: block; font-size: 12px; font-weight: 900; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.stage { position: relative; overflow: hidden; } .stage-banner { position: absolute; inset: 0 0 auto 0; height: 76px; opacity: .9; } .stage-av, .stage-name, .stage-title { position: relative; } .stage-av { margin-top: 18px; }
.stage-title, .metitle { margin: -6px 0 10px; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.mebanner { height: 78px; margin: -20px -16px 0; border-radius: 22px 22px 0 0; opacity: .92; } .mehero .me-av { position: relative; margin-top: -46px; } .metitle { margin: 2px 0 4px; }
.emb { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--gold); } .emb svg { width: 16px; height: 16px; } .emb.r-rare { color: #4aa3ff; } .emb.r-epic { color: #b86bff; } .emb.r-legendary { color: #ffd23f; }
.embv { display: grid !important; place-items: center; color: var(--rc, var(--gold)); } .embv svg { width: 40px; height: 40px; }
.cgrid .item .how, .bancard .how, .titlepill .how { font-size: 10px; font-weight: 800; color: var(--mute); }
.bangrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.bancard { position: relative; display: flex; flex-direction: column; gap: 5px; text-align: left; font: inherit; color: var(--ink); padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.bancard[aria-checked=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); } .bancard .bsw { display: block; height: 38px; border-radius: 10px; } .bancard .in { font-weight: 900; font-size: 13px; }
.bancard.locked, .titlepill.locked { opacity: .5; filter: grayscale(.8); }
.titlegrid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.titlepill { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font: inherit; color: var(--ink); padding: 11px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.titlepill[aria-checked=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); } .titlepill .tn { font-weight: 900; letter-spacing: .02em; } .titlepill .newpill { position: static; }
.nextline { margin: 6px 0 0; font-size: 12.5px; font-weight: 800; color: var(--mute); } .mehero .btn.primary { margin-top: 10px; }
.oppcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 28px 20px; border-radius: 24px; min-width: 250px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); box-shadow: 0 14px 40px -10px rgba(0,0,0,.5); animation: oppIn .5s cubic-bezier(.2,1.3,.4,1); }
.oppcard .oc-av { width: 110px; height: 116px; } .oppcard .oc-name { font-size: 22px; } .oppcard .oc-title { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; opacity: .9; } .oppcard .oc-meta { font-size: 14px; font-weight: 800; } .oppcard .oc-rival { margin-top: 6px; font-size: 12px; font-weight: 900; background: rgba(0,0,0,.3); padding: 3px 10px; border-radius: 99px; }
@keyframes oppIn { from { transform: scale(.8) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* where you stand */
.standhead { text-align: center; margin: 2px 0 6px; } .bigpct b { display: block; font-size: 54px; line-height: 1; letter-spacing: -.03em; background: linear-gradient(90deg, var(--me), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bigpct span { font-size: 13px; font-weight: 800; color: var(--mute); } .standsub { margin-top: 4px; font-weight: 900; font-size: 14px; }
.chart.bell { margin: 6px 0 4px; } .chart.bell svg { width: 100%; height: auto; }
.sh.sub { margin-top: 16px; display: flex; justify-content: space-between; align-items: baseline; } .sh.sub .up { color: var(--ok); font-weight: 900; font-size: 13px; } .sh.sub .down { color: var(--bad); font-weight: 900; font-size: 13px; }
.skillrow { margin: 10px 0 4px; } .sk-top { display: flex; justify-content: space-between; font-size: 14px; } .sk-top span { color: var(--mute); font-weight: 800; font-size: 12.5px; }
.sk-bar { position: relative; height: 12px; border-radius: 99px; background: var(--bg2); margin: 6px 0 3px; } .sk-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--me), var(--gold)); } .sk-bar u { position: absolute; top: -3px; width: 4px; height: 18px; margin-left: -2px; border-radius: 3px; background: var(--ink); }
.skillrow small { font-size: 11px; font-weight: 800; color: var(--mute); }
.pctnote, .pctline { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--mute); } .pctline { margin-top: 2px; color: var(--ink); }

/* companions, held props, frames, name styles, debrief */
.avx { position: relative; } .avx .pet, .avx .prop { position: absolute; display: block; pointer-events: none; } .avx .pet { right: -18%; bottom: -6%; width: 42%; height: 42%; animation: petbob 2.6s ease-in-out infinite; } .avx .prop { left: -20%; bottom: -4%; width: 44%; height: 44%; transform: rotate(-8deg); }
.avx .pet svg, .avx .prop svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)) !important; animation: none !important; } @keyframes petbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } } body.calm .avx .pet { animation: none; }
[data-frame="neon"] > svg { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #22d3ee) drop-shadow(0 0 12px #22d3ee); }
[data-frame="sparkle"] > svg { animation: frSparkle 1.8s ease-in-out infinite; } @keyframes frSparkle { 0%, 100% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #ffe27a); } 50% { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 11px #fff6c2); } }
[data-frame="goldtrim"] > svg { filter: drop-shadow(1.6px 0 0 #ffd23f) drop-shadow(-1.6px 0 0 #ffd23f) drop-shadow(0 1.6px 0 #ffd23f) drop-shadow(0 -1.6px 0 #ffd23f); }
[data-frame="frost"] > svg { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px #8fd0ff); }
[data-frame="ember"] > svg { animation: frEmber 1.4s ease-in-out infinite; } @keyframes frEmber { 0%, 100% { filter: drop-shadow(0 0 3px #ff7a3d) drop-shadow(0 -3px 8px #ff3d00); } 50% { filter: drop-shadow(0 0 4px #ffb300) drop-shadow(0 -5px 10px #ff7a3d); } }
[data-frame="heartbeat"] > svg { animation: frBeat 1.1s ease-in-out infinite; transform-origin: 50% 60%; } @keyframes frBeat { 0%, 100% { filter: drop-shadow(0 0 2px #ff5f6d) drop-shadow(0 0 4px #ff5f6d); transform: scale(1); } 20% { filter: drop-shadow(0 0 3px #ff5f6d) drop-shadow(0 0 12px #ff5f6d); transform: scale(1.03); } }
[data-frame="rainbow"] > svg { animation: frRainbow 4s linear infinite; } @keyframes frRainbow { from { filter: drop-shadow(0 0 3px #ff5f6d) drop-shadow(0 0 9px #ff5f6d) hue-rotate(0deg); } to { filter: drop-shadow(0 0 3px #ff5f6d) drop-shadow(0 0 9px #ff5f6d) hue-rotate(360deg); } }
[data-frame="shadow"] > svg { filter: drop-shadow(0 4px 0 rgba(0,0,0,.45)) drop-shadow(0 0 2px #000); }
body.calm [data-frame] > svg { animation: none; }
.nm { display: inline; } .nfx { font-weight: 900; } .nfx-glow { text-shadow: 0 0 9px currentColor; } .nfx-ink { -webkit-text-stroke: 1px currentColor; color: transparent !important; }
.nfx-gold, .nfx-ice, .nfx-rose, .nfx-mint, .nfx-fire, .nfx-rainbow { color: transparent !important; -webkit-background-clip: text; background-clip: text; }
.nfx-gold { background-image: linear-gradient(90deg, #ffd23f, #fff2a8, #ffb300); } .nfx-ice { background-image: linear-gradient(90deg, #8fd0ff, #eaf8ff, #62b4ff); } .nfx-rose { background-image: linear-gradient(90deg, #ff8fc7, #ffd1e8, #ff5fa2); }
.nfx-mint { background-image: linear-gradient(90deg, #5eead4, #d1fff5, #22c55e); } .nfx-fire { background-image: linear-gradient(90deg, #ffd23f, #ff7a3d, #ff3d00); }
.nfx-rainbow { background-image: linear-gradient(90deg, #ff5f6d, #ffd23f, #22c55e, #3b82f6, #c77dff, #ff5f6d); background-size: 200% 100%; animation: nfxflow 3s linear infinite; } @keyframes nfxflow { to { background-position: 200% 0; } } body.calm .nfx-rainbow { animation: none; }
.debrief { text-align: left; margin-top: 12px; } .dbrow { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; padding: 5px 2px; border-bottom: 1px solid var(--line); opacity: 0; animation: dbIn .25s forwards; } @keyframes dbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dbrow b { color: var(--gold); font-variant-numeric: tabular-nums; } .dbtotal { display: flex; justify-content: space-between; align-items: baseline; font-weight: 900; font-size: 22px; margin: 10px 2px 10px; } .dbtotal b { font-variant-numeric: tabular-nums; color: var(--gold); }
.dblevel { display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; margin-bottom: 6px; } .dblevel span:last-child { color: var(--mute); }
.dbbar { height: 16px; border-radius: 99px; background: var(--bg2); overflow: hidden; } .dbbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ff9f43); transition: width .95s cubic-bezier(.2,.7,.2,1); } .dbbar.flash { animation: barflash .55s; } @keyframes barflash { 50% { filter: brightness(2) saturate(1.4); box-shadow: 0 0 20px var(--gold); } }
.lvslam { position: fixed; left: 50%; top: 32%; z-index: 80; font-size: 54px; font-weight: 900; letter-spacing: -.02em; color: #fff; text-align: center; text-shadow: 0 4px 0 #b8891a, 0 0 34px var(--gold); pointer-events: none; opacity: 0; animation: lvslam 1.4s cubic-bezier(.2,1.4,.4,1) forwards; } .lvslam small { display: block; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); text-shadow: none; }
@keyframes lvslam { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 16% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); } 28% { transform: translate(-50%, -50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -64%); } }
.unlocks { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: none; } .unlocks:empty { display: none; }
.ucard { flex: none; width: 96px; padding: 8px 6px 7px; border-radius: 14px; border: 2px solid var(--rc, var(--line)); background: var(--card); text-align: center; font: inherit; color: var(--ink); cursor: pointer; box-shadow: 0 0 16px -6px var(--rc, transparent); animation: ucardIn .5s cubic-bezier(.2,1.4,.4,1) both; }
.ucard .ut { height: 58px; display: grid; place-items: center; } .ucard .ut svg { max-width: 100%; max-height: 58px; } .ucard .ut .bsw { width: 100%; height: 34px; border-radius: 8px; } .ucard b { display: block; font-size: 12px; margin-top: 2px; } .ucard small { font-size: 9.5px; font-weight: 900; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
@keyframes ucardIn { from { transform: scale(.55) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.rankslam .rs-badge { width: 130px; height: 130px; margin: 0 auto 6px; color: var(--tc); filter: drop-shadow(0 0 22px var(--tc)); animation: rsIn .7s cubic-bezier(.2,1.5,.4,1) both; } .rankslam .rs-badge svg { width: 100%; height: 100%; } @keyframes rsIn { from { transform: scale(2.4) rotate(-14deg); opacity: 0; } to { transform: none; opacity: 1; } }
.groups { display: flex; gap: 6px; margin: 0 0 8px; } .groups button { flex: 1; font: inherit; font-weight: 900; font-size: 13px; padding: 9px 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--mute); cursor: pointer; } .groups button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pinsbar { display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; font-size: 12px; font-weight: 900; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; } .pinsbar .emb { width: 30px; height: 30px; display: inline-grid; place-items: center; margin: 0; border-radius: 10px; background: var(--bg2); } .pinsbar .emb svg { width: 20px; height: 20px; }
.letterboard { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; } .letterboard button { position: relative; font: inherit; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); padding: 8px 2px 5px; cursor: pointer; text-align: center; } .letterboard button[aria-checked=true] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); } .letterboard button.locked { opacity: .45; filter: grayscale(.9); } .letterboard svg { width: 28px; height: 28px; display: block; margin: 0 auto 2px; } .letterboard small { font-size: 9.5px; font-weight: 800; color: var(--mute); }
.thumb { display: grid; place-items: center; height: 70px; } .thumb svg { max-width: 62px; max-height: 62px; } .thumb .pillname { font-weight: 900; font-size: 15px; } .thumb .bsw { width: 100%; height: 40px; border-radius: 10px; } .thumb .avx, .thumb .tav { width: 56px; height: 60px; }
.cgrid.big { grid-template-columns: repeat(3, 1fr); } .cgrid.big .item .iv { height: 70px; } .cgrid.big .item .iv svg { height: 100%; width: 100%; }

.thumb .pinthumb, .pinthumb svg { color: var(--rc, var(--gold)); } .pinthumb svg { width: 40px; height: 40px; } .thumb.pinthumb { color: var(--rc, var(--gold)); }
.mrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .mrow:last-child { border-bottom: 0; } .mthumb { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--bg2); border: 2px solid color-mix(in srgb, var(--rc, var(--line)) 70%, var(--line)); } .mthumb .thumb { height: 46px; } .mthumb .thumb svg { max-width: 40px; max-height: 40px; } .mthumb .thumb .bsw { height: 24px; } .mthumb .pillname { font-size: 10px; }
.mbody { flex: 1; min-width: 0; text-align: left; } .mtop { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; } .mtop span { color: var(--mute); font-weight: 800; font-size: 12.5px; } .mbody small { display: block; color: var(--mute); font-weight: 700; font-size: 12px; margin: 1px 0 6px; } .mbar { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; } .mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--me), var(--gold)); border-radius: 99px; } .mrow.done .mbar i { background: var(--ok); } .mrow.done .mtop span { color: var(--ok); }

.item .how, .bancard .how, .titlepill .how { display: block; border: 0 !important; background: none !important; box-shadow: none !important; position: static !important; padding: 0 2px; font-size: 10px; line-height: 1.15; text-align: center; font-weight: 800; color: var(--mute); }


.thumb svg { width: 60px; height: 60px; max-width: none; max-height: none; } .thumb.pinthumb svg { width: 40px; height: 40px; } .ucard .ut .thumb { height: 58px; } .ucard .ut .thumb svg { width: 52px; height: 52px; }


/* round events and cards */
.evchip.boss { background: linear-gradient(90deg, #7a1f1f, #c0392b); color: #fff; border-color: #ff7a6b; } .evchip.steal { background: color-mix(in srgb, #3b82f6 28%, var(--card)); border-color: #3b82f6; }
.stealbar { position: relative; margin: 8px 0 2px; padding: 10px 12px 14px; border-radius: 14px; background: color-mix(in srgb, #3b82f6 22%, var(--card)); border: 2px solid #3b82f6; font-size: 13.5px; text-align: center; overflow: hidden; } .stealbar i { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #3b82f6; transform-origin: 0 50%; }
.pubar { flex-wrap: wrap; justify-content: center; } .pubar .btn .n { margin-left: 6px; }
.draft { text-align: left; } .draft .cards { display: grid; gap: 8px; } .card3 { text-align: left; font: inherit; color: var(--ink); padding: 11px 13px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); cursor: pointer; animation: ucardIn .45s cubic-bezier(.2,1.4,.4,1) both; } .card3:active { transform: scale(.98); } .card3 b { display: block; font-size: 15px; } .card3 small { color: var(--mute); font-weight: 700; font-size: 12.5px; }

/* gauntlet */
.runhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .runhead h2 { margin: 0; } .runhead small { color: var(--mute); font-weight: 800; font-size: 13px; }
.hearts { display: flex; gap: 4px; } .hearts svg { width: 26px; height: 26px; }
.relics { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .relic { padding: 7px 11px; border-radius: 12px; background: var(--bg2); border: 2px solid var(--line); } .relic b { display: block; font-size: 12.5px; } .relic small { display: none; }
#s-run .oppcard { min-width: 0; margin-bottom: 14px; } #s-run .linkbtn { display: block; margin: 12px auto 0; } #s-run .cards { display: grid; gap: 8px; }

/* readable and reachable: filled controls keep contrast on any chosen colour, and touch targets reach 44px */
.btn.primary, .seg button.on, .kbd button.sel, .cattabs button.on, .newpill { background: var(--me-fill, var(--me)); }
.btn.small { min-height: 44px; } .iconbtn { min-width: 44px; min-height: 44px; } #reactbar button { width: 44px !important; height: 44px !important; }
#foot .txtbtn, .build a { display: inline-block; padding: 12px 6px; }

/* toasts sit above the controls, never over the scoreboard or the result */
#toasts { top: auto; bottom: calc(158px + env(safe-area-inset-bottom)); flex-direction: column-reverse; }
#btn-run small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--mute); line-height: 1.2; }

/* a quiet, themed scrollbar instead of the browser default (touch devices already use overlay scrollbars) */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 24%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 22%, transparent); border: 3px solid transparent; background-clip: content-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--ink) 42%, transparent); background-clip: content-box; }
/* the main column scrolls without a bar, like a phone app; sheets and long lists keep the thin one above */
main, #app { scrollbar-width: none; }
main::-webkit-scrollbar, #app::-webkit-scrollbar { display: none; }

/* the tab bar spans the full width: it must undo exactly the app's side padding (12px on narrow phones) */
@media (max-width: 400px) { #tabbar { margin: 0 -12px; } }

/* party */
.party { gap: 10px; } .phead { display: flex; justify-content: space-between; align-items: baseline; } .phead b { font-size: 20px; } .phead small { color: var(--mute); font-weight: 800; }
.pstrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; } .pstrip::-webkit-scrollbar { display: none; }
.pchip { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; font: inherit; color: var(--ink); border-radius: 14px; border: 2px solid var(--line); background: var(--card); position: relative; cursor: default; }
.pchip.you { border-color: var(--me); } .pchip.out { opacity: .35; filter: grayscale(1); } .pchip.done { border-color: var(--ok); } .pchip.locked { border-color: var(--ok); } .pchip.frozen { border-color: #7de3d9; box-shadow: 0 0 14px #7de3d988; } .pchip.target { border-color: #ff7a6b; animation: pulse 1s infinite; cursor: pointer; }
@keyframes pulse { 50% { transform: scale(1.05); } } .pchip b { font-size: 12px; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pstat { position: absolute; top: 3px; right: 6px; font-style: normal; font-size: 12px; color: var(--ok); }
.pav { width: 40px; height: 42px; } .pav.big { width: 78px; height: 82px; } .pav svg { width: 100%; height: 100%; display: block; }
.phearts { display: flex; gap: 1px; } .phearts svg { width: 13px; height: 13px; }
.pkeys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; } .pkeys button { aspect-ratio: 1; font: inherit; font-weight: 900; font-size: 18px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; } .pkeys button.sel { background: var(--me-fill, var(--me)); color: #fff; border-color: var(--me-d); } .pkeys button:disabled { opacity: .5; }
.phand { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; } .phand .btn .n { margin-left: 6px; }
.pout { text-align: center; font-weight: 800; color: var(--mute); margin: 0; } .pclose { text-align: center; font-weight: 800; color: #ff7a6b; margin: 0; }
.prows { display: flex; flex-direction: column; gap: 6px; } .prow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); animation: ucardIn .4s cubic-bezier(.2,1.4,.4,1) both; } .prow.you { border-color: var(--me); } .prow.first { border-color: var(--gold); box-shadow: 0 0 16px -6px var(--gold); } .prow.lost { background: color-mix(in srgb, #ef4444 14%, var(--card)); }
.prow .pr { width: 22px; font-weight: 900; color: var(--mute); text-align: center; } .pbody { flex: 1; min-width: 0; text-align: left; } .pbody b { display: block; font-size: 14px; } .pbody small { color: var(--mute); font-weight: 800; font-size: 12px; } .pmark { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 13px; color: #ef4444; } .pmark svg { width: 18px; height: 18px; }
.pbest { text-align: center; color: var(--mute); font-weight: 800; font-size: 13px; margin: 2px 0; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 8px 0 12px; } .step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; max-width: 120px; } .step b { font-size: 14px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .step .block { width: 100%; border-radius: 12px 12px 0 0; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 24px; color: var(--mute); } .step.s1 .block { height: 96px; background: linear-gradient(var(--gold), #b8891a); color: #3b2a00; border-color: var(--gold); } .step.s2 .block { height: 66px; } .step.s3 .block { height: 46px; }
.plist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .plp { display: flex; flex-direction: column; align-items: center; gap: 2px; } .plp b { font-size: 12px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .plp small { font-size: 10px; color: var(--mute); font-weight: 800; } .plp.away { opacity: .4; }
.big-code { font-size: 36px; font-weight: 900; letter-spacing: .12em; color: var(--me); margin: 4px 0 10px; }
.party .seg { margin-bottom: 8px; }

/* the swap rule, spelled out, and the connecting line on the opponent card */
.rule .or { font-weight: 700; opacity: .75; } .rule .either { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--mute); letter-spacing: .01em; }
.oc-status { margin-top: 6px; font-size: 12px; font-weight: 800; opacity: .9; animation: ocblink 1.2s ease-in-out infinite; } @keyframes ocblink { 50% { opacity: .45; } }
.optlink { display: block; margin: 8px auto 2px; font-size: 13px; }
/* on a wide screen the bottom bar spans the window and its buttons stay in the column */
@media (min-width: 700px) {
  #tabbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 20; padding: 8px max(16px, calc((100vw - 560px) / 2 + 12px)) calc(8px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); }
  body:has(#tabbar:not([hidden])) main { padding-bottom: 96px; }
}

/* how an item was earned */
.item .how.got, .bancard .how.got, .titlepill .how.got { color: var(--ok); opacity: .95; }
.item .how, .bancard .how { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.iteminfo { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; } .iteminfo .thumb { width: 84px; height: 84px; flex: none; }

.helpbtn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 8px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--bg2); color: var(--mute); font: inherit; font-weight: 900; font-size: 12px; line-height: 1; cursor: pointer; vertical-align: middle; } .helpbtn:hover { color: var(--ink); border-color: var(--mute); }

/* Find a Game with its options gear beside it */
.quickrow { display: flex; gap: 10px; align-items: stretch; } .quickrow #btn-quick { flex: 1; width: auto; }
#btn-opts { flex: none; width: 64px; padding: 0; display: grid; place-items: center; position: relative; } #btn-opts svg { width: 26px; height: 26px; }
#btn-opts .optdot { position: absolute; top: 8px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); }

.bullets { margin: 2px 0 16px; padding-left: 20px; } .bullets li { margin: 5px 0; line-height: 1.4; color: var(--ink); } .bullets li::marker { color: var(--mute); }

.syncprompt .xbtn { top: 6px; right: 6px; width: 36px; height: 36px; min-width: 0; min-height: 0; padding: 0; }
.rulesec { border-top: 1px solid var(--line, rgba(128,128,128,.25)); } .rulesec summary { cursor: pointer; font-weight: 900; padding: 12px 0; list-style-position: inside; }

.dailyhud { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 2px; } .dailyhud b { font-size: 34px; font-variant-numeric: tabular-nums; } .dailyinvite { display: flex; gap: 10px; align-items: center; justify-content: space-between; } .dailyinvite span { flex: 1; font-weight: 800; }
