/* ---------- themes ---------- */
:root, [data-theme="midnight"] {
  --bg: #16122b; --bg2: #221b42; --panel: #2c2454; --panel2: #3a3070; --text: #f4f1ff; --muted: #a49cc8;
  --glow: #3a2a78; --accent: #ff7a3d; --accent-ink: #2a1000; --shadow: #0007;
}
[data-theme="daylight"] {
  --bg: #efe9dc; --bg2: #f7f3ea; --panel: #ffffff; --panel2: #ece4d3; --text: #2a2140; --muted: #7a7090;
  --glow: #fff8e6; --accent: #ff6a2b; --accent-ink: #fff; --shadow: #3a2a1a33;
}
[data-theme="neon"] {
  --bg: #04040c; --bg2: #0b0b1e; --panel: #15152e; --panel2: #22224a; --text: #eafcff; --muted: #8aa0c0;
  --glow: #102a4a; --accent: #00e5ff; --accent-ink: #001318; --shadow: #000b;
}
:root {
  --r: #ff4d5e; --y: #ffc23d; --g: #2ecc8f; --b: #3d8bff;
  --cw: 64px; --ch: 96px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 35%, var(--glow) 0%, var(--bg2) 45%, var(--bg) 100%);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { user-select: text; -webkit-user-select: text; }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 14px) 20px calc(var(--safe-b) + 14px);
}
#home { justify-content: center; gap: 12px; max-width: 440px; margin: 0 auto; }

/* ---------- home ---------- */
.profile-chip {
  position: absolute; top: calc(var(--safe-t) + 12px); right: 14px; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border-radius: 99px; padding: 4px 12px 4px 4px; font-weight: 700; box-shadow: 0 3px 0 var(--shadow);
}
.profile-chip small { color: var(--muted); font-weight: 500; }
.logo { text-align: center; margin-bottom: 10px; }
.logo h1 { margin: 10px 0 2px; font-size: 44px; letter-spacing: -1px; font-weight: 900; }
.logo h1 span { color: var(--accent); margin-left: 4px; }
.tag { margin: 0; color: var(--muted); }
.logo-cards { position: relative; height: 86px; width: 150px; margin: 0 auto; }
.logo-cards i {
  position: absolute; left: 50%; bottom: 0; width: 48px; height: 72px; border-radius: 10px;
  border: 3px solid #fff; transform-origin: 50% 120%; box-shadow: 0 6px 14px #0006;
  animation: fan 0.8s cubic-bezier(.2,1.6,.4,1) both;
}
.logo-cards i:nth-child(1) { --a: -27deg; } .logo-cards i:nth-child(2) { --a: -9deg; animation-delay: .06s; }
.logo-cards i:nth-child(3) { --a: 9deg; animation-delay: .12s; } .logo-cards i:nth-child(4) { --a: 27deg; animation-delay: .18s; }
.logo-cards i { transform: translateX(-50%) rotate(var(--a)); }
@keyframes fan { from { transform: translateX(-50%) rotate(0deg); } }
.r { background: var(--r); } .y { background: var(--y); } .g { background: var(--g); } .b { background: var(--b); }
.home-links { display: flex; justify-content: center; gap: 8px; width: 100%; margin-top: 4px; }
.home-links button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 22px;
  padding: 10px 4px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 60%, transparent);
}
.home-links span { font-size: 12px; color: var(--muted); }

/* ---------- forms & buttons ---------- */
.field { width: 100%; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.field-label { margin: 6px 0 0; color: var(--muted); font-size: 14px; width: 100%; }
input {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--panel);
  border: 2px solid var(--panel2); border-radius: 14px; padding: 13px 15px; outline: none;
}
input:focus { border-color: var(--accent); }
.join-row { display: flex; gap: 10px; width: 100%; }
#code, #restoreKey { text-transform: uppercase; letter-spacing: 4px; text-align: center; font-weight: 800; }
#code { letter-spacing: 6px; }
.btn {
  width: 100%; padding: 14px 18px; border-radius: 14px; font-size: 17px; font-weight: 800;
  background: var(--panel); box-shadow: 0 4px 0 var(--shadow); transition: transform .08s, opacity .2s; text-align: center;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn:disabled { opacity: .45; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); color: var(--accent-ink); }
.btn.ghost { background: transparent; border: 2px solid var(--panel); box-shadow: none; }
.btn.small { padding: 11px 14px; font-size: 15px; }
.btn.danger { background: #8c2a46; color: #fff; }
.btn.warn { background: linear-gradient(180deg, #c77dff, #9b4dff); color: #fff; }
.join-row .btn { width: 110px; flex-shrink: 0; }
.link { color: var(--muted); text-decoration: underline; padding: 8px; }
.hint, .muted { color: var(--muted); font-size: 14px; text-align: center; margin: 0; }
.muted.small { font-size: 12px; }
.back { color: var(--muted); font-size: 16px; padding: 8px 4px; }
.row { display: flex; gap: 10px; width: 100%; }
.col { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, transparent); font-size: 19px; flex-shrink: 0; }
.icon-btn.on { background: var(--g); }
.icon-btn.muted-mic { background: var(--r); }
.badge-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--r); box-shadow: 0 0 0 2px var(--bg); }

/* ---------- lobby ---------- */
#lobby { padding-left: 0; padding-right: 0; }
.lobby-head { width: 100%; max-width: 480px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; }
.lobby-scroll { flex: 1; overflow-y: auto; width: 100%; max-width: 480px; padding: 0 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.room-code { font-size: 60px; font-weight: 900; letter-spacing: 12px; margin: -8px 0 0; color: var(--y); padding-left: 12px; }
.section-title { width: 100%; margin: 12px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.section-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lobby-players { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.lobby-players li { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 14px; padding: 8px 12px; animation: up .25s ease-out; }
.lobby-players li.watch { opacity: .7; }
.lobby-players .kick { margin-left: auto; color: var(--muted); font-size: 22px; padding: 0 8px; }
.badge { font-size: 10px; background: var(--accent); color: var(--accent-ink); padding: 2px 7px; border-radius: 99px; font-weight: 800; letter-spacing: .5px; }
.badge.alt { background: var(--panel2); color: var(--muted); }
.lobby-actions { width: 100%; max-width: 480px; padding: 10px 18px 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 21px;
  flex-shrink: 0; background: var(--panel2); position: relative;
}
.avatar.sm { width: 30px; height: 30px; font-size: 16px; }
.avatar .mic { position: absolute; bottom: -4px; right: -6px; font-size: 11px; background: var(--g); border-radius: 99px; padding: 1px 3px; }

.rules-panel { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.rule { background: var(--panel); border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.rule .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.rule .txt b { font-size: 15px; }
.rule .txt small { color: var(--muted); font-size: 12px; }
.seg { display: flex; background: var(--panel2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 9px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.sel { background: var(--accent); color: var(--accent-ink); }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--panel2); position: relative; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px #0004; }
.switch.on { background: var(--g); }
.switch.on::after { transform: translateX(20px); }
.rules-panel.readonly .seg button:not(.sel), .rules-panel.readonly .switch { pointer-events: none; }
.rules-panel.readonly .seg button:not(.sel) { opacity: .5; }
.rules-panel.compact .rule { padding: 6px 10px; }
.rule-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.rule-tags span { background: var(--panel); padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }

/* ---------- game ---------- */
#game { padding-left: 0; padding-right: 0; padding-bottom: calc(var(--safe-b) + 4px); justify-content: space-between; }
.topbar { width: 100%; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.status { font-weight: 800; font-size: 16px; text-align: center; flex: 1; padding: 0 4px; line-height: 1.15; }
.status small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.status.mine { color: var(--y); }
.status.danger { color: var(--r); }
.spec-banner { margin-top: 6px; background: var(--panel); padding: 6px 12px; border-radius: 99px; font-size: 13px; }

.opponents { width: 100%; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 8px 8px 0; }
.opp {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 5px 5px; border-radius: 14px; background: color-mix(in srgb, var(--text) 6%, transparent); width: 78px;
  border: 2px solid transparent; transition: border-color .2s, transform .2s, background .2s;
}
.opponents.many .opp { width: 64px; padding: 5px 3px 4px; }
.opponents.many .opp .avatar { width: 32px; height: 32px; font-size: 18px; }
.opp.turn { border-color: var(--y); transform: translateY(2px); background: color-mix(in srgb, var(--y) 14%, transparent); }
.opp.next::before { content: "next"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 9px; background: var(--panel2); color: var(--muted); padding: 1px 6px; border-radius: 99px; }
.opp.away { opacity: .45; }
.opp .nm { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp .cnt { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.opp .cnt.low { color: var(--r); font-weight: 900; }
.opp .pts { font-size: 10px; color: var(--y); }
.mini { width: 10px; height: 14px; border-radius: 2px; background: #fff; display: inline-block; border: 2px solid var(--accent); }
.ring { position: relative; border-radius: 50%; padding: 3px; background: conic-gradient(var(--y) calc(var(--p, 0) * 1%), transparent 0); }
.ring.urgent { background: conic-gradient(var(--r) calc(var(--p, 0) * 1%), transparent 0); }
.opp .flag {
  position: absolute; top: -8px; right: -6px; font-size: 10px; font-weight: 900; padding: 3px 7px;
  border-radius: 99px; background: var(--g); color: #082a1b; z-index: 2;
}
.opp .catch { background: var(--r); color: #fff; animation: pulse .6s infinite; font-size: 12px; padding: 6px 10px; top: -12px; right: -10px; }
.bubble {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 15; pointer-events: none;
  background: #fff; color: #1b1433; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 12px;
  white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 12px #0006;
  animation: bubble 3.2s ease forwards;
}
.bubble.emoji { background: none; box-shadow: none; font-size: 34px; padding: 0; }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -6px) scale(.6); } 8% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 14% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .55; } }

.table { position: relative; display: flex; align-items: center; justify-content: center; gap: 34px; flex: 1; width: 100%; min-height: 160px; }
.dir-ring {
  position: absolute; width: 240px; height: 240px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--text) 14%, transparent);
  animation: spin 14s linear infinite; pointer-events: none;
}
.dir-ring::after { content: "➤"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); color: color-mix(in srgb, var(--text) 30%, transparent); font-size: 18px; }
.dir-ring.ccw { animation-direction: reverse; }
.dir-ring.ccw::after { content: "◀"; }
.dir-ring.flip { animation: spin 14s linear infinite, flip .6s ease; }
@keyframes flip { 50% { transform: scale(1.25); border-color: var(--y); } }
@keyframes spin { to { transform: rotate(360deg); } }
.pile-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.discard { position: relative; width: calc(var(--cw) * 1.3); height: calc(var(--ch) * 1.3); border-radius: 16px; transition: box-shadow .3s; }
.discard .card { position: absolute; inset: 0; width: 100%; height: 100%; --s: 1.3; }
.discard .card.land { animation: land .3s ease-out; }
@keyframes land { from { transform: scale(1.15) rotate(var(--rot, 0deg)); } }
.color-pill { font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 99px; color: #fff; transition: background .3s; letter-spacing: .5px; }
.pending-banner {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); background: var(--r); color: #fff; font-weight: 900;
  padding: 6px 14px; border-radius: 99px; font-size: 14px; white-space: nowrap; animation: pulse 1s infinite; box-shadow: 0 6px 16px #0006;
}

.log-line { min-height: 22px; font-size: 13px; color: var(--muted); text-align: center; padding: 0 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 8px; justify-content: center; min-height: 52px; padding: 4px 12px; width: 100%; flex-wrap: wrap; }
.actions .btn { width: auto; min-width: 104px; padding: 12px 16px; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.btn.rush { background: linear-gradient(180deg, #ff6b7a, var(--r)); color: #fff; }
.btn.rush.call { animation: pulse .7s infinite; }
.btn.rush.on { background: var(--g); color: #082a1b; }

.me-bar { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 520px; padding: 0 16px; font-size: 14px; }
.me-name { font-weight: 800; }
.me-score { color: var(--y); font-size: 12px; }
.me-timer { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.me-timer i { display: block; height: 100%; width: 100%; background: var(--y); border-radius: 99px; transform: scaleX(0); transform-origin: left; will-change: transform; }
.me-timer i.urgent { background: var(--r); }
.me-bar.turn .me-name { color: var(--y); }

/* ---------- cards ---------- */
.card {
  --s: 1; position: relative; width: calc(var(--cw) * var(--s)); height: calc(var(--ch) * var(--s));
  border-radius: calc(12px * var(--s)); border: calc(3px * var(--s)) solid #fff; flex-shrink: 0;
  box-shadow: 0 4px 10px #0007; overflow: hidden; color: #fff; font-weight: 900; display: block;
  background-image: repeating-linear-gradient(135deg, #ffffff14 0 6px, transparent 6px 14px);
}
.card.r { background-color: var(--r); } .card.y { background-color: var(--y); color: #3b2600; }
.card.g { background-color: var(--g); color: #06291b; } .card.b { background-color: var(--b); }
.card.w { background: conic-gradient(var(--r) 0 25%, var(--y) 0 50%, var(--g) 0 75%, var(--b) 0); }
.card .mid {
  position: absolute; inset: 22% 14%; border-radius: calc(10px * var(--s)); background: #ffffffe8;
  display: grid; place-items: center; font-size: calc(26px * var(--s)); letter-spacing: -1px;
}
.card .mid u { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card.r .mid { color: var(--r); } .card.y .mid { color: #d99600; } .card.g .mid { color: #18a26e; }
.card.b .mid { color: var(--b); } .card.w .mid { background: #1b1433; color: #fff; font-size: calc(17px * var(--s)); }
.card .corner { position: absolute; font-size: calc(13px * var(--s)); line-height: 1; }
.card .tl { top: calc(5px * var(--s)); left: calc(6px * var(--s)); }
.card .br { bottom: calc(5px * var(--s)); right: calc(6px * var(--s)); transform: rotate(180deg); }
.card .shape, .swatch .shape { display: none; }
[data-cb="1"] .card .shape { display: block; position: absolute; bottom: calc(4px * var(--s)); left: calc(6px * var(--s)); font-size: calc(12px * var(--s)); }
[data-cb="1"] .swatch .shape { display: block; font-size: 30px; color: #fff; text-shadow: 0 1px 3px #0006; }
.back-card {
  background-color: #1b1433; display: grid; place-items: center; --s: 1.15; color: var(--accent);
  background-image: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 25%, transparent) 0 8px, transparent 8px 16px);
}
[data-back="dots"] .back-card { background-image: radial-gradient(color-mix(in srgb, var(--accent) 45%, transparent) 22%, transparent 24%); background-size: 14px 14px; }
[data-back="waves"] .back-card { background-image: repeating-radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--accent) 35%, transparent) 0 6px, transparent 6px 14px); }
[data-back="solid"] .back-card { background-image: linear-gradient(160deg, color-mix(in srgb, var(--accent) 50%, #1b1433), #1b1433); }
.back-card span { font-size: 13px; letter-spacing: 2px; }
.back-card em { position: absolute; bottom: 6px; font-style: normal; font-size: 11px; color: #b9b0dc; }
.back-card.can { animation: glow 1s infinite alternate; }
.back-card.danger { animation: glowr 1s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 4px var(--y), 0 0 24px var(--y); } }
@keyframes glowr { to { box-shadow: 0 0 0 4px var(--r), 0 0 24px var(--r); } }

.hand {
  width: 100%; display: flex; overflow-x: auto; overflow-y: visible; padding: 26px 18px 8px;
  scrollbar-width: none; min-height: 138px; justify-content: safe center;
}
.hand::-webkit-scrollbar { display: none; }
.hand .card { margin-left: var(--overlap, -18px); transition: transform .15s, filter .2s; --s: 1.1; }
.hand .card:first-child { margin-left: 0; }
.hand .card.ok { transform: translateY(-14px); box-shadow: 0 8px 18px #000a, 0 0 0 2px var(--y); }
.hand .card.jump { transform: translateY(-10px); box-shadow: 0 8px 18px #000a, 0 0 0 3px #c77dff; animation: pulse 1s infinite; }
.hand .card.sel { transform: translateY(-30px) scale(1.06); z-index: 3; box-shadow: 0 10px 22px #000c, 0 0 0 3px #fff; }
.hand .card.no { filter: brightness(.55) saturate(.7); }
.hand .card.new { animation: deal .35s ease-out; }
@keyframes deal { from { transform: translateY(40px) scale(.8); opacity: 0; } }
.hand.empty::after { content: "Watching this round…"; color: var(--muted); align-self: center; margin: 0 auto; font-size: 14px; }

/* ---------- sheets ---------- */
.modal { position: fixed; inset: 0; background: #0009; display: flex; align-items: flex-end; justify-content: center; z-index: 30; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 480px; background: var(--bg2); border-radius: 22px 22px 0 0; max-height: 92%;
  padding: 18px 18px calc(var(--safe-b) + 16px); display: flex; flex-direction: column; gap: 10px; align-items: center;
  animation: up .22s ease-out; box-shadow: 0 -10px 30px #0006;
}
.sheet::before { content: ""; width: 40px; height: 5px; border-radius: 99px; background: var(--panel2); margin: -6px 0 4px; }
.sheet.tall { height: 86%; }
.sheet .scroll { flex: 1; overflow-y: auto; width: 100%; -webkit-overflow-scrolling: touch; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2, .sheet h3 { margin: 0 0 2px; text-align: center; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.swatch { height: 84px; border-radius: 16px; border: 3px solid #fff; display: grid; place-items: center; transition: transform .1s; }
.swatch:active { transform: scale(.94); }
.target-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.target-list button { display: flex; align-items: center; gap: 12px; background: var(--panel); padding: 10px 14px; border-radius: 14px; font-weight: 700; }
.target-list button span:last-child { margin-left: auto; color: var(--muted); }
.score-list { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; max-height: 45vh; overflow-y: auto; }
.score-list li { display: flex; flex-direction: column; gap: 6px; background: var(--panel); padding: 9px 12px; border-radius: 12px; }
.score-list .top { display: flex; align-items: center; gap: 10px; }
.score-list .top .n { flex: 1; font-weight: 700; }
.score-list .top .s { color: var(--muted); font-size: 13px; }
.score-list li.win { background: color-mix(in srgb, var(--y) 22%, var(--panel)); }
.score-list li.win .n { color: var(--y); }
[data-theme="daylight"] .score-list li.win .n, [data-theme="daylight"] .status.mine, [data-theme="daylight"] .me-bar.turn .me-name, [data-theme="daylight"] .opp .pts, [data-theme="daylight"] .me-score { color: #a86f00; }
.progress { height: 6px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--y); border-radius: 99px; }
.left-cards { display: flex; gap: 3px; flex-wrap: wrap; }
.left-cards .card { --s: .42; border-width: 2px; box-shadow: none; }
.left-cards .card .corner, .left-cards .card .shape { display: none; }
.rules ul { padding-left: 20px; margin: 0 0 8px; line-height: 1.5; font-size: 15px; text-align: left; }
.rules li { margin-bottom: 6px; }
.rules h4 { margin: 10px 0 6px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; margin-top: 6px; }
.avatar-grid button { font-size: 28px; padding: 8px 0; border-radius: 14px; background: var(--panel); border: 3px solid transparent; }
.avatar-grid button.sel { border-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin: 14px 0; }
.stats div { background: var(--panel); border-radius: 12px; padding: 10px 4px; text-align: center; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 11px; color: var(--muted); }
.restore { display: flex; flex-direction: column; gap: 8px; }
.restore .muted { text-align: left; }
.browse-list, .board-list, .settings-list { display: flex; flex-direction: column; gap: 8px; }
.browse-item { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 14px; padding: 10px 12px; }
.browse-item .info { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.browse-item .info small { color: var(--muted); }
.browse-item .btn { width: auto; padding: 9px 14px; font-size: 14px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 10px; line-height: 1.5; }
.board-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 8px 12px; }
.board-row .rank { width: 26px; font-weight: 900; color: var(--muted); text-align: center; }
.board-row:nth-child(1) .rank { color: #ffd34d; } .board-row:nth-child(2) .rank { color: #d8d8e8; } .board-row:nth-child(3) .rank { color: #e8a46c; }
.board-row .n { flex: 1; font-weight: 700; }
.board-row .s { font-size: 12px; color: var(--muted); text-align: right; }
.board-row .s b { color: var(--text); font-size: 15px; }
.board-row.me { outline: 2px solid var(--accent); }

.chat { gap: 8px; }
.emote-row, .quick-row { display: flex; gap: 6px; overflow-x: auto; width: 100%; scrollbar-width: none; flex-shrink: 0; }
.emote-row::-webkit-scrollbar, .quick-row::-webkit-scrollbar { display: none; }
.emote-row button { font-size: 28px; padding: 2px 6px; border-radius: 12px; }
.emote-row button:active { transform: scale(1.3); }
.quick-row button { white-space: nowrap; background: var(--panel); padding: 8px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.chat-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.msg .body { background: var(--panel); padding: 8px 12px; border-radius: 16px 16px 16px 4px; font-size: 15px; user-select: text; -webkit-user-select: text; word-break: break-word; }
.msg .body small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .body { background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
.msg.mine .body small { display: none; }
.chat-form { display: flex; gap: 8px; width: 100%; }
.chat-form .btn { width: auto; }
.log-list { margin: 0; padding: 0 0 0 26px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.log-list li::marker { color: var(--muted); font-size: 11px; }

/* ---------- fx ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 25; }
.fx .card { position: absolute; left: 0; top: 0; margin: 0; }
.stamp {
  position: fixed; z-index: 26; pointer-events: none; font-weight: 900; font-size: 34px; color: #fff;
  text-shadow: 0 3px 0 #0006, 0 0 20px #000; transform: translate(-50%, -50%); animation: stamp 1.1s ease forwards; white-space: nowrap;
}
@keyframes stamp { 0% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 24; opacity: 0; background: radial-gradient(transparent 40%, var(--r)); }
.flash.go { animation: flash .6s ease; }
@keyframes flash { 30% { opacity: .7; } }
.shake { animation: shake .45s ease; }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }

.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 62px); transform: translateX(-50%); z-index: 45;
  background: #000d; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: 90%; text-align: center; animation: up .2s;
}
.toast.tip { background: var(--accent); color: var(--accent-ink); font-weight: 700; top: calc(var(--safe-t) + 150px); max-width: 320px; }
.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 50; text-align: center; background: var(--r); color: #fff; padding: calc(var(--safe-t) + 4px) 0 4px; font-size: 13px; font-weight: 700; }

@media (min-height: 760px) { :root { --cw: 70px; --ch: 105px; } }
@media (min-width: 700px) { .hand { justify-content: center; } }
[data-rm="1"] *, [data-rm="1"] *::before, [data-rm="1"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .dir-ring { animation: none; } }

/* ======================= v3: icons, profiles, voice ======================= */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; }
.icon-btn .ic { width: 22px; height: 22px; vertical-align: middle; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.icon-only { padding: 11px 14px; }
.home-links .ic { width: 24px; height: 24px; color: var(--accent); }
.row-r { display: flex; gap: 8px; }
.row.wrap { flex-wrap: wrap; justify-content: center; }
.row.wrap .btn { flex: 1 1 40%; }
.back { display: inline-flex; align-items: center; gap: 2px; }
h3 .ic { color: var(--accent); }
.spec-banner { display: inline-flex; align-items: center; gap: 6px; }

/* profile chip */
.profile-chip { padding: 4px 14px 4px 4px; gap: 10px; }
.profile-chip .chip-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.profile-chip .chip-txt small { font-size: 11px; color: var(--accent); font-weight: 800; }
.profile-chip > .ic { color: var(--muted); width: 16px; height: 16px; }

/* avatars: colour, frame, level chip, speaking glow */
.av { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; cursor: pointer; }
.av .face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); }
.av .lvl {
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; line-height: 1;
  background: var(--bg); color: var(--text); border: 1.5px solid var(--accent); padding: 2px 4px; border-radius: 99px; white-space: nowrap;
}
.av .vc { position: absolute; top: -3px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--g); color: #06291b; display: grid; place-items: center; }
.av .vc .ic { width: 10px; height: 10px; }
.av.speaking::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid var(--g); animation: talk .5s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scale(.96); opacity: .7; } to { transform: scale(1.06); opacity: 1; } }
.av.fr-bronze .face { box-shadow: 0 0 0 3px #c97b3d; }
.av.fr-silver .face { box-shadow: 0 0 0 3px #d9dce8, 0 0 8px #fff6; }
.av.fr-gold .face { box-shadow: 0 0 0 3px #ffcc33, 0 0 12px #ffcc3399; }
.av.fr-neon .face { box-shadow: 0 0 0 3px #00e5ff, 0 0 14px #00e5ffaa; }
.av.fr-rainbow .face { box-shadow: 0 0 0 3px transparent; background-clip: padding-box; outline: 3px solid transparent; }
.av.fr-rainbow::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(#ff4d5e, #ffc23d, #2ecc8f, #3d8bff, #9b5de5, #ff4d5e); animation: spin 4s linear infinite; z-index: -1; }
.av.fr-rainbow { z-index: 0; }
.opp .av { margin-bottom: 4px; }

/* profile sheet */
.profile-hero { display: flex; align-items: center; gap: 14px; width: 100%; }
.hero-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; }
.hero-txt b { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-tag { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.title-tag:empty { display: none; }
.muted.left { text-align: left; }
.xp { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.xp-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.xp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--y)); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.xp small { color: var(--muted); font-weight: 600; }
.tabs { display: flex; width: 100%; background: var(--panel); border-radius: 12px; padding: 3px; gap: 2px; }
.tabs button { flex: 1; padding: 8px 2px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabs button .ic { width: 18px; height: 18px; }
.tabs button.sel { background: var(--accent); color: var(--accent-ink); }
[data-pane] { display: flex; flex-direction: column; gap: 6px; }
[data-pane].hidden { display: none !important; }
.field-label small { font-weight: 400; }
.color-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.color-grid button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; }
.color-grid button.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.frame-grid, .title-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.frame-grid button, .title-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; background: var(--panel); border: 2px solid transparent; font-size: 11px; font-weight: 700; min-width: 62px; }
.frame-grid button.sel, .title-grid button.sel { border-color: var(--accent); }
.frame-grid button.locked { opacity: .5; }
.frame-grid button .ic { width: 14px; height: 14px; }
.title-grid button { flex-direction: row; font-size: 12px; padding: 7px 12px; }
.stats.tight { margin: 4px 0; }
.stats.tight div { padding: 6px 2px; }
.stats.tight b { font-size: 16px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-card { background: var(--panel); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.badge-card .bi { font-size: 30px; }
.badge-card b { font-size: 12px; }
.badge-card small { font-size: 10px; color: var(--muted); line-height: 1.25; }
.badge-card.locked .bi { filter: grayscale(1) brightness(.5); }
.badge-card.locked b { color: var(--muted); }
.history { display: flex; flex-direction: column; gap: 6px; }
.hist-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.hist-row .res { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.hist-row .res.w { background: var(--g); color: #06291b; } .hist-row .res.l { background: var(--panel2); color: var(--muted); }
.hist-row .d { flex: 1; } .hist-row small { color: var(--muted); }
.form-dots { display: flex; gap: 5px; justify-content: center; }
.form-dots i { width: 14px; height: 14px; border-radius: 4px; background: var(--panel2); }
.form-dots i.w { background: var(--g); }
.pc-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 24px; }
.pc-badges span { background: var(--panel); border-radius: 10px; padding: 4px 6px; }
.throw-row { display: flex; gap: 6px; justify-content: center; width: 100%; }
.throw-row button { font-size: 26px; padding: 6px 8px; border-radius: 12px; background: var(--panel); transition: transform .1s; }
.throw-row button:active { transform: scale(1.25) rotate(-10deg); }
.throw-label { width: 100%; text-align: center; font-size: 12px; color: var(--muted); margin: 4px 0 -4px; }

/* voice */
.voice-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.voice-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 14px; padding: 8px 12px; }
.voice-row .n { flex: 1; font-weight: 700; }
.voice-row .st { font-size: 11px; color: var(--muted); }
.voice-row .st.ok { color: var(--g); }
.voice-row .st.bad { color: var(--r); }
.voice-row button { width: 38px; height: 38px; border-radius: 10px; background: var(--panel2); display: grid; place-items: center; }
.voice-row button.off { background: var(--r); color: #fff; }

/* reward popup */
.reward {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 70px); transform: translateX(-50%); z-index: 46; width: min(340px, 90%);
  background: linear-gradient(135deg, var(--panel2), var(--panel)); border: 2px solid var(--y); border-radius: 18px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 30px #000a; animation: drop .45s cubic-bezier(.2,1.6,.4,1);
}
.reward .ri { font-size: 38px; animation: wiggle .8s ease .3s; }
.reward .rt { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.reward .rt small { color: var(--y); font-weight: 900; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.reward .rt b { font-size: 17px; }
.reward .rt span { font-size: 12px; color: var(--muted); }
@keyframes drop { from { transform: translate(-50%, -80px) scale(.8); opacity: 0; } }
@keyframes wiggle { 25% { transform: rotate(-15deg) scale(1.2); } 50% { transform: rotate(12deg); } 75% { transform: rotate(-6deg); } }
.xp-gain { width: 100%; display: flex; flex-direction: column; gap: 4px; background: var(--panel); border-radius: 12px; padding: 8px 12px; }
.xp-gain .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
.xp-gain .top span:last-child { color: var(--y); }

/* thrown reactions */
.thrown { position: fixed; left: 0; top: 0; font-size: 34px; z-index: 27; pointer-events: none; }
.splat { position: fixed; z-index: 27; font-size: 44px; pointer-events: none; transform: translate(-50%, -50%); animation: splat 1.1s ease forwards; }
@keyframes splat { 0% { transform: translate(-50%, -50%) scale(.4); } 20% { transform: translate(-50%, -50%) scale(1.5); } 40% { transform: translate(-50%, -50%) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -20%) scale(1); } }

/* card symbols as icons */
.card svg.sym { width: 1em; height: 1em; stroke-width: 2.6; }
.card .corner svg.sym { stroke-width: 3; }

/* drag to play */
.hand .card { touch-action: pan-x; }
.hand .card.dragging { transition: none; z-index: 5; filter: none; }
.hand .card.dragging.armed { box-shadow: 0 0 0 4px var(--g), 0 14px 28px #000c; }
.drop-hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 50%; z-index: 20; pointer-events: none; font-weight: 900; color: var(--g); font-size: 14px; letter-spacing: 1px; opacity: 0; transition: opacity .15s; }
.drop-hint.on { opacity: 1; }
.lp-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.lp-name small { font-size: 11px; color: var(--accent); font-weight: 800; }
.lobby-players li { cursor: pointer; }
.ring { display: inline-grid; place-items: center; }
.xp-gain .xp-bar { flex: none; }
#installHint .btn .ic { width: 18px; height: 18px; }

/* ======================= v4: skins, presence, motion, landscape ======================= */
.card.r { --cc: var(--r); --ink: var(--r); } .card.y { --cc: var(--y); --ink: #c98a00; }
.card.g { --cc: var(--g); --ink: #14966a; } .card.b { --cc: var(--b); --ink: var(--b); } .card.w { --cc: #fff; --ink: #1b1433; }

/* skin: Rush (default) — glossy colour, white diamond emblem, chunky outlined numerals */
[data-skin="rush"] .card:not(.back-card) {
  background-image: radial-gradient(120% 70% at 25% 10%, #ffffff45, transparent 55%), repeating-linear-gradient(135deg, #ffffff10 0 6px, transparent 6px 14px);
}
[data-skin="rush"] .card.w { background: radial-gradient(120% 70% at 25% 10%, #ffffff40, transparent 55%), conic-gradient(var(--r) 0 25%, var(--y) 0 50%, var(--g) 0 75%, var(--b) 0); }
[data-skin="rush"] .card .mid {
  inset: auto; left: 50%; top: 50%; width: 66%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: none; border-radius: 0; isolation: isolate; font-size: calc(30px * var(--s)); color: var(--ink);
  -webkit-text-stroke: calc(1px * var(--s)) #00000038; text-shadow: 0 calc(2px * var(--s)) 0 #00000026;
}
[data-skin="rush"] .card .mid::before {
  content: ""; position: absolute; inset: 9%; background: #fff; border-radius: 24%; transform: rotate(45deg); z-index: -1;
  box-shadow: inset 0 calc(-3px * var(--s)) 0 #00000014, 0 calc(2px * var(--s)) calc(4px * var(--s)) #0002;
}
[data-skin="rush"] .card.w .mid { color: #fff; font-size: calc(17px * var(--s)); -webkit-text-stroke: 0; }
[data-skin="rush"] .card.w .mid::before { background: #1b1433; }
[data-skin="rush"] .card .corner { font-size: calc(14px * var(--s)); text-shadow: 0 1px 0 #0003; }

/* skin: Neon */
[data-skin="neon"] .card:not(.back-card) {
  background: #0d0d1c; border-color: var(--cc); color: var(--cc);
  box-shadow: 0 0 calc(10px * var(--s)) var(--cc), inset 0 0 calc(14px * var(--s)) color-mix(in srgb, var(--cc) 35%, transparent);
}
[data-skin="neon"] .card .mid { background: none; color: var(--cc); font-size: calc(32px * var(--s)); text-shadow: 0 0 calc(8px * var(--s)) var(--cc); }
[data-skin="neon"] .card.w { border-color: #fff; box-shadow: -3px 0 10px var(--r), 3px 0 10px var(--b), 0 -3px 10px var(--y), 0 3px 10px var(--g); }
[data-skin="neon"] .card.w .mid { background: none; background-image: linear-gradient(90deg, var(--r), var(--y), var(--g), var(--b)); -webkit-background-clip: text; color: transparent; font-size: calc(19px * var(--s)); }

/* skin: Retro — cream paper, ink colour, round seal */
[data-skin="retro"] .card:not(.back-card) {
  background: #f4ecd8; border-color: #f4ecd8; color: var(--ink); font-family: Georgia, "Times New Roman", serif;
  box-shadow: inset 0 0 0 calc(4px * var(--s)) var(--cc), 0 4px 10px #0007;
}
[data-skin="retro"] .card .mid { inset: 24% 12%; background: var(--cc); color: #f4ecd8; border-radius: 50%; font-size: calc(26px * var(--s)); box-shadow: inset 0 0 0 calc(2px * var(--s)) #f4ecd8, 0 0 0 calc(2px * var(--s)) var(--cc); }
[data-skin="retro"] .card.w .mid { background: conic-gradient(var(--r) 0 25%, var(--y) 0 50%, var(--g) 0 75%, var(--b) 0); color: #fff; font-size: calc(15px * var(--s)); text-shadow: 0 1px 2px #0008; }
[data-skin="retro"] .card.w { box-shadow: inset 0 0 0 calc(4px * var(--s)) #1b1433, 0 4px 10px #0007; }

/* skin: Custom art (licensed or your own images in /skins/custom/) */
.card.art { background-size: cover !important; background-position: center !important; border-width: 0; }
.card.art > * { display: none !important; }
[data-skin="custom"] .back-card { background-image: var(--custom-back) !important; background-size: cover !important; }
[data-skin="custom"] .back-card span { display: none; }

.skin-preview { display: flex; gap: 6px; justify-content: center; padding: 2px 0 10px; }
.skin-preview .card { --s: .78; }

/* presence */
.av .pres { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg2); z-index: 2; }
.pres.online { background: #2ecc8f; }
.pres.away { background: #ffb347; }
.pres.offline { background: #8a8aa0; }
.pres.auto { background: #9b5de5; }
.offline-tag { font-size: 9px; font-weight: 900; letter-spacing: .4px; color: #fff; background: #6b6b85; padding: 2px 6px; border-radius: 99px; white-space: nowrap; }
.away-tag { background: #c98a2b; }
.opp.away { opacity: .62; }
.status.warn { color: #ffb347; }

/* hand: fanned arc (vars set from JS) */
.hand .card { transform: translateY(calc(var(--dy, 0px) + var(--lift, 0px))) rotate(var(--rot, 0deg)); transform-origin: 50% 100%; position: relative; }
.hand { padding-bottom: 16px; }
.hand .card.ok { --lift: -16px; transform: translateY(calc(var(--dy, 0px) + var(--lift))) rotate(var(--rot, 0deg)); }
.hand .card.jump { --lift: -10px; transform: translateY(calc(var(--dy, 0px) + var(--lift))) rotate(var(--rot, 0deg)); }
.hand .card.sel { --lift: -34px; transform: translateY(calc(var(--dy, 0px) + var(--lift))) rotate(var(--rot, 0deg)) scale(1.06); }
.hand .card.ok:active { transform: translateY(calc(var(--dy, 0px) - 26px)) rotate(var(--rot, 0deg)) scale(1.04); }
.hand.wait .card { transform: translateY(var(--dy, 0px)) rotate(var(--rot, 0deg)); }
.hand .card.flip-in { animation: flipIn .5s cubic-bezier(.2,.8,.3,1); }
@keyframes flipIn { from { rotate: y 90deg; filter: brightness(.35); translate: 0 -30px; } }
.hand .card.ok:hover { --lift: -22px; }

/* motion */
.screen.enter { animation: screenIn .38s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.status.pop { animation: statusPop .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes statusPop { from { transform: scale(.7); opacity: .2; } }
.burst { position: fixed; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 4px solid var(--bc); pointer-events: none; z-index: 24; animation: burst .55s ease-out forwards; }
.burst.big { border-width: 6px; background: radial-gradient(circle, color-mix(in srgb, var(--bc) 55%, transparent), transparent 70%); animation-duration: .8s; }
@keyframes burst { from { transform: scale(.5); opacity: .95; } to { transform: scale(4.5); opacity: 0; } }
.burst.big { animation-name: burstBig; }
@keyframes burstBig { from { transform: scale(.5); opacity: 1; } to { transform: scale(9); opacity: 0; } }
#deck.shuffling { animation: riffle .7s ease; }
@keyframes riffle { 15% { transform: rotate(-10deg) translateX(-8px); } 35% { transform: rotate(9deg) translateX(8px); } 55% { transform: rotate(-6deg); } 75% { transform: rotate(4deg); } }
.pending-banner.bump { animation: bump .5s cubic-bezier(.2,1.8,.4,1), pulse 1s infinite .5s; }
@keyframes bump { from { transform: translateX(-50%) scale(1.7); } }
.table::before {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, currentColor 0%, transparent 65%); color: var(--tint, transparent); opacity: .26; transition: color .7s ease;
}
.opp.turn { animation: oppTurn 1.5s ease-in-out infinite; }
@keyframes oppTurn { 50% { box-shadow: 0 0 20px color-mix(in srgb, var(--y) 55%, transparent); } }
.opp.last { box-shadow: inset 0 0 0 2px var(--r); }
.opp.last .cnt { animation: shake 1.4s ease infinite; }
#game { position: absolute; }
#game::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(70% 90% at 50% 100%, color-mix(in srgb, var(--y) 26%, transparent), transparent 70%);
}
#game.my-turn::before { opacity: 1; animation: turnGlow 1.8s ease-in-out infinite alternate; }
@keyframes turnGlow { from { opacity: .55; } to { opacity: 1; } }
.hand, .actions, .me-bar, .log-line { position: relative; z-index: 1; }

/* ---------- sideways (landscape) phones ---------- */
@media (orientation: landscape) and (max-height: 540px) {
  :root { --cw: 48px; --ch: 72px; }
  #home { justify-content: flex-start; overflow-y: auto; gap: 8px; padding-top: calc(var(--safe-t) + 54px); }
  #home .logo-cards { display: none; }
  #home .logo h1 { font-size: 32px; margin-top: 0; }
  #home .logo { margin-bottom: 2px; }
  #game {
    display: grid; align-items: center; justify-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "top top top" "opp opp opp" "log table act" "me table act" "hand hand hand";
    padding: calc(var(--safe-t) + 4px) max(10px, env(safe-area-inset-right)) calc(var(--safe-b) + 2px) max(10px, env(safe-area-inset-left));
  }
  .topbar { grid-area: top; padding: 0; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .status { font-size: 15px; }
  .spec-banner { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 3; }
  .opponents { grid-area: opp; flex-wrap: nowrap; overflow-x: auto; padding: 2px 4px 0; scrollbar-width: none; }
  .opponents::-webkit-scrollbar { display: none; }
  .opp, .opponents.many .opp { flex-direction: row; width: auto; padding: 3px 10px 3px 4px; gap: 6px; flex-shrink: 0; }
  .opp .ring .av { width: 30px !important; height: 30px !important; }
  .opp .ring .av .face { font-size: 16px !important; }
  .opp .av .lvl { display: none; }
  .opp.next::before { top: -7px; }
  .table { grid-area: table; min-height: 0; height: 100%; gap: 22px; }
  .dir-ring { width: 170px; height: 170px; }
  .table::before { width: 240px; height: 240px; }
  .discard { width: calc(var(--cw) * 1.25); height: calc(var(--ch) * 1.25); }
  .pile-wrap { gap: 6px; }
  .pending-banner { bottom: auto; top: -4px; font-size: 12px; padding: 4px 10px; }
  .log-line { grid-area: log; white-space: normal; text-align: left; justify-self: stretch; align-self: end; padding: 0 6px; font-size: 12px; }
  .me-bar { grid-area: me; justify-self: stretch; align-self: start; padding: 0 6px; flex-wrap: wrap; }
  .me-timer { flex-basis: 100%; }
  .actions { grid-area: act; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
  .actions .btn { min-width: 120px; padding: 9px 14px; font-size: 15px; }
  .hand { grid-area: hand; min-height: 92px; padding: 16px 16px 2px; justify-self: stretch; }
  #game::before { height: 55%; }
  .sheet { max-height: 96%; padding-top: 12px; }
  .sheet.tall { height: 94%; }
  .toast { top: calc(var(--safe-t) + 44px); }
  .toast.tip { top: calc(var(--safe-t) + 90px); }
  .reward { top: calc(var(--safe-t) + 40px); }
}

/* ======================= v5: reactions, ready, daily, push-to-talk ======================= */
.react-fab {
  position: absolute; right: 12px; bottom: calc(var(--safe-b) + 150px); z-index: 6; width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel2); font-size: 26px; box-shadow: 0 6px 16px #0007; transition: transform .15s;
}
.react-fab:active { transform: scale(1.2) rotate(-12deg); }
.react-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.react-grid button { font-size: 28px; padding: 8px 0; border-radius: 12px; background: var(--panel); transition: transform .1s; }
.react-grid button:active { transform: scale(1.25) rotate(8deg); }
body.aiming .opp, body.aiming #lobbyPlayers li { animation: aim .7s ease-in-out infinite; cursor: crosshair; }
@keyframes aim { 50% { box-shadow: 0 0 0 3px var(--r), 0 0 18px var(--r); } }

/* hit effects */
.splat-ov, .pie-ov { position: absolute; inset: -6px; border-radius: 16px; pointer-events: none; z-index: 4; animation: ovFade 3.2s ease forwards; overflow: hidden; }
.splat-ov {
  background:
    radial-gradient(circle at 35% 40%, var(--sc) 0 18%, transparent 19%),
    radial-gradient(circle at 62% 35%, var(--sc) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 58%, var(--sc) 0 22%, transparent 23%),
    radial-gradient(circle at 25% 70%, var(--sc) 0 7%, transparent 8%),
    radial-gradient(circle at 78% 62%, var(--sc) 0 8%, transparent 9%);
  opacity: .92;
}
.splat-ov::after { content: ""; position: absolute; left: 30%; top: 55%; width: 6px; height: 0; background: var(--sc); border-radius: 0 0 4px 4px; box-shadow: 18px 0 0 var(--sc), 34px 0 0 var(--sc); animation: drip 2.4s ease-in .3s forwards; }
@keyframes drip { to { height: 40px; } }
.pie-ov { background: radial-gradient(circle at 50% 45%, #fff8ec 0 45%, #f3dfc1 46% 52%, transparent 53%); }
.pie-ov::after { content: "🥧"; position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-15deg); font-size: 22px; }
@keyframes ovFade { 0% { transform: scale(.4); opacity: 0; } 10% { transform: scale(1.08); opacity: 1; } 18% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.hit { animation: hitShake .45s ease; }
@keyframes hitShake { 25% { transform: translateX(-6px) rotate(-3deg); } 50% { transform: translateX(5px) rotate(2deg); } 75% { transform: translateX(-3px); } }
.hop { animation: hop .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes hop { 30% { transform: translateY(-22px) rotate(-6deg); } 60% { transform: translateY(0) scaleY(.85); } }
.spinout { animation: spinout .9s cubic-bezier(.3,.7,.4,1); }
@keyframes spinout { to { transform: rotate(720deg); } }
.droop { animation: droop 1.8s ease; transform-origin: 50% 100%; }
@keyframes droop { 20%, 80% { transform: rotate(-14deg) translateY(6px); filter: saturate(.3) brightness(.8); } }
.runner { position: fixed; z-index: 27; font-size: 30px; pointer-events: none; transform: translate(var(--x0), -50%) scaleX(-1); animation: run 1.4s linear forwards; }
@keyframes run { 0% { transform: translate(var(--x0), -50%) scaleX(-1); } 25% { transform: translate(calc(var(--x0) + (var(--x1) - var(--x0)) * .25), -80%) scaleX(-1); } 50% { transform: translate(calc(var(--x0) + (var(--x1) - var(--x0)) * .5), -50%) scaleX(-1); } 75% { transform: translate(calc(var(--x0) + (var(--x1) - var(--x0)) * .75), -80%) scaleX(-1); } 100% { transform: translate(var(--x1), -50%) scaleX(-1); opacity: 0; } }
.particle { position: fixed; z-index: 27; font-size: 22px; pointer-events: none; transform: translate(-50%, -50%); animation: floatUp 1.6s ease-out forwards; }
@keyframes floatUp { to { transform: translate(calc(-50% + var(--dx)), -130px) scale(1.3); opacity: 0; } }
.bubble.emoji { animation: bubble 3.2s ease forwards, emoWobble .5s ease-in-out 3; }
@keyframes emoWobble { 50% { rotate: 14deg; } }

/* ready voting */
.badge.ready { background: var(--g); color: #06291b; }
.btn.ready-on { background: var(--g); color: #06291b; }
#btnReady.on { background: var(--g); color: #06291b; }
#btnReady { margin-bottom: 8px; }

/* daily */
.daily-card { width: 100%; display: flex; align-items: center; gap: 12px; position: relative; text-align: left; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--panel)), var(--panel)); box-shadow: 0 4px 0 var(--shadow); }
.daily-card .dc-ic { font-size: 26px; }
.daily-card .dc-t { display: flex; flex-direction: column; }
.daily-card small { color: var(--muted); }
.daily-card .badge-dot { top: 10px; right: 12px; }
.daily-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.daily-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 14px; padding: 10px 12px; }
.daily-row .di { font-size: 26px; }
.daily-row .dt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.daily-row .dt small { color: var(--muted); font-size: 12px; }
.daily-row .dx { font-size: 12px; font-weight: 900; color: var(--y); }
.daily-row.done { opacity: .75; }
.daily-row.done .xp-bar i { background: var(--g); }

/* push-to-talk */
.ptt {
  position: fixed; left: 12px; bottom: calc(var(--safe-b) + 150px); z-index: 7; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 99px; background: var(--panel2); font-weight: 900; box-shadow: 0 6px 16px #0008; touch-action: none; user-select: none; -webkit-user-select: none;
}
.ptt.on { background: var(--g); color: #06291b; transform: scale(1.08); box-shadow: 0 0 0 6px color-mix(in srgb, var(--g) 35%, transparent), 0 6px 16px #0008; }
@media (orientation: landscape) and (max-height: 540px) {
  .react-fab { bottom: calc(var(--safe-b) + 104px); width: 42px; height: 42px; font-size: 22px; }
  .ptt { bottom: calc(var(--safe-b) + 104px); padding: 9px 13px; }
}

/* icons in place of emoji */
.badge-card .bi { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--y) 18%, transparent); color: var(--y); }
.badge-card .bi .ic { width: 24px; height: 24px; }
.badge-card.locked .bi { background: var(--panel2); color: var(--muted); filter: none; }
.reward .ri { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--y) 20%, transparent); color: var(--y); flex-shrink: 0; }
.reward .ri .ic { width: 30px; height: 30px; }
.daily-row .di { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.daily-row .di .ic { width: 22px; height: 22px; }
.daily-row.done .di { background: color-mix(in srgb, var(--g) 22%, transparent); color: var(--g); }
.daily-card .dc-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.daily-card .dc-ic .ic { width: 22px; height: 22px; }
.pc-badges span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--y); }
.pc-badges .ic { width: 20px; height: 20px; }
.react-fab .ic { width: 26px; height: 26px; color: var(--y); }
.board-row .rank { font-size: 15px; }

/* ======================= v6: desktop ======================= */
.desk-only, .dock-only, .felt { display: none; }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 6px; background: var(--panel2); border-bottom: 2px solid #0006; font: 700 11px/1.4 ui-monospace, Menlo, monospace; color: var(--text); text-align: center; }

@media (min-width: 1100px) and (min-height: 620px) {
  :root { --cw: 84px; --ch: 126px; }
  body {
    background:
      radial-gradient(900px 600px at 12% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
      radial-gradient(800px 600px at 92% 95%, color-mix(in srgb, var(--b) 14%, transparent), transparent 60%),
      radial-gradient(120% 80% at 50% 35%, var(--glow) 0%, var(--bg2) 45%, var(--bg) 100%);
  }
  .desk-only { display: block; }
  .kbd-hint.desk-only { display: flex; }

  /* home: hero on the left, actions card on the right */
  #home {
    max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1.15fr) 420px; column-gap: 72px; row-gap: 12px;
    align-content: center; align-items: center; padding: 40px 48px;
  }
  #home > * { grid-column: 2; }
  #home .logo { grid-column: 1; grid-row: 1 / span 9; text-align: left; margin: 0; align-self: center; }
  #home .logo h1 { font-size: 88px; letter-spacing: -3px; line-height: .95; margin: 18px 0 10px; }
  #home .logo .tag { font-size: 22px; }
  #home .logo-cards { width: 280px; height: 180px; margin: 0 0 10px 30px; }
  #home .logo-cards i { width: 96px; height: 144px; border-width: 5px; border-radius: 16px; }
  .hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--muted); font-size: 17px; }
  .hero-points li { display: flex; align-items: center; gap: 12px; }
  .hero-points .ic { width: 22px; height: 22px; color: var(--accent); }
  #home > .btn, #home > .join-row, #home > .daily-card, #home > .home-links { max-width: 420px; }
  #home::after { content: ""; position: absolute; grid-column: 2; grid-row: 1 / span 9; inset: -24px; border-radius: 28px; background: color-mix(in srgb, var(--panel) 45%, transparent); border: 1px solid color-mix(in srgb, var(--text) 8%, transparent); z-index: -1; backdrop-filter: blur(6px); }

  /* lobby: players left, rules right */
  .lobby-head, .lobby-scroll { max-width: 1060px; }
  .lobby-scroll { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; align-content: start; align-items: start; padding-top: 10px; }
  .lobby-scroll > * { grid-column: 1; }
  .lobby-scroll > .section-title:nth-of-type(2) { grid-column: 2; grid-row: 1; margin-top: 0; }
  #rulesPanel { grid-column: 2; grid-row: 2 / span 30; }
  .lobby-scroll > .muted, #roomCode { justify-self: center; }
  .lobby-scroll > .row { max-width: 420px; justify-self: center; }
  .lobby-actions { max-width: 560px; }

  /* game: felt table, seats in an arc, big cards */
  .topbar { padding: 4px 24px 0; }
  .status { font-size: 22px; }
  .status small { font-size: 13px; }
  .opponents { gap: 18px; padding-top: 22px; flex-wrap: nowrap; }
  .opp, .opponents.many .opp { width: 124px; padding: 12px 8px 10px; transform: translateY(var(--arc, 0px)); }
  .opp.turn { transform: translateY(calc(var(--arc, 0px) + 3px)) scale(1.04); }
  .opp .nm { font-size: 14px; } .opp .cnt { font-size: 13px; }
  .table { min-height: 320px; gap: 56px; }
  .felt {
    display: block; position: absolute; width: min(760px, 90%); height: 86%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--tint, var(--panel2)) 14%, #24305f), #151a3a 70%);
    box-shadow: inset 0 0 0 10px color-mix(in srgb, var(--text) 6%, #10142c), inset 0 0 0 12px #0004, inset 0 0 90px #000b, 0 30px 80px #000a;
    transition: background .7s;
  }
  [data-theme="daylight"] .felt { background: radial-gradient(ellipse at 50% 38%, #3f8f6d, #23604a 72%); box-shadow: inset 0 0 0 10px #7a5634, inset 0 0 0 12px #0003, inset 0 0 80px #0006, 0 24px 60px #0004; }
  .dir-ring { width: 330px; height: 330px; }
  .table::before { width: 540px; height: 540px; }
  .back-card { --s: 1.1; }
  .log-line { font-size: 14px; }
  .me-bar { max-width: 760px; font-size: 16px; }
  .actions .btn { min-width: 150px; font-size: 17px; }
  .hand { min-height: 200px; padding: 44px 32px 20px; }
  .hand .card { cursor: pointer; }
  .hand .card:hover:not(.no) { --lift: -24px; }
  .hand .card.ok:hover { --lift: -30px; }
  .kbd-hint { position: absolute; left: 24px; top: 74px; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); z-index: 2; flex-wrap: wrap; max-width: 190px; row-gap: 8px; opacity: .8; }
  .react-fab { right: 24px; bottom: 190px; }
  .ptt { left: 24px; bottom: 70px; }

  /* dialogs instead of bottom sheets */
  .modal { align-items: center; }
  .sheet { border-radius: 24px; max-width: 520px; padding: 24px 24px 22px; animation: dialogIn .22s cubic-bezier(.2,.9,.3,1.2); box-shadow: 0 30px 80px #000a; }
  .sheet::before { display: none; }
  .sheet.tall { height: min(80vh, 780px); }
  @keyframes dialogIn { from { transform: scale(.94); opacity: 0; } }

  /* docked sidebar: game log + chat */
  body.dock #game, body.dock #lobby { padding-right: 372px; }
  body.dock .react-fab { right: 396px; }
  body.dock #chatSheet { display: flex !important; background: none; pointer-events: none; justify-content: flex-end; align-items: stretch; animation: none; z-index: 20; }
  body.dock #chatSheet .sheet {
    pointer-events: auto; width: 360px; max-width: 360px; height: 100%; max-height: none; border-radius: 0; animation: none;
    background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(10px);
    box-shadow: -1px 0 0 color-mix(in srgb, var(--text) 8%, transparent), -24px 0 50px #0005; padding: 18px 16px 16px; gap: 10px;
  }
  body.dock .dock-only { display: block; }
  body.dock #btnChat, body.dock #btnLobbyChat { display: none; }
  .dock-head { display: flex !important; align-items: center; gap: 8px; width: 100%; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .dock-head .ic { width: 15px; height: 15px; }
  .dock-log { width: 100%; max-height: 28%; overflow-y: auto; margin: 0; padding: 8px 10px 8px 28px; background: var(--panel); border-radius: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); flex-shrink: 0; }
  .dock-log li:last-child { color: var(--text); font-weight: 700; }
  body.dock .chat-list { min-height: 0; }

  /* pointer polish */
  .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
  .btn:active { transform: translateY(2px); }
  .icon-btn:hover { background: color-mix(in srgb, var(--text) 14%, transparent); }
  .opp { cursor: pointer; }
  .opp:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
  .home-links button:hover, .daily-card:hover { filter: brightness(1.1); }
  button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
}

/* ======================= v7: game picker + Ludo ======================= */
.game-picker { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.game-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; border-radius: 16px;
  background: var(--panel); border: 2px solid transparent; text-align: center; position: relative;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.game-tile.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.game-tile.soon { opacity: .55; }
.game-tile.soon::after { content: "Soon"; position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 900; letter-spacing: .5px; background: var(--panel2); color: var(--muted); padding: 2px 6px; border-radius: 99px; }
.game-tile:active { transform: scale(.97); }
.gt-t { display: flex; flex-direction: column; gap: 2px; }
.gt-t b { font-size: 14px; }
.gt-t small { font-size: 10px; color: var(--muted); line-height: 1.3; }
.gt-art { position: relative; width: 52px; height: 40px; display: block; }
.gt-cards .gt-art i { position: absolute; left: 50%; bottom: 0; width: 20px; height: 30px; border-radius: 4px; border: 2px solid #fff; transform-origin: 50% 120%; }
.gt-cards .gt-art i:nth-child(1) { background: var(--r); transform: translateX(-50%) rotate(-24deg); }
.gt-cards .gt-art i:nth-child(2) { background: var(--y); transform: translateX(-50%) rotate(-8deg); }
.gt-cards .gt-art i:nth-child(3) { background: var(--g); transform: translateX(-50%) rotate(8deg); }
.gt-cards .gt-art i:nth-child(4) { background: var(--b); transform: translateX(-50%) rotate(24deg); }
.gt-ludo .gt-art { width: 40px; height: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: #f4efe4; border-radius: 8px; }
.gt-ludo .gt-art i { border-radius: 4px; }
.gt-ludo .gt-art i:nth-child(1) { background: var(--r); } .gt-ludo .gt-art i:nth-child(2) { background: var(--g); }
.gt-ludo .gt-art i:nth-child(3) { background: var(--b); } .gt-ludo .gt-art i:nth-child(4) { background: var(--y); }
.gt-carrom .gt-art { width: 40px; height: 40px; border-radius: 6px; background: #d9b27c; box-shadow: inset 0 0 0 3px #7a4b25; }
.gt-carrom .gt-art i { position: absolute; width: 9px; height: 9px; border-radius: 50%; }
.gt-carrom .gt-art i:nth-child(1) { left: 15px; top: 15px; background: #c0392b; }
.gt-carrom .gt-art i:nth-child(2) { left: 7px; top: 8px; background: #222; } .gt-carrom .gt-art i:nth-child(3) { right: 7px; bottom: 8px; background: #f4ecd8; }
.gt-carrom .gt-art i:nth-child(4) { right: 8px; top: 9px; background: #222; }

/* Ludo screen: the board replaces the card table */
.ludo { display: none; }
body.g-ludo .table, body.g-ludo #hand, body.g-ludo .actions, body.g-ludo #kbdHint { display: none !important; }
body:not(.g-ludo) #kbdHintLudo { display: none !important; }
body.g-ludo .ludo { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1; justify-content: center; width: 100%; padding: 6px 12px; min-height: 0; }
.ludo-board {
  width: min(94vw, 520px); height: auto; aspect-ratio: 1; max-height: calc(100vh - 330px); border-radius: 18px; display: block;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--text) 6%, #1b1433), 0 20px 50px #0009;
}
.lb-base { fill: #f6f0e4; }
[data-theme="neon"] .lb-base { fill: #12122a; }
.lb-yard { transition: filter .3s; }
.lb-yard.turn { animation: yardGlow 1.4s ease-in-out infinite; }
@keyframes yardGlow { 50% { filter: brightness(1.25) drop-shadow(0 0 .25px #fff); } }
.lb-yard-in { fill: #fffdf8; }
[data-theme="neon"] .lb-yard-in { fill: #1c1c3a; }
.lb-cell { fill: #fffdf8; stroke: #0000001f; stroke-width: .04; }
.lb-cell[fill]:not([fill=""]) { fill-opacity: 1; }
[data-theme="neon"] .lb-cell:not([fill^="#"]) { fill: #22224a; stroke: #ffffff18; }
.lb-home { stroke: #0000001a; stroke-width: .04; }
.lb-star { fill: #0000002e; }
[data-theme="neon"] .lb-star { fill: #ffffff40; }
.lb-tri { stroke: #fff; stroke-width: .05; }
.tok { transition: transform .14s cubic-bezier(.3,.7,.4,1); cursor: default; }
.tok.flyback { transition-duration: .5s; transition-timing-function: cubic-bezier(.5,-.3,.4,1.3); }
.tok-sh { fill: #00000040; }
.tok-body { stroke: #fff; stroke-width: .09; }
.tok-dot { fill: #ffffffd9; }
.tok .halo { fill: none; stroke: #fff; stroke-width: .08; opacity: 0; }
.tok.can { cursor: pointer; }
.tok.can .halo { opacity: 1; animation: halo 1s ease-in-out infinite; stroke: #ffffff; }
.tok.can .tok-body { filter: drop-shadow(0 0 .12px #fff); }
@keyframes halo { 0% { r: .42; opacity: 1; } 100% { r: .62; opacity: 0; } }
.ludo-bar { display: flex; align-items: center; justify-content: center; gap: 18px; width: min(94vw, 520px); }
.ludo-turn { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; min-height: 24px; }
.ludo-turn .ldot { width: 14px; height: 14px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 30%, transparent); }
.dice {
  --dc: #888; width: 72px; height: 72px; border-radius: 18px; background: #fffdf8; display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr); padding: 11px; gap: 3px; flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--dc), 0 8px 0 color-mix(in srgb, var(--dc) 55%, #000), 0 14px 26px #0008; transition: transform .15s, box-shadow .2s;
}
.dice i { border-radius: 50%; }
.dice i.pip { background: #1b1433; box-shadow: inset 0 -2px 0 #000a; }
.dice.ready { animation: diceReady 1.1s ease-in-out infinite; cursor: pointer; }
@keyframes diceReady { 50% { transform: translateY(-5px) rotate(-4deg); box-shadow: 0 0 0 4px var(--dc), 0 13px 0 color-mix(in srgb, var(--dc) 55%, #000), 0 22px 30px #0008, 0 0 30px color-mix(in srgb, var(--dc) 70%, transparent); } }
.dice.rolling { animation: diceRoll .6s cubic-bezier(.3,.7,.4,1); }
@keyframes diceRoll { 0% { transform: rotate(0) scale(1); } 30% { transform: rotate(200deg) scale(1.18) translateY(-14px); } 65% { transform: rotate(330deg) scale(.95); } 100% { transform: rotate(360deg) scale(1); } }
.dice:active { transform: translateY(4px); }
.opp.lseat { box-shadow: inset 0 -3px 0 var(--lc); }
.opp.lseat .cnt { color: var(--text); font-weight: 700; }

@media (min-width: 1100px) and (min-height: 620px) {
  body.g-ludo .ludo { flex-direction: row; gap: 40px; }
  .ludo-board { width: min(68vh, 640px); max-height: none; }
  .ludo-bar { width: 200px; flex-direction: column; gap: 22px; }
  .ludo-turn { flex: none; font-size: 18px; }
  .dice { width: 96px; height: 96px; padding: 15px; border-radius: 22px; }
  #home .game-picker { max-width: 420px; }
  .game-tile:hover:not(.soon) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
}
@media (orientation: landscape) and (max-height: 540px) {
  body.g-ludo .ludo { grid-area: table / table / hand / hand; flex-direction: row; gap: 18px; }
  .ludo-board { width: auto; height: calc(100vh - 120px); max-height: none; }
  .ludo-bar { width: 150px; flex-direction: column; }
  .dice { width: 60px; height: 60px; padding: 9px; }
}
.afk-banner {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 60px); transform: translateX(-50%); z-index: 12; width: min(92%, 420px);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel2);
  border: 1px solid color-mix(in srgb, var(--y) 45%, transparent); box-shadow: 0 14px 34px #0009; animation: drop .4s cubic-bezier(.2,1.4,.4,1);
}
.afk-banner > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.afk-banner small { color: var(--muted); }
.afk-banner .btn { width: auto; flex-shrink: 0; }
/* Ludo layout fixes */
body.g-ludo .react-fab { bottom: calc(var(--safe-b) + 66px); }
@media (min-width: 1100px) and (min-height: 620px) {
  body.g-ludo .opp { transform: none; }
  body.g-ludo .opp.turn { transform: translateY(2px) scale(1.04); }
  .ludo-board { width: min(calc(100vh - 300px), 640px); }
  body.g-ludo .react-fab { bottom: 90px; }
}
/* entrance animations only for genuinely new rows (see patchList) */
.lobby-players li { animation: none; }
.lobby-players li.enter-item { animation: up .25s ease-out; }
.msg.msg-in { animation: up .2s ease-out; }

/* ======================= v8: home hero per game ======================= */
.logo-ludo { display: none; }
#home[data-game="ludo"] .logo-cards { display: none; }
#home[data-game="ludo"] .logo-ludo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 104px; height: 104px; margin: 0 auto; padding: 6px; position: relative;
  background: #f6f0e4; border-radius: 18px; box-shadow: 0 0 0 4px #ffffff22, 0 14px 30px #0008; animation: ludoIn .6s cubic-bezier(.2,1.5,.4,1) both;
}
.logo-ludo i { border-radius: 10px; position: relative; }
.logo-ludo i::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: #fffdf8; box-shadow: inset 0 0 0 4px currentColor; }
.logo-ludo i:nth-child(1) { background: var(--r); color: var(--r); } .logo-ludo i:nth-child(2) { background: var(--g); color: var(--g); }
.logo-ludo i:nth-child(3) { background: var(--b); color: var(--b); } .logo-ludo i:nth-child(4) { background: var(--y); color: var(--y); }
.logo-ludo b { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%) rotate(45deg); border-radius: 6px; background: conic-gradient(var(--g) 0 25%, var(--y) 0 50%, var(--b) 0 75%, var(--r) 0); box-shadow: 0 0 0 3px #f6f0e4; }
@keyframes ludoIn { from { transform: scale(.6) rotate(-14deg); opacity: 0; } }
#heroTitle .lr { color: var(--r); } #heroTitle .lg { color: var(--g); } #heroTitle .ly { color: var(--y); } #heroTitle .lb { color: var(--b); }
#heroTitle span { margin-left: 0; }
#heroTitle span.acc { color: var(--accent); margin-left: 4px; }
.logo.swap { animation: heroSwap .45s cubic-bezier(.2,.9,.3,1.1); }
@keyframes heroSwap { 0% { opacity: 0; transform: translateY(10px) scale(.97); } }
/* Ludo gets its own accent on the home screen, lobby and table */
#home[data-game="ludo"], body.g-ludo { --accent: #ffc23d; --accent-ink: #2a1a00; }
#home[data-game="ludo"] { background: radial-gradient(70% 45% at 50% 18%, color-mix(in srgb, var(--g) 16%, transparent), transparent 70%); }
@media (min-width: 1100px) and (min-height: 620px) {
  #home[data-game="ludo"] .logo-ludo { width: 190px; height: 190px; gap: 10px; padding: 10px; border-radius: 28px; margin: 0 0 18px 40px; }
  #home[data-game="ludo"] .logo-ludo b { width: 54px; height: 54px; }
  #home[data-game="ludo"] { background: none; }
}

/* ======================= v9: calmer player card + menu shortcuts ======================= */
#playerSheet .sheet { gap: 14px; }
#playerSheet .profile-hero { padding-bottom: 2px; }
.throw-label { margin: 2px 0 -6px; font-size: 12px; letter-spacing: .3px; }
.throw-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%; }
.throw-row button { font-size: 24px; padding: 0; aspect-ratio: 1; border-radius: 12px; background: var(--panel); display: grid; place-items: center; transition: transform .12s ease, background .12s ease; }
.throw-row button:hover { background: var(--panel2); }
#pcActions { justify-content: center; gap: 8px; }
#pcActions .btn { flex: 0 1 auto; width: auto; min-width: 0; padding: 9px 14px; font-size: 14px; box-shadow: none; background: var(--panel); }
#pcActions .btn.danger { background: transparent; color: #ff7b8f; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #ff7b8f 55%, transparent); }
#pcActions .btn.danger:hover { background: color-mix(in srgb, #ff7b8f 12%, transparent); }
#pcStats.hidden, #pcBadges:empty, #pcForm:empty { display: none; }
.kbd-hint { display: none !important; }
.menu-keys { width: 100%; display: none; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.menu-keys > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.g-ludo .menu-keys .keys-cards, body:not(.g-ludo) .menu-keys .keys-ludo { display: none; }
@media (min-width: 1100px) and (min-height: 620px) { .menu-keys.desk-only { display: flex; } }

/* ======================= v10: Carrom + random matches ======================= */
.carrom { display: none; }
body.g-carrom .table, body.g-carrom #hand, body.g-carrom .actions { display: none !important; }
body.g-carrom .carrom { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 1; width: 100%; min-height: 0; justify-content: center; padding: 4px 10px; }
.carrom-stage { width: min(94vw, 560px, calc(100vh - 330px)); aspect-ratio: 1; display: grid; place-items: center; }
#carromCanvas { display: block; border-radius: 14px; box-shadow: 0 24px 60px #000a; touch-action: none; cursor: crosshair; }
.carrom-side { width: min(94vw, 560px); display: flex; flex-direction: column; gap: 10px; }
.carrom-info { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-chip { flex: 1; min-width: 92px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--panel); border-radius: 12px; padding: 7px 10px; }
.cr-chip i { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 3px #0003; }
.cr-chip b { font-size: 13px; } .cr-chip small { font-size: 11px; color: var(--muted); }
.cr-w i { background: #f4ead2; } .cr-b i { background: #2b2b2b; box-shadow: inset 0 0 0 3px #ffffff22; } .cr-q i { background: #d6312b; box-shadow: inset 0 0 0 3px #ffd76a66; }
.carrom-slider { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-weight: 700; }
.carrom-slider.off { opacity: .45; }
.carrom-slider input { flex: 1; accent-color: var(--accent); height: 28px; }
.carrom-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
#home[data-game="carrom"], body.g-carrom { --accent: #f0a24a; --accent-ink: #2a1400; }
.logo-carrom { display: none; }
#home[data-game="carrom"] .logo-cards { display: none; }
#home[data-game="carrom"] .logo-carrom {
  display: block; position: relative; width: 112px; height: 112px; margin: 0 auto; border-radius: 16px; animation: ludoIn .6s cubic-bezier(.2,1.5,.4,1) both;
  background: radial-gradient(circle at 50% 45%, #f3dcae, #d8ae73); box-shadow: inset 0 0 0 9px #5a3218, inset 0 0 0 10px #0004, 0 16px 34px #0009;
}
.logo-carrom i { position: absolute; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 2px 3px #0005; }
.logo-carrom i:nth-child(1) { left: 48px; top: 48px; background: #d6312b; }
.logo-carrom i:nth-child(2) { left: 33px; top: 40px; background: #f4ead2; } .logo-carrom i:nth-child(3) { left: 63px; top: 40px; background: #2b2b2b; }
.logo-carrom i:nth-child(4) { left: 40px; top: 62px; background: #2b2b2b; } .logo-carrom i:nth-child(5) { left: 57px; top: 62px; background: #f4ead2; }
.logo-carrom b { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #111; box-shadow: 86px 0 0 #111, 0 86px 0 #111, 86px 86px 0 #111; left: 12px; top: 12px; }
@media (min-width: 1100px) and (min-height: 620px) {
  body.g-carrom .carrom { flex-direction: row; gap: 36px; }
  .carrom-stage { width: min(calc(100vh - 290px), 660px); }
  .carrom-side { width: 230px; }
  .carrom-info { flex-direction: column; }
  #home[data-game="carrom"] .logo-carrom { width: 190px; height: 190px; margin: 0 0 18px 40px; transform: scale(1); }
  #home[data-game="carrom"] .logo-carrom i { width: 24px; height: 24px; }
  #home[data-game="carrom"] .logo-carrom i:nth-child(1) { left: 83px; top: 83px; } #home[data-game="carrom"] .logo-carrom i:nth-child(2) { left: 58px; top: 70px; }
  #home[data-game="carrom"] .logo-carrom i:nth-child(3) { left: 108px; top: 70px; } #home[data-game="carrom"] .logo-carrom i:nth-child(4) { left: 70px; top: 108px; }
  #home[data-game="carrom"] .logo-carrom i:nth-child(5) { left: 98px; top: 108px; }
  #home[data-game="carrom"] .logo-carrom b { width: 20px; height: 20px; left: 18px; top: 18px; box-shadow: 134px 0 0 #111, 0 134px 0 #111, 134px 134px 0 #111; }
}
@media (orientation: landscape) and (max-height: 540px) {
  body.g-carrom .carrom { grid-area: table / table / hand / hand; flex-direction: row; }
  .carrom-stage { width: calc(100vh - 110px); }
  .carrom-side { width: 200px; }
}

/* play online: searching + match found */
.sheet.match { text-align: center; }
.radar { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin: 4px 0 2px; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: .8s; } .radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.match-art { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.match-art.gt-ludo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; background: #f4efe4; border-radius: 10px; }
.match-art.gt-ludo i:nth-child(1) { background: var(--r); } .match-art.gt-ludo i:nth-child(2) { background: var(--g); } .match-art.gt-ludo i:nth-child(3) { background: var(--b); } .match-art.gt-ludo i:nth-child(4) { background: var(--y); }
.match-art.gt-ludo i { border-radius: 4px; }
.match-art.gt-cards i { position: absolute; width: 20px; height: 30px; border-radius: 4px; border: 2px solid #fff; transform-origin: 50% 120%; }
.match-art.gt-cards i:nth-child(1) { background: var(--r); transform: rotate(-24deg); } .match-art.gt-cards i:nth-child(2) { background: var(--y); transform: rotate(-8deg); }
.match-art.gt-cards i:nth-child(3) { background: var(--g); transform: rotate(8deg); } .match-art.gt-cards i:nth-child(4) { background: var(--b); transform: rotate(24deg); }
.match-art.gt-carrom { background: radial-gradient(circle, #f3dcae, #d8ae73); border-radius: 8px; box-shadow: inset 0 0 0 4px #5a3218; }
.match-art.gt-carrom i { position: absolute; width: 10px; height: 10px; border-radius: 50%; }
.match-art.gt-carrom i:nth-child(1) { background: #d6312b; } .match-art.gt-carrom i:nth-child(2) { background: #2b2b2b; transform: translate(-12px, -8px); }
.match-art.gt-carrom i:nth-child(3) { background: #f4ead2; transform: translate(12px, 8px); } .match-art.gt-carrom i:nth-child(4) { background: #2b2b2b; transform: translate(10px, -10px); }
.match-dots { display: flex; gap: 8px; justify-content: center; }
.match-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--panel2); transition: background .3s, transform .3s; }
.match-dots i.on { background: var(--accent); transform: scale(1.15); }
#btnMatchBots.nudge { box-shadow: 0 0 0 2px var(--accent), 0 4px 0 var(--shadow); }
.match-found { position: fixed; inset: 0; z-index: 48; display: grid; place-items: center; background: #0008; animation: fade .2s; pointer-events: none; }
.mf-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; border-radius: 24px; background: var(--bg2); box-shadow: 0 30px 80px #000c, 0 0 0 2px var(--accent); animation: mfPop .5s cubic-bezier(.2,1.6,.4,1); }
.mf-card small { color: var(--accent); font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; font-size: 12px; }
.mf-card b { font-size: 30px; }
.mf-names { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 320px; margin-top: 4px; }
.mf-names span { background: var(--panel); padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; animation: up .3s ease-out both; }
.mf-names span:nth-child(2) { animation-delay: .1s; } .mf-names span:nth-child(3) { animation-delay: .2s; } .mf-names span:nth-child(4) { animation-delay: .3s; }
@keyframes mfPop { from { transform: scale(.6); opacity: 0; } }
.dice-label { grid-column: 1 / -1; grid-row: 1 / -1; align-self: center; justify-self: center; font-weight: 900; font-size: 15px; color: #1b1433; letter-spacing: .5px; }
.match-art.gt-ludo { place-items: stretch; }

/* ======================= v11: plug-in board games ======================= */
.gboard { display: none; }
body.g-plug .table, body.g-plug #hand, body.g-plug .actions { display: none !important; }
body.g-plug .gboard { display: flex; flex: 1; width: 100%; min-height: 0; align-items: center; justify-content: center; padding: 6px 12px; }
body.g-plug { --accent: var(--plug-accent, #ff7a3d); --accent-ink: #160b2a; }
.gb { width: min(94vw, 520px, calc(100vh - 320px)); display: grid; place-items: center; }
.gt-art svg { width: 40px; height: 40px; display: block; }
.hero-art { display: none; }
#home .hero-art:not(:empty) { display: block; width: 112px; height: 112px; margin: 0 auto; animation: ludoIn .6s cubic-bezier(.2,1.5,.4,1) both; filter: drop-shadow(0 14px 24px #0009); }
#home .hero-art:not(:empty) ~ .logo-cards, #home:has(.hero-art:not(:empty)) .logo-cards { display: none; }
.hero-art svg { width: 100%; height: 100%; }
.game-picker { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 699px) {
  .game-picker { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .game-tile { padding: 9px 4px 8px; gap: 5px; }
  .game-tile .gt-t small { display: none; }
  .gt-art { width: 40px; height: 34px; }
}
.menu-art svg { width: 100%; height: 100%; }
/* Tic-Tac-Toe */
.gb-ttt { grid-template-columns: repeat(3, 1fr); gap: 10px; aspect-ratio: 1; padding: 10px; background: var(--panel); border-radius: 22px; box-shadow: 0 20px 50px #0008; }
.ttt-cell { width: 100%; aspect-ratio: 1; border-radius: 16px; background: var(--bg2); display: grid; place-items: center; transition: background .15s, transform .1s; }
.ttt-cell:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); }
.ttt-cell:active:not(:disabled) { transform: scale(.96); }
.ttt-cell svg { width: 66%; height: 66%; fill: none; stroke-width: 6; stroke-linecap: round; }
.ttt-cell.X svg { stroke: #ff4d5e; } .ttt-cell.O svg { stroke: #3d8bff; }
.ttt-cell .draw { stroke-dasharray: 80; stroke-dashoffset: 80; animation: drawIn .35s ease-out forwards; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
.ttt-cell.win { background: color-mix(in srgb, var(--y) 26%, var(--bg2)); animation: pulse 1s ease-in-out infinite; }
/* Connect Four */
.c4-frame { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; width: 100%; background: linear-gradient(180deg, #3b6ef0, #2448b8); border-radius: 20px; box-shadow: inset 0 -6px 0 #0003, 0 20px 50px #0009; }
.c4-col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; padding: 0; border-radius: 12px; position: relative; overflow: visible; }
.c4-col:not(:disabled):hover { background: #ffffff18; }
.c4-col:not(:disabled):hover::before { content: ""; position: absolute; left: 10%; right: 10%; top: -38px; aspect-ratio: 1; border-radius: 50%; background: var(--mine); opacity: .7; }
.c4-slot { aspect-ratio: 1; border-radius: 50%; background: #121035; box-shadow: inset 0 3px 6px #000a; }
.c4-slot.d1 { background: radial-gradient(circle at 35% 30%, #ff8a95, #e2283b); box-shadow: inset 0 -3px 0 #0003; }
.c4-slot.d2 { background: radial-gradient(circle at 35% 30%, #ffe08a, #f0aa12); box-shadow: inset 0 -3px 0 #0003; }
.c4-slot.win { animation: pulse .9s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; }
/* Dots & Boxes */
.dots-svg { width: 100%; height: auto; background: var(--panel); border-radius: 20px; box-shadow: 0 20px 50px #0008; }
.dots-svg .dot { fill: var(--text); }
.dots-svg .box { fill: transparent; opacity: .55; transition: fill .3s; }
.dots-svg .box.owned { animation: boxIn .35s ease-out; }
@keyframes boxIn { from { opacity: 0; } }
.dots-svg .hit { stroke: transparent; stroke-width: 3.2; stroke-linecap: round; cursor: default; }
.dots-svg .stroke { stroke: color-mix(in srgb, var(--text) 10%, transparent); stroke-width: 0.7; stroke-linecap: round; transition: stroke .2s; }
.dots-svg .ln.open .hit { cursor: pointer; }
.dots-svg .ln.open:hover .stroke { stroke: color-mix(in srgb, var(--text) 45%, transparent); }
.dots-svg .ln.set .stroke { stroke-width: 1.1; }
.dots-svg .ln.last .stroke { filter: drop-shadow(0 0 .8px #fff); }
/* Snakes & Ladders */
.gb-snakes { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
.sl-svg { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 20px 50px #0009; background: #fff8ea; }
.sl-cell.a { fill: #fff3dc; } .sl-cell.b { fill: #fde4c0; }
.sl-num { font-size: .26px; fill: #8b6a43; font-weight: 700; }
.sl-ladder line { stroke: #8b5a2b; stroke-width: .09; stroke-linecap: round; } .sl-ladder .rung { stroke-width: .07; }
.sl-snake .body { stroke: #2ecc8f; stroke-width: .3; fill: none; stroke-linecap: round; opacity: .92; }
.sl-snake .stripe { stroke: #13824f; stroke-width: .08; stroke-dasharray: .12 .2; fill: none; }
.sl-snake .head { fill: #13824f; }
.sl-tok { transition: transform .15s ease; }
.sl-tok .tb { stroke: #fff; stroke-width: .07; filter: drop-shadow(0 .06px .08px #0008); } .sl-tok .td { fill: #fffc; }
.sl-dice { width: 64px; height: 64px; }
/* Mancala */
.mc-board { width: 100%; display: grid; grid-template-columns: 1fr 6fr 1fr; gap: 10px; padding: 14px; border-radius: 60px; background: linear-gradient(180deg, #b07a42, #8a5a2c); box-shadow: inset 0 -6px 0 #0003, 0 20px 50px #0009; }
.mc-rows { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.mc-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mc-pit, .mc-store { position: relative; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #5c381a, #6e4422); box-shadow: inset 0 4px 8px #000a; display: grid; place-items: center; color: #fff; }
.mc-pit { aspect-ratio: 1; }
.mc-store { border-radius: 40px; min-height: 100%; }
.mc-pit.mine:not(:disabled) { cursor: pointer; box-shadow: inset 0 4px 8px #000a, 0 0 0 3px color-mix(in srgb, var(--y) 70%, transparent); }
.mc-pit.mine:not(:disabled):hover { filter: brightness(1.2); }
.mc-pit b, .mc-store b { position: absolute; bottom: -2px; right: -2px; font-size: 11px; background: #1b1433; border-radius: 99px; padding: 1px 6px; }
.mc-store b { bottom: 6px; right: 50%; transform: translateX(50%); font-size: 13px; }
.seeds { position: absolute; inset: 22%; }
.seeds i { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; border-radius: 50%; background: hsl(var(--h) 70% 70%); box-shadow: inset -1px -1px 0 #0004; transform: translate(-50%, -50%) rotate(var(--a)) translateX(calc(var(--d) * 70%)); }
/* Checkers */
.ck-board { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 8px #4a2b16, 0 20px 50px #0009; }
.ck-sq { position: relative; display: grid; place-items: center; padding: 0; }
.ck-sq.light { background: #ecd6b0; } .ck-sq.dark { background: #8a5631; }
.ck-sq.last { box-shadow: inset 0 0 0 100px #ffd76a33; }
.ck-sq.sel { box-shadow: inset 0 0 0 3px #ffd76a; }
.ck-sq.target::after { content: ""; width: 32%; height: 32%; border-radius: 50%; background: #ffffffaa; box-shadow: 0 0 10px #fff; }
.ck-sq.can { cursor: pointer; }
.ck-pc { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 -4px 0 #0005, 0 3px 6px #0007; }
.ck-pc.red { background: radial-gradient(circle at 35% 30%, #ff8a8a, #c62828); }
.ck-pc.blk { background: radial-gradient(circle at 35% 30%, #5a5a5a, #161616); }
.ck-pc svg { width: 55%; height: 55%; fill: #ffd76a; }
.ck-sq.can .ck-pc { box-shadow: inset 0 -4px 0 #0005, 0 0 0 2px #ffd76a99, 0 3px 6px #0007; }
@media (min-width: 1100px) and (min-height: 620px) { .gb { width: min(calc(100vh - 300px), 620px); } }
@media (orientation: landscape) and (max-height: 540px) {
  body.g-plug .gboard { grid-area: table / table / hand / hand; }
  .gb { width: calc(100vh - 110px); }
}

/* ======================= v11: in-game menu ======================= */
.menu-sheet { align-items: stretch; gap: 12px; }
.menu-head { display: flex; align-items: center; gap: 12px; }
.menu-art { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; position: relative; }
.mh-t { flex: 1; display: flex; flex-direction: column; text-align: left; }
.mh-t b { font-size: 18px; } .mh-t small { color: var(--muted); } .mh-t small span { color: var(--text); font-weight: 800; letter-spacing: 2px; }
.menu-list { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border-radius: 16px; padding: 6px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-align: left; width: 100%; transition: background .12s; }
.menu-row:hover, .menu-row:focus-visible { background: color-mix(in srgb, var(--text) 7%, transparent); }
.menu-row .mr-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex-shrink: 0; }
.menu-row .mr-ic .ic { width: 20px; height: 20px; }
.menu-row .mr-t { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.menu-row .mr-t b { font-size: 15px; } .menu-row .mr-t small { font-size: 12px; color: var(--muted); }
.menu-row > .ic { width: 16px; height: 16px; color: var(--muted); transform: rotate(180deg); }
.menu-row.danger { color: #ff8a9a; } .menu-row.danger .mr-ic { background: #ff4d5e1f; color: #ff6b7d; }
.menu-art.gt-ludo, .menu-art.gt-cards, .menu-art.gt-carrom { width: 44px; height: 44px; }
.menu-art.gt-ludo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; background: #f4efe4; border-radius: 10px; place-items: stretch; }
.menu-art.gt-ludo i { border-radius: 4px; } .menu-art.gt-ludo i:nth-child(1) { background: var(--r); } .menu-art.gt-ludo i:nth-child(2) { background: var(--g); } .menu-art.gt-ludo i:nth-child(3) { background: var(--b); } .menu-art.gt-ludo i:nth-child(4) { background: var(--y); }
.menu-art.gt-cards i { position: absolute; width: 16px; height: 24px; border-radius: 3px; border: 2px solid #fff; transform-origin: 50% 120%; }
.menu-art.gt-cards i:nth-child(1) { background: var(--r); transform: rotate(-24deg); } .menu-art.gt-cards i:nth-child(2) { background: var(--y); transform: rotate(-8deg); }
.menu-art.gt-cards i:nth-child(3) { background: var(--g); transform: rotate(8deg); } .menu-art.gt-cards i:nth-child(4) { background: var(--b); transform: rotate(24deg); }
.menu-art.gt-carrom { background: radial-gradient(circle, #f3dcae, #d8ae73); border-radius: 9px; box-shadow: inset 0 0 0 4px #5a3218; }
.menu-art.gt-carrom i { position: absolute; width: 9px; height: 9px; border-radius: 50%; }
.menu-art.gt-carrom i:nth-child(1) { background: #d6312b; } .menu-art.gt-carrom i:nth-child(2) { background: #2b2b2b; transform: translate(-10px, -7px); }
.menu-art.gt-carrom i:nth-child(3) { background: #f4ead2; transform: translate(10px, 7px); } .menu-art.gt-carrom i:nth-child(4) { background: #2b2b2b; transform: translate(9px, -9px); }
@media (min-width: 1100px) and (min-height: 620px) {
  /* desktop: a drawer that slides in from the left */
  #menu.modal { justify-content: flex-start; align-items: stretch; }
  #menu .menu-sheet { max-width: 380px; height: 100%; max-height: none; border-radius: 0 24px 24px 0; animation: drawerIn .28s cubic-bezier(.2,.9,.3,1); padding: 22px 18px; overflow-y: auto; }
  @keyframes drawerIn { from { transform: translateX(-100%); } }
}
/* phone home: many games → scroll from the top instead of centring off-screen */
@media (max-width: 1099px), (max-height: 619px) {
  #home { justify-content: flex-start; overflow-y: auto; padding-top: calc(var(--safe-t) + 70px); padding-bottom: calc(var(--safe-b) + 24px); scrollbar-width: none; }
  #home::-webkit-scrollbar { display: none; }
  #home > * { flex-shrink: 0; }
  #home .logo { margin-bottom: 4px; }
  #home .logo h1 { font-size: 38px; margin-top: 6px; }
  #home .hero-art:not(:empty), #home[data-game] .logo-ludo, #home[data-game] .logo-carrom { width: 84px !important; height: 84px !important; }
  #home .logo-cards { height: 70px; }
}
/* shortcuts in the menu only for games that have them */
body.g-plug .menu-keys .keys-cards, body.g-carrom .menu-keys .keys-cards, body.g-plug .menu-keys .keys-ludo, body.g-carrom .menu-keys .keys-ludo { display: none; }

/* ======================= v12: hub (landing, library, profile, auth) ======================= */
.legacy { display: none !important; }
#hub.screen { display: block; padding: 0; overflow-y: auto; overflow-x: hidden; align-items: stretch; scroll-behavior: smooth; }
#hub.hidden { display: none !important; }
.hub { --max: 1180px; }
.hub-nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: calc(var(--safe-t) + 12px) max(20px, calc((100% - var(--max)) / 2)) 12px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 7%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 19px; letter-spacing: -.3px; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); }
.brand-mark i { border-radius: 5px; } .brand-mark i:nth-child(1) { background: var(--r); } .brand-mark i:nth-child(2) { background: var(--y); } .brand-mark i:nth-child(3) { background: var(--b); } .brand-mark i:nth-child(4) { background: var(--g); }
.brand.small .brand-mark { width: 22px; height: 22px; }
.hub-links { display: flex; gap: 4px; }
.hub-links a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; }
.hub-links a:hover, .hub-links a.sel { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.hub-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.online-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.online-pill i, .cv-live.hot i { width: 8px; height: 8px; border-radius: 50%; background: var(--g); box-shadow: 0 0 0 0 var(--g); animation: livePulse 1.8s infinite; display: inline-block; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--g) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.nav-user { display: flex; align-items: center; gap: 8px; }
.nav-user .btn { width: auto; }
.nav-me { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--panel); }
.nav-me span { display: flex; flex-direction: column; line-height: 1.15; } .nav-me b { font-size: 14px; } .nav-me small { font-size: 11px; color: var(--muted); }
.hub-main { max-width: var(--max); margin: 0 auto; padding: 8px 20px calc(var(--safe-b) + 40px); }
.hub-main.view-in { animation: viewIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.tabbar { display: none; }
.hub-sec { margin-top: 44px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hub-sec h2, .sec-head h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.3px; }
.sec-head h2 { margin: 0; }
.link-more { color: var(--accent); text-decoration: none; font-weight: 800; font-size: 14px; }
.hub .btn { width: auto; text-decoration: none; }
.hub .btn.ghost { border: 1.5px solid color-mix(in srgb, var(--text) 18%, transparent); }

/* landing */
.landing-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 56px 0 24px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; font-size: 13px; }
.landing-hero h1 { margin: 0 0 18px; font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -2px; }
.lead { margin: 0 0 28px; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 540px; }
.lh-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lh-cta .btn { padding: 14px 22px; }
.live-stats { display: flex; gap: 32px; margin-top: 34px; }
.live-stats div { display: flex; flex-direction: column; } .live-stats b { font-size: 26px; letter-spacing: -.5px; } .live-stats span { font-size: 13px; color: var(--muted); }
.lh-art { position: relative; height: 420px; }
.cl { position: absolute; width: 200px; height: 250px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 34%, var(--panel)), var(--panel)); box-shadow: 0 30px 60px #000a, inset 0 0 0 1px #ffffff14; animation: floaty 6s ease-in-out infinite; }
.cl svg { width: 110px; height: 110px; filter: drop-shadow(0 12px 18px #0008); } .cl b { font-size: 18px; }
.cl.c0 { left: 4%; top: 30px; transform: rotate(-10deg); } .cl.c1 { left: 38%; top: 0; transform: rotate(4deg); animation-delay: -1.5s; z-index: 2; }
.cl.c2 { left: 14%; top: 170px; transform: rotate(6deg); animation-delay: -3s; z-index: 3; } .cl.c3 { left: 50%; top: 180px; transform: rotate(-5deg); animation-delay: -4.5s; }
@keyframes floaty { 50% { translate: 0 -12px; } }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat { background: var(--panel); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.feat .ic { width: 28px; height: 28px; color: var(--accent); } .feat b { font-size: 16px; } .feat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 900; display: grid; place-items: center; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.cta-band { margin-top: 56px; padding: 44px; border-radius: 28px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 30%, var(--panel)), var(--panel)); }
.cta-band h2 { margin: 0 0 18px; font-size: 30px; } .cta-band .lh-cta { justify-content: center; }
.hub-foot { margin-top: 64px; padding: 28px 0 8px; border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; color: var(--muted); }
.hub-foot nav { display: flex; gap: 18px; } .hub-foot a { color: var(--muted); text-decoration: none; font-weight: 600; } .hub-foot a:hover { color: var(--text); }
.hub-foot small { width: 100%; font-size: 12px; }

/* covers */
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.cover { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--panel);
  box-shadow: 0 1px 0 #ffffff0d inset, 0 10px 26px #0005; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.cover:hover { transform: translateY(-4px); box-shadow: 0 1px 0 #ffffff12 inset, 0 18px 40px #0008, 0 0 0 2px color-mix(in srgb, var(--ac) 60%, transparent); }
.cv-art { display: grid; place-items: center; height: 150px; background: radial-gradient(80% 90% at 50% 40%, color-mix(in srgb, var(--ac) 45%, transparent), transparent 70%), linear-gradient(160deg, color-mix(in srgb, var(--ac) 22%, var(--panel2)), var(--panel)); }
.cv-art svg { width: 96px; height: 96px; filter: drop-shadow(0 10px 14px #0007); transition: transform .25s; }
.cover:hover .cv-art svg { transform: scale(1.06) rotate(-3deg); }
.cv-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.cv-body b { font-size: 17px; } .cv-body small { color: var(--muted); font-size: 13px; line-height: 1.4; min-height: 36px; }
.cv-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.cv-live { display: inline-flex; align-items: center; gap: 6px; }
.cv-live.hot { color: var(--g); }
.cv-live.big { margin-top: 10px; font-size: 14px; font-weight: 800; color: var(--muted); }
.cv-art.tiny { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.cv-art.tiny svg { width: 26px; height: 26px; }

/* home for logged-in players */
.welcome { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 36px 0 8px; }
.wl-who { display: flex; align-items: center; gap: 16px; } .wl-who h1 { margin: 2px 0; font-size: 34px; letter-spacing: -1px; } .wl-who small { color: var(--muted); font-weight: 700; } .wl-level { color: var(--accent); font-weight: 800; font-size: 13px; }
.wl-actions { display: flex; gap: 12px; }
.continue, .daily-mini { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 18px; background: var(--panel); text-decoration: none; color: var(--text); text-align: left; }
.continue .cv-art { width: 52px; height: 52px; border-radius: 14px; } .continue .cv-art svg { width: 38px; height: 38px; }
.continue span, .daily-mini span { display: flex; flex-direction: column; } .continue small, .daily-mini small { color: var(--muted); font-size: 12px; font-weight: 700; } .continue b, .daily-mini b { font-size: 16px; }
.continue > .ic { color: var(--ac); margin-left: 10px; } .daily-mini > .ic { width: 34px; height: 34px; color: var(--accent); padding: 6px; }

/* library */
.lib-head h1 { margin: 24px 0 18px; font-size: 34px; letter-spacing: -1px; }
.lib-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 14px; padding: 0 14px; min-width: 260px; flex: 0 1 320px; }
.search .ic { color: var(--muted); } .search input { background: none; border: 0; padding: 12px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 9px 14px; border-radius: 99px; background: var(--panel); font-weight: 700; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.chip:hover { color: var(--text); } .chip.sel { background: var(--accent); color: var(--accent-ink); }
#libGrid { margin-top: 22px; }

/* game page */
.game-hero { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; margin-top: 18px; padding: 40px; border-radius: 30px;
  background: radial-gradient(70% 120% at 15% 30%, color-mix(in srgb, var(--ac) 40%, transparent), transparent 70%), var(--panel); overflow: hidden; }
.back-link { position: absolute; top: 18px; left: 22px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; }
.gh-art svg { width: 180px; height: 180px; filter: drop-shadow(0 20px 30px #000a); }
.gh-copy h1 { margin: 6px 0 10px; font-size: clamp(34px, 5vw, 56px); letter-spacing: -1.5px; }
.gh-copy p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 620px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tags span { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.play-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.mode { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--panel); text-align: left; transition: transform .15s, background .15s; }
.mode:hover { transform: translateY(-2px); background: var(--panel2); }
.mode > .ic { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.mode span { display: flex; flex-direction: column; gap: 2px; } .mode b { font-size: 16px; } .mode small { color: var(--muted); font-size: 12.5px; }
.mode.primary { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); color: var(--accent-ink); }
.mode.primary > .ic, .mode.primary small { color: var(--accent-ink); opacity: .85; }
.join-in { display: flex !important; flex-direction: row !important; gap: 6px; margin-top: 4px; }
.join-in input { padding: 8px 10px; font-size: 15px; letter-spacing: 3px; text-transform: uppercase; width: 92px; text-align: center; font-weight: 800; }
.join-in .btn { padding: 8px 12px; }
.game-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.game-cols .hub-sec { margin-top: 32px; }
.how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.45; }
.my-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.my-stats > div:not(.empty-state) { background: var(--panel); border-radius: 14px; padding: 14px 8px; text-align: center; display: flex; flex-direction: column; }
.my-stats b { font-size: 24px; } .my-stats span { font-size: 12px; color: var(--muted); }
.my-stats .empty-state, .board-list .empty-state { grid-column: 1 / -1; padding: 18px 10px; text-align: left; }
.board-list .board-row { display: grid; grid-template-columns: 28px 40px 1fr auto; }
.board-list .n small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.board-list.wide { margin-top: 18px; max-width: 760px; }

/* profile */
.me-hero { display: flex; align-items: center; gap: 22px; padding: 36px 0 8px; }
.me-hero h1 { margin: 0 0 4px; font-size: 34px; letter-spacing: -1px; }
.me-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.guest-cta { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 24px; border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 26%, var(--panel)), var(--panel)); }
.guest-cta b { font-size: 18px; } .guest-cta p { margin: 4px 0 0; color: var(--muted); max-width: 520px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); color: var(--text); text-decoration: none; }
.stat-card .cv-art { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 12px; } .stat-card .cv-art svg { width: 34px; height: 34px; }
.stat-card > span:last-child { font-size: 13px; color: var(--muted); }
.hist-row .res.w { background: var(--g); color: #06291b; } .hist-row .res.d { background: var(--panel2); color: var(--text); }
.history .hist-row .d { display: flex; flex-direction: column; }
.pw-form { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.pw-form .btn { align-self: flex-start; }
.room-invite { text-align: center; padding: 80px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ri-badge .ic { width: 56px; height: 56px; color: var(--accent); }
.room-invite h1 { margin: 0; font-size: 38px; } .room-invite p { margin: 0 0 8px; color: var(--muted); font-size: 17px; }

/* auth dialog */
.sheet.auth { align-items: stretch; gap: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border-radius: 12px; padding: 4px; }
.auth-tabs button { padding: 10px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.auth-tabs button.sel { background: var(--accent); color: var(--accent-ink); }
#authForm { display: flex; flex-direction: column; gap: 12px; }
.field .err { color: #ff8a9a; font-size: 12.5px; min-height: 0; }
.field .err:empty { display: none; }
.form-err { margin: 0; color: #ff8a9a; font-size: 14px; } .form-err:empty { display: none; }
.pw { display: flex; position: relative; } .pw input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 800; color: var(--muted); padding: 6px 8px; }
#authSubmit.busy { opacity: .7; pointer-events: none; }
#authSubmit.busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* phone */
@media (max-width: 860px) {
  .hub-links, .online-pill { display: none; }
  .hub-nav { padding: calc(var(--safe-t) + 10px) 16px 10px; gap: 12px; }
  .nav-me span { display: none; } .nav-me { padding: 2px; }
  .nav-user .btn.ghost { display: none; }
  .hub-main { padding: 4px 16px calc(var(--safe-b) + 92px); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 6px 6px calc(var(--safe-b) + 6px);
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  }
  #hub.hidden .tabbar { display: none; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; border-radius: 12px; }
  .tabbar a .ic { width: 22px; height: 22px; } .tabbar a.sel { color: var(--accent); }
  .landing-hero { grid-template-columns: 1fr; padding: 24px 0 8px; gap: 8px; }
  .lh-art { height: 230px; order: -1; } .cl { width: 120px; height: 150px; border-radius: 18px; } .cl svg { width: 64px; height: 64px; } .cl b { font-size: 13px; }
  .cl.c0 { left: 2%; top: 30px; } .cl.c1 { left: 34%; top: 0; } .cl.c2 { left: 18%; top: 82px; } .cl.c3 { left: 58%; top: 74px; }
  .lead { font-size: 16px; } .live-stats { gap: 22px; margin-top: 24px; } .live-stats b { font-size: 22px; }
  .features, .steps ol { grid-template-columns: 1fr 1fr; } .steps ol { grid-template-columns: 1fr; }
  .cover-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cv-art { height: 110px; } .cv-art svg { width: 70px; height: 70px; }
  .cv-body { padding: 10px 12px 12px; } .cv-body b { font-size: 15px; } .cv-body small { display: none; } .cv-meta { gap: 6px; font-size: 11px; }
  .welcome { grid-template-columns: 1fr; padding-top: 20px; } .wl-actions { flex-direction: column; }
  .game-hero { grid-template-columns: 1fr; padding: 48px 20px 24px; gap: 12px; text-align: center; justify-items: center; } .gh-art svg { width: 120px; height: 120px; } .tags { justify-content: center; }
  .play-modes { grid-template-columns: 1fr 1fr; } .mode.join { grid-column: 1 / -1; }
  .game-cols { grid-template-columns: 1fr; gap: 0; }
  .me-hero { flex-direction: column; text-align: center; } .me-actions { justify-content: center; }
  .cta-band { padding: 30px 18px; } .features .feat { padding: 16px; }
  .search { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; } .chips::-webkit-scrollbar { display: none; } .chip { flex-shrink: 0; }
}

/* ======================= v13: Color Rush table — one felt table that fills the screen ======================= */
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .table {
  --tint: var(--y); flex: 1 1 auto; width: 100%; min-height: 0; gap: clamp(22px, 6vw, 70px);
  margin: 4px 0 -18px; padding: 0 3%;
}
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .felt {
  display: block; position: absolute; inset: 7% 3% 2%; width: auto; height: auto; border-radius: 50%;
  /* the felt takes on the colour in play */
  background:
    radial-gradient(ellipse 62% 58% at 50% 45%, color-mix(in srgb, var(--tint) 46%, #1f1a4a) 0%, color-mix(in srgb, var(--tint) 26%, #161236) 58%, color-mix(in srgb, var(--tint) 10%, #100c28) 100%);
  box-shadow: inset 0 0 0 clamp(8px, 1.6vw, 14px) color-mix(in srgb, var(--tint) 10%, #0c0a20), inset 0 0 0 calc(clamp(8px, 1.6vw, 14px) + 2px) #ffffff10, inset 0 30px 80px #0007, 0 26px 60px #0009;
  transition: background .8s ease, box-shadow .8s ease;
}
/* stitched seam just inside the rail */
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .felt::after {
  content: ""; position: absolute; inset: clamp(16px, 2.6vw, 24px); border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--tint) 35%, #ffffff30); opacity: .55;
}
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .table::before { display: none; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .dir-ring { width: min(48vw, 38vh, 340px); height: min(48vw, 38vh, 340px); opacity: .7; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard { width: calc(var(--cw) * 1.55); height: calc(var(--ch) * 1.55); }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard .card { --s: 1.55; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .back-card { --s: 1.35; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .pending-banner { bottom: 14%; }
/* seats around the rail */
.opponents.seated { position: absolute; inset: 7% 3% 2%; padding: 0; display: block; z-index: 3; pointer-events: none; }
.opponents.seated .opp {
  position: absolute; left: var(--sx); top: var(--sy); translate: -50% -50%; transform: none; width: auto; min-width: 70px; pointer-events: auto;
  background: color-mix(in srgb, #0c0a20 82%, transparent); border: 2px solid #ffffff14; padding: 6px 10px 6px; border-radius: 18px; backdrop-filter: blur(4px);
}
.opponents.seated .opp.turn { border-color: var(--y); transform: scale(1.08); background: color-mix(in srgb, var(--y) 18%, #0c0a20); }
.opponents.seated.many .opp { min-width: 58px; padding: 4px 7px; }
/* your hand rests on the near rail */
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .hand { position: relative; z-index: 4; padding-top: 10px; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .hand .card { --s: 1.22; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .log-line { position: relative; z-index: 4; margin-top: 4px; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .actions { position: relative; z-index: 5; min-height: 0; }
body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .actions:empty, body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .actions:not(:has(.btn:not(.hidden))) { padding: 0; }
@media (max-width: 699px) {
  /* phones: a tall oval, seats along the top */
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .felt, .opponents.seated { inset: 9% 1% 1%; }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .table { flex-direction: column; gap: 18px; padding-top: 18%; }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard { width: calc(var(--cw) * 1.45); height: calc(var(--ch) * 1.45); }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard .card { --s: 1.45; }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .back-card { --s: 1.05; }
  .opponents.seated .opp { min-width: 62px; padding: 4px 8px; }
  .opponents.seated .opp .pts { display: none; }
}
@media (min-width: 1100px) and (min-height: 620px) {
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .table { min-height: 380px; }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard { width: calc(var(--cw) * 1.7); height: calc(var(--ch) * 1.7); }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .discard .card { --s: 1.7; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .opponents.seated { inset: 4% 2% 0; }
  body:not(.g-ludo):not(.g-carrom):not(.g-plug) #game .felt { inset: 4% 2% 0; }
}
@media (prefers-reduced-motion: reduce) { body #game .felt { transition: none; } }
.rules-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; font-size: 15px; text-align: left; }
.notice { position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); translate: -50% 0; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(560px, 92vw);
  padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--bg2); color: var(--text); box-shadow: 0 16px 40px #000a; border: 1.5px solid var(--b); animation: drop .4s cubic-bezier(.2,1.4,.4,1); }
.notice.success { border-color: var(--g); } .notice.warning { border-color: var(--y); }
.notice > .ic { color: var(--b); flex-shrink: 0; } .notice.success > .ic { color: var(--g); } .notice.warning > .ic { color: var(--y); }
.notice span { flex: 1; line-height: 1.4; } .notice-x { padding: 4px; color: var(--muted); }
/* hub v2: banner, recommendations, who's online, sign-in methods */
.site-banner { max-width: var(--max); margin: 12px auto 0; padding: 12px 18px; border-radius: 14px; font-weight: 700; background: color-mix(in srgb, var(--b) 18%, var(--panel)); border-left: 4px solid var(--b); }
.site-banner.success { background: color-mix(in srgb, var(--g) 16%, var(--panel)); border-color: var(--g); }
.site-banner.warning { background: color-mix(in srgb, var(--y) 16%, var(--panel)); border-color: var(--y); }
@media (max-width: 860px) { .site-banner { margin: 10px 16px 0; } }
.cv-art { position: relative; }
.cv-badge { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 99px; background: var(--ac); color: #160b2a; }
.rec-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rec { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--panel); color: var(--text); text-decoration: none; transition: background .15s; }
.rec:hover { background: var(--panel2); }
.rec .cv-art { width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0; } .rec .cv-art svg { width: 44px; height: 44px; }
.rec span:last-child { display: flex; flex-direction: column; gap: 2px; } .rec b { font-size: 16px; } .rec small { color: var(--muted); font-size: 13px; }
.online-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.online-row .op { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; padding: 12px 6px; border-radius: 16px; background: var(--panel); text-align: center; }
.online-row .op b { font-size: 13px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-row .op small { font-size: 11px; color: var(--muted); } .online-row .st-playing { color: var(--g); } .online-row .st-lobby { color: var(--y); }
.online-row .empty-state { padding: 16px 0; text-align: left; }
.admin-link .ic { width: 16px; height: 16px; }
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.method-tabs button { padding: 9px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--text) 12%, transparent); font-weight: 700; color: var(--muted); }
.method-tabs button.sel { border-color: var(--accent); color: var(--text); }
#phoneForm { display: flex; flex-direction: column; gap: 12px; }
#phoneForm.hidden { display: none; }
.chan-pick { display: flex; gap: 18px; font-weight: 700; } .chan-pick input { width: auto; accent-color: var(--accent); }
.code-in { letter-spacing: 10px; font-size: 22px; text-align: center; font-weight: 900; }
.dev-code { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--y) 16%, var(--panel)); font-weight: 800; }
.google-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.google-wrap .or { color: var(--muted); font-size: 13px; }

#codeSent { margin: 0 0 6px; }

/* ======================= v14: batch-2 games ======================= */
/* shared */
.gb-chess, .gb-battle, .gb-dominoes, .gb-trivia, .gb-draw, .gb-radio, .gb-pool { place-items: stretch; align-content: start; gap: 10px; }
body.g-plug[data-game="draw"] .gboard, body.g-plug[data-game="radio"] .gboard, body.g-plug[data-game="dominoes"] .gboard, body.g-plug[data-game="trivia"] .gboard, body.g-plug[data-game="battle"] .gboard { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
.gw-bar, .sb-bar, .tv-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; }
.gw-bar i, .sb-bar i, .tv-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; will-change: transform; }
.gf-feed { max-height: 132px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 14px; background: var(--panel); font-size: 14px; overscroll-behavior: contain; }
.gf-feed:empty { display: none; }
.gf-row b { font-weight: 800; } .gf-row.sys { color: var(--muted); font-style: italic; }
.gf-row.ok { color: var(--g); font-weight: 800; } .gf-row.close { color: var(--y); } .gf-row.rev { color: var(--text); font-style: normal; font-weight: 700; }
.gf-row.tx { color: color-mix(in srgb, var(--accent) 70%, var(--text)); font-style: normal; }
.gf-form { display: flex; gap: 8px; } .gf-form input { flex: 1; min-width: 0; } .gf-form .btn { width: auto; }
.gw-top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; }
.gw-sm { grid-column: 1; color: var(--muted); font-size: 12px; font-weight: 700; }
.gw-word { grid-column: 1; font-size: clamp(20px, 5.4vw, 28px); letter-spacing: .5px; line-height: 1.1; }
.gw-word.mask { letter-spacing: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gw-turn { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); font-size: 13px; font-weight: 700; }
.gw-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .gw-choices .btn { width: auto; }

/* Chess */
.gb-chess { width: min(94vw, 560px, calc(100vh - 300px)); }
.cs-board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 6px #4b3420, 0 20px 50px #0009; }
.cs-sq { position: relative; display: grid; place-items: center; padding: 0; aspect-ratio: 1; }
.cs-sq.light { background: #ecdab9; } .cs-sq.dark { background: #ad8456; }
.cs-sq.last { box-shadow: inset 0 0 0 100px #f6d86a55; }
.cs-sq.sel { box-shadow: inset 0 0 0 100px #f6d86a99; }
.cs-sq.check { background: radial-gradient(circle, #ff4d5e 10%, #ff4d5e66 45%, transparent 75%), #ad8456; }
.cs-sq.target::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: #1b143355; }
.cs-sq.target.cap::after { width: 86%; height: 86%; background: none; border: 5px solid #1b143355; box-sizing: border-box; }
.cs-sq.can { cursor: pointer; }
.cs-pc { font-size: min(9.6vw, 52px); line-height: 1; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", system-ui, sans-serif; user-select: none; pointer-events: none; position: relative; z-index: 1; }
@media (min-width: 1100px) and (min-height: 620px) { .cs-pc { font-size: min(5.6vh, 60px); } }
.cs-pc.pw { color: #fffaf0; -webkit-text-stroke: 1.2px #2a2016; text-shadow: 0 2px 3px #0006; }
.cs-pc.pb { color: #1d1813; -webkit-text-stroke: .6px #00000080; text-shadow: 0 2px 3px #0005; }
.cs-rank, .cs-file { position: absolute; font-style: normal; font-size: 10px; font-weight: 800; opacity: .7; pointer-events: none; }
.cs-rank { top: 2px; left: 3px; } .cs-file { bottom: 1px; right: 3px; }
.cs-sq.light .cs-rank, .cs-sq.light .cs-file { color: #ad8456; } .cs-sq.dark .cs-rank, .cs-sq.dark .cs-file { color: #ecdab9; }
.cs-taken { display: flex; align-items: center; gap: 1px; min-height: 26px; flex-wrap: wrap; }
.cs-taken .cs-pc.mini { font-size: 20px; margin-right: -4px; }
.cs-taken b { margin-left: 8px; font-size: 13px; color: var(--muted); }
.cs-promo { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 10px; background: #000a; }
.cs-promo button { width: 18%; aspect-ratio: 1; border-radius: 14px; background: #ecdab9; font-size: min(10vw, 56px); display: grid; place-items: center; pointer-events: auto; }
.cs-promo button.cs-pc { pointer-events: auto; }

/* Sea Battle */
.gb-battle { width: min(96vw, 880px); }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sb-title { font-size: 17px; } .sb-tools { display: flex; gap: 8px; } .sb-tools .btn { width: auto; }
.sb-grids { display: grid; grid-template-columns: 1fr; gap: 12px; }
.sb-side { display: flex; flex-direction: column; gap: 6px; }
.sb-cap { font-size: 12px; font-weight: 800; color: var(--muted); }
.sb-grid { display: grid; grid-template-columns: 18px repeat(10, 1fr); gap: 2px; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #0b4d6b, #083a52); box-shadow: 0 16px 40px #0008; }
.sb-lab, .sb-corner { font-style: normal; font-size: 10px; font-weight: 800; color: #9fd3e6aa; display: grid; place-items: center; }
.sb-cell { aspect-ratio: 1; border-radius: 4px; background: #0e5f83; padding: 0; position: relative; transition: background .15s; }
.sb-cell.open { cursor: crosshair; } .sb-cell.open:hover { background: #1b84ad; }
.sb-cell.ship { background: #8fa3b3; border-radius: 2px; }
.sb-cell.ship.h.ea { border-radius: 40% 2px 2px 40%; } .sb-cell.ship.h.eb { border-radius: 2px 40% 40% 2px; }
.sb-cell.ship.v.ea { border-radius: 40% 40% 2px 2px; } .sb-cell.ship.v.eb { border-radius: 2px 2px 40% 40%; }
.sb-cell.miss::after { content: ""; position: absolute; inset: 36%; border-radius: 50%; background: #cfe9f5aa; }
.sb-cell.hit { background: #ff4d5e; box-shadow: inset 0 0 8px #ffd23f; }
.sb-cell.ship.hit { background: radial-gradient(circle, #ffd23f 0 22%, #ff4d5e 60%), #ff4d5e; }
.sb-cell.last { outline: 2px solid #fff; outline-offset: -1px; }
.gb-battle .own .sb-grid { opacity: .92; }
.gb-battle.setup .enemy { display: none; }
@media (min-width: 760px) { .sb-grids { grid-template-columns: 1.4fr 1fr; align-items: start; } .gb-battle.setup .sb-grids { grid-template-columns: minmax(0, 520px); justify-content: center; } }
.sb-switch { display: none; }
@media (max-width: 759px) {
  .gb-battle:not(.setup) .sb-switch { display: flex; width: 100%; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel); }
  .sb-switch button { flex: 1; padding: 7px 6px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--muted); }
  .sb-switch button.sel { background: color-mix(in srgb, var(--accent) 26%, var(--panel2)); color: var(--text); }
  .gb-battle:not(.setup)[data-view="enemy"] .own, .gb-battle:not(.setup)[data-view="own"] .enemy { display: none; }
  .gb-battle:not(.setup) .sb-cap { display: none; }
}

/* Dominoes */
.gb-dominoes { width: min(96vw, 900px); }
.dm-table { min-height: 150px; max-height: 46vh; overflow: auto; border-radius: 22px; padding: 14px; background: radial-gradient(ellipse at 50% 40%, #2c6e4f, #174431); box-shadow: inset 0 0 0 6px #5a3a1e, 0 18px 40px #0008; }
.dm-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; min-height: 100%; }
.dm-empty { color: #ffffffa0; font-weight: 700; padding: 30px 0; }
.dm-tile { --u: 22px; display: inline-flex; width: calc(var(--u) * 2 + 3px); height: var(--u); border-radius: 5px; background: linear-gradient(180deg, #fffdf6, #ece4d0); box-shadow: 0 2px 0 #b9ad92, 0 4px 8px #0006; flex-shrink: 0; }
.dm-tile .half { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 3px; }
.dm-tile .half:first-child { border-right: 1.5px solid #2a201666; }
.dm-tile .half i { display: block; }
.dm-tile .half i.p { margin: auto; width: 70%; height: 70%; max-width: 6px; max-height: 6px; border-radius: 50%; background: #241b12; }
.dm-tile.dbl { flex-direction: column; width: var(--u); height: calc(var(--u) * 2 + 3px); }
.dm-tile.dbl .half:first-child { border-right: 0; border-bottom: 1.5px solid #2a201666; }
.dm-tile.last { box-shadow: 0 0 0 2px #ffd23f, 0 4px 10px #0007; }
.dm-end { width: 44px; height: 44px; border-radius: 12px; border: 2px dashed #ffd23f; color: #ffd23f; font-weight: 800; font-size: 12px; animation: pulse 1s ease-in-out infinite; }
.dm-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.dm-bone { color: var(--muted); font-weight: 700; font-size: 14px; } .dm-btns .btn { width: auto; }
.dm-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 6px 0 4px; }
.dm-hand .dm-tile { --u: 34px; }
.dm-hand .dm-tile .half i.p { max-width: 8px; max-height: 8px; }
.dm-pick { padding: 4px; border-radius: 12px; transition: transform .12s; }
.dm-pick:disabled { opacity: .5; }
.dm-pick.ok { background: color-mix(in srgb, var(--accent) 16%, transparent); } .dm-pick.ok:hover { transform: translateY(-4px); }
.dm-pick.sel { background: color-mix(in srgb, #ffd23f 40%, transparent); transform: translateY(-6px); }
body.g-plug[data-game="dominoes"] { --accent: #ffd23f; --accent-ink: #2a1a00; }

/* 8-Ball Pool */
.gb-pool { width: min(97vw, 1060px, calc((100vh - 250px) * 1.86)); }
.pl-stage { position: relative; width: 100%; }
.pl-canvas { display: block; width: 100%; border-radius: 14px; touch-action: none; box-shadow: 0 20px 50px #000a; cursor: crosshair; }
.pl-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 28px; }
.pl-note { font-weight: 800; color: var(--accent); }
.pl-groups { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pl-grp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--panel); color: var(--muted); }
.pl-grp b { color: var(--text); font-weight: 700; }
.pl-grp i { width: 12px; height: 12px; border-radius: 50%; }
.pl-grp.solid i { background: #f5c518; } .pl-grp.stripe i { background: linear-gradient(180deg, #f4f1ea 30%, #1f5fd1 30% 70%, #f4f1ea 70%); }
@media (orientation: landscape) and (max-height: 540px) { .gb-pool { width: min(97vw, calc((100vh - 130px) * 1.86)); } }

/* Trivia */
.gb-trivia { width: min(96vw, 640px); }
.tv-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 24px; background: var(--panel); box-shadow: 0 20px 50px #0008; }
.tv-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--muted); }
.tv-cat { color: var(--accent); }
.tv-bar.rev i { background: var(--muted); }
.tv-q { margin: 4px 0; font-size: clamp(19px, 4.8vw, 26px); line-height: 1.25; min-height: 2.5em; }
.tv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tv-opt { --oc: #3d8bff; position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 16px; text-align: left; font-weight: 700; font-size: 15px; background: color-mix(in srgb, var(--oc) 22%, var(--bg2)); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--oc) 55%, #000); transition: transform .1s, opacity .2s, background .2s; }
.tv-opt.o1 { --oc: #ff4d5e; } .tv-opt.o2 { --oc: #ffc23d; } .tv-opt.o3 { --oc: #2ecc8f; }
.tv-opt b { width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--oc); color: #120c22; font-size: 14px; }
.tv-opt:not(:disabled):active { transform: scale(.97); }
.tv-opt.picked { box-shadow: inset 0 0 0 3px #fff, inset 0 -4px 0 color-mix(in srgb, var(--oc) 55%, #000); }
.tv-opt.dim { opacity: .45; }
.tv-opt.right { background: color-mix(in srgb, #2ecc8f 55%, var(--bg2)); opacity: 1; animation: pulse .9s ease-in-out 2; }
.tv-opt.wrong { background: color-mix(in srgb, #ff4d5e 45%, var(--bg2)); }
.tv-opt:disabled { cursor: default; }
.tv-who { position: absolute; right: 6px; bottom: -8px; display: flex; font-style: normal; } .tv-who .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--panel); border-radius: 50%; }
.tv-foot { text-align: center; color: var(--muted); font-weight: 700; min-height: 20px; }
.tv-foot.good { color: var(--g); font-size: 18px; }
@media (max-width: 420px) { .tv-opts { grid-template-columns: 1fr; } .tv-opt { min-height: 52px; } }

/* Draw & Guess */
.gb-draw { width: min(96vw, 560px, calc(100vh - 330px)); min-width: min(96vw, 320px); }
.dg-stage { position: relative; width: 100%; aspect-ratio: 1; }
.dg-canvas { width: 100%; height: 100%; display: block; border-radius: 18px; background: #fffdf7; box-shadow: 0 16px 40px #0008; touch-action: none; }
.gb-draw.artist .dg-canvas { cursor: crosshair; box-shadow: 0 0 0 3px var(--accent), 0 16px 40px #0008; }
.gw-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; border-radius: 18px; background: #160f2ee6; text-align: center; }
.gw-overlay b { font-size: 18px; } .gw-overlay b.big { font-size: clamp(26px, 8vw, 40px); color: var(--accent); }
.gw-overlay small { color: var(--muted); font-weight: 700; }
.dg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.dg-inks { display: flex; flex-wrap: wrap; gap: 5px; }
.dg-ink { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px #0003; }
.dg-ink.sel { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.dg-sizes, .dg-acts { display: flex; gap: 4px; }
.dg-size { width: 32px; height: 32px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; }
.dg-size i { border-radius: 50%; background: var(--text); display: block; }
.dg-size.sel { background: color-mix(in srgb, var(--accent) 30%, var(--panel)); }
.dg-act { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: var(--panel); font-size: 13px; font-weight: 700; }
.dg-act .ic { width: 16px; height: 16px; }
@media (max-width: 520px) { .dg-act span { display: none; } }

/* Walkie-Talkie: a chunky amber handset — the one bold object in an otherwise plain game screen */
.gb-radio { width: min(94vw, 420px); }
.rd-device { --rb: #ffb020; position: relative; margin: 34px auto 0; width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 18px; border-radius: 30px 30px 38px 38px; background: linear-gradient(160deg, #ffc54a, var(--rb) 45%, #d98a00); box-shadow: inset 0 3px 0 #ffffff70, inset 0 -8px 0 #00000026, 0 24px 50px #000b; color: #2a1a00; }
.rd-antenna { position: absolute; left: 34px; top: -34px; width: 16px; height: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(90deg, #333, #111 60%, #2a2a2a); z-index: -1; }
.rd-knob { position: absolute; right: 30px; top: -12px; width: 26px; height: 18px; border-radius: 6px 6px 2px 2px; background: repeating-linear-gradient(90deg, #222 0 3px, #3a3a3a 3px 5px); z-index: -1; }
.rd-top { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; letter-spacing: 1px; }
.rd-led { width: 10px; height: 10px; border-radius: 50%; background: #5a1010; box-shadow: inset 0 1px 2px #0008; }
.rd-led.on { background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b, 0 0 2px #fff; animation: pulse .7s ease-in-out infinite; }
.rd-ch { flex: 1; } .rd-sig { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.rd-sig i { width: 4px; background: #2a1a00; border-radius: 1px; } .rd-sig i:nth-child(1) { height: 30%; } .rd-sig i:nth-child(2) { height: 55%; } .rd-sig i:nth-child(3) { height: 80%; } .rd-sig i:nth-child(4) { height: 100%; }
.rd-lcd { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, #c8e8b0, #a9d68e); box-shadow: inset 0 3px 8px #0005, 0 0 0 4px #2a1a00; color: #1f3a12; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 96px; }
.rd-lcd .rd-l1 { font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.rd-lcd .rd-l2 { font-size: clamp(20px, 6vw, 26px); line-height: 1.15; word-break: break-word; }
.rd-lcd .rd-l2.mask { letter-spacing: 2px; }
.rd-lcd.air { background: linear-gradient(180deg, #ffe7b0, #f6cf7a); color: #4a2a00; }
.rd-lcd .gw-bar { background: #1f3a1226; } .rd-lcd .gw-bar i { background: #1f3a12; }
.rd-lcd .gw-choices .btn { background: #1f3a12; color: #c8e8b0; box-shadow: none; font-family: system-ui, sans-serif; }
.rd-grille { display: grid; place-items: center; min-height: 92px; border-radius: 18px; background: repeating-linear-gradient(0deg, #2a1a00 0 4px, transparent 4px 10px), #b87400; box-shadow: inset 0 2px 6px #0006; }
.rd-who { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 99px; background: #2a1a00e6; color: #ffe2a8; font-weight: 800; font-size: 14px; }
.rd-who.talking .av { animation: pulse .6s ease-in-out infinite; box-shadow: 0 0 0 3px #ff3b3b; border-radius: 50%; }
.rd-quiet { color: #ffe2a8b0; font-weight: 700; }
.rd-ptt { align-self: center; width: min(46vw, 210px, 26vh); aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 18px;
  background: radial-gradient(circle at 50% 35%, #3b3b3b, #121212 70%); color: #fff; box-shadow: 0 10px 0 #000, 0 14px 30px #000a, inset 0 2px 0 #ffffff22; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s, box-shadow .08s; }
.rd-ptt-t { font-size: clamp(16px, 4.6vw, 22px); font-weight: 900; letter-spacing: .5px; }
.rd-ptt-s { font-size: 12px; color: #ffffffa0; text-align: center; max-width: 80%; }
.rd-ptt.held { transform: translateY(8px); box-shadow: 0 2px 0 #000, 0 6px 14px #000a, inset 0 2px 0 #ffffff22; }
.rd-ptt.live { background: radial-gradient(circle at 50% 35%, #ff5a4d, #b4120a 70%); }
.rd-ptt.busy { opacity: .55; }
.rd-power { align-self: center; display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 99px; background: #2a1a00; color: #ffe2a8; font-weight: 900; font-size: 16px; box-shadow: 0 6px 0 #000; }
.rd-power .ic { width: 20px; height: 20px; }
body.g-plug[data-game="radio"] { --accent: #ffb020; --accent-ink: #2a1a00; }
/* phones held sideways: the board area is short (≈ 100vh − 110px) but wide, so the new games go side by side */
@media (orientation: landscape) and (max-height: 540px) {
  body.g-plug .gboard { max-height: calc(100dvh - 96px); align-self: stretch; }
  /* wide games: give the board most of the width, keep the log/me column slim */
  body.g-plug:is([data-game="draw"], [data-game="radio"], [data-game="trivia"], [data-game="battle"], [data-game="dominoes"], [data-game="pool"]) #game { grid-template-columns: minmax(0, 170px) auto minmax(0, 1fr); }
  body.g-plug:is([data-game="draw"], [data-game="radio"], [data-game="trivia"], [data-game="battle"], [data-game="dominoes"], [data-game="pool"]) .gboard { padding: 2px 4px; }
  .gb-chess { width: calc(100vh - 110px); } .gb-chess .cs-taken { display: none; }
  .cs-pc { font-size: calc((100vh - 110px) / 9.5); }
  .gb-draw { --cv: calc(100vh - 112px); width: min(94vw, calc(var(--cv) + 360px)); min-width: 0; grid-template-columns: var(--cv) minmax(0, 1fr); column-gap: 12px; row-gap: 6px; }
  .gb-draw .dg-stage { grid-column: 1; grid-row: 1 / span 6; width: var(--cv); }
  .gb-draw > :not(.dg-stage) { grid-column: 2; }
  .gb-draw .gw-word { font-size: 20px; } .gb-draw .gf-feed { max-height: 90px; }
  .gb-draw .dg-ink { width: 22px; height: 22px; } .gb-draw .dg-size { width: 28px; height: 28px; }
  .gb-radio { width: min(94vw, 720px); grid-template-columns: 300px minmax(0, 1fr); column-gap: 14px; }
  .gb-radio .rd-device { grid-row: 1 / span 3; margin-top: 22px; padding: 10px 12px 12px; gap: 8px; }
  .gb-radio .rd-grille { display: none; } .gb-radio .rd-lcd { min-height: 0; padding: 8px 10px; } .gb-radio .rd-lcd .rd-l2 { font-size: 20px; }
  .gb-radio .rd-ptt { width: min(120px, calc(100vh - 290px)); min-width: 96px; padding: 10px; } .gb-radio .rd-ptt-s { display: none; }
  .gb-radio .gf-form, .gb-radio .gf-feed { grid-column: 2; } .gb-radio .gf-feed { max-height: calc(100vh - 190px); }
  .gb-trivia { width: min(94vw, 720px); } .tv-card { padding: 12px 14px; gap: 8px; } .tv-q { font-size: 18px; min-height: 0; margin: 0; }
  .tv-opts { grid-template-columns: 1fr 1fr; gap: 8px; } .tv-opt { min-height: 42px; padding: 6px 10px; font-size: 14px; }
  .gb-battle { width: min(94vw, 720px); } .gb-battle .sb-switch { display: none !important; }
  .gb-battle:not(.setup) .sb-grids { grid-template-columns: calc(100vh - 150px) calc(100vh - 190px); justify-content: center; align-items: start; }
  .gb-battle:not(.setup)[data-view] .enemy, .gb-battle:not(.setup)[data-view] .own { display: flex !important; }
  .gb-battle.setup .sb-grids { grid-template-columns: calc(100vh - 175px); justify-content: center; }
  .gb-battle .sb-head { gap: 6px; } .gb-battle .sb-title { font-size: 15px; }
  .gb-battle .sb-grid { padding: 4px; gap: 1px; } .gb-battle .sb-lab { font-size: 7px; } .gb-battle .sb-cap { display: block !important; }
  .gb-dominoes { width: min(94vw, 760px); } .dm-table { min-height: 90px; max-height: calc(100vh - 230px); padding: 8px; }
  .dm-tile { --u: 18px; } .dm-hand .dm-tile { --u: 26px; } .dm-hand { padding: 2px 0; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .rd-led.on, .rd-who.talking .av, .tv-opt.right, .dm-end { animation: none; } }

/* ======================= v14: friends ======================= */
.tabbar { grid-template-columns: repeat(5, 1fr) !important; }
[data-tab="/friends"] { position: relative; }
[data-tab="/friends"].dot::after { content: ""; position: absolute; top: 4px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 2px var(--bg); }
.hub-links [data-tab="/friends"].dot::after { top: 2px; right: -8px; }
.fr-top { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 14px; margin: 0 auto 18px; max-width: var(--max, 1180px); padding: 0 clamp(16px, 4vw, 40px); }
.fr-code { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--panel); }
.fr-code small { color: var(--muted); font-weight: 700; }
.fr-code b { font-size: 28px; letter-spacing: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fr-code .btn { width: auto; align-self: flex-start; }
.fr-add { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 16px; border-radius: 18px; background: var(--panel); }
.fr-add .field { margin: 0; } .fr-add input { text-transform: uppercase; letter-spacing: 2px; }
.fr-add .btn { width: auto; } .fr-add .form-err { grid-column: 1 / -1; margin: 0; }
.fr-list { display: flex; flex-direction: column; gap: 6px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--panel); }
.fr-row .n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-row .n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row .n small { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fr-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6585; flex-shrink: 0; }
.fr-row.st-online .dot, .fr-row.st-lobby .dot { background: var(--g); } .fr-row.st-playing .dot { background: var(--y); } .fr-row.st-sent .dot { display: none; }
.fr-row .acts { display: flex; align-items: center; gap: 6px; } .fr-row .acts .btn { width: auto; }
.fr-row .icon-btn.small { width: 34px; height: 34px; }
.pc-friend { display: flex; justify-content: center; } .pc-friend:empty { display: none; } .pc-friend .btn { width: auto; }
@media (max-width: 640px) { .fr-top { grid-template-columns: 1fr; } .fr-row .acts .btn.small { padding: 7px 10px; } }
.link.forgot { align-self: center; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* ======================= v14: phone performance =======================
   Looping box-shadow animations repaint every frame; on phones that eats the frame budget. The glows below
   are drawn once on a pseudo-element and only its opacity animates (composited, no repaint). */
.opp.turn { animation: none; }
.opp.turn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 20px color-mix(in srgb, var(--y) 55%, transparent); opacity: 0; animation: fadeGlow 1.5s ease-in-out infinite; pointer-events: none; }
.back-card.can, .back-card.danger { animation: none; }
.back-card.can::after, .back-card.danger::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 4px var(--y), 0 0 24px var(--y); opacity: 0; animation: fadeGlow 1s ease-in-out infinite alternate; pointer-events: none; }
.back-card.danger::after { box-shadow: 0 0 0 4px var(--r), 0 0 24px var(--r); }
@keyframes fadeGlow { 50% { opacity: 1; } }
.back-card.can::after, .back-card.danger::after { animation-name: fadeGlowAlt; } @keyframes fadeGlowAlt { to { opacity: 1; } }
@keyframes diceReady { 50% { transform: translateY(-5px) rotate(-4deg); } }
@media (max-width: 899px), (pointer: coarse) {
  /* frosted glass is costly while scrolling on mid-range phones: use a solid bar instead */
  .hub-nav, .tabbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: color-mix(in srgb, var(--bg) 97%, #000) !important; }
}
/* no tap flash, no 300 ms delay, no accidental zoom on game controls */
button, a, .cs-sq, .sb-cell, .dm-pick, .tv-opt { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#game, #gboard { overscroll-behavior: contain; }
/* phones (portrait): keep the walkie-talkie compact and let the inputs scroll clear of the reaction button */
@media (max-width: 699px) and (orientation: portrait) {
  .rd-grille { min-height: 64px; }
  .rd-ptt { width: min(40vw, 180px, 22vh); }
  .rd-ptt-s { font-size: 11px; }
  body.g-plug:is([data-game="draw"], [data-game="radio"], [data-game="dominoes"], [data-game="trivia"]) .gboard { padding-bottom: 84px; scroll-padding-bottom: 84px; }
}
.av .face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av .face:has(img) { overflow: hidden; }
.pf-photo { display: flex; gap: 8px; justify-content: center; margin: 6px 0 2px; } .pf-photo .btn { width: auto; }
/* quick join in the top bar */
.nav-join { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--panel); }
.nav-join input { width: 92px; padding: 7px 9px; border: 0; background: transparent; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 14px; }
.nav-join input::placeholder { letter-spacing: 0; font-weight: 600; text-transform: none; }
.nav-join .btn { width: auto; padding: 7px 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 899px) { .nav-join input { width: 78px; } .hub-right .online-pill { display: none; } }
/* recently played */
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.recent-row::-webkit-scrollbar { display: none; }
.recent { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(150deg, color-mix(in srgb, var(--ac) 22%, var(--panel)), var(--panel)); color: var(--text); text-decoration: none; scroll-snap-align: start; }
.recent .cv-art { width: 40px; height: 40px; flex-shrink: 0; } .recent .cv-art svg { width: 100%; height: 100%; }
.recent .rt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.recent .rt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.recent .res { font-style: normal; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #ffffff12; }
.recent .res.win { color: var(--g); } .recent .res.loss { color: #ff8a9a; }
