/* ==========================================================================
   Minigames — Kolorowa Pułapka, Licytacja Kości, Pixel Wyścig, Kalambury, Memory Duel
   ========================================================================== */
:root {
  --c-red: #ff5d5d;
  --c-blue: #4c9dff;
  --c-green: #35c97f;
  --c-yellow: #ffc93c;
  --c-purple: #a970ff;
}
.region-contents { display: contents; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.avatar.tiny { width: 20px; height: 20px; }

/* ---------- home tiles ---------- */
.minis-title { display: flex; align-items: center; gap: 8px; margin-top: 36px; }
.new-badge { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.minis-grid { grid-template-columns: repeat(5, 1fr); }
.minis-grid .game-tile-art { height: 140px; display: grid; place-items: center; }
.minis-grid .game-tile-body { padding: 16px 16px 18px; }
.minis-grid .game-tile h3 { font-size: 20px; }
.minis-grid .game-tile p { font-size: 13px; }
.minis-grid .meta { gap: 8px; font-size: 12px; }
.tile-colors .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(169, 112, 255, 0.24), transparent 60%), var(--bg-soft); }
.tile-dice .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(53, 201, 127, 0.22), transparent 60%), var(--bg-soft); }
.tile-tron .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(76, 157, 255, 0.24), transparent 60%), var(--bg-soft); }
.tile-draw .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 93, 93, 0.2), transparent 60%), var(--bg-soft); }
.tile-memory .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 204, 77, 0.2), transparent 60%), var(--bg-soft); }
.art-colors { display: grid; gap: 2px; text-align: center; font: 700 17px/1.15 var(--font-display); letter-spacing: 0.04em; transform: rotate(-5deg); transition: transform 0.4s var(--ease); }
.art-dice { display: flex; gap: 10px; transition: transform 0.4s var(--ease); }
.art-dice .die { --d: 40px; }
.art-dice .die:nth-child(1) { transform: rotate(-12deg); }
.art-dice .die:nth-child(3) { transform: rotate(10deg) translateY(4px); }
.art-tron, .art-draw { width: 130px; height: 98px; stroke-width: 5; transition: transform 0.4s var(--ease); }
.art-tron path { filter: drop-shadow(0 0 6px currentColor); }
.art-memory { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; transform: rotate(-5deg); transition: transform 0.4s var(--ease); }
.art-memory i { height: 42px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 20px; background: #f4efe3; }
.art-memory i:empty { background: linear-gradient(135deg, #3b4252, #262b36); border: 1px solid var(--line-2); }
a.game-tile:hover .art-colors, a.game-tile:hover .art-memory { transform: rotate(0deg) scale(1.05); }
a.game-tile:hover .art-dice, a.game-tile:hover .art-tron, a.game-tile:hover .art-draw { transform: scale(1.06); }

/* tournament plan colours */
.plan-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint); vertical-align: 1px; }
.plan-dot.g-uno { background: #ff9c9c; }
.plan-dot.g-2048 { background: #f3d36a; }
.plan-dot.g-colors, .plan-order li.g-colors span { background: rgba(169, 112, 255, 0.3); color: #c9a6ff; }
.plan-dot.g-dice, .plan-order li.g-dice span { background: rgba(53, 201, 127, 0.28); color: #7fe0ae; }
.plan-dot.g-tron, .plan-order li.g-tron span { background: rgba(76, 157, 255, 0.3); color: #8fc0ff; }
.plan-dot.g-draw, .plan-order li.g-draw span { background: rgba(255, 143, 60, 0.3); color: #ffb47f; }
.plan-dot.g-memory, .plan-order li.g-memory span { background: rgba(255, 204, 77, 0.28); color: #ffd97f; }
.plan-dot.g-colors { background: #c9a6ff; } .plan-dot.g-dice { background: #7fe0ae; } .plan-dot.g-tron { background: #8fc0ff; }
.plan-dot.g-draw { background: #ffb47f; } .plan-dot.g-memory { background: #ffd97f; }

/* ---------- shared game layout ---------- */
.mini .gamebar-center { justify-content: center; }
.mini-main {
  flex: 1; min-width: 0; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 20px 16px;
}
.mini-stage { min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mini-stage > * { width: 100%; }
.mg-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.mg-head b { color: var(--text); font-size: 17px; }
.mg-bar { flex: 1; min-width: 80px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mg-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.15s linear; }
.mg-bar i.low { background: var(--danger); }
@media (min-width: 1200px) {
  .mini.chat-open .mini-main { padding-right: 360px; }
}

/* ---------- Kolorowa Pułapka ---------- */
.cp { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }
.cp-rule { text-align: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: fade 0.2s; }
.cp-rule strong { display: block; font: 700 22px/1.2 var(--font-display); letter-spacing: 0.02em; }
.cp-rule small { color: var(--muted); font-size: 13px; }
.cp-rule.rule-trap { background: rgba(255, 107, 107, 0.14); border-color: rgba(255, 107, 107, 0.45); color: #ff9c9c; animation: cp-flash 0.6s ease-in-out 3; }
.cp-card {
  margin-top: 12px; min-height: 180px; border-radius: 20px;
  display: grid; place-items: center; text-align: center;
  background: #f7f4ec; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.cp-card.prep { background: var(--surface); box-shadow: none; border: 1px dashed var(--line-2); }
.cp-card.prep small { color: var(--muted); display: block; }
.cp-card.prep strong { font: 600 28px var(--font-display); }
.cp-card.trap { outline: 3px solid rgba(255, 107, 107, 0.6); }
.cp-word { font: 700 clamp(34px, 7vw, 64px)/1 var(--font-display); letter-spacing: 0.04em; animation: cp-pop 0.25s var(--ease); }
.cp-buttons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 20px; }
.cp-btn {
  position: relative; aspect-ratio: 1; border-radius: 20px;
  background: var(--sw); border: 3px solid transparent;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s var(--ease), opacity 0.2s, border-color 0.2s;
}
.cp-btn.c-red { --sw: var(--c-red); } .cp-btn.c-blue { --sw: var(--c-blue); } .cp-btn.c-green { --sw: var(--c-green); }
.cp-btn.c-yellow { --sw: var(--c-yellow); } .cp-btn.c-purple { --sw: var(--c-purple); }
.cp-btn:hover:not(:disabled) { transform: translateY(-3px); }
.cp-btn:active:not(:disabled) { transform: scale(0.94); }
.cp-btn:disabled { cursor: default; opacity: 0.55; }
.cp-btn.picked { opacity: 1; border-color: #fff; }
.cp-btn.correct { opacity: 1; border-color: #fff; box-shadow: 0 0 0 4px rgba(53, 201, 127, 0.6), inset 0 -6px 0 rgba(0, 0, 0, 0.18); }
.cp-btn.wrong { opacity: 1; border-color: #000; animation: shake 0.3s; }
.cp-btn kbd { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, 0.2); border-color: transparent; color: rgba(255, 255, 255, 0.85); }
.cp-who { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.cp-gain { margin-top: 18px; text-align: center; font: 700 24px var(--font-display); min-height: 32px; }
.cp-gain.pos { color: var(--green); animation: cp-pop 0.3s var(--ease); }
.cp-gain.neg { color: var(--danger); animation: shake 0.3s; }
.cp-gain.muted { color: var(--faint); font: 500 14px var(--font); }
@keyframes cp-pop { from { transform: scale(0.6); opacity: 0; } }
@keyframes cp-flash { 50% { background: rgba(255, 107, 107, 0.32); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Licytacja Kości ---------- */
.die {
  --d: 34px;
  width: var(--d); height: var(--d); padding: calc(var(--d) * 0.12);
  display: inline-grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  border-radius: calc(var(--d) * 0.22); background: #f7f4ec;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15), 0 6px 14px rgba(0, 0, 0, 0.3);
}
.die i { width: 62%; aspect-ratio: 1; border-radius: 50%; }
.die i.on { background: #1b1e25; }
.die.rolled { animation: roll 0.55s var(--ease) backwards; }
.die.rolled:nth-child(2) { animation-delay: 0.08s; }
.die.rolled:nth-child(3) { animation-delay: 0.16s; }
@keyframes roll { from { transform: rotate(-200deg) scale(0.3); opacity: 0; } }
.dc { max-width: 760px; margin: 0 auto; }
.dc-pot { color: var(--accent); }
.dc-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dc-seat {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s;
}
.dc-seat.self { border-color: rgba(255, 204, 77, 0.35); }
.dc-seat.win { background: rgba(53, 201, 127, 0.1); border-color: rgba(53, 201, 127, 0.55); }
.dc-seat.busted { opacity: 0.5; }
.dc-top { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.dc-top .avatar { width: 34px; height: 34px; }
.dc-top strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-jokers { display: flex; gap: 3px; font-size: 12px; }
.dc-jokers i { font-style: normal; }
.dc-jokers i.used { opacity: 0.2; filter: grayscale(1); }
.dc-chips { font: 600 22px var(--font-display); font-variant-numeric: tabular-nums; text-align: right; }
.dc-chips em { display: block; font: 700 13px var(--font); }
.dc-chips em.pos, .pos { color: var(--green); }
.dc-chips em.neg, .neg { color: var(--danger); }
.dc-dice { display: flex; gap: 6px; }
.dc-status { font-size: 13px; color: var(--muted); font-weight: 600; }
.dc-status.ok { color: var(--green); }
.dc-status.win { color: var(--green); }
.dc-status.out { color: var(--danger); }
.dc-status.think::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--faint); animation: pulse 1s infinite; }
.dc-controls { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.dc-controls.note { text-align: center; color: var(--muted); font-size: 14px; }
.dc-controls.note strong { color: var(--text); }
.dc-amount { display: flex; align-items: baseline; gap: 8px; }
.dc-amount span { flex: 1; color: var(--muted); font-weight: 600; font-size: 14px; }
.dc-amount strong { font: 700 30px var(--font-display); color: var(--accent); }
.dc-amount small { color: var(--faint); }
#diceAmount { width: 100%; accent-color: var(--accent); height: 28px; }
.dc-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.chip:hover { color: var(--text); background: var(--surface-3); }
.dc-joker-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-joker { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.dc-joker b { font-size: 18px; }
.dc-joker.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.dc-joker:disabled { opacity: 0.3; }

/* ---------- Pixel Wyścig ---------- */
.tr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tr .mg-head { margin: 0; width: min(560px, 100%); }
.tr-me { display: inline-flex; align-items: center; gap: 4px; }
.tr-me .swatch { width: 14px; height: 14px; }
.tr-legend { margin-left: auto; color: var(--faint); font-size: 12px; }
.tr-legend i { font-style: normal; }
.tr-arena { position: relative; width: min(560px, 100%, calc(100dvh - var(--header-h) - 190px)); aspect-ratio: 1; }
.tr-canvas-wrap, .tr-canvas-wrap canvas { width: 100%; height: 100%; }
.tr-canvas-wrap canvas { display: block; border-radius: 14px; border: 1px solid var(--line-2); image-rendering: pixelated; touch-action: none; background: #12151b; }
.tr-overlay {
  position: absolute; inset: 0; border-radius: 14px;
  display: grid; place-content: center; gap: 6px; text-align: center;
  background: rgba(14, 15, 19, 0.6); backdrop-filter: blur(2px); animation: fade 0.25s;
  pointer-events: none;
}
.tr-overlay.ghost { background: rgba(14, 15, 19, 0.25); backdrop-filter: none; }
.tr-overlay strong { font: 700 44px/1 var(--font-display); }
.tr-overlay small, .tr-overlay span { color: var(--muted); font-size: 14px; }
.tr-overlay .swatch { width: 14px; height: 14px; }
.tr-pad { grid-template-columns: repeat(4, 58px) !important; }

/* ---------- Kalambury ---------- */
.kb { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.kb .mg-head { margin: 0; }
.kb-word-row { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; }
.kb-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kb-word { font: 700 28px var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); }
.kb-mask { display: flex; gap: 6px; }
.kb-mask i { width: 22px; height: 30px; border-bottom: 3px solid var(--muted); display: grid; place-items: center; font: 700 22px var(--font-display); font-style: normal; text-transform: uppercase; }
.kb-mask i.gap { border: 0; width: 10px; }
.kb-board { position: relative; width: 100%; max-height: calc(100dvh - var(--header-h) - 250px); aspect-ratio: 4 / 3; margin: 0 auto; }
.kb-board canvas { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; background: #fbfaf7; touch-action: none; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35); }
.kb-board.can-draw canvas { cursor: crosshair; }
.kb-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.kb-tools.note { color: var(--muted); font-size: 14px; }
.kb-tools.note .avatar { width: 28px; height: 28px; }
.kb-colors, .kb-sizes { display: flex; gap: 5px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.kb-color { width: 28px; height: 28px; border-radius: 8px; background: var(--sw); border: 2px solid rgba(255, 255, 255, 0.12); }
.kb-color.on, .kb-size.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.kb-size { width: 30px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); }
.kb-size i { width: var(--s); height: var(--s); border-radius: 50%; background: var(--text); }
.kb-actions { display: flex; gap: 6px; }
.kb-actions .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.kb-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.kb-side .ranking { align-self: stretch; flex: none; }
.kb-guesses { flex: 1; min-height: 160px; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.kb-log { list-style: none; margin: 0; padding: 10px; flex: 1; overflow: auto; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; font-size: 13px; }
.kb-log li { display: flex; align-items: center; gap: 6px; }
.kb-log li.ok { color: var(--green); font-weight: 600; }
.kb-log li.empty { color: var(--faint); justify-content: center; }
.kb-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.kb-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line-2); outline: none; }
.kb-form input:focus { border-color: var(--accent); }
.kb-form .btn { min-height: 40px; padding: 0 14px; }
.kb-form.note { justify-content: center; color: var(--muted); font-size: 13px; padding: 12px; }

/* ---------- Memory Duel ---------- */
.mm { max-width: 600px; margin: 0 auto; }
.mm-turn.mine { color: var(--accent); font-size: 16px; }
.mm-grid { --gap: 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); width: min(100%, calc(100dvh - var(--header-h) - 170px)); margin: 0 auto; }
.mm-grid.boom { animation: shake 0.15s 4; }
.mm-card { position: relative; aspect-ratio: 1; perspective: 600px; border-radius: 12px; }
.mm-back, .mm-face {
  position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden;
  display: grid; place-items: center; transition: transform 0.35s var(--ease);
}
.mm-back { background: repeating-linear-gradient(45deg, #2b3140 0 6px, #262b36 6px 12px); border: 1px solid var(--line-2); }
.mm-face { background: #f7f4ec; font-size: clamp(20px, 5vw, 34px); transform: rotateY(180deg); }
.mm-card.up .mm-back { transform: rotateY(180deg); }
.mm-card.up .mm-face { transform: rotateY(0deg); }
.mm-card.owned .mm-face { box-shadow: inset 0 0 0 3px var(--own); opacity: 0.75; }
.mm-card.fresh .mm-face { box-shadow: 0 0 0 3px var(--accent); }
.mm-grid.active .mm-card:not(.up):hover .mm-back { border-color: var(--accent); transform: translateY(-2px); }
.mm-grid:not(.active) .mm-card { cursor: default; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .minis-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .mini .game-body { overflow-y: auto; }
  .mini-main { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: start; align-self: flex-start; padding: 16px; gap: 16px; }
  .mini-stage { justify-content: flex-start; min-height: auto; }
  .mini .ranking { align-self: stretch; order: -1; }
  .mini .ranking ol { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .kb-side { order: 2; }
  .kb-guesses { max-height: 260px; }
  .minis-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mini-main { padding: 10px; gap: 10px; }
  .mg-head { gap: 10px; font-size: 13px; margin-bottom: 10px; }
  .cp-buttons { gap: 7px; }
  .cp-btn { border-radius: 14px; }
  .cp-btn kbd { display: none; }
  .cp-card { min-height: 130px; }
  .cp-rule strong { font-size: 18px; }
  .dc-table { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dc-seat { padding: 10px; gap: 8px; }
  .dc-top { grid-template-columns: minmax(0, 1fr) auto; }
  .dc-top .avatar { display: none; }
  .die { --d: 26px; }
  .tr-legend { display: none; }
  .tr-arena { width: min(100%, calc(100dvh - var(--header-h) - 250px)); }
  .kb-word { font-size: 22px; }
  .kb-mask i { width: 16px; font-size: 18px; }
  .mm-grid { --gap: 5px; }
  .minis-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .minis-grid .game-tile-art { height: 96px; }
  .minis-grid .game-tile-art > * { transform: scale(0.75); }
  .minis-grid .game-tile-body { padding: 12px; gap: 4px; }
  .minis-grid .game-tile h3 { font-size: 16px; }
  .minis-grid .go { display: none; }
  .minis-grid .meta .live { display: none; }
  .main-nav a[data-nav="minis"], .main-nav a[data-nav="2048"] { display: none; }
}

/* ==========================================================================
   Minigames, part 2 — Zgadnij Liczbę, Wyścig Słów, Bomba, Snajper Reakcji,
   Kto Kłamie?, Kolonizacja, Pong Arena, Tajne Liczby
   ========================================================================== */
.pos { color: var(--green); }
.tile-estimate .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(76, 157, 255, 0.22), transparent 60%), var(--bg-soft); }
.tile-words .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(53, 201, 127, 0.22), transparent 60%), var(--bg-soft); }
.tile-bomb .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 93, 93, 0.24), transparent 60%), var(--bg-soft); }
.tile-reflex .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(53, 201, 127, 0.26), transparent 60%), var(--bg-soft); }
.tile-spy .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(169, 112, 255, 0.22), transparent 60%), var(--bg-soft); }
.tile-colony .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 204, 77, 0.2), transparent 60%), var(--bg-soft); }
.tile-pong .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(76, 157, 255, 0.2), transparent 60%), var(--bg-soft); }
.tile-code .game-tile-art { background: radial-gradient(120% 90% at 50% 110%, rgba(255, 143, 60, 0.22), transparent 60%), var(--bg-soft); }
.art-estimate { display: flex; align-items: center; gap: 8px; font: 700 26px var(--font-display); transform: rotate(-4deg); }
.art-estimate b:first-child { color: var(--c-blue); } .art-estimate b:last-child { color: var(--accent); } .art-estimate span { color: var(--faint); }
.art-words { display: grid; grid-template-columns: repeat(4, 26px); gap: 4px; transform: rotate(-5deg); }
.art-words i { height: 26px; border-radius: 6px; display: grid; place-items: center; font: 700 14px var(--font-display); font-style: normal; background: #f4efe3; color: #1b1e25; }
.art-words i.on { background: var(--green); color: #fff; }
.art-bomb { position: relative; font-size: 58px; line-height: 1; animation: bm-shake 0.5s infinite; }
.art-bomb b { position: absolute; right: -26px; top: -6px; padding: 2px 8px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 700 16px var(--font-display); }
.art-reflex { display: flex; align-items: center; gap: 12px; }
.art-reflex span { width: 60px; height: 60px; border-radius: 50%; background: var(--green); box-shadow: 0 0 30px rgba(53, 201, 127, 0.6); }
.art-reflex b { font: 700 22px var(--font-display); }
.art-spy { display: flex; gap: 6px; font-size: 32px; }
.art-spy .odd { filter: drop-shadow(0 0 10px rgba(169, 112, 255, 0.9)); transform: translateY(-6px); }
.art-colony, .art-pong { width: 130px; height: 98px; }
.art-code { display: flex; align-items: center; gap: 5px; }
.plan-dot.g-estimate { background: #8fc0ff; } .plan-dot.g-words { background: #7fe0ae; } .plan-dot.g-bomb { background: #ff9c9c; }
.plan-dot.g-reflex { background: #35c97f; } .plan-dot.g-spy { background: #c9a6ff; } .plan-dot.g-colony { background: #ffd97f; }
.plan-dot.g-pong { background: #4c9dff; } .plan-dot.g-code { background: #ffb47f; }
.plan-order li.g-estimate span, .plan-order li.g-pong span { background: rgba(76, 157, 255, 0.3); color: #8fc0ff; }
.plan-order li.g-words span, .plan-order li.g-reflex span { background: rgba(53, 201, 127, 0.28); color: #7fe0ae; }
.plan-order li.g-bomb span { background: rgba(255, 93, 93, 0.25); color: #ff9c9c; }
.plan-order li.g-spy span { background: rgba(169, 112, 255, 0.3); color: #c9a6ff; }
.plan-order li.g-colony span { background: rgba(255, 204, 77, 0.28); color: #ffd97f; }
.plan-order li.g-code span { background: rgba(255, 143, 60, 0.3); color: #ffb47f; }
.note { color: var(--muted); font-size: 14px; text-align: center; }
.note strong { color: var(--text); }

/* ---------- Zgadnij Liczbę ---------- */
.es { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.es .mg-head { margin: 0; }
.es-card { padding: 26px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.es-card p { font: 600 clamp(20px, 3vw, 28px)/1.25 var(--font-display); }
.es-big { display: block; margin-top: 12px; font: 700 48px var(--font-display); color: var(--accent); animation: cp-pop 0.3s var(--ease); }
.es-form { display: flex; gap: 8px; }
.es-form input, .wd-form input, .bm-form input, .sp-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-2); outline: none; font-size: 18px; }
.es-form input:focus, .wd-form input:focus, .bm-form input:focus, .sp-form input:focus { border-color: var(--accent); }
.es-form .btn, .wd-form .btn, .bm-form .btn, .sp-form .btn { min-height: 48px; }
.es-form.note, .sp-form.note, .bm-form.note { display: block; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.es-line { position: relative; height: 70px; margin: 26px 12px 4px; }
.es-line > i { position: absolute; left: 0; right: 0; top: 34px; height: 3px; border-radius: 3px; background: var(--surface-3); }
.es-answer, .es-mark { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.es-answer { top: 0; }
.es-answer b { padding: 2px 8px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.es-answer::after { content: ""; width: 3px; height: 16px; background: var(--accent); }
.es-mark { top: 38px; }
.es-mark small { color: var(--muted); font-size: 11px; }
.es-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.es-results li { display: grid; grid-template-columns: 20px 1fr auto auto 44px; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; }
.es-results em { color: var(--muted); font-size: 12px; }
.es-results b { text-align: right; }

/* ---------- Wyścig Słów ---------- */
.wd { max-width: 860px; margin: 0 auto; }
.wd-play { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.wd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; border-radius: 18px; background: #1d2129; }
.wd-tile { position: relative; aspect-ratio: 1; border-radius: 12px; background: #f4efe3; color: #1b1e25; font: 700 clamp(22px, 4vw, 34px) var(--font-display); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14); transition: transform 0.1s, background 0.15s; }
.wd-tile:hover:not(:disabled) { transform: translateY(-2px); }
.wd-tile.next { outline: 2px dashed rgba(53, 201, 127, 0.6); outline-offset: -4px; }
.wd-tile.on { background: var(--green); color: #fff; }
.wd-tile.last { background: #2aa56a; transform: scale(1.04); }
.wd-tile i { position: absolute; top: 4px; right: 6px; font: 700 11px var(--font); font-style: normal; opacity: 0.8; }
.wd-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wd-current { min-height: 44px; display: grid; place-items: center; }
.wd-current strong { font: 700 30px var(--font-display); letter-spacing: 0.08em; color: var(--accent); }
.wd-form { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-form input { flex-basis: 100%; }
.wd-form .btn { flex: 1; }
.wd-mine small { color: var(--muted); font-weight: 600; font-size: 13px; }
.wd-mine > div, .wd-other > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; max-height: 190px; overflow: auto; }
.wd-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; animation: fade 0.3s; }
.wd-chip b { color: var(--accent); font-size: 11px; }
.wd-chip.shared { opacity: 0.55; }
.wd-chip.missed { border-style: dashed; color: var(--muted); }
.wd-summary { display: grid; gap: 12px; }
.wd-other { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wd-other small { color: var(--muted); }

/* ---------- Bomba ---------- */
.bm { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.bm-table { position: relative; width: min(100%, 520px, calc(100dvh - var(--header-h) - 230px)); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, #1e232d 0 55%, transparent 56%); }
.bm-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 96px; text-align: center; transition: opacity 0.3s; }
.bm-seat .avatar { width: 52px; height: 52px; border: 3px solid transparent; border-radius: 50%; }
.bm-seat.self .avatar { border-color: rgba(255, 204, 77, 0.5); }
.bm-seat.holding .avatar { border-color: var(--danger); box-shadow: 0 0 22px rgba(255, 107, 107, 0.6); }
.bm-seat strong { font-size: 13px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-seat.out { opacity: 0.35; filter: grayscale(1); }
.bm-hearts i, .pg-hearts i { font-style: normal; color: var(--danger); font-size: 13px; }
.bm-hearts i.lost, .pg-hearts i.lost { color: var(--surface-3); }
.bm-bomb { position: absolute; top: -8px; right: 10px; font-size: 30px; animation: bm-shake calc(0.7s - var(--heat) * 0.55s) infinite; }
.bm-blast { position: absolute; top: -10px; font-size: 64px; animation: cp-pop 0.4s var(--ease); }
.bm-seat.boom { animation: shake 0.12s 6; }
.bm-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; }
.bm-center small { color: var(--muted); font-size: 12px; }
.bm-syl { padding: 6px 18px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: 700 40px var(--font-display); letter-spacing: 0.06em; animation: cp-pop 0.25s var(--ease); }
.bm-last { color: var(--faint); }
.bm-boomtext { font: 700 54px var(--font-display); color: var(--danger); animation: cp-pop 0.3s var(--ease); }
.bm-form { display: flex; gap: 8px; }
.bm-mine .bm-form input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2); }
@keyframes bm-shake { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }

/* ---------- Snajper Reakcji ---------- */
.rf { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.rf .mg-head { margin: 0; justify-content: space-between; }
.rf-pad {
  width: 100%; min-height: min(360px, calc(100dvh - var(--header-h) - 260px)); border-radius: 22px;
  display: grid; place-content: center; gap: 6px; text-align: center; color: #fff;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background 0.05s;
}
.rf-pad strong { font: 700 clamp(34px, 7vw, 60px)/1 var(--font-display); }
.rf-pad small { font-size: 15px; opacity: 0.85; }
.rf-pad.wait { background: #b8323a; }
.rf-pad.decoy-yellow { background: #d9a400; }
.rf-pad.decoy-blue { background: #2f6fd1; }
.rf-pad.go { background: #22b36b; }
.rf-pad.done { background: #1b8f56; }
.rf-pad.early { background: #3a404d; }
.rf-pad.show { background: var(--surface-2); }
.rf-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.rf-results li { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; }

/* ---------- Kto Kłamie? ---------- */
.sp { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.sp .mg-head { margin: 0; }
.sp-word { padding: 16px; border-radius: 18px; text-align: center; background: linear-gradient(135deg, rgba(169, 112, 255, 0.16), rgba(76, 157, 255, 0.1)); border: 1px solid rgba(169, 112, 255, 0.35); }
.sp-word small, .sp-word span { display: block; color: var(--muted); font-size: 12px; }
.sp-word strong { display: block; margin: 2px 0; font: 700 34px var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sp-row { position: relative; display: grid; grid-template-columns: 36px minmax(90px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sp-row .avatar { width: 36px; height: 36px; }
.sp-row.turn { border-color: var(--accent); background: var(--accent-soft); }
.sp-row.spy { border-color: rgba(169, 112, 255, 0.7); background: rgba(169, 112, 255, 0.14); }
.sp-row.voted { outline: 2px solid var(--danger); }
.sp-name strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-name small { color: var(--muted); font-size: 12px; }
.sp-clues { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-clues i { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-style: normal; font-weight: 600; font-size: 14px; animation: cp-pop 0.25s var(--ease); }
.sp-clues i.typing { color: var(--faint); animation: pulse 1s infinite; }
.sp-vote { min-height: 34px; padding: 0 12px; font-size: 13px; }
.sp-votes { font-size: 13px; color: var(--muted); white-space: nowrap; }
.sp-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sp-form > span { flex-basis: 100%; color: var(--muted); font-size: 14px; }

/* ---------- Kolonizacja ---------- */
.cl { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cl .mg-head { width: 100%; margin: 0; }
.cl-map { display: block; width: min(100%, 640px, calc((100dvh - var(--header-h) - 200px) * 1.15)); height: auto; }
.cl-hex polygon { fill: #232834; stroke: #12151b; stroke-width: 0.9; transition: fill 0.25s; }
.cl-hex text { font: 700 5px var(--font); fill: rgba(255, 255, 255, 0.55); text-anchor: middle; pointer-events: none; }
.cl-hex.cl-owned text { fill: rgba(0, 0, 0, 0.45); }
.cl-hex.cl-rock polygon { fill: #3a3f4a; }
.cl-hex.cl-burnt polygon { fill: #1a1b1f; }
.cl-hex.cl-rock text, .cl-hex.cl-burnt text { font-size: 7px; fill: #fff; }
.cl-hex.opt { cursor: pointer; }
.cl-hex.opt polygon { fill: #2f3747; stroke: var(--accent); stroke-width: 1.1; }
.cl-hex.opt:hover polygon { fill: #3b4658; }
.cl-hex.picked polygon { fill: var(--accent) !important; }
.cl-hex.picked text { fill: var(--accent-ink); }
.cl-hex.won polygon { animation: cl-flash 0.9s; }
.cl-hex.clash polygon { animation: cl-burn 0.9s; }
.cl-status { color: var(--muted); font-size: 14px; text-align: center; min-height: 20px; }
@keyframes cl-flash { 30% { filter: brightness(1.8); } }
@keyframes cl-burn { 30% { fill: #ff6b3c; } }

/* ---------- Pong Arena ---------- */
.pg { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pg .mg-head { width: min(560px, 100%); margin: 0; }
.pg .mg-head .muted { margin-left: auto; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-hearts i { font-size: 15px; }
.pg-arena canvas { image-rendering: auto; cursor: none; }

/* ---------- Tajne Liczby ---------- */
.cd { max-width: 560px; margin: 0 auto; }
.cd-board { display: grid; gap: 14px; }
.cd-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cd-history li { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 12px; background: var(--surface); animation: fade 0.25s; }
.cd-history li small { width: 18px; color: var(--faint); font-weight: 700; }
.cd-history li.empty { justify-content: center; color: var(--muted); font-size: 14px; padding: 16px; }
.cd-row { display: flex; gap: 6px; }
.cd-peg { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 16px var(--font-display); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.cd-peg.d0, .cd-peg.empty { background: var(--surface-2); border: 2px dashed var(--line-2); box-shadow: none; }
:is(.cd-peg, .cd-key).d1 { background: var(--c-red); } :is(.cd-peg, .cd-key).d2 { background: var(--c-blue); } :is(.cd-peg, .cd-key).d3 { background: var(--c-green); }
:is(.cd-peg, .cd-key).d4 { background: var(--c-yellow); color: #3b2c00; } :is(.cd-peg, .cd-key).d5 { background: var(--c-purple); } :is(.cd-peg, .cd-key).d6 { background: #ff8f3c; }
.cd-dots { display: inline-grid; grid-template-columns: repeat(2, 10px); gap: 3px; }
.cd-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.cd-dots i.g { background: var(--green); }
.cd-dots i.y { background: var(--yellow); }
.cd-mini { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.cd-mini .cd-dots { grid-template-columns: repeat(4, 5px); gap: 1px; }
.cd-mini .cd-dots i { width: 5px; height: 5px; }
.cd-input { display: grid; gap: 12px; justify-items: center; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cd-input .cd-peg { width: 46px; height: 46px; font-size: 20px; }
.cd-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cd-key { width: 48px; height: 48px; border-radius: 12px; font: 700 18px var(--font-display); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2); }
.cd-key.back { background: var(--surface-3); }
.cd-key:active { transform: scale(0.94); }
.cd-secret { display: grid; justify-items: center; gap: 6px; margin-bottom: 10px; }
.cd-secret small { color: var(--muted); }
.art-code .cd-peg { width: 28px; height: 28px; font-size: 13px; }

@media (max-width: 760px) {
  .wd-play { grid-template-columns: 1fr; }
  .wd-grid { max-width: 360px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  .sp-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .sp-row .avatar { width: 30px; height: 30px; }
  .sp-clues { grid-column: 1 / -1; }
  .bm-seat { width: 76px; }
  .bm-seat .avatar { width: 40px; height: 40px; }
  .bm-syl { font-size: 30px; }
  .es-results li { grid-template-columns: 20px 1fr auto 44px; }
  .es-results em { display: none; }
  .rf .mg-head span:last-child { display: none; }
}
.cl > [data-region="map"] { width: 100%; display: flex; justify-content: center; }
