/* Punch Patti — plum card table, ivory cards, marigold accents. One committed dark look. */
:root {
  /* Space the banner ad takes at the bottom: a plain pixel value set by ads.js (0px on the web and on the card table).
     Every bottom-anchored element must use --ad-space. */
  --ad-space: 0px;
  --ad-h: 0px;
  --table-1: #33204a;
  --table-2: #170b24;
  --ink: #f7f0e7;
  --muted: #b9a8c8;
  --faint: #8a789b;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .1);
  --marigold: #ffb84d;
  --marigold-2: #ff9a3c;
  --rose: #ff6f91;
  --mint: #5fe3a1;
  --card: #fffaf2;
  --card-ink: #2a1838;
  --shadow: 0 10px 30px rgba(10, 2, 20, .45);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --cw: clamp(54px, calc((100vw - 40px) / 6.3), 104px);   /* hand card width */
  --cc: clamp(70px, min(26vw, 16vh), 128px);                           /* centre card width */
  --mw: 22px;                                               /* opponent mini card */
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45;
  background: radial-gradient(120% 90% at 50% 38%, var(--table-1) 0%, #24123a 45%, var(--table-2) 100%) fixed, var(--table-2);
  overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
body::before { /* felt grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
/* No text-selection flashes while tapping or dragging cards */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .room-code { -webkit-user-select: text; user-select: text; }
.card, .card * { -webkit-user-select: none; user-select: none; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 10px; }
input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { position: fixed; inset: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--ad-space, 0px)); }
.screen.enter { animation: screenIn .45s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* ---------- buttons & controls ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 16px; font-weight: 700; font-size: 16px; letter-spacing: .01em;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #ffc56a, var(--marigold-2)); color: #2b1400; box-shadow: 0 8px 24px rgba(255, 154, 60, .32), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 30px rgba(255, 154, 60, .45), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.soft { background: var(--glass-2); border: 1px solid var(--line); }
.btn.soft:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.btn.ghost { background: transparent; color: var(--muted); min-height: 44px; }
.btn.ghost:hover { color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: .45; }
.btn svg { width: 20px; height: 20px; flex: none; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--glass-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }

[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 10px; }
.label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.text-in { width: 100%; min-width: 0; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.22); font-weight: 600; transition: border-color .2s, background .2s; }
.text-in:focus { outline: none; border-color: var(--marigold); background: rgba(0,0,0,.3); }
.text-in::placeholder { color: var(--faint); font-weight: 500; }
.code-in { text-transform: uppercase; letter-spacing: .4em; font-family: var(--body); font-weight: 800; font-size: 22px; text-align: center; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-width: 52px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; transition: all .2s var(--ease); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--card-ink); border-color: var(--ink); }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.stepper button { width: 36px; height: 36px; border-radius: 50%; font-size: 20px; font-weight: 600; display: grid; place-items: center; }
.stepper button:hover:not(:disabled) { background: var(--glass-2); }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

.switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.switch .txt { flex: 1; min-width: 0; }
.switch .txt b { display: block; font-weight: 700; }
.switch .txt span { color: var(--muted); font-size: 13px; }
.switch .knob { width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.16); position: relative; flex: none; transition: background .25s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .3s var(--spring); }
.switch[aria-checked="true"] .knob { background: var(--mint); }
.switch[aria-checked="true"] .knob::after { transform: translateX(20px); }
.switch .sym { width: 40px; height: 40px; flex: none; }

/* ---------- cards ---------- */
.card { width: var(--w, var(--cw)); aspect-ratio: 5 / 7; position: relative; perspective: 900px; flex: none; }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.card.is-back .card-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: calc(var(--w, var(--cw)) * .12); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.front { background: var(--card); box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 6px 16px rgba(12, 2, 24, .35), 0 1px 2px rgba(12,2,24,.3);
  display: grid; place-items: center; }
.face.front::before { content: ""; position: absolute; inset: calc(var(--w, var(--cw)) * .055); border-radius: calc(var(--w, var(--cw)) * .08); border: 1px solid rgba(42, 24, 56, .09); }
.face.front::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 60% at 50% 100%, var(--wash, transparent), transparent 70%); opacity: .5; }
.face.front .big { width: 74%; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 2px 2px rgba(42,24,56,.12)); }
.face.front .corner { position: absolute; width: 22%; height: auto; z-index: 1; opacity: .9; }
.face.front .corner.tl { top: 6%; left: 7%; }
.face.front .corner.br { bottom: 6%; right: 7%; transform: rotate(180deg); }
.face.back { transform: rotateY(180deg); box-shadow: 0 6px 16px rgba(12, 2, 24, .4); }
.face.back svg { width: 100%; height: 100%; display: block; }
.card[data-sym="bar"]     { --wash: #b8f5d2; }
.card[data-sym="bell"]    { --wash: #bcd8ff; }
.card[data-sym="brinjal"] { --wash: #dec6fa; }
.card[data-sym="orange"]  { --wash: #ffd9a8; }
.card[data-sym="cherry"]  { --wash: #ffc6d3; }
.card[data-sym="lemon"]   { --wash: #f3eaa0; }
.card[data-sym="lemon"] .face.front { background: #f6f2e6; }
.card[data-sym="lemon"] .big { transform: translateY(-6%); }
.card[data-sym="lemon"] .corner.br { display: none; }
.card .dead { position: absolute; bottom: 8%; left: 10%; width: 80%; height: auto; z-index: 2; overflow: visible; pointer-events: none; }
.card .dead text { font-family: var(--display); font-weight: 800; font-size: 12.5px; letter-spacing: 1.2px; fill: #9a8a5a; }

/* ---------- home ---------- */
.home { align-items: center; justify-content: center; padding: 24px 20px 32px; gap: 28px; text-align: center; }
.drift { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.drift .card { position: absolute; --w: 90px; opacity: .08; animation: drift 26s linear infinite; }
body:has(.overlay) .drift .card { animation-play-state: paused; }   /* nothing moving behind pop-ups */  /* no blur: it was costly on low-end phones */
@keyframes drift { from { transform: translateY(110vh) rotate(var(--r0)); } to { transform: translateY(-30vh) rotate(var(--r1)); } }
.logo { display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; z-index: 1; }
.logo-fan { position: relative; width: 220px; height: 128px; }
.logo-fan .card { position: absolute; left: 50%; bottom: 0; --w: 74px; margin-left: -37px; transform-origin: 50% 120%;
  animation: fanIn .9s var(--spring) both; animation-delay: calc(var(--i) * 80ms + 150ms); transform: rotate(var(--rot)) translateY(var(--y)); }
@keyframes fanIn { from { transform: rotate(0) translateY(30px); opacity: 0; } }
.wordmark { position: relative; z-index: 2; text-shadow: 0 2px 0 rgba(23, 11, 36, .85), 0 4px 10px rgba(23, 11, 36, .85), 0 10px 32px rgba(23, 11, 36, .9); font-family: var(--display); font-weight: 800; font-size: clamp(46px, 12vw, 76px); line-height: .9; letter-spacing: -.045em; }
.wordmark span { color: var(--marigold); }
.tagline { color: var(--muted); max-width: 32ch; margin: 0 auto; font-size: 16px; }
.menu { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); position: relative; z-index: 1; }
.menu .btn { justify-content: flex-start; padding: 0 18px; min-height: 60px; }
.menu .btn .sub { margin-left: auto; font-size: 12px; font-weight: 600; opacity: .7; }
.menu .btn .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(0,0,0,.14); }
.menu .btn.soft .ico { background: rgba(255,255,255,.08); }
.modes { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); position: relative; z-index: 1; }
.mode { --c: #3b82f6; position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; padding: 12px 16px; border-radius: 20px; text-align: left; color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 10%, transparent));
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .15s var(--ease), filter .15s; }
.mode:active { transform: scale(.97); filter: brightness(1.1); }
.mode .mi { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.mode .mi svg { width: 28px; height: 28px; color: #fff; }
.mode .mt { flex: 1; min-width: 0; }
.mode .mt b { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.mode .mt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode .go { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-weight: 900; }
.mode.hot { background: linear-gradient(180deg, #ffc061, #ff9a2e); border-color: #ffd28a; color: #2a1748; box-shadow: 0 10px 30px -10px rgba(255,159,46,.75); }
.mode.hot .mt span { color: rgba(42,23,72,.75); }
.mode.hot .mi { background: rgba(42,23,72,.14); box-shadow: none; }
.mode.hot .mi svg { color: #2a1748; }
.mode.hot .go { background: rgba(42,23,72,.12); }
.home.compact { gap: 20px; }
.home.compact .logo { gap: 10px; }
.home.compact .logo-fan { transform: scale(.72); height: 96px; transform-origin: 50% 100%; }
.home.compact .tagline { display: none; }
.mode .tag { position: absolute; top: -9px; right: 14px; background: #ffb84d; color: #2a1748; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 99px; letter-spacing: .04em; }
.learn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; border: 1.5px dashed rgba(255,184,77,.55); background: rgba(255,184,77,.08); color: var(--ink); text-align: left; position: relative; z-index: 1; }
.learn .mini { display: flex; padding-left: 8px; flex: none; }
.learn .mini .card { margin-left: -8px; }
.learn .lt b { display: block; font-weight: 800; font-size: 15px; }
.learn .lt span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.learn .go { margin-left: auto; color: #ffb84d; font-weight: 800; font-size: 13px; }
.intro { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.intro .stage { height: 170px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border-radius: 20px; background: rgba(255,255,255,.04); }
.intro h2 { margin: 0; font-size: 26px; }
.intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 30ch; min-height: 4.4em; }
.intro p b { color: var(--ink); }
.intro .dots { display: flex; gap: 6px; }
.intro .dots i { width: 8px; height: 8px; border-radius: 9px; background: rgba(255,255,255,.2); transition: width .2s; }
.intro .dots i.on { width: 22px; background: #ffb84d; }
.intro .arrow { font-size: 28px; color: #ffb84d; font-weight: 900; }
.intro .tcol { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.intro .tcol small { color: var(--muted); font-weight: 700; }
.intro .trow { display: flex; }
.intro .trow.gap { gap: 4px; }
.intro .tpunch { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.intro .pw { font-family: var(--display); font-weight: 900; font-size: 46px; color: #ffb84d; text-shadow: 0 4px 0 #b4561c; }
.intro .pts { display: grid; grid-template-columns: auto auto; gap: 4px 14px; font-weight: 800; font-size: 14px; text-align: left; }
.intro .pts span:nth-child(even) { color: #ffb84d; }
.intro .link { color: #ffb84d; font-weight: 700; font-size: 14px; text-decoration: underline; }
.intro .tbtns { width: 100%; justify-content: space-between; }
.foot { color: var(--faint); font-size: 12px; position: relative; z-index: 1; }

/* ---------- panels (setup, online, lobby) ---------- */
.page { width: min(560px, 100%); margin: 0 auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 1; }
.page-head { display: flex; align-items: center; gap: 12px; }
.page-head h2 { font-size: 26px; flex: 1; }
.card-panel { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.players { display: flex; flex-direction: column; gap: 10px; }
.prow { display: flex; align-items: center; gap: 10px; animation: rowIn .35s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }
.avatar { --a: #ffb84d; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 16px; color: #1c0d29;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--a) 60%, #fff), var(--a)); box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.kind-toggle { display: flex; border-radius: 12px; background: rgba(0,0,0,.22); padding: 3px; flex: none; }
.kind-toggle button { height: 38px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kind-toggle button[aria-pressed="true"] { background: var(--glass-2); color: var(--ink); }
.kind-toggle svg { width: 16px; height: 16px; }
.rm { width: 38px; height: 38px; border-radius: 12px; color: var(--faint); display: grid; place-items: center; flex: none; }
.rm:hover { color: var(--rose); background: rgba(255,111,145,.1); }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.err { color: var(--rose); font-size: 14px; font-weight: 600; margin: 0; }
/* Play online: both choices up front */
.me-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; font-size: 14px; margin: -8px 2px 0; }
.me-row b { color: var(--ink); }
.me-row button { margin-left: auto; color: var(--marigold); font-weight: 800; padding: 6px 2px; }
.join-card { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.join-card .jh { display: flex; align-items: center; gap: 14px; }
.join-card .mi { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: #8b5cf6; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.join-card .mi svg { width: 28px; height: 28px; color: #fff; }
.join-card .mt b { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.join-card .mt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.codes { display: flex; gap: 8px; align-items: center; }
.codes input { width: 0; flex: 1 1 0; max-width: 56px; height: 56px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: var(--ink); font: 800 26px var(--display); text-align: center; text-transform: uppercase; padding: 0; }
.codes input:focus { outline: none; border-color: var(--marigold); background: rgba(0,0,0,.25); }
.codes .btn { flex: 1.4 1 0; min-height: 56px; border-radius: 14px; padding: 0 12px; }
.tabs { display: flex; padding: 4px; border-radius: 16px; background: rgba(0,0,0,.25); }
.tabs button { flex: 1; height: 44px; border-radius: 12px; font-weight: 700; color: var(--muted); transition: all .2s; }
.tabs button[aria-selected="true"] { background: var(--glass-2); color: var(--ink); }
.room-code { font-family: var(--body); font-weight: 800; font-size: clamp(44px, 14vw, 64px); letter-spacing: .14em; line-height: 1; text-align: center; color: var(--marigold); padding-left: .14em; }
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--glass-2); color: var(--muted); }
.badge.host { background: rgba(255,184,77,.16); color: var(--marigold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(95,227,161,.18); flex: none; }
.dot.off { background: var(--faint); box-shadow: none; }
.lobby-p { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.04); animation: rowIn .35s var(--ease) both; }
.lobby-p .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- game table ---------- */
.game { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; overflow: hidden; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 14px 4px; }
.topbar .tools { justify-self: end; }
.topbar .round { font-weight: 700; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.2; }
.topbar .round b { font-family: var(--display); font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
.topbar .mini-logo { margin: 0 auto; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.03em; opacity: .9; }
.topbar .mini-logo span { color: var(--marigold); }
.topbar .tools { display: flex; gap: 8px; }
.round-dots { display: flex; gap: 3px; margin-top: 4px; }
.round-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.14); }
.round-dots i.done { background: var(--marigold); }
.round-dots i.now { background: var(--ink); box-shadow: 0 0 0 2px rgba(255,255,255,.2); }

.seats { display: flex; justify-content: center; gap: clamp(6px, 3vw, 22px); padding: 8px 10px 0; flex-wrap: nowrap; min-height: 112px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 1 0; min-width: 0; max-width: 110px; position: relative; transition: transform .35s var(--ease), opacity .3s; }
.seat .avatar { width: 46px; height: 46px; font-size: 18px; position: relative; transition: box-shadow .3s; margin-bottom: 7px; }   /* room for the turn ring (sticks out ~10px) so it never touches the name */
.seat.turn .avatar { box-shadow: 0 0 0 3px var(--marigold), 0 0 24px rgba(255,184,77,.55); }
.seat.turn .avatar::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2.5px solid var(--marigold); box-shadow: 0 0 12px rgba(255,184,77,.45); }   /* steady ring: whose turn it is */
@keyframes ring { 0% { opacity: .8; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.3); } }
.seat .bot-tag { position: absolute; top: -2px; right: calc(50% - 30px); width: 20px; height: 20px; border-radius: 50%; background: #2a1838; border: 1px solid var(--line); display: grid; place-items: center; z-index: 2; }
.seat .bot-tag svg { width: 12px; height: 12px; color: var(--muted); }
.seat .off-tag { position: absolute; top: 30px; right: calc(50% - 28px); width: 12px; height: 12px; border-radius: 50%; background: var(--faint); border: 2px solid #24123a; z-index: 2; }
.seat .nm { font-weight: 700; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .sc { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--marigold); font-variant-numeric: tabular-nums; line-height: 1; }
.seat .fan { display: flex; height: calc(var(--mw) * 1.4); margin-top: 2px; }
.seat .fan .card { --w: var(--mw); margin-left: calc(var(--mw) * -.55); transform: rotate(calc((var(--i) - var(--mid)) * 7deg)) translateY(calc(var(--d) * 1px)); transform-origin: 50% 100%; }
.seat .fan .card:first-child { margin-left: 0; }
.seat .fan .face { border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.seat .bubble { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, 0); background: var(--ink); color: var(--card-ink); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 12px; white-space: nowrap; box-shadow: var(--shadow); z-index: 5; animation: pop .35s var(--spring) both; display: flex; align-items: center; gap: 4px; }
.seat .bubble svg { width: 18px; height: 18px; }
.seat .bubble::after { content: ""; position: absolute; top: -5px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -20%) scale(.7); } }
.thinking { display: inline-flex; gap: 3px; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: think 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 0; position: relative; }
.status { min-height: 46px; text-align: center; padding: 0 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.status .main { font-family: var(--display); font-weight: 700; font-size: clamp(17px, 4.6vw, 21px); letter-spacing: -.01em; }
.status .sub { color: var(--muted); font-size: 13px; }
.status.mine .main { color: var(--marigold); }
.status .main, .status .sub { animation: fadeUp .35s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.piles { display: flex; gap: clamp(28px, 10vw, 64px); align-items: flex-end; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pile .lbl { position: relative; z-index: 2; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pile .lbl b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stack { position: relative; width: var(--cc); aspect-ratio: 5 / 7; border-radius: calc(var(--cc) * .12); }
.stack .card { --w: var(--cc); position: absolute; left: 0; top: 0; }
.stack .slot-empty { position: absolute; inset: 0; border-radius: inherit; border: 2px dashed rgba(255,255,255,.14); display: grid; place-items: center; color: var(--faint); font-size: 12px; font-weight: 700; text-align: center; padding: 6px; }
.stack.tappable { cursor: pointer; }
.stack.tappable::after { content: ""; position: absolute; inset: -6px; border-radius: calc(var(--cc) * .16); border: 2px solid var(--marigold); box-shadow: 0 0 22px rgba(255,184,77,.45); animation: glow 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 50% { opacity: .45; } }
.stack.tappable:hover .card:last-of-type { transform: translateY(-4px); }
.stack .card { transition: transform .25s var(--ease); }
.stack.drop-hot::after { border-color: var(--mint); box-shadow: 0 0 30px rgba(95,227,161,.6); animation: none; }
/* Face-down deck: 2 cards peek out underneath, kept inside the gold "tap here" ring (it sits 6px outside the stack). */
.deck .card:nth-last-child(2) { transform: translate(-1.5px, 1.5px); } .deck .card:nth-last-child(3) { transform: translate(-3px, 3px); } .deck .card:nth-last-child(n+4) { visibility: hidden; }
/* The face-up market card is slightly tilted: draw the gold ring behind it, not over its corner. */
.stack.market { isolation: isolate; } .stack.market.tappable::after { z-index: -1; }
.market .card.under { opacity: .9; }

.hand-zone { padding: 6px 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.me-total { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1; min-height: 13px; margin: -2px 0 -6px; position: relative; z-index: 1; }   /* just above your cards, below the fruit / Punch chips */
.me-total b { font-family: var(--display); color: var(--marigold); font-variant-numeric: tabular-nums; }
.me-total .nm { color: var(--ink); }
.meter { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 32px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 6px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; animation: fadeUp .3s var(--ease) both; }
.chip svg { width: 22px; height: 22px; }
.chip.score { background: rgba(95,227,161,.12); border-color: rgba(95,227,161,.35); color: var(--mint); }
.chip.punch { background: rgba(255,184,77,.16); border-color: rgba(255,184,77,.5); color: var(--marigold); }
.hand { display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 1.4vw, 10px); min-height: calc(var(--cw) * 1.4 + 40px); padding-top: 22px; padding-bottom: 14px; touch-action: none; }
.slot { position: relative; transition: margin .3s var(--ease); }
.slot .card { transform: rotate(calc(var(--off) * 2.2deg)) translateY(calc(var(--arc) * 1px)); transition: transform .3s var(--ease); cursor: default; }
.hand.can-throw .slot .card { cursor: grab; }
.hand.can-throw .slot:hover .card { transform: rotate(calc(var(--off) * 2.2deg)) translateY(calc(var(--arc) * 1px - 8px)); }
.slot.sel .card { transform: translateY(-22px) !important; filter: drop-shadow(0 14px 18px rgba(0,0,0,.35)); }
.slot.dragging { z-index: 20; }
.slot.dragging .card { transition: none; cursor: grabbing; }
.slot.punch-card .card .face.front { box-shadow: 0 0 0 3px var(--marigold), 0 0 26px rgba(255,184,77,.6); }
.slot.in-set .card .face.front { box-shadow: 0 0 0 2px rgba(95,227,161,.75), 0 6px 16px rgba(12,2,24,.35); }
.chip.tip { background: var(--marigold); color: #2b1400; border-color: transparent; padding: 0 14px; box-shadow: 0 6px 18px rgba(255,154,60,.35); }
.slot .throw-tip { position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%); white-space: nowrap; background: var(--marigold); color: #2b1400; font-weight: 800; font-size: 12px; padding: 6px 12px; border-radius: 99px; box-shadow: 0 6px 18px rgba(255,154,60,.4); animation: pop .3s var(--spring) both; z-index: 3; pointer-events: none; }
.hand.peek-hidden .slot .card .card-inner { transform: rotateY(180deg); }

/* flying cards */
.fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.fly-layer .card { position: absolute; left: 0; top: 0; will-change: transform; }
.fly-layer .card .face { box-shadow: 0 18px 30px rgba(10,2,20,.45); }

/* punch moment */
.punch-burst { position: fixed; z-index: 70; pointer-events: none; left: 0; top: 0; }
.punch-word { position: fixed; z-index: 71; left: 50%; top: 42%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 800; font-size: clamp(56px, 18vw, 120px); letter-spacing: -.05em; color: var(--marigold); text-shadow: 0 6px 0 #a3480a, 0 18px 40px rgba(0,0,0,.5); pointer-events: none; }
.spark { position: fixed; z-index: 70; width: 10px; height: 10px; border-radius: 3px; pointer-events: none; }

/* sheets & overlays */
/* Sheets stop above the bottom banner ad (--ad-space), so no button ever hides behind it. */
.overlay { position: fixed; inset: 0 0 var(--ad-space, 0px) 0; z-index: 80; background: rgba(12, 4, 22, .74); display: flex; align-items: flex-end; justify-content: center; animation: fade .3s ease both; }
@media (min-width: 700px) { .overlay { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(620px, 100%); max-height: calc(92dvh - var(--ad-space, 0px)); overflow-y: auto; background: linear-gradient(180deg, #2f1c45, #211232); border: 1px solid var(--line); border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: sheetUp .5s var(--ease) both; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 700px) { .sheet { border-radius: 26px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet > * { flex-shrink: 0; }
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { font-size: 24px; flex: 1; }
.sheet .grabber { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); margin: -8px auto 0; }

.results { display: flex; flex-direction: column; gap: 10px; }
.res { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid var(--line); animation: rowIn .45s var(--ease) both; animation-delay: calc(var(--i) * 110ms); }
.res.puncher { background: linear-gradient(90deg, rgba(255,184,77,.16), rgba(255,184,77,.04)); border-color: rgba(255,184,77,.4); }
.res .who { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.res .who .top { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.res .who .top .pts { margin-left: auto; flex-direction: row; align-items: baseline; gap: 8px; }
.res .who .top .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .minis { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.res .minis .card { --w: 30px; }
.res .minis .card.dim { opacity: .5; filter: saturate(.35) brightness(.9); }
.res .minis .card.punched { margin-left: 6px; }
.res .pts { text-align: right; display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.res .pts .plus { font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; color: var(--mint); line-height: 1; }
.res .pts .plus.zero { color: var(--faint); }
.res .pts .tot { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.res .combo { font-size: 12px; color: var(--muted); font-weight: 600; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding-top: 16px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 30%; max-width: 140px; animation: rise .7s var(--spring) both; animation-delay: calc(var(--i) * 160ms + 200ms); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.pod .avatar { width: 52px; height: 52px; font-size: 20px; }
.pod .nm { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .block { width: 100%; border-radius: 14px 14px 4px 4px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 10px; font-family: var(--display); font-weight: 800; }
.pod .block .s { font-size: 22px; font-variant-numeric: tabular-nums; }
.pod .block .r { font-size: 12px; color: var(--muted); font-family: var(--body); }
.pod.p1 .block { height: 120px; background: linear-gradient(180deg, rgba(255,184,77,.45), rgba(255,184,77,.08)); }
.pod.p2 .block { height: 88px; } .pod.p3 .block { height: 64px; }
.crown { width: 34px; height: 34px; color: var(--marigold); margin-bottom: -6px; filter: drop-shadow(0 4px 10px rgba(255,184,77,.5)); }
.rest { display: flex; flex-direction: column; gap: 6px; }
.rest .r { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); font-weight: 600; }

.score-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table.scores { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
table.scores th, table.scores td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.scores th:first-child, table.scores td:first-child { text-align: left; color: var(--muted); }
table.scores thead th { font-size: 12px; color: var(--muted); font-weight: 700; background: rgba(255,255,255,.03); }
table.scores tfoot td { font-weight: 800; font-family: var(--display); font-size: 16px; color: var(--marigold); border-bottom: 0; }
table.scores td.p { color: var(--marigold); font-weight: 800; }
table.scores td.z { color: var(--faint); }

/* how to play */
.steps { display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.step .n { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,184,77,.14); color: var(--marigold); font-family: var(--display); font-weight: 800; }
.step b { display: block; margin-bottom: 2px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.step .demo { display: flex; gap: 4px; margin-top: 8px; }
.step .demo .card { --w: 34px; }
.chart { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 1px; border-radius: 16px; overflow: hidden; background: var(--line); font-variant-numeric: tabular-nums; }
.chart > div { background: #28173b; padding: 10px 8px; text-align: center; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.chart > div.h { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.chart > div.s { justify-content: flex-start; font-weight: 600; font-size: 14px; }
.chart > div.s svg { width: 28px; height: 28px; flex: none; }
.chart > div.v5 { color: var(--marigold); }

/* handoff curtain (pass & play) */
.curtain { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px;
  background: radial-gradient(100% 80% at 50% 40%, #3a2352, #160a22); animation: fade .35s ease both; }
.curtain .avatar { width: 84px; height: 84px; font-size: 34px; }
.curtain h2 { font-size: clamp(28px, 8vw, 40px); }
.curtain p { color: var(--muted); margin: 0; max-width: 30ch; }

/* toast */
.toast { pointer-events: none; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px) + var(--ad-space, 0px)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--card-ink); padding: 14px 20px; border-radius: 16px; font-weight: 700; font-size: 15px; line-height: 1.4; text-align: center; text-wrap: balance; box-shadow: var(--shadow); animation: toastIn .35s var(--spring) both; width: min(440px, calc(100vw - 32px)); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }

/* five opponents on a phone: smaller seats, bubbles kept on screen */
.seats.many { gap: 4px; padding-inline: 6px; --mw: 17px; }
.seats.many .seat .avatar { width: 40px; height: 40px; font-size: 16px; }
.seats.many .seat .nm { font-size: 12px; }
.seats.many .seat .bot-tag { right: calc(50% - 26px); width: 18px; height: 18px; }
.seats.many .seat:first-child .bubble { left: 0; transform: none; animation-name: popEdge; }
.seats.many .seat:last-child .bubble { left: auto; right: 0; transform: none; animation-name: popEdge; }
.seats.many .seat:first-child .bubble::after { left: 22px; }
.seats.many .seat:last-child .bubble::after { left: auto; right: 17px; }
@keyframes popEdge { from { opacity: 0; transform: scale(.7); } }
@media (min-width: 760px) { .seats.many { --mw: 24px; } }

/* sizes */
@media (max-width: 520px) { .topbar { grid-template-columns: auto 1fr; padding-inline: 12px; } .topbar .mini-logo { display: none; } .topbar .tools { gap: 6px; } .topbar .icon-btn { width: 38px; height: 38px; border-radius: 12px; } }
@media (min-width: 760px) {
  :root { --mw: 28px; }
  .seat .avatar { width: 56px; height: 56px; font-size: 21px; }
  .seat .nm { font-size: 14px; }
}
@media (max-height: 700px) {
  :root { --cc: clamp(62px, 17vw, 96px); --cw: clamp(50px, calc((100vw - 40px) / 6.3), 86px); }
  .seats { min-height: 96px; }
  .seat .avatar { width: 40px; height: 40px; }
  .center { gap: 8px; }
}
@media (max-height: 600px) and (orientation: landscape) {
  :root { --cc: 64px; --cw: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* WhatsApp invite button */
.btn.wa { background: #1fa855; color: #fff; text-decoration: none; }
.btn.wa:active { background: #178a45; }

/* Deck choice: Classic or Lemon challenge */
.deckpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deckopt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 16px; background: var(--glass); border: 1.5px solid var(--line); text-align: left; position: relative; transition: border-color .2s, background .2s; }
.deckopt .ic { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px 6px; min-height: 56px; align-content: start; }
.deckopt .ic svg { width: 26px; height: 26px; }
.deckopt b { font-weight: 800; font-size: 16px; }
.deckopt span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.deckopt[aria-pressed="true"] { border-color: var(--marigold); background: rgba(255,182,72,.12); box-shadow: 0 0 0 3px rgba(255,182,72,.18); }
.deckopt[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--marigold); color: #2a1748; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.lemon-box { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(255,225,74,.08); border: 1px solid rgba(255,225,74,.25); margin: 4px 0 14px; }
.lemon-box p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.lemon-box .demo { flex: none; }

/* ---------- profile ---------- */
.me-btn { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 3; border-radius: 50%; padding: 0; }
.me-btn .avatar { width: 44px; height: 44px; box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.35); }
.avatar.anon { background: rgba(255,255,255,.1); color: var(--ink); }
.avatar.anon svg { width: 22px; height: 22px; }
.avatar.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; font-size: 24px; line-height: 1; }
.seat .avatar.emoji { font-size: 26px; }
.pod .avatar.emoji { font-size: 30px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.av-opt { height: 46px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1.5px solid transparent; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.av-opt.none { font-family: var(--display); font-weight: 800; font-size: 18px; color: #1c0d29; background: #ffb84d; }
.av-opt[aria-pressed="true"] { border-color: var(--marigold); background: rgba(255,184,77,.18); box-shadow: 0 0 0 3px rgba(255,184,77,.25); }
.av-opt.none[aria-pressed="true"] { background: #ffb84d; }

/* App in the background (phone call, WhatsApp): stop every looping animation until it's back. */
html.app-hidden *, html.app-hidden *::before, html.app-hidden *::after { animation-play-state: paused !important; }

/* ---------- leaving / reconnecting ---------- */
.seat-st { font-size: 10.5px; font-weight: 700; color: var(--muted); line-height: 1.2; text-align: center; max-width: 100%; }
.seat-st.warn { color: var(--marigold); }
.ended-note { margin: -4px 0 6px; padding: 10px 14px; border-radius: 14px; background: rgba(255,184,77,.12); border: 1px solid rgba(255,184,77,.35); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.4; text-align: center; }

/* ---------- emoji reactions ---------- */
/* Emoji (left) and quick lines (right): round buttons in the bottom corners, beside your cards. */
.talk-btn { position: absolute; top: -4px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; line-height: 1; color: var(--ink); background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 6; transition: transform .15s, background .15s; }
.talk-btn.left { left: max(14px, calc(50% - 280px)); }
.talk-btn.right { right: max(14px, calc(50% - 280px)); }
.talk-btn svg { width: 26px; height: 26px; }
.talk-btn:active { transform: scale(.92); }
.talk-btn.on { background: var(--marigold); border-color: transparent; color: var(--card-ink); }
.talk-pop { position: fixed; z-index: 70; background: #2d1f47; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.5); padding: 10px; animation: pop .25s var(--spring) both; }
.talk-emo { display: grid; grid-template-columns: repeat(4, 52px); gap: 6px; }
.talk-emo button { height: 52px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 32px; line-height: 1; display: grid; place-items: center; transition: transform .15s; }
.talk-emo button:active, .talk-lines button:active { transform: scale(.94); }
.talk-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #c9b8e6); margin: 2px 6px 8px; }
.talk-lines { display: flex; flex-direction: column; gap: 6px; width: min(330px, calc(100vw - 50px)); max-height: min(52vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.talk-lines button { text-align: left; font-size: 14.5px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 12px; line-height: 1.25; transition: transform .15s; }
.say-bub { position: fixed; z-index: 86; max-width: calc(100vw - 16px); background: var(--ink); color: var(--card-ink); font-size: 15px; font-weight: 800; line-height: 1.25; padding: 10px 14px; border-radius: 18px; box-shadow: 0 10px 26px rgba(0,0,0,.45); pointer-events: none; animation: pop .3s var(--spring) both; transition: opacity .35s; }
.say-bub::after { content: ""; position: absolute; left: var(--tail, 50%); top: -8px; margin-left: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
.say-bub.mine::after { top: auto; bottom: -8px; border-bottom: 0; border-top: 8px solid var(--ink); }
.say-bub.out { opacity: 0; }
.reaction { position: fixed; z-index: 85; transform: translate(-50%, -50%); font-size: 64px; line-height: 1; pointer-events: none;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
  animation: reactPop 2.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes reactPop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.3); }
  12% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  22% { transform: translate(-50%, -60%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -85%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(.9); }
}

/* ---------- sound settings ---------- */
.set-btn { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 14px; z-index: 3; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.set-row b { display: block; font-size: 15px; } .set-row small { color: var(--muted); font-size: 13px; font-weight: 600; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; flex: none; transition: background .2s; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch:checked { background: #1fae63; }
.switch:checked::after { transform: translateX(20px); }

.vol-row { display: flex; align-items: center; gap: 14px; padding: 4px 16px 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
.vol-row[hidden] { display: none !important; }
.vol-row input[type=range] { flex: 1; accent-color: #1fae63; height: 30px; }

/* Background update finished: small bar on the home screen, always above the banner ad. */
.upd-bar { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px) + var(--ad-space, 0px)); width: min(440px, calc(100vw - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--ink); color: var(--card-ink); box-shadow: var(--shadow); animation: toastIn .35s var(--spring) both; }
.upd-bar span { display: flex; flex-direction: column; line-height: 1.25; }
.upd-bar b { font-size: 15px; }
.upd-bar small { font-size: 12.5px; opacity: .7; }
.has-upd-bar .home { padding-bottom: 84px; }
.hand-zone:has(.talk-btn) .meter { padding: 0 60px; }   /* fruit chips never slide under the 😊 / 💬 buttons */

/* Card values, always visible under the deck and market */
.values { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.values i { font-style: normal; font-weight: 600; color: var(--muted); }
.values span { display: inline-flex; align-items: center; gap: 2px; }
.values svg { width: 19px; height: 19px; }
@media (max-width: 360px) { .values { gap: 5px; font-size: 12px; padding: 5px 9px; } .values svg { width: 16px; height: 16px; } }
/* First-game tips */
.coach-dim { position: fixed; inset: 0; z-index: 76; background: rgba(12, 4, 22, .5); animation: fade .25s ease both; }
.coach-tip { position: fixed; left: 50%; transform: translateX(-50%); width: min(440px, calc(100vw - 32px)); z-index: 77; background: var(--ink); color: var(--card-ink); border-radius: 22px; padding: 16px 16px 14px; box-shadow: 0 18px 40px rgba(0,0,0,.5); font-size: 15px; font-weight: 600; line-height: 1.38; animation: toastIn .3s var(--spring) both; }
.coach-tip h3 { margin: 0 0 4px; font-family: var(--display); font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.coach-tip h3 svg { width: 26px; height: 26px; }
.coach-tip p { margin: 0; }
.coach-tip table { width: 100%; border-collapse: collapse; margin: 8px 0 10px; font-size: 14px; }
.coach-tip th { font-size: 11px; color: #7a6690; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.coach-tip td { padding: 3px 2px; text-align: center; }
.coach-tip td:first-child { text-align: left; display: flex; align-items: center; gap: 6px; font-weight: 800; }
.coach-tip td svg { width: 24px; height: 24px; }
.coach-tip .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.coach-tip .dots { color: #7a6690; font-size: 13px; }
.coach-tip::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--ink); }

/* Colourful top-bar icons */
.ui-ic { width: 30px; height: 30px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
@media (max-width: 520px) { .topbar .icon-btn .ui-ic { width: 27px; height: 27px; } }

/* "Connection lost — reconnecting…" banner: looks like a toast but is not removed by other toasts */
.conn-banner { pointer-events: none; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px) + var(--ad-space, 0px)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--card-ink); padding: 14px 20px; border-radius: 16px; font-weight: 700; font-size: 15px; text-align: center; box-shadow: var(--shadow); width: min(440px, calc(100vw - 32px)); }
/* Final scores: "Share result" (scorecard picture for WhatsApp / Status / Instagram) */
.share-row { display: flex; justify-content: center; margin: 2px 0 4px; }
.btn.share-btn { background: linear-gradient(180deg, #ffc867, var(--marigold-2)); color: var(--card-ink); font-weight: 800; border: 0; min-height: 44px; padding: 0 20px; border-radius: 999px; box-shadow: 0 4px 14px rgba(255, 154, 60, .35); }
.btn.share-btn:disabled { opacity: .6; }

/* ---------- 1.1.0 ---------- */
/* Five-of-a-kind hint: two tidy lines, exactly as tall as (and level with) the 😊 / 💬 buttons. */
.hand-zone:has(.talk-btn) .meter { min-height: 52px; align-items: flex-start; margin-top: -10px; }
.chip.punch { height: 52px; padding: 0 14px 0 8px; border-radius: 18px; gap: 8px; max-width: 100%; box-sizing: border-box; animation: fade .3s ease both; }
.chip.punch svg { width: 28px; height: 28px; flex: none; }
.chip.punch .t { display: flex; flex-direction: column; line-height: 1.2; text-align: left; min-width: 0; }
.chip.punch .t b { font-size: clamp(13px, 4vw, 15px); font-weight: 800; }
.chip.punch .t small { font-size: clamp(11px, 3.3vw, 12.5px); font-weight: 700; color: var(--ink); opacity: .85; }
@media (max-width: 359px) { .chip.punch svg { display: none; } .chip.punch { padding: 0 12px; } }

/* Main button fixed at the bottom of setup / room screens, always above the banner ad. */
.cta-bar { position: sticky; bottom: 0; z-index: 5; margin: 0 -20px; padding: 22px 20px 10px;   /* the screen already keeps the banner's space free */
  background: linear-gradient(to top, rgba(22,10,36,.9) 0%, rgba(22,10,36,.72) 60%, rgba(22,10,36,0) 100%); display: flex; flex-direction: column; gap: 8px; }
.cta-bar > .btn, .cta-bar #l-start .btn { width: 100%; }
.cta-bar .hint { margin: 0 !important; }
.page:has(> .cta-bar) { padding-bottom: 0; }
body.typing .cta-bar { visibility: hidden; }   /* keyboard open: never cover the name box */

/* Online "Ready" check between rounds */
.rdy-zone { display: flex; flex-direction: column; gap: 12px; }
.rdy-row { display: flex; gap: 6px; justify-content: center; }
.rdy { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-width: 0; }
.rdy .avatar { width: 34px; height: 34px; font-size: 15px; }
.rdy .rn { font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdy .rs { font-size: 11px; font-weight: 800; color: var(--muted); }
.rdy.ok { border-color: rgba(95,227,161,.45); background: rgba(95,227,161,.08); } .rdy.ok .rs { color: var(--mint); }
.rdy.ad { border-color: rgba(255,184,77,.4); } .rdy.ad .rs { color: var(--marigold); }
.rdy-wait { text-align: center; font-weight: 700; font-size: 14.5px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.05); line-height: 1.4; }
.rdy-wait span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.status .sub .hurry { color: var(--marigold); font-weight: 800; }
.status .sub .btn { margin-top: 6px; pointer-events: auto; }

/* ===== 1.2.0: Let's Double It, Helped punch, coins ===== */
.coin { width: 1.15em; height: 1.15em; vertical-align: -0.2em; object-fit: contain; }
.coin-amt { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hand { --ov: 0px; }
.hand.tight .slot + .slot { margin-left: var(--ov); }
.dbl-badge { align-self: center; margin: 0 auto 4px; padding: 5px 14px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--marigold); background: rgba(255,184,77,.14); border: 1px solid rgba(255,184,77,.55); width: max-content; }
.badge.dbl { background: rgba(255,184,77,.16); color: var(--marigold); border: 1px solid rgba(255,184,77,.5); margin-left: 8px; }
.dbl-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed rgba(255,184,77,.55); background: rgba(255,184,77,.07); }
.dbl-row .ic { font-size: 24px; }
.dbl-row .tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dbl-row .tx small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.dbl-row .btn { flex: none; }
.dbl-rule { font-weight: 700; color: var(--ink) !important; margin: -4px 0 0; }
.dbl-list { display: flex; flex-direction: column; gap: 8px; }
.dbl-p { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.dbl-p .nm { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbl-p .ok { color: #5fe3a1; font-weight: 800; font-size: 13px; }
.dbl-p .no { color: #ff8a8a; font-weight: 800; font-size: 13px; }
.dbl-p .go { color: var(--marigold); font-weight: 800; font-size: 13px; }
.dbl-p .mu { color: var(--muted); font-weight: 600; font-size: 13px; }
.dbl-note { padding: 12px 14px; border-radius: 14px; background: rgba(95,227,161,.10); border: 1px solid rgba(95,227,161,.35); font-weight: 700; font-size: 14px; }
.dbl-note.no { background: rgba(255,138,138,.10); border-color: rgba(255,138,138,.35); }
.gtype { display: flex; flex-direction: column; gap: 10px; }
.gt-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; cursor: pointer; }
.gt-opt[aria-pressed="true"] { border-color: var(--marigold); background: rgba(255,184,77,.08); }
.gt-opt > span:last-child { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.gt-opt small { color: var(--muted); font-size: 12.5px; }
.gt-opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; margin-top: 2px; }
.gt-opt[aria-pressed="true"] .radio { border-color: var(--marigold); box-shadow: inset 0 0 0 4px var(--bg, #1a0f2a); background: var(--marigold); }
.gt-unlock { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.gt-unlock.ok { color: #5fe3a1; font-weight: 800; }
.gt-unlock .dots { display: flex; gap: 4px; }
.gt-unlock .dots i { width: 22px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); }
.gt-unlock .dots i.on { background: #5fe3a1; }
.gt-unlock .row { gap: 8px; flex-wrap: wrap; }
.help-opts { display: flex; flex-direction: column; gap: 10px; }
.help-opts .btn { width: 100%; justify-content: center; }
.h-sym { width: 26px; height: 26px; vertical-align: -5px; }

/* ===== 1.2.0: home top bar, challenge, tiles, daily reward, profile, Deck Library, card backs ===== */
.home-top { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.home-top .me-btn { position: relative; top: auto; right: auto; }
.me-btn .lv { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--marigold); color: #2b1400; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 99px; white-space: nowrap; }
.coin-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 8px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.coin-chip .coin { width: 24px; height: 24px; }
.gift-btn { position: relative; font-size: 22px; }
.gift-btn .dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #ff5a6e; box-shadow: 0 0 0 2px var(--bg-deep, #1a0f2a); }
.chal { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; border: 1.5px dashed rgba(255,184,77,.55); background: rgba(255,184,77,.08); color: var(--ink); text-align: left; position: relative; z-index: 1; }
.chal .ci { font-size: 26px; }
.chal .ct { flex: 1; min-width: 0; }
.chal .ct b { display: block; font-weight: 800; font-size: 15px; }
.chal .ct span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.chal .cr { color: var(--marigold); font-weight: 900; text-align: center; font-size: 13px; line-height: 1.1; }
.chal .cr .coin { width: 20px; height: 20px; margin-top: 2px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; position: relative; z-index: 1; }
.tile { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; border: 1.5px dashed rgba(255,184,77,.55); background: rgba(255,184,77,.08); color: var(--ink); text-align: left; font-size: 15px; }
.tile-art { width: 32px; height: 44px; flex: none; border-radius: 5px; overflow: hidden; display: grid; place-items: center; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile-art.q { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); font-weight: 900; color: var(--marigold); font-size: 18px; }
.classic-art { display: block; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.classic-art svg { width: 100%; height: 100%; display: block; }
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dtile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.dtile.big { grid-column: span 2; }
.dtile .dl { font-size: 12px; color: var(--muted); font-weight: 700; }
.dtile b { font-size: 20px; }
.dtile .dc { min-height: 22px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.dtile .dc .coin { width: 22px; height: 22px; }
.dtile.today { border: 2px solid var(--marigold); background: rgba(255,184,77,.12); }
.dtile.today .dl { color: var(--marigold); }
.dtile.past { opacity: .65; }
.dtile.saved { border-style: dashed; border-color: rgba(95,227,161,.6); }
.dtile.saved .dc { color: #5fe3a1; font-weight: 800; }
.btn .coin { width: 22px; height: 22px; }
.coin.big { width: 30px; height: 30px; vertical-align: -7px; }
.lvl { display: flex; flex-direction: column; gap: 6px; }
.lvl span { color: var(--muted); font-size: 13px; }
.lvl .bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.lvl .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb84d, #ff9a3c); border-radius: inherit; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 div { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.stat3 b { font-size: 24px; }
.stat3 span { color: var(--muted); font-size: 12.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.bdg { padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; border: 1px dashed var(--line); color: var(--faint, rgba(255,255,255,.4)); }
.bdg.on { border-style: solid; border-color: rgba(255,184,77,.5); color: var(--ink); background: rgba(255,184,77,.1); }
.decklib { gap: 14px; }
.decklib .page-head .coin-chip { font-size: 14px; }
.deck-cur { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 1.5px solid rgba(255,184,77,.55); background: rgba(255,184,77,.06); }
.deck-cur > img, .deck-cur > .classic-art { width: 84px; height: 118px; flex: none; border-radius: 10px; object-fit: cover; }
.deck-cur > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deck-cur b { font-size: 20px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 10.5px; font-weight: 900; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; }
.tag.in { background: rgba(95,227,161,.15); color: #5fe3a1; }
.tag.till { background: var(--marigold); color: #2b1400; }
.deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.deck-it { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; border: 0; color: var(--ink); font-size: 13px; }
.deck-it > img, .deck-it > .classic-art { width: 100%; aspect-ratio: 5 / 7; border-radius: 10px; object-fit: cover; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.deck-it.cur > img, .deck-it.cur > .classic-art { outline: 3px solid var(--marigold); outline-offset: 2px; }
.chipx { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.08); white-space: nowrap; }
.chipx .coin { width: 15px; height: 15px; }
.chipx.free { background: rgba(95,227,161,.15); color: #5fe3a1; }
.chipx.own { background: rgba(255,184,77,.15); color: var(--marigold); }
.pdots { display: inline-flex; gap: 3px; }
.pdots i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); }
.pdots i.on { background: #5fe3a1; }
.deck-detail { display: flex; gap: 16px; align-items: center; }
.deck-detail img { width: 96px; border-radius: 10px; flex: none; }
.deck-detail h2 { margin: 0 0 6px; }
.opt-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font-size: 18px; }
.opt-btn span { display: flex; flex-direction: column; gap: 2px; }
.opt-btn b { font-size: 15px; }
.opt-btn small { color: var(--muted); font-size: 12.5px; }
.opt-btn.hot { border-color: var(--marigold); }
.opt-btn:disabled { opacity: .5; }
.opt-btn .coin { width: 24px; height: 24px; }
/* Card backs from the Deck Library (Gaurav's artwork, as-is). Online, each opponent's hand shows their own back. */
.deck-art .face.back, .seat[data-back]:not([data-back="classic"]) .face.back { background: var(--deck-img) center / cover no-repeat; }
.deck-art .face.back svg, .seat[data-back]:not([data-back="classic"]) .face.back svg { display: none; }
.seat[data-back="classic"] .face.back { background: none; }
.seat[data-back="classic"] .face.back svg { display: block; }
.paused { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.paused .pz { width: 64px; height: 64px; border-radius: 16px; background: var(--marigold); display: grid; place-items: center; font-size: 30px; color: #2b1400; }
.paused h2 { margin: 0; }
.paused .btn { width: 100%; justify-content: center; }

/* ===== 1.2.0 round 4 (approved 2 Nov) ===== */
.home-top { left: 14px; right: 14px; justify-content: space-between; }
.home-top .rt { display: flex; align-items: center; gap: 8px; }
.home-top .coin-chip { font-size: 16px; }
@media (max-height: 760px) { .logo-fan { transform: scale(.82); margin-bottom: -14px; } }
.chal.done { border: 1.5px solid rgba(95,227,161,.7); background: rgba(95,227,161,.10); }
.chal.done .cr { color: #5fe3a1; }
.chal.done .cr small { font-size: 11px; font-weight: 700; }
.coin-hint { margin: 0 0 8px; color: var(--marigold); font-weight: 700; font-size: 13px; }
.coin-pill { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; max-width: calc(100vw - 32px); padding: 8px 16px 8px 10px; border-radius: 22px; background: #2a1844; border: 1.5px solid var(--marigold); box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 24px rgba(255,184,77,.35); color: #fff; font-weight: 900; font-size: 20px; animation: pop .3s var(--spring) both; transition: opacity .35s, transform .35s; pointer-events: none; }
.coin-pill .coin { width: 30px; height: 30px; }
.coin-pill .plus { color: #5fe3a1; font-size: 16px; }
.coin-pill small { flex-basis: 100%; text-align: center; font-size: 12.5px; font-weight: 700; color: #ffd27a; }
.coin-pill.out, .chal-banner.out { opacity: 0; transform: translate(-50%, -20px); }
.coin-fly { position: fixed; left: 0; top: 0; width: 26px; height: 26px; z-index: 299; pointer-events: none; filter: drop-shadow(0 0 6px rgba(255,184,77,.8)); }
.chal-banner { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: calc(100vw - 24px); max-width: 480px; z-index: 301; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, #1f6b4a, #16503a); border: 1.5px solid #5fe3a1; box-shadow: 0 10px 30px rgba(0,0,0,.5); color: #fff; animation: pop .3s var(--spring) both; transition: opacity .35s, transform .35s; pointer-events: none; }
.chal-banner .ci { font-size: 30px; }
.chal-banner .ct { flex: 1; min-width: 0; }
.chal-banner .ct b { display: block; font-size: 16px; }
.chal-banner .ct span { font-size: 13px; opacity: .85; }
.chal-banner .cr { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 18px; color: #ffd27a; }
.chal-banner .cr .coin { width: 24px; height: 24px; }
.sel-dim { position: fixed; inset: 0; background: rgba(10,4,20,.72); z-index: 200; }
.sel-card { position: fixed; left: 50%; top: 44%; transform: translate(-50%,-50%) rotate(-3deg); width: 190px; z-index: 201; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; }
.sel-card > img, .sel-card > .classic-art { width: 190px; height: 266px; border-radius: 16px; object-fit: cover; box-shadow: 0 0 0 4px var(--marigold), 0 0 60px 18px rgba(255,184,77,.65); }
.sel-tag { margin-top: 10px; background: #5fe3a1; color: #0f2a1c; font-weight: 900; font-size: 18px; padding: 10px 22px; border-radius: 99px; }
.sel-card b { font-size: 20px; }
.sel-card span { font-size: 14px; color: #ffd27a; font-weight: 700; }
.deck-cur.glow { box-shadow: 0 0 0 3px var(--marigold), 0 0 30px rgba(255,184,77,.5); transition: box-shadow .4s; }
/* Home (2 Nov, Gaurav's phone test): top icons stay put, the rest scrolls; the Punch Patti picture always starts in view. */
.home-top { position: fixed; }
.home { justify-content: flex-start; padding-top: calc(70px + env(safe-area-inset-top, 0px)); gap: 20px; }
.home .modes { gap: 10px; }
.home .foot { margin-top: -6px; }
.never { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.never input { width: 18px; height: 18px; accent-color: var(--marigold); }
.help-sub { margin: 2px 0 6px; }
/* Home: the Punch Patti picture stays behind as a layer; the buttons slide over it and it fades (no extra scrolling). */
.home .logo { position: sticky; top: 0; z-index: 0; transition: opacity .1s linear; }
.home .modes { z-index: 2; }
.home .foot { z-index: 2; line-height: 1.7; }
/* 4 Nov: no Resume button → the title stays pinned at the top above a soft band; only the cards + tagline fade. */
.home .logo.keep-title { z-index: 4; pointer-events: none; transition: none; }
.home .logo.keep-title .logo-fan, .home .logo.keep-title .tagline { transition: opacity .1s linear; }
.home-band { position: fixed; left: 0; right: 0; top: 0; height: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, var(--table-2) 0%, var(--table-2) 80%, transparent 100%); }
.home-top { z-index: 5; }
.home { padding-bottom: 14px; }
/* 1.2.0 pop-ups: even spacing, no overlapping text (Gaurav's phone test, 3 Nov) */
.dbl-box, .help-box, .ud-box, .dk-box { display: flex; flex-direction: column; gap: 14px; }
.dbl-box .sheet-head h2, .help-box .sheet-head h2, .ud-box .sheet-head h2 { line-height: 1.2; margin: 0; }
.dbl-box .hint, .help-box .hint, .ud-box .hint, .dk-box .hint { margin: 0; line-height: 1.4; }
.dbl-rule { margin: 0 !important; line-height: 1.35; }
.dbl-box .row.tbtns { display: flex; gap: 10px; }
.dbl-box .row.tbtns .btn { flex: 1; justify-content: center; }
.help-sub { margin: 0 !important; }
.dbl-box .row.tbtns .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
/* Two-button rows in the new pop-ups: the main button gets the room and stays on one line; the other is only as wide as its word. */
.row.tbtns.pair { display: flex; gap: 10px; flex-wrap: nowrap; }
.row.tbtns.pair .btn { white-space: nowrap; justify-content: center; }
.row.tbtns.pair .btn.soft, .row.tbtns.pair .btn.ghost { flex: 0 0 auto; padding-left: 22px; padding-right: 22px; }
.row.tbtns.pair .btn.primary { flex: 1 1 auto; min-width: 0; }
.dbl-box .row.tbtns .btn { flex: initial; }
/* Pinned title: tighter shadow so it doesn't darken the START HERE tag below it (4 Nov). */
.home .logo.keep-title .wordmark { text-shadow: 0 2px 0 rgba(23, 11, 36, .85), 0 4px 10px rgba(23, 11, 36, .7); }
.fam-row .nm { display: flex; flex-direction: column; line-height: 1.25; }
.fam-row .nm small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fam-row .nm small b { color: var(--ink); }
.fam-row .fam-lead { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--marigold); white-space: nowrap; }
/* Family record: about 2½ rows show, the rest scrolls (the half row says "there's more"). */
.fam-list { max-height: 190px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }

/* 1.3.0: invite reward, challenge card, welcome back */
.inv-strip { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; background: rgba(95, 227, 161, .1); border: 1px solid rgba(95, 227, 161, .25); font-size: 13px; }
.inv-strip small { color: var(--muted); }
.inv-bar { display: block; height: 6px; border-radius: 9px; background: rgba(255,255,255,.12); overflow: hidden; }
.inv-bar i { display: block; height: 100%; background: var(--mint); border-radius: 9px; }
.inv-pop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0 4px; }
.inv-pop .ip-i { font-size: 40px; line-height: 1; }
.inv-pop b { font-family: var(--display); font-size: 20px; }
.inv-pop .ip-c { font-family: var(--display); font-size: 34px; font-weight: 800; color: var(--marigold); display: flex; align-items: center; gap: 4px; }
.inv-pop .ip-c .coin { width: 30px; height: 30px; }
.inv-pop small { color: var(--muted); }
.chip-c { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--card-ink); color: var(--marigold); font-size: 12px; font-weight: 800; }
