:root {
  --bg: #16112a;
  --bg-2: #221a3d;
  --card: #2b2150;
  --line: #3d3170;
  --text: #f6f2ff;
  --muted: #a99fcb;
  --accent: #ffcf3f;
  --accent-ink: #2a1d00;
  --hot: #ff4f8b;
  --good: #33d17a;
  --bad: #ff5a5a;

  --green: #22c55e;
  --orange: #f97316;
  --blue: #3b82f6;
  --purple: #a855f7;
  --pink: #ec4899;
  --yellow: #facc15;

  --radius: 18px;
  --spring: cubic-bezier(.2, 1.6, .4, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 700px at 20% -10%, #3a2470 0%, transparent 60%),
              radial-gradient(900px 600px at 110% 110%, #5a1d4a 0%, transparent 55%),
              var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
}

body { min-height: calc(100 * var(--dvh1, 1dvh)); }

#app { min-height: calc(100 * var(--dvh1, 1dvh)); }

h1, h2 { margin: 0 0 .4em; line-height: 1.1; }
p { margin: 0 0 .8em; line-height: 1.45; }
.muted { color: var(--muted); }
.huge { font-size: clamp(64px, calc(14 * var(--vw1, 1vw)), 140px); line-height: 1; margin-bottom: 12px; }
.error { color: var(--bad); font-weight: 600; }

/* ---------- dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: 700 17px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--spring), background .15s ease, opacity .15s, border-color .15s;
  touch-action: manipulation;
}
.btn:hover { background: #352a62; }
.btn:not(:disabled):active { transform: scale(.94); transition-duration: .05s; }
.btn:focus-visible, input:focus-visible, .avatar-pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffd95f; }
.btn.big { padding: 18px 28px; font-size: 20px; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }

input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font: 700 22px var(--font);
}

/* ---------- logo ---------- */
.logo {
  font-size: clamp(56px, calc(12 * var(--vw1, 1vw)), 96px);
  font-weight: 900;
  letter-spacing: -2px;
  margin: 0;
  transform: rotate(-3deg);
  text-shadow: 4px 4px 0 var(--hot);
}
.logo span { color: var(--accent); }
.logo.small { font-size: 56px; }

/* ---------- početna ---------- */
body.home #app { display: grid; place-items: center; padding: 24px 16px; }
.home-card { width: min(440px, 100%); text-align: center; }
.tagline { color: var(--muted); margin: 18px 0 28px; }
.join-code { text-align: left; }
.join-code label { font-weight: 700; display: block; margin-bottom: 8px; }
.join-code .row { display: flex; gap: 10px; }
.join-code input { text-transform: uppercase; letter-spacing: 8px; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* ---------- glavni ekran: soba ---------- */
body.host #app { padding: clamp(16px, calc(3 * var(--vw1, 1vw)), 40px); }
.lobby {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(20px, calc(4 * var(--vw1, 1vw)), 56px);
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  align-items: center;
}
.lobby-join { text-align: center; }
.hint { color: var(--muted); margin-top: 20px; }
.room-code { display: flex; justify-content: center; gap: 10px; margin: 8px 0 18px; }
.room-code span {
  width: 72px; height: 88px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 56px; font-weight: 900;
  border-radius: 16px;
  box-shadow: 0 6px 0 #b8901c;
}
.room-code span:nth-child(even) { transform: rotate(3deg); }
.room-code span:nth-child(odd) { transform: rotate(-3deg); }
.qr { width: 220px; margin: 0 auto 14px; background: #fff; border-radius: 16px; padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.local-note { font-size: 14px; color: var(--muted); }

.lobby-players h2 { font-size: 32px; }
.lobby-players h2 small { color: var(--muted); font-size: 20px; }
.player-grid {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px;
}
.player-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  min-width: 0;
}
.player-chip .avatar { font-size: 34px; }
.player-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.player-chip .tag { font-size: 12px; color: var(--accent); white-space: nowrap; }
.player-chip.ghost { border-style: dashed; background: transparent; color: var(--muted); }
.player-chip.ghost .avatar { opacity: .4; }
.player-chip.away { opacity: .4; }
.pop { animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.player-chip.pop { animation: chip-join .55s var(--spring); }
.player-chip.pop .avatar { animation: wave .7s ease-in-out .3s; }
@keyframes chip-join { from { transform: scale(.3) rotate(-10deg); opacity: 0; } }
@keyframes wave { 25% { transform: rotate(-18deg) scale(1.2); } 50% { transform: rotate(14deg) scale(1.2); } 75% { transform: rotate(-8deg); } }

.next-game { background: var(--bg-2); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.game-badge { display: inline-block; font-weight: 800; color: var(--accent); margin-bottom: 6px; font-size: 18px; }
.next-game p { margin: 0; color: var(--muted); }

/* ---------- glavni ekran: igra ---------- */
.game-intro, .game-live, .game-result, .final {
  max-width: 1200px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.game-intro h1 { font-size: clamp(48px, calc(8 * var(--vw1, 1vw)), 96px); }
.rules { font-size: clamp(20px, calc(2.4 * var(--vw1, 1vw)), 30px); max-width: 900px; }
.round-label { font-weight: 800; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }

.signal {
  width: min(900px, 100%);
  aspect-ratio: 16 / 7;
  display: grid; place-items: center;
  border-radius: 32px;
  font-size: clamp(64px, calc(14 * var(--vw1, 1vw)), 200px);
  font-weight: 900;
  background: #0c0818;
  border: 4px solid var(--line);
  color: #4c4270;
  transition: background .05s;
}
.signal.signal-fake, .signal.signal-go { color: #fff; border-color: transparent; }
.signal.signal-go { animation: shake .3s; }
.color-green { background: var(--green) !important; }
.color-orange { background: var(--orange) !important; }
.color-blue { background: var(--blue) !important; }
.color-purple { background: var(--purple) !important; }
.color-pink { background: var(--pink) !important; }
.color-yellow { background: var(--yellow) !important; color: #3a2d00 !important; }
@keyframes shake { 25% { transform: rotate(-2deg) scale(1.03); } 75% { transform: rotate(2deg) scale(1.03); } }

.player-row { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.results { list-style: none; padding: 0; margin: 0; width: min(760px, 100%); }
.result-row {
  display: grid; grid-template-columns: 40px 52px 1fr auto 70px; align-items: center; gap: 12px;
  padding: 14px 18px; margin-bottom: 10px;
  background: var(--card); border-radius: var(--radius);
  font-size: 22px; font-weight: 700; text-align: left;
  animation: slide .4s backwards; animation-delay: calc(var(--i) * 120ms);
}
.result-row:first-child:not(.is-out) { background: linear-gradient(90deg, #6b4a00, var(--card)); border: 2px solid var(--accent); }
.result-row .avatar { font-size: 36px; }
.result-row .place { color: var(--muted); }
.result-row .ms { font-variant-numeric: tabular-nums; }
.result-row .bad { color: var(--bad); font-size: 18px; }
.result-row .pts { text-align: right; font-size: 26px; }
.pts.plus { color: var(--good); }
.pts.minus { color: var(--bad); }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }

.scoreboard { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.score-chip { background: var(--bg-2); padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.score-chip b { color: var(--accent); margin-left: 4px; }

/* ---------- kraj ---------- */
.final h1 { font-size: clamp(40px, calc(6 * var(--vw1, 1vw)), 72px); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin: 24px 0; }
.podium-spot { display: flex; flex-direction: column; align-items: center; width: 180px; --rise: 0s; }
.podium-spot .avatar { font-size: 64px; }
.podium-spot .name { font-weight: 800; font-size: 22px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-spot .score { color: var(--muted); margin-bottom: 8px; }
.gain { color: var(--good); font-style: normal; font-weight: 800; }
.podium-spot .block {
  width: 100%; display: grid; place-items: center;
  border-radius: 14px 14px 0 0; font-size: 48px; font-weight: 900;
}
.place-1 { --rise: .6s; }
.place-1 .block { height: 180px; background: var(--accent); color: var(--accent-ink); }
.place-2 { --rise: .3s; }
.place-2 .block { height: 130px; background: #c9c3dd; color: #2b2150; }
.place-3 .block { height: 95px; background: #d08a4e; color: #2b1400; }
.rest { text-align: left; font-size: 20px; }
.rest b { color: var(--accent); }
.actions { display: flex; gap: 14px; width: min(640px, 100%); margin-top: 16px; }

/* ---------- telefon ---------- */
body.player #app { padding: 16px; display: grid; place-items: center; }
body.player.in-game #app { padding: 0; }
body.player.in-game { overscroll-behavior: none; }

.join { width: min(440px, 100%); }
.join label, .join .label { font-weight: 700; display: block; margin: 18px 0 8px; }
.room-label { color: var(--muted); text-align: center; }
.room-label b { color: var(--accent); letter-spacing: 3px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.avatar-pick {
  aspect-ratio: 1; font-size: 34px;
  background: var(--bg-2); border: 3px solid transparent; border-radius: 16px;
  cursor: pointer; touch-action: manipulation;
}
.avatar-pick.selected { border-color: var(--accent); background: var(--card); transform: scale(1.05); }

.center-card { width: min(440px, 100%); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

.tap-zone {
  width: calc(100 * var(--vw1, 1vw)); height: calc(100 * var(--dvh1, 1dvh));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; text-align: center;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  background: #1b1340;
}
.tap-zone .round-label { position: absolute; top: max(16px, env(safe-area-inset-top)); }
.tap-word { font-size: clamp(56px, calc(22 * var(--vw1, 1vw)), 140px); font-weight: 900; color: #4c4270; }
.tap-zone.signal-fake .tap-word, .tap-zone.signal-go .tap-word { color: #fff; }
.tap-zone.color-yellow .tap-word { color: #3a2d00; }
.tap-zone.intro, .tap-zone.result { background: transparent; }
.tap-zone.done.out { background: #3a0f1c; }
.tap-zone.done.ok { background: #0f2e1c; }
.pts-big { font-size: 32px; font-weight: 900; color: var(--accent); }

@media (max-width: 820px) {
  .lobby { grid-template-columns: 1fr; }
  .room-code span { width: 56px; height: 70px; font-size: 42px; }
  .result-row { grid-template-columns: 28px 40px 1fr auto 50px; font-size: 17px; padding: 10px 12px; }
  .podium-spot { width: 110px; }
  .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  /* Bez ukrasnih animacija — ali tajmeri (traka koja se prazni) i odbrojavanje 3-2-1 ostaju: to je informacija o vremenu. */
  *:not(.word-timer > div):not(.countdown > div):not(.sab-timer):not(.count321 > span), *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- izbor igre ---------- */
.games-title { font-size: 22px; margin-top: 4px; }
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.game-card {
  text-align: left; cursor: pointer;
  background: var(--bg-2); color: var(--text);
  border: 3px solid transparent; border-radius: var(--radius);
  padding: 14px 16px; font: inherit;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, transform .1s;
}
.game-card:hover { border-color: var(--line); }
.game-card.selected { border-color: var(--accent); background: var(--card); }
.game-card .game-rules { color: var(--muted); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.game-pick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 8px; }
.game-now { font-weight: 800; color: var(--accent); font-size: 20px; }
.small { font-size: 14px; }

/* ---------- bomba: glavni ekran ---------- */
.bomb-live, .bomb-boom {
  max-width: 1200px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bomb-big { font-size: clamp(120px, calc(22 * var(--vw1, 1vw)), 260px); line-height: 1; filter: drop-shadow(0 0 30px rgba(255, 120, 40, .25)); }
.heat-0 .bomb-big { animation: wobble 1.2s ease-in-out infinite; }
.heat-1 .bomb-big { animation: wobble .7s ease-in-out infinite; }
.heat-2 .bomb-big { animation: wobble .35s ease-in-out infinite; filter: drop-shadow(0 0 40px rgba(255, 90, 40, .55)); }
.heat-3 .bomb-big { animation: wobble .16s linear infinite; filter: drop-shadow(0 0 60px rgba(255, 50, 30, .9)); }
@keyframes wobble { 25% { transform: rotate(-6deg) scale(1.04); } 75% { transform: rotate(6deg) scale(1.04); } }
.bomb-holder { font-size: clamp(32px, calc(5 * var(--vw1, 1vw)), 60px); margin-top: 12px; }
.player-chip.has-bomb { border-color: var(--hot); background: #4a1a3a; transform: scale(1.12); }
.bomb-mini { font-size: 26px; animation: wobble .4s infinite; }

.bomb-boom { position: relative; }
.bomb-boom h1 { font-size: clamp(40px, calc(7 * var(--vw1, 1vw)), 88px); }
.boom-emoji { font-size: clamp(140px, calc(26 * var(--vw1, 1vw)), 300px); line-height: 1; animation: boom .6s cubic-bezier(.2, 1.8, .4, 1); }
.flash { position: fixed; inset: 0; background: #fff3c4; pointer-events: none; opacity: 0; animation: flash .7s; }
@keyframes boom { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }

/* ---------- bomba: telefon ---------- */
.bomb-watch { background: transparent; }
.bomb-holder-phone { background: #3a0f1c; justify-content: flex-start; padding-top: max(20px, env(safe-area-inset-top)); }
.bomb-holder-phone.heat-1 { background: #4d1020; }
.bomb-holder-phone.heat-2 { background: #651022; animation: throb .6s infinite; }
.bomb-holder-phone.heat-3 { background: #861020; animation: throb .25s infinite; }
@keyframes throb { 50% { filter: brightness(1.35); } }
.bomb-banner { font-weight: 900; font-size: 22px; letter-spacing: 1px; color: #ffd0d8; margin-bottom: 18px; }
.bomb-task { flex: 1; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.bomb-task h2 { font-size: 30px; }
.ink { font-weight: 900; }
.ink-red { color: #ff4d4d; }
.ink-blue { color: #4d8dff; }
.ink-green { color: #3be07a; }
.ink-yellow { color: #ffd93b; }
.wires { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.wire { height: 46px; border: 0; border-radius: 999px; cursor: pointer; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.wire-red { background: #e53935; }
.wire-blue { background: #1e63e9; }
.wire-green { background: #1fae4e; }
.wire-yellow { background: #f2c200; }
.wire:active { transform: scaleX(.96); }
.math { font-size: 56px !important; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.option { font: 900 36px var(--font); padding: 22px 0; border-radius: 18px; border: 0; background: var(--card); color: var(--text); cursor: pointer; }
.tap-bomb {
  width: 220px; height: 220px; border-radius: 50%;
  border: 0; background: #1b0d16; cursor: pointer;
  font-size: 110px; line-height: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px #ff4f8b55;
}
.tap-bomb span { font: 900 24px var(--font); color: #fff; margin-top: 6px; }
.tap-bomb:active { transform: scale(.94); }
.throw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.throw-target {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px; border-radius: 18px; border: 3px solid var(--hot);
  background: var(--card); color: var(--text); font: 800 18px var(--font); cursor: pointer;
}
.throw-target .avatar { font-size: 44px; }
.throw-target .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boom-me { background: #5a0d18 !important; }

/* ---------- kukavica ---------- */
.chicken-live {
  max-width: 1200px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.balloon-stage { height: clamp(220px, calc(38 * var(--vh1, 1vh)), 380px); display: flex; align-items: flex-end; justify-content: center; }
.balloon { font-size: clamp(90px, calc(12 * var(--vw1, 1vw)), 130px); line-height: 1; transform-origin: 50% 90%; transition: transform .12s linear; }
.balloon.nervous { animation: jitter .12s infinite; }
@keyframes jitter { 25% { translate: -2px 1px; } 75% { translate: 2px -1px; } }
.crash-value { font-size: clamp(72px, calc(12 * var(--vw1, 1vw)), 150px); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; margin: 8px 0; }
.player-chip.inside { border-color: var(--hot); }
.player-chip.cashed { border-color: var(--good); background: #173a2a; }
.pop-title { font-size: clamp(32px, calc(5 * var(--vw1, 1vw)), 60px); margin-bottom: 24px; }
.pop-title b { color: var(--accent); }
.tag-pill { display: inline-block; font-size: 14px; padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.tag-pill.lion { background: #6b4a00; color: #ffe08a; }
.tag-pill.chick { background: #4a3a10; color: #ffd; }
.result-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chicken-phone { background: #2a1238; cursor: pointer; }
.chicken-now { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; }
.chicken-now span { font-size: clamp(80px, calc(30 * var(--vw1, 1vw)), 150px); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
.chicken-now small { color: var(--muted); font-size: 18px; }
.cash-btn {
  width: min(320px, 90%); padding: 34px 0; border-radius: 28px;
  background: var(--good); color: #062512; font-size: 36px; font-weight: 900;
  box-shadow: 0 10px 0 #148a4a; margin-bottom: 18px;
}
.chicken-phone:active .cash-btn { transform: translateY(6px); box-shadow: 0 4px 0 #148a4a; }
.pts-big small { font-size: 18px; color: var(--muted); }

/* ---------- unutrašnji sat ---------- */
.clock-live {
  max-width: 1200px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.clock-goal-label { font-size: 24px; color: var(--muted); margin: 0; }
.clock-goal-label b { color: var(--accent); }
.clock-goal { font-size: clamp(72px, calc(13 * var(--vw1, 1vw)), 170px); font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.05; margin-bottom: 16px; }
.tv-clock {
  font-size: clamp(80px, calc(15 * var(--vw1, 1vw)), 200px); font-weight: 900; font-variant-numeric: tabular-nums;
  line-height: 1.05; margin: 8px 0 12px; min-width: 6ch;
  transition: color .3s, filter .3s;
}
.hidden-clock { color: #4c4270; filter: blur(2px); }

.timeline { position: relative; width: min(900px, 100%); height: 150px; margin: 8px 0 18px; }
.timeline .axis { position: absolute; left: 0; right: 0; top: 104px; height: 4px; background: var(--line); border-radius: 2px; }
.timeline .target-line { position: absolute; left: 50%; top: 0; bottom: 30px; width: 3px; margin-left: -1.5px; background: var(--accent); }
.timeline .target-line span { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); font-size: 22px; }
.timeline .edge { position: absolute; top: 116px; color: var(--muted); font-size: 14px; }
.timeline .edge.left { left: 0; }
.timeline .edge.right { right: 0; }
.timeline .mark {
  position: absolute; top: calc(var(--row) * 28px + 6px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  animation: drop .5s cubic-bezier(.2, 1.6, .4, 1) backwards;
}
.timeline .mark .avatar { font-size: 34px; line-height: 1; }
.timeline .mark .t { font-size: 13px; font-weight: 800; background: var(--card); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.timeline .mark.best .t { background: var(--accent); color: var(--accent-ink); }
.timeline .mark.off { opacity: .6; }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }
.result-row small { font-size: 15px; }

.clock-phone { background: #102233; }
.clock-phone.ready { background: transparent; }
.clock-phone .clock-goal { font-size: clamp(56px, calc(18 * var(--vw1, 1vw)), 96px); }
.p-clock { font-size: clamp(64px, calc(22 * var(--vw1, 1vw)), 120px); font-weight: 900; font-variant-numeric: tabular-nums; margin: 18px 0 30px; }
.p-clock.hidden-clock { filter: none; }
.stop-btn {
  width: min(320px, 90%); padding: 34px 0; border-radius: 28px;
  background: var(--bad); color: #fff; font-size: 38px; font-weight: 900;
  box-shadow: 0 10px 0 #a32a2a;
}
.clock-phone:active .stop-btn { transform: translateY(6px); box-shadow: 0 4px 0 #a32a2a; }

/* ---------- dvoboj ---------- */
.duel-live {
  max-width: 1300px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(16px, calc(4 * var(--vw1, 1vw)), 60px); width: 100%; margin: 10px 0 26px; }
.fighter { width: min(380px, 100%); justify-self: end; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; border-radius: 28px; background: var(--card); border: 3px solid var(--line); transition: transform .3s, opacity .3s; }
.fighter .avatar { font-size: clamp(80px, calc(11 * var(--vw1, 1vw)), 140px); line-height: 1; }
.fighter.right { justify-self: start; }
.fighter.right .avatar { transform: scaleX(-1); }
.fighter .name { font-size: 30px; font-weight: 900; }
.fighter .ready { font-weight: 800; color: var(--muted); font-size: 20px; }
.fighter .ready.yes { color: var(--good); }
.fighter .ready.no { color: var(--bad); }
.fighter .bets { background: var(--bg-2); padding: 4px 12px; border-radius: 999px; font-weight: 800; }
.fighter .crown { font-size: 40px; }
.fighter.won { border-color: var(--accent); transform: scale(1.06); }
.fighter.lost { opacity: .45; transform: rotate(-6deg) scale(.94); }
.vs { font-size: clamp(48px, calc(7 * var(--vw1, 1vw)), 96px); font-weight: 900; color: var(--hot); transform: rotate(-8deg); }
.duel-signal {
  min-width: 3.2em; padding: 10px 24px; border-radius: 28px;
  font-size: clamp(56px, calc(9 * var(--vw1, 1vw)), 130px); font-weight: 900; color: #fff;
}
.duel-signal.signal-wait { background: transparent; animation: wobble 2s ease-in-out infinite; }
.duel-signal.signal-go { animation: shake .3s; }
.color-red { background: #e11d48 !important; }
.duel-line { font-size: clamp(30px, calc(4.5 * var(--vw1, 1vw)), 56px); }

.duel-phone { background: #2a1a0e; }
.duel-phone.ready { background: #102a1a; }
.duel-phone.standoff { background: #0c0818; }
.duel-phone.standoff .tap-word { color: #fff; }
.duel-intro .btn { width: min(320px, 90%); margin: 8px 0; }
.bet-zone .throw-grid { max-width: 420px; }

@media (max-width: 820px) {
  .arena { grid-template-columns: 1fr; }
  .fighter.right .avatar { transform: none; }
  .fighter, .fighter.right { justify-self: center; }
}

/* ---------- statua ---------- */
.statue-live {
  max-width: 1300px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.command {
  font-size: clamp(32px, calc(5 * var(--vw1, 1vw)), 64px); font-weight: 900;
  padding: 18px 32px; border-radius: 24px; margin-bottom: 18px;
  background: var(--bg-2); color: var(--muted);
}
.command.show { background: var(--accent); color: var(--accent-ink); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.statue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; width: 100%; margin-top: 10px; }
.statue-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 22px; background: var(--card); border: 2px solid var(--line); font-weight: 800; }
.statue-card .avatar { font-size: 44px; line-height: 1; }
.statue-card .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statue-card.out { opacity: .5; transform: rotate(-4deg); }
.statue-card .bad { color: var(--bad); font-size: 14px; }

.cup {
  position: relative; width: 64px; height: 80px; overflow: hidden;
  border: 4px solid #cfe7ff; border-top: 0; border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, .05);
}
.cup .water { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#5ec8ff, #2f8fe0); transition: height .25s; }
.cup.low .water { background: linear-gradient(#ff9b9b, #e04848); }
.cup.big { width: 150px; height: 190px; border-width: 6px; border-radius: 0 0 36px 36px; margin: 10px 0 18px; }
.cup.big .water { transition: height .08s; }

.statue-phone { background: #0f1c2e; }
.statue-phone.ready { background: transparent; }
.phone-command { font-weight: 900; font-size: 22px; color: var(--accent); min-height: 2.6em; }
.finger-dot {
  width: 110px; height: 110px; border-radius: 50%;
  border: 4px dashed var(--accent); margin: 8px auto 10px;
  animation: throb 1s infinite;
}
.finger-dot.held { border-style: solid; background: #ffcf3f33; animation: none; }

/* ---------- konopac ---------- */
.rope-live {
  max-width: 1300px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rope-go { color: var(--accent); animation: shake .4s infinite; }
.rope-field { position: relative; width: 100%; height: 120px; margin: 18px 0 26px; border-radius: 24px; overflow: hidden; }
.rope-field .zone { position: absolute; top: 0; bottom: 0; width: 50%; }
.rope-field .zone.red { left: 0; background: linear-gradient(90deg, #e11d4866, #e11d4810); }
.rope-field .zone.blue { right: 0; background: linear-gradient(270deg, #3b82f666, #3b82f610); }
.rope-field .rope { position: absolute; left: 3%; right: 3%; top: 50%; height: 14px; margin-top: -7px; border-radius: 7px;
  background: repeating-linear-gradient(60deg, #c8a165 0 10px, #9b7743 10px 20px); }
.rope-field .knot { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 64px; transition: left .12s linear; }
.rope-field .center-mark { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 4px; margin-left: -2px; background: #fff3; border-radius: 2px; }
.rope-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; }
.rope-team { background: var(--card); border-radius: 22px; padding: 16px 20px; border: 3px solid transparent; text-align: left; }
.rope-team.red { border-color: #e11d4866; }
.rope-team.blue { border-color: #3b82f666; }
.rope-team.won { border-color: var(--accent); }
.rope-team ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 20px; font-weight: 700; }
.rope-team .avatar { font-size: 28px; }
.rope-team .taps { float: right; color: var(--accent); font-variant-numeric: tabular-nums; }

.rope-phone.red { background: #3a0f1c; }
.rope-phone.blue { background: #0f1f3a; }
.rope-phone.ready { background: transparent; }
.rope-mini { position: relative; width: 90%; height: 16px; border-radius: 8px; margin: 8px 0 14px;
  background: repeating-linear-gradient(60deg, #c8a165 0 8px, #9b7743 8px 16px); }
.rope-mini .knot { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 30px; }
.rope-status { font-weight: 900; font-size: 22px; }
.oars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; flex: 1; max-height: calc(55 * var(--vh1, 1vh)); margin: 10px 0; }
.oar { border: 0; border-radius: 26px; font: 900 26px var(--font); color: #fff; background: #ffffff22; cursor: pointer; touch-action: manipulation; }
.rope-phone.red .oar { background: #e11d48; }
.rope-phone.blue .oar { background: #2563eb; }
.oar.used { opacity: .45; }
.oar:active { transform: scale(.96); }

/* ---------- točak kazne ---------- */
.spin-btn { margin: 4px 0 14px; }
.penalty-count { margin-bottom: 14px; }
.penalty-form { text-align: left; margin-top: 18px; }
.penalty-form label { font-weight: 700; display: block; margin-bottom: 6px; }
.penalty-form .row { display: flex; gap: 8px; }
.penalty-form input { font-size: 17px; }
.wheel-stage { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 10px; }
.wheel-stage h1 { font-size: clamp(28px, calc(4 * var(--vw1, 1vw)), 48px); }
.wheel-stage h1 b { color: var(--accent); }
.wheel-wrap { position: relative; width: min(520px, calc(80 * var(--vw1, 1vw)), calc(58 * var(--vh1, 1vh))); aspect-ratio: 1; margin: 8px 0 16px; }
.wheel-pointer { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 44px; color: #fff; text-shadow: 0 3px 0 #0006; }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 10px 40px #0008; }
.slice-label { position: absolute; left: 50%; top: 0; width: 0; height: 50%; transform-origin: 50% 100%; }
.slice-label span {
  position: absolute; left: 50%; top: 7%; transform: translateX(-50%);
  writing-mode: vertical-rl; max-height: 80%; overflow: hidden; text-overflow: ellipsis;
  font-weight: 800; font-size: clamp(10px, calc(1.3 * var(--vw1, 1vw)), 14px); color: #fff; text-shadow: 0 1px 2px #000a; white-space: nowrap;
}
.wheel-result { font-size: clamp(24px, calc(3.4 * var(--vw1, 1vw)), 40px); font-weight: 900; padding: 14px 26px; border-radius: 22px; background: var(--bg-2); color: var(--muted); max-width: 900px; }
.wheel-result.show { background: var(--accent); color: var(--accent-ink); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.wheel-actions { margin: 18px auto 0; }
.hidden { visibility: hidden; }
.wheel-phone.victim { background: #3a0f1c; border-radius: 24px; padding: 20px; }
.spin-emoji { animation: spin 1s linear infinite; display: inline-block; }
.penalty-text { font-size: 28px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- saboter ---------- */
.sab-live {
  max-width: 1200px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sab-word { font-size: clamp(64px, calc(11 * var(--vw1, 1vw)), 150px); font-weight: 900; letter-spacing: 2px; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.ink-purple { color: #c084fc; }
.ink-orange { color: #fb923c; }
.sab-timer { width: min(700px, 90%); height: 10px; border-radius: 5px; background: var(--accent); transform-origin: left; animation: drain linear forwards; margin: 10px 0 14px; }
@keyframes drain { to { transform: scaleX(0); } }
.sab-alert { min-height: 56px; font-size: 28px; font-weight: 900; color: #fff; background: #7c1d3a; padding: 10px 24px; border-radius: 18px; animation: pop .35s; }
.sab-alert.empty { background: transparent; }
.sab-unmask { font-size: clamp(48px, calc(7 * var(--vw1, 1vw)), 90px); font-weight: 900; animation: boom .7s cubic-bezier(.2, 1.8, .4, 1); }
.sab-unmask .avatar { font-size: 1.3em; }
.caught { color: var(--good); }
.escaped { color: var(--hot); }
.sab-votes .muted { font-size: 15px; }

.sab-phone { background: #14202e; }
.sab-phone.secret.evil { background: #2b0b1d; }
.sab-phone.secret.evil h2 { color: var(--hot); font-size: 34px; }
.color-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: min(360px, 92%); margin: 14px 0; transition: transform .3s; }
.color-btn { aspect-ratio: 1.4; border: 0; border-radius: 20px; cursor: pointer; box-shadow: inset 0 -8px 0 #0003; touch-action: manipulation; }
.c-red { background: #e53935; }
.c-blue { background: #1e63e9; }
.c-green { background: #1fae4e; }
.c-yellow { background: #f2c200; }
.c-purple { background: #9333ea; }
.c-orange { background: #f97316; }
.fx-shrink .color-grid { transform: scale(.32); }
.fx-flip { transform: rotate(180deg); }
.fx-shuffle .color-grid { animation: jitter .15s infinite; }
.freeze-overlay {
  position: fixed; inset: 0; display: grid; place-items: center; text-align: center;
  background: #a5e8ffcc; color: #06324a; font-size: 34px; font-weight: 900; backdrop-filter: blur(3px);
}
.fx-note { color: var(--hot); font-weight: 800; }
.power-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 420px; margin: 8px 0 14px; }
.power { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; font-size: 30px; border-radius: 16px; border: 3px solid transparent; background: var(--card); color: var(--text); cursor: pointer; }
.power span { font: 700 12px var(--font); }
.power.on { border-color: var(--hot); background: #4a1a3a; }
.throw-target.dim { opacity: .4; }
.join-url { font-weight: 800; color: var(--text); word-break: break-all; }

/* ---------- online režim (bez TV-a) ---------- */
.mode-hint { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }
.online-btn { border-color: var(--accent); }
.board-wrap {
  pointer-events: none;
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 5;
  overflow: hidden; border-radius: 0 0 18px 18px;
  box-shadow: 0 6px 24px #0008; background: var(--bg);
}
.board { width: 854px; height: 480px; border: 0; transform-origin: 0 0; pointer-events: none; display: block; }
body.board-body { background: var(--bg); min-height: 480px; overflow: hidden; }
body.board-body #app { padding: 12px 20px; min-height: 480px; }
body.player.online #app { padding-top: calc(var(--board-top, 0px) + 12px); }
body.player.online.in-game #app { padding-top: var(--board-top, 0px); }
body.player.online .tap-zone { height: calc(calc(100 * var(--dvh1, 1dvh)) - var(--board-top, 0px)); }
body.player.online .huge { font-size: clamp(48px, calc(12 * var(--vw1, 1vw)), 90px); }
.online-title { font-size: 30px; text-align: center; }
.invite { background: var(--bg-2); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.invite p { margin: 0; }
.invite-code { font-size: 44px; font-weight: 900; letter-spacing: 10px; color: var(--accent); }
.toast { color: var(--good); font-weight: 700; word-break: break-all; }

/* ---------- žurka: igra za igrom ---------- */
.final-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: end; width: min(1100px, 100%); }
.totals { background: var(--card); border-radius: var(--radius); padding: 16px 22px; text-align: left; }
.totals h2 { font-size: 26px; }
.totals h2 small { color: var(--muted); font-size: 16px; }
.totals ol { margin: 0; padding-left: 26px; font-size: 20px; font-weight: 700; line-height: 1.7; }
.totals b { color: var(--accent); float: right; }
.next-up { display: flex; align-items: center; gap: 18px; margin-top: 22px; font-size: 24px; background: var(--bg-2); padding: 12px 18px; border-radius: 999px; }
.next-up b { color: var(--accent); }
.countdown { width: 180px; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.countdown div { height: 100%; background: var(--accent); transform-origin: left; animation: drain linear forwards; }
.next-phone { font-size: 18px; }
.next-phone b { color: var(--accent); }
.btn small { font-weight: 600; opacity: .75; font-size: 15px; }
@media (max-width: 820px) { .final-split { grid-template-columns: 1fr; } .next-up { flex-wrap: wrap; justify-content: center; border-radius: 22px; } }

/* ---------- „Spreman“ pre igre ---------- */
.ready-strip {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center;
  background: var(--card); border: 2px solid var(--accent); border-radius: 999px;
  padding: 10px 14px 10px 26px; font-size: 20px; max-width: calc(100% - 32px);
}
.ready-strip.go { padding: 12px 30px; font-weight: 900; color: var(--accent); font-size: 26px; }
.ready-chips { display: flex; gap: 10px; }
.ready-chips span { opacity: .55; }
.ready-chips span.ok { opacity: 1; }
body.board-body .ready-strip { position: absolute; }
.ready-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%);
  text-align: center;
}
.ready-bar p { margin: 0; font-weight: 700; }
.ready-bar .btn { max-width: 420px; }

/* ---------- zvuk ---------- */
.sound-line { margin: 0 0 10px; }
.sound-hint { display: inline-block; background: #4a1a3a; color: #ffd0e0; padding: 8px 16px; border-radius: 999px; font-weight: 700; animation: throb 1.6s infinite; }

/* libela u Statui */
.level { position: relative; width: 120px; height: 120px; border-radius: 50%; background: #0b1424; border: 3px solid #cfe7ff55; margin: 4px auto 8px; }
.level-ring { position: absolute; inset: 38px; border-radius: 50%; border: 2px dashed #cfe7ff88; }
.bubble { position: absolute; left: 44px; top: 44px; width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #7fd7ff 60%, #2f8fe0); transition: transform .06s linear; }
.bubble.warn { background: radial-gradient(circle at 35% 35%, #fff, #ff9b9b 60%, #e04848); }

/* ---------- najduža reč ---------- */
.words-live {
  max-width: 1250px; margin: 0 auto; text-align: center;
  min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.letter-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.letter-row .tile {
  width: 76px; height: 86px; display: grid; place-items: center;
  background: #fff3d6; color: #2a1d00; border-radius: 14px; font-size: 48px; font-weight: 900;
  box-shadow: 0 6px 0 #c9a35a;
}
.letter-row.small .tile { width: 46px; height: 52px; font-size: 28px; box-shadow: 0 4px 0 #c9a35a; }
.word-timer { width: min(800px, 92%); height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 4px 0 16px; }
.word-timer div { height: 100%; background: linear-gradient(90deg, var(--hot), var(--accent)); transform-origin: left; animation: drain linear forwards; }
.word-found { letter-spacing: 2px; }
.longest { font-size: 20px; margin-top: 10px; }
.longest b { color: var(--accent); letter-spacing: 1px; }

.words-phone { background: #1d1530; justify-content: flex-start; padding-top: max(16px, env(safe-area-inset-top)); gap: 8px; }
.words-phone .round-label { position: static; margin: 0; }
.word-now { min-height: 52px; font-size: 34px; font-weight: 900; letter-spacing: 3px; color: var(--accent); word-break: break-all; }
.phone-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; max-width: 420px; }
.phone-tiles .tile {
  aspect-ratio: 1; border: 0; border-radius: 12px; cursor: pointer; touch-action: manipulation;
  background: #fff3d6; color: #2a1d00; font: 900 28px var(--font); box-shadow: 0 4px 0 #c9a35a;
}
.phone-tiles .tile.used { opacity: .25; transform: translateY(3px); box-shadow: none; }
.word-actions { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; width: 100%; max-width: 420px; margin-top: 6px; }
.word-feedback { font-weight: 800; min-height: 1.4em; margin: 4px 0 0; }
.word-feedback.ok { color: var(--good); }
.word-feedback.bad { color: var(--bad); }

/* ---------- izbor igara ---------- */
.quick-picks { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; justify-content: center; }
.game-cards.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.game-cards.compact .game-card { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; opacity: .55; }
.game-cards.compact .game-card.selected { opacity: 1; }
.game-cards.compact .game-card.few { border-style: dashed; }
.game-card .check { font-size: 20px; color: var(--accent); }
.game-card .min { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.game-card .game-badge { margin: 0; font-size: 17px; }
.game-pick .btn { padding: 10px 14px; font-size: 15px; }

/* ---------- igre sa pitanjima, glasanjem i crtanjem ---------- */
.talk-live { max-width: 1200px; margin: 0 auto; text-align: center; min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.big-question { font-size: clamp(34px, calc(4.6 * var(--vw1, 1vw)), 62px); max-width: 1100px; }
.answer-list { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(1000px, 100%); counter-reset: a; }
.answer-list li { background: var(--card); border-radius: var(--radius); padding: 16px 20px; font-size: 26px; font-weight: 800; text-align: left; counter-increment: a; }
.answer-list li::before { content: counter(a) ". "; color: var(--muted); }
.answer-list.reveal li { display: flex; flex-direction: column; gap: 6px; font-size: 22px; }
.answer-list.reveal li.truth { background: #173a2a; border: 3px solid var(--good); }
.answer-list .answer-meta { font-size: 15px; font-weight: 600; color: var(--muted); }
.groups { display: flex; flex-direction: column; gap: 10px; width: min(900px, 100%); margin: 12px 0; }
.group { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; background: var(--card); padding: 14px 22px; border-radius: var(--radius); font-size: 26px; font-weight: 800; animation: slide .4s backwards; animation-delay: calc(var(--i) * 140ms); }
.group.top { background: #173a2a; border: 3px solid var(--good); }
.group.sheep { background: #3a0f1c; border: 3px solid var(--bad); }
.group-text { text-align: left; }
.sheep-title, .who-title { font-size: 40px; margin-top: 10px; }
.bars { display: flex; flex-direction: column; gap: 10px; width: min(900px, 100%); margin: 14px 0; }
.bar-row { display: grid; grid-template-columns: 50px 160px 1fr 40px; gap: 12px; align-items: center; font-size: 24px; font-weight: 800; animation: slide .4s backwards; animation-delay: calc(var(--i) * 140ms); }
.bar-row .avatar { font-size: 38px; }
.bar-row .name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 26px; background: var(--bg-2); border-radius: 13px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 13px; animation: grow 1s ease-out; transform-origin: left; }
.bar-row.win .bar span { background: var(--hot); }
@keyframes grow { from { transform: scaleX(0); } }
.answer-big { font-size: 40px; font-weight: 900; }
.answer-big b, .accent { color: var(--accent); }
.hot { color: var(--hot); }
.num-line { margin-top: 0; }
.sym-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.sym-row .sym { font-size: 34px; width: 54px; height: 60px; display: grid; place-items: center; background: var(--card); border-radius: 12px; }
.sym-row.big .sym { font-size: 84px; width: 120px; height: 130px; border-radius: 20px; animation: pop .4s backwards; }
.sym-row.slots .sym { font-size: 26px; width: 40px; height: 46px; }
.seq-small span { font-size: 22px; padding: 0 2px; }
.seq-small .bad { opacity: .35; }
.sym-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 380px; }
.sym-btn { font-size: 38px; aspect-ratio: 1; border: 0; border-radius: 16px; background: var(--card); cursor: pointer; touch-action: manipulation; }
.talk-phone { background: #16202f; justify-content: flex-start; padding-top: max(18px, env(safe-area-inset-top)); gap: 10px; overflow-y: auto; }
.talk-phone.my-turn { background: #173a2a; }
.talk-phone.evil { background: #3a0f1c; }
.game-form { display: flex; gap: 8px; width: 100%; max-width: 440px; }
.game-form input { font-size: 20px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; }
.choice { text-align: left; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--text); font: 800 19px var(--font); cursor: pointer; }
.secret-word { font-size: 34px; font-weight: 900; color: var(--accent); letter-spacing: 1px; background: var(--bg-2); padding: 8px 18px; border-radius: 14px; }
.ok-text { color: var(--good); }
.draw-live { display: grid; grid-template-columns: 1fr 640px; gap: 30px; align-items: center; max-width: 1300px; margin: 0 auto; min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 80px); }
.draw-side { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.draw-side .hint { font-size: 44px; font-weight: 900; letter-spacing: 6px; color: var(--accent); }
.guess-feed { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; font-size: 22px; }
.guess-feed li { background: var(--bg-2); padding: 6px 14px; border-radius: 12px; }
.guess-feed li.ok { background: #173a2a; }
.drawing { display: block; border-radius: 18px; background: #fffdf7; }
.drawing.tv { width: 640px; height: 640px; }
.drawing.phone { width: min(calc(78 * var(--vw1, 1vw)), calc(46 * var(--dvh1, 1dvh))); height: auto; aspect-ratio: 1; }
.draw-phone { background: #16202f; justify-content: flex-start; gap: 8px; padding-top: max(14px, env(safe-area-inset-top)); }
#draw-canvas { width: min(calc(92 * var(--vw1, 1vw)), calc(56 * var(--dvh1, 1dvh))); height: auto; aspect-ratio: 1; border-radius: 16px; touch-action: none; background: #fffdf7; }
.palette { display: flex; gap: 8px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff3; cursor: pointer; }
.swatch.on { border-color: var(--accent); transform: scale(1.15); }
@media (max-width: 820px) { .answer-list { grid-template-columns: 1fr; } .draw-live { grid-template-columns: 1fr; } }

/* ---------- početna ---------- */
.home-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.home-btn { font-size: 24px; padding: 22px 28px; }
.mode-cards { display: grid; gap: 14px; margin: 6px 0 16px; }
.mode-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 3px solid var(--line);
  color: var(--text); text-decoration: none;
}
.mode-card.recommended { border-color: var(--accent); }
.mode-card b { font-size: 22px; }
.mode-card span { color: var(--muted); }
.mode-emoji { font-size: 40px; color: inherit !important; }
.mode-card .badge { position: absolute; top: 12px; right: 14px; background: var(--accent); color: var(--accent-ink) !important; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.join-code { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.join-code input { font-size: 44px; letter-spacing: 14px; text-align: center; text-transform: uppercase; padding: 14px; }
.home-card .link { margin-top: 4px; }
@media (min-width: 720px) { .mode-cards { grid-template-columns: 1fr 1fr; } .home-card { width: min(640px, 100%); } }
/* paleta mora da stane i na uzak telefon */
.palette { flex-wrap: wrap; justify-content: center; max-width: 100%; gap: 6px; }
.palette .swatch { width: 32px; height: 32px; }
.palette .btn { padding: 6px 12px; }

/* niski telefoni (npr. iPhone SE) u online sobi: tabla gore zauzima mesto */
@media (max-height: 700px) {
  body.player.online .bomb-holder-phone { padding-top: 8px; }
  body.player.online .bomb-banner { margin-bottom: 6px; font-size: 18px; }
  body.player.online .bomb-task { gap: 10px; }
  body.player.online .bomb-task h2 { font-size: 22px; margin: 0; }
  body.player.online .tap-bomb { width: 150px; height: 150px; font-size: 76px; }
  body.player.online .wire { height: 36px; }
  body.player.online .wires { gap: 10px; }
  body.player.online .option { padding: 14px 0; font-size: 28px; }
  body.player.online .math { font-size: 40px !important; }
  body.player.online .throw-target { padding: 10px 6px; }
  body.player.online .throw-target .avatar { font-size: 34px; }
}

/* ---------- soba na telefonu ---------- */
body.board-hidden .board-wrap { display: none; }
body.player.online.board-hidden #app { padding-top: 16px; }
.lobby-phone { width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; }
.me-row { display: flex; align-items: center; gap: 12px; }
.me-avatar { font-size: 52px; line-height: 1; }
.me-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.me-text b { font-size: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { color: var(--muted); font-size: 15px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 22px; cursor: pointer; }
.invite { align-items: stretch; text-align: left; padding: 14px 16px; }
.invite-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.invite-row .invite-code { font-size: 36px; letter-spacing: 6px; line-height: 1.1; }
.lobby-tv { text-align: center; color: var(--muted); margin: 0; }
.who-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who-chip { background: var(--card); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 15px; }
.who-chip.me { outline: 2px solid var(--accent); }
.lobby-wait { text-align: center; color: var(--muted); background: var(--bg-2); border-radius: var(--radius); padding: 12px; margin: 0; }
.lobby-box { background: var(--bg-2); border-radius: var(--radius); overflow: hidden; }
.box-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; background: none; border: 0; color: var(--text); font: 600 16px var(--font); text-align: left; cursor: pointer; }
.box-head:disabled { cursor: default; }
.box-toggle { color: var(--accent); font-weight: 800; white-space: nowrap; }
.small-picks { padding: 0 12px; justify-content: flex-start; }
.chip-btn { background: var(--card); color: var(--text); border: 0; border-radius: 999px; padding: 6px 12px; font: 700 14px var(--font); cursor: pointer; }
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px 12px; }
.game-chip { display: flex; align-items: center; gap: 6px; text-align: left; padding: 9px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--muted); font: 700 14px var(--font); cursor: pointer; min-width: 0; }
.game-chip.on { border-color: var(--accent); color: var(--text); background: #3a2f5c; }
.game-chip .tick { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 2px solid var(--line); font-size: 12px; color: var(--accent-ink); }
.game-chip.on .tick { background: var(--accent); border-color: var(--accent); }
.game-chip small { color: var(--muted); font-size: 11px; margin-left: auto; }
.lobby-box .penalty-form { padding: 0 12px 12px; margin: 0; }
.lobby-phone.center-card { text-align: left; gap: 14px; }

/* ---------- lavirint ---------- */
.maze { display: block; background: #0c1424; border-radius: 16px; }
.maze.tv { width: auto; height: min(calc(80 * var(--vh1, 1vh)), 760px); aspect-ratio: 9 / 13; }
.maze-live { grid-template-columns: 1fr auto; }
.maze.phone { width: min(calc(94 * var(--vw1, 1vw)), calc((calc(100 * var(--dvh1, 1dvh)) - var(--board-top, 0px) - 120px) * 9 / 13)); height: auto; aspect-ratio: 9 / 13; }
.maze-phone { background: #0f1a2c; justify-content: flex-start; padding-top: max(10px, env(safe-area-inset-top)); gap: 6px; touch-action: none; }
.maze-top { display: flex; align-items: center; gap: 10px; width: min(calc(94 * var(--vw1, 1vw)), 460px); }
.maze-top .round-label { position: static; margin: 0; white-space: nowrap; }
.maze-top .word-timer { margin: 0; flex: 1; }

/* ---------- zaustavi u okviru ---------- */
.stop-track { position: relative; width: min(900px, 92%); height: 90px; margin: 24px auto; background: var(--bg-2); border-radius: 18px; overflow: visible; }
.stopper-phone .stop-track { height: 110px; width: calc(92 * var(--vw1, 1vw)); }
.stop-window { position: absolute; top: 0; bottom: 0; background: #33d17a44; border: 3px solid var(--good); border-radius: 14px; }
.stop-marker { position: absolute; top: 14px; bottom: 14px; width: 26px; margin-left: -13px; background: var(--accent); border-radius: 8px; box-shadow: 0 0 18px #ffcf3f99; }
.stop-pin { position: absolute; top: -34px; transform: translateX(-50%); font-size: 26px; }
.stopper-phone { background: #1d1530; }
.stopper-phone.stopped { background: #102a1a; }

/* ---------- kamen, papir, makaze ---------- */
.rps-title { font-size: clamp(64px, calc(10 * var(--vw1, 1vw)), 130px); letter-spacing: 10px; }
.rps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; width: 100%; max-width: 1100px; margin-top: 12px; }
.rps-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; background: var(--card); border-radius: 22px; border: 3px solid var(--line); animation: pop .5s backwards; animation-delay: calc(var(--i) * 120ms); }
.rps-card.win { border-color: var(--good); }
.rps-card .rps-hand { font-size: 72px; line-height: 1; }
.rps-card .avatar { font-size: 32px; }
.rps-card .name { font-weight: 800; }
.rps-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.rps-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px; border-radius: 20px; border: 3px solid var(--line); background: var(--card); color: var(--text); font: 800 18px var(--font); cursor: pointer; touch-action: manipulation; }
.rps-btn span { font-size: 54px; line-height: 1; }
.rps-btn.random { border-style: dashed; }

/* ---------- ⏭ preskoči igru ---------- */
.skip-tv { position: fixed; right: 20px; bottom: 20px; padding: 8px 16px; font-size: 15px; opacity: .6; }
.skip-tv:hover { opacity: 1; }
body.board-body .skip-tv { display: none; }
.skip-btn {
  position: fixed; top: calc(var(--board-top, 0px) + 8px); right: 8px; z-index: 6;
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line);
  background: #00000055; color: var(--text); font-size: 18px; cursor: pointer;
}
.skip-confirm {
  position: fixed; left: 12px; right: 12px; top: calc(var(--board-top, 0px) + 8px); z-index: 7;
  display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap;
  background: var(--card); border: 2px solid var(--accent); border-radius: 18px; padding: 10px; font-weight: 800;
}
.skip-confirm .btn { padding: 8px 14px; }

/* ---------- krtica ---------- */
.mole-board { width: min(560px, calc(46 * var(--vw1, 1vw))); }
.mole-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.mole-hole {
  aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer; touch-action: manipulation;
  background: radial-gradient(circle at 50% 65%, #1a0f08 0 55%, #4a2f1c 56% 100%);
  display: grid; place-items: center; font-size: clamp(40px, calc(12 * var(--vw1, 1vw)), 84px);
}
.mole-hole span { transform: translateY(8%); animation: pop .18s; }
.mole-hole.gold { background: radial-gradient(circle at 50% 65%, #3a2a00 0 55%, #8a6a10 56% 100%); }
.mole-hole.bomb { background: radial-gradient(circle at 50% 65%, #2a0a0a 0 55%, #6a1d1d 56% 100%); }
.mole-hole.whacked { transform: scale(.92); }
.mole-time { height: 8px; background: var(--line); border-radius: 4px; margin-top: 12px; overflow: hidden; }
.mole-time div { height: 100%; background: var(--accent); transform-origin: left; }
.mole-phone { background: #1a2a12; justify-content: flex-start; padding-top: max(14px, env(safe-area-inset-top)); gap: 12px; }
.mole-phone .mole-grid { width: min(calc(92 * var(--vw1, 1vw)), calc(calc(100 * var(--dvh1, 1dvh)) - var(--board-top, 0px) - 150px)); }
.mole-head { display: flex; justify-content: space-between; align-items: center; width: min(calc(92 * var(--vw1, 1vw)), 460px); font-size: 20px; }
.mole-head .round-label { position: static; margin: 0; }
.mole-live { grid-template-columns: 1fr auto; }

/* ---------- šibice ---------- */
.sticks-row { display: flex; gap: clamp(16px, calc(4 * var(--vw1, 1vw)), 48px); justify-content: center; align-items: flex-end; flex-wrap: wrap; margin: 18px 0; }
.stick-col { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; animation: slide .5s backwards; animation-delay: calc(var(--i, 0) * 180ms); }
.stick-col.long .stick-body { background: linear-gradient(#ffe7a8, #d9a441); box-shadow: 0 0 18px #ffcf3f88; }
.stick-col.short { opacity: .75; }
.stick { height: 260px; width: 30px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.stick-head { width: 22px; height: 30px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 40% 35%, #ff7a5c, #b3261e); margin-bottom: -4px; z-index: 1; }
.stick-body { width: 12px; background: linear-gradient(#f3d9a4, #c9a46a); border-radius: 0 0 4px 4px; }
.stick.hidden .stick-body { background: repeating-linear-gradient(#3d3170 0 10px, #2b2150 10px 20px); }
.stick.hidden .stick-head { background: #3d3170; }
.my-stick .stick { height: 200px; transform: scale(1.1); }
.straws-phone { gap: 8px; }
.straws-phone .round-label { position: static; margin: 0; }
.swap-log { font-size: 18px; }
.my-stick { height: 230px; display: flex; align-items: flex-end; justify-content: center; margin: 6px 0 10px; }
.my-stick .stick { transform: none; height: 220px; }
/* mesto za ⏭ u gornjem desnom ćošku */
.mole-head, .maze-top { padding-right: 44px; }

/* ---------- veća ili manja ---------- */
.card-row { display: flex; gap: 12px; align-items: flex-end; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.playing-card {
  width: 110px; height: 154px; border-radius: 14px; background: #fffdf7; color: #111;
  display: grid; place-items: center; font: 900 44px var(--font); box-shadow: 0 8px 0 #0004, 0 0 0 3px #fff3 inset;
}
.playing-card.red { color: #d62839; }
.playing-card.big { width: 150px; height: 210px; font-size: 60px; }
.playing-card.small { width: 64px; height: 90px; font-size: 24px; opacity: .55; box-shadow: none; }
.playing-card.flip { width: 150px; height: 210px; font-size: 60px; animation: flipin .5s ease-out; }
@keyframes flipin { from { transform: rotateY(90deg) scale(.9); } }
.player-chip.shake { animation: shake .4s; }
.higher-phone { gap: 10px; }
.higher-phone .playing-card.big { width: 120px; height: 168px; font-size: 48px; }
.higher-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.higher-buttons .take-btn { grid-column: 1 / -1; }
.higher-phone .round-label { position: static; margin: 0; }

/* ---------- 🎙️ glas ---------- */
.voice-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--bg-2); border-radius: var(--radius); padding: 12px 14px; }
.voice-bar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; box-sizing: border-box; }
.voice-bar .toggle { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 14px; cursor: pointer; opacity: .75; }
.voice-bar .toggle span { font-size: 26px; line-height: 1; }
.voice-bar .toggle b { font-size: 13px; }
.voice-bar .toggle.on { border-color: var(--good); background: #33d17a22; opacity: 1; }
.voice-bar .muted, .voice-bar .error { grid-column: 1 / -1; margin: 0; text-align: center; }
.voice-people { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 13px; }
.voice-people span { background: var(--card); border-radius: 999px; padding: 3px 10px; }
.ready-bar .voice-bar { max-width: 420px; background: none; padding: 0; }
.voice-bar.compact .toggle { flex-direction: row; justify-content: center; gap: 6px; padding: 6px; font-size: 13px; }
.voice-bar.compact .toggle span { font-size: 18px; }
.voice-bar.compact .toggle b { display: none; }
.who-chip.talking { outline: 3px solid var(--good); box-shadow: 0 0 12px #33d17a88; }

/* ---------- bomba: novi zadaci ---------- */
.pump-green { color: #3ee07a; }
.pump-row { display: flex; gap: 18px; align-items: stretch; justify-content: center; width: 100%; }
.pump-gauge { position: relative; width: 64px; height: 220px; border-radius: 16px; background: #1a0710; border: 3px solid #ffd0d8; overflow: hidden; }
.pump-zone { position: absolute; left: 0; right: 0; background: #1fae4e66; border-top: 2px dashed #3ee07a; border-bottom: 2px dashed #3ee07a; }
.pump-fill { position: absolute; left: 6px; right: 6px; bottom: 0; border-radius: 10px 10px 0 0; background: linear-gradient(#ffb347, #ff5a36); transition: height .12s; }
.pump-fill.over { background: #ff1f3d; }
.pump-buttons { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.pump-btn { width: 140px; height: 140px; border-radius: 50%; border: 0; background: #ffd0d8; font-size: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.pump-btn span { font: 900 16px var(--font); color: #3a0f1c; }
.pump-btn:active { transform: scale(.93); }
.odd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.odd-cell { font-size: 38px; padding: 10px 0; border-radius: 14px; border: 0; background: var(--card); cursor: pointer; }
.code-digits b { display: inline-block; min-width: 1.1em; margin: 0 2px; padding: 0 6px; border-radius: 8px; background: #ffffff22; }
.code-digits b.done { background: #1fae4e; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 300px; }
.key { font: 900 30px var(--font); padding: 14px 0; border-radius: 14px; border: 0; background: var(--card); color: var(--text); cursor: pointer; }
.arrow-big { font-size: 1.3em; }
.arrow-pad { display: grid; grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(3, 76px); gap: 6px; }
.arrow-btn { font-size: 40px; border: 0; border-radius: 16px; background: var(--card); cursor: pointer; }
.arrow-up { grid-area: 1 / 2; } .arrow-left { grid-area: 2 / 1; } .arrow-right { grid-area: 2 / 3; } .arrow-down { grid-area: 3 / 2; }
@media (max-height: 700px) {
  body.player.online .pump-gauge { height: 150px; }
  body.player.online .pump-btn { width: 110px; height: 110px; font-size: 48px; }
  body.player.online .odd-cell { font-size: 28px; padding: 6px 0; }
  body.player.online .key { padding: 8px 0; font-size: 24px; }
  body.player.online .arrow-pad { grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); }
}

/* Zvuk pauziran (npr. posle poziva) — dodir ga vraća */
.sound-wake { position: fixed; left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 50; background: var(--hot, #e5395a); color: #fff; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 20px #0006; pointer-events: none; white-space: nowrap; }
.sound-wake[hidden] { display: none; }

/* ---------- ⚽ Penali ---------- */
.pen-duel { display: flex; gap: 18px; align-items: center; justify-content: center; font-size: 28px; flex-wrap: wrap; }
.pen-goal { position: relative; width: 560px; max-width: 90%; height: 220px; margin: 18px auto 10px; border: 10px solid #f4f4f4; border-bottom: 0; border-radius: 6px 6px 0 0; background: #1d6b3a; overflow: hidden; }
.pen-net { position: absolute; inset: 0; background-image: linear-gradient(#ffffff22 1px, transparent 1px), linear-gradient(90deg, #ffffff22 1px, transparent 1px); background-size: 22px 22px; }
.pen-keeper { position: absolute; left: 50%; bottom: 6px; font-size: 90px; transform: translateX(-50%); }
.pen-ball { position: absolute; left: 50%; bottom: -60px; font-size: 54px; transform: translateX(-50%); }
/* Otkrivanje: tabla se pravi nova, pa skok i šut idu kao animacija od sredine. */
.pen-keeper.dive-left { animation: dive-left .45s cubic-bezier(.2, .8, .3, 1) forwards; }
.pen-keeper.dive-right { animation: dive-right .45s cubic-bezier(.2, .8, .3, 1) forwards; }
.pen-keeper.dive-mid { animation: dive-mid .45s ease-out forwards; }
.pen-ball.shot-left { animation: shot-left .5s ease-out .1s forwards; }
.pen-ball.shot-mid { animation: shot-mid .5s ease-out .1s forwards; }
.pen-ball.shot-right { animation: shot-right .5s ease-out .1s forwards; }
@keyframes dive-left { to { left: 18%; transform: translateX(-50%) rotate(-55deg); } }
@keyframes dive-right { to { left: 82%; transform: translateX(-50%) rotate(55deg); } }
@keyframes dive-mid { to { transform: translateX(-50%) translateY(-30px); } }
@keyframes shot-left { to { left: 16%; bottom: 120px; } }
@keyframes shot-mid { to { left: 50%; bottom: 140px; } }
@keyframes shot-right { to { left: 84%; bottom: 120px; } }
.pen-verdict { font-size: clamp(40px, calc(7 * var(--vw1, 1vw)), 84px); margin: 6px 0; }
.pen-verdict.goal { color: #3ee07a; }
.pen-verdict.save { color: #ffd166; }
.pen-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.pen-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 0; border-radius: 18px; border: 0; background: var(--card); color: var(--text); font: 800 16px var(--font); cursor: pointer; }
.pen-btn span { font-size: 42px; }
.pen-btn:active { transform: scale(.95); }
.pen-phone.role-shoot { background: #14361f; }
.pen-phone.role-keep { background: #3a2a0c; }

/* Instalacija i privatnost na početnoj */
.install-btn { margin-top: 14px; font-weight: 800; }
.install-btn[hidden] { display: none; }
.install-ios { margin: 12px 0 0; }
.privacy-link { display: inline-block; margin-top: 18px; opacity: .7; }
.lang-pick { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.lang-btn { background: none; border: 2px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 12px; font: 700 14px var(--font); cursor: pointer; }
.lang-btn.on { border-color: var(--accent); color: var(--text); }

/* 📖 Kako se igra */
.about-link { display: inline-block; margin-top: 18px; margin-right: 14px; opacity: .85; }
.about { text-align: left; width: 100%; max-width: 560px; margin: 0 auto; }
.about h2 { font-size: 22px; margin: 18px 0 8px; }
.about-steps { padding-left: 22px; margin: 0; display: grid; gap: 8px; color: var(--text); }
.about-steps li { line-height: 1.45; }
.about-games { display: grid; gap: 8px; }
.about-game { background: var(--card); border-radius: 14px; padding: 10px 14px; }
.about-game summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.about-game summary::-webkit-details-marker { display: none; }
.about-game summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.about-game[open] summary::after { content: '▴'; }
.about-emoji { font-size: 22px; }
.about-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.about-game p { margin: 8px 0 2px; color: var(--muted); line-height: 1.45; }

/* ==========================================================================
   ✨ ŽIVOST: animacije, prelazi i „sočan“ odziv
   --------------------------------------------------------------------------
   • Glavni ekran (.host) se menja „morph“-om: element živi dok mu se ne promeni
     oznaka/ključ, pa ulazna animacija krene jednom. Svaki korak igre je nova
     .stage (data-key), pa ulazne animacije kreću pri svakom koraku.
   • Telefon (.player) se crta ispočetka pri svakom stanju. Zato animacije tamo
     kasne za --t / --ft / --since (negativno vreme od početka ekrana / stanja):
     nov element nastavlja tamo gde je stari stao, i ništa ne treperi.
   • Samo transform i opacity. Dugmad koja se klikću nemaju beskonačne animacije
     koje im menjaju veličinu (sjaj ide preko pseudo-elementa).
   • prefers-reduced-motion gasi sve (pravilo gore), zato je mirno stanje uvek
     vidljivo i upotrebljivo bez animacije.
   ========================================================================== */

.stage { display: contents; }

@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes emoji-in { from { transform: translateY(-36px) scale(.3) rotate(-25deg); opacity: 0; } }
@keyframes title-in { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }
@keyframes pts-pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.35) rotate(6deg); opacity: 1; } }
@keyframes floaty { 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes wrong { 15% { transform: translateX(-8px) rotate(-8deg); } 35% { transform: translateX(8px) rotate(8deg); } 55% { transform: translateX(-6px) rotate(-5deg); } 75% { transform: translateX(4px) rotate(3deg); } }
@keyframes soft-pop { 40% { transform: scale(1.05); } }
@keyframes medal-bob { 50% { transform: translateY(-8px) rotate(-5deg); } }
@keyframes ghost-pulse { 50% { opacity: .95; transform: scale(1.15); } }
@keyframes nudge-x { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes quake { 10% { transform: translate(-10px, 6px); } 25% { transform: translate(9px, -7px); } 40% { transform: translate(-7px, -4px); } 55% { transform: translate(6px, 5px); } 70% { transform: translate(-4px, 2px); } 85% { transform: translate(2px, -2px); } }
@keyframes flash-fade { from { opacity: .55; } to { opacity: 0; } }
@keyframes shine { from { transform: translateX(-130%) skewX(-20deg); } 35%, to { transform: translateX(330%) skewX(-20deg); } }
@keyframes bounce-soft { 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }

/* ---------- dodir: talas na mestu dodira ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.tap-ripple {
  position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
  border: 3px solid #ffffffcc; background: #ffffff26; opacity: 0;
  animation: ripple .45s var(--ease-out);
}
@keyframes ripple { from { transform: scale(.15); opacity: .9; } to { transform: scale(1); opacity: 0; } }

/* ---------- dugmad i sve što se pritiska ---------- */
.choice, .throw-target, .option, .key, .odd-cell, .arrow-btn, .rps-btn, .pen-btn, .sym-btn, .game-chip, .chip-btn,
.color-btn, .power, .lang-btn, .mode-card, .icon-btn, .game-card, .wire, .pump-btn, .tap-bomb, .oar, .mole-hole, .avatar-pick, .swatch, .skip-btn {
  transition: transform .2s var(--spring), background .15s, border-color .15s, opacity .15s;
}
.choice:active, .throw-target:active, .option:active, .key:active, .odd-cell:active, .arrow-btn:active, .rps-btn:active, .sym-btn:active,
.game-chip:active, .chip-btn:active, .color-btn:active, .power:active, .lang-btn:active, .mode-card:active, .icon-btn:active, .game-card:active, .skip-btn:active {
  transform: scale(.94); transition-duration: .05s;
}
.avatar-pick:active { transform: scale(.9); transition-duration: .05s; }
.avatar-pick.selected { animation: bounce-soft .35s var(--ease-out); }
.phone-tiles .tile { transition: transform .15s var(--spring), opacity .15s; }
.phone-tiles .tile:not(.used):active { transform: scale(.9); }
/* Sjaj koji pređe preko glavnog dugmeta — „pritisni me“. Ne menja veličinu dugmeta. */
.home-btn.primary, .start-btn, .ready-btn { position: relative; overflow: hidden; }
.home-btn.primary::after, .start-btn:not(:disabled)::after, .ready-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(90deg, transparent, #ffffff8c, transparent);
  transform: translateX(-130%) skewX(-20deg); pointer-events: none;
  animation: shine 2.8s ease-in-out calc(var(--t, 0ms) + 900ms) infinite;
}

/* ---------- početna ---------- */
.home-deco { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.home-deco i {
  position: absolute; font-style: normal; font-size: clamp(34px, calc(7 * var(--vw1, 1vw)), 64px); opacity: .16;
  left: 6%; top: 7%;
  animation: deco-float calc(7s + var(--i) * .9s) ease-in-out calc(var(--i) * -1.3s) infinite;
}
.home-deco i:nth-child(2) { left: 80%; top: 5%; }
.home-deco i:nth-child(3) { left: 3%; top: 42%; }
.home-deco i:nth-child(4) { left: 85%; top: 36%; }
.home-deco i:nth-child(5) { left: 9%; top: 78%; }
.home-deco i:nth-child(6) { left: 79%; top: 74%; }
.home-deco i:nth-child(7) { left: 44%; top: 89%; }
.home-deco i:nth-child(8) { left: 47%; top: 1%; }
@keyframes deco-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-26px) rotate(10deg); } }
body:not(.home) .home-deco { display: none; }
.home-card { position: relative; z-index: 1; }
.home-card.first .logo { animation: logo-drop .75s var(--spring) backwards; }
@keyframes logo-drop { from { transform: translateY(-70px) rotate(-14deg) scale(.5); opacity: 0; } }
.logo span { display: inline-block; transform-origin: 50% 85%; animation: logo-bang 3.2s ease-in-out 1s infinite; }
@keyframes logo-bang { 0%, 76%, 100% { transform: none; } 82% { transform: rotate(16deg) scale(1.3); } 88% { transform: rotate(-10deg) scale(1.1); } 94% { transform: rotate(5deg); } }
.home-card > :not(.logo) { animation: rise .4s var(--ease-out) backwards; }
.home-card.first > :not(.logo) { animation-delay: .25s; }
.home-actions .home-btn { animation: title-in .45s var(--spring) backwards; }
.home-card.first .home-actions .home-btn { animation-delay: .35s; }
.home-card.first .home-actions .home-btn + .home-btn { animation-delay: .45s; }
.home-actions .home-btn + .home-btn { animation-delay: .08s; }
.mode-card { animation: rise .4s var(--ease-out) backwards; }
.mode-card + .mode-card { animation-delay: .09s; }
.mode-card .mode-emoji { display: inline-block; animation: emoji-in .5s var(--spring) .12s backwards; }
.mode-card + .mode-card .mode-emoji { animation-delay: .2s; }
.mode-card .badge { animation: pts-pop .45s var(--spring) .35s backwards; }
.lang-btn.on { animation: bounce-soft .35s var(--ease-out); }
.about-game[open] p { animation: rise .25s var(--ease-out); }
.join-code .error { animation: nudge-x .4s; }

/* ---------- glavni ekran: soba ---------- */
.host .room-code span { animation: tile-drop .5s var(--spring) backwards; }
.host .room-code span:nth-child(2) { animation-delay: .08s; }
.host .room-code span:nth-child(3) { animation-delay: .16s; }
.host .room-code span:nth-child(4) { animation-delay: .24s; }
@keyframes tile-drop { from { transform: translateY(-50px) rotate(-20deg) scale(.6); opacity: 0; } }
.host .qr { animation: title-in .5s var(--spring) .3s backwards; }
.host .player-chip { transition: transform .25s var(--spring), background .2s, border-color .2s, opacity .3s; }
.host .player-chip.ghost .avatar { animation: ghost-pulse 1.8s ease-in-out infinite; }
.host .player-chip.ghost:nth-child(even) .avatar { animation-delay: -.9s; }
.host .game-cards.compact .game-card { animation: rise .35s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 16ms); }
.host .game-card .check { display: inline-block; transition: transform .2s var(--spring); }
.host .game-card.selected .check { transform: scale(1.15); }
.host .lobby-players h2 small { display: inline-block; }

/* ---------- glavni ekran: „Spreman“ ---------- */
.ready-strip, .skip-tv { z-index: 4; }
.ready-strip { animation: strip-up .45s var(--spring) backwards; }
@keyframes strip-up { from { transform: translate(-50%, 90px); opacity: 0; } }
.ready-chips span { display: inline-block; transition: opacity .2s; }
.ready-chips span.ok { animation: bounce-soft .4s var(--ease-out); }
.ready-strip.go { animation: strip-go .5s var(--spring), strip-away .45s ease-in 2.1s forwards; }
@keyframes strip-go { from { transform: translateX(-50%) scale(.6); } 50% { transform: translateX(-50%) scale(1.2) rotate(-2deg); } }
@keyframes strip-away { to { transform: translate(-50%, 120px); opacity: 0; } }

/* ---------- glavni ekran: uvod u igru ---------- */
.host .game-intro .huge { animation: emoji-in .7s var(--spring) backwards, floaty 3.2s ease-in-out .7s infinite; }
.host .game-intro h1 { text-shadow: 4px 4px 0 var(--hot); animation: title-in .5s var(--spring) .12s backwards; }
.host .game-intro .rules { animation: rise .45s var(--ease-out) .26s backwards; }
.host .game-intro .muted { animation: rise .45s var(--ease-out) .4s backwards; }

/* ---------- glavni ekran: zajednički delovi igara ---------- */
.host .result-row { position: relative; overflow: hidden; }
.host .result-row .pts { animation: pts-pop .5s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 120ms + 380ms); }
.host .result-row:first-child:not(.is-out)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 22%;
  background: linear-gradient(90deg, transparent, #ffffff40, transparent);
  transform: translateX(-130%) skewX(-20deg); pointer-events: none;
  animation: row-shine 1.1s ease-out .55s;
}
@keyframes row-shine { to { transform: translateX(560%) skewX(-20deg); } }
.host .result-row .avatar { animation: bounce-soft .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 120ms + 250ms); }
.host .pop-title { animation: boom .6s var(--spring) backwards; }
.host .tag-pill { animation: pts-pop .45s var(--spring) .7s backwards; }
.host .scoreboard .score-chip { animation: pop .35s var(--spring) backwards; animation-delay: calc(.45s + var(--n, 0) * 60ms); }
.host .score-chip:nth-child(2) { --n: 1; } .host .score-chip:nth-child(3) { --n: 2; } .host .score-chip:nth-child(4) { --n: 3; }
.host .score-chip:nth-child(5) { --n: 4; } .host .score-chip:nth-child(6) { --n: 5; } .host .score-chip:nth-child(7) { --n: 6; }
.host .score-chip:nth-child(8) { --n: 7; } .host .score-chip:nth-child(9) { --n: 8; } .host .score-chip:nth-child(10) { --n: 9; }
.host .player-chip.cashed { animation: bounce-soft .4s var(--ease-out); }
.host .player-row .player-chip.away { transform: scale(.94); }
.host .guess-feed li { animation: slide .25s var(--ease-out); }
.host .sab-unmask, .host .sheep-title, .host .who-title, .host .draw-side h1.accent { animation: boom .7s var(--spring) backwards; }
.host .sheep-title, .host .who-title { animation-delay: .5s; }
.host .answer-big { animation: title-in .5s var(--spring) backwards; }

/* pitanja: pitanje uleti kad se prvi put pojavi (ne pri svakom koraku iste runde) */
.stage[data-step="write"] .big-question, .stage[data-step="guess"] .big-question,
.stage[data-game="who"][data-step="vote"] .big-question, .stage[data-step="talk"] .big-question { animation: question-in .5s var(--ease-out) backwards; }
@keyframes question-in { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.host .answer-list li { animation: rise .4s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 80ms); }
.host .answer-list li:nth-child(2) { --n: 1; } .host .answer-list li:nth-child(3) { --n: 2; } .host .answer-list li:nth-child(4) { --n: 3; }
.host .answer-list li:nth-child(5) { --n: 4; } .host .answer-list li:nth-child(6) { --n: 5; } .host .answer-list li:nth-child(7) { --n: 6; }
.host .answer-list li:nth-child(8) { --n: 7; } .host .answer-list li:nth-child(9) { --n: 8; } .host .answer-list li:nth-child(10) { --n: 9; }
.host .answer-list.reveal li.truth { animation: rise .4s var(--ease-out) backwards, soft-pop .6s var(--ease-out) .9s; animation-delay: calc(var(--n, 0) * 80ms), .9s; }
.host .bar-row.win .avatar { display: inline-block; animation: bounce-soft .6s var(--ease-out) 1.1s 2; }
.host .group.top .group-who, .host .group.sheep .group-who { animation: fade-in .4s backwards; animation-delay: calc(var(--i, 0) * 140ms + 300ms); }

/* slova i simboli */
.host .letter-row .tile { animation: tile-flip .4s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 45ms); }
@keyframes tile-flip { from { transform: translateY(-18px) rotateX(90deg); opacity: 0; } }
.host .letter-row .tile:nth-child(2), .host .sym-row.big .sym:nth-child(2) { --n: 1; } .host .letter-row .tile:nth-child(3), .host .sym-row.big .sym:nth-child(3) { --n: 2; }
.host .letter-row .tile:nth-child(4), .host .sym-row.big .sym:nth-child(4) { --n: 3; } .host .letter-row .tile:nth-child(5), .host .sym-row.big .sym:nth-child(5) { --n: 4; }
.host .letter-row .tile:nth-child(6), .host .sym-row.big .sym:nth-child(6) { --n: 5; } .host .letter-row .tile:nth-child(7), .host .sym-row.big .sym:nth-child(7) { --n: 6; }
.host .letter-row .tile:nth-child(8), .host .sym-row.big .sym:nth-child(8) { --n: 7; } .host .letter-row .tile:nth-child(9), .host .sym-row.big .sym:nth-child(9) { --n: 8; }
.host .letter-row .tile:nth-child(10), .host .sym-row.big .sym:nth-child(10) { --n: 9; } .host .letter-row .tile:nth-child(11) { --n: 10; } .host .letter-row .tile:nth-child(12) { --n: 11; }
.host .sym-row.big .sym { animation-delay: calc(var(--n, 0) * 70ms); }

/* ---------- glavni ekran: pojedine igre ---------- */
/* refleks */
.host .signal.signal-wait { animation: breathe 1.5s ease-in-out infinite; }
.host .signal.signal-fake { animation: signal-punch .2s var(--ease-out); }
@keyframes signal-punch { from { transform: scale(1.06); } }

/* bomba */
.host .bomb-holder { animation: holder-pop .4s var(--spring); }
@keyframes holder-pop { from { transform: scale(1.35); color: var(--hot); } }
.host .bomb-live::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 35%, #ff2a2a66 100%);
}
.host .bomb-live.heat-1::before { opacity: .35; }
.host .bomb-live.heat-2::before { animation: alarm .7s ease-in-out infinite; }
.host .bomb-live.heat-3::before { animation: alarm .3s ease-in-out infinite; }
@keyframes alarm { from, to { opacity: .35; } 50% { opacity: 1; } }
.host .bomb-boom { animation: quake .55s linear; }
.host .bomb-boom h1 { animation: title-in .5s var(--spring) .15s backwards; }
.host .bomb-boom .rules, .host .bomb-boom > .muted { animation: rise .4s var(--ease-out) .4s backwards; }

/* kukavica */
.stage[data-game="chicken"][data-step="pop"] .game-result { animation: quake .45s linear; }

/* unutrašnji sat */
.host .clock-goal { animation: title-in .5s var(--spring) backwards; }
.host .timeline .target-line { transform-origin: 50% 100%; animation: line-grow .4s var(--ease-out) backwards; }
@keyframes line-grow { from { transform: scaleY(0); } }
.host .timeline .mark { animation-delay: calc(.3s + var(--row, 0) * 120ms); }
.host .timeline .mark.best .avatar { animation: bounce-soft .6s var(--ease-out) 1s 2; }

/* dvoboj */
.stage[data-step="pair"] .fighter.left { animation: from-left .5s var(--spring) backwards; }
.stage[data-step="pair"] .fighter.right { animation: from-right .5s var(--spring) backwards; }
@keyframes from-left { from { transform: translateX(-90px) rotate(-8deg); opacity: 0; } }
@keyframes from-right { from { transform: translateX(90px) rotate(8deg); opacity: 0; } }
@keyframes team-in { from { transform: translateY(50px) scale(.9); opacity: 0; } }
.stage[data-step="pair"] .vs { animation: vs-slam .45s var(--spring) .3s backwards; }
@keyframes vs-slam { from { transform: rotate(-8deg) scale(3.2); opacity: 0; } }
.host .fighter .ready.yes { animation: bounce-soft .4s var(--ease-out); }
.host .fighter.won { animation: fighter-win .6s var(--spring); }
.host .fighter.lost { animation: fighter-lose .5s ease-in; }
@keyframes fighter-win { from { transform: none; } 50% { transform: scale(1.14); } }
@keyframes fighter-lose { from { transform: none; opacity: 1; } }
.host .fighter .crown { animation: emoji-in .6s var(--spring) .25s backwards; }
.stage[data-step="result"] .duel-signal { animation: boom .5s var(--spring); }
.host .duel-line { animation: rise .45s var(--ease-out) .3s backwards; }

/* statua */
.stage[data-game="statue"][data-step="ready"] .huge { animation: emoji-in .6s var(--spring) backwards; }
.host .statue-card { transition: transform .3s var(--spring), opacity .3s; }
.host .statue-card.out { animation: spill .6s var(--ease-out); }
@keyframes spill { from { transform: none; opacity: 1; } 25% { transform: rotate(10deg) translateY(-6px); opacity: 1; } 55% { transform: rotate(-12deg); } }

/* konopac */
.stage[data-step="teams"] .rope-team { animation: team-in .5s var(--ease-out) backwards; }
.stage[data-step="teams"] .rope-team.blue { animation-delay: .12s; }
.host .rope-team.won { animation: soft-pop .7s var(--ease-out) .2s; }
.stage[data-step="result"] .rope-field .knot { animation: knot-win .6s var(--spring); }
@keyframes knot-win { 40% { transform: translate(-50%, -50%) scale(1.5); } }

/* penali */
.host .pen-verdict { animation: boom .5s var(--spring) .5s backwards; }
.host .pen-goal.scored .pen-net { animation: net-bulge .45s ease-out .55s; }
@keyframes net-bulge { 40% { transform: scale(1.06, 1.1); } }
.host .pen-goal.saved .pen-ball { animation-timing-function: ease-in; }

/* zaustavi u okviru, šibice, karte */
.host .stop-pin { animation: drop-pin .4s var(--spring) backwards; }
@keyframes drop-pin { from { transform: translate(-50%, -28px); opacity: 0; } }
.host .stick-col.long .stick { transform-origin: 50% 100%; animation: bounce-soft .6s var(--ease-out) 1s; }
.host .rps-title { animation: rps-shake .5s ease-in-out infinite; }
@keyframes rps-shake { 50% { transform: translateY(-14px); } }
.host .rps-card.win .rps-hand { animation: bounce-soft .6s var(--ease-out) 1s 2; }

/* ---------- glavni ekran: kraj igre i kraj žurke ---------- */
.host .final h1 { animation: title-in .5s var(--spring) backwards; }
.host .final > .muted { animation: fade-in .5s .2s backwards; }
.podium-spot .block { transform-origin: 50% 100%; animation: block-rise .55s var(--ease-out) var(--rise) backwards; }
@keyframes block-rise { from { transform: scaleY(0); } }
.podium-spot .avatar, .podium-spot .name, .podium-spot .score { animation: podium-drop .5s var(--spring) backwards; animation-delay: calc(var(--rise) + .35s); }
.podium-spot .name { animation-delay: calc(var(--rise) + .42s); }
.podium-spot .score { animation-delay: calc(var(--rise) + .5s); }
@keyframes podium-drop { from { transform: translateY(-40px) scale(.4); opacity: 0; } }
.podium-spot .avatar { position: relative; display: inline-block; }
.podium-spot.place-1 .avatar { animation: podium-drop .5s var(--spring) backwards, winner-bob 1.5s ease-in-out infinite; animation-delay: calc(var(--rise) + .35s), calc(var(--rise) + .9s); }
@keyframes winner-bob { 50% { transform: translateY(-10px) rotate(-6deg) scale(1.08); } }
.podium-spot .rays {
  position: absolute; left: 50%; top: 50%; width: 230px; height: 230px; margin: -115px 0 0 -115px; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(#ffcf3f55 0 12deg, transparent 12deg 24deg);
  -webkit-mask-image: radial-gradient(circle, #000 22%, transparent 68%); mask-image: radial-gradient(circle, #000 22%, transparent 68%);
  animation: spin 16s linear infinite;
}
.host .gain { display: inline-block; animation: pts-pop .5s var(--spring) backwards; animation-delay: calc(var(--rise, 0s) + 1s); }
.host .rest li { animation: rise .4s var(--ease-out) backwards; animation-delay: calc(1.1s + var(--i, 0) * 90ms); }
.host .totals { animation: rise .5s var(--ease-out) .25s backwards; }
.host .totals li { animation: slide .35s var(--ease-out) backwards; animation-delay: calc(.45s + var(--i, 0) * 70ms); }
.host .next-up { animation: rise .4s var(--ease-out) .5s backwards; }
.host .final .actions { animation: rise .4s var(--ease-out) .6s backwards; }

/* konfete (čist CSS; komadići su nevidljivi pre i posle pada) */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.confetti i {
  position: absolute; top: -24px; left: var(--x); width: 12px; height: 12px; border-radius: 2px;
  background: var(--c); opacity: 0;
  animation: confetti-fall var(--dur) cubic-bezier(.25, .5, .6, 1) calc(var(--d) + var(--t, 0ms) + 300ms) 2;
}
.confetti i.dot { border-radius: 50%; width: 10px; height: 10px; }
.confetti i.strip { width: 7px; height: 18px; }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--dx), calc(105 * var(--vh1, 1vh)), 0) rotate(var(--spin)); }
}

/* ---------- točak kazne ---------- */
.host .wheel-stage h1 { animation: title-in .5s var(--spring) backwards; }
.host .wheel-wrap { animation: wheel-in .6s var(--spring) backwards; }
@keyframes wheel-in { from { transform: scale(.4) rotate(-40deg); opacity: 0; } }
.wheel-pointer { transform-origin: 50% 10%; }
.wheel-stage.spinning .wheel-pointer { animation: pointer-tick .16s linear infinite; }
.wheel-stage.done .wheel-pointer { animation: pointer-settle .5s var(--spring); }
@keyframes pointer-tick { 0%, 100% { transform: translateX(-50%) rotate(0); } 50% { transform: translateX(-50%) rotate(-16deg); } }
@keyframes pointer-settle { from { transform: translateX(-50%) rotate(-20deg) scale(1.3); } }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 1;
  display: grid; place-items: center; border-radius: 50%; background: #fff; border: 4px solid var(--bg);
  font-size: clamp(18px, calc(3.2 * var(--vw1, 1vw)), 34px); line-height: 1; box-shadow: 0 4px 0 #0004;
}
.wheel-stage.spinning .wheel-result { animation: breathe 1s ease-in-out infinite; }
.host .wheel-actions:not(.hidden) { animation: rise .4s var(--ease-out) .5s backwards; }

/* ---------- telefon: ekrani van igre ---------- */
.player .center-card > *, .player .join > * {
  animation: rise .4s var(--ease-out) backwards;
  animation-delay: calc(var(--t, 0ms) + var(--k, 0) * 55ms);
}
.player .center-card > :nth-child(2), .player .join > :nth-child(2), .player .tap-zone > :nth-child(2) { --k: 1; }
.player .center-card > :nth-child(3), .player .join > :nth-child(3), .player .tap-zone > :nth-child(3) { --k: 2; }
.player .center-card > :nth-child(4), .player .join > :nth-child(4), .player .tap-zone > :nth-child(4) { --k: 3; }
.player .center-card > :nth-child(5), .player .join > :nth-child(5), .player .tap-zone > :nth-child(5) { --k: 4; }
.player .center-card > :nth-child(6), .player .join > :nth-child(6), .player .tap-zone > :nth-child(6) { --k: 5; }
.player .center-card > :nth-child(n+7), .player .join > :nth-child(n+7), .player .tap-zone > :nth-child(n+7) { --k: 6; }
.player .center-card > .confetti { animation: none; }
.player .center-card > .huge { animation-name: emoji-in; animation-duration: .6s; animation-timing-function: var(--spring); }
.player .me-avatar { display: inline-block; animation: emoji-in .6s var(--spring) var(--t, 0ms) backwards; }
.player .who-chip { animation: pop .4s var(--spring) var(--since, 0ms) backwards; }
.player .final-phone.winner > .huge { animation: emoji-in .6s var(--spring) var(--t, 0ms) backwards, medal-bob 1.5s ease-in-out calc(var(--t, 0ms) + 700ms) infinite; }
.player .final-phone .gain { display: inline-block; animation: pts-pop .5s var(--spring) calc(var(--t, 0ms) + 600ms) backwards; }
.player .spin-emoji { animation-delay: var(--t, 0ms); }
.player .penalty-text { animation: boom .6s var(--spring) calc(var(--t, 0ms) + 150ms) backwards; }
.player .wheel-phone.victim .wheel-face { animation: wrong .5s calc(var(--t, 0ms) + 100ms) backwards; }
.player .toast { animation: rise .3s var(--ease-out); }
.player .join > .error { animation: nudge-x .4s; }

/* „Spreman“ traka na telefonu */
.player .ready-bar { animation: rise .4s var(--ease-out) calc(var(--t, 0ms) + 250ms) backwards; }
.player .ready-ok { animation: soft-pop .4s var(--ease-out) var(--since, 0ms) backwards; }
.board-wrap { animation: board-in .45s var(--ease-out) backwards; }
@keyframes board-in { from { transform: translate(-50%, -100%); } }
.player .skip-confirm { animation: rise .2s var(--ease-out); }

/* ---------- telefon: u igri ---------- */
/* Ulaz ekrana kad se promeni korak ili stanje (--ft). Samo „mirni“ ekrani —
   tamo gde se meri brzina (signal, sat, tapkanje) sve je vidljivo odmah. */
.player .tap-zone.intro > *, .player .tap-zone.result > *, .player .tap-zone.done > *, .player .tap-zone.talk-phone > *,
.player .tap-zone.bomb-watch > *, .player .tap-zone.pen-phone > *, .player .tap-zone.words-phone > *,
.player .tap-zone.statue-phone.ready > *, .player .tap-zone.clock-phone.ready > *, .player .tap-zone.rope-phone.ready > *,
.player .tap-zone.sab-phone.secret > *, .player .tap-zone.duel-phone:not(.standoff) > * {
  animation: rise .35s var(--ease-out) backwards;
  animation-delay: calc(var(--ft, 0ms) + var(--k, 0) * 50ms);
}
.player .tap-zone.intro > .huge, .player .tap-zone.result > .huge, .player .tap-zone.done > .huge, .player .tap-zone.talk-phone > .huge,
.player .tap-zone.bomb-watch > .huge, .player .tap-zone.sab-phone.secret > .huge, .player .tap-zone.duel-phone:not(.standoff) > .huge {
  animation-name: emoji-in; animation-duration: .55s; animation-timing-function: var(--spring);
}
.player .tap-zone .word-timer { animation: none; }
.player .tap-zone.result .pts-big { animation: pts-pop .55s var(--spring) backwards; animation-delay: calc(var(--ft, 0ms) + 380ms); }
/* pogodak / promašaj: kratak blesak preko ekrana + emoji */
.player .tap-zone.done::after, .player .tap-zone.boom-me::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: 0;
  animation: flash-fade .5s ease-out var(--ft, 0ms) backwards;
}
.player .tap-zone.done.ok::after { background: var(--good); }
.player .tap-zone.done.out::after, .player .tap-zone.boom-me::after { background: var(--bad); }
.player .tap-zone.done.out > .huge, .player .tap-zone.boom-me > .huge { animation: wrong .5s var(--ft, 0ms) backwards; }
.player .tap-zone.done.ok > .huge { animation: pts-pop .5s var(--spring) var(--ft, 0ms) backwards; }

/* refleks i dvoboj: reč „udari“, čekanje diše */
.player .tap-zone.signal-go .tap-word, .player .tap-zone.signal-fake .tap-word { animation: word-punch .22s var(--spring) var(--ft, 0ms); }
@keyframes word-punch { from { transform: scale(.72); } }
.player .tap-zone.signal-wait .tap-word { animation: breathe 1.5s ease-in-out var(--t, 0ms) infinite; }

/* bomba */
.player .bomb-holder-phone.heat-2, .player .bomb-holder-phone.heat-3 { animation: none; }
.player .bomb-holder-phone::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; background: #ff2d2d; opacity: 0;
}
.player .bomb-holder-phone.heat-2::before { animation: alarm-soft .6s ease-in-out var(--t, 0ms) infinite; }
.player .bomb-holder-phone.heat-3::before { animation: alarm-soft .26s ease-in-out var(--t, 0ms) infinite; }
@keyframes alarm-soft { 50% { opacity: .28; } }
.player .bomb-holder-phone::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; background: var(--hot); opacity: 0;
  animation: flash-fade .45s ease-out var(--ft, 0ms) backwards;
}
.player .bomb-banner { animation: title-in .4s var(--spring) var(--ft, 0ms) backwards; }
.player .bomb-task > * { animation: task-in .2s var(--ease-out) var(--since, 0ms) backwards; }
@keyframes task-in { from { transform: scale(.88); opacity: 0; } }
.player .bomb-task > .huge.lock { animation: wrong .45s var(--since, 0ms) backwards; }
.player .bomb-task > .huge.fly { animation: fly-off .5s var(--ease-out) var(--since, 0ms) backwards; }
@keyframes fly-off { from { transform: translate(-70px, 60px) rotate(-25deg) scale(.5); opacity: 0; } }
.player .tap-bomb, .player .pump-btn { transition: transform .12s var(--spring); }
.player .code-digits b.done { animation: none; }

/* kukavica, sat: veliko dugme „diše“ (nije meta klika — ceo ekran je dugme) */
.player .cash-btn, .player .stop-btn { animation: big-btn-pulse 1.1s ease-in-out var(--t, 0ms) infinite; }
@keyframes big-btn-pulse { 50% { transform: scale(1.04); } }
.player .chicken-phone:active .cash-btn, .player .clock-phone:active .stop-btn { animation: none; }
.player .finger-dot { animation-delay: var(--t, 0ms); }

/* reči: odgovor na poslatu reč */
.player .word-feedback.ok { animation: soft-pop .4s var(--ease-out) var(--since, 0ms) backwards; }
.player .word-feedback.bad { animation: nudge-x .4s var(--since, 0ms) backwards; }
.player .word-now { transition: none; }

/* glasanje i izbor */
.player .secret-word { animation: title-in .45s var(--spring) var(--ft, 0ms) backwards; }
.player .freeze-overlay { animation: fade-in .2s; }
.player .voice-bar .toggle { transition: transform .2s var(--spring), background .15s, border-color .15s, opacity .15s; }
.player .voice-bar .toggle:active { transform: scale(.95); }

/* ---------- manje kretanja: krajnja stanja bez animacije ---------- */
@media (prefers-reduced-motion: reduce) {
  .pen-keeper.dive-left { left: 18%; transform: translateX(-50%) rotate(-55deg); }
  .pen-keeper.dive-right { left: 82%; transform: translateX(-50%) rotate(55deg); }
  .pen-ball.shot-left { left: 16%; bottom: 120px; }
  .pen-ball.shot-mid { left: 50%; bottom: 140px; }
  .pen-ball.shot-right { left: 84%; bottom: 120px; }
  .home-deco { display: none; }
}

/* Soba na laptopu/TV-u niske visine (npr. 1280×720): sve mora da stane bez skrolovanja. */
@media (max-height: 860px) and (min-width: 900px) {
  body.host .lobby { min-height: calc(calc(100 * var(--dvh1, 1dvh)) - 48px); }
  body.host #app { padding-top: 16px; padding-bottom: 16px; }
  .lobby-players h2 { font-size: 26px; margin: 0 0 8px; }
  .lobby-players h2 small { font-size: 16px; }
  .games-title { font-size: 20px; margin: 0 0 6px; }
  .player-grid { margin-bottom: 12px; gap: 8px; }
  .player-grid .player-chip { padding-top: 6px; padding-bottom: 6px; }
  .player-grid .player-chip .avatar { font-size: 26px; }
  .quick-picks { margin-bottom: 8px; }
  .quick-picks .btn { padding: 6px 14px; font-size: 15px; }
  .game-cards.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .game-cards.compact .game-card { padding: 6px 8px; gap: 6px; }
  .game-cards.compact .game-badge { font-size: 14px; line-height: 1.2; }
  .game-cards.compact .check { font-size: 16px; }
  .game-cards.compact .min { padding: 1px 6px; font-size: 11px; }
  .room-code span { width: 60px; height: 72px; font-size: 44px; }
  .qr { width: 170px; }
  .hint { margin-top: 8px; }
  .sound-line, .penalty-count { margin: 4px 0; }
}

/* Dok se čitaju pravila (traka „Spreman“ dole): tekst ne sme da ode ispod trake. */
#app:has(.ready-bar) .tap-zone { padding-bottom: 150px; justify-content: center; overflow-y: auto; }
body.player.online #app:has(.ready-bar) .tap-zone { padding-bottom: 130px; }
@media (max-height: 640px) {
  .ready-bar { padding-top: 8px; gap: 4px; }
  .ready-bar .btn.big { padding: 12px 20px; font-size: 20px; }
}

/* ---------- 🪑 Muzičke stolice ---------- */
.chairs-row { display: flex; gap: 18px; justify-content: center; margin: 10px 0 6px; font-size: 64px; }
.chair { display: inline-block; animation: chair-in .4s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes chair-in { from { transform: translateY(-30px) scale(.6); opacity: 0; } }
.chairs-cue { font-size: clamp(40px, calc(7 * var(--vw1, 1vw)), 84px); margin: 8px 0; }
.chairs-live.sit .chairs-cue { color: #3ee07a; animation: chairs-pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.chairs-live.fake .chairs-cue { color: var(--muted); }
@keyframes chairs-pop { from { transform: scale(.6); } }
.chairs-live.music .player-chip.dancing { animation: dance .6s ease-in-out infinite alternate; }
.chairs-live.music .player-chip.dancing:nth-child(2n) { animation-delay: -.3s; }
@keyframes dance { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-8px) rotate(4deg); } }
.chairs-verdict { font-size: clamp(30px, calc(5 * var(--vw1, 1vw)), 56px); margin: 10px 0; }
.chairs-out { margin-top: 10px; }
.chairs-phone { background: #1a1233; }
.chairs-phone.sit { background: #138a43; }
.chairs-phone.sit .tap-word { color: #fff; }
.chairs-phone.fake { background: #0c0818; }
.chairs-phone .dance { animation: dance .5s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .chairs-live .player-chip.dancing, .chairs-phone .dance, .chair { animation: none; } }

/* ---------- 🔫 Vodeni pištolj ---------- */
.squirt-gun { font-size: clamp(80px, calc(12 * var(--vw1, 1vw)), 150px); line-height: 1; transform: scaleX(-1); }
.squirt-live.splash .squirt-gun { animation: squirt-kick .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes squirt-kick { 30% { transform: scaleX(-1) rotate(-25deg) translateX(-20px); } }
.squirt-cyl { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.squirt-cyl .cham { width: 30px; height: 30px; border-radius: 50%; background: #2b2150; border: 3px solid #6a5aa8; }
.squirt-cyl .cham.used { background: #13101f; border-color: #3d3170; opacity: .6; }
.squirt-cyl .cham.wet { background: #3b82f6; border-color: #93c5fd; box-shadow: 0 0 18px #3b82f6aa; animation: chairs-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.squirt-verdict { font-size: clamp(36px, calc(6 * var(--vw1, 1vw)), 72px); color: #93c5fd; margin: 6px 0; }
.player-chip.wet { border-color: #3b82f6; background: #12305e; }
.squirt-phone { background: #14102a; gap: 6px; }
.squirt-phone.mine { background: #1d1544; }
.squirt-phone .squirt-cyl .cham { width: 24px; height: 24px; }
.squirt-buttons { display: grid; gap: 10px; width: 100%; max-width: 420px; margin-top: 10px; }
.squirt-buttons .btn[disabled] { opacity: .4; }

/* Tabla na telefonu (online): sitan tekst mora da ostane čitljiv posle umanjenja. */
body.board-body .rules { font-size: 23px; line-height: 1.35; }
body.board-body .muted { font-size: 19px; }
body.board-body .round-label { font-size: 17px; }
body.board-body .player-chip { padding: 8px 14px; }
body.board-body .player-chip .name { font-size: 19px; }
body.board-body .player-chip .avatar { font-size: 28px; }
body.board-body .ready-strip { font-size: 18px; }
body.board-body .game-intro .huge { font-size: 84px; }
body.board-body .game-intro h1 { font-size: 52px; margin: 0 0 6px; }

/* =====================================================================================
   TEMA „STRIP“ — plava sa rasterom i zracima, debele crne konture, tvrde senke,
   žuta i crvena. Kao strip: POW!
   ===================================================================================== */
:root {
  --ink: #111118;
  --bg: #1746d1;
  --bg-2: #0f2f96;
  --card: #ffffff;
  --line: #111118;
  --text: #ffffff;
  --muted: #d7e2ff;
  --accent: #ffe600;
  --accent-ink: #111118;
  --hot: #ff2d2d;
  --good: #3dff9a;
  --bad: #ffd0d0;
  --edge: #111118;
  --drop: #111118;
  color-scheme: dark;
}
html, body {
  background: radial-gradient(#ffffff24 3px, transparent 3.6px) 0 0 / 18px 18px, var(--bg);
  background-attachment: fixed;
  color: var(--text);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 40%, #ffffff12 0 8deg, transparent 8deg 16deg);
}

/* --- dugmad --- */
.btn {
  border: 4px solid var(--edge); border-radius: 14px; font-weight: 900;
  background: #fff; color: var(--ink); box-shadow: 5px 5px 0 var(--drop);
  transition: transform .07s, box-shadow .07s, background .15s;
}
.btn:hover { background: #fff8c2; }
.btn:not(:disabled):active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--drop); }
.btn.primary { background: var(--hot); color: #fff; border-color: var(--edge); }
.btn.primary:hover { background: #ff4b4b; }
.btn.big { box-shadow: 7px 7px 0 var(--drop); }
.btn.big:not(:disabled):active { transform: translate(6px, 6px); box-shadow: 1px 1px 0 var(--drop); }
.link { color: #fff; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
input { background: #fff; color: var(--ink); border: 4px solid var(--edge); border-radius: 14px; box-shadow: 5px 5px 0 var(--drop); }
input::placeholder { color: #9aa0b5; }

/* --- naslovi --- */
.logo, .game-intro h1 {
  color: var(--accent); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink); text-transform: uppercase; transform: rotate(-4deg);
}
.logo span { color: #fff; }
.tagline { display: inline-block; background: #fff; color: var(--ink); font-weight: 900; border: 3px solid var(--edge); border-radius: 50% 50% 50% 12% / 60% 60% 60% 30%; padding: 10px 18px; box-shadow: 4px 4px 0 var(--drop); }
.huge { filter: drop-shadow(5px 5px 0 var(--ink)); }
/* velika slova samo na „plakatnim“ naslovima — imena igrača i pitanja ostaju kako su napisana */
.pen-verdict, .chairs-cue, .squirt-verdict, .bomb-banner, .home-btn { text-transform: uppercase; }
.final h1, .talk-live > h1, .wheel-stage h1, .big-question, .tap-zone h2, .center-card h2 {
  color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink);
}
.rules b { background: var(--accent); color: var(--ink); border-radius: 6px; padding: 0 6px; border: 2px solid var(--edge); }
.round-label { background: var(--ink); color: var(--accent) !important; padding: 5px 14px; border-radius: 8px; letter-spacing: 1.5px; width: fit-content; margin-left: auto; margin-right: auto; transform: rotate(-2deg); }
.tap-zone .round-label { left: 0; right: 0; margin: 0 auto; white-space: nowrap; }
.rps-phone .round-label { position: static; margin: 0 auto; }
.pts.plus, .gain { color: #0aa85c; } .pts.minus { color: #e01b1b; }
.pts-big { color: var(--accent); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.error { background: #fff; color: #d01515; border: 3px solid var(--edge); border-radius: 10px; padding: 6px 10px; }

/* --- kartice: bele table sa crnom konturom (unutra crn tekst) --- */
.player-chip, .lobby-box, .invite, .voice-bar, .mode-card, .about-game, .game-card, .totals, .next-up,
.ready-strip, .guess-feed li, .result-row, .answer-card, .skip-confirm, .rest li, .penalty-text, .wheel-result, .wheel-result.show,
.who-chip, .score-chip, .voice-people span, .wheel-phone.victim {
  --text: #111118; --muted: #50556b; --accent: #e01b1b;
  background: #fff; color: #111118; border: 4px solid var(--edge); box-shadow: 5px 5px 0 var(--drop);
}
.who-chip, .score-chip, .voice-people span, .rest li { border-width: 3px; box-shadow: 3px 3px 0 var(--drop); }
.lobby-box, .invite, .voice-bar, .mode-card, .about-game, .totals, .next-up { border-radius: 16px; }
.invite-code { color: #111118; -webkit-text-stroke: 0; text-shadow: none; }
.lobby-box h2, .totals h2, .next-up b, .about-game b { -webkit-text-stroke: 0; text-shadow: none; color: #111118; }
.player-chip.ghost { background: #ffffff33; border-style: dashed; box-shadow: none; color: #fff; --muted: #fff; }
.player-chip.cashed { background: #b9ffd9; }
.player-chip.has-bomb { background: var(--accent); }
.player-chip.wet { background: #bfe3ff; }
.result-row:first-child:not(.is-out) { background: var(--accent); border: 4px solid var(--edge); }
.host .result-row:first-child:not(.is-out)::after { display: none; }
.who-chip.me { background: var(--accent); }
.who-chip.talking { outline: 0; background: #9dffc8; }
.game-cards.compact .game-card { opacity: .55; box-shadow: 3px 3px 0 var(--drop); border-width: 3px; }
.game-cards.compact .game-card.selected { opacity: 1; background: #fff; border-color: var(--edge); }
.game-card .check { color: #e01b1b; } .game-card .game-badge { color: #111118; }
.game-card .min { background: #111118; color: #fff; }
.mode-card.recommended { background: #fff; border-color: var(--edge); }
.badge { background: var(--hot); color: #fff; border: 3px solid var(--edge); }
.toggle { background: #fff !important; border: 3px solid var(--edge) !important; color: #111118 !important; opacity: 1 !important; box-shadow: 3px 3px 0 var(--drop); }
.toggle.on { background: #5dffb0 !important; }
.lang-btn, .chip-btn, .game-chip { background: #fff; border: 3px solid var(--edge); color: #111118; box-shadow: 3px 3px 0 var(--drop); }
.lang-btn.on, .game-chip.on { background: var(--accent); color: #111118; border-color: var(--edge); }
.avatar-pick { background: #fff; border: 4px solid var(--edge); box-shadow: 4px 4px 0 var(--drop); }
.avatar-pick.selected { background: var(--accent); transform: translate(-2px, -2px) rotate(-5deg); }
.sound-hint { background: var(--ink); color: #fff; }
.sound-wake { background: var(--accent); color: var(--ink); border: 3px solid var(--edge); box-shadow: 4px 4px 0 var(--drop); }
.skip-btn { background: #fff; border: 3px solid var(--edge); color: #111118; box-shadow: 3px 3px 0 var(--drop); opacity: 1; }
.home-float span { opacity: .5 !important; filter: drop-shadow(3px 3px 0 #111118); }
.lobby-wait { color: #fff; }

/* --- soba na TV-u --- */
.room-code span { background: var(--accent); color: var(--ink); border: 5px solid var(--edge); box-shadow: 7px 7px 0 var(--drop); border-radius: 12px; }
.room-code span:nth-child(even) { background: #fff; }
.qr { border: 5px solid var(--edge); box-shadow: 7px 7px 0 var(--drop); border-radius: 12px; }

/* --- trake vremena --- */
.word-timer, .countdown { background: #fff; border: 4px solid var(--edge); border-radius: 10px; height: 20px; }
.word-timer div, .countdown div { background: var(--hot); }

/* --- postolje --- */
.podium-spot .block { border: 5px solid var(--edge); border-bottom: 0; border-radius: 10px 10px 0 0; box-shadow: 7px 0 0 var(--drop); color: var(--ink); }
.place-1 .block { background: var(--accent); }
.place-2 .block { background: #fff; }
.place-3 .block { background: var(--hot); color: #fff; }
.podium-spot .score, .podium-spot .name { color: #fff; }

/* --- „Spreman“ --- */
.ready-bar { background: linear-gradient(transparent, var(--bg) 40%); }
.ready-strip.go { background: #5dffb0; }

/* --- telefon u igri: tamnoplava „bina“ --- */
.tap-zone { background: #0b1a52; }
.tap-zone.intro, .tap-zone.result:not(.boom-me) { background: transparent; }
.tap-zone.done.out { background: #c01818; } .tap-zone.done.ok { background: #0b8f50; }
.boom-me { background: #c01818 !important; }
.bomb-watch, .clock-phone.ready, .statue-phone.ready, .rope-phone.ready { background: #0b1a52; }
.choice, .option, .rps-btn, .pen-btn, .key, .odd-cell, .arrow-btn, .throw-target {
  background: #fff !important; color: #111118 !important; border: 4px solid var(--edge) !important; box-shadow: 5px 5px 0 var(--drop);
}
.choice:active, .option:active, .rps-btn:active, .pen-btn:active, .key:active, .odd-cell:active, .arrow-btn:active, .throw-target:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--drop); }

/* --- po igrama --- */
.pen-verdict, .chairs-cue, .squirt-verdict, .chairs-verdict {
  color: var(--accent); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); transform: rotate(-3deg);
}
.pen-verdict.save { color: #fff; }
.squirt-verdict { color: #8fd0ff; }
.pen-goal { border-color: #fff; outline: 5px solid var(--edge); box-shadow: 8px 8px 0 var(--drop); }
.squirt-cyl .cham { background: #fff; border-color: var(--edge); }
.squirt-cyl .cham.used { background: #11111855; }
.tag-pill.lion { background: var(--hot); color: #fff; border: 2px solid var(--edge); }
.tag-pill.chick { background: #8fd0ff; color: var(--ink); border: 2px solid var(--edge); }
.wheel-wrap .wheel { border: 6px solid var(--edge); box-shadow: 8px 8px 0 var(--drop); }
.wheel-pointer { color: var(--accent); -webkit-text-stroke: 2px var(--ink); }
.drawing, .maze, .playing-card { border: 5px solid var(--edge); box-shadow: 7px 7px 0 var(--drop); }
.guess-feed li.ok { background: #b9ffd9; }
.sab-alert { border: 4px solid var(--edge); box-shadow: 5px 5px 0 var(--drop); }
.sab-alert.empty { border-color: transparent; box-shadow: none; }
.signal { border: 5px solid var(--edge); box-shadow: 7px 7px 0 var(--drop); }
.board-wrap { border-bottom: 5px solid var(--edge); border-radius: 0 0 18px 18px; box-shadow: 0 6px 0 var(--drop); background: var(--bg); }
.join { background: transparent; border: 0; box-shadow: none; }
/* „POW“ eksplozija iza velikih trenutaka na tabli */
.host .pen-verdict::before, .host .final h1::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 4.8em; height: 2.3em; transform: translate(-50%, -50%);
  background: var(--hot);
  clip-path: polygon(50% 0, 61% 22%, 82% 8%, 78% 32%, 100% 36%, 82% 52%, 96% 72%, 72% 70%, 68% 96%, 50% 78%, 32% 96%, 28% 70%, 4% 72%, 18% 52%, 0 36%, 22% 32%, 18% 8%, 39% 22%);
}
.host .pen-verdict, .host .final h1 { position: relative; z-index: 0; display: inline-block; }


/* Sve što ima belu podlogu (var(--card)) dobija taman tekst — da nigde ne bude belo na belom. */
.btn,
.player-chip,
.result-row,
.avatar-pick.selected,
.game-card.selected,
.option,
.throw-target,
.timeline .mark .t,
.fighter,
.statue-card,
.rope-team,
.power,
.totals,
.ready-strip,
.answer-list li,
.group,
.sym-row .sym,
.sym-btn,
.choice,
.mode-card,
.icon-btn,
.who-chip,
.chip-btn,
.game-chip,
.rps-card,
.rps-btn,
.skip-confirm,
.voice-bar .toggle,
.voice-people span,
.odd-cell,
.key,
.arrow-btn,
.pen-btn,
.about-game {
  --text: #111118; --muted: #50556b; --plus: #0aa85c; --minus: #e01b1b; color: #111118;
}

/* --- vrh ekrana na telefonu (iPhone, instalirana aplikacija): ništa ne sme pod statusnu traku --- */
:root { --safe-top: env(safe-area-inset-top, 0px); --board-top: calc(var(--board-h, 0px) + var(--safe-top)); }
body.player #app, body.home #app { padding-top: calc(16px + var(--safe-top)); }
body.player.in-game #app { padding-top: 0; }
body.player:not(.online) .tap-zone { padding-top: calc(24px + var(--safe-top)); }
body.player.online #app { padding-top: calc(var(--board-top) + 12px); }
body.player.online.in-game #app { padding-top: var(--board-top); }
body.player.online.board-hidden #app { padding-top: calc(16px + var(--safe-top)); }
.board-wrap { top: var(--safe-top); }
/* žuta traka iza statusne trake, da tabla ne „visi“ u vazduhu */
body.player.online:not(.board-hidden)::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--safe-top); background: var(--ink); z-index: 6; }
/* poruka o zvuku ide dole, da ne prekriva naslov */
.sound-wake { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
/* strip: žuta mora biti prava žuta i unutar belih kartica */
.who-chip.me, .game-chip.on, .player-chip.has-bomb, .result-row:first-child:not(.is-out) { background: #ffe600; }
.penalty-text, .wheel-result, .center-card .penalty-text { -webkit-text-stroke: 0; text-shadow: none; color: #111118; text-transform: none; }
.lobby-box .box-toggle { color: #e01b1b; }
:root { --plus: #5dffb0; --minus: #ffd0d0; }
.result-row, .totals, .score-chip, .player-chip, .rest li, .next-up, .lobby-box { --plus: #0aa85c; --minus: #e01b1b; }
.pts.plus, .gain { color: var(--plus); } .pts.minus { color: var(--minus); }

/* ---------- 🍾 Šampanjac ---------- */
.fizz-row { display: flex; gap: 22px; justify-content: center; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.fizz-bottle { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; position: relative; }
.fizz-glass { position: relative; width: 70px; height: 190px; border: 5px solid var(--edge, #111); border-radius: 14px 14px 20px 20px; background: #fff; overflow: hidden; box-shadow: 5px 5px 0 var(--drop, #111); display: flex; align-items: flex-end; justify-content: center; }
.fizz-glass i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#fff36b, #ffb300); transition: height .15s; }
.fizz-glass span { position: relative; font-size: 34px; margin-bottom: 6px; }
.fizz-glass.big { width: 110px; height: 230px; } .fizz-glass.big span { font-size: 52px; }
.fizz-cork { height: 34px; font-size: 30px; }
.fizz-bottle.popped .fizz-cork { animation: cork .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cork { from { transform: translateY(40px) scale(.4); } }
.fizz-live.shake .fizz-glass { animation: fizz-wobble .25s linear infinite; }
@keyframes fizz-wobble { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.fizz-phone { background: #0b1a52; gap: 8px; }

/* ---------- 🥔 Vruć krompir ---------- */
.potato-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.potato-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 110px; }
.potato-cell.dead { opacity: .55; }
.potato-emoji { font-size: 64px; line-height: 1; filter: drop-shadow(0 0 calc(var(--h, 0) * 26px) #ff3d00) saturate(calc(1 + var(--h, 0) * 2)); transform: scale(calc(1 + var(--h, 0) * .25)); transition: transform .2s; }
.potato-bar { width: 110px; height: 14px; border: 3px solid var(--edge, #111); border-radius: 8px; background: #fff; overflow: hidden; }
.potato-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe600, #ff2d2d); transition: width .12s; }
.potato-bar.big { width: min(300px, calc(80 * var(--vw1, 1vw))); height: 22px; }
.potato-phone { background: #3a0d06; gap: 8px; }

/* ---------- 🎣 Pecanje ---------- */
.fish-pond { position: relative; width: 420px; max-width: 80%; height: 150px; margin: 10px auto; border: 5px solid var(--edge, #111); border-radius: 16px; background: linear-gradient(#8fd0ff 0 38%, #1b6fd1 38%); box-shadow: 6px 6px 0 var(--drop, #111); overflow: hidden; }
.fish-pond.phone { width: min(300px, calc(82 * var(--vw1, 1vw))); height: 190px; }
.fish-float { position: absolute; left: 50%; top: 38%; font-size: 34px; transform: translate(-50%, -60%); animation: fish-bob 2.2s ease-in-out infinite; }
.fish-float.under { top: 62%; animation: none; font-size: 44px; }
@keyframes fish-bob { 50% { transform: translate(-50%, -48%); } }
@keyframes fish-nib0 { 0%, 100% { transform: translate(-50%, -60%); } 20% { transform: translate(-50%, -28%); } 40% { transform: translate(-50%, -62%); } 55% { transform: translate(-50%, -40%); } }
@keyframes fish-nib1 { 0%, 100% { transform: translate(-50%, -60%); } 25% { transform: translate(-50%, -30%); } 50% { transform: translate(-50%, -58%); } }
.fish-live.bite .fish-cue { color: var(--accent); animation: chairs-pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.fish-phone.wait { background: #0b2a66; }
.fish-phone.bite { background: #d01818; }
.fish-phone.bite .tap-word { color: #fff; }

/* ---------- 🤠 Rodeo ---------- */
.rodeo-cmd { font-size: clamp(44px, calc(8 * var(--vw1, 1vw)), 96px); margin: 4px 0 10px; }
.rodeo-live.cmd .rodeo-cmd, .rodeo-live.cmd .rodeo-icon { animation: chairs-pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.rodeo-live .countdown { width: min(600px, 80%); margin: 0 auto 14px; }
.rodeo-phone { background: #5a2a06; gap: 6px; }
.rodeo-phone.cmd-still { background: #0b3a6a; }
.rodeo-phone.cmd-shake { background: #7a1a1a; }
.rodeo-phone.cmd-flip { background: #3a1a6a; }
.rodeo-word { font-size: clamp(40px, calc(13 * var(--vw1, 1vw)), 84px); color: #fff; line-height: 1; }
.rodeo-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 420px; margin-top: 14px; }
.rodeo-btn { font-size: 34px; padding: 14px 0; border-radius: 14px; border: 4px solid var(--edge, #111); background: #fff; box-shadow: 4px 4px 0 var(--drop, #111); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .fizz-live.shake .fizz-glass, .fish-float { animation: none; } }
.maze-center { padding: 8px 16px; font-size: 14px; margin-top: 4px; }
.fizz-live > h1, .potato-live > h1, .fish-live > h1 { font-size: clamp(38px, calc(6 * var(--vw1, 1vw)), 80px); margin: 6px 0 10px; }
.host .fizz-glass { width: 96px; height: 240px; } .host .fizz-glass span { font-size: 46px; }
.host .fizz-bottle b, .host .potato-cell b { font-size: 22px; }
.host .potato-emoji { font-size: 110px; } .host .potato-bar { width: 170px; height: 20px; }
body.board-body .fizz-glass { height: 170px; } body.board-body .potato-emoji { font-size: 80px; }
.oars.waiting .oar { opacity: .35; }

/* --- UI/UX doterivanje --- */
/* Dok se tabla ne prikazuje (soba, pravila), ekran koristi celu visinu i dugme ⏭ je u ćošku. */
body.board-hidden { --board-top: var(--safe-top); }
/* Pravila ne idu ispod dugmeta ⏭ */
body.player .tap-zone.intro { padding-left: 20px; padding-right: 20px; }
body.player.in-game .tap-zone.intro > p:first-of-type, body.player.in-game .tap-zone.intro > h2 { max-width: calc(100% - 8px); }
.skip-btn { width: 44px; height: 44px; }
.tag-pill { margin-left: 8px; }
/* Kazna na telefonu: jedna kartica, ne kutija u kutiji */
.wheel-phone .penalty-text { border: 0; box-shadow: none; background: #ffe600; border-radius: 14px; padding: 12px 14px; font-size: 22px; line-height: 1.25; }
/* Sjaj na glavnom dugmetu je diskretniji */
.btn.primary::after, .btn.primary::before { opacity: .45; }
/* Naslov/pitanje na telefonu ne ide ispod dugmeta ⏭ (vidi ga samo onaj ko vodi sobu) */
.tap-zone:has(~ .skip-btn) > h2:first-of-type, .tap-zone:has(~ .skip-btn) > .muted:first-child, .tap-zone:has(~ .skip-confirm) > h2:first-of-type { padding-left: 46px; padding-right: 46px; }
/* TV: sitne napomene su bile presitne za čitanje sa kauča */
body.host:not(.board-body) .muted { font-size: 20px; }
body.host:not(.board-body) .muted.small, body.host:not(.board-body) .local-note { font-size: 15px; }
body.host:not(.board-body) .game-intro .muted { font-size: 22px; }
body.host:not(.board-body) .player-row .player-chip { font-size: 20px; padding: 10px 16px; }
body.host:not(.board-body) .player-row .player-chip .avatar { font-size: 30px; }
/* GOOOL/ODBRANA: eksplozija ne prekriva red ispod */
.host .pen-verdict { margin: 22px 0 36px; }

/* Traka „nešto je zapelo“ */
.crash-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 100; display: flex; align-items: center; gap: 10px; background: #fff; color: #111118; border: 4px solid #111118; border-radius: 14px; box-shadow: 5px 5px 0 #111118; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.crash-bar span { flex: 1; }
.crash-bar .btn { padding: 8px 14px; font-size: 14px; box-shadow: 3px 3px 0 #111118; }
.crash-x { background: none; border: 0; font-size: 18px; cursor: pointer; color: #111118; padding: 4px; }
.host-away .huge { animation: breathe 1.6s ease-in-out infinite; }
.copyright { font-size: 12px; opacity: .7; margin: 14px 0 0; }

/* ---------- efekti: odbrojavanje, eksplozija iza ikonice igre ---------- */
/* 3-2-1 pre početka igre: svaki broj uleti, zadrži se i nestane. Na kraju se ništa ne vidi. */
.count321 { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; pointer-events: none; }
.count321 span {
  grid-area: 1 / 1; font: 900 clamp(120px, calc(34 * var(--vw1, 1vw)), 320px)/1 var(--font); color: var(--accent, #ffe600);
  -webkit-text-stroke: 8px #111118; paint-order: stroke fill; text-shadow: 10px 10px 0 #111118;
  opacity: 0; animation: count-pop var(--step, 800ms) cubic-bezier(.2, 1.5, .4, 1) both;
}
.count321 span:nth-child(1) { animation-delay: var(--since, 0ms); }
.count321 span:nth-child(2) { animation-delay: calc(var(--since, 0ms) + var(--step, 800ms)); color: #fff; }
.count321 span:nth-child(3) { animation-delay: calc(var(--since, 0ms) + var(--step, 800ms) * 2); color: #ff2d2d; }
@keyframes count-pop {
  0% { opacity: 0; transform: scale(2.4) rotate(-14deg); }
  22% { opacity: 1; transform: scale(1) rotate(-5deg); }
  78% { opacity: 1; transform: scale(.94) rotate(-5deg); }
  100% { opacity: 0; transform: scale(.4) rotate(6deg); }
}
body.board-body .count321 span { font-size: 220px; }

/* Stripovska eksplozija u boji igre iza ikonice na ekranu sa pravilima */
.game-intro > .huge, .tap-zone.intro > .huge:first-child { position: relative; z-index: 0; display: inline-grid; place-items: center; }
.game-intro > .huge::before, .tap-zone.intro > .huge:first-child::before {
  content: ""; position: absolute; z-index: -1; width: 1.9em; height: 1.9em;
  background: var(--burst, transparent);
  clip-path: polygon(50% 0, 61% 18%, 80% 6%, 78% 28%, 100% 30%, 84% 48%, 98% 68%, 76% 68%, 72% 94%, 52% 80%, 34% 98%, 30% 72%, 4% 76%, 18% 54%, 0 38%, 22% 32%, 16% 8%, 40% 20%);
  animation: burst-spin 22s linear infinite, burst-in .45s cubic-bezier(.2, 1.6, .4, 1) backwards;
  filter: drop-shadow(5px 5px 0 #111118);
}
@keyframes burst-spin { to { rotate: 360deg; } }
@keyframes burst-in { from { scale: 0; } }
/* Telefon se pri svakoj promeni crta iznova, pa bi okretanje trzalo — tu eksplozija miruje. */
.tap-zone.intro > .huge:first-child::before { animation: none; rotate: -8deg; }
/* Na telefonu: eksplozija je manja i naslov ide PREKO nje, ne ispod. */
.tap-zone.intro > .huge:first-child { margin-bottom: .3em; }
.tap-zone.intro > .huge:first-child::before { width: 1.65em; height: 1.65em; }
.tap-zone.intro > h2, .tap-zone.intro > p { position: relative; z-index: 1; }
.tap-zone.intro > h2 { text-shadow: 3px 3px 0 #111118; }

@media (prefers-reduced-motion: reduce) {
  .game-intro > .huge::before, .tap-zone.intro > .huge:first-child::before { animation: none; }
  .count321 span { animation-timing-function: linear; }
}

/* ---------- jezgro: navijanje, pošten znak na TV-u, otkrivanje rezultata, nastavak žurke ---------- */
/* 📣 Emoji koje šalju igrači koji trenutno ne igraju — lete preko table. */
.reacts { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.react { position: absolute; left: var(--x, 50%); bottom: -80px; display: grid; justify-items: center; font-size: 64px; line-height: 1; animation: react-fly 2.8s cubic-bezier(.2, .7, .3, 1) forwards; }
.react small { font: 800 14px/1 var(--font, system-ui); background: #111118; color: #fff; border-radius: 6px; padding: 3px 7px; margin-top: 4px; }
@keyframes react-fly {
  0% { transform: translateY(0) scale(.4) rotate(-10deg); opacity: 0; }
  15% { opacity: 1; transform: translateY(-25vh) scale(1.1) rotate(6deg); }
  80% { opacity: 1; }
  100% { transform: translateY(-85vh) scale(1) rotate(-6deg); opacity: 0; }
}
body.board-body .react { font-size: 48px; }
.react-bar { display: grid; gap: 6px; justify-items: center; margin-top: 18px; }
.react-bar > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.react-btn { font-size: 30px; line-height: 1; width: 54px; height: 54px; border-radius: 14px; border: 3px solid #111118; background: #fff; box-shadow: 3px 3px 0 #111118; cursor: pointer; touch-action: manipulation; }
.react-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #111118; }
.react-btn.sent { animation: react-sent .35s ease-out; }
@keyframes react-sent { 50% { transform: scale(1.25) rotate(-8deg); } }

/* Znak za reakciju (SAD!, PUC!, SEDI!) na TV-u kasni ~0,7 s: telefon, koji meri vreme, mora da bude prvi. */
body.host:not(.board-body) .tv-late { animation: tv-late 0s .7s backwards; }
@keyframes tv-late { from, to { visibility: hidden; } }

/* Otkrivanje rezultata red po red, od poslednjeg ka pobedniku (lista sa klasom .reveal). */
.results.reveal > li { animation: reveal-row .5s cubic-bezier(.2, 1.5, .4, 1) backwards; animation-delay: calc(250ms + (var(--n, 1) - var(--i, 0) - 1) * 380ms); }
.results.reveal > li:first-child { animation-name: reveal-win; animation-duration: .7s; }
@keyframes reveal-row { from { opacity: 0; transform: translateX(-60px) rotate(-2deg); } }
@keyframes reveal-win { 0% { opacity: 0; transform: scale(1.6) rotate(-4deg); } 60% { opacity: 1; transform: scale(.95); } }
/* Mnogo igrača: na TV-u u dve kolone, da sve stane na ekran. */
body.host .results.many, body.board-body .results.many { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; width: min(1180px, 100%); }
body.host .results.many > li, body.board-body .results.many > li { margin-bottom: 8px; }

/* Ulazak: zauzet lik */
.avatar-pick.taken { opacity: .25; filter: grayscale(1); cursor: not-allowed; }

/* Finale i preskočena igra */
.finale-tag { display: inline-block; background: #ffe600; color: #111118; border: 3px solid #111118; border-radius: 10px; padding: 2px 10px; font-weight: 900; transform: rotate(-2deg); margin: 0 8px 0 0; }
.ready-bar .finale-tag { margin: 0 auto 8px; }
.final.resume { display: grid; justify-items: center; gap: 14px; text-align: center; }
.share-card-btn { margin: 4px auto 10px; }

/* TV sa kauča: na velikom ekranu (1080p, 4K) ceo ekran igre se srazmerno uveća (soba ima svoj raspored za veliki ekran) (--tvz postavlja host.js:
   koliko puta je ekran veći od 1280×720). Mere u vw/vh unutar uvećanog dela se dele istim brojem, da sve stane. */
body.host:not(.board-body) .stage, body.host:not(.board-body) .ready-strip, body.host:not(.board-body) .skip-tv, body.host:not(.board-body) .react {
  zoom: var(--tvz, 1);
  --vw1: calc(1vw / var(--tvz, 1)); --vh1: calc(1vh / var(--tvz, 1)); --dvh1: calc(1dvh / var(--tvz, 1));
}
@media (prefers-reduced-motion: reduce) {
  .react { animation-duration: .01s; }
  .results.reveal > li { animation: none; }
}

/* Uljez i druge igre koje se igraju pričanjem: glas i tokom igre (online). */
.game-voice { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 20; }
.game-voice .voice-bar { margin: 0; }
#app:has(.game-voice) .tap-zone { padding-bottom: 96px; }
/* Soba na TV-u 720p sa 8–10 igrača i 5 brzih izbora: sve mora da stane, i dugme „Počni“. */
@media (max-height: 860px) and (min-width: 900px) {
  body.host .player-grid .player-chip { padding-top: 4px; padding-bottom: 4px; }
  body.host .penalty-count { font-size: 15px; }
  body.host .sound-line { margin: 2px 0; }
  body.host .start-btn { padding-top: 10px; padding-bottom: 10px; }
}

/* 🌀 Preokret runde: žuta „nalepnica“ sa nazivom i kratkim objašnjenjem */
.twist-badge { display: inline-grid; justify-items: center; gap: 2px; margin: 6px auto 10px; padding: 6px 16px; background: #ffe600; color: #111118; border: 3px solid #111118; border-radius: 12px; box-shadow: 4px 4px 0 #111118; transform: rotate(-2deg); animation: twist-in .5s cubic-bezier(.2, 1.6, .4, 1) backwards; max-width: min(92%, 720px); text-align: center; }
.twist-badge b { font-weight: 900; font-size: 20px; letter-spacing: .3px; }
.twist-badge small { font-size: 14px; font-weight: 700; opacity: .85; }
.twist-badge.big b { font-size: 34px; }
.twist-badge.big small { font-size: 20px; }
/* Telefon se crta iznova pri svakom stanju — nalepnica „uleti“ samo jednom po ekranu (--t, vidi player.js). */
body.player .twist-badge { animation-delay: var(--t, 0ms); }
body.player .twist-badge b { font-size: 17px; }
body.player .twist-badge small { font-size: 13px; }
@keyframes twist-in { from { transform: scale(2) rotate(-12deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .twist-badge { animation: none; } }

/* 📺 Tabla na telefonu (online): sama se pojavi kad treba, a ovim dugmetom može uvek. */
.board-toggle { position: fixed; left: 8px; top: calc(var(--board-top, 0px) + 8px); z-index: 6; font: 800 13px/1 system-ui, sans-serif; color: #111118; background: #fff; border: 3px solid #111118; border-radius: 999px; padding: 7px 11px; box-shadow: 3px 3px 0 #111118; cursor: pointer; }
.board-toggle.on { background: #ffe600; }

/* Efekti (krhotine, čekić, praskovi) smeju da izlete van ekrana — ali ekran nikad ne sme da „klizi“ u stranu. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* ---------- pristupačnost i moderacija ---------- */
/* Natpis samo za čitače ekrana (polja za šifru sobe i kaznu). */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* ✕ za izbacivanje igrača iz sobe (TV i telefon onoga ko vodi sobu). */
.kick-btn { margin-left: 6px; border: 0; background: transparent; color: inherit; opacity: .55; font: 800 14px var(--font); cursor: pointer; padding: 2px 4px; }
.kick-btn:hover, .kick-btn:focus-visible { opacity: 1; }
.kick-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; font-weight: 700; }
.player-chip .kick-confirm { margin: 0; gap: 4px; font-size: 14px; }
.player-chip .kick-btn { margin-left: auto; }
/* TV soba: ✕ za izbacivanje je mali kružić u ćošku pločice (ne krade mesto imenu), a potvrda prekrije pločicu. */
body.host .player-grid .player-chip { position: relative; }
body.host .player-grid .player-chip .kick-btn { position: absolute; top: -9px; right: -9px; margin: 0; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: #fff; color: #111118; border: 2px solid #111118; opacity: .85; font-size: 12px; line-height: 1; display: grid; place-items: center; }
body.host .player-grid .player-chip .kick-confirm { position: absolute; inset: -3px; z-index: 3; justify-content: center; background: #ffe600; color: #111118; border-radius: inherit; border: 3px solid #111118; gap: 6px; font-size: 15px; }
body.host .player-grid .player-chip .kick-confirm .chip-btn { padding: 3px 10px; }
