/* Chuj — vzhled. Hospodský stůl: zelené plátno, krémový papír, mosaz. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-ext-opsz-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/fonts/fraunces-latin-opsz-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --felt-hi: #24805a;
  --felt: #17603f;
  --felt-lo: #0c3b28;
  --felt-edge: #072618;
  --paper: #f8f1de;
  --paper-2: #efe5c9;
  --paper-line: #dccfa9;
  --ink: #1d1811;
  --ink-2: #5d5342;
  --gold: #e9bd5b;
  --gold-hi: #f6d98a;
  --gold-lo: #b3852a;
  --red: #c8312b;
  --green: #2f8a3c;
  --text: #f6eed9;
  --muted: rgba(246, 238, 217, .68);
  --line: rgba(246, 238, 217, .16);
  --ease: cubic-bezier(.22, .8, .28, 1);
  --font-d: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-b: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 500 16px/1.45 var(--font-b);
  color: var(--text);
  background: var(--felt-edge);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 85% at 50% 42%, var(--felt-hi) 0%, var(--felt) 34%, var(--felt-lo) 72%, var(--felt-edge) 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%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; }
[hidden] { display: none !important; }
svg.suit { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }

.screen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}

/* ---------- tlačítka a pole ---------- */

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 14px; padding: 13px 20px; min-height: 48px;
  font: 700 16px/1.15 var(--font-b); letter-spacing: -.005em; text-align: center;
  transition: transform .12s var(--ease), filter .15s, box-shadow .15s, opacity .15s;
}
.btn small { font-weight: 600; font-size: 12.5px; opacity: .72; }
.btn:active { transform: translateY(1.5px) scale(.985); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .icon-btn:focus-visible, .input:focus-visible { outline: 2.5px solid var(--gold-hi); outline-offset: 2px; }
.btn-primary {
  color: #2a1c05;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #dba843);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 0 var(--gold-lo), 0 10px 22px rgba(0, 0, 0, .28);
}
.btn-cream {
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf0, var(--paper) 60%, var(--paper-2));
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #b8ab85, 0 10px 22px rgba(0, 0, 0, .25);
}
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); }
.btn-lg { min-height: 58px; font-size: 18px; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14.5px; border-radius: 11px; }
@media (hover: hover) {
  .btn:not(:disabled):hover { filter: brightness(1.06); }
  .btn-ghost:not(:disabled):hover { background: rgba(255, 255, 255, .12); }
}
.sheet .btn-ghost, .declare-bar .btn-ghost, .coach .btn-ghost { color: var(--ink); background: rgba(29, 24, 17, .05); box-shadow: inset 0 0 0 1px rgba(29, 24, 17, .16); }

.icon-btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 12px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .15s, transform .12s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sheet .icon-btn { background: rgba(29, 24, 17, .06); box-shadow: none; color: var(--ink); }

.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 13px; border: 0;
  font: 600 17px/1.2 var(--font-b); color: var(--text); background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 6px rgba(0, 0, 0, .2);
  -webkit-user-select: text; user-select: text;
}
.input::placeholder { color: rgba(246, 238, 217, .42); font-weight: 500; }
.sheet .input { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--paper-line); }
.sheet .input::placeholder { color: #a39a85; }
.row-btns { display: flex; gap: 10px; }
.row-btns .btn { flex: 1; }
.col-btns { display: grid; gap: 10px; }

/* ---------- úvod ---------- */

#home { align-items: center; overflow-y: auto; }
.corner { position: absolute; top: calc(10px + var(--sat)); right: calc(10px + var(--sar)); z-index: 2; }
.home-inner {
  --hw: clamp(62px, min(17vw, 12dvh), 104px);
  margin: auto; width: min(100%, 400px); padding: 18px 20px 26px;
  display: flex; flex-direction: column; gap: clamp(14px, 3dvh, 30px);
}
.hero { text-align: center; }
.hero-fan { position: relative; height: calc(var(--hw) * 1.5 + 26px); margin-bottom: 4px; }
.hero-fan .card {
  position: absolute; left: 50%; top: 0; width: var(--hw); margin-left: calc(var(--hw) / -2);
  translate: calc(var(--i) * var(--hw) * .5) calc(var(--i) * var(--i) * var(--hw) * .055);
  rotate: calc(var(--i) * 9deg);
  animation: heroIn .9s var(--ease) both; animation-delay: calc((var(--i) + 2) * 80ms + 80ms);
}
@keyframes heroIn { from { translate: 0 60px; rotate: 0deg; opacity: 0; } }
.logo {
  margin: 0; font: italic 900 clamp(68px, 23vw, 124px)/.86 var(--font-d); letter-spacing: -.035em;
  font-variation-settings: 'opsz' 144; color: #fbf1d6;
  text-shadow: 0 2px 0 var(--gold-lo), 0 4px 0 rgba(0, 0, 0, .25), 0 16px 36px rgba(0, 0, 0, .45);
}
.tagline { margin: 10px 0 0; font: italic 500 17px/1.3 var(--font-d); color: var(--muted); }
.home-panel { display: grid; gap: 11px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }
.home-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-resume { box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn-resume small { color: var(--gold-hi); opacity: 1; }

/* ---------- horní lišta ---------- */

.topbar { flex: none; height: 54px; display: flex; align-items: center; gap: 8px; padding: 0 8px; position: relative; z-index: 6; }
.tb-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tb-round { font: 600 13px/1 var(--font-b); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tb-spacer { width: 44px; }
.vals { display: flex; gap: 6px; }
.val {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 99px;
  background: rgba(0, 0, 0, .24); font-size: 13px; line-height: 1; white-space: nowrap;
  transition: background .3s, color .3s, box-shadow .3s;
}
.val i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .7; }
.val b { font: 800 14px/1 var(--font-b); min-width: .7em; text-align: center; }
.val .suit { width: 14px; height: 14px; }
.val.x2 { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #2a1c05; box-shadow: 0 0 14px rgba(233, 189, 91, .5); }
.val.x2 i { opacity: .8; }
.val.bump, .bump { animation: bump .5s var(--ease); }
@keyframes bump { 35% { scale: 1.32; } }
@media (max-width: 370px) { .val i { display: none; } }

#net {
  position: fixed; top: calc(6px + var(--sat)); left: 50%; translate: -50% 0; z-index: 300;
  padding: 8px 14px; border-radius: 99px; background: #7a1d18; color: #fff; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4); white-space: nowrap;
}

/* ---------- lobby ---------- */

.lobby-wrap { flex: 1; overflow-y: auto; display: flex; padding: 8px 16px 24px; }
.lobby-card { margin: auto; width: min(100%, 440px); display: grid; gap: 14px; }
.lobby-card h2 { margin: 0; font: 700 30px/1.1 var(--font-d); }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.sheet .hint { color: var(--ink-2); }
.invite { display: grid; gap: 10px; }
.invite .input { font-size: 15px; text-overflow: ellipsis; }
.seats { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.seats li {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px;
  background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line);
  animation: rise .35s var(--ease) both;
}
.seats li.you { box-shadow: inset 0 0 0 1.5px var(--gold); }
.seats li.free { background: transparent; box-shadow: none; outline: 1.5px dashed var(--line); outline-offset: -1.5px; }
.seats li.free .nm { color: var(--muted); font-weight: 500; font-style: italic; }
.seats li.free .avatar { opacity: .45; }
.seats li.off { opacity: .55; }
.seats .nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; gap: 5px; }
.badges em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); white-space: nowrap; }
.badges em.h { background: var(--gold); color: #2a1c05; }
.badges em.b { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-weight: 600; }
.waiting { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; font-size: 14.5px; color: var(--muted); text-align: center; }
.sheet .waiting { color: var(--ink-2); }
.loading { display: grid; justify-items: center; gap: 14px; padding: 60px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .25); border-top-color: var(--gold); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }

/* ---------- avatar ---------- */

.avatar {
  --s: 42px; flex: none; position: relative; display: grid; place-items: center; width: var(--s); height: var(--s);
  border-radius: 50%; color: #1f1608; font: 800 calc(var(--s) * .46)/1 var(--font-d);
  background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 62%, color-mix(in srgb, var(--c) 72%, #000));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 3px 8px rgba(0, 0, 0, .35);
}
.avatar.sm { --s: 26px; }
.avatar.lg { --s: 64px; }
.avatar.is-bot::after {
  content: ''; position: absolute; right: -3px; bottom: -3px; width: 42%; height: 42%; border-radius: 50%;
  background: #17120c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6eed9' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='5' y='9' width='14' height='10' rx='3'/%3E%3Cpath d='M12 9V5M9 14h.01M15 14h.01'/%3E%3C/svg%3E") center/70% no-repeat;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5);
}
.avatar.is-off { filter: grayscale(1) brightness(.7); }

/* ---------- stůl ---------- */

#game {
  --cw: clamp(48px, min(21.5vw, 12.2dvh), 112px);
  --ch: calc(var(--cw) * 1.5);
  --tw: calc(var(--cw) * .86);
}
.table { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; width: 100%; max-width: 1080px; margin: 0 auto; }
.arena { flex: 1; min-height: 0; position: relative; }
.arena::before {
  content: 'Chuj'; position: absolute; left: 50%; top: 54%; translate: -50% -50%; rotate: -6deg;
  font: italic 900 clamp(70px, 22vmin, 190px)/1 var(--font-d); letter-spacing: -.04em; color: rgba(255, 255, 255, .035); pointer-events: none;
}
.note {
  position: absolute; left: 50%; top: 54%; translate: -50% -50%; z-index: 2; pointer-events: none; text-align: center;
  font: italic 600 clamp(17px, 4.6vw, 22px)/1.25 var(--font-d); color: var(--text); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); width: max-content; max-width: 86%;
}
.note.low { top: calc(54% + var(--tw) * 1.2); }
.note span { display: inline-block; animation: rise .4s var(--ease) both; }
.note.dots span { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* hráči kolem stolu */
.pod { position: absolute; z-index: 3; display: grid; justify-items: center; gap: 3px; text-align: center; transition: opacity .3s; }
.pod.off { opacity: .6; }
.pod[data-pos="1"] { left: 8px; top: 54%; translate: 0 -50%; }
.pod[data-pos="3"] { right: 8px; top: 54%; translate: 0 -50%; }
.pod[data-pos="2"] {
  top: 4px; left: 50%; translate: -50% 0;
  grid-template: 'av txt' auto 'av cards' auto 'taken taken' auto / auto auto; column-gap: 9px; justify-items: start; text-align: left; align-items: center;
}
.pod[data-pos="2"] .pod-av { grid-area: av; }
.pod[data-pos="2"] .pod-txt { grid-area: txt; }
.pod[data-pos="2"] .pod-cards { grid-area: cards; }
.pod[data-pos="2"] .pod-taken { grid-area: taken; justify-self: center; }
.pod-av { position: relative; display: grid; place-items: center; }
.pod-av::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--gold-hi); opacity: 0; scale: .8;
  transition: opacity .25s, scale .25s var(--ease);
}
.pod.turn .pod-av::before { opacity: 1; scale: 1; animation: ring 1.5s ease-in-out infinite; }
.pod.took .pod-av::before { opacity: 1; scale: 1.12; border-color: #fff; }
@keyframes ring { 50% { box-shadow: 0 0 0 5px rgba(246, 217, 138, .2), 0 0 22px rgba(246, 217, 138, .6); } }
.pod-name { font-weight: 700; font-size: 13.5px; line-height: 1.15; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.pod-score { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; line-height: 1; }
.pod-score .total { display: inline-block; font: 800 15px/1 var(--font-b); padding: 3px 7px; border-radius: 8px; background: rgba(0, 0, 0, .3); min-width: 28px; text-align: center; }
.dealer {
  position: absolute; left: -7px; top: -6px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  font: 800 11px/1 var(--font-b); color: #2a1c05; background: var(--paper); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); z-index: 1;
}
.streak { display: inline-flex; gap: 2.5px; }
.streak i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.streak i.on { background: #7fe0a0; box-shadow: 0 0 6px #7fe0a0; }
.sheet .streak i { background: rgba(29, 24, 17, .15); }
.sheet .streak i.on { background: #2f9a54; box-shadow: none; }
.tag { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 2px 5px; border-radius: 6px; white-space: nowrap; }
.tag.warn { background: #ffcf6b; color: #3a2600; }
.tag.good { background: #2f9a54; color: #fff; }
.tag.moon { background: #3b3f8f; color: #fff; }

.pod-cards { display: flex; height: 21px; padding-left: 9px; min-width: 14px; }
.back {
  display: block; border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .13) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .13) 0 1.5px, transparent 1.5px 6px),
    linear-gradient(160deg, #96303b, #651621);
  box-shadow: inset 0 0 0 1.5px #f3ead2, 0 1px 2px rgba(0, 0, 0, .4);
}
.pod-cards .back { width: 14px; height: 21px; margin-left: -9px; flex: none; }
.pod-taken { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 22px; }
.pod-taken.pop { animation: bump .5s var(--ease); }
.tk-h { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 4px; border-radius: 99px; background: rgba(0, 0, 0, .3); font: 800 12.5px/1 var(--font-b); }
.tk-h .suit { width: 13px; height: 13px; }
.sheet .tk-h { background: rgba(200, 49, 43, .1); color: #8f1f1a; }
.mini-card { display: inline-block; width: 26px; aspect-ratio: 2 / 3; border-radius: 3px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); vertical-align: middle; flex: none; background: #fcf8ec; }
.mini-card svg { display: block; width: 100%; height: 100%; }
.mini-card.void { filter: grayscale(1) opacity(.55); }
.mini-card.lg { width: clamp(58px, 17vw, 84px); border-radius: 6px; }
.pod-taken .mini-card { width: 16px; border-radius: 2px; }
.decl { position: absolute; right: -14px; top: -8px; display: flex; gap: 2px; z-index: 1; }
.pod[data-pos="2"] .decl, .pod.me .decl { right: auto; top: auto; left: -11px; bottom: -9px; }
.pod.me .decl { left: -7px; }
.pod[data-pos="3"] .decl { right: auto; top: auto; left: -16px; bottom: -8px; }
.decl-chip { position: relative; display: block; animation: bump .5s var(--ease); }
.decl-chip .mini-card { width: 19px; box-shadow: 0 0 0 1.5px var(--gold-hi), 0 0 10px rgba(246, 217, 138, .7); }
.decl-chip b { position: absolute; right: -6px; bottom: -5px; font: 800 9px/1 var(--font-b); color: #2a1c05; background: var(--gold-hi); border-radius: 99px; padding: 2px 3px; }
.bubble {
  position: absolute; left: 50%; top: -6px; translate: -50% -100%; z-index: 5; font-size: 26px; line-height: 1; padding: 6px 9px; border-radius: 16px 16px 16px 4px;
  background: var(--paper); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); opacity: 0; pointer-events: none;
}
.pod[data-pos="2"] .bubble { top: auto; bottom: -6px; translate: -50% 100%; border-radius: 4px 16px 16px 16px; }
.bubble.show { animation: bubble 2.6s var(--ease) both; }
@keyframes bubble { 0% { opacity: 0; scale: .3; } 12% { opacity: 1; scale: 1.1; } 20% { scale: 1; } 82% { opacity: 1; } 100% { opacity: 0; scale: .9; } }

/* můj řádek */
.me-row { flex: none; position: relative; z-index: 6; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; }
.pod.me { position: static; display: flex; align-items: center; gap: 9px; text-align: left; translate: none; }
.pod.me .avatar { --s: 36px; }
.pod.me .pod-txt { display: grid; gap: 3px; }
.pod.me .pod-score { justify-content: flex-start; }
.pod.me .pod-cards { display: none; }
.spectator .pod.me .pod-cards { display: flex; }
.pod.me .bubble { left: 18px; }
.turn-hint {
  margin-left: auto; padding: 7px 13px; border-radius: 99px; font: 800 13.5px/1.1 var(--font-b); color: #2a1c05; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 18px rgba(233, 189, 91, .35);
  animation: hintIn .35s var(--ease) both; max-width: 56vw; overflow: hidden; text-overflow: ellipsis;
}
@keyframes hintIn { from { opacity: 0; translate: 0 8px; scale: .9; } }
.emote-btn { flex: none; margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; font-size: 19px; line-height: 1; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px var(--line); }
.turn-hint:not([hidden]) + .emote-btn { margin-left: 0; }
.emote-pop {
  position: absolute; right: 8px; bottom: calc(100% + 6px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; border-radius: 16px;
  background: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: hintIn .2s var(--ease) both; z-index: 30;
}
.emote-pop button { width: 46px; height: 46px; font-size: 25px; border: 0; background: transparent; border-radius: 10px; }
.emote-pop button:active { background: rgba(0, 0, 0, .08); }

/* ---------- karty ---------- */

.card { aspect-ratio: 2 / 3; perspective: 700px; position: relative; }
.card-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .4s var(--ease); }
.card.facedown .card-in { transform: rotateY(180deg); }
.card-face, .card-back {
  position: absolute; inset: 0; border-radius: 7.5% / 5%; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .4), 0 5px 12px rgba(0, 0, 0, .24);
}
.card-face { background: #fcf8ec; }
.card-face svg { display: block; width: 100%; height: 100%; }
.card-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, #f3ead2 0 9%, transparent 10%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .12) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .12) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, #96303b, #651621);
  box-shadow: inset 0 0 0 3px #f3ead2, inset 0 0 0 4px rgba(0, 0, 0, .2), 0 1px 1.5px rgba(0, 0, 0, .4), 0 5px 12px rgba(0, 0, 0, .24);
}

/* štych uprostřed */
.trick { position: absolute; left: 50%; top: 54%; width: 0; height: 0; z-index: 4; }
.slot { position: absolute; left: var(--sx); top: var(--sy); width: 0; height: 0; }
.slot[data-pos="0"] { --sx: 0px; --sy: calc(var(--tw) * .7); }
.slot[data-pos="2"] { --sx: 0px; --sy: calc(var(--tw) * -.7); }
.slot[data-pos="1"] { --sx: calc(var(--tw) * -.8); --sy: 0px; }
.slot[data-pos="3"] { --sx: calc(var(--tw) * .8); --sy: 0px; }
.slot .card { position: absolute; width: var(--tw); left: calc(var(--tw) / -2); top: calc(var(--tw) * -.75); transition: scale .3s var(--ease); }
.slot .card.winner { scale: 1.07; z-index: 9 !important; }
.slot .card.winner .card-face { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 26px 4px rgba(246, 217, 138, .75), 0 8px 18px rgba(0, 0, 0, .35); }

/* ruka */
.hand { flex: none; position: relative; z-index: 5; height: calc(var(--ch) + var(--cw) * .2 + 34px); width: min(100% - 12px, 760px); margin: 0 auto; touch-action: none; }
.hand .card {
  position: absolute; left: calc(50% - var(--cw) / 2); bottom: calc(var(--cw) * .2 + 5px); width: var(--cw); cursor: pointer; touch-action: none;
  translate: calc(var(--x, 0px) + var(--dx, 0px)) calc(var(--y, 0px) - var(--lift, 0px) + var(--dy, 0px));
  rotate: var(--r, 0deg);
  transition: translate .3s var(--ease), rotate .3s var(--ease), scale .2s var(--ease), opacity .2s;
}
.hand .card-face { transition: filter .25s, box-shadow .25s; }
.hand .card.undealt { opacity: 0; transition: none; }
.hand .card.legal { --lift: 9px; }
.hand .card.dim .card-face { filter: brightness(.58) saturate(.75); }
.hand .card.selected { --lift: 30px; }
.hand .card.selected .card-face { box-shadow: 0 0 0 2.5px var(--gold-hi), 0 12px 24px rgba(0, 0, 0, .4); }
.hand .card.declarable { --lift: 18px; }
.hand .card.declarable .card-face { box-shadow: 0 0 0 2.5px var(--gold-hi), 0 0 22px rgba(246, 217, 138, .7); }
.hand .card.must { --lift: 24px; }
.hand .card.must .card-face { animation: must 1.1s ease-in-out infinite; }
@keyframes must { 0%, 100% { box-shadow: 0 0 0 2.5px var(--gold-hi), 0 0 10px rgba(246, 217, 138, .5); } 50% { box-shadow: 0 0 0 4px var(--gold-hi), 0 0 30px 6px rgba(246, 217, 138, .9); } }
.hand .card.dragging { transition: scale .15s; scale: 1.1; rotate: 0deg; z-index: 99 !important; cursor: grabbing; }
.hand .card.dragging.over .card-face { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 30px 6px rgba(246, 217, 138, .8); }
.hand .card.shake .card-in { animation: shake .4s; }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }
@media (hover: hover) {
  .my-turn .hand .card.legal:hover { --lift: 22px; }
}
.pts {
  position: absolute; left: 22%; top: -13px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; z-index: 2; display: grid; place-items: center;
  font: 800 12.5px/1 var(--font-b); color: #fff; background: var(--red); box-shadow: 0 0 0 2px #fcf8ec, 0 2px 6px rgba(0, 0, 0, .4);
}
.pts.x2 { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #2a1c05; }
.pts.void { background: #8a8577; }

/* přiznání */
.declare-bar {
  position: absolute; left: 50%; bottom: calc(var(--ch) + var(--cw) * .2 + 92px); translate: -50% 0; z-index: 20; width: min(100% - 20px, 430px);
  display: grid; gap: 11px; padding: 14px; border-radius: 20px; background: var(--paper); color: var(--ink);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .06); animation: sheetUp .4s var(--ease) both;
}
@keyframes sheetUp { from { opacity: 0; translate: -50% 26px; } }
.decl-q { display: grid; gap: 2px; }
.decl-q b { font: 700 20px/1.15 var(--font-d); }
.decl-q span { font-size: 13.5px; color: var(--ink-2); }
.decl-opts { display: flex; gap: 8px; }
.decl-opt {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; border: 0; text-align: left; font-size: 13.5px; line-height: 1.25; color: var(--ink);
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--paper-line); transition: box-shadow .15s, background .15s;
}
.decl-opt b { font-size: 14.5px; }
.decl-opt .mini-card { width: 30px; }
.decl-opt.on { background: #fff6dc; box-shadow: inset 0 0 0 2.5px var(--gold-lo); }
.decl-opt:disabled { cursor: default; }

/* ---------- efekty ---------- */

.fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.deck { position: absolute; width: var(--tw); aspect-ratio: 2 / 3; translate: -50% -50%; animation: rise .3s var(--ease) both; }
.deck .back { position: absolute; inset: 0; border-radius: 6px; }
.deck .back:nth-child(1) { translate: -3px 3px; }
.deck .back:nth-child(3) { translate: 3px -3px; }
.back.ghost { position: absolute; width: calc(var(--tw) * .78); aspect-ratio: 2 / 3; margin: calc(var(--tw) * -.585) 0 0 calc(var(--tw) * -.39); border-radius: 5px; }
.reveal {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 20px;
  background: radial-gradient(60% 50% at 50% 50%, rgba(3, 16, 10, .72), rgba(3, 16, 10, 0)); animation: fadeIn .3s both;
}
.reveal-card { width: calc(var(--cw) * 1.75); filter: drop-shadow(0 0 28px rgba(246, 217, 138, .75)); }
.reveal-card .card { width: 100%; }
.reveal-txt { text-align: center; font: 600 clamp(18px, 5vw, 24px)/1.25 var(--font-d); text-shadow: 0 2px 12px rgba(0, 0, 0, .7); animation: rise .5s .25s var(--ease) both; transition: opacity .25s; }
.reveal-txt span { display: block; margin-top: 6px; font: 800 15px/1 var(--font-b); color: #2a1c05; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); padding: 7px 14px; border-radius: 99px; width: max-content; margin-inline: auto; }
.reveal.out { background: none; }
.reveal.out .reveal-txt { opacity: 0; }
@keyframes fadeIn { from { opacity: 0; } }
.banner-x2 {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; rotate: -4deg; display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 18px 30px; border-radius: 18px; color: #2a1c05; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #d49f39);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 20px 60px rgba(0, 0, 0, .55), 0 0 80px rgba(246, 217, 138, .5);
  animation: stamp .5s cubic-bezier(.2, 1.4, .4, 1) both; width: max-content; max-width: 92vw; transition: opacity .35s, scale .35s;
}
.banner-x2 span { font: 700 13px/1 var(--font-b); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.banner-x2 b { font: italic 900 clamp(24px, 7.4vw, 40px)/1.05 var(--font-d); }
.banner-x2.out { opacity: 0; scale: .9; }
@keyframes stamp { from { opacity: 0; scale: 2.2; rotate: 6deg; } }
.float-pts {
  position: absolute; translate: -50% -50%; font: 900 26px/1 var(--font-b); color: #fff; padding: 6px 11px; border-radius: 99px; background: var(--red);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 0 2px rgba(255, 255, 255, .3); animation: floatUp 1.5s var(--ease) both; white-space: nowrap;
}
@keyframes floatUp { 0% { opacity: 0; scale: .4; } 15% { opacity: 1; scale: 1.15; } 25% { scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; translate: -50% calc(-50% - 44px); } }

/* ---------- okna ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; justify-items: center; padding-top: calc(28px + var(--sat));
  background: rgba(3, 14, 9, 0); transition: background .28s, backdrop-filter .28s;
}
.overlay.open { background: rgba(3, 14, 9, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet {
  width: min(100%, 500px); max-height: calc(100dvh - 28px - var(--sat)); display: flex; flex-direction: column;
  color: var(--ink); background: var(--paper); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 50px rgba(0, 0, 0, .45);
  translate: 0 104%; transition: translate .34s var(--ease), opacity .25s, scale .3s var(--ease);
}
.overlay.wide .sheet { width: min(100%, 640px); }
.overlay.open .sheet { translate: 0 0; }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 6px 20px; }
.sheet-head.bare { padding: 10px; }
.sheet-head h2 { margin: 0; font: 700 26px/1.1 var(--font-d); letter-spacing: -.01em; }
.sheet-head .icon-btn { width: 38px; height: 38px; }
.sheet-body { padding: 8px 20px calc(20px + var(--sab)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lead { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
@media (min-width: 620px) and (min-height: 520px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; translate: 0 22px; opacity: 0; scale: .97; max-height: calc(100dvh - 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
  .overlay.open .sheet { opacity: 1; scale: 1; }
}
.name-form { display: grid; gap: 12px; }

.menu { display: grid; gap: 8px; }
.menu-item, .toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 14px; text-align: left;
  background: #fff; box-shadow: inset 0 0 0 1px var(--paper-line); color: var(--ink); cursor: pointer;
}
.menu-item { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.menu-item b, .toggle b { display: block; font-size: 15.5px; }
.menu-item small, .toggle small { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }
.menu-item.danger b { color: #a3241f; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { flex: none; width: 46px; height: 28px; border-radius: 99px; background: #cfc5a8; position: relative; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: translate .2s var(--ease); }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { translate: 18px 0; }
.toggle input:focus-visible + i { outline: 2.5px solid var(--gold-lo); outline-offset: 2px; }

/* konec kola */
.round-end { display: grid; gap: 12px; }
.x2-note { justify-self: start; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px; color: #2a1c05; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.rr-list { display: grid; gap: 7px; }
.rr {
  display: grid; grid-template-columns: auto 1fr auto 62px; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 15px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--paper-line); animation: rise .4s var(--ease) both;
}
.rr:nth-child(2) { animation-delay: .06s; } .rr:nth-child(3) { animation-delay: .12s; } .rr:nth-child(4) { animation-delay: .18s; }
.rr.me { box-shadow: inset 0 0 0 2px var(--gold-lo); }
.rr.chuj { background: #fbe4df; box-shadow: inset 0 0 0 2px var(--red); }
.rr-main { min-width: 0; display: grid; gap: 4px; }
.rr-name { font-weight: 800; font-size: 15px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-taken { display: flex; align-items: center; gap: 5px; min-height: 26px; }
.rr-taken .mini-card { width: 20px; }
.rr-taken .clean { font-size: 12.5px; font-style: italic; color: #2f8a4a; font-weight: 600; }
.rr-notes { display: grid; gap: 1px; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.rr-notes .good { color: #1f7a3f; }
.rr-pts { font: 800 21px/1 var(--font-b); color: var(--red); text-align: right; }
.rr-pts.zero { color: #2f8a4a; }
.rr-total { display: grid; gap: 5px; justify-items: end; }
.rr-total b { font: 800 19px/1 var(--font-b); }
.rr-bar { width: 100%; height: 5px; border-radius: 99px; background: rgba(29, 24, 17, .1); overflow: hidden; }
.rr-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #58b56f, #e9bd5b); animation: barIn .9s .2s var(--ease) both; }
.rr-bar.hot i { background: linear-gradient(90deg, #e9bd5b, var(--red)); }
@keyframes barIn { from { width: 0; } }
.rr-actions { display: flex; gap: 10px; padding-top: 4px; }
.rr-actions .btn { flex: 1; }
.rr-actions .waiting { flex: 1; }
.banner.moon { padding: 11px 14px; border-radius: 14px; background: #2c2f6e; color: #fff; font-size: 14.5px; line-height: 1.35; }
.banner.moon b { font: italic 800 18px/1 var(--font-d); margin-right: 4px; color: var(--gold-hi); }
.chuj-box { display: grid; justify-items: center; gap: 8px; padding: 16px 12px 14px; border-radius: 18px; background: linear-gradient(180deg, #2b2118, #1a140e); color: var(--text); text-align: center; overflow: hidden; }
.chuj-who { display: flex; gap: 8px; animation: stamp .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.chuj-title { font: 600 22px/1.15 var(--font-d); }
.chuj-title b { display: block; font: 900 clamp(30px, 9vw, 42px)/1.05 var(--font-d); letter-spacing: -.01em; color: var(--gold-hi); }
.ruler { display: grid; justify-items: center; gap: 7px; width: 100%; }
.ruler span { font-size: 14px; color: var(--muted); }
.ruler span b { font: 800 20px/1 var(--font-b); color: #fff; }
.tape { width: min(100%, calc(var(--len) * 6px + 46px)); height: 20px; border-radius: 4px; background: #f1c84c; position: relative; overflow: hidden; animation: tape 1.3s .5s var(--ease) both; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.tape i { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .65) 0 1.5px, transparent 1.5px 6px); mask-image: linear-gradient(#000 0 45%, transparent 45%); -webkit-mask-image: linear-gradient(#000 0 45%, transparent 45%); }
@keyframes tape { from { width: 20px; } }

/* skóre */
.score-wrap { display: grid; gap: 12px; }
.score { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; table-layout: fixed; }
.score th, .score td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--paper-line); vertical-align: middle; }
.score thead th { font-size: 12.5px; font-weight: 700; border-bottom: 2px solid var(--ink); }
.score thead th .avatar { margin: 0 auto 4px; }
.score thead .nm { display: block; max-width: 74px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score th:first-child { width: 50px; }
.score .rn { width: 50px; font-size: 12.5px; color: var(--ink-2); text-align: left; white-space: nowrap; }
.score .x2 { display: inline-grid; place-items: center; margin-left: 3px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 6px; font-size: 10.5px; background: var(--gold); color: #2a1c05; vertical-align: middle; }
.score .x2 .suit { width: 11px; height: 11px; }
.score td .p { display: block; font-size: 12.5px; font-weight: 700; color: var(--red); }
.score td.zero .p { color: #2f8a4a; }
.score td .t { display: block; font-weight: 800; font-size: 16px; }
.score td .tag { display: inline-block; margin: 1px 1px 0; }
.score tfoot td, .score tfoot th { border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 10px; }
.score .total { display: block; font: 800 22px/1.1 var(--font-b); }
.score tfoot .streak { margin-top: 5px; }
.score tfoot .tag { display: inline-block; margin-left: 4px; }
.score .empty { padding: 22px 0; color: var(--ink-2); font-style: italic; }

/* poslední štych */
.last-trick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.last-c { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-align: center; min-width: 0; }
.last-c span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-c.win .mini-card { box-shadow: 0 0 0 3px var(--gold-lo), 0 4px 12px rgba(0, 0, 0, .3); }

/* pravidla */
.rules { -webkit-user-select: text; user-select: text; font-size: 15px; line-height: 1.55; }
.rules h3 { margin: 22px 0 8px; font: 700 21px/1.15 var(--font-d); }
.rules p { margin: 0 0 10px; }
.rules ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.rules .suit { width: 1.05em; height: 1.05em; }
.cards-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 12px; }
.cards-row .mini-card { width: clamp(34px, 10.2vw, 52px); border-radius: 4px; }
.cards-row.r8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.cards-row.r8 .mini-card { width: 100%; }
.pen-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; margin: 10px 0 12px; }
.pen { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 6px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--paper-line); text-align: center; }
.pen .cards-row { margin: 0 0 6px; justify-content: center; flex-wrap: nowrap; gap: 3px; }
.pen .cards-row .mini-card { width: clamp(30px, 8.6vw, 44px); }
.pen b { font: 800 16px/1.1 var(--font-b); color: var(--red); }
.pen span { font-size: 12px; color: var(--ink-2); line-height: 1.25; }

/* ---------- kouč (ukázka hry) ---------- */

.coach {
  flex: none; position: relative; z-index: 30; margin: 2px 8px 0; padding: 10px 12px 11px; border-radius: 18px; color: var(--ink); background: var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); display: grid; gap: 6px; width: min(100% - 16px, 620px); align-self: center; min-height: 104px; align-content: start;
  transition: opacity .3s;
}
.coach.quiet { opacity: .55; }
.coach.pulse { animation: coachIn .4s var(--ease); }
@keyframes coachIn { from { translate: 0 -6px; opacity: .4; } }
.coach-head { display: flex; align-items: center; gap: 8px; }
.coach-badge { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--green); padding: 4px 8px; border-radius: 99px; }
.coach-step { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.coach-x { margin-left: auto; border: 0; background: transparent; font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 4px 6px; text-decoration: underline; text-underline-offset: 2px; }
.coach-text { font-size: 14.5px; line-height: 1.42; min-height: 2.8em; }
.coach-text b { font-weight: 800; }
.coach-foot { display: flex; justify-content: flex-end; }
.coach-foot:has(.btn[hidden]) { display: none; }
.coach-cards { display: flex; align-items: center; gap: 4px; margin-top: 7px; }
.coach-cards .mini-card { width: 25px; }
.coach-cards i { font-style: normal; font: 800 13px/1 var(--font-b); color: #fff; background: var(--red); border-radius: 99px; padding: 3px 7px; margin-right: 8px; }
.coach-inline { flex: 1; display: grid; gap: 10px; }
.coach-inline p { margin: 0; font-size: 14.5px; line-height: 1.45; padding: 10px 12px; border-radius: 13px; background: #eaf3e4; }
.finale-list { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 9px; font-size: 15px; line-height: 1.45; }
#game.tutorial .tb-round { display: none; }
#game.tutorial .topbar { height: 46px; }

/* ---------- hlášky ---------- */

#toasts { position: fixed; left: 50%; top: calc(62px + var(--sat)); translate: -50% 0; z-index: 250; display: grid; justify-items: center; gap: 6px; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { padding: 10px 15px; border-radius: 13px; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; color: var(--paper); background: rgba(22, 17, 10, .94); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); opacity: 0; translate: 0 -10px; transition: opacity .25s, translate .25s var(--ease); }
.toast.in { opacity: 1; translate: 0 0; }

/* ---------- malé a široké obrazovky ---------- */

@media (max-height: 620px) {
  .topbar { height: 46px; }
  .icon-btn { width: 40px; height: 40px; }
  .me-row { min-height: 42px; }
  .coach { min-height: 0; padding: 8px 11px; }
  .coach-text { font-size: 13.5px; line-height: 1.36; }
  .pod[data-pos="2"] .avatar { --s: 36px; }
  .hand { height: calc(var(--ch) + var(--cw) * .2 + 24px); }
}
/* telefon na šířku: můj řádek se přesune vedle ruky, ať zbude místo na stůl */
@media (max-height: 480px) and (min-width: 560px) {
  #game { --tw: calc(var(--cw) * .82); }
  .me-row { position: absolute; left: calc(8px + var(--sal)); bottom: 8px; padding: 0; min-height: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
  .turn-hint { margin-left: 0; order: -1; }
  .emote-btn { position: fixed; right: calc(10px + var(--sar)); bottom: 10px; margin: 0; }
  .emote-pop { position: fixed; right: 10px; bottom: 56px; }
  .trick, .note, .arena::before { top: 60%; }
  .pod[data-pos="1"], .pod[data-pos="3"] { top: 60%; }
  .declare-bar { bottom: calc(var(--ch) + var(--cw) * .2 + 30px); gap: 8px; padding: 11px; }
  .hand { width: min(100% - 300px, 520px); }
}
@media (max-width: 380px) {
  .pod[data-pos="1"] { left: 4px; }
  .pod[data-pos="3"] { right: 4px; }
  .pod-name { max-width: 70px; font-size: 12.5px; }
  .pod[data-pos="1"] .avatar, .pod[data-pos="3"] .avatar { --s: 38px; }
}
@media (min-width: 760px) and (min-height: 620px) {
  .pod[data-pos="1"] { left: 7%; }
  .pod[data-pos="3"] { right: 7%; }
  .pod .avatar { --s: 54px; }
  .pod.me .avatar { --s: 44px; }
  .pod-name { font-size: 15px; max-width: 130px; }
  .pod-score .total { font-size: 17px; }
  .pod-cards { height: 27px; padding-left: 11px; }
  .pod-cards .back { width: 18px; height: 27px; margin-left: -11px; }
  .pod-taken .mini-card { width: 20px; }
  .tk-h { font-size: 14px; }
  .topbar { height: 60px; padding: 0 14px; }
  .val { font-size: 14px; padding: 5px 11px 5px 8px; }
  .me-row { padding: 0 max(12px, calc(50% - 380px)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fan .card, .note span, .seats li, .rr { animation: none; }
}
