/* Hokm · BoardBazi
   Phone first: the score on top, the table in the middle, your hand fanned at the bottom.
   body.lay-desktop adds a sidebar (score sheet, last trick, hands, reactions) next to a large table;
   body.landscape squeezes everything for phones held sideways.
   The look follows Varagh's "Namad" design: petrol-ink felt with a stitched hem, ivory as the only
   pressable fill, blue for us and apricot for them (always labelled too), cards with a large index.
   The table, the trick and the hand are physical: they sit in dir="ltr" boxes and are never mirrored. */

@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/vazirmatn-arabic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/vazirmatn-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  /* surfaces: petrol-ink felt */
  --void: #070d12;
  --felt: #0d2a33;
  --felt-lit: #134350;
  --felt-deep: #081c24;
  --s1: #12202a;
  --s2: #1b2d39;
  --s3: #26404f;
  --line: rgba(242, 238, 223, .14);
  --line-2: rgba(242, 238, 223, .24);
  --line-3: rgba(242, 238, 223, .42);
  /* text */
  --t1: #f2eedf;
  --t2: #b7c6cb;
  --t3: #93a5ac;
  /* the one pressable fill */
  --paper: #f2eedf;
  --on-paper: #0b1a20;
  /* teams and states */
  --us: #8ec5ff;
  --them: #ffb27a;
  --urgent: #ff6a4d;
  --ok: #6fd3a0;
  --gold: #e3b04b;
  /* card faces */
  --face: #f6f0de;
  --face-dim: #bfc1bb;
  --ink-black: #1b2128;
  --ink-red: #b3122b;
  --ink-red-dim: #8a1730;
  --font: 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --app-h: 100vh;
  --bar-h: 40px;
  --cw: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sh-card: 0 0 0 .012em rgba(0, 0, 0, .4), 0 .02em 0 rgba(0, 0, 0, .25), 0 .07em .12em -.03em rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--void);
  color: var(--t1);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  font-size: 15px;
  line-height: 1.55;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--us); }
.hidden { display: none !important; }
.muted { color: var(--t3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
body.busy { cursor: progress; }

/* ---------------- buttons and controls ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--s2); color: var(--t1);
  text-decoration: none; font-weight: 700; white-space: nowrap;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: var(--s3); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn-paper { background: var(--paper); color: var(--on-paper); border-color: transparent; box-shadow: 0 2px 0 #9c9885, 0 8px 14px -8px rgba(0, 0, 0, .6); }
.btn-paper:hover:not(:disabled) { background: #fffaf0; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255, 106, 77, .14); border-color: rgba(255, 106, 77, .45); color: #ffc3b6; }
.btn-lg { min-height: 52px; font-size: 17px; width: 100%; }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: 13.5px; }
.btn-xs { min-height: 32px; padding: 2px 10px; font-size: 12.5px; border-radius: 9px; }
.icon-btn { background: transparent; border: 0; color: var(--t1); width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; }
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.icon-btn:disabled { opacity: .35; }
.icon-btn.on { background: var(--paper); color: var(--on-paper); }
.btn:focus-visible, .seg button:focus-visible, .icon-btn:focus-visible, .card:focus-visible, .tp-opt:focus-visible { outline: 3px solid var(--us); outline-offset: 2px; }

.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--s3); color: var(--t2); font-weight: 700; }
.tag-off { background: rgba(255, 106, 77, .18); color: #ffc3b6; }
.chip { font-size: 12px; font-weight: 700; color: var(--t3); }

.seg { display: flex; gap: 4px; background: var(--s2); padding: 3px; border-radius: 12px; border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 6px 8px; font-size: 14px; font-weight: 700; min-height: 38px; color: var(--t2); }
.seg button.on { background: var(--paper); color: var(--on-paper); }
.seg button:disabled { opacity: .65; }
.seg button.on:disabled { opacity: 1; }
.setting { display: flex; flex-direction: column; gap: 6px; }
.setting > span { font-size: 13px; font-weight: 700; color: var(--t2); }

.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); cursor: pointer; }
.toggle > span:first-child { flex: 1; display: flex; flex-direction: column; }
.toggle strong { font-size: 14px; }
.toggle small { font-size: 12px; color: var(--t3); line-height: 1.5; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { width: 44px; height: 26px; border-radius: 13px; background: var(--s3); position: relative; flex: none; transition: background .15s; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--t2); transition: transform .15s, background .15s; }
.toggle input:checked + .toggle-ui { background: var(--ok); }
.toggle input:checked + .toggle-ui::after { background: #fff; transform: translateX(18px); }
[dir='rtl'] .toggle input:checked + .toggle-ui::after { transform: translateX(-18px); }
.toggle input:disabled + .toggle-ui { opacity: .55; }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--us); outline-offset: 2px; }

/* ---------------- cards ---------------- */
.card {
  --w: var(--cw);
  position: relative; display: block; flex: none; padding: 0; border: 0;
  width: var(--w); height: calc(var(--w) * 1.42);
  font: inherit; font-size: var(--w); line-height: 1; text-align: left;
  border-radius: .12em; background: var(--face); color: var(--sc, var(--ink-black));
  box-shadow: var(--sh-card); user-select: none; -webkit-user-select: none;
}
.card[data-suit='H'], .card[data-suit='D'] { --sc: var(--ink-red); }
.card .pip { display: block; width: 1em; height: 1em; }
.card .face { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.card .face::after { content: ''; position: absolute; inset: .035em; border-radius: .09em; box-shadow: inset 0 0 0 .012em rgba(27, 33, 40, .12); }
.card .mid { position: absolute; inset: 0; line-height: 0; }
.card .pp { position: absolute; width: .18em; height: .18em; transform: translate(-50%, -50%); color: var(--sc); }
.card .pp.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .pp .pip, .card .ace .pip { width: 100%; height: 100%; }
.card .ace { position: absolute; left: 66%; top: 56%; width: .5em; height: .5em; transform: translate(-50%, -50%); color: var(--sc); }
.card .courtbox { position: absolute; left: 67%; top: 50%; width: .54em; height: .89em; transform: translate(-50%, -50%); color: var(--sc); }
.card .court { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .court .g { fill: currentColor; }
.card .court .hd { fill: var(--face); stroke: currentColor; stroke-width: 1.4; }
.card .court .dt { fill: none; stroke: var(--face); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card .idx { position: absolute; z-index: 4; left: .05em; top: .04em; width: .32em; display: flex; flex-direction: column; align-items: center; gap: .012em; padding: .025em 0 .03em; background: var(--face); border-radius: .07em; direction: ltr; }
.card .rank { font-family: var(--font); font-weight: 800; font-size: .3em; line-height: .98; color: var(--sc); font-variant-numeric: lining-nums tabular-nums; }
.card .rank.r10 { display: inline-block; transform: scaleX(.8); letter-spacing: -.05em; margin-inline: -.02em; }
.card .idx-pip { width: .225em; height: .225em; color: var(--sc); }
/* state: dim re-tints the face and the inks, never opacity, so the index stays readable */
.card[data-tint='dim'] { background: var(--face-dim); --sc: var(--ink-black); }
.card[data-tint='dim'][data-suit='H'], .card[data-tint='dim'][data-suit='D'] { --sc: var(--ink-red-dim); }
.card[data-tint='dim'] .idx { background: var(--face-dim); }
.card[data-tint='dim'] .court .hd { fill: var(--face-dim); }
.card[data-tint='dim'] .court .dt { stroke: var(--face-dim); }
.card[data-tint='legal'] { cursor: pointer; box-shadow: 0 0 0 .012em rgba(0, 0, 0, .4), 0 0 0 .02em var(--felt-deep), 0 0 0 .045em var(--us), 0 .08em .14em -.03em rgba(0, 0, 0, .6); }
.card[data-lifted='true'] { box-shadow: 0 0 0 .012em rgba(0, 0, 0, .4), 0 0 0 .02em var(--felt-deep), 0 0 0 .05em var(--paper), 0 .12em .2em -.02em rgba(0, 0, 0, .65); }
.card[data-winner='true'] { box-shadow: 0 0 0 .012em rgba(0, 0, 0, .4), 0 0 0 .035em var(--gold), 0 0 .25em rgba(227, 176, 75, .55); }
.card.mini { --w: 30px; }
.card.back { background: var(--felt-lit); overflow: hidden; }
.card.back .back-art { position: absolute; inset: .05em; border-radius: .08em; border: .02em solid rgba(242, 238, 223, .55);
  background: repeating-linear-gradient(45deg, rgba(242, 238, 223, .1) 0 .03em, transparent .03em .09em), repeating-linear-gradient(-45deg, rgba(242, 238, 223, .1) 0 .03em, transparent .03em .09em), var(--felt); }

/* ---------------- splash ---------------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, var(--felt-lit), var(--felt-deep) 60%, var(--void)); transition: opacity .45s; }
.splash.gone { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; }
.splash-cards, .intro-fan { position: relative; height: 112px; width: 200px; margin: 0 auto; }
.splash-cards .card, .intro-fan .card { --w: 62px; position: absolute; left: 50%; bottom: 0; transform-origin: 50% 110%; }
.fan-0 { transform: translateX(-50%) rotate(-24deg); }
.fan-1 { transform: translateX(-50%) rotate(-12deg); }
.fan-2 { transform: translateX(-50%) rotate(0deg); }
.fan-3 { transform: translateX(-50%) rotate(12deg); }
.fan-4 { transform: translateX(-50%) rotate(24deg); }
.splash-cards .card { animation: fanIn .7s var(--ease) both; }
.splash-cards .fan-1 { animation-delay: .06s; }
.splash-cards .fan-2 { animation-delay: .12s; }
.splash-cards .fan-3 { animation-delay: .18s; }
.splash-cards .fan-4 { animation-delay: .24s; }
@keyframes fanIn { from { transform: translateX(-50%) rotate(0deg); opacity: 0; } }
.splash-title { font-size: 40px; font-weight: 900; margin: 14px 0 4px; }
.splash-text { font-size: 13px; color: var(--t2); }

/* ---------------- BoardBazi bar ---------------- */
.bb-bar {
  position: fixed; inset-inline: 0; top: 0; z-index: 30;
  height: calc(var(--bar-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  padding-inline: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(14, 18, 29, .92); border-bottom: 1px solid rgba(255, 255, 255, .08); color: #f8fafc;
}
.bb-bar a { color: inherit; text-decoration: none; }
.bb-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.bb-mark { width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, #6366f1, #06b6d4); display: grid; place-items: center; color: #fff; flex: none; }
.bb-chip { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.bb-initial { width: 24px; height: 24px; border-radius: 50%; background: #334155; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.bb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.bb-level { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.bb-xp { width: 48px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; flex: none; }
.bb-xp-fill { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #06b6d4); }
.bb-signin { font-size: 13px; color: #cbd5e1 !important; }
body.with-bar .view-intro { padding-top: calc(var(--bar-h) + env(safe-area-inset-top) + 12px); }
/* Results screen: the bar sits above the table */
body.with-bar .view-game { padding-top: calc(var(--bar-h) + env(safe-area-inset-top)); }
@media (max-width: 380px) { .bb-word { display: none; } }

/* ---------------- intro / home / lobby ---------------- */
.app { min-height: var(--app-h); }
.view-intro {
  position: relative; min-height: var(--app-h); display: flex; align-items: center; justify-content: center; padding: 16px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(19, 67, 80, .9), transparent 65%),
    repeating-linear-gradient(45deg, rgba(242, 238, 223, .025) 0 2px, transparent 2px 9px),
    var(--felt-deep);
}
.intro-card {
  position: relative; z-index: 1; width: 100%; max-width: 460px;
  background: rgba(18, 32, 42, .96); border-radius: 22px; padding: 22px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line);
}
.intro-card::before { content: ''; position: absolute; inset: 6px; border-radius: 17px; border: 1.5px dashed rgba(242, 238, 223, .1); pointer-events: none; }
.intro-fan { margin-top: 6px; height: 104px; }
.intro-title { margin: 4px 0 0; text-align: center; font-size: 38px; font-weight: 900; line-height: 1.2; }
.intro-sub { margin: -6px 0 0; text-align: center; color: var(--them); font-size: 14px; font-weight: 700; }
.intro-text { margin: 0; color: var(--t2); font-size: 14.5px; text-align: justify; }
.intro-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
.intro-facts li { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--s2); color: var(--t2); border: 1px solid var(--line); }
.intro-hint { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(142, 197, 255, .12); color: var(--us); font-size: 13.5px; text-align: center; }
.intro-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.intro-link { font-size: 13.5px; color: var(--t2); text-decoration: none; }
.intro-link strong { color: var(--us); }
.intro-note { margin: 0; text-align: center; font-size: 12px; color: var(--t3); }
.intro-rules { align-self: center; }
.lang-switch { position: absolute; top: 14px; inset-inline-end: 14px; display: flex; gap: 2px; z-index: 2; }
.home-tools .lang-switch { position: static; }
.lang-switch button { border: 0; background: transparent; color: var(--t3); font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; min-height: 30px; }
.lang-switch button.on { background: var(--s3); color: var(--t1); }
.dev-login { border-top: 1px dashed var(--line-2); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dev-login label { font-size: 12px; color: var(--t3); font-weight: 700; }
.dev-login .row { display: flex; gap: 6px; }
input { font: inherit; color: var(--t1); background: var(--s2); border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; min-height: 44px; min-width: 0; flex: 1; }
input:focus-visible { outline: 3px solid var(--us); outline-offset: 1px; }

.home-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.home-tools { display: flex; align-items: center; gap: 4px; }
.home-hello { font-size: 13px; color: var(--t3); }
.home-name { font-size: 22px; font-weight: 800; line-height: 1.3; word-break: break-word; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.home-stats:empty { display: none; }
.home-stats div { background: var(--s2); border-radius: 12px; padding: 8px; text-align: center; border: 1px solid var(--line); }
.home-stats b { display: block; font-size: 20px; }
.home-stats span { font-size: 12px; color: var(--t3); }
.home-block { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(13, 42, 51, .55); border: 1px solid var(--line); }
.home-block h2 { margin: 0; font-size: 16px; }
.home-block p { margin: -4px 0 0; }
.join-form { display: flex; gap: 8px; }
.join-form input { text-transform: uppercase; letter-spacing: .2em; text-align: center; font-weight: 800; }

.lobby-card { max-width: 520px; }
.lobby-top { display: flex; align-items: center; gap: 10px; }
.lobby-code { font-size: 30px; font-weight: 900; letter-spacing: .18em; flex: 1; text-align: center; }
.lobby-help { margin: 0; color: var(--t2); font-size: 13.5px; text-align: center; }
.lobby-table {
  display: grid; gap: 8px;
  grid-template-columns: 1fr 1.1fr 1fr;
  grid-template-areas: '. top .' 'left felt right' '. bottom .';
  align-items: center;
}
.ls { border-radius: 14px; padding: 8px; background: var(--s2); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 96px; justify-content: center; text-align: center; }
.ls.team-us { border-color: rgba(142, 197, 255, .5); }
.ls.team-them { border-color: rgba(255, 178, 122, .5); }
.ls.me { background: rgba(142, 197, 255, .1); }
.ls-top { grid-area: top; }
.ls-left { grid-area: left; }
.ls-right { grid-area: right; }
.ls-bottom { grid-area: bottom; }
.ls-team { font-size: 11px; font-weight: 800; color: var(--t3); }
.team-us .ls-team { color: var(--us); }
.team-them .ls-team { color: var(--them); }
.ls-who { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.ls-name { font-size: 13px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-tags { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.ls-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ls-felt { grid-area: felt; aspect-ratio: 1.2; border-radius: 50%; background: radial-gradient(ellipse, var(--felt-lit), var(--felt) 70%); border: 1.5px dashed rgba(242, 238, 223, .18); display: grid; place-items: center; text-align: center; padding: 6px; }
.ls-felt span { font-size: 11px; color: var(--t2); font-weight: 700; }
.lobby-settings { display: flex; flex-direction: column; gap: 10px; }
.lobby-actions { display: flex; gap: 8px; }
.lobby-actions .btn { flex: 1; }

/* Avatars: a letter in a team ring */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--s3); color: var(--t1); flex: none; box-shadow: 0 0 0 2px var(--felt-deep), 0 0 0 3.5px var(--ring-c, var(--line-3)); }
.av.us { --ring-c: var(--us); }
.av.them { --ring-c: var(--them); }

/* ---------------- the table ---------------- */
.view-game { height: var(--app-h); display: flex; flex-direction: column; overflow: hidden; background: var(--void); }
.hud {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top) + 4px) 6px 4px; min-height: 52px;
  background: var(--s1); border-bottom: 1px solid var(--line);
}
.hud-score { flex: 1; display: flex; align-items: stretch; justify-content: center; gap: 2px; min-width: 0; }
.sc, .sc-mid { white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 3px 12px; background: var(--s2); }
.sc small, .sc-mid small, .tb-text small { font-size: 11px; font-weight: 700; color: var(--t3); }
.sc b { font-size: 22px; font-variant-numeric: tabular-nums; }
.sc-us { border-radius: 12px 4px 4px 12px; }
.sc-them { border-radius: 4px 12px 12px 4px; }
[dir='rtl'] .sc-us { border-radius: 4px 12px 12px 4px; }
[dir='rtl'] .sc-them { border-radius: 12px 4px 4px 12px; }
.sc-us b { color: var(--us); }
.sc-them b { color: var(--them); }
.sc-tricks { display: block; white-space: nowrap; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; }
.sc-tricks i { font-style: normal; color: var(--t3); margin: 0 3px; }
.hud-trump { display: flex; align-items: center; gap: 6px; flex: none; padding-inline-end: 4px; }
.tb { width: 36px; height: 36px; border-radius: 9px; background: var(--face); display: grid; place-items: center; color: var(--ink-black); font-weight: 800; flex: none; box-shadow: 0 0 0 2px var(--felt-deep), 0 0 0 3px var(--gold); }
.tb[data-suit='H'], .tb[data-suit='D'] { color: var(--ink-red); }
.tb-pip { width: 24px; height: 24px; }
.tb-mode { width: auto; padding: 0 6px; font-size: 13px; }
.tb-none { background: var(--s3); color: var(--t2); box-shadow: none; }
.tb-text { display: flex; flex-direction: column; line-height: 1.15; }
.tb-text b { font-size: 13px; white-space: nowrap; }
.hud-tools { display: flex; align-items: center; }
.g-conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline: 4px; }
.g-conn.lost { background: var(--urgent); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.g-main { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; grid-template-areas: 'table' 'me' 'hint' 'hand'; }
.table { grid-area: table; position: relative; min-height: 0; overflow: hidden; --tw: 64px; }
.felt {
  position: absolute; inset: 10px 8px 4px; border-radius: 46% / 40%;
  background: radial-gradient(ellipse at 50% 45%, var(--felt-lit), var(--felt) 58%, var(--felt-deep));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4), inset 0 0 40px rgba(0, 0, 0, .45), 0 0 0 6px var(--felt-deep), 0 0 0 7px var(--line);
}
.felt::after { content: ''; position: absolute; inset: 9px; border-radius: inherit; border: 1.5px dashed rgba(242, 238, 223, .16); }

/* Seats around the table */
.seat { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 34%; }
.seat[data-slot='top'] { top: 14px; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; max-width: 70%; }
.seat[data-slot='left'] { left: 6px; top: 50%; transform: translateY(-62%); }
.seat[data-slot='right'] { right: 6px; top: 50%; transform: translateY(-62%); }
.st-plate { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 999px; background: rgba(7, 13, 18, .72); border: 1px solid var(--line); max-width: 100%; }
[dir='rtl'] .st-plate { padding: 4px 4px 4px 8px; }
.seat[data-slot='left'] .st-plate, .seat[data-slot='right'] .st-plate { flex-direction: column; border-radius: 16px; padding: 6px 6px 4px; gap: 2px; text-align: center; }
.st-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.st-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 104px; }
.st-sub { font-size: 11px; color: var(--t3); white-space: nowrap; }
.st-tag { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--s3); color: var(--t2); white-space: nowrap; }
.st-tag.st-off { background: rgba(255, 106, 77, .2); color: #ffc3b6; }
.st-ring { position: relative; display: grid; place-items: center; border-radius: 50%; padding: 3px; flex: none; }
.turn .st-ring { background: conic-gradient(var(--ring-turn, var(--paper)) calc(var(--p, 1) * 360deg), rgba(242, 238, 223, .14) 0); }
.st-ring.low { --ring-turn: var(--urgent); }
.turn .st-plate { border-color: var(--paper); box-shadow: 0 0 0 1px var(--paper), 0 0 18px rgba(242, 238, 223, .2); }
.seat.off .av { filter: grayscale(.8); }
.crown { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; color: var(--gold); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.crown svg { width: 100%; height: 100%; display: block; }
.st-clock { font-size: 12px; font-weight: 800; padding: 0 8px; border-radius: 999px; background: var(--paper); color: var(--on-paper); font-variant-numeric: tabular-nums; }
.st-clock.low { background: var(--urgent); color: #fff; }
.st-backs { display: flex; height: 22px; padding-inline-start: 11px; }
.st-backs i { display: block; width: 16px; height: 22px; margin-inline-start: -11px; border-radius: 3px; background: repeating-linear-gradient(45deg, rgba(242, 238, 223, .14) 0 1px, transparent 1px 4px), var(--felt-lit); border: 1px solid rgba(242, 238, 223, .45); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.st-backs[style*='--n:0'] { display: none; }

/* Speech bubbles for reactions */
.bubble { position: absolute; z-index: 9; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 14px; background: var(--paper); color: var(--on-paper); font-size: 13px; font-weight: 700; box-shadow: 0 6px 16px -6px #000; pointer-events: none; }
.bubble.pop { animation: pop .3s var(--ease); }
.seat[data-slot='top'] .bubble { bottom: auto; top: calc(100% + 4px); }
@keyframes pop { from { transform: translateX(-50%) scale(.5); opacity: 0; } }

/* The trick: four cards around the middle, each on the side of the player who played it */
.trick { position: absolute; z-index: 2; left: 50%; top: 47%; width: 0; height: 0; }
.trick .card { --w: var(--tw); position: absolute; left: 0; top: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r)); transition: transform .4s var(--ease), opacity .4s; }
.tc.at-bottom { --tx: 0px; --ty: calc(var(--tw) * .6); --r: 2deg; }
.tc.at-top { --tx: 0px; --ty: calc(var(--tw) * -.6); --r: -2deg; }
.tc.at-left { --tx: calc(var(--tw) * -.78); --ty: 0px; --r: -7deg; }
.tc.at-right { --tx: calc(var(--tw) * .78); --ty: 0px; --r: 7deg; }
.tc.from-bottom { --fx: 0px; --fy: calc(var(--tw) * 3.2); }
.tc.from-top { --fx: 0px; --fy: calc(var(--tw) * -3); }
.tc.from-left { --fx: calc(var(--tw) * -3.4); --fy: 0px; }
.tc.from-right { --fx: calc(var(--tw) * 3.4); --fy: 0px; }
.tc.fly { animation: fly .34s var(--ease) both; }
@keyframes fly { from { transform: translate(calc(-50% + var(--fx)), calc(-50% + var(--fy))) rotate(0deg) scale(.82); opacity: .4; } }
.tc[data-winner='true'] { z-index: 10 !important; }
.trick.collect .card { opacity: 0; }
.trick.collect.to-bottom .card { transform: translate(-50%, calc(-50% + var(--tw) * 3.2)) scale(.45); }
.trick.collect.to-top .card { transform: translate(-50%, calc(-50% - var(--tw) * 3)) scale(.45); }
.trick.collect.to-left .card { transform: translate(calc(-50% - var(--tw) * 3.4), -50%) scale(.45); }
.trick.collect.to-right .card { transform: translate(calc(-50% + var(--tw) * 3.4), -50%) scale(.45); }
.peek-tag { position: absolute; left: 50%; top: calc(var(--tw) * 1.45); transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(7, 13, 18, .8); color: var(--t1); border: 1px solid var(--line-2); }
.trick.peek .card { filter: saturate(.8) brightness(.95); }
.center-msg { position: absolute; z-index: 2; left: 50%; top: 47%; transform: translate(-50%, -50%); width: min(70%, 320px); text-align: center; font-size: 14px; font-weight: 700; color: var(--t1); padding: 8px 14px; border-radius: 14px; background: rgba(7, 13, 18, .55); pointer-events: none; }
.g-toast { position: absolute; z-index: 12; left: 50%; bottom: 10px; transform: translateX(-50%); width: max-content; max-width: 92%; text-align: center; padding: 7px 14px; border-radius: 12px; background: rgba(7, 13, 18, .92); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; }

/* The Hakem draw */
.draw { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(7, 13, 18, .35); cursor: pointer; }
.draw-title { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: rgba(7, 13, 18, .8); position: absolute; top: 34%; }
.draw-piles { position: absolute; left: 50%; top: 47%; width: 0; height: 0; }
.dp { position: absolute; }
.dp .card { --w: calc(var(--tw) * .82); position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); animation: fly .25s var(--ease) both; --fx: 0px; --fy: 0px; }
.dp.at-bottom { left: 0; top: calc(var(--tw) * .95); }
.dp.at-top { left: 0; top: calc(var(--tw) * -.95); }
.dp.at-left { left: calc(var(--tw) * -1.1); top: 0; }
.dp.at-right { left: calc(var(--tw) * 1.1); top: 0; }
.draw-result { position: absolute; top: calc(47% + var(--tw) * 1.8); font-size: 15px; font-weight: 800; color: var(--gold); text-align: center; padding: 0 12px; text-shadow: 0 1px 4px #000; }

/* You */
.me-bar { grid-area: me; position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 10px; min-height: 44px; }
.me-bar .av { width: 30px; height: 30px; font-size: 13px; }
.me-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-role { color: var(--gold); font-weight: 800; }
.me-turn { flex: 1; text-align: end; font-size: 13px; font-weight: 800; color: var(--paper); }
.me-bar .bubble { bottom: calc(100% + 2px); left: 24px; transform: none; }
.me-bar .bubble.pop { animation: popPlain .3s var(--ease); }
@keyframes popPlain { from { transform: scale(.5); opacity: 0; } }
.me-timebar { position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px; background: transparent; overflow: hidden; }
.me-bar.turn .me-timebar { background: rgba(242, 238, 223, .12); }
.me-timebar i { display: block; height: 100%; width: 0; background: var(--paper); transition: width .25s linear; }
.me-timebar i.low { background: var(--urgent); }
.hand-hint { grid-area: hint; text-align: center; font-size: 12.5px; color: var(--t3); min-height: 20px; padding: 0 12px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hand-hint.urgent { color: var(--t1); font-weight: 700; }

/* Your hand: a gentle fan; at least the index plate of every card shows */
.hand { grid-area: hand; position: relative; height: calc(var(--cw) * 1.42 + 30px + env(safe-area-inset-bottom)); margin: 0 4px; touch-action: none; }
.hand .card {
  --w: var(--cw);
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom));
  left: calc(50% - (var(--cw) + (var(--n) - 1) * var(--step) * var(--cw)) / 2 + var(--i) * var(--step) * var(--cw));
  transform-origin: 50% 130%;
  transform: translateY(calc(var(--lift, 0em) + var(--drag, 0px))) rotate(var(--rot, 0deg));
  transition: transform .18s var(--ease), box-shadow .15s;
}
.hand .card[data-lifted='true'] { transform: translateY(calc(var(--lift, 0em) - .24em + var(--drag, 0px))) rotate(var(--rot, 0deg)); z-index: 30; }
.hand .card.deal { animation: dealIn .42s var(--ease) both; animation-delay: var(--delay, 0ms); }
@keyframes dealIn { from { transform: translateY(1.2em) rotate(0deg); opacity: 0; } }
body.lay-desktop .hand .card[data-tint='legal']:hover { transform: translateY(calc(var(--lift, 0em) - .16em)) rotate(var(--rot, 0deg)); }

/* Quick reactions */
.react-pop { position: fixed; z-index: 40; top: calc(env(safe-area-inset-top) + 58px); inset-inline-end: 8px; padding: 8px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line-2); box-shadow: 0 14px 30px -12px #000; }
.react-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.react-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; min-height: 52px; padding: 4px; border: 0; border-radius: 10px; background: var(--s2); }
.react-btn:hover { background: var(--s3); }
.react-btn span { font-size: 20px; line-height: 1.2; }
.react-btn small { font-size: 11px; color: var(--t2); white-space: nowrap; }

/* Kot! */
.kot { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(circle, rgba(7, 13, 18, .6), transparent 70%); animation: fadeOut 2.6s ease both; }
.kot-word { font-size: clamp(64px, 22vw, 140px); font-weight: 900; line-height: 1; color: var(--paper); -webkit-text-stroke: 2px var(--void); paint-order: stroke; animation: stamp .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.k-us .kot-word { text-shadow: 0 0 30px rgba(142, 197, 255, .8), 0 6px 0 var(--void); }
.k-them .kot-word { text-shadow: 0 0 30px rgba(255, 178, 122, .8), 0 6px 0 var(--void); }
.kot-sub { margin-top: 10px; font-size: 16px; font-weight: 800; padding: 4px 14px; border-radius: 999px; background: rgba(7, 13, 18, .85); }
@keyframes stamp { from { transform: scale(2.6) rotate(-8deg); opacity: 0; } }
@keyframes fadeOut { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- sheets ---------------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4, 8, 12, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop.see-through { background: linear-gradient(transparent 30%, rgba(4, 8, 12, .55)); }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: calc(var(--app-h) - 40px); overflow: auto;
  background: var(--s1); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -14px 30px -20px #000;
  animation: sheetUp .28s var(--ease);
}
.sheet.wide { max-width: 720px; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-close { position: absolute; top: 8px; inset-inline-end: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--s2); font-size: 22px; line-height: 1; z-index: 2; }
.sheet h2 { margin: 0 0 8px; font-size: 19px; padding-inline-end: 40px; }
.sheet h3 { font-size: 14px; margin: 14px 0 8px; color: var(--t2); }
.sheet-body { display: flex; flex-direction: column; gap: 10px; }
.confirm-backdrop { z-index: 70; align-items: center; padding: 16px; }
.confirm-sheet { border-radius: 20px; border-bottom: 1px solid var(--line-2); max-width: 400px; }
.confirm-sheet p { color: var(--t2); margin: 0 0 14px; font-size: 14px; }
.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn { flex: 1; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 14px; background: var(--paper); color: var(--on-paper); font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px -10px #000; text-align: center; }

/* Trump choice */
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-head h2 { margin: 0; padding: 0; }
.tp-clock { font-weight: 800; font-size: 14px; padding: 2px 10px; border-radius: 999px; background: var(--s3); font-variant-numeric: tabular-nums; }
.sheet p { margin: 0; }
.tp-five { display: flex; justify-content: center; gap: 6px; }
.tp-five .card { --w: min(58px, 17vw); }
.tp-suits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tp-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tp-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 76px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--s2); text-align: center; }
.tp-opt b { font-size: 14px; }
.tp-opt small { font-size: 11.5px; color: var(--t3); line-height: 1.35; }
.tp-opt.on { border-color: var(--paper); background: var(--s3); box-shadow: 0 0 0 2px var(--paper); }
.tp-suit .tp-pip { width: 30px; height: 30px; color: var(--t1); }
.tp-suit[data-suit='H'] .tp-pip, .tp-suit[data-suit='D'] .tp-pip { color: #ff7a8e; }
.tp-mode { min-height: 60px; }

/* Hand summary */
.sum-head h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sum-result { font-size: 16px; font-weight: 800; }
.w-us .sum-result, .w-us h2 { color: var(--us); }
.w-them .sum-result, .w-them h2 { color: var(--them); }
.kind-badge { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--on-paper); }
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sum-grid div { background: var(--s2); border-radius: 12px; padding: 8px; text-align: center; border: 1px solid var(--line); }
.sum-grid small { display: block; font-size: 11.5px; color: var(--t3); }
.sum-grid b { font-size: 16px; display: inline-flex; align-items: center; gap: 4px; }
.inline-pip { display: inline-block; width: 18px; height: 18px; color: var(--t1); }
.inline-pip[data-suit='H'], .inline-pip[data-suit='D'] { color: #ff7a8e; }
.inline-pip .pip { width: 100%; height: 100%; }
.sum-sub { margin-bottom: 0 !important; }
.deals { display: flex; flex-direction: column; gap: 8px; }
.deal-row { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border-radius: 12px; background: rgba(13, 42, 51, .6); border: 1px solid var(--line); }
.deal-who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.deal-who .av { width: 24px; height: 24px; font-size: 11px; }
.deal-who small { color: var(--gold); }
.deal-cards { display: flex; flex-wrap: wrap; padding-inline-start: 14px; }
.deal-cards .card { --w: clamp(26px, 6.4vw, 38px); margin-left: -12px; }
.sum-next { text-align: center; font-weight: 700; color: var(--t2); }
.hand-details { border-radius: 12px; background: var(--s2); padding: 6px 10px; }
.hand-details summary { cursor: pointer; font-size: 13.5px; font-weight: 700; padding: 4px 0; }
.hand-details .deals { margin: 6px 0; }

/* Results */
.res-head { text-align: center; }
.res-emoji { font-size: 44px; }
.res-head h2 { font-size: 26px; padding: 0; margin: 0; }
.res-score { font-size: 20px; font-weight: 900; margin: 4px 0 !important; }
.r-us { color: var(--us); }
.r-them { color: var(--them); }
.score-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.score-table th { font-size: 11.5px; color: var(--t3); font-weight: 700; text-align: center; padding: 4px; }
.score-table th:first-child, .score-table td:first-child { text-align: start; }
.score-table td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.score-table tr.win td { background: rgba(227, 176, 75, .08); }
.score-table td small { display: block; color: var(--t3); font-size: 11px; }
.score-table .r-us td:first-child { color: var(--us); font-weight: 800; }
.score-table .r-them td:first-child { color: var(--them); font-weight: 800; }
.who { display: flex; align-items: center; gap: 6px; }
.who .av { width: 26px; height: 26px; font-size: 12px; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.res-actions .btn { flex: 1 1 140px; }
.res-actions p { flex-basis: 100%; text-align: center; }

.menu-list { display: flex; flex-direction: column; gap: 10px; }
.rules h4 { margin: 14px 0 4px; font-size: 15px; color: var(--paper); }
.rules ul { margin: 0; padding-inline-start: 20px; color: var(--t2); font-size: 14px; }
.rules li { margin-bottom: 4px; }
.rules b { color: var(--t1); }

/* ---------------- desktop ---------------- */
.side { display: none; }
body.lay-desktop .g-main { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: 'table side' 'me side' 'hint side' 'hand side'; }
body.lay-desktop .side { grid-area: side; display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--s1); border-inline-start: 1px solid var(--line); overflow: auto; }
body.lay-desktop .side-block { background: var(--s2); border-radius: 14px; padding: 10px 12px; border: 1px solid var(--line); }
body.lay-desktop .side-block h3 { margin: 0 0 6px; font-size: 13px; color: var(--t3); }
body.lay-desktop .side-grow { flex: 1; min-height: 120px; overflow: auto; }
.side-last { display: flex; gap: 6px; justify-content: space-around; flex-wrap: wrap; }
.sl-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sl-item .card { --w: 40px; }
.sl-item small { font-size: 11px; color: var(--t3); max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-item.win small { color: var(--gold); font-weight: 700; }
.side-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.side-log li { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 10px; background: var(--s1); border-inline-start: 3px solid var(--line-2); font-size: 13px; }
.side-log li.w-us { border-inline-start-color: var(--us); }
.side-log li.w-them { border-inline-start-color: var(--them); }
.side-log small { color: var(--t3); font-size: 11.5px; }
body.lay-desktop .side .react-btn { min-width: 0; }
body.lay-desktop .hud { padding-inline: 12px; min-height: 58px; }
body.lay-desktop .sc b { font-size: 26px; }
body.lay-desktop .st-name { max-width: 150px; font-size: 14px; }
body.lay-desktop .av { width: 40px; height: 40px; font-size: 17px; }
body.lay-desktop .st-backs { height: 30px; padding-inline-start: 15px; }
body.lay-desktop .st-backs i { width: 22px; height: 30px; margin-inline-start: -15px; }
body.lay-desktop .felt { inset: 18px 24px 8px; }
body.lay-desktop .seat[data-slot='top'] { top: 22px; }
body.lay-desktop .seat[data-slot='left'] { left: 30px; }
body.lay-desktop .seat[data-slot='right'] { right: 30px; }
body.lay-desktop #btn-react { display: none; }
@media (min-width: 700px) {
  .sheet-backdrop:not(.confirm-backdrop) { align-items: center; padding: 20px; }
  .sheet { border-radius: 22px; border-bottom: 1px solid var(--line-2); padding-bottom: 20px; }
}

/* ---------------- phones held sideways ---------------- */
body.landscape .hud { min-height: 42px; padding-top: 2px; padding-bottom: 2px; }
body.landscape .sc b { font-size: 18px; }
body.landscape .sc, body.landscape .sc-mid { padding: 1px 10px; }
body.landscape .tb { width: 30px; height: 30px; }
body.landscape .g-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: 'table table' 'hint me' 'hand hand'; }
body.landscape .me-bar { min-height: 30px; padding: 0 10px; }
body.landscape .me-bar .av { width: 24px; height: 24px; font-size: 11px; }
body.landscape .me-turn { display: none; }
body.landscape .hand { height: calc(var(--cw) * 1.42 + 12px + env(safe-area-inset-bottom)); }
body.landscape .hand .card { bottom: calc(4px + env(safe-area-inset-bottom)); }
body.landscape .seat[data-slot='top'] { top: 6px; flex-direction: row; }
body.landscape .seat[data-slot='top'] .st-backs { display: none; }
body.landscape .seat[data-slot='left'], body.landscape .seat[data-slot='right'] { transform: translateY(-55%); }
body.landscape .felt { inset: 4px 60px 2px; }
body.landscape .st-backs { height: 18px; }
body.landscape .st-backs i { width: 13px; height: 18px; margin-inline-start: -9px; }
body.landscape .trick, body.landscape .center-msg { top: 60%; }
body.landscape .tc.at-bottom { --ty: calc(var(--tw) * .42); }
body.landscape .tc.at-top { --ty: calc(var(--tw) * -.42); }
body.landscape .tc.at-left { --tx: calc(var(--tw) * -1); }
body.landscape .tc.at-right { --tx: calc(var(--tw) * 1); }

/* Small phones */
@media (max-width: 360px) {
  .sc, .sc-mid { padding: 2px 8px; }
  .tb-text { display: none; }
  .st-name { max-width: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
