/* ============================================================
   KAMU BÍRÓSÁG – éjszakai rendőrőrs téma
   Paletta: éjszaka + papír + arany + pecsét-piros + szerepszínek
   ============================================================ */

:root {
  --night: #0b1020;
  --night2: #121a2c;
  --panel: #141a26;
  --line: #2c3a52;

  --paper: #f6efdc;
  --paper2: #ece0be;
  --paper-edge: #d8c9a3;
  --ink: #2b2620;
  --ink-soft: #6b5f4c;

  --gold: #f2c14e;
  --gold2: #d99a2b;
  --gold-dark: #8a6420;

  --red: #e5484d;
  --red-dark: #b3353a;

  --amber: #f5a524;   /* vádlott + pontszám */
  --blue: #3b82f6;    /* védőügyvéd */
  --purple: #a78bfa;  /* esküdtek */
  --green: #22c55e;   /* tanú + ártatlan */

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-disp: 'Oswald', 'Arial Narrow', Impact, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: #e8e6df;
  background:
    radial-gradient(1100px 620px at 72% -12%, rgba(255, 193, 110, 0.17), transparent 62%),
    radial-gradient(760px 480px at 12% 112%, rgba(255, 170, 90, 0.09), transparent 60%),
    radial-gradient(1400px 900px at 50% 50%, rgba(30, 42, 70, 0.35), transparent 75%),
    linear-gradient(180deg, var(--night) 0%, #0e1526 55%, #080c16 100%);
  background-attachment: fixed;
  min-height: 100dvh;
}

.hidden { display: none !important; }

/* ---------------- Képernyők ---------------- */

.screen { display: none; }
.screen.active { display: block; }

#screen-name.active {
  display: flex; flex-direction: column; align-items: center;
  min-height: 100dvh; padding: 30px 16px 40px;
}
#screen-menu.active {
  display: flex; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 24px;
}
#screen-lobby.active { display: block; min-height: 100dvh; }
#screen-game.active {
  display: flex; flex-direction: row;
  height: 100dvh; overflow: hidden;
  /* A tárgyalóterem már csak a színpadon látszik, teljes fényerővel. */
  background: linear-gradient(180deg, #0d1019, #070a12);
}

/* A tárgyalás képernyője három, egymást nem takaró zónából áll:
   A) .stage-zone (színpad) – B) .info-bar (vád + vezérlők) – C) .content-zone. */
.game-main {
  flex: 1; min-width: 0; height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden; overflow-x: hidden;
  padding-right: 296px; /* hely a ponttábla-oldalsávnak (min. 280px) */
}

/* --- B) vékony info-sáv: a vád egy sorban + kör/szobakód/hang --- */
.info-bar {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: rgba(9, 12, 20, 0.94);
  border-top: 1px solid rgba(242, 193, 78, 0.35);
  border-bottom: 1px solid var(--line);
}
.info-bar .round-badge { flex: none; }
.info-bar .code-badge { flex: none; font-size: 17px; letter-spacing: 3px; }
.info-bar #btnMute { flex: none; }
.info-bar .volume { flex: none; }

/* --- C) tartalomzóna: sötét, félig átlátszó, görgethető panel --- */
.content-zone {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 12, 20, 0.88), rgba(7, 9, 15, 0.95));
  scrollbar-width: thin;
}

.accusation-ticker {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: #f0d9a8;
  background: rgba(20, 16, 8, 0.55);
  border: 1px solid rgba(242, 193, 78, 0.35); border-radius: 999px;
  padding: 4px 12px; line-height: 1.35;
  /* A vád max. 2 sorban fér ki – semmi sem tolódik ki alulra. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Kör módjának kis címkéje (melyik pakliból jön minden kártya). */
.mode-chip {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-disp); font-size: 10.5px; letter-spacing: 1.5px;
  color: #241a06; background: var(--gold);
  border: 1px solid var(--gold-dark); border-radius: 4px;
  padding: 1px 8px; margin-left: 8px; white-space: nowrap;
}
.mode-chip.own { background: var(--red); color: #fff; border-color: var(--red-dark); }
.accusation-ticker .mode-chip { margin-left: 4px; }
.case-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
}
.case-row .mode-chip { margin-left: 0; }
.active-modes { color: var(--gold); font-weight: 700; }

/* --- bírói figyelő sáv (csak a bíró kapja a szervertől) ---
   Alapból egy vékony sor; kinyitva LEWERGŐ panel, nem tolja ki a tartalmat. */
.judge-watch-bar {
  position: relative; z-index: 45;
  flex: none;
  display: flex; flex-direction: column; gap: 6px;
  margin: 6px 16px;
}
.jw-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: rgba(30, 22, 6, 0.9);
  border: 1px solid rgba(242, 193, 78, 0.45); border-left: 5px solid var(--gold);
  border-radius: 10px; padding: 6px 12px;
  cursor: pointer;
}
.jw-caret { margin-left: auto; color: var(--gold); font-size: 14px; }
.jw-body {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 60;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  background: rgba(30, 22, 6, 0.97);
  border: 1px solid rgba(242, 193, 78, 0.5); border-left: 5px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65);
  max-height: min(46dvh, 420px); overflow-y: auto; scrollbar-width: thin;
}
.jw-body.collapsed { display: none; }
.jw-label {
  font-family: var(--font-disp); font-size: 13px; letter-spacing: 2px;
  color: var(--gold);
}
.jw-now {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 15px; color: #f4ecd8;
  background: color-mix(in srgb, var(--role, #f2c14e) 18%, rgba(10, 8, 4, 0.6));
  border: 1px solid var(--role, #f2c14e); border-radius: 8px; padding: 8px 12px;
  animation: fade-in 0.3s ease-out;
}
.jw-now b { color: #fff; }
.jw-hard {
  font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  color: #fff; background: var(--red); border-radius: 4px; padding: 2px 6px;
}
.jw-note {
  margin-left: auto; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--gold);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--gold-dark);
  border-radius: 999px; padding: 4px 12px;
}
.jw-note.on { background: var(--gold); color: #241a06; }
.jw-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.jw-item { font-size: 12.5px; color: #cbbd97; }
.jw-item b { color: #f4ecd8; }
.jw-item.noted { text-decoration: underline dotted; }

/* --- A) SZÍNPAD: a tárgyalóterem teljes fényerővel (sötétítő réteg nélkül) --- */
.stage-zone {
  position: relative; flex: none;
  height: clamp(200px, 32dvh, 400px);
  overflow: hidden;
  background: #17110e;
  border-bottom: 2px solid var(--gold-dark);
  container-type: size;
}
/* A színpad méretével egyező vászon; a háttér külön object-fit:cover.
   A karakterek százalékos helyei minden képernyőn a színpadon belül maradnak. */
.stage-canvas {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
}
.stage-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
/* Bútorlapok: pontosan a háttér rajzolt bútorai fölött, így a mögöttük
   álló karakterek (bíró, esküdtek) alsó része természetesen takarásba kerül. */
.furniture { position: absolute; z-index: 4; pointer-events: none; border-radius: 6px; }
.f-bench {       /* bírói pulpitus: x 520–1400, y 440–700 */
  left: 27.08%; top: 40.74%; width: 45.84%; height: 24.07%;
  background: linear-gradient(180deg, rgba(93, 64, 41, 0.94) 0 8%, rgba(74, 50, 32, 0.94) 8% 100%);
  border: 3px solid rgba(22, 13, 6, 0.55);
}
.f-table-left {  /* bal asztal: x 150–450, y 520–700 */
  left: 7.81%; top: 48.15%; width: 15.63%; height: 16.67%;
  background: rgba(58, 39, 24, 0.94); border: 3px solid rgba(22, 13, 6, 0.55);
}
.f-jury {        /* esküdtpad: x 1470–1830, y 470–700 */
  left: 76.56%; top: 43.52%; width: 18.75%; height: 21.3%;
  background: rgba(51, 36, 26, 0.94); border: 3px solid rgba(22, 13, 6, 0.55);
}
.f-table-front { /* vádlottak asztala: x 760–1160, y 720–920 */
  left: 39.58%; top: 66.67%; width: 20.84%; height: 18.52%;
  background: rgba(58, 39, 24, 0.94); border: 3px solid rgba(22, 13, 6, 0.55);
}

.stage-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 40; }
.stage-flash.on { animation: stage-flash 0.9s ease-out; }
@keyframes stage-flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.stage-slots { position: absolute; inset: 0; }
.stage-slot {
  position: absolute;
  left: var(--x); bottom: var(--b);
  height: var(--h); width: auto;
  transform: translateX(-50%);
  z-index: var(--z, 3);
  transition: transform 0.45s cubic-bezier(.22,1,.36,1), filter 0.45s ease;
}

/* Mozgás csökkentése: a slot átmenete csak színre korlátozódik
   (a JS a bólogatást/lezlegzést kikapcsolja, a glow megmarad). */
@media (prefers-reduced-motion: reduce) {
  .stage-slot { transition: filter 0.45s ease; }
}
.st-fig {
  height: 100%; position: relative; overflow: hidden;
  transform-origin: 50% 100%; /* a lélegzés/bólogatás a talpunknál legyen a tengely */
  will-change: transform;
}
.st-fig img {
  position: absolute; left: 0; top: 0;
  height: 100%; width: auto; display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)) brightness(0.9) saturate(0.92);
  transition: filter 0.45s ease;
}

/* Reakció-buborék a karakter feje fölött (0,8 mp). */
.char-bubble {
  position: absolute; left: 50%; top: -6%;
  transform: translateX(-50%) scale(0.6);
  font-size: clamp(13px, 2.4vh, 22px);
  pointer-events: none; opacity: 0; z-index: 4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.char-bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.stage-slot.dim { transform: translateX(-50%) scale(0.92); filter: brightness(0.55) saturate(0.65); }
.stage-slot.speaking {
  transform: translateX(-50%) scale(1.25);
  z-index: 30;
  animation: speaker-hop 0.45s cubic-bezier(.22,1.4,.36,1);
}
.stage-slot.speaking .st-fig img {
  filter:
    drop-shadow(0 0 18px var(--glow))
    drop-shadow(0 0 44px color-mix(in srgb, var(--glow) 70%, transparent))
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
  animation: glow-pulse 2.2s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 0 34px color-mix(in srgb, var(--glow) 60%, transparent)) drop-shadow(0 10px 16px rgba(0,0,0,0.5)); }
  50% { filter: drop-shadow(0 0 26px var(--glow)) drop-shadow(0 0 60px color-mix(in srgb, var(--glow) 75%, transparent)) drop-shadow(0 10px 16px rgba(0,0,0,0.5)); }
}
@keyframes speaker-hop {
  0% { transform: translateX(-50%) translateY(10px) scale(0.96); }
  60% { transform: translateX(-50%) translateY(-6px) scale(1.05); }
  100% { transform: translateX(-50%) scale(1.25); }
}
/* A beszélő saját képernyőjén a figura körül világít a keret (a színpadon belül). */
.stage-slot.mine::after {
  content: ''; position: absolute; inset: -3% -12%; pointer-events: none; z-index: 1;
  border: 3px solid var(--glow); border-radius: 16px;
  box-shadow: 0 0 34px color-mix(in srgb, var(--glow) 55%, transparent),
    inset 0 0 40px color-mix(in srgb, var(--glow) 22%, transparent);
  animation: fade-in 0.5s ease-out;
}

/* Névcímkék a színpadon belül; ütközésveszélyes (kis) szereplőknél csak avatar. */
.st-tag {
  position: absolute; left: 50%; bottom: 1.5%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  max-width: 260%; overflow: hidden; text-overflow: ellipsis;
  font-size: clamp(9px, 1.5vh, 13px); font-weight: 700; color: #f0ead8;
  background: rgba(10, 12, 20, 0.8);
  border: 1px solid color-mix(in srgb, var(--glow, #f2c14e) 55%, var(--line));
  border-radius: 999px; padding: 2px 9px;
}
.st-tag .st-av { font-size: 1.2em; flex: none; }
.st-tag.mini { padding: 2px 6px; overflow: visible; }
.st-tag.mini .st-name { display: none; }
/* Esküdtnév: hover / koppintásra bújik elő a fej fölé. */
.st-tag.mini .st-name {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; color: #f0ead8;
  background: rgba(10, 12, 20, 0.95); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 8px; z-index: 2;
}
.stage-slot[data-role="juror"]:hover .st-tag.mini .st-name { display: block; }
.stage-jury-more {
  position: absolute; left: var(--x); bottom: var(--b); transform: translateX(-50%);
  font-family: var(--font-disp); font-size: clamp(10px, 1.7vh, 15px);
  color: var(--gold); background: rgba(10, 12, 20, 0.85);
  border: 1px solid var(--gold-dark); border-radius: 999px; padding: 1px 8px;
  z-index: 3;
}
/* Mobil: a beszélő neve a színpad alján egy sávban (desktopon nincs). */
.stage-speaker-strip { display: none; }

/* --- inline akciógombok a tartalomban (nincs alsó sáv) --- */
.inline-actions { display: flex; justify-content: center; gap: 14px; margin: 14px 0 6px; }

/* ============================================================
   PONTTÁBLA-OLDALSÁV (desktopon jobb oldalt, mobilon felcsúszó)
   ============================================================ */

.score-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: 296px; /* min. 280px – a teljes név és szerepcímke levágás nélkül kifér */
  display: flex; flex-direction: column;
  background: rgba(10, 13, 22, 0.86);
  backdrop-filter: blur(6px);
  border-left: 1px solid var(--gold-dark);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
}
.sb-inner { display: flex; flex-direction: column; height: 100%; padding: 14px 12px 12px; min-height: 0; }
.sb-title {
  font-family: var(--font-disp); font-size: 17px; letter-spacing: 2px;
  color: var(--gold); text-align: center; margin-bottom: 10px;
  border-bottom: 1px dashed var(--gold-dark); padding-bottom: 8px;
}
.sb-rows { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.sb-row {
  position: relative;
  display: grid; grid-template-columns: 20px 26px 1fr auto auto;
  align-items: center; gap: 8px;
  background: rgba(26, 32, 48, 0.75); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px;
}
/* Két soros elrendezés: felül név (+host/off), alul szerepcímke. */
.sb-mid { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sb-sub { display: inline-flex; align-items: center; gap: 6px; }
.sb-row.is-judge { border-color: var(--gold); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
.sb-judge-hammer { font-style: normal; font-size: 13px; line-height: 1; }
.sb-row.me { border-color: var(--gold); background: rgba(48, 40, 18, 0.6); }
.sb-row.flash { animation: row-flash 1s ease-out; }
@keyframes row-flash {
  0% { background: rgba(242, 193, 78, 0.45); transform: scale(1.05); }
  100% { background: rgba(26, 32, 48, 0.75); transform: scale(1); }
}
.sb-rank { font-family: var(--font-disp); font-size: 13px; color: #8b93a8; text-align: right; }
.sb-av { font-size: 19px; text-align: center; }
.sb-name { font-size: 13.5px; font-weight: 700; color: #e8e6df; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-host { font-style: normal; font-size: 11px; }
.sb-off { font-style: normal; color: var(--red); }
.sb-role {
  font-family: var(--font-disp); font-size: 11px; letter-spacing: 1.2px;
  color: #10131c; background: var(--role, #f2c14e);
  border-radius: 4px; padding: 2px 6px;
  white-space: nowrap;
}
/* Bíró = arany címke (a --role a JS-ben 'judge' kulcsra #f2c14e-t ad). */
.sb-score { font-family: var(--font-disp); font-size: 21px; color: var(--amber); min-width: 26px; text-align: right; }
.sb-delta {
  position: absolute; right: 8px; top: -10px;
  font-family: var(--font-disp); font-size: 15px; color: #7ee787;
  text-shadow: 0 1px 3px #000; animation: delta-float 1.4s ease-out forwards;
  pointer-events: none;
}
@keyframes delta-float {
  0% { opacity: 0; transform: translateY(6px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px); }
}
.sb-reactions {
  flex: none; display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px; margin-top: 10px;
  border-top: 1px dashed var(--gold-dark); padding-top: 10px;
}
.sb-toggle { display: none; }

/* ============================================================
   JÁTÉKLEÍRÁS: "i" gomb + modal
   ============================================================ */

.info-btn {
  position: fixed; top: 12px; right: 12px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  font-family: Georgia, serif; font-style: italic; font-size: 22px; font-weight: 700;
  color: #241a06; background: var(--gold);
  border: 2px solid var(--gold-dark); cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}
.info-btn:hover { transform: scale(1.1) rotate(6deg); }
/* A játékképernyőn az "i" a vád-sávban ül, nem lebeg a színpad fölött. */
#screen-game.active .info-btn {
  position: static; flex: none;
  width: 34px; height: 34px; font-size: 17px;
}

.help-modal {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 5, 10, 0.72); padding: 18px;
}
.help-panel {
  display: flex; flex-direction: column;
  width: min(760px, 94vw); max-height: 88dvh;
  background:
    repeating-linear-gradient(0deg, rgba(120, 90, 40, 0.05) 0 2px, transparent 2px 4px),
    var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper-edge); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  position: relative;
}
.help-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 2px solid var(--gold-dark);
}
.help-head h2 { font-family: var(--font-disp); font-size: 22px; letter-spacing: 1px; flex: 1; }
.help-stamp {
  font-family: var(--font-disp); font-size: 12px; letter-spacing: 2px;
  color: var(--red); border: 2px solid var(--red);
  border-radius: 6px; padding: 2px 8px; transform: rotate(-4deg);
  opacity: 0.85;
}
.help-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px 20px; }
.help-sec { margin-bottom: 16px; }
.help-sec h3 {
  font-family: var(--font-disp); font-size: 17px; letter-spacing: 1px;
  color: var(--gold-dark); margin-bottom: 6px;
  border-bottom: 1px solid rgba(138, 100, 32, 0.35); padding-bottom: 4px;
}
.help-sec p, .help-sec li { font-size: 15px; line-height: 1.55; }
.help-sec ul { padding-left: 20px; margin: 6px 0; }
.help-sec li { margin: 3px 0; }
.help-foot { padding: 12px 18px; border-top: 1px solid var(--paper-edge); }

/* ============================================================
   KIHÍVÁS-ELLENŐRZÉS (bírói döntés) képernyő
   ============================================================ */

.review-counter {
  display: inline-flex; align-items: center;
}
.review-counter span {
  font-family: var(--font-disp); font-size: 14px; letter-spacing: 2px;
  color: var(--gold); background: rgba(242, 193, 78, 0.1);
  border: 1px solid var(--gold-dark); border-radius: 999px; padding: 2px 14px;
}
.review-head {
  font-family: var(--font-disp); font-size: clamp(22px, 4vw, 34px);
  letter-spacing: 3px; color: var(--gold); text-align: center;
}
.review-head span { font-size: 0.6em; color: #b9a87c; }
.review-note { text-align: center; font-size: 14px; color: #f0ead8; margin: 2px 0 8px; }
.review-card {
  position: relative; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--paper-edge); border-left: 6px solid var(--role, var(--gold));
  border-radius: 8px; padding: 18px 18px 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  animation: card-flip 0.5s cubic-bezier(.22,1,.36,1);
}
.review-card .card-type {
  align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 1px;
  color: #fff; border-radius: 4px; padding: 3px 8px;
}
.review-text { font-size: clamp(17px, 3.4dvh, 21px); font-weight: 700; line-height: 1.35; }
.review-who { font-size: 14px; color: var(--ink-soft); }
.review-noted {
  align-self: flex-start; font-size: 12.5px; font-weight: 700;
  color: #1c7c35; background: rgba(28, 124, 53, 0.12);
  border: 1px solid #1c7c35; border-radius: 6px; padding: 3px 8px;
}
.review-buttons { display: flex; justify-content: center; gap: 16px; margin: 16px 0 4px; }
.review-result { text-align: center; font-family: var(--font-disp); font-size: 22px; letter-spacing: 1px; margin: 12px 0 4px; }
.review-result.ok { color: #7ee787; }
.review-result.no { color: var(--red); }
.fun-vote {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; font-size: 14px; color: #cbbd97;
}
.fun-counts { font-weight: 700; color: #f0ead8; }

/* lobby: kihívás-ellenőrzés mód választó */
.judge-mode-row { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.judge-mode-row .check.radio { font-weight: 600; }

/* ---------------- Állomás-fejléc ---------------- */

.station-header { text-align: center; margin-bottom: 26px; }

.logo {
  font-family: var(--font-disp);
  font-size: clamp(38px, 7vw, 64px);
  letter-spacing: 6px;
  color: var(--gold);
  text-shadow: 0 2px 0 #4a3410, 0 6px 22px rgba(242, 193, 78, 0.25);
}
.logo.small { font-size: 30px; letter-spacing: 4px; }

.police-line {
  display: inline-block;
  margin-top: 8px; padding: 3px 14px;
  font-size: 12px; letter-spacing: 3px; font-weight: 600;
  color: #ffd9d9;
  background: repeating-linear-gradient(-45deg, var(--red) 0 12px, #7e1d1d 12px 24px);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.subtitle {
  margin-top: 14px;
  font-family: var(--font-disp);
  font-size: clamp(17px, 3vw, 24px);
  letter-spacing: 2px;
  color: #f0e8d2;
}

/* ============================================================
   GOMBOK (arany/rendőrségi)
   ============================================================ */

.btn {
  font-family: var(--font-disp);
  font-size: 16px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #2b2010;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold2) 100%);
  border: 1px solid #5a4322; border-radius: 10px;
  padding: 12px 22px; cursor: pointer;
  box-shadow: 0 3px 0 #7a5a1c, 0 5px 12px rgba(0, 0, 0, 0.35);
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a5a1c; }
.btn:disabled { filter: grayscale(0.7) brightness(0.7); cursor: not-allowed; }

.btn.big { font-size: 22px; padding: 16px 34px; border-radius: 12px; }
.btn.small { font-size: 13px; padding: 8px 14px; }
.btn.tiny { font-size: 14px; padding: 5px 10px; box-shadow: none; }
.btn.full { width: 100%; }

.btn.ghost {
  background: transparent; color: #d7c9a8;
  border: 1px solid #5a5140; box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn.green { background: linear-gradient(180deg, #57d06b, #2e9e4a); color: #08280f; border-color: #1d6b33; box-shadow: 0 3px 0 #1a5a2e; }
.btn.red { background: linear-gradient(180deg, #f0655f, #d33a35); color: #fff; border-color: #7e1d1d; box-shadow: 0 3px 0 #7e1d1d; }
.btn.blue { background: linear-gradient(180deg, #6ea8ff, #3b82f6); color: #0a1c3a; border-color: #1e4f9e; box-shadow: 0 3px 0 #1e4f9e; }

/* ---------------- Inputok ---------------- */

input, textarea, select {
  font-family: var(--font-body); font-size: 15px;
  color: #f0ead8; background: rgba(8, 12, 22, 0.75);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.2); }
textarea { width: 100%; resize: vertical; }
.volume { accent-color: var(--gold); width: 90px; }

.hint { font-size: 13px; color: #9aa2b5; margin-top: 8px; }
.error { color: #ff8f8f; font-size: 14px; min-height: 20px; margin-top: 8px; }

/* ---------------- Toast ---------------- */

#toastBox {
  position: fixed; top: 18px; left: 50%; transform: translate(-50%, -80px);
  z-index: 120; max-width: 90vw;
  background: #1d1408; color: #ffe1a8;
  border: 1px solid var(--gold2); border-left: 5px solid var(--gold2);
  border-radius: 10px; padding: 12px 20px;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}
#toastBox.visible { transform: translate(-50%, 0); }

/* QR-kód a lobby fejlécében: telefonnal beolvasva azonnal csatlakozik.
   Kattintásra nagyít. */
.qr-box {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: #fdf6e3;
  border: 2px solid #6d4c41;
  border-radius: 10px;
  padding: 5px 5px 3px;
  cursor: zoom-in;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  transition: width 0.18s ease, height 0.18s ease;
  width: 96px;
}
.qr-box img {
  width: 84px;
  height: 84px;
  display: block;
  image-rendering: pixelated;
}
.qr-box .qr-label {
  font-size: 8.5px;
  font-weight: 700;
  color: #6d4c41;
  text-align: center;
  letter-spacing: 0.2px;
}
.qr-box.big { width: 260px; cursor: zoom-out; }
.qr-box.big img { width: 240px; height: 240px; }
.qr-box.big .qr-label { font-size: 12px; }

/* ============================================================
   1. KÉPERNYŐ: bögrefotó-névválasztó
   ============================================================ */

.mug-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 22px 20px; width: 100%; max-width: 1150px;
}

.mug-card {
  position: relative;
  min-height: 300px;
  padding: 26px 14px 16px 52px;
  border-radius: 6px;
  border: 1px solid #b9a87c;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  /* magasságmérő csík + papír */
  background:
    repeating-linear-gradient(180deg, transparent 0 32px, rgba(90, 70, 40, 0.35) 32px 33px),
    linear-gradient(90deg, rgba(122, 95, 50, 0.22) 0 40px, transparent 40px),
    radial-gradient(circle at 80% 12%, #faf3e0, var(--paper) 55%, var(--paper2));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(120, 90, 40, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.mug-card::before {
  content: '';
  position: absolute; left: 14px; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, var(--ink-soft) 0 10px, transparent 10px 32px);
  opacity: 0.6;
}
.mug-card:hover:not(.taken) {
  transform: rotate(-1.4deg) translateY(-4px);
  border-color: var(--gold2);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
}

.mug-mono {
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: 44px; color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.mug-name {
  font-family: var(--font-disp); font-size: 21px; letter-spacing: 1px;
  color: var(--ink); background: #efe4c4;
  border: 1px solid #b9a87c; border-radius: 4px;
  padding: 4px 12px; min-width: 70%; line-height: 1.2;
}
.mug-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: #fff; background: var(--red);
  padding: 3px 10px; border-radius: 999px;
}
.mug-title { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.mug-stats { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.4px; }

.mug-card.taken { filter: grayscale(0.9) brightness(0.75); cursor: not-allowed; }
.mug-card.chosen { border: 3px solid var(--red); }

.mug-taken, .p-offline {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 14, 20, 0.55); border-radius: inherit;
}
.mug-taken span, .p-offline span {
  font-family: var(--font-disp); font-size: 19px; letter-spacing: 3px;
  color: #ffd7d7; background: rgba(140, 30, 30, 0.92);
  border: 2px dashed #ff9c9c; border-radius: 6px; padding: 8px 16px;
  transform: rotate(-8deg);
}

.new-suspect-box { margin-top: 30px; text-align: center; }
.guest-form {
  margin-top: 14px; display: flex; flex-direction: column; gap: 10px;
  align-items: center; background: rgba(10, 14, 24, 0.7);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.guest-form input { width: min(320px, 80vw); text-align: center; }
.guest-form p { font-size: 13px; color: #9aa2b5; }
.avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.avatar-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: #b9c1d4; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; min-width: 76px;
  background: rgba(20, 26, 38, 0.8);
}
.avatar-cell .emoji { font-size: 26px; }
.avatar-cell:hover { border-color: var(--gold); }
.avatar-cell.selected { border-color: var(--red); background: rgba(229, 72, 77, 0.12); }
.guest-prior { font-size: 13px; color: var(--gold); min-height: 18px; }

/* ============================================================
   2. KÉPERNYŐ: menü (faburkolat)
   ============================================================ */

.wood-panel {
  width: min(460px, 94vw);
  display: flex; flex-direction: column; gap: 14px;
  padding: 30px 28px; border-radius: 16px;
  background:
    linear-gradient(rgba(20, 12, 4, 0.35), rgba(20, 12, 4, 0.35)),
    repeating-linear-gradient(88deg, #3c2c1a 0 16px, #463420 16px 26px, #3a2a18 26px 44px);
  border: 1px solid #20150a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), inset 0 0 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.wood-panel label { font-size: 14px; color: #d8cdb2; text-align: left; }
.wood-panel input { text-align: center; font-size: 20px; letter-spacing: 6px; }
.divider { color: #a89877; font-size: 13px; letter-spacing: 2px; }

/* ============================================================
   3. KÉPERNYŐ: lobby
   ============================================================ */

.lobby-wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px 76px; }

.casefile-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.casefile-box {
  display: flex; flex-direction: column; gap: 2px;
  background: #171e2c; border: 1px solid var(--gold-dark);
  border-radius: 10px; padding: 8px 16px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}
.casefile-label { font-size: 10px; letter-spacing: 2.5px; color: #9aa2b5; }
.code-badge {
  font-family: var(--font-disp); font-size: 30px; letter-spacing: 6px;
  color: var(--gold); line-height: 1.1;
}
.round-badge {
  font-family: var(--font-disp); font-size: 15px; letter-spacing: 2px;
  color: var(--gold); background: rgba(242, 193, 78, 0.1);
  border: 1px solid var(--gold-dark); border-radius: 6px; padding: 4px 10px;
}
.casefile-header .btnLeaveLobby,
#btnLeaveLobby { margin-left: auto; }

/* --- faliújság --- */

.board {
  position: relative;
  background: linear-gradient(180deg, #151d2c, #101827);
  border: 1px solid var(--line);
  outline: 6px solid #2a2014; outline-offset: -2px;
  border-radius: 14px;
  padding: 20px 22px 26px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 0 70px rgba(0, 0, 0, 0.45);
}
.board-title {
  font-family: var(--font-disp); font-size: clamp(19px, 3vw, 26px);
  letter-spacing: 3px; color: var(--gold); text-align: center;
  padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 3px double var(--gold-dark);
}
.lobby-hint { text-align: center; margin-top: 14px; color: #ffb3b3; font-size: 14px; min-height: 20px; }

.pin-wall {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 30px 26px; min-height: 120px;
}
[data-poster] { position: relative; z-index: 1; }

svg.pin-threads { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
svg.pin-threads path { stroke: var(--red-dark); stroke-width: 2.5px; fill: none; opacity: 0.85; }
svg.pin-threads circle { fill: var(--red-dark); stroke: #7e1d1d; stroke-width: 1.5px; }

/* --- körözési plakát --- */

.poster {
  position: relative;
  width: clamp(205px, 23vw, 252px);
  padding: 46px 14px 14px;
  border-radius: 3px;
  border: 1px solid #b9a87c;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; color: var(--ink);
  transform: rotate(var(--tilt, 0deg));
  animation: poster-pin 0.5s cubic-bezier(0.18, 1.4, 0.4, 1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* papír textúra */
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 86% 92%, rgba(120, 90, 40, 0.14), transparent 46%),
    repeating-linear-gradient(0deg, rgba(110, 85, 40, 0.05) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #f7f0dd, var(--paper2));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55), inset 0 0 30px rgba(120, 90, 40, 0.15);
}
.poster:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.65); }
.poster::before {
  content: '';
  position: absolute; top: 9px; left: 50%; margin-left: -9px;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, #c62f2f 58%, #7e1d1d);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5), inset 0 -2px 3px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.p-wanted {
  font-family: var(--font-disp); font-size: 13px; letter-spacing: 4px;
  color: var(--red-dark);
  border-bottom: 2px solid var(--red-dark);
  padding: 0 10px 2px;
}
.p-name {
  font-family: var(--font-disp); font-size: 26px; line-height: 1.12;
  letter-spacing: 1px; color: var(--ink);
  margin-top: 2px; max-width: 100%; overflow-wrap: break-word;
}
.p-badge-row { min-height: 20px; display: flex; }
.p-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: #fff; background: var(--red); border-radius: 999px; padding: 3px 10px;
}
.p-title { font-size: 13px; font-style: italic; color: var(--ink-soft); }
.p-priors { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.p-reward {
  font-family: var(--font-disp); font-size: 16px; letter-spacing: 1px;
  color: var(--red-dark); margin-top: 4px;
}
.p-record { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.4px; }

.p-stamp {
  position: absolute; z-index: 2;
  font-family: var(--font-disp); font-size: 9.5px; letter-spacing: 1.6px;
  color: #fff; background: rgba(179, 53, 58, 0.94);
  border: 1.5px solid rgba(255, 210, 210, 0.75);
  border-radius: 3px; padding: 3px 7px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.p-stamp.host { top: 12px; right: 10px; transform: rotate(7deg); }
.p-stamp.bot { top: 12px; left: 10px; transform: rotate(-7deg); }
.p-stamp.enemy { top: 40px; right: 10px; transform: rotate(4deg); background: #8c1d1d; }

/* --- ügyiratmappa (játékmódok + beállítások) --- */

.folder {
  margin-top: 22px; position: relative;
  background: linear-gradient(180deg, #e9dcb2, #dccb98);
  border: 1px solid #a08b58; border-radius: 10px;
  padding: 56px 22px 22px; color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.folder-tab {
  position: absolute; top: -16px; left: 18px;
  font-family: var(--font-disp); font-size: 14px; letter-spacing: 2.5px;
  color: #3d2f1f; background: linear-gradient(180deg, #f2e7c2, #dccd9e);
  border: 1px solid #a08b58; border-bottom: none;
  border-radius: 8px 8px 0 0; padding: 7px 18px 22px;
}
.folder-heading {
  font-family: var(--font-disp); font-size: 17px; letter-spacing: 1.5px;
  color: #4a3a20; margin: 16px 0 10px;
}
.folder-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.case-tab {
  position: relative; cursor: pointer; text-align: left;
  font-family: var(--font-disp); font-size: 15px; letter-spacing: 1.5px;
  color: #4a3a20;
  background: linear-gradient(180deg, #f4e9c4, #e5d5a4);
  border: 2px solid #a08b58; border-radius: 8px;
  padding: 16px 12px 14px 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, border-color 0.15s;
  overflow: hidden; min-height: 64px;
}
.case-tab::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--gold2), var(--gold-dark));
}
.case-tab:hover { transform: translateY(-2px); }
.case-tab.active-case { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 4px 10px rgba(0, 0, 0, 0.3); }
.case-stamp {
  position: absolute; top: 7px; right: 7px;
  font-size: 9px; letter-spacing: 1.6px; color: #fff;
  background: rgba(179, 53, 58, 0.95); border: 1.5px solid rgba(255, 210, 210, 0.7);
  border-radius: 3px; padding: 2px 6px;
  transform: rotate(6deg);
  opacity: 0; transform-origin: center; scale: 1.4; transition: opacity 0.15s, scale 0.15s;
}
.case-tab.active-case .case-stamp { opacity: 1; scale: 1; }

.settings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px; margin-top: 14px;
}
.settings-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #4a3a20; }
.settings-grid input[type='number'] { color: var(--ink); background: #fdf8ea; border-color: #a08b58; width: 100%; }
.settings-grid .check { flex-direction: row; align-items: center; gap: 8px; }
.settings-grid input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--red); }

#customAccusations { margin-top: 4px; color: var(--ink); background: #fdf8ea; border-color: #a08b58; }

.folder .hint { color: #6e5c38; }
.folder .btn { margin-top: 12px; margin-right: 8px; }
.folder .btn.ghost { color: #6e5c38; border-color: #a08b58; }

.waiting-note {
  margin: 26px auto 0; text-align: center; max-width: 560px;
  font-family: var(--font-disp); font-size: 18px; letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(20, 26, 38, 0.8); border: 1px dashed var(--gold-dark);
  border-radius: 12px; padding: 18px;
}

/* --- hírszalag --- */

.ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  background: #12100c; border-top: 1px solid var(--red);
  padding: 7px 12px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.5);
}
.ticker-label {
  font-family: var(--font-disp); font-size: 12px; letter-spacing: 2px;
  color: #fff; background: var(--red);
  border-radius: 4px; padding: 3px 9px; white-space: nowrap;
}
.ticker-viewport { overflow: hidden; flex: 1; }
.ticker-track {
  display: inline-block; white-space: nowrap;
  font-size: 13.5px; letter-spacing: 0.6px; color: #cdbfa4;
  animation: ticker-scroll 18s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ============================================================
   4. KÉPERNYŐ: tárgyalóterem
   ============================================================ */

/* --- bíró a színpadon: a pulpitus mögül emelkedik ki, kalapáccsal --- */

.judge-slot { --x: 50%; --b: 38.9%; --h: 32%; --z: 2; }
.judge-svg { width: auto; height: 100%; display: block; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6)); }
.judge-slot .st-fig { overflow: visible; }
.judge-slot .judge-svg { position: absolute; left: 0; top: 0; transition: opacity 0.07s linear, filter 0.45s ease; }
.judge-slot.round-judge .judge-svg {
  filter: drop-shadow(0 0 18px #f2c14e) drop-shadow(0 6px 12px rgba(0,0,0,0.6));
}

/* A "Mozgás csökkentése" kapcsoló állapota. */
#btnReduceMotion.active {
  background: rgba(242, 193, 78, 0.22);
  border-color: #f2c14e;
  color: #f2c14e;
}
.gavel { position: absolute; right: -14%; top: 2%; font-size: clamp(13px, 2.2vh, 26px); transform-origin: 20% 90%; }
.judge-slot.smash .gavel { animation: gavel-hit 0.5s ease-in; }
.judge-slot.smash .judge-svg { animation: judge-shake 0.5s ease-in-out; }

/* Bírói üzenet: a színpadon, a bíró feje fölött, max. 2 sorban. */
.judge-bubble {
  position: absolute; left: 50%; top: 3%; transform: translateX(-50%);
  z-index: 50; width: max-content; max-width: 40%;
  background: var(--paper); color: var(--ink);
  border: 1px solid #b9a87c; border-radius: 12px;
  padding: 7px 14px; font-size: clamp(11px, 1.9vh, 15.5px); font-weight: 600; line-height: 1.35;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  text-align: center; pointer-events: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.judge-bubble:empty { display: none; }
.judge-bubble::before {
  content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -10px;
  border: 10px solid transparent; border-top-color: var(--paper); border-bottom: none;
}

.judge-bubble.flash { animation: bubble-pop 0.35s ease-out; }
.judge-bubble .rb-ok { color: #1c7c35; }
.judge-bubble .rb-no { color: var(--red-dark); }

/* --- fázisbanner: szerepszínnel, EGY sorban (a fázis egyetlen címe) --- */

.role-banner {
  flex: none;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 2px 18px;
  padding: 6px 16px 8px; text-align: center;
  --role: var(--gold);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--role) 24%, rgba(10, 14, 22, 0.9)) 0%,
    rgba(10, 14, 22, 0.55) 55%,
    rgba(10, 14, 22, 0.85) 100%);
  border-bottom: 3px solid var(--role);
}
.role-banner.neutral { --role: var(--gold); }
.role-banner.prosecutor { --role: var(--red); }
.role-banner.defendant { --role: var(--amber); }
.role-banner.defender { --role: var(--blue); }
.role-banner.witness { --role: var(--green); }
.role-banner.juror { --role: var(--purple); }

.rb-title {
  font-family: var(--font-disp);
  font-size: clamp(18px, 3.4dvh, 34px);
  letter-spacing: 3px; line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 22px color-mix(in srgb, var(--role) 65%, transparent), 0 2px 0 rgba(0, 0, 0, 0.6);
}
.rb-speaker {
  display: flex; align-items: center; gap: 8px;
  font-size: clamp(13px, 2.2dvh, 19px); font-weight: 700; color: #e8e6df;
}
.rb-avatar { font-size: clamp(20px, 3.4dvh, 28px); }

/* --- fázistartalom: a maradék hely, függőlegesen középre igazítva --- */

.phase-content {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 12px; text-align: center;
  padding: 14px 16px 18px;
}
.phase-content.enter > * { animation: fade-up 0.4s ease-out; }

/* Beszéd-fázisok: gyűrű + gomb egymás mellett (telefonon alatta). */
.speech-row {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; flex-wrap: wrap; width: 100%;
}
/* Felkészülés: gyűrű + titkos kártyák egymás mellett. */
.prep-row {
  display: flex; align-items: center; justify-content: center;
  gap: 26px; flex-wrap: wrap; width: 100%;
}
.prep-row .cards-row { justify-content: center; }

.speaker-title {
  font-family: var(--font-disp); font-size: clamp(24px, 4.6vw, 42px);
  letter-spacing: 3px; color: var(--gold);
}
.speaker-name { font-size: clamp(17px, 2.6vw, 24px); font-weight: 700; color: #f0ead8; }
.case-no {
  font-family: var(--font-disp); font-size: 15px; letter-spacing: 3px;
  color: var(--gold); background: rgba(242, 193, 78, 0.08);
  border: 1px dashed var(--gold-dark); border-radius: 6px; padding: 4px 14px;
}
.next-step { font-size: 16px; line-height: 1.5; color: #b6bdcd; max-width: 640px; }
.drumroll {
  font-family: var(--font-disp); font-size: clamp(28px, 6vw, 52px);
  letter-spacing: 4px; color: var(--gold);
  animation: pulse-gold 1.1s ease-in-out infinite;
}
.favorite-note { color: var(--amber); font-weight: 700; font-size: 15px; }

/* --- vádkártya (ügyirat-lap) --- */

.accusation-card {
  position: relative; max-width: 720px; width: 100%;
  font-size: clamp(19px, 3vw, 27px); font-weight: 700; line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.5), transparent 40%),
    repeating-linear-gradient(0deg, rgba(110, 85, 40, 0.05) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #f7f0dd, var(--paper2));
  border: 1px solid #b9a87c; border-radius: 6px;
  padding: 30px 34px 40px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  transform: rotate(-0.6deg);
}
.accusation-card::after {
  content: 'VÁD';
  position: absolute; right: 14px; bottom: 10px;
  font-family: var(--font-disp); font-size: 22px; letter-spacing: 4px;
  color: rgba(179, 53, 58, 0.8);
  border: 3px solid rgba(179, 53, 58, 0.7); border-radius: 6px;
  padding: 2px 12px; transform: rotate(-9deg);
}

/* --- titkos kártyák --- */

.cards-heading {
  font-family: var(--font-disp); font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 2px; color: var(--gold);
}
.cards-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  perspective: 900px;
}
.secret-card {
  position: relative; width: min(300px, 88vw); min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 30px 18px 26px;
  color: var(--ink); text-align: center;
  background:
    radial-gradient(circle at 85% 90%, rgba(120, 90, 40, 0.12), transparent 45%),
    linear-gradient(180deg, #f7f0dd, var(--paper2));
  border: 1px solid #b9a87c; border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(120, 90, 40, 0.12);
}
.secret-card.single { margin: 4px auto; }
.secret-card.reveal { animation: card-flip 0.55s ease-out; }
.card-type {
  position: absolute; top: -12px;
  font-family: var(--font-disp); font-size: 13px; letter-spacing: 2px;
  color: #fff; background: var(--red);
  border-radius: 999px; padding: 4px 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.card-type.t-evidence { background: var(--red); }
.card-type.t-alibi { background: var(--amber); color: #2b2010; }
.card-type.t-trick { background: var(--blue); }
.card-type.t-witness { background: var(--green); color: #05230f; }
.card-type.t-challenge { background: var(--purple); color: #1d1440; }
.card-text { font-size: 20px; font-weight: 700; line-height: 1.4; }
.card-stamp {
  position: absolute; right: 10px; bottom: 8px;
  font-family: var(--font-disp); font-size: 12px; letter-spacing: 2.5px;
  color: rgba(179, 53, 58, 0.55);
  border: 2px solid rgba(179, 53, 58, 0.45); border-radius: 4px;
  padding: 1px 8px; transform: rotate(-10deg);
}
.only-you {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: 3px;
  color: #ffb1b1; background: rgba(179, 53, 58, 0.16);
  border: 1px dashed var(--red); border-radius: 999px;
  padding: 4px 14px;
}

/* --- visszaszámláló-gyűrű --- */

.timer-ring {
  position: relative;
  width: clamp(80px, 16dvh, 160px); height: clamp(80px, 16dvh, 160px); flex: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.tr-bg { stroke: rgba(255, 255, 255, 0.12); }
.tr-fg { stroke: var(--gold); transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.timer-ring.warn .tr-fg { stroke: var(--amber); }
.timer-ring.danger .tr-fg { stroke: var(--red); }
.timer-ring.danger { animation: ring-pulse 1s ease-in-out infinite; }
.tr-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: clamp(18px, 4.2dvh, 27px); letter-spacing: 1px; color: #fff;
}

/* --- szavazás --- */

/* SZAVAZÁS: a két gomb EGYMÁS MELLETT, egyenlő szélességben, a
   tartalom nagy részét kitöltve – mindig egy képernyőn. */
.vote-buttons { display: flex; gap: 18px; justify-content: center; width: min(900px, 100%); }
.vote-btn {
  flex: 1 1 0; max-width: none; min-height: clamp(64px, 22dvh, 240px);
  font-family: var(--font-disp); font-size: clamp(24px, 6dvh, 40px); letter-spacing: 3px;
  border-radius: 14px; cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.vote-btn:active { transform: scale(0.97); }
.vote-btn.guilty {
  color: #fff; background: linear-gradient(180deg, #f0655f, #c22f2b);
  border: 2px solid #7e1d1d; box-shadow: 0 5px 0 #6e1616, 0 10px 24px rgba(194, 47, 43, 0.35);
}
.vote-btn.guilty:hover { filter: brightness(1.12); }
.vote-btn.not-guilty {
  color: #06280f; background: linear-gradient(180deg, #57e077, #22a34a);
  border: 2px solid #146b32; box-shadow: 0 5px 0 #0f5427, 0 10px 24px rgba(34, 163, 74, 0.3);
}
.vote-btn.not-guilty:hover { filter: brightness(1.08); }
.vote-btn.chosen { outline: 4px solid var(--gold); outline-offset: 3px; }
.vote-status {
  font-family: var(--font-disp); font-size: 18px; letter-spacing: 2px;
  color: var(--gold); background: rgba(242, 193, 78, 0.08);
  border: 1px solid var(--gold-dark); border-radius: 8px; padding: 6px 16px;
}

.challenge-results {
  width: 100%; max-width: 680px;
  background: rgba(16, 22, 34, 0.85); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; text-align: left;
}
.challenge-results .cr { font-size: 16px; line-height: 1.5; margin: 6px 0; color: #dde3ef; }
.challenge-results .ok { color: var(--green); font-weight: 700; }
.challenge-results .no { color: var(--red); font-weight: 700; }

/* --- ítélet: egy képernyőn – felül görgethető tartalom, alul fix TOVÁBB --- */

.verdict-screen {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column;
  gap: 10px; padding: 14px 20px 12px; overflow: hidden;
  background: rgba(5, 7, 12, 0.88);
  animation: fade-in 0.35s ease-out;
}
.verdict-screen.is-guilty { background: radial-gradient(circle at 50% 40%, rgba(179, 53, 58, 0.35), rgba(5, 7, 12, 0.92) 70%); }
.verdict-screen.is-acquitted { background: radial-gradient(circle at 50% 40%, rgba(34, 163, 74, 0.28), rgba(5, 7, 12, 0.92) 70%); }
.verdict-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
/* Fix alsó gombsor (írétlet, kör vége, végeredmény) – mindig látszik. */
.fixed-actions {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  padding: 8px 0 2px;
}
/* Ranglista-jellegű tartalom: a lista saját görgetéssel, a gomb fixen. */
.results-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; width: 100%;
}
.score-table.compact { padding: 6px; }
.score-table.compact .score-row { padding: 6px 12px; font-size: 15px; }
.score-table.compact .score-row .pts { font-size: 17px; }
.awards.compact .award-card { width: min(170px, 40vw); padding: 10px 8px; }
.awards.compact .award-card .emoji { font-size: 26px; }

.verdict-title {
  font-family: var(--font-disp);
  font-size: clamp(52px, 16dvh, 140px);
  letter-spacing: 6px; line-height: 1;
  animation: verdict-slam 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.verdict-title.guilty { color: #ff5f5f; text-shadow: 0 0 40px rgba(229, 72, 77, 0.8), 0 4px 0 #6e1616; }
.verdict-title.not-guilty { color: #6bfa8f; text-shadow: 0 0 40px rgba(34, 197, 94, 0.7), 0 4px 0 #0f5427; }

.vote-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 760px; }
.vote-chip {
  font-size: 14px; font-weight: 600; color: #e8e6df;
  background: rgba(24, 30, 44, 0.9); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
}
.vote-chip.guilty { border-color: var(--red); color: #ffb1b1; }
.vote-chip.not_guilty { border-color: var(--green); color: #a9f5be; }

.sentence-card {
  position: relative; max-width: 620px;
  font-size: clamp(15px, 2.2dvh, 21px); font-weight: 700; line-height: 1.4;
  color: var(--ink); text-align: center;
  background: linear-gradient(180deg, #f7f0dd, var(--paper2));
  border: 1px solid #b9a87c; border-radius: 6px;
  padding: 18px 24px 26px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  transform: rotate(-0.5deg);
}
.sentence-stamp {
  position: absolute; top: -14px; right: 12px;
  font-family: var(--font-disp); font-size: 20px; letter-spacing: 4px;
  color: rgba(179, 53, 58, 0.85);
  border: 3px solid rgba(179, 53, 58, 0.75); border-radius: 6px;
  padding: 2px 12px; transform: rotate(8deg);
  background: rgba(247, 240, 221, 0.9);
}
.verdict-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.verdict-flash {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  animation: flash-fade 0.85s ease-out forwards;
}
.verdict-flash.flash-red { background: radial-gradient(circle, rgba(229, 72, 77, 0.55), rgba(229, 72, 77, 0.12) 70%); }
.verdict-flash.flash-green { background: radial-gradient(circle, rgba(34, 197, 94, 0.45), rgba(34, 197, 94, 0.1) 70%); }

/* --- eredmények --- */

.score-table {
  width: 100%; max-width: 620px;
  background: rgba(14, 19, 30, 0.9); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; text-align: left;
}
.score-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px; font-size: 16px;
}
.score-row + .score-row { margin-top: 4px; }
.score-row.me { background: rgba(242, 193, 78, 0.1); border: 1px solid var(--gold-dark); }
.score-row .pts {
  font-family: var(--font-disp); font-size: 20px; letter-spacing: 1px;
  color: var(--amber); white-space: nowrap;
}

.awards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.award-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: min(190px, 42vw); padding: 14px 10px;
  background: rgba(16, 22, 34, 0.9); border: 1px solid var(--gold-dark);
  border-radius: 12px;
}
.award-card .emoji { font-size: 34px; }
.award-name { font-family: var(--font-disp); font-size: 14px; letter-spacing: 1.5px; color: var(--gold); }
.award-card .who { font-size: 15px; font-weight: 700; color: #f0ead8; }

/* --- alsó sávok: akció / reakció / játékosok --- */

.action-bar {
  flex: none; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  padding: 10px 14px; min-height: 68px;
  background: rgba(10, 14, 22, 0.9); border-top: 1px solid var(--line);
}
.action-bar .btn { min-height: 48px; }

.reaction-bar {
  flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 6px 12px;
  background: rgba(10, 14, 22, 0.95); border-top: 1px solid var(--line);
}
.react-btn {
  width: 42px; height: 42px; font-size: 21px; line-height: 1;
  background: rgba(24, 30, 44, 0.9); border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; transition: transform 0.12s, border-color 0.12s;
}
.react-btn:hover { transform: scale(1.16); border-color: var(--gold); }

.player-strip {
  flex: none; display: flex; gap: 8px; overflow-x: auto;
  padding: 7px 12px 9px;
  background: #0a0e16; border-top: 1px solid var(--line);
  scrollbar-width: thin;
}
.player-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; font-weight: 600; color: #dde3ef;
  background: rgba(24, 30, 44, 0.95); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px;
}
.player-chip .em { font-size: 17px; }
.player-chip .pts { font-family: var(--font-disp); font-size: 15px; color: var(--amber); }
.player-chip.defendant { border-color: var(--amber); }
.player-chip.prosecutor { border-color: var(--red); }
.player-chip.speaking {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.45);
  animation: speaking-pulse 1.6s ease-in-out infinite;
}
.player-chip.offline { opacity: 0.4; }
.player-chip.bump { animation: pill-flash 0.7s ease-out; }

/* ============================================================
   ÁTFEDÉSEK, animációk
   ============================================================ */

.overlay { position: fixed; inset: 0; z-index: 50; pointer-events: none; }

.objection-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(179, 53, 58, 0.42), rgba(8, 4, 6, 0.82) 75%);
  animation: fade-in 0.15s ease-out;
}
.objection-text {
  font-family: var(--font-disp);
  font-size: clamp(58px, 13vw, 150px);
  letter-spacing: 6px; color: #fff;
  text-shadow: 0 0 34px rgba(229, 72, 77, 0.9), 0 5px 0 #6e1616;
  animation: objection-slam 0.4s cubic-bezier(0.2, 1.7, 0.4, 1);
}
.objection-name {
  font-family: var(--font-disp); font-size: clamp(20px, 4vw, 34px);
  letter-spacing: 3px; color: #ffd9d9;
}


.reaction-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.flying-emoji {
  position: absolute; font-size: 44px;
  animation: emoji-fly 1.6s ease-out forwards;
}
@keyframes emoji-fly {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx, 40vw), var(--dy, -60vh)) rotate(var(--rot, 40deg)); opacity: 0; }
}

.confetti-layer { position: fixed; inset: 0; z-index: 85; pointer-events: none; overflow: hidden; }
.confetti {
  position: absolute; top: -16px; width: 10px; height: 15px;
  border-radius: 2px; opacity: 0.95;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(112vh) rotate(var(--rot, 540deg)); }
}

/* ---------------- kulcs-animációk ---------------- */

@keyframes poster-pin {
  from { opacity: 0; transform: rotate(var(--tilt, 0deg)) translateY(-18px) scale(1.16); }
}
@keyframes fade-in {
  from { opacity: 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes card-flip {
  from { transform: rotateY(-92deg); opacity: 0.3; }
}
@keyframes verdict-slam {
  from { transform: scale(2.6) rotate(-4deg); opacity: 0; }
}
@keyframes objection-slam {
  from { transform: scale(3.2) rotate(3deg); opacity: 0; }
}
@keyframes flash-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes gavel-hit {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-58deg); }
  55% { transform: rotate(-30deg); }
  75% { transform: rotate(-52deg); }
  100% { transform: rotate(0deg); }
}
@keyframes judge-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 3px) rotate(-2deg); }
  45% { transform: translate(5px, -2px) rotate(2deg); }
  70% { transform: translate(-4px, 2px) rotate(-1deg); }
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes speaking-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(242, 193, 78, 0.25); }
  50% { box-shadow: 0 0 14px rgba(242, 193, 78, 0.6); }
}
@keyframes bubble-pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@keyframes pill-flash {
  0% { background: rgba(242, 193, 78, 0.55); transform: scale(1.14); }
  100% { background: rgba(24, 30, 44, 0.95); transform: scale(1); }
}

/* ============================================================
   MOBIL
   ============================================================ */

@media (max-width: 700px) {
  /* --- színpad ~24dvh, kisebb karakterek, csak avatar-címkék --- */
  .stage-zone { height: clamp(150px, 24dvh, 280px); }
  .stage-slot { height: calc(var(--h) * 0.72); }
  .judge-slot { height: calc(var(--h) * 0.85); }
  .st-tag { padding: 1px 5px; }
  .st-tag .st-name { display: none; }
  .judge-bubble { max-width: 64%; padding: 5px 10px; font-size: 12px; }
  /* A beszélő neve a színpad alján egy sávban. */
  .stage-speaker-strip {
    display: block; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
    z-index: 55; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 12.5px; font-weight: 700; color: #fff;
    background: color-mix(in srgb, var(--glow, #f2c14e) 45%, rgba(8, 10, 16, 0.9));
    border: 1px solid var(--glow, #f2c14e); border-radius: 999px; padding: 3px 12px;
  }
  .stage-speaker-strip:empty { display: none; }

  /* --- vád-sáv két sorban a keskeny képernyőn --- */
  .info-bar { flex-wrap: wrap; gap: 7px; padding: 5px 10px; }
  .accusation-ticker { order: 3; flex-basis: 100%; }
  .info-bar .code-badge { font-size: 15px; letter-spacing: 2px; }
  .info-bar .volume { width: 70px; }

  .judge-watch-bar { margin: 5px 10px; }
  .jw-body { max-height: 52dvh; }

  .poster { width: min(300px, 86vw); }
  .pin-wall { gap: 22px 18px; }

  /* A szavazógombok telefonon is EGYMÁS MELLETT maradnak. */
  .vote-buttons { gap: 10px; flex-wrap: nowrap; }
  .vote-btn { min-height: 56px; font-size: 19px; }
  .btn { min-height: 48px; }
  .review-buttons { flex-direction: row; flex-wrap: wrap; }
  .review-buttons .btn { flex: 1 1 0; min-height: 56px; }

  .timer-ring { width: clamp(72px, 15dvh, 110px); height: clamp(72px, 15dvh, 110px); }
  .tr-text { font-size: clamp(16px, 3.6dvh, 22px); }

  .verdict-title { font-size: clamp(40px, 12dvh, 90px); }
  .verdict-screen { padding: 10px 12px 8px; gap: 8px; }
  .fixed-actions .btn { flex: 1 1 auto; }

  .settings-grid { grid-template-columns: 1fr 1fr; }
  .casefile-header { gap: 8px; }
  #btnLeaveLobby { margin-left: 0; }

  /* --- játék: a ponttábla felcsúszó panel lesz --- */
  .game-main { padding-right: 0; }
  .score-sidebar {
    top: auto; width: 100%; max-height: 62dvh;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(.22,1,.36,1);
    border-left: none; border-top: 2px solid var(--gold-dark);
  }
  .score-sidebar.open { transform: translateY(0); }
  .sb-toggle {
    display: block; position: fixed; right: 12px; bottom: 14px; z-index: 41;
    font-family: var(--font-disp); font-size: 15px; letter-spacing: 2px;
    color: #241a06; background: var(--gold); border: 2px solid var(--gold-dark);
    border-radius: 999px; padding: 10px 20px; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  }
  .score-sidebar.open ~ .sb-toggle { display: none; }

  .review-text { font-size: 16px; }
  .phase-content { padding: 10px 12px 58px; } /* hely a lebegő PONTOK gombnak */
}

@media (max-width: 480px) {
  .mug-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .rb-title { letter-spacing: 2px; }
}

/* ============================================================
   KAPCSOLAT-JELZŐ SÁV (online üzem): a képernyő tetején úszik,
   megszakadás/újracsatlakozás közben látszik.
   ============================================================ */
#connBar {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translate(-50%, -80px);
  z-index: 120;
  background: linear-gradient(180deg, #8f2020, #6d1717);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 12px;
  border: 1px solid #c56;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
  pointer-events: none;
  max-width: 92vw;
  text-align: center;
}
#connBar.visible { transform: translate(-50%, 0); }

/* ============================================================
   FRISSÍTÉS: szerepcímkék, bíró-jelzés, glow-k, kilépés-megerősítés
   ============================================================ */

/* --- Teljes szerepnév címkéi (ponttábla alatti chip, kártyán, színpadon) --- */
.role-chip {
  display: inline-block;
  font-family: var(--font-disp);
  font-size: 13px; font-weight: 600; letter-spacing: 2px;
  color: #10131c; background: var(--role, var(--gold));
  border-radius: 999px; padding: 3px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.cards-heading { display: block; text-align: center; }
.cards-heading.t-head-evidence { color: var(--red); }
.cards-heading.t-head-alibi { color: var(--amber); }
.cards-heading.t-head-trick { color: var(--blue); }
.cards-heading.t-head-witness { color: var(--green); }

/* --- Színpad: kis szerepcímke a név fölött --- */
.st-role {
  font-family: var(--font-disp); font-size: 9px; letter-spacing: 1px;
  color: #10131c; background: var(--role, var(--gold));
  border-radius: 4px; padding: 1px 5px; flex: none;
  align-self: center;
}
.st-tag { gap: 5px; }
.st-tag.mini .st-role { font-size: 8px; padding: 1px 4px; }

/* --- A KÖR BÍRÓJA: arany pulzáló glow a figurán + kalapács --- */
.stage-slot.is-round-judge .st-fig img {
  filter:
    drop-shadow(0 0 14px var(--gold))
    drop-shadow(0 0 34px color-mix(in srgb, var(--gold) 65%, transparent))
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
  animation: glow-pulse 2.6s ease-in-out infinite;
}
.stage-slot.is-round-judge .st-tag { border-color: var(--gold); box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 45%, transparent); }
.judge-slot.round-judge .st-fig img {
  filter:
    drop-shadow(0 0 14px var(--gold))
    drop-shadow(0 0 36px color-mix(in srgb, var(--gold) 70%, transparent));
  animation: glow-pulse 2.6s ease-in-out infinite;
}
.judge-slot.round-judge::after {
  content: '🔨 BÍRÓ'; position: absolute; top: -14%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-disp); font-size: clamp(10px, 1.6vh, 14px); letter-spacing: 1px;
  color: #241a06; background: var(--gold); border: 1px solid var(--gold-dark);
  border-radius: 999px; padding: 1px 10px; white-space: nowrap; z-index: 5;
}

/* --- Fázis-sáv: "Ebben a körben X a bíró" --- */
.rb-judge {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 4px; font-size: 15px; color: #f0e6c8;
  background: rgba(20, 16, 6, 0.55); border: 1px dashed var(--gold-dark);
  border-radius: 999px; padding: 3px 14px;
}
.rb-judge b { color: var(--gold); }
.rb-judge-chip {
  font-family: var(--font-disp); font-size: 10px; letter-spacing: 1.5px;
  color: #241a06; background: var(--role, var(--gold));
  border-radius: 4px; padding: 1px 6px;
}
.rb-judge-hammer { font-style: normal; font-size: 14px; }

/* --- Szavazás: leadott szavazat kiemelve, a másik halvány --- */
.vote-btn.chosen { outline: 4px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 24px rgba(242, 193, 78, 0.55); position: relative; }
.vote-btn.chosen::after { content: '✔'; position: absolute; top: -12px; right: -10px; font-size: 20px; color: var(--gold); text-shadow: 0 1px 3px #000; }
.vote-btn.faded { opacity: 0.4; filter: saturate(0.5); }

/* --- Ítélet: győztes oldal glow + esküdt "+1" --- */
.winner-glow.guilty { animation: verdict-glow-red 2s ease-in-out infinite; }
.winner-glow.not-guilty { animation: verdict-glow-green 2s ease-in-out infinite; }
@keyframes verdict-glow-red {
  0%, 100% { text-shadow: 0 0 40px rgba(229, 72, 77, 0.8), 0 4px 0 #6e1616; }
  50% { text-shadow: 0 0 70px rgba(229, 72, 77, 1), 0 0 110px rgba(229, 72, 77, 0.6), 0 4px 0 #6e1616; }
}
@keyframes verdict-glow-green {
  0%, 100% { text-shadow: 0 0 40px rgba(34, 197, 94, 0.7), 0 4px 0 #0f5427; }
  50% { text-shadow: 0 0 70px rgba(34, 197, 94, 0.95), 0 0 110px rgba(34, 197, 94, 0.55), 0 4px 0 #0f5427; }
}
.vote-chip.point-gain { border-color: var(--gold); box-shadow: 0 0 12px rgba(242, 193, 78, 0.35); }
.juror-plus {
  font-style: normal; margin-left: 6px; font-family: var(--font-disp); font-size: 13px;
  color: #241a06; background: var(--gold); border-radius: 999px; padding: 0 7px;
  animation: juror-pop 0.6s cubic-bezier(.22,1.4,.36,1);
}
@keyframes juror-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* --- Végeredmény: arany / ezüst / bronz glow a 3 legjobbnak --- */
.score-row.podium-gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dark), 0 0 18px rgba(242, 193, 78, 0.4); animation: podium-gold-pulse 2s ease-in-out infinite; }
.score-row.podium-silver { border-color: #c9d1dd; box-shadow: 0 0 0 1px #8d97a8, 0 0 12px rgba(201, 209, 221, 0.3); }
.score-row.podium-bronze { border-color: #d29a6b; box-shadow: 0 0 0 1px #8d5f3c, 0 0 12px rgba(210, 154, 107, 0.3); }
@keyframes podium-gold-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--gold-dark), 0 0 14px rgba(242, 193, 78, 0.35); }
  50% { box-shadow: 0 0 0 2px var(--gold), 0 0 28px rgba(242, 193, 78, 0.65); }
}
.award-card.podium-gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dark), 0 0 20px rgba(242, 193, 78, 0.4); animation: podium-gold-pulse 2s ease-in-out infinite; }

/* --- Reakció- és kihívás-döntés gombok: kijelölt állapot glow-val --- */
.react-btn.pressed { border-color: var(--gold); box-shadow: 0 0 12px rgba(242, 193, 78, 0.5); transform: scale(1.1); }
.fun-vote .btn.green, .fun-vote .btn.red { box-shadow: 0 0 12px rgba(242, 193, 78, 0.35); }
.btn.green.chosen, .btn.red.chosen { box-shadow: 0 0 16px rgba(242, 193, 78, 0.55); }

/* --- Kilépés-megerősítő ablak --- */
.confirm-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.confirm-modal.visible { opacity: 1; pointer-events: auto; }
.confirm-panel {
  background: linear-gradient(180deg, var(--paper), var(--paper2));
  border: 1px solid #b9a87c; border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(120, 90, 40, 0.12);
  padding: 26px 30px; text-align: center; max-width: min(92vw, 400px);
}
.confirm-stamp { font-size: 34px; margin-bottom: 8px; }
.confirm-text { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 18px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .ghost { background: transparent; border: 2px solid var(--ink-soft); color: var(--ink-soft); }

/* --- Vissza gomb a lobbyban --- */
.casefile-header { align-items: center; }

/* --- Kijelölt névkártya / avatar / mód-mappa: egységes glow + pipa --- */
.mug-card.chosen { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(242, 193, 78, 0.45); }
.avatar-cell.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(242, 193, 78, 0.4); }
.avatar-cell.selected::after { content: '✔'; position: absolute; top: 4px; right: 6px; font-size: 13px; color: var(--gold); }
.avatar-cell { position: relative; }
.case-tab.active-case { border-color: var(--gold); box-shadow: 0 0 0 1px var(--red), 0 0 18px rgba(242, 193, 78, 0.3), 0 4px 10px rgba(0, 0, 0, 0.3); }

/* --- Egységes kártya/árnyék tokenek (8px-rács, azonos lekerekítés) --- */
.secret-card, .review-card, .sentence-card, .accusation-card {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(120, 90, 40, 0.12);
}
.poster, .case-tab, .award-card, .review-card, .challenge-results {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.secret-card, .review-card, .sentence-card, .accusation-card { border-radius: 10px; }

/* --- Mobil finomhangolás: ponttábla és címkék keskeny képernyőn --- */
@media (max-width: 700px) {
  .st-tag.mini .st-name { display: none; } /* marad: hover/tap-re előbukkan */
  .sb-role { font-size: 10px; letter-spacing: 0.8px; }
  .rb-judge { font-size: 14px; padding: 3px 10px; }
}

/* ============================================================
   8. PONT: KÁRTYÁIM sáv (ügyész + védőügyvéd folyamatos kártyái)
   + "A kártyáid elrejtve" jelzés
   ============================================================ */

.cards-hidden-note {
  display: inline-block; margin: 8px auto 0;
  font-size: 13px; font-weight: 600; color: #aab2c5;
  background: rgba(24, 30, 44, 0.7); border: 1px dashed var(--line);
  border-radius: 999px; padding: 4px 14px;
}

/* ============================================================
   11. PONT: TILTAKOZÁS fázis (bíró döntést vár)
   ============================================================ */

.objection-phase {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px; max-width: 600px; margin: 0 auto;
  background: rgba(10, 13, 22, 0.92);
  border: 1px solid var(--gold-dark); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.objection-phase-title {
  font-family: var(--font-disp);
  font-size: clamp(20px, 4vw, 32px); letter-spacing: 3px;
  color: #fff; text-shadow: 0 0 22px rgba(229, 72, 77, 0.7);
}

.objection-phase-sub {
  font-size: clamp(14px, 2.5vw, 18px); color: #f0ead8;
  text-align: center; line-height: 1.5;
}

.objection-timer {
  display: flex; justify-content: center; margin: 8px 0;
}

.objection-instruction {
  font-size: 16px; color: #e8e6df; font-weight: 600;
  background: rgba(242, 193, 78, 0.1);
  border: 1px solid var(--gold-dark); border-radius: 8px;
  padding: 10px 16px;
}

.objection-buttons {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}

.objection-waiting {
  font-size: 18px; color: #f0ead8;
  background: rgba(242, 193, 78, 0.08);
  border: 1px solid var(--gold-dark); border-radius: 8px;
  padding: 12px 20px;
}

.objection-result {
  font-family: var(--font-disp);
  font-size: clamp(40px, 8vw, 70px); letter-spacing: 4px;
  text-shadow: 0 0 30px currentColor;
}

.objection-result.accepted {
  color: var(--green);
  animation: verdict-slam 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.objection-result.rejected {
  color: var(--red);
  animation: verdict-slam 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

/* ============================================================
   9. PONT: házigazdai kirúgás + lecsatlakozott jelzés
   ============================================================ */

/* KIRÚG gomb a ponttábla sorában (csak a házigazda látja) */
.sb-kick {
  font-family: var(--font-disp); font-size: 10px; letter-spacing: 1px;
  color: #fff; background: var(--red-dark);
  border: 1px solid var(--red); border-radius: 6px;
  padding: 4px 7px; cursor: pointer; flex: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.sb-kick:hover { filter: brightness(1.15); transform: scale(1.05); box-shadow: 0 0 10px rgba(229, 72, 77, 0.45); }
.sb-kick.urgent {
  animation: kick-urgent 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(229, 72, 77, 0.55);
}
@keyframes kick-urgent {
  0%, 100% { box-shadow: 0 0 6px rgba(229, 72, 77, 0.35); }
  50% { box-shadow: 0 0 16px rgba(229, 72, 77, 0.75); }
}

/* LECSATLAKOZOTT jelzés + mióta nincs bent */
.sb-off-time {
  display: inline-block; margin-left: 6px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  color: #ffb1b1; background: rgba(179, 53, 58, 0.16);
  border: 1px dashed var(--red); border-radius: 999px;
  padding: 1px 7px; vertical-align: middle;
}
.sb-row.is-off { opacity: 0.75; }

/* KIRÚG a lobby plakátokon (csak a házigazda látja) */
.poster-kick {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-disp); font-size: 12px; letter-spacing: 2px;
  color: #fff; background: var(--red-dark);
  border: 1px solid var(--red); border-radius: 6px;
  padding: 5px 14px; cursor: pointer; z-index: 5;
  transition: transform 0.12s, box-shadow 0.12s;
}
.poster-kick:hover { filter: brightness(1.15); box-shadow: 0 0 12px rgba(229, 72, 77, 0.5); }

/* Mobil: a ponttábla felcsúszóban is elfér a KIRÚG gomb */
@media (max-width: 700px) {
  .sb-kick { padding: 5px 8px; }
  .sb-off-time { font-size: 8.5px; }
}

/* V4: a tárgyalás minden vezérlője a rendelkezésre álló képernyőn. */
body.in-game { height: 100dvh; min-height: 0; overflow: hidden; }
body.in-game .screen.active { height: 100dvh; min-height: 0; }
.registry-status { min-height: 1.5em; text-align: center; color: var(--gold); }
#btnRegistryRetry { margin-bottom: 12px; }
.info-bar { position: relative; }
.role-banner { flex: none; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; padding: 6px 10px; flex-wrap: wrap; }
.rb-title { font-size: clamp(15px, 2.7dvh, 27px); letter-spacing: 1px; }
.rb-judge { font-size: 12px; margin: 0; padding: 0; }
.phase-content { width: 100%; overflow: hidden; padding: 8px 12px; gap: 6px; }
.phase-content p { margin: 3px 0; }
.inline-actions { margin: 3px 0; gap: 8px; }
.prep-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.prep-cards { min-width: 0; }
.prep-cards .cards-heading { font-size: 14px; margin: 0 0 6px; }
.prep-cards .only-you, .prep-cards .role-chip { display: none; }
.prep-cards .cards-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prep-cards .secret-card { width: 100%; min-height: 0; padding: 18px 6px 8px; gap: 2px; }
.prep-cards .card-text { font-size: clamp(12px, 1.8dvh, 18px); line-height: 1.25; }
.prep-cards .card-type { font-size: 10px; padding: 3px 6px; top: -7px; letter-spacing: .4px; }
.prep-cards .card-stamp { display: none; }
.prep-cards .next-step { font-size: 12px; }
.phase-content > .secret-card.single { width: min(760px, 100%); min-height: 0; padding: 16px 12px 8px; }
.phase-content > .secret-card.single .card-text { font-size: clamp(12px, 1.9dvh, 17px); }
.phase-content > .secret-card.single .card-stamp { display: none; }
.vote-buttons { flex-wrap: nowrap; }
.vote-btn { min-width: 0; min-height: 64px; }
.verdict-scroll { width: 100%; gap: 6px; }
.verdict-title { max-height: 22dvh; font-size: clamp(36px, 10dvh, 100px); }
.vote-list { width: 100%; flex-wrap: nowrap; gap: 4px; overflow-x: auto; justify-content: flex-start; }
.vote-chip { flex: none; font-size: 11px; padding: 4px 8px; }
.sentence-card { padding: 12px 12px 10px; font-size: clamp(13px, 2dvh, 18px); }
.sentence-stamp { position: static; display: block; border: none; padding: 0; margin-top: 4px; transform: none; font-size: 12px; }
.fixed-actions { padding: 3px 0; gap: 6px; width: 100%; }
.fixed-actions .btn { min-height: 40px; font-size: 14px; padding: 8px 12px; }
.results-scroll { gap: 6px; justify-content: flex-start; }
@media (max-width: 900px) {
  .game-main { padding-right: 0; }
  .score-sidebar { top: auto; bottom: 0; width: 100%; height: min(60dvh, 440px); max-height: 60dvh; transform: translateY(calc(100% - 34px)); border-left: none; border-top: 1px solid var(--gold-dark); }
  .score-sidebar.open { transform: translateY(0); }
  .sb-toggle { display: block; position: static; flex: none; height: 34px; width: 100%; padding: 5px; border: 0; border-radius: 0; cursor: pointer; color: var(--gold); background: #111622; }
  .sb-inner { flex: 1; }
  .content-zone { padding-bottom: 34px; }
}
@media (max-width: 700px) {
  .stage-zone { height: 24dvh; min-height: 0; }
  .info-bar { gap: 4px; padding: 4px 8px; }
  .info-bar .volume, #btnReduceMotion { display: none; }
  .info-bar .btn { min-height: 28px; font-size: 11px; padding: 4px 7px; }
  .info-bar .round-badge { font-size: 11px; }
  .info-bar .info-btn { position: static; width: 24px; height: 24px; }
  .accusation-ticker { font-size: 12px; border-radius: 7px; padding: 3px 7px; }
  .role-banner { gap: 4px 8px; padding: 5px 8px; }
  .rb-title { font-size: 15px; }
  .rb-speaker { font-size: 12px; }
  .rb-judge { font-size: 11px; }
  .phase-content { padding: 6px 8px; gap: 5px; }
  .prep-row { grid-template-columns: 1fr; gap: 6px; }
  .prep-clock .timer-ring { width: 60px; height: 60px; margin: auto; }
  .prep-cards .cards-row { gap: 4px; }
  .prep-cards .card-text { font-size: 12px; }
  .prep-cards .next-step { display: none; }
  .next-step { font-size: 12px; line-height: 1.25; }
  .vote-btn { min-height: 64px; font-size: 21px; }
  .review-card { padding: 16px 10px 8px; }
  .review-text { font-size: 14px; }
  .review-buttons { margin: 4px 0; gap: 6px; flex-wrap: nowrap; }
  .review-buttons .btn { min-height: 40px; font-size: 12px; padding: 7px; }
  .review-note { font-size: 12px; margin: 0; }
  .review-counter { font-size: 14px; }
}
@media (max-height: 650px) and (min-width: 701px) {
  .stage-zone { height: 26dvh; min-height: 0; }
  .timer-ring { width: 80px; height: 80px; }
}
.accused-name { color: var(--amber); font-weight: 800; }
.accusation-ticker { cursor: pointer; }
.accusation-ticker.expanded { position: absolute; z-index: 65; top: 100%; left: 8px; right: 8px; display: block; max-height: 36dvh; overflow-y: auto; border-radius: 8px; background: #19171c; font-size: 16px; }
.prep-charge { color: #d8c59f; font-size: 11px; line-height: 1.2; }
.revealed-cards { position: relative; width: 100%; font-size: 12px; flex: none; }
.revealed-cards summary { cursor: pointer; padding: 5px; color: var(--gold); }
.revealed-panel { position: absolute; z-index: 70; top: 100%; left: 0; width: 100%; max-height: 34dvh; overflow: auto; padding: 10px; background: #191c26; border: 1px solid var(--gold-dark); border-radius: 8px; text-align: left; }
.revealed-panel p { margin: 5px 0; }
.jw-now { min-width: 0; font-size: 12px; }
.jw-now b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.react-btn.chosen { outline: 2px solid var(--gold); box-shadow: 0 0 14px var(--gold); }
.objection-phase { gap: 6px; }
.objection-phase-sub, .objection-instruction { font-size: clamp(12px, 2dvh, 17px); }
.objection-buttons { display: flex; flex-wrap: nowrap; gap: 8px; }
.objection-buttons .btn { min-width: 0; min-height: 42px; font-size: clamp(12px, 2dvh, 18px); padding: 8px 12px; }
.auto-countdown { flex: none; font-size: 14px; color: var(--gold); padding: 3px 8px; text-align: center; }
.phase-content[data-phase="game_over"] .score-table.compact .score-row { padding: 3px 8px; margin-top: 1px; font-size: 13px; }
.phase-content[data-phase="game_over"] .score-row .pts { font-size: 14px; }
.phase-content[data-phase="game_over"] .awards { flex-wrap: nowrap; gap: 4px; width: 100%; }
.phase-content[data-phase="game_over"] .award-card { flex: 1; min-width: 0; width: auto; padding: 4px; }
.phase-content[data-phase="game_over"] .award-card .emoji { font-size: 22px; }
.phase-content[data-phase="game_over"] .award-name, .phase-content[data-phase="game_over"] .award-card .who { font-size: 10px; letter-spacing: 0; }
.phase-content[data-phase="accusation"].enter .accusation-card { animation: charge-type 2s steps(50,end), charge-file .5s ease 2s forwards; }
@keyframes charge-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes charge-file { to { transform: translateY(-110px) scale(.2); opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .phase-content[data-phase="accusation"].enter .accusation-card { animation: none; } }

/* V4 PNG-színpad. A kész képek eredeti arányát az object-fit őrzi meg. */
.stage-canvas { width:100%; height:100%; }
.stage-zone::after { content:none; }
.stage-bg { object-fit:cover; object-position:50% 45%; }
.stage-slot { width:auto; aspect-ratio:2 / 3; height:var(--h); transform-origin:50% 100%; }
.stage-slot .st-fig { height:100%; width:100%; overflow:visible; }
.st-art { position:relative; height:100%; width:100%; transform-origin:50% 100%; transition:transform .3s ease; }
.st-fig img { width:100%; height:100%; object-fit:contain; object-position:50% 100%; filter:drop-shadow(0 4px 7px #0006); }
.stage-slot.dim { transform:translateX(-50%); filter:brightness(.82); }
.stage-slot.speaking { transform:translateX(-50%); animation:none; z-index:30; }
.stage-slot.speaking .st-art { transform:scale(1.2); }
.stage-slot.speaking .st-fig img { animation:glow-pulse 2.2s ease-in-out infinite; }
.stage-slot .st-role { position:absolute; bottom:0; top:auto; left:50%; transform:translateX(-50%); font-size:14px; line-height:17px; padding:1px 4px; white-space:nowrap; z-index:35; letter-spacing:0; }
.stage-slot .st-tag { bottom:-19px; max-width:120px; width:max-content; font-size:12px; padding:2px 6px; z-index:35; }
.stage-slot .st-name, .stage-slot .st-tag.mini .st-name { display:block; position:static; transform:none; background:none; border:0; padding:0; min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:12px; }
.stage-slot[data-role="juror"] .st-tag { max-width:74px; }
.stage-slot[data-role="juror"] .st-role, .stage-slot[data-role="juror"] .st-tag { left:auto; right:0; transform:none; }
.judge-slot { --x:49%; --b:42%; --h:30%; --z:3; --glow:#f2c14e; filter:none; }
.judge-slot.round-judge::after { content:none; }
.judge-slot.round-judge .st-fig img { animation:none; filter:drop-shadow(0 0 10px #f2c14e66) drop-shadow(0 4px 7px #0006); }
.judge-slot .st-art { clip-path:inset(0 0 24% 0); }
.judge-slot.asset-missing .st-art { clip-path:none; }
.judge-slot .st-tag { bottom:8%; }
.judge-slot .st-role { top:-20px; bottom:auto; }
.judge-slot .gavel { display:none; }
.judge-bubble { left:49%; top:2%; max-width:46%; font-size:clamp(11px,1.7dvh,15px); padding:2px 8px; white-space:nowrap; display:block; text-overflow:ellipsis; }
.stage-speaker-strip { display:none; }
.st-fallback { display:none; position:absolute; left:50%; top:50%; width:100%; aspect-ratio:1; transform:translate(-50%,-50%); align-items:center; justify-content:center; flex-direction:column; gap:4px; border-radius:50%; border:2px solid var(--glow); background:#241e18; color:#fff; text-align:center; }
.st-fallback > span { font-size:clamp(18px,4dvh,45px); }
.st-fallback small { max-width:95%; font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.asset-missing .st-fallback { display:flex; }
.asset-missing .st-fig img { visibility:hidden; }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation:none !important; transition:none !important; }
@media (prefers-reduced-motion:reduce) {
  .stage-slot, .stage-slot *, .stage-flash, .phase-content.enter, .winner-gold, .winner-silver, .winner-bronze { animation:none !important; transition:none !important; }
}
@media (max-width:700px) {
  .stage-slot, .judge-slot { height:var(--h); }
  .judge-slot { --h:26%; }
  .stage-slot .st-tag { max-width:78px; font-size:10px; bottom:-18px; padding:1px 3px; gap:2px; }
  .stage-slot .st-name, .stage-slot .st-tag.mini .st-name { font-size:10px; }
  .stage-slot[data-role="juror"] .st-tag { max-width:51px; }
  .judge-slot .st-tag { bottom:7%; }
  .judge-bubble { max-width:58%; font-size:10px; }
  .stage-speaker-strip { display:none; }
  #btnReduceMotion { display:inline-flex; font-size:9px; }
}

/* ======================================================================
   v4.1 – BIZTONSÁGI HÁLÓ: semmilyen vezérlő nem maradhat elérhetetlen.
   A tartalom alapból elfér (kompakt méretek), de ha mégsem, a tartalomzónán
   BELÜL görgethető, a műveleti gombok (TOVÁBB, ÚJ JÁTÉK...) pedig alul ragadnak.
   ====================================================================== */
.phase-content { overflow-y: auto; overflow-x: hidden; justify-content: flex-start; scrollbar-width: thin; }
.phase-content > :first-child { margin-top: auto; }
.phase-content > :last-child { margin-bottom: auto; }
.phase-content > .fixed-actions,
.phase-content .results-scroll ~ .fixed-actions {
  position: sticky; bottom: 0; z-index: 6; width: 100%;
  padding: 6px 0 4px;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0), rgba(7, 9, 15, 0.96) 38%);
}

/* Kompaktabb ítélet / kör vége / végeredmény alacsony ablakban */
.verdict-title { font-size: clamp(30px, 7.5dvh, 84px); max-height: 16dvh; line-height: 1; }
.verdict-scroll { gap: 4px; }
.vote-list { padding: 0; }
.sentence-card { padding: 8px 12px 6px; font-size: clamp(12px, 1.9dvh, 17px); }
@media (max-height: 800px) {
  .phase-content { gap: 4px; padding-top: 4px; padding-bottom: 4px; }
  .fixed-actions .btn { min-height: 36px; padding: 5px 12px; }
  .verdict-title { font-size: clamp(28px, 7dvh, 64px); }
  .sentence-card { font-size: clamp(12px, 1.8dvh, 15px); }
  .results-scroll { gap: 4px; }
  .award-grid, .awards { gap: 6px; }
}

/* Kihívás-ellenőrzés és kihívás-szavazás: kompakt, hogy alacsony ablakban is elférjen */
.phase-content[data-phase="challenge_review"] .review-card { padding: 14px 12px 8px; min-height: 0; }
.phase-content[data-phase="challenge_review"] .review-text { font-size: clamp(14px, 2.2dvh, 20px); }
.phase-content[data-phase="challenge_review"] .review-buttons { margin: 4px 0; }
.phase-content[data-phase="challenge_review"] .review-buttons .btn { min-height: 44px; font-size: 15px; padding: 8px 14px; }
.fun-vote { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin: 0; }
.fun-vote .btn { min-height: 30px; padding: 3px 10px; }
.phase-content[data-phase="challenge_vote"] { gap: 4px; }
.phase-content[data-phase="challenge_vote"] .challenge-results { width: min(760px, 100%); display: flex; align-items: center; gap: 10px; padding: 6px 10px; margin: 0; }
.phase-content[data-phase="challenge_vote"] .challenge-results .cr { flex: 1; font-size: clamp(12px, 1.9dvh, 15px); line-height: 1.3; margin: 0; text-align: left; }
.phase-content[data-phase="challenge_vote"] .challenge-results > div:not(.cr) { margin: 0 !important; flex: none; font-size: 12px; }
.phase-content[data-phase="challenge_vote"] .challenge-results .btn { min-height: 34px; padding: 4px 10px; font-size: 13px; }
@media (max-width: 700px) {
  .phase-content[data-phase="challenge_vote"] .challenge-results { flex-wrap: wrap; gap: 4px; }
  .phase-content[data-phase="challenge_vote"] .challenge-results .cr { flex-basis: 100%; }
}

/* Kis telefon (pl. 360x640): kevesebb "keret", több hely a tartalomnak */
@media (max-width: 700px) {
  #btnReduceMotion { display: none !important; }
  .info-bar { flex-wrap: wrap; row-gap: 3px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .stage-zone { height: 20dvh; }
  .accusation-ticker { -webkit-line-clamp: 1; }
  .role-banner { padding: 3px 8px; }
  .phase-content[data-phase="accusation"] .next-step { font-size: 11px; margin: 0; }
  .case-row { gap: 4px; }
}

/* Teljes képernyős tárgyalás: a jelenet és a HUD külön rétegen él. */
#screen-game { --hud-rail:280px; --hud-gap:16px; position:relative; isolation:isolate; background:#241b15; }
#screen-game .game-main { position:relative; display:block; width:100%; height:100dvh; padding:0; }
#screen-game .stage-zone { position:absolute; z-index:0; inset:0; width:100%; height:100% !important; min-height:0; border:0; container-type:normal; }
#screen-game .stage-canvas { left:0; top:0; width:100%; height:100%; transform:none; }
#screen-game .stage-bg { object-fit:cover; object-position:50% 55%; }
#screen-game .stage-slot { height:var(--h) !important; z-index:calc(var(--z) * 10); }
#screen-game .stage-slot.speaking { z-index:calc(var(--z) * 10 + 2); }
#screen-game .stage-slot.dim { filter:brightness(.78) saturate(.9); }
#screen-game .stage-slot.mine::after { border-width:1px; box-shadow:0 0 22px var(--glow); }
#screen-game .stage-slot .st-fig img { filter:drop-shadow(0 8px 12px #0005); }
#screen-game .stage-slot.speaking .st-fig img { filter:drop-shadow(0 0 18px var(--glow)); animation:glow-pulse 2.2s ease-in-out infinite; }
#screen-game .judge-slot { filter:none; }
#screen-game .judge-slot.round-judge .st-fig img { animation:none; filter:drop-shadow(0 4px 10px #0005); }
#screen-game .stage-flash { z-index:94; }
.scene-furniture, .stage-plates { position:absolute; inset:0; pointer-events:none; }
.room-occluder { position:absolute; overflow:hidden; }
.room-occluder img { position:absolute; max-width:none; display:block; }
.room-occluder:nth-child(1) { z-index:34; }
.room-occluder:nth-child(2) { z-index:64; }
.room-occluder:nth-child(3) { z-index:74; }
.room-occluder:nth-child(4) { z-index:44; }
.room-missing .scene-furniture { display:none; }
.stage-plate { position:absolute; left:50%; top:50%; transform:translateX(-50%); z-index:100; display:flex; align-items:center; gap:6px; width:max-content; max-width:180px; padding:5px 8px; border:1px solid #ddc08066; border-radius:8px; color:#fff5dc; background:rgba(9,12,20,.85); box-shadow:0 3px 12px #0006; font-size:12px; }
.plate-role { flex:none; font:600 14px var(--font-disp); color:var(--role); letter-spacing:.6px; }
.plate-person { min-width:0; display:flex; align-items:center; gap:4px; }
.plate-person b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stage-plate.speaking { border-color:var(--gold); box-shadow:0 0 14px #f2c14e55; }
#screen-game .stage-jury-more { left:calc(100% - var(--hud-rail) - 28px); bottom:35%; z-index:100; }
#screen-game .judge-bubble { left:calc((100% - var(--hud-rail)) * .49); top:27%; max-width:32%; padding:5px 10px; white-space:normal; font-size:12px; line-height:1.2; z-index:99; border-radius:8px; }
#screen-game .judge-bubble::before { display:none; }
#screen-game .stage-speaker-strip { display:none; }

/* A felső két sor a vezérlőket és a fázist tartja, külön a vád-táblától. */
#screen-game .info-bar { position:absolute; z-index:80; left:var(--hud-gap); right:calc(var(--hud-rail) + var(--hud-gap)); top:10px; min-height:38px; gap:8px; padding:4px 10px; flex-wrap:nowrap; background:rgba(9,12,20,.65); border:1px solid #d6b87345; border-radius:10px; backdrop-filter:blur(8px); }
#screen-game .info-bar .round-badge { margin-right:auto; font-size:12px; }
#screen-game .info-bar .code-badge { font-size:12px; letter-spacing:1px; }
#screen-game .info-bar .btn { min-height:30px; font-size:11px; padding:4px 8px; }
#screen-game .info-bar .info-btn { position:static; flex:none; width:28px; height:28px; }
#screen-game .info-bar .volume { width:68px; }
#screen-game #btnReduceMotion { display:inline-flex !important; }
#screen-game .role-banner { position:absolute; z-index:76; top:54px; left:var(--hud-gap); right:calc(var(--hud-rail) + var(--hud-gap)); height:29px; padding:3px 12px; margin:0; gap:10px; justify-content:center; flex-wrap:nowrap; background:rgba(9,12,20,.52); border:0; border-bottom:2px solid var(--role,var(--gold)); border-radius:8px; }
#screen-game .rb-title { font-size:16px; line-height:20px; letter-spacing:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#screen-game .rb-speaker { min-width:0; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#screen-game .rb-avatar { font-size:18px; }
#screen-game .rb-judge { display:none; }
#screen-game .accusation-ticker { position:absolute; z-index:75; left:calc((100% - var(--hud-rail)) * .5); right:auto; top:92px; transform:translateX(-50%); width:calc((100% - var(--hud-rail)) * .60); max-width:900px; padding:10px 16px 8px; display:block; background:rgba(9,12,20,.82); border:1px solid #d6b87388; border-radius:12px; box-shadow:0 8px 30px #0005; backdrop-filter:blur(8px); color:#fff4dd; font-size:clamp(22px,2.65dvh,32px); line-height:1.2; cursor:pointer; transition:top .5s ease,transform .5s ease,width .5s ease; }
.charge-file-head { display:flex; justify-content:space-between; gap:8px; margin-bottom:5px; font-size:10px; letter-spacing:1.2px; color:#d7c294; }
.charge-mode { color:var(--gold); text-align:right; }
.charge-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-weight:700; }
.charge-expand-hint { display:block; font-size:10px; text-align:right; color:#c9b58b; margin-top:4px; }
#screen-game .accusation-ticker.charge-intro { top:42%; transform:translate(-50%,-50%) scale(1.08); }
#screen-game .accusation-ticker.expanded { width:calc(100% - var(--hud-rail) - 32px); max-width:1000px; max-height:38dvh; overflow:auto; }
.accusation-ticker.expanded .charge-text { display:block; overflow:visible; }
#screen-game .accusation-ticker.hidden { display:none; }
#screen-game .accusation-ticker:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }

/* Egy üvegpanel a jelenet alsó részén; a gombok nem a görgethető listában vannak. */
#screen-game .content-zone { position:absolute; z-index:70; left:calc((100% - var(--hud-rail)) * .5); bottom:max(16px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(720px,calc(100% - var(--hud-rail) - 32px)); max-height:45dvh; padding:0; flex:none; background:transparent; border:0; overflow:visible; }
#screen-game .phase-content { flex:none; display:flex; max-height:45dvh; min-height:0; padding:12px 16px; gap:8px; overflow:hidden; justify-content:flex-start; background:rgba(9,12,20,.82); border:1px solid #d6b87366; border-radius:16px; box-shadow:0 10px 35px #0005; backdrop-filter:blur(10px); }
#screen-game .phase-content > :first-child { margin-top:0; }
#screen-game .phase-content > :last-child { margin-bottom:0; }
#screen-game .content-zone[data-layout="speech"], #screen-game .content-zone[data-layout="prep"], #screen-game .content-zone[data-layout="accusation"] { width:min(460px,calc(100% - var(--hud-rail) - 32px)); }
#screen-game .speech-row, #screen-game .prep-row { display:flex; flex-wrap:nowrap; align-items:center; justify-content:center; gap:20px; }
#screen-game .timer-ring, #screen-game .prep-clock .timer-ring { width:clamp(80px,14dvh,150px); height:clamp(80px,14dvh,150px); }
#screen-game .timer-ring.danger .tr-fg { stroke:var(--red) !important; }
#screen-game .tr-text { font-size:clamp(24px,4dvh,36px); }
#screen-game .inline-actions { margin:0; }
#screen-game .next-step { margin:0; color:#d6d8df; font-size:13px; line-height:1.3; }
#screen-game .cards-hidden-note { margin:0; padding:2px 8px; font-size:11px; }
#screen-game .phase-content button { min-height:40px; }
#screen-game .fixed-actions { position:static; flex:none; padding:4px 0 0; background:transparent; }
#screen-game .verdict-scroll, #screen-game .results-scroll { flex:1 1 auto; min-height:0; width:100%; overflow-y:auto; overscroll-behavior:contain; justify-content:flex-start; gap:6px; }
#screen-game .verdict-title { font-size:clamp(34px,6dvh,68px); line-height:1; max-height:none; }
#screen-game .sentence-card { font-size:14px; padding:8px 12px; margin:0; }
#screen-game .vote-buttons { gap:10px; width:100%; }
#screen-game .vote-btn { min-height:72px; font-size:26px; letter-spacing:1px; }
#screen-game .vote-status { font-size:13px; padding:4px 10px; }
#screen-game .objection-phase { max-width:none; width:100%; padding:0; gap:8px; background:transparent; border:0; box-shadow:none; }
#screen-game .objection-phase-sub, #screen-game .objection-instruction { font-size:14px; padding:4px 8px; }
#screen-game .objection-phase .objection-timer { margin:0; }
#screen-game .review-card { width:100%; padding:22px 12px 8px; }
#screen-game .review-text { font-size:18px; }
#screen-game .review-buttons { margin:0; gap:8px; }
#screen-game .review-counter, #screen-game .review-note { font-size:12px; }
#screen-game .review-summary { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; flex:none; }
#screen-game .review-summary .review-note { min-width:0; margin:0; text-align:right; }
#screen-game .phase-content[data-phase="challenge_review"] .review-card { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#screen-game .review-card .card-type { position:static; align-self:flex-start; flex:none; font-size:10px; letter-spacing:.4px; padding:2px 5px; }
#screen-game .review-buttons, #screen-game .fun-vote, #screen-game .vote-buttons { flex:none; }
#screen-game .objection-buttons { flex-wrap:nowrap; gap:8px; }
#screen-game .objection-buttons .btn { flex:1; min-width:0; }
#screen-game .challenge-results { width:100%; margin:0; padding:6px 8px; }
#screen-game .fun-vote { margin:0; }
#screen-game .verdict-flash { pointer-events:none; }
#screen-game .revealed-panel { top:auto; bottom:100%; max-height:35dvh; }

#screen-game .judge-watch-bar { position:absolute; z-index:74; top:96px; left:16px; width:18%; max-width:250px; margin:0; gap:5px; padding:6px; border-radius:10px; background:rgba(9,12,20,.82); border:1px solid #d6b87366; backdrop-filter:blur(8px); }
#screen-game .jw-head { width:100%; min-height:34px; padding:2px; }
#screen-game .jw-label { font-size:10px; letter-spacing:.3px; white-space:normal; }
#screen-game .jw-now { display:flex; flex-direction:column; gap:4px; font-size:11px; }
#screen-game .jw-body { position:static; width:100%; max-height:25dvh; overflow:auto; }
#screen-game .score-sidebar { width:280px; z-index:85; background:rgba(9,12,20,.55); backdrop-filter:blur(14px); border-left:1px solid #d6b87366; }
#screen-game .sb-row { background:rgba(9,12,20,.35); }
#screen-game .sb-inner { padding:16px 10px; }

@media (max-height:650px) and (min-width:701px) {
  #screen-game .info-bar { top:6px; min-height:32px; }
  #screen-game .role-banner { top:42px; height:26px; }
  #screen-game .accusation-ticker { top:73px; padding:6px 12px; }
  #screen-game .charge-file-head, #screen-game .charge-expand-hint { font-size:9px; margin:2px 0; }
  #screen-game .charge-text { -webkit-line-clamp:2; }
  #screen-game .judge-watch-bar { top:74px; }
  #screen-game .phase-content { padding:8px 12px; gap:5px; }
}
@media (max-width:900px) {
  #screen-game { --hud-rail:0px; }
  #screen-game .score-sidebar { top:auto; bottom:0; width:100%; height:min(60dvh,440px); max-height:60dvh; transform:translateY(calc(100% - 38px)); }
  #screen-game .score-sidebar.open { transform:none; }
  #screen-game .sb-toggle { display:block; position:static; height:38px; min-height:38px; width:100%; background:rgba(9,12,20,.72); color:var(--gold); border:0; padding:4px; }
  #screen-game .content-zone { bottom:48px; }
}
@media (max-width:700px) {
  #screen-game { --hud-gap:8px; }
  #screen-game .stage-bg { object-position:50% 60%; }
  #screen-game .scene-furniture { display:none; }
  #screen-game .stage-jury-more { left:auto; right:8px; bottom:auto; top:38%; transform:none; }
  #screen-game .stage-slot[data-role="defendant"] { --h:23% !important; }
  #screen-game .stage-plate { max-width:138px; padding:3px 5px; gap:4px; border-radius:6px; }
  #screen-game .plate-role { font-size:14px; letter-spacing:0; }
  #screen-game .plate-person { display:none; font-size:10px; }
  #screen-game .stage-plate.speaking .plate-person { display:flex; }
  #screen-game .judge-bubble { top:25.5%; max-width:40%; font-size:10px; padding:3px 6px; }
  #screen-game .info-bar { top:6px; min-height:48px; gap:4px; padding:4px 6px; }
  #screen-game .info-bar .round-badge { font-size:10px; max-width:70px; white-space:normal; }
  #screen-game .info-bar .code-badge, #screen-game .info-bar .volume { display:none; }
  #screen-game .info-bar .btn { min-height:40px; padding:4px 6px; font-size:10px; }
  #screen-game #btnReduceMotion { font-size:0; width:40px; }
  #screen-game #btnReduceMotion::before { content:'🏃'; font-size:19px; }
  #screen-game #btnReduceMotion.active::before { content:'🐢'; }
  #screen-game .info-bar .info-btn { width:40px; height:40px; }
  #screen-game .role-banner { top:59px; height:29px; padding:3px 6px; gap:6px; }
  #screen-game .rb-title { font-size:12px; letter-spacing:0; }
  #screen-game .rb-speaker { font-size:11px; }
  #screen-game .rb-avatar { font-size:14px; }
  #screen-game .accusation-ticker { top:95px; width:calc(100% - 16px); max-width:none; padding:8px 10px; font-size:clamp(22px,2.65dvh,32px); line-height:1.25; }
  #screen-game .charge-file-head { font-size:9px; margin-bottom:4px; letter-spacing:.5px; }
  #screen-game .charge-text { -webkit-line-clamp:2; }
  #screen-game .charge-expand-hint { font-size:9px; margin-top:3px; }
  #screen-game .accusation-ticker.expanded { width:calc(100% - 16px); max-height:38dvh; }
  #screen-game .content-zone, #screen-game .content-zone[data-layout] { width:calc(100% - 16px); max-height:42dvh; }
  #screen-game .phase-content { max-height:42dvh; padding:9px 10px; gap:6px; border-radius:12px; }
  #screen-game .phase-content button, #screen-game .fixed-actions .btn { min-height:48px; padding:8px 10px; font-size:12px; }
  #screen-game .timer-ring, #screen-game .prep-clock .timer-ring { width:clamp(80px,14dvh,150px); height:clamp(80px,14dvh,150px); }
  #screen-game .speech-row, #screen-game .prep-row { gap:12px; }
  #screen-game .speech-row .inline-actions .btn { min-width:120px; }
  #screen-game .next-step { font-size:12px; }
  #screen-game .vote-btn { min-height:64px; font-size:24px; }
  #screen-game .verdict-title { font-size:36px; }
  #screen-game .sentence-card { font-size:12px; padding:6px 8px; }
  #screen-game .vote-chip { font-size:10px; padding:2px 5px; }
  #screen-game .results-scroll .score-row { min-height:25px; font-size:12px; padding:3px 6px; }
  #screen-game .score-row .pts { font-size:12px; }
  #screen-game .awards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  #screen-game .award-card { width:auto; padding:4px; min-width:0; }
  #screen-game .objection-phase { gap:4px; }
  #screen-game .objection-instruction, #screen-game .objection-phase-sub { font-size:12px; }
  #screen-game .review-card { min-height:0; padding:20px 8px 6px; }
  #screen-game .review-text { font-size:14px; line-height:1.25; }
  #screen-game .review-note { margin:0; }
  #screen-game .review-who { font-size:11px; }
  #screen-game .review-buttons .btn { font-size:11px; }
  #screen-game .fun-vote { font-size:11px; gap:4px; }
  #screen-game .phase-content[data-phase="challenge_review"] { gap:4px; }
  #screen-game .review-summary .review-note { font-size:10px; line-height:1.2; }
  #screen-game .review-buttons .btn { min-height:48px; font-size:11px; padding:6px; }
  #screen-game .phase-content[data-phase="challenge_vote"] { padding:8px; gap:4px; }
  #screen-game .phase-content[data-phase="challenge_vote"] .next-step { font-size:11px; margin:0; }
  #screen-game .phase-content[data-phase="challenge_vote"] .vote-status { font-size:12px; padding:2px 8px; }
  #screen-game .challenge-results { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; padding:2px 4px; }
  #screen-game .challenge-results .cr { margin:0; font-size:11px; line-height:1.25; max-height:4em; overflow:auto; }
  #screen-game .challenge-results > div:not(.cr) { display:flex; align-items:center; gap:4px; margin:0 !important; font-size:0 !important; }
  #screen-game .challenge-results .btn { min-width:48px; padding:4px 6px; }
  #screen-game .judge-watch-bar { top:180px; width:25%; max-width:110px; left:8px; }
  #screen-game .judge-watch-bar.collapsed .jw-now { display:none; }
  #screen-game .judge-watch-bar .jw-head { min-height:48px; }
  #screen-game .jw-label { font-size:8px; }
  #screen-game .jw-now { font-size:9px; }
  #screen-game .jw-note { min-height:48px; font-size:9px; }
  #screen-game .jw-body { max-height:22dvh; }
}
.reduced-motion .accusation-ticker.charge-intro { top:92px !important; transform:translateX(-50%) !important; }
@media (prefers-reduced-motion:reduce) { #screen-game .accusation-ticker { transition:none; } }
@media (max-width:700px) {
  #screen-game .score-sidebar { transform:translateY(calc(100% - 48px)); }
  #screen-game .score-sidebar.open { transform:none; }
  #screen-game .sb-toggle { height:48px; min-height:48px; }
  #screen-game .content-zone { bottom:58px; }
  #screen-game .react-btn, #screen-game .sb-kick { min-width:48px; min-height:48px; }
  #screen-game .info-bar { min-height:56px; padding:4px 6px; }
  #screen-game .info-bar .btn { min-width:48px; min-height:48px; }
  #screen-game #btnReduceMotion { width:48px; }
  #screen-game .info-bar .info-btn { width:48px; height:48px; }
  #screen-game .role-banner { top:74px; height:27px; } /* az infósáv telefonon 65 px magas lehet: a szerep-sáv ne lógjon bele */
  #screen-game .accusation-ticker { top:106px; padding:6px 10px; line-height:1.15; }
  #screen-game .charge-file-head { margin-bottom:3px; }
  #screen-game .charge-expand-hint { margin-top:2px; }
  #screen-game .judge-bubble { top:27%; font-size:9px; line-height:12px; max-height:18px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; padding:2px 6px; }
}
#screen-game .content-zone[data-layout="result"] { width:min(640px,calc(100% - var(--hud-rail) - 32px)); }
@media (max-width:700px) {
  #screen-game .content-zone[data-layout="result"] { width:calc(100% - 16px); }
}
/* Belépőoldal: a csatolt terem, a meglévő figurák és valódi HTML-űrlapok. */
.auth-screen { position: relative; isolation: isolate; color: #3d271b; min-height: 100dvh; overflow: clip; }
.auth-screen.active { display: flex; justify-content: center; }
.auth-background, .auth-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.auth-background { object-fit: cover; object-position: 50% 56%; }
.auth-shade { z-index: -1; background: linear-gradient(180deg, rgba(23,12,7,.34), rgba(27,14,8,.1) 42%, rgba(23,8,6,.73)); }
.auth-layout { width: min(100%, 1700px); min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 20px 20px 0; gap: 12px; position: relative; }
.auth-header { text-align: center; position: relative; z-index: 3; }
.auth-eyebrow { margin: 0 0 4px; color: #fce5b1; font-size: 11px; letter-spacing: 3px; font-weight: 800; text-shadow: 0 2px 4px #211008; }
.auth-logo { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(38px, 5.6vw, 82px); font-weight: 900; line-height: 1.04; letter-spacing: -2px; margin: 0; color: #ffe29d; text-shadow: 0 2px 0 #bf8b37, 0 4px 0 #805321, 0 7px 0 #543719, 0 10px 15px #1e1008; }
.auth-logo span { display: inline-block; font-size: .65em; vertical-align: 8%; filter: drop-shadow(0 3px 1px #392412); }
.auth-ribbon { margin: 16px -20px 0; padding: 7px 30px; font-size: 10px; font-weight: 800; letter-spacing: 2px; color: #ffe6ba; border: 1px solid #e0b67580; background: linear-gradient(#922c27, #591914); box-shadow: 0 4px 12px #190a06b3; transform: rotate(-1deg); }
.auth-slogan { display: grid; text-align: center; gap: 2px; padding: 9px 42px; border: 1px solid #bc8e54; color: #4d2f1b; background: linear-gradient(105deg, #eacb91, #fff0cf 45%, #eac793); box-shadow: 0 5px 13px #20110680, inset 0 0 20px #a1743533; border-radius: 4px 10px 7px 4px; transform: rotate(1deg); position: relative; z-index: 2; }
.auth-slogan strong { font-family: Georgia, serif; font-size: 23px; font-weight: 900; letter-spacing: 1px; }
.auth-slogan span { font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.auth-forms { width: min(820px, 65%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; position: relative; z-index: 2; margin: auto 0; }
.auth-card { min-width: 0; position: relative; padding: 24px 26px 18px; background: radial-gradient(ellipse at 50% 10%, #fff2d8, #f4e2bd 75%, #ddbd87); border: 1px solid #c19761; border-radius: 13px 7px 14px 8px; box-shadow: 0 12px 32px #170b0780, inset 0 0 0 4px #fff4d54d, inset 0 0 40px #b77f2620; color: #3d271b; }
.auth-stamp { position: absolute; top: 15px; right: 14px; margin: 0; font-size: 8px; font-weight: 800; letter-spacing: 1px; color: #88362b; border: 1px solid #aa574a70; padding: 3px 5px; transform: rotate(7deg); opacity: .65; }
.auth-card h2 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 28px; font-weight: 800; line-height: 1.2; color: #4e301d; }
.auth-card-intro { margin: 0 0 18px; font-size: 12px; color: #775b40; line-height: 1.4; }
.auth-card form { display: block; }
.auth-card label { display: block; font-size: 12px; font-weight: 700; margin: 0 0 5px; color: #5b3b26; }
.auth-card label small { font-weight: 400; font-size: 10px; }
.auth-card input:not([type='checkbox']) { display: block; width: 100%; min-width: 0; height: 42px; margin: 0 0 13px; border: 1px solid #bd9b71; border-radius: 6px; background: #fff7e7; box-shadow: inset 0 2px 4px #855d2420; color: #3e2c21; padding: 0 12px; font: 14px var(--font-body); }
.auth-card input::placeholder { color: #967d65; opacity: 1; }
.auth-card input:focus-visible { outline: 3px solid #9e681d; outline-offset: 2px; border-color: #9e681d; }
.auth-password { position: relative; }
.auth-password input:not([type='checkbox']) { padding-right: 46px; }
.auth-password button { position: absolute; right: 2px; top: 1px; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: #76532d; cursor: pointer; font-size: 20px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 9px; }
.auth-card .auth-check { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 11px; cursor: pointer; }
.auth-check input { accent-color: #915c1b; width: 17px; height: 17px; margin: 0; }
.auth-text-button { border: 0; padding: 3px 0; background: transparent; color: #784018; text-decoration: underline; text-underline-offset: 3px; font: inherit; font-weight: 700; cursor: pointer; }
.auth-options .auth-text-button { font-size: 11px; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; border: 1px solid #99611a; border-radius: 7px; font-family: var(--font-disp); font-size: 17px; font-weight: 700; letter-spacing: .7px; color: #502f13; cursor: pointer; background: linear-gradient(#ffe6a5, #e9ba59 58%, #dca53d); box-shadow: inset 0 1px 0 #fff3cd, 0 3px 0 #895718, 0 5px 10px #85532440; }
.auth-submit:hover:not(:disabled) { filter: brightness(1.08); }
.auth-submit:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 #fff3cd, 0 1px 0 #895718; }
.auth-card button:focus-visible, .auth-tabs button:focus-visible, .auth-guest:focus-visible { outline: 3px solid #805113; outline-offset: 3px; }
.auth-card button:disabled { cursor: default; opacity: .55; }
.auth-form-message { font-size: 12px; line-height: 1.4; color: #a22e28; margin: 0; overflow-wrap: anywhere; }
.auth-form-message:not(:empty) { margin: 8px 0 12px; }
.auth-form-message.success { color: #315d2b; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: #8a6c50; font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #c5a67c; }
.auth-providers { display: flex; gap: 9px; }
.auth-provider { flex: 1; min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 12px var(--font-body); border: 1px solid #c4ac87; border-radius: 6px; cursor: pointer; background: #fffaf0; color: #554333; }
.auth-discord { color: #fff; background: #5865f2; border-color: #4450cf; }
.auth-google b { font-size: 18px; color: #4285f4; font-family: Arial, sans-serif; }
.auth-small { font-size: 10px; line-height: 1.4; text-align: center; color: #866748; margin: 8px 0 0; }
.auth-small:empty { display: none; }
.auth-switch { text-align: center; font-size: 11px; color: #715337; margin: 13px 0 0; }
.auth-status { z-index: 3; max-width: 780px; text-align: center; margin: 0; font-size: 12px; color: #fff0d2; text-shadow: 0 1px 3px #110700; }
.auth-status:empty { display: none; }
.auth-guest { position: relative; z-index: 3; color: #ffe2ab; background: #25130dab; border: 1px solid #d4af6466; border-radius: 999px; padding: 8px 22px; font: 700 11px var(--font-body); letter-spacing: 1px; cursor: pointer; }
.auth-features { z-index: 2; width: calc(100% + 40px); display: flex; justify-content: center; align-items: center; gap: clamp(28px, 6vw, 110px); padding: 14px 20px; margin-top: 4px; color: #ffe6b3; font-size: 11px; letter-spacing: .8px; font-weight: 800; background: #431b17db; border-top: 1px solid #ddae6066; box-shadow: 0 -4px 20px #18080470; }
.auth-features span { display: flex; align-items: center; gap: 10px; }
.auth-features b { font-size: 23px; }
.auth-tabs { display: none; }
.auth-help { z-index: 5; color: #ffe3aa; background: #341b10bd; border-color: #bd8b55; }
.auth-recovery { margin: auto; width: min(430px, calc(100vw - 24px)); border: 0; padding: 0; overflow: auto; max-height: 90dvh; background: transparent; border-radius: 13px; color: #3d271b; }
.auth-recovery::backdrop { background: #160d09c7; backdrop-filter: blur(5px); }
.auth-recovery .auth-card { padding-top: 30px; }
.auth-close { position: absolute; right: 7px; top: 3px; width: 40px; height: 40px; font-size: 28px; border: 0; background: transparent; color: #795437; cursor: pointer; }
.account-dock { position: relative; margin: 12px auto 0; width: fit-content; max-width: 100%; font-size: 12px; color: #ffe3a5; z-index: 10; }
.account-dock summary { cursor: pointer; border: 1px solid #dfb96d80; border-radius: 8px; padding: 9px 16px; background: #18131ad9; overflow-wrap: anywhere; list-style-position: inside; }
.account-content { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 5px); width: min(300px, 85vw); padding: 14px; background: #14121af5; border: 1px solid #cfaa6570; border-radius: 10px; box-shadow: 0 10px 25px #0009; }
.account-content p { margin: 0 0 10px; overflow-wrap: anywhere; }
.account-content p:empty { display: none; }
.account-connections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.account-connections button { padding: 7px 8px; min-height: 36px; color: #ead3ad; border: 1px solid #735c41; background: #302337; border-radius: 6px; cursor: pointer; font: 11px var(--font-body); }
.account-connected { font-size: 11px; color: #b6dca0; padding: 7px 0; }

@media (min-width: 701px) and (max-height: 720px) {
  .auth-layout { padding-top: 10px; gap: 8px; }
  .auth-eyebrow { display: none; }
  .auth-logo { font-size: clamp(38px, 4.5vw, 58px); }
  .auth-ribbon { margin-top: 9px; padding: 5px 25px; font-size: 9px; }
  .auth-slogan { padding: 5px 32px; }
  .auth-slogan strong { font-size: 19px; }
  .auth-slogan span { font-size: 9px; }
  .auth-card { padding: 16px 22px 12px; }
  .auth-card h2 { font-size: 23px; }
  .auth-card-intro { margin-bottom: 10px; font-size: 11px; }
  .auth-card label { font-size: 11px; margin-bottom: 3px; }
  .auth-card input:not([type='checkbox']) { height: 35px; margin-bottom: 8px; font-size: 13px; }
  .auth-password button { height: 33px; }
  .auth-submit { min-height: 39px; font-size: 15px; }
  .auth-provider { min-height: 36px; }
  .auth-divider { margin-top: 13px; }
  .auth-options { margin-bottom: 8px; }
  .auth-switch { margin-top: 9px; }
  .auth-stamp { top: 10px; right: 10px; font-size: 7px; }
  .auth-features { padding-top: 8px; padding-bottom: 8px; font-size: 9px; }
  .auth-features b { font-size: 18px; }
}
@media (max-width: 1050px) and (min-width: 701px) {
  .auth-forms { width: 78%; gap: 14px; }
  .auth-card { padding-left: 20px; padding-right: 20px; }
  .auth-stamp { display: none; }
}
@media (max-width: 700px) {
  .auth-layout { padding: 21px 14px 0; gap: 11px; }
  .auth-eyebrow { font-size: 8px; letter-spacing: 1.5px; }
  .auth-logo { font-size: clamp(30px, 8.8vw, 53px); letter-spacing: -1px; }
  .auth-logo span { display: none; }
  .auth-ribbon { margin: 12px 0 0; padding: 6px 10px; font-size: 7px; letter-spacing: .7px; }
  .auth-help { width: 30px; height: 30px; top: 6px; right: 6px; }
  .auth-slogan { padding: 7px 15px; }
  .auth-slogan strong { font-size: 19px; }
  .auth-slogan span { font-size: 8px; letter-spacing: .8px; }
  .auth-forms { width: min(430px, 100%); grid-template-columns: minmax(0, 1fr); gap: 0; margin: 4px 0 auto; }
  .auth-tabs { display: flex; gap: 5px; padding: 0 4px; }
  .auth-tabs button { flex: 1; border: 1px solid #ae8854; border-bottom: 0; border-radius: 8px 8px 0 0; min-height: 48px; padding: 8px 4px; background: #402921eb; color: #ecd0a0; font: 700 12px var(--font-disp); letter-spacing: .6px; cursor: pointer; }
  .auth-tabs button[aria-selected='true'] { background: #f8e7c5; color: #51351c; }
  .auth-forms[data-tab='login'] #authRegisterCard, .auth-forms[data-tab='register'] #authLoginCard { display: none; }
  .auth-card { padding: 20px 20px 16px; border-top-left-radius: 5px; border-top-right-radius: 5px; }
  .auth-card h2 { font-size: 26px; }
  .auth-stamp { font-size: 7px; top: 16px; right: 12px; }
  .auth-card-intro { margin-bottom: 15px; }
  .auth-card input:not([type='checkbox']) { height: 48px; font-size: 16px; margin-bottom: 12px; }
  .auth-password button { width: 48px; height: 48px; top: 0; right: 0; }
  .auth-card label { font-size: 12px; }
  .auth-options { margin: 0 0 10px; }
  .auth-options .auth-text-button { min-height: 48px; }
  .auth-card .auth-check { font-size: 11px; min-height: 48px; }
  .auth-check input { width: 20px; height: 20px; }
  .auth-submit, .auth-provider { min-height: 48px; }
  .auth-switch .auth-text-button { min-height: 48px; }
  .auth-switch { margin-top: 5px; }
  .auth-divider { margin-top: 17px; }
  .auth-guest { min-height: 48px; margin-top: 0; }
  .auth-status { font-size: 11px; }
  .auth-features { width: calc(100% + 28px); gap: 12px; padding: 13px 8px; margin-top: 0; font-size: 7px; letter-spacing: .3px; }
  .auth-features span { flex-direction: column; gap: 5px; text-align: center; }
  .auth-features b { font-size: 20px; }
  .auth-recovery .auth-card { border-radius: 12px; }
  .auth-close { width: 48px; height: 48px; }
  .account-connections button, .account-dock .btn { min-height: 48px; }
}

/* ============================================================
   AVATÁROK (képes) + avatárválasztó ablak
   ============================================================ */

.av-img {
  width: 1.7em; height: 1.7em; border-radius: 50%;
  object-fit: cover; object-position: 50% 30%;
  vertical-align: middle; border: 2px solid rgba(242, 193, 78, 0.8);
  background: #1a1410;
}
.st-fallback .av-img { width: 2.6em; height: 2.6em; }

.avatar-cell { padding: 3px; min-width: 0; border-radius: 12px; background: #1a1410; }
.avatar-cell img {
  width: 66px; height: 66px; border-radius: 9px;
  object-fit: cover; object-position: 50% 30%; display: block;
}

.avatar-modal {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6, 4, 3, 0.78); backdrop-filter: blur(3px);
}
.avatar-panel {
  width: min(760px, 100%); max-height: min(88dvh, 760px);
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px; border-radius: 16px;
  background: linear-gradient(rgba(20, 12, 4, 0.55), rgba(20, 12, 4, 0.55)),
    repeating-linear-gradient(88deg, #3c2c1a 0 16px, #463420 16px 26px, #3a2a18 26px 44px);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.avatar-panel-head { display: flex; align-items: center; gap: 16px; }
.avatar-panel-head h2 { font-family: var(--font-disp); font-size: 24px; letter-spacing: 1px; color: var(--gold); }
.avatar-panel-head p { font-size: 13px; color: #d8cdb2; }
.avatar-preview {
  width: 84px; height: 112px; flex: none; border-radius: 10px; object-fit: cover;
  border: 3px solid var(--gold); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.avatar-modal-grid { overflow-y: auto; padding: 6px; scrollbar-width: thin; gap: 8px; }
.avatar-modal-grid .avatar-cell img { width: 72px; height: 72px; }
.avatar-panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .avatar-modal-grid .avatar-cell img { width: 58px; height: 58px; }
  .avatar-preview { width: 60px; height: 80px; }
}

/* ============================================================
   Terem-háttér: névválasztó, menü (szoba létrehozás), lobby (beállítások)
   ============================================================ */

#screen-name, #screen-menu, #screen-lobby {
  /* A kép teteje (felirat + tábla) kilóg a látható részből: a lap alja marad, 16:9 arányban. */
  background:
    linear-gradient(180deg, rgba(10, 6, 4, 0.62) 0%, rgba(10, 6, 4, 0.32) 45%, rgba(10, 6, 4, 0.5) 100%),
    url('/assets/terem-hatter.webp') center bottom / max(100vw, 266.67vh) auto no-repeat fixed #120a06;
}

.mug-mono.mug-avatar { background: #1a1410; overflow: hidden; }
.mug-mono.mug-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }

/* Belépő képernyő: a megadott terem-háttér. Széles képernyőn a képbe sütött felirat látszik,
   a HTML-felirat helyet foglal, de rejtett; keskenyen a kép teteje kilóg, a HTML-felirat látszik. */
.auth-background { height: 150%; top: auto; bottom: 0; object-position: 50% 100%; }
.auth-shade { background: linear-gradient(180deg, rgba(14, 7, 4, .94), rgba(14, 7, 4, .6) 36%, rgba(23, 8, 6, .55) 70%, rgba(23, 8, 6, .8)); }
@media (min-width: 900px) and (min-aspect-ratio: 3/2) {
  .auth-background { height: 100%; top: 0; object-position: 50% 56%; }
  .auth-shade { background: linear-gradient(180deg, rgba(23,12,7,.2), rgba(27,14,8,0) 42%, rgba(23,8,6,.6)); }
  .auth-header, .auth-slogan { visibility: hidden; }
}

/* Kis avatár a körözési plakát bal felső sarkában */
.p-avatar {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; object-position: 50% 30%;
  border: 2px solid var(--gold2); background: #1a1410;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.45);
}

/* A tárgyalás színpadán a játékos választott avatárja áll a fix figura helyett */
.st-art.av-figure .st-base {
  object-fit: cover; object-position: 50% 25%;
  border-radius: 14px; border: 3px solid var(--glow, #f2c14e);
  background: #1a1410; box-sizing: border-box;
}

/* --- Bírói figyelő: a "Most figyeld" szöveg tördelődjön, ne lógjon ki a panelből --- */
#screen-game .jw-now { align-items: stretch; min-width: 0; }
#screen-game .jw-now b {
  display: block; white-space: normal; overflow: visible; text-overflow: clip;
  overflow-wrap: anywhere; line-height: 1.3;
}
#screen-game .jw-note { margin-left: 0; align-self: flex-start; min-height: 32px; padding: 4px 12px; font-size: 12px; }
#screen-game .jw-item { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  /* Kinyitva széles, olvasható panel; összecsukva marad a kis címke. */
  #screen-game .judge-watch-bar:not(.collapsed) { width: calc(100% - 16px); max-width: none; }
  #screen-game .jw-label { font-size: 10px; }
  #screen-game .jw-now { font-size: 12px; }
  #screen-game .jw-body { max-height: 30dvh; }
}

/* Avatár-figuránál a portré saját kerete jelzi a beszélőt; a régi külső keret kikapcsolva (dupla keret lett volna) */
.stage-slot.av-slot::after { display: none; }
.stage-slot.av-slot.mine .st-art.av-figure .st-base,
.stage-slot.av-slot.speaking .st-art.av-figure .st-base { box-shadow: 0 0 26px var(--glow); }

/* Avatáros bíró: nagyobb, a pulpitus elé kerül, alul nincs levágva */
#screen-game .judge-slot.av-judge { z-index: 36; }
.judge-slot.av-judge .st-art { clip-path: none; }

/* Kihívás-szavazás (IGEN/NEM): a leadott szavazat látványosan ki van emelve */
.cv-btn { position: relative; transition: opacity .15s, box-shadow .15s, transform .15s; }
.cv-btn.chosen {
  outline: 3px solid var(--gold); outline-offset: 2px;
  box-shadow: 0 0 22px rgba(242, 193, 78, 0.7); transform: scale(1.06); filter: none; opacity: 1;
}
.cv-btn.chosen::after {
  content: '✔'; position: absolute; top: -11px; right: -9px; font-size: 18px; line-height: 1;
  color: #241a06; background: var(--gold); border-radius: 50%; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; text-shadow: none; font-size: 13px; font-weight: 900;
}
.cv-btn.faded { opacity: 0.4; filter: saturate(0.5); }

/* Beszélő avatár-figura: csak enyhe kiemelés (a régi alakoknál 20% nagyítás volt, az avatár keretnél ez óriási lenne) */
.stage-slot.speaking .st-art.av-figure,
#screen-game .stage-slot.speaking .st-art.av-figure { transform: scale(1.05); }

/* Tiltakozás: a bíró panelén a döntés következményei */
.objection-rule { font-size: 12px; color: #d9c58a; text-align: center; max-width: 420px; line-height: 1.35; }

/* Hangerő-csúszka: a globális input-stílus (belső margó, keret, háttér) nem érvényes rá, így a teljes sáv húzható */
input[type="range"] { padding: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; height: 24px; cursor: pointer; }
input[type="range"]:focus { box-shadow: none; }
.info-bar .volume, #screen-game .info-bar .volume { width: 84px; }

/* A TILTAKOZOM! felirat sosem blokkolhatja a kattintásokat */
.objection-overlay { pointer-events: none; }

/* ============================================================
   NÉVKÁRTYÁK v2 – sötét fa + arany, a játék többi felületéhez illő "nyilvántartási lap"
   ============================================================ */

.mug-grid {
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 26px 22px; max-width: 1180px;
}

.mug-card {
  position: relative; min-height: 0;
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-align: center; cursor: pointer; color: #f3e7c9;
  border-radius: 16px; border: 2px solid #8a6420;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(242, 193, 78, 0.17), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.025) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #2d1f13 0%, #1a110b 100%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 193, 78, 0.22), inset 0 0 44px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
/* belső díszkeret (a régi magasságmérő csík helyett) */
.mug-card::before {
  content: ''; position: absolute; inset: 6px; width: auto; height: auto; margin: 0;
  border: 1px solid rgba(242, 193, 78, 0.2); border-radius: 11px;
  background: none; opacity: 1; pointer-events: none;
}
.mug-card:hover:not(.taken), .mug-card:focus-visible:not(.taken) {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.6), 0 0 26px rgba(242, 193, 78, 0.38), inset 0 0 0 1px rgba(242, 193, 78, 0.45), inset 0 0 44px rgba(0, 0, 0, 0.35);
}
.mug-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.mug-label {
  font-family: var(--font-disp); font-size: 10px; letter-spacing: 3.5px;
  color: #d9b25a; padding: 0 8px 4px; border-bottom: 1px solid rgba(242, 193, 78, 0.35);
}

.mug-mono {
  width: 96px; height: 96px; margin: 4px 0 2px;
  border: 3px solid var(--gold); border-radius: 50%;
  font-size: 46px; color: #fff; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px #1a110b, 0 0 0 6px rgba(242, 193, 78, 0.55), 0 10px 20px rgba(0, 0, 0, 0.55);
}

.mug-name {
  font-family: var(--font-disp); font-size: 22px; letter-spacing: 1px; line-height: 1.15;
  color: #fff3d0; min-width: 72%; max-width: 100%; overflow-wrap: anywhere;
  padding: 5px 14px;
  background: linear-gradient(180deg, #5e4020, #3a2612);
  border: 1px solid #c9973a; border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 9px rgba(0, 0, 0, 0.45);
}
.mug-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: #fff;
  background: linear-gradient(180deg, #f0655f, #c23a3a);
  border: 1px solid rgba(255, 190, 185, 0.5); border-radius: 999px; padding: 3px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.mug-title { font-size: 13px; font-style: italic; color: #cdbd96; line-height: 1.35; min-height: 1.35em; }

.mug-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: auto; padding-top: 4px; font-size: 11.5px; letter-spacing: 0.2px; }
.mug-stats .ms { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.mug-stats .ms i { font-style: normal; font-size: 12px; }
.mug-stats .ms b { color: #fff; font-weight: 800; }
.mug-stats .ms-bad { color: #ffbdb8; background: rgba(229, 72, 77, 0.16); border-color: rgba(229, 72, 77, 0.5); }
.mug-stats .ms-good { color: #aef2c0; background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.45); }

.mug-pick {
  font-family: var(--font-disp); font-size: 13px; letter-spacing: 2.2px; color: #241a06;
  background: linear-gradient(180deg, #f8d672, #d99a2b);
  border: 1px solid #8a6420; border-radius: 999px; padding: 6px 18px; margin-top: 2px;
  box-shadow: 0 3px 0 #8a6420, 0 6px 12px rgba(0, 0, 0, 0.4);
  opacity: 0.88; transition: opacity 0.15s, transform 0.15s;
}
.mug-pick i { font-style: normal; }
.mug-card:hover:not(.taken) .mug-pick, .mug-card:focus-visible .mug-pick { opacity: 1; transform: translateY(-1px); }

.mug-card.taken { filter: grayscale(0.85) brightness(0.68); cursor: not-allowed; }
.mug-card.chosen {
  border-color: var(--gold); transform: translateY(-4px);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.55), 0 0 30px rgba(242, 193, 78, 0.55), 0 12px 26px rgba(0, 0, 0, 0.55);
}

@media (max-width: 560px) {
  /* Telefonon két oszlop: fele annyi görgetés */
  .mug-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; max-width: 420px; }
  .mug-card { padding: 12px 8px 10px; gap: 7px; border-radius: 13px; }
  .mug-label { font-size: 9px; letter-spacing: 2.5px; }
  .mug-mono { width: 70px; height: 70px; font-size: 34px; box-shadow: 0 0 0 3px #1a110b, 0 0 0 5px rgba(242, 193, 78, 0.55), 0 8px 16px rgba(0, 0, 0, 0.5); }
  .mug-name { font-size: 17px; padding: 4px 8px; min-width: 80%; }
  .mug-title { font-size: 11.5px; }
  .mug-stats { flex-direction: column; align-items: center; gap: 4px; }
  .mug-stats .ms { font-size: 10.5px; padding: 2px 8px; }
  .mug-pick { font-size: 12px; padding: 5px 12px; letter-spacing: 1.5px; }
}

/* ============================================================
   SAJÁT KÁRTYA + PROFIL-SZERKESZTŐ
   ============================================================ */

.mug-card.mug-me {
  border-color: var(--gold);
  background:
    radial-gradient(120% 75% at 50% 0%, rgba(242, 193, 78, 0.3), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.03) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #34230f 0%, #1d130a 100%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 22px rgba(242, 193, 78, 0.25), inset 0 0 0 1px rgba(242, 193, 78, 0.4), inset 0 0 44px rgba(0, 0, 0, 0.35);
}
.mug-me .mug-label { color: #ffe08a; border-bottom-color: rgba(242, 193, 78, 0.75); }
.mug-me .mug-label::before, .mug-me .mug-label::after { content: ' ★ '; color: var(--gold); letter-spacing: 0; }

.mug-edit {
  font-family: var(--font-disp); font-size: 11px; letter-spacing: 1.8px; cursor: pointer;
  color: var(--gold); background: rgba(10, 6, 3, 0.7);
  border: 1px solid rgba(242, 193, 78, 0.6); border-radius: 999px; padding: 4px 14px;
}
.mug-edit:hover, .mug-edit:focus-visible { background: var(--gold); color: #241a06; outline: none; }

.profile-panel { width: min(880px, 100%); max-height: min(92dvh, 840px); overflow-y: auto; scrollbar-width: thin; }
.profile-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 20px; align-items: start; }
.profile-fields { display: flex; flex-direction: column; gap: 6px; }
.profile-fields label { font-size: 13px; color: #d8cdb2; margin-top: 6px; }
.profile-fields small { color: #a89877; }
.profile-fields input, .profile-fields textarea { width: 100%; font-size: 15px; letter-spacing: 0; text-align: left; }
.profile-fields textarea { resize: vertical; min-height: 70px; }
.profile-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.profile-preview-label, .profile-avatar-label {
  font-family: var(--font-disp); font-size: 11px; letter-spacing: 3px; color: #d9b25a;
}
.profile-card { width: min(240px, 100%); pointer-events: none; cursor: default; }
.profile-card:hover { transform: none; }
.profile-avatar { display: flex; flex-direction: column; gap: 6px; }
.profile-avatar-grid { max-height: 168px; overflow-y: auto; padding: 4px; gap: 6px; scrollbar-width: thin; }
.profile-avatar-grid .avatar-cell img { width: 56px; height: 56px; }
#pfMessage { min-height: 18px; margin: 0; }
#accountProfile { width: 100%; margin-bottom: 6px; }

@media (max-width: 640px) {
  .profile-body { grid-template-columns: 1fr; }
  .profile-preview { order: -1; }
  .profile-card { width: min(220px, 100%); }
}

/* Hosszú, szóköz nélküli szöveg se lógjon ki a kártyából */
.mug-title, .mug-card .mug-name { overflow-wrap: anywhere; max-width: 100%; }
.mug-badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mug-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   ARCULAT v2 – menü + lobbi: sötét fa + arany, mint a névkártyák
   ============================================================ */

/* --- menü --- */
.wood-panel {
  position: relative;
  border: 2px solid #8a6420; border-radius: 18px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(242, 193, 78, 0.17), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.025) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #2d1f13 0%, #1a110b 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(242, 193, 78, 0.22), inset 0 0 50px rgba(0, 0, 0, 0.4);
}
.wood-panel::before {
  content: ''; position: absolute; inset: 6px; border: 1px solid rgba(242, 193, 78, 0.2);
  border-radius: 13px; pointer-events: none;
}
.wood-panel > * { position: relative; }
.wood-panel .logo.small { color: var(--gold); text-shadow: 0 2px 0 #6e4a14, 0 4px 14px rgba(0, 0, 0, 0.6); }
.wood-panel input { border-color: #8a6420; }
.divider { color: #cdb27a; }

.menu-who {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(94, 64, 32, 0.55), rgba(40, 26, 12, 0.7));
  border: 1px solid rgba(242, 193, 78, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.35);
}
.menu-who .mw-av { width: 54px; height: 54px; flex: none; margin: 0; font-size: 26px; border-width: 2px;
  box-shadow: 0 0 0 3px #1a110b, 0 0 0 4px rgba(242, 193, 78, 0.55); }
.menu-who .mw-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.menu-who small { font-family: var(--font-disp); font-size: 10px; letter-spacing: 2.5px; color: #d9b25a; }
.menu-who b { font-family: var(--font-disp); font-size: 20px; letter-spacing: 1px; color: #fff3d0; overflow-wrap: anywhere; }
.menu-who i { font-size: 12px; color: #cdbd96; overflow-wrap: anywhere; }

/* --- lobbi: fejléc, faliújság --- */
.casefile-box {
  background: linear-gradient(180deg, #3d2a18, #1f150c);
  border: 2px solid #8a6420; border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.25), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.casefile-label { color: #d9b25a; }

.board {
  background:
    radial-gradient(110% 35% at 50% 0%, rgba(242, 193, 78, 0.13), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.02) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #2a1c10 0%, #150e08 100%);
  border: 2px solid #8a6420; outline: none; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 193, 78, 0.22), inset 0 0 70px rgba(0, 0, 0, 0.5);
}
.board-title { text-shadow: 0 2px 0 #6e4a14; }
svg.pin-threads path { stroke: #b3353a; opacity: 0.7; }

/* --- lobbi: körözési plakát = névkártya stílusban --- */
.poster {
  border: 2px solid #8a6420; border-radius: 14px; color: #f3e7c9;
  padding: 36px 14px 14px; gap: 7px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(242, 193, 78, 0.18), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.025) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #2d1f13 0%, #1a110b 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 193, 78, 0.22), inset 0 0 40px rgba(0, 0, 0, 0.4);
}
.poster:hover { box-shadow: 0 16px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(242, 193, 78, 0.3), inset 0 0 0 1px rgba(242, 193, 78, 0.4); }
.p-avatar {
  position: static; width: 72px; height: 72px; margin: 2px 0 0; flex: none;
  border: 3px solid var(--gold); border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  background: #1a110b;
  box-shadow: 0 0 0 3px #1a110b, 0 0 0 5px rgba(242, 193, 78, 0.5), 0 8px 16px rgba(0, 0, 0, 0.5);
}
.p-avatar.p-mono {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: 34px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.p-wanted { color: #ffe08a; border-bottom-color: rgba(242, 193, 78, 0.6); font-size: 12px; letter-spacing: 3.5px; margin-top: 6px; }
.p-name {
  color: #fff3d0; font-size: 23px; padding: 4px 14px; margin-top: 2px;
  background: linear-gradient(180deg, #5e4020, #3a2612);
  border: 1px solid #c9973a; border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 9px rgba(0, 0, 0, 0.45);
}
.p-badge { background: linear-gradient(180deg, #f0655f, #c23a3a); border: 1px solid rgba(255, 190, 185, 0.5); }
.p-title { color: #cdbd96; overflow-wrap: anywhere; }
.p-priors { color: #b9ab88; overflow-wrap: anywhere; }
.p-reward { color: var(--gold); }
.p-record { color: #cdbd96; }
.p-stamp.host, .p-stamp.bot { top: 10px; }
.p-stamp.bot { left: 10px; }

/* --- lobbi: ügyiratmappa (játékmódok + beállítások) --- */
.folder {
  color: #f3e7c9; border: 2px solid #8a6420; border-radius: 16px;
  background:
    radial-gradient(100% 45% at 50% 0%, rgba(242, 193, 78, 0.13), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.02) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, #2b1d11 0%, #170f09 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 193, 78, 0.2), inset 0 0 60px rgba(0, 0, 0, 0.4);
}
.folder-tab {
  color: #241a06; background: linear-gradient(180deg, #f8d672, #d99a2b);
  border: 2px solid #8a6420; border-bottom: none; box-shadow: 0 -2px 10px rgba(242, 193, 78, 0.25);
}
.folder-heading { color: var(--gold); }
.case-tab {
  color: #f3e7c9; border: 2px solid #8a6420; border-radius: 10px;
  background: linear-gradient(180deg, #3d2a18, #251a0e);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.case-tab:hover { border-color: var(--gold); }
.case-tab.active-case {
  color: #fff3d0; border-color: var(--gold);
  background: linear-gradient(180deg, #5e4020, #3a2612);
  box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.45), 0 0 22px rgba(242, 193, 78, 0.35), 0 4px 10px rgba(0, 0, 0, 0.4);
}
.settings-grid label { color: #d8cdb2; }
.settings-grid input[type='number'], #customAccusations {
  color: #fff3d0; background: rgba(8, 12, 22, 0.75); border-color: #8a6420;
}
.settings-grid input[type='checkbox'], .folder input[type='radio'] { accent-color: var(--gold); }
.folder .check { color: #d8cdb2; }
.folder .hint { color: #b6a780; }
.folder .btn.ghost { color: #d7c9a8; border-color: #5a5140; }
.waiting-note { border-color: #8a6420; background: linear-gradient(180deg, rgba(61, 42, 24, 0.85), rgba(31, 21, 12, 0.9)); }

/* A KIRÚG gomb ne takarja a számokat: a plakát alja kap helyet */
.poster:has(.poster-kick) { padding-bottom: 52px; }

/* ============================================================
   NÉVVÁLASZTÓ: szakaszok (saját profil + A legendás tesztelők) és statisztika
   ============================================================ */

.name-section { width: 100%; max-width: 1180px; margin: 6px 0 10px; }
.section-title {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-disp); font-weight: 500; letter-spacing: 4px; text-align: center;
  color: var(--gold); font-size: clamp(19px, 3.2vw, 28px); text-shadow: 0 2px 0 #6e4a14, 0 4px 14px rgba(0, 0, 0, 0.6);
}
.section-title::before, .section-title::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, transparent, #8a6420 35%, #8a6420 65%, transparent);
}
.section-sub { text-align: center; color: #e2d5b4; font-size: 14px; margin: 8px 0 20px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.legends-section { margin-top: 26px; }
.legends-section .mug-grid { margin: 0 auto; }

.profile-dash {
  display: grid; grid-template-columns: minmax(230px, 270px) minmax(0, 1fr); gap: 22px; align-items: stretch;
  margin-top: 16px; padding: 20px; border-radius: 20px;
  border: 2px solid #8a6420;
  background:
    radial-gradient(110% 40% at 50% 0%, rgba(242, 193, 78, 0.13), transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, 0.02) 0 3px, transparent 3px 9px),
    linear-gradient(180deg, rgba(42, 28, 16, 0.94) 0%, rgba(21, 14, 8, 0.96) 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 193, 78, 0.22), inset 0 0 60px rgba(0, 0, 0, 0.45);
}
.profile-card-slot { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; }

/* kártya alatt: mivel van összekapcsolva a fiók */
.card-links { width: 100%; max-width: 270px; margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cl-title { font-family: var(--font-disp); font-size: 11px; letter-spacing: 2.5px; color: #c9a85c; }
.card-links .account-connections { justify-content: center; margin: 0; gap: 6px; }
.card-links .account-connected {
  padding: 5px 11px; border-radius: 999px; color: #bfe6a8;
  border: 1px solid rgba(182, 220, 160, 0.45); background: rgba(40, 62, 30, 0.35);
}
.card-links .account-connections button { border-radius: 999px; padding: 5px 11px; min-height: 0; }
.card-links .account-connections button:hover { border-color: var(--gold); color: #ffe08a; }
.ps-logout { margin-left: auto; }
.profile-card-slot .mug-card { width: 100%; max-width: 270px; }

.profile-stats { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ps-head h3 { font-family: var(--font-disp); font-weight: 500; font-size: 20px; letter-spacing: 3px; color: #ffe08a; }
.ps-sub { display: block; font-size: 13px; color: #cdbd96; margin-top: 2px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.st-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 12px 8px 10px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(94, 64, 32, 0.55), rgba(40, 26, 12, 0.75));
  border: 1px solid rgba(242, 193, 78, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.35);
}
.st-tile i { font-style: normal; font-size: 20px; line-height: 1; }
.st-tile b { font-family: var(--font-disp); font-weight: 500; font-size: 30px; line-height: 1.1; color: #fff3d0; }
.st-tile b small { font-size: 13px; color: #cdbd96; font-weight: 400; }
.st-tile span { font-size: 11.5px; letter-spacing: 0.4px; color: #cdbd96; line-height: 1.25; }
.st-tile.gold { border-color: var(--gold); box-shadow: 0 0 16px rgba(242, 193, 78, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.st-tile.gold b { color: var(--gold); }
.st-tile.bad b { color: #ffb9b4; }
.st-tile.good b { color: #aef2c0; }
.ps-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-role {
  font-size: 12.5px; color: #e8dcbc; padding: 5px 12px; border-radius: 999px;
  background: rgba(8, 12, 22, 0.55); border: 1px solid rgba(242, 193, 78, 0.28);
}
.ps-role b { color: #fff3d0; }
.ps-role small { color: #b6a780; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

@media (max-width: 760px) {
  .profile-dash { grid-template-columns: 1fr; padding: 14px; }
  .profile-card-slot .mug-card { max-width: 300px; }
  .card-links { max-width: 300px; }
  .ps-logout { margin-left: 0; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { letter-spacing: 2px; gap: 10px; }
}

/* ============================================================
   Fiók-sáv (a régi FIÓKOM legördülő helyett): név + külön Kijelentkezés gomb
   ============================================================ */
.account-dock { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: auto; }
.account-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; color: #ffe3a5; background: rgba(24, 19, 26, 0.85); border: 1px solid rgba(223, 185, 109, 0.5);
}
.account-chip b { color: #fff3d0; font-weight: 700; overflow-wrap: anywhere; }
.profile-account { display: flex; flex-direction: column; gap: 6px; }
.profile-email { margin: 0; font-size: 13px; color: #d8cdb2; overflow-wrap: anywhere; }
.profile-account .account-connections { margin-bottom: 0; }

/* ============================================================
   BOLT + NAPI KÜLDETÉSEK
   ============================================================ */

.shop-panel { width: min(1000px, 100%); max-height: min(92dvh, 880px); overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.shop-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shop-head h2 { font-family: var(--font-disp); font-weight: 500; font-size: 26px; letter-spacing: 2px; color: var(--gold); margin-right: auto; }
.shop-wallet {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 999px; font-size: 14px;
  color: #ffe08a; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--gold);
  box-shadow: 0 0 16px rgba(242, 193, 78, 0.25);
}
.shop-wallet b { font-family: var(--font-disp); font-weight: 500; font-size: 24px; color: #fff3d0; }
.shop-tabs { display: flex; gap: 8px; border-bottom: 2px solid #8a6420; }
.shop-tab {
  cursor: pointer; font-family: var(--font-disp); letter-spacing: 2px; font-size: 15px; padding: 9px 18px;
  border-radius: 10px 10px 0 0; border: 1px solid #8a6420; border-bottom: none; margin-bottom: -2px;
  background: rgba(40, 26, 12, 0.85); color: #d9b25a;
}
.shop-tab[aria-selected='true'] { background: linear-gradient(180deg, #f8d672, #d99a2b); color: #241a06; }
.shop-badge {
  display: inline-block; font-style: normal; font-family: var(--font-body); font-weight: 800; font-size: 11px;
  min-width: 18px; padding: 1px 6px; margin-left: 6px; border-radius: 999px; color: #fff; background: var(--red); text-align: center;
}
.shop-body { overflow-y: auto; padding: 4px 6px 4px 0; min-height: 260px; scrollbar-width: thin; }
.shop-info { font-size: 13px; color: #d8cdb2; margin: 6px 0 14px; line-height: 1.45; }
.shop-info b { color: #fff3d0; }
.shop-hint { font-size: 12px; color: #b6a780; line-height: 1.4; text-align: center; margin: 4px 0; }

.q-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.q-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-radius: 14px;
  border: 2px solid #8a6420; color: #f3e7c9;
  background: linear-gradient(180deg, #34230f, #1d130a);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(242, 193, 78, 0.18);
}
.q-card.ready { border-color: var(--gold); box-shadow: 0 0 24px rgba(242, 193, 78, 0.4), inset 0 0 0 1px rgba(242, 193, 78, 0.35); }
.q-card.claimed { opacity: 0.6; filter: saturate(0.7); }
.q-tier { align-self: flex-start; font-family: var(--font-disp); font-size: 11px; letter-spacing: 2.5px; padding: 2px 10px; border-radius: 999px; color: #241a06; background: #7ee2a0; }
.q-kozepes .q-tier { background: #f2c14e; }
.q-nehez .q-tier { background: #ff8a7a; }
.q-text { font-size: 15px; line-height: 1.35; min-height: 40px; color: #fff3d0; }
.q-bar { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(242, 193, 78, 0.35); overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d99a2b, #f8d672); transition: width 0.4s ease; }
.q-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-count { font-size: 12px; color: #cdbd96; }
.q-reward { margin-left: auto; font-family: var(--font-disp); font-size: 17px; color: var(--gold); }
.q-done { font-size: 12px; font-weight: 800; color: #aef2c0; }
.q-wait { font-size: 12px; color: #a89877; }
.q-bonus {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px;
  padding: 12px 16px; border-radius: 12px; border: 1px dashed #8a6420; background: rgba(8, 12, 22, 0.55); font-size: 14px; color: #e8dcbc;
}
.q-bonus.ready { border: 2px solid var(--gold); box-shadow: 0 0 20px rgba(242, 193, 78, 0.35); }
.q-bonus.claimed { opacity: 0.6; }

.shop-layout { display: grid; grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); gap: 20px; align-items: start; }
.shop-preview-col { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shop-preview { width: 100%; max-width: 250px; pointer-events: none; cursor: default; }
.shop-preview:hover { transform: none; }
.shop-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sf {
  cursor: pointer; font-family: var(--font-disp); font-size: 12px; letter-spacing: 1.5px; padding: 5px 12px; border-radius: 999px;
  color: #d9b25a; background: rgba(40, 26, 12, 0.85); border: 1px solid #8a6420;
}
.sf.active { background: var(--gold); color: #241a06; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.it-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 2px solid #5a4528; color: #f3e7c9;
  background: linear-gradient(180deg, #2f2012, #1b110a);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, border-color 0.15s;
}
.it-card:hover, .it-card:focus-visible { transform: translateY(-3px); outline: none; border-color: var(--gold); }
.it-card.trying { border-color: #7ee2ff; box-shadow: 0 0 16px rgba(126, 226, 255, 0.35); }
.it-card.r-ritka { border-color: #3b6fd1; }
.it-card.r-epikus { border-color: #9b5de5; }
.it-card.r-legends, .it-card.r-legendas { border-color: #f2c14e; box-shadow: 0 0 18px rgba(242, 193, 78, 0.3); }
.it-card.equipped { background: linear-gradient(180deg, #3a2d12, #221808); }
.it-top { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.it-slot { color: #a89877; }
.it-rar { color: #d9b25a; font-weight: 800; }
.it-name { font-family: var(--font-disp); font-weight: 500; font-size: 18px; letter-spacing: 0.5px; color: #fff3d0; }
.it-name em { font-style: normal; font-family: var(--font-body); font-size: 11px; color: #aef2c0; }
.it-desc { font-size: 12.5px; color: #cdbd96; line-height: 1.35; min-height: 34px; }
.it-act { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: auto; }
.it-act .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.it-need { font-size: 11px; color: #ffb9b4; }

@media (max-width: 700px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-preview-col { position: static; gap: 4px; }
  .shop-hint { font-size: 11.5px; margin: 0; }
  .shop-head h2 { font-size: 22px; }
}

/* ============================================================
   MEGVÁSÁROLT TÁRGYAK (kártya, plakát, névtábla)
   ============================================================ */

/* kártyakeretek: mindegyiknek saját animációja van.
   Két réteg: (1) a keret külső ragyogása, ami lüktet / ver / villog (--frame-anim),
              (2) egy fénycsík (üstökös), ami körbefut a kereten (::after, kúpos színátmenet + maszk). */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.mug-card[class*='cos-frame-'], .poster[class*='cos-frame-'] { --fw: 4px; --frame-base: 0 10px 22px rgba(0, 0, 0, 0.55); }
.stage-plate[class*='cos-frame-'] { --fw: 2px; --frame-base: 0 3px 12px rgba(0, 0, 0, 0.45); }
.sb-row[class*='cos-frame-'] { --fw: 2px; --frame-base: 0 2px 8px rgba(0, 0, 0, 0.4); }
.mug-card[class*='cos-frame-'], .poster[class*='cos-frame-'], .stage-plate[class*='cos-frame-'], .sb-row[class*='cos-frame-'] {
  border-color: var(--frame-c) !important;
  /* A ragyogást a --frame-anim animáció adja (az animáció felülírja ezt az alap értéket). */
  box-shadow: var(--frame-base), 0 0 14px var(--frame-g), inset 0 0 0 1px var(--frame-c);
}
/* A keret és a (mozgó) háttér animációja egy listában fut, hogy ne írják felül egymást;
   a lobbi-plakát belépő animációja is megmarad. */
.mug-card[class*='cos-frame-'], .mug-card[class*='cos-bg-'], .stage-plate[class*='cos-frame-'] { animation: var(--frame-anim, none), var(--bg-anim, none); }
.sb-row[class*='cos-frame-'] { animation: var(--frame-anim, none); }
.sb-row.flash[class*='cos-frame-'] { animation: row-flash 1s ease-out, var(--frame-anim, none); } /* a pontszerzés felvillanása megmarad */
.poster[class*='cos-frame-'], .poster[class*='cos-bg-'] { animation: poster-pin 0.5s cubic-bezier(0.18, 1.4, 0.4, 1), var(--frame-anim, none), var(--bg-anim, none); }

.mug-card[class*='cos-frame-']::after, .poster[class*='cos-frame-']::after, .stage-plate[class*='cos-frame-']::after, .sb-row[class*='cos-frame-']::after {
  content: ''; position: absolute; inset: calc(var(--fw) * -1); border-radius: inherit; padding: var(--fw);
  pointer-events: none; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: var(--after-anim, cos-spin var(--spin, 3.4s) linear infinite);
}
@keyframes cos-spin { to { --ang: 360deg; } }
/* a ponttábla sorain a gyűrű belül marad (különben vízszintes görgetősáv jelenne meg a sávon) */
.sb-row[class*='cos-frame-']::after { inset: 0; }

/* közös lüktetés: a ragyogás erősödik-gyengül */
@keyframes cos-glow {
  from { box-shadow: var(--frame-base), 0 0 8px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  to { box-shadow: var(--frame-base), 0 0 26px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
}
/* rubin: szívverés (két dobbanás, szünet) */
@keyframes cos-heart {
  0%, 100% { box-shadow: var(--frame-base), 0 0 8px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  12% { box-shadow: var(--frame-base), 0 0 32px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  24% { box-shadow: var(--frame-base), 0 0 10px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  38% { box-shadow: var(--frame-base), 0 0 28px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  62% { box-shadow: var(--frame-base), 0 0 8px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
}
/* neon: neoncső villogás */
@keyframes cos-neon {
  0%, 17%, 21%, 25%, 54%, 58%, 100% { box-shadow: var(--frame-base), 0 0 26px var(--frame-g), inset 0 0 12px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
  19%, 23%, 56% { box-shadow: var(--frame-base), 0 0 3px var(--frame-g), inset 0 0 2px var(--frame-g), inset 0 0 0 1px var(--frame-c); }
}
/* szivárvány: a ragyogás végigmegy a színeken */
@keyframes cos-rainbow-glow {
  0%, 100% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 77, 77, 0.65), inset 0 0 0 1px var(--frame-c); }
  20% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 210, 77, 0.65), inset 0 0 0 1px var(--frame-c); }
  40% { box-shadow: var(--frame-base), 0 0 22px rgba(77, 255, 136, 0.65), inset 0 0 0 1px var(--frame-c); }
  60% { box-shadow: var(--frame-base), 0 0 22px rgba(77, 195, 255, 0.65), inset 0 0 0 1px var(--frame-c); }
  80% { box-shadow: var(--frame-base), 0 0 22px rgba(176, 77, 255, 0.65), inset 0 0 0 1px var(--frame-c); }
}

/* ezüst: hideg fehér üstökös, lassú csillogás */
.cos-frame-silver { --frame-c: #cfd6e2; --frame-g: rgba(207, 214, 226, 0.45); --frame-anim: cos-glow 3s ease-in-out infinite alternate; --spin: 3.8s; }
.cos-frame-silver::after { background: conic-gradient(from var(--ang), transparent 0 180deg, rgba(220, 228, 240, 0.4) 290deg, #fff 346deg, transparent 360deg); }
/* smaragd: zöld üstökös + élő zöld ragyogás */
.cos-frame-emerald { --frame-c: #2fd37a; --frame-g: rgba(47, 211, 122, 0.5); --frame-anim: cos-glow 2.4s ease-in-out infinite alternate; --spin: 3.2s; }
.cos-frame-emerald::after { background: conic-gradient(from var(--ang), transparent 0 170deg, rgba(47, 211, 122, 0.45) 285deg, #c4ffdc 346deg, transparent 360deg); }
/* rubin: szívverés + vörös üstökös */
.cos-frame-ruby { --frame-c: #ff4d58; --frame-g: rgba(255, 77, 88, 0.6); --frame-anim: cos-heart 1.8s ease-in-out infinite; --spin: 3s; }
.cos-frame-ruby::after { background: conic-gradient(from var(--ang), transparent 0 180deg, rgba(255, 77, 88, 0.5) 290deg, #ffd0d4 346deg, transparent 360deg); }
/* zafír: két ellentétes kék üstökös */
.cos-frame-sapphire { --frame-c: #4c8dff; --frame-g: rgba(76, 141, 255, 0.55); --frame-anim: cos-glow 2.6s ease-in-out infinite alternate; --spin: 4s; }
.cos-frame-sapphire::after { background: conic-gradient(from var(--ang), transparent 0 20deg, rgba(76, 141, 255, 0.5) 100deg, #d6e6ff 156deg, transparent 170deg 200deg, rgba(76, 141, 255, 0.5) 280deg, #d6e6ff 336deg, transparent 350deg); }
/* ametiszt: két lila-fehér üstökös, mélyebb ragyogás */
.cos-frame-amethyst { --frame-c: #b07cff; --frame-g: rgba(176, 124, 255, 0.55); --frame-anim: cos-glow 2.2s ease-in-out infinite alternate; --spin: 3.6s; }
.cos-frame-amethyst::after { background: conic-gradient(from var(--ang), transparent 0 10deg, rgba(176, 124, 255, 0.5) 90deg, #f1e4ff 150deg, transparent 165deg 190deg, rgba(210, 170, 255, 0.5) 270deg, #fff 330deg, transparent 345deg); }
/* neon: villogó neoncső, gyors zöld fény */
.cos-frame-neon { --frame-c: #39ff88; --frame-g: rgba(57, 255, 136, 0.7); --frame-anim: cos-neon 3.2s linear infinite; --spin: 2.2s; }
.cos-frame-neon::after { background: conic-gradient(from var(--ang), transparent 0 150deg, rgba(57, 255, 136, 0.5) 270deg, #e2ffee 340deg, transparent 360deg); }
/* láng: gyors, hosszú tüzes csóva, remegő forró ragyogás */
.cos-frame-flame { --frame-c: #ff8a1f; --frame-g: rgba(255, 106, 0, 0.75); --frame-anim: cos-glow 0.7s ease-in-out infinite alternate; --spin: 1.7s; }
.cos-frame-flame::after { background: conic-gradient(from var(--ang), transparent 0 170deg, #ff3b00 250deg, #ff9a1f 310deg, #ffe27a 345deg, transparent 360deg); }
/* szivárvány: a teljes keret körbefutó szivárvány */
.cos-frame-rainbow { --frame-c: #ff5fa8; --frame-g: rgba(255, 95, 168, 0.6); --frame-anim: cos-rainbow-glow 5s linear infinite; --spin: 4.5s; }
.cos-frame-rainbow::after { background: conic-gradient(from var(--ang), #ff4d4d, #ffd24d, #4dff88, #4dc3ff, #b04dff, #ff4dc3, #ff4d4d); }

/* ------------------------------------------------------------
   LEGENDÁS TESZTELŐK: 12 egyedi, a boltban nem kapható keret (a data/players.json "keret" mezője hivatkozik rájuk).
   Mindegyik más színű, mintájú és mozgású.
   ------------------------------------------------------------ */
/* 2CORE – glitch: cián és magenta üstökös, az RGB-szétcsúszás akadozva villan */
.cos-frame-glitch { --frame-c: #19e6ff; --frame-g: rgba(25, 230, 255, 0.6); --frame-anim: cos-glitch 2.4s steps(1, end) infinite; --spin: 2.4s; }
.cos-frame-glitch::after { background: conic-gradient(from var(--ang), transparent 0 20deg, rgba(25, 230, 255, 0.5) 90deg, #b3f9ff 150deg, transparent 160deg 200deg, rgba(255, 43, 214, 0.5) 270deg, #ffb8f3 330deg, transparent 345deg); }
/* Izsván – pill: fél piros, fél kék gyűrű, a ragyogás rendőrlámpa-szerűen vált */
.cos-frame-pill { --frame-c: #ff4d4d; --frame-g: rgba(255, 77, 77, 0.55); --frame-anim: cos-pill 1.6s ease-in-out infinite; --spin: 3s; }
.cos-frame-pill::after { background: conic-gradient(from var(--ang), #ff3b3b 0 180deg, #3b8bff 180deg 360deg); }
/* Dubble_Gii – titokzatos: három lila szikra kering a sötét gyűrűn */
.cos-frame-mystic { --frame-c: #6f4fe0; --frame-g: rgba(124, 92, 255, 0.6); --frame-anim: cos-glow 2.8s ease-in-out infinite alternate; --spin: 6s; }
.cos-frame-mystic::after { background: conic-gradient(from var(--ang), transparent 0 30deg, #d9ceff 45deg, transparent 60deg 150deg, #b7a4ff 165deg, transparent 180deg 270deg, #fff 285deg, transparent 300deg); }
/* H3roMarci – hős: gyors arany-kék csóva, erős power-up ragyogás */
.cos-frame-hero { --frame-c: #ffc83d; --frame-g: rgba(255, 200, 61, 0.6); --frame-anim: cos-glow 1s ease-in-out infinite alternate; --spin: 1.9s; }
.cos-frame-hero::after { background: conic-gradient(from var(--ang), transparent 0 120deg, rgba(76, 201, 255, 0.55) 230deg, #ffc83d 300deg, #fff3b0 345deg, transparent 360deg); }
/* Kyrashi – szörny: fekete-vérvörös fogsor forog, dühös szívverés */
.cos-frame-monster { --frame-c: #c4001f; --frame-g: rgba(196, 0, 31, 0.65); --frame-anim: cos-heart 1.1s ease-in-out infinite; --spin: 7s; }
.cos-frame-monster::after { background: repeating-conic-gradient(from var(--ang), #c4001f 0 12deg, #1a0006 12deg 24deg); }
/* Sanyi/Sasi – alapító: vastag, csillogó arany gyűrű, méltóságteljes lassú ragyogás */
.cos-frame-founder { --frame-c: #ffd75e; --frame-g: rgba(255, 215, 94, 0.75); --frame-anim: cos-glow 3s ease-in-out infinite alternate; --spin: 5s; }
.mug-card.cos-frame-founder, .poster.cos-frame-founder { --fw: 5px; }
.cos-frame-founder::after { background: conic-gradient(from var(--ang), #ffd75e, #fff6c2, #ffb800, #fff6c2, #ffd75e, #fff6c2, #ffb800, #ffd75e); }
/* Alexhh – WOW: magenta-sárga csíkok, villogó pop-ragyogás */
.cos-frame-wow { --frame-c: #ff2bd6; --frame-g: rgba(255, 43, 214, 0.6); --frame-anim: cos-wow 1.2s steps(1, end) infinite; --spin: 2.6s; }
.cos-frame-wow::after { background: repeating-conic-gradient(from var(--ang), #ff2bd6 0 20deg, #ffe600 20deg 40deg); }
/* Collie – ismeretlen tényező: halvány, szellemszerűen halványuló-erősödő fehér gyűrű */
.cos-frame-ghost { --frame-c: #e8f4ff; --frame-g: rgba(232, 244, 255, 0.5); --frame-anim: cos-glow 3.6s ease-in-out infinite alternate; --after-anim: cos-spin 8s linear infinite, cos-fade 2.4s ease-in-out infinite alternate; }
.cos-frame-ghost::after { background: conic-gradient(from var(--ang), rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.95) 90deg, rgba(255, 255, 255, 0.15) 180deg, rgba(255, 255, 255, 0.95) 270deg, rgba(255, 255, 255, 0.15)); }
/* marci – az örök "majd": álmos türkiz ív, nagyon lassú lélegzés */
.cos-frame-lazy { --frame-c: #2fe3c2; --frame-g: rgba(47, 227, 194, 0.45); --frame-anim: cos-glow 6s ease-in-out infinite alternate; --spin: 11s; }
.cos-frame-lazy::after { background: conic-gradient(from var(--ang), transparent 0 90deg, rgba(47, 227, 194, 0.4) 200deg, #b3fff0 270deg, transparent 300deg); }
/* Marci – a másik Marci: narancs és türkiz csóva ELLENKEZŐ irányba forog, a ragyogás színt vált */
.cos-frame-twin { --frame-c: #ff8a3d; --frame-g: rgba(255, 138, 61, 0.55); --frame-anim: cos-twin 3s ease-in-out infinite; --after-anim: cos-spin 3.3s linear infinite reverse; }
.cos-frame-twin::after { background: conic-gradient(from var(--ang), transparent 0 10deg, rgba(255, 138, 61, 0.5) 80deg, #ffd3b0 160deg, transparent 175deg 190deg, rgba(47, 208, 197, 0.5) 260deg, #b3fff9 340deg, transparent 355deg); }
/* Szipuska – a toborzó: zöld "menetelő" szaggatott vonal */
.cos-frame-recruit { --frame-c: #7bd04a; --frame-g: rgba(123, 208, 74, 0.5); --frame-anim: cos-glow 2.2s ease-in-out infinite alternate; --spin: 9s; }
.cos-frame-recruit::after { background: repeating-conic-gradient(from var(--ang), #7bd04a 0 8deg, transparent 8deg 18deg); }
/* UltraGoku996 – elektromos sárga-kék aura, gyors villámok */
.cos-frame-ultra { --frame-c: #e8d34a; --frame-g: rgba(255, 224, 60, 0.38); --frame-anim: cos-ultra 2.6s linear infinite; --spin: 2.6s; }
.cos-frame-ultra::after { background: conic-gradient(from var(--ang), transparent 0 140deg, rgba(58, 180, 255, 0.55) 215deg, rgba(255, 226, 70, 0.8) 290deg, rgba(255, 255, 255, 0.9) 335deg, transparent 355deg); }

@keyframes cos-fade { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes cos-glitch {
  0%, 100% { box-shadow: var(--frame-base), -4px 0 14px rgba(25, 230, 255, 0.75), 4px 0 14px rgba(255, 43, 214, 0.65), inset 0 0 0 1px var(--frame-c); }
  7% { box-shadow: var(--frame-base), 6px 0 12px rgba(25, 230, 255, 0.8), -6px 0 12px rgba(255, 43, 214, 0.7), inset 0 0 0 1px var(--frame-c); }
  9% { box-shadow: var(--frame-base), -2px 0 6px rgba(25, 230, 255, 0.4), 2px 0 6px rgba(255, 43, 214, 0.4), inset 0 0 0 1px var(--frame-c); }
  41% { box-shadow: var(--frame-base), 4px 0 18px rgba(25, 230, 255, 0.8), -4px 0 18px rgba(255, 43, 214, 0.7), inset 0 0 0 1px var(--frame-c); }
  44% { box-shadow: var(--frame-base), -7px 0 10px rgba(25, 230, 255, 0.8), 7px 0 10px rgba(255, 43, 214, 0.7), inset 0 0 0 1px var(--frame-c); }
  46% { box-shadow: var(--frame-base), -4px 0 14px rgba(25, 230, 255, 0.75), 4px 0 14px rgba(255, 43, 214, 0.65), inset 0 0 0 1px var(--frame-c); }
}
@keyframes cos-pill {
  0%, 100% { box-shadow: var(--frame-base), 0 0 26px rgba(255, 59, 59, 0.75), inset 0 0 0 1px var(--frame-c); }
  50% { box-shadow: var(--frame-base), 0 0 26px rgba(59, 139, 255, 0.75), inset 0 0 0 1px var(--frame-c); }
}
@keyframes cos-wow {
  0%, 100% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 43, 214, 0.75), inset 0 0 0 1px var(--frame-c); }
  50% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 230, 0, 0.75), inset 0 0 0 1px var(--frame-c); }
}
@keyframes cos-twin {
  0%, 100% { box-shadow: var(--frame-base), 0 0 24px rgba(255, 138, 61, 0.7), inset 0 0 0 1px var(--frame-c); }
  50% { box-shadow: var(--frame-base), 0 0 24px rgba(47, 208, 197, 0.7), inset 0 0 0 1px var(--frame-c); }
}
@keyframes cos-ultra {
  0%, 100% { box-shadow: var(--frame-base), 0 0 12px rgba(255, 224, 60, 0.4), inset 0 0 0 1px var(--frame-c); }
  8% { box-shadow: var(--frame-base), 0 0 18px rgba(58, 180, 255, 0.5), inset 0 0 0 1px var(--frame-c); }
  12% { box-shadow: var(--frame-base), 0 0 8px rgba(255, 224, 60, 0.3), inset 0 0 0 1px var(--frame-c); }
  45% { box-shadow: var(--frame-base), 0 0 14px rgba(255, 224, 60, 0.45), inset 0 0 0 1px var(--frame-c); }
  48% { box-shadow: var(--frame-base), 0 0 20px rgba(58, 180, 255, 0.55), inset 0 0 0 1px var(--frame-c); }
  52% { box-shadow: var(--frame-base), 0 0 12px rgba(255, 224, 60, 0.4), inset 0 0 0 1px var(--frame-c); }
}

@media (prefers-reduced-motion: reduce) {
  .mug-card[class*='cos-frame-'], .poster[class*='cos-frame-'], .stage-plate[class*='cos-frame-'], .sb-row[class*='cos-frame-'] {
    animation: none !important; box-shadow: var(--frame-base), 0 0 14px var(--frame-g), inset 0 0 0 1px var(--frame-c) !important;
  }
  .mug-card[class*='cos-frame-']::after, .poster[class*='cos-frame-']::after, .stage-plate[class*='cos-frame-']::after, .sb-row[class*='cos-frame-']::after { animation: none !important; }
}

/* kártyahátterek */
/* A hátterek finoman mozognak: éjszakai csillagok, tárgyalótermi fénysáv, bársony-csillogás, tengeri hullámok. */
.mug-card.cos-bg-night, .poster.cos-bg-night {
  background:
    radial-gradient(1.6px 1.6px at 18% 22%, #fff, transparent 70%), radial-gradient(1.2px 1.2px at 62% 14%, #cfe3ff, transparent 70%),
    radial-gradient(1.8px 1.8px at 82% 46%, #fff, transparent 70%), radial-gradient(1.2px 1.2px at 36% 64%, #bcd6ff, transparent 70%),
    radial-gradient(1.5px 1.5px at 72% 82%, #fff, transparent 70%), radial-gradient(1.2px 1.2px at 10% 88%, #cfe3ff, transparent 70%),
    radial-gradient(120% 70% at 50% 0%, rgba(120, 170, 255, 0.22), transparent 62%), linear-gradient(180deg, #14264d, #070d1c) !important;
  background-size: 140px 160px, 170px 130px, 150px 190px, 130px 150px, 160px 120px, 180px 170px, auto, auto !important;
  --bg-anim: cos-stars 26s linear infinite;
}
@keyframes cos-stars {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 140px 160px, -170px 130px, 150px -190px, -130px -150px, 160px 120px, -180px 170px, 0 0, 0 0; }
}
.mug-card.cos-bg-court, .poster.cos-bg-court {
  background: linear-gradient(115deg, transparent 38%, rgba(255, 205, 140, 0.2) 50%, transparent 62%),
    radial-gradient(120% 70% at 50% 0%, rgba(255, 170, 90, 0.22), transparent 62%), linear-gradient(180deg, #4d2a12, #26140a) !important;
  background-size: 260% 100%, auto, auto !important; background-repeat: no-repeat !important;
  --bg-anim: cos-lamp 7s ease-in-out infinite alternate;
}
@keyframes cos-lamp { from { background-position: 100% 0, 0 0, 0 0; } to { background-position: 0% 0, 0 0, 0 0; } }
.mug-card.cos-bg-velvet, .poster.cos-bg-velvet {
  background: linear-gradient(125deg, transparent 40%, rgba(255, 150, 175, 0.22) 50%, transparent 60%),
    radial-gradient(120% 70% at 50% 0%, rgba(255, 90, 120, 0.22), transparent 62%), linear-gradient(180deg, #5c1224, #26060f) !important;
  background-size: 240% 100%, auto, auto !important; background-repeat: no-repeat !important;
  --bg-anim: cos-velvet 5.5s ease-in-out infinite;
}
@keyframes cos-velvet { 0% { background-position: 110% 0, 0 0, 0 0; } 60%, 100% { background-position: -10% 0, 0 0, 0 0; } }
.mug-card.cos-bg-sea, .poster.cos-bg-sea {
  background:
    repeating-linear-gradient(172deg, rgba(150, 235, 255, 0.1) 0 8px, transparent 8px 22px),
    radial-gradient(120% 70% at 50% 0%, rgba(90, 220, 255, 0.22), transparent 62%), linear-gradient(180deg, #0d4560, #051c29) !important;
  background-size: 100% 44px, auto, auto !important;
  --bg-anim: cos-waves 5s linear infinite;
}
@keyframes cos-waves { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 44px, 0 0, 0 0; } }
/* Discord-háttér: a Discord-fiók összekapcsolásának jutalma (nem vásárolható). sötét Discord-kék (blurple) árnyalás, finom pontrács és egy lassan átfutó fénysáv; a szöveg az egész kártyán olvasható marad (kontraszt-teszt: test/discord-bg-ui.js). */
.mug-card.cos-bg-discord, .poster.cos-bg-discord {
  background:
    linear-gradient(115deg, transparent 38%, rgba(190, 198, 255, 0.12) 50%, transparent 62%),
    radial-gradient(circle at 11px 11px, rgba(255, 255, 255, 0.12) 1.3px, transparent 2px),
    radial-gradient(120% 70% at 50% 0%, rgba(130, 145, 255, 0.24), transparent 62%), linear-gradient(180deg, #2f3896, #101340) !important;
  background-size: 260% 100%, 22px 22px, auto, auto !important; background-repeat: no-repeat, repeat, no-repeat, no-repeat !important;
  --bg-anim: cos-discord 6.5s ease-in-out infinite alternate;
}
@keyframes cos-discord { from { background-position: 100% 0, 0 0, 0 0, 0 0; } to { background-position: 0% 0, 0 0, 0 0, 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .mug-card.cos-bg-night, .mug-card.cos-bg-court, .mug-card.cos-bg-velvet, .mug-card.cos-bg-sea,
  .poster.cos-bg-night, .poster.cos-bg-court, .poster.cos-bg-velvet, .poster.cos-bg-sea { --bg-anim: none; }
}

/* ------------------------------------------------------------
   LEGENDÁS TESZTELŐK: 12 egyedi, a boltban nem kapható kártyaháttér (a data/players.json "hatter" mezője).
   Mindegyik más téma, mint a kerete, és mozog. A mozgást regisztrált CSS-változók adják (--bgx/--bgy/--bga/--bgl).
   ------------------------------------------------------------ */
@property --bgx { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --bgy { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --bga { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --bgl { syntax: '<length>'; inherits: false; initial-value: 0px; }
@keyframes cos-bgx { to { --bgx: 100%; } }
@keyframes cos-bgy { to { --bgy: 100%; } }
@keyframes cos-bga { to { --bga: 360deg; } }
@keyframes cos-bgl { to { --bgl: 100px; } }

/* 2CORE – glitch: pásztázó-vonalak, RGB-szétcsúszott sáv, ami akadozva lefut a kártyán */
.mug-card.cos-bg-glitch, .poster.cos-bg-glitch {
  background:
    linear-gradient(180deg, transparent 0 46%, rgba(25, 230, 255, 0.22) 46% 48%, rgba(255, 43, 214, 0.2) 48% 50%, transparent 50% 100%) 0 var(--bgy) / 100% 300% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    radial-gradient(100% 60% at 18% 0%, rgba(25, 230, 255, 0.24), transparent 60%),
    radial-gradient(100% 60% at 92% 100%, rgba(255, 43, 214, 0.22), transparent 60%),
    linear-gradient(180deg, #0a1020, #06060f) !important;
  --bg-anim: cos-bgy 3s steps(10, end) infinite;
}
/* Izsván – pill: piros-kék kettéosztott háttér, átfutó fényes csík */
.mug-card.cos-bg-pill, .poster.cos-bg-pill {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.17) 50%, transparent 60%) var(--bgx) 0 / 260% 100% no-repeat,
    radial-gradient(90% 70% at 0% 0%, rgba(255, 70, 70, 0.32), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(60, 140, 255, 0.34), transparent 60%),
    linear-gradient(135deg, #3d0c12 0 49%, #0c1d42 51% 100%) !important;
  --bg-anim: cos-bgx 4.5s ease-in-out infinite alternate;
}
/* Dubble_Gii – titokzatos: lila köd és két rétegben sodródó csillagok */
.mug-card.cos-bg-mystic, .poster.cos-bg-mystic {
  background:
    radial-gradient(1.6px 1.6px at 30% 25%, #e6dcff, transparent 70%) calc(var(--bgl) * -1) var(--bgl) / 100px 100px,
    radial-gradient(1.2px 1.2px at 70% 65%, #fff, transparent 70%) var(--bgl) calc(var(--bgl) * 2) / 50px 50px,
    radial-gradient(70% 45% at 25% 20%, rgba(150, 100, 255, 0.34), transparent 70%),
    radial-gradient(70% 45% at 80% 80%, rgba(80, 60, 220, 0.34), transparent 70%),
    linear-gradient(180deg, #1c0f3d, #0a0620) !important;
  --bg-anim: cos-bgl 34s linear infinite;
}
/* H3roMarci – hős: pirkadat, lebegő arany nap, kék ég */
.mug-card.cos-bg-hero, .poster.cos-bg-hero {
  background:
    radial-gradient(70% 38% at 50% calc(112% - var(--bgy) * 0.12), rgba(255, 214, 110, 0.7), transparent 72%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 26px),
    radial-gradient(80% 50% at 50% 0%, rgba(76, 201, 255, 0.28), transparent 70%),
    linear-gradient(180deg, #153a86 0%, #2a3f7a 55%, #b8742a 140%) !important;
  --bg-anim: cos-bgy 4s ease-in-out infinite alternate;
}
/* Kyrashi – szörny: karmolásnyomok, lüktető vérvörös izzás a mélyből */
.mug-card.cos-bg-monster, .poster.cos-bg-monster {
  background:
    radial-gradient(85% 55% at 50% calc(115% - var(--bgy) * 0.25), rgba(220, 0, 30, 0.55), transparent 70%),
    repeating-linear-gradient(104deg, transparent 0 22px, rgba(196, 0, 31, 0.2) 22px 24px, transparent 24px 30px, rgba(196, 0, 31, 0.12) 30px 31px, transparent 31px 52px),
    radial-gradient(120% 90% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(180deg, #1a0408, #060102) !important;
  --bg-anim: cos-bgy 2.2s ease-in-out infinite alternate;
}
/* Sanyi/Sasi – alapító: sötét, díszes arany sugárzás, lassan forgó fénysugarak, átcsillanó fénysáv */
.mug-card.cos-bg-founder, .poster.cos-bg-founder {
  background:
    linear-gradient(105deg, transparent 42%, rgba(255, 240, 180, 0.3) 50%, transparent 58%) var(--bgx) 0 / 300% 100% no-repeat,
    repeating-conic-gradient(from var(--bga) at 50% 28%, rgba(255, 215, 94, 0.12) 0 6deg, transparent 6deg 14deg),
    radial-gradient(75% 45% at 50% 22%, rgba(255, 215, 94, 0.34), transparent 70%),
    radial-gradient(100% 60% at 50% 110%, rgba(255, 170, 40, 0.22), transparent 70%),
    linear-gradient(180deg, #2f2108, #0d0902) !important;
  --bg-anim: cos-bgx 6s ease-in-out infinite alternate, cos-bga 40s linear infinite;
}
/* Alexhh – WOW: pop-art pöttyök két színben, lassan úsznak */
.mug-card.cos-bg-wow, .poster.cos-bg-wow {
  background:
    radial-gradient(circle, rgba(255, 43, 214, 0.5) 2px, transparent 3px) var(--bgl) var(--bgl) / 20px 20px,
    radial-gradient(circle, rgba(255, 230, 0, 0.4) 1.5px, transparent 2.5px) calc(var(--bgl) * -1 + 10px) calc(var(--bgl) + 10px) / 20px 20px,
    radial-gradient(90% 60% at 100% 0%, rgba(255, 230, 0, 0.18), transparent 60%),
    linear-gradient(135deg, #2c0733, #1d1b05) !important;
  --bg-anim: cos-bgl 12s linear infinite;
}
/* Collie – ismeretlen tényező: ködös, sodródó szellemfoltok */
.mug-card.cos-bg-ghost, .poster.cos-bg-ghost {
  background:
    radial-gradient(42% 28% at calc(12% + var(--bgx) * 0.6) 28%, rgba(255, 255, 255, 0.17), transparent 72%),
    radial-gradient(46% 30% at calc(92% - var(--bgx) * 0.6) 62%, rgba(210, 235, 255, 0.15), transparent 72%),
    radial-gradient(60% 30% at calc(30% + var(--bgx) * 0.4) 92%, rgba(255, 255, 255, 0.1), transparent 72%),
    linear-gradient(180deg, #1d2b38, #0b1218) !important;
  --bg-anim: cos-bgx 9s ease-in-out infinite alternate;
}
/* marci – az örök "majd": álmos türkiz-kék északi fény, nagyon lassan hullámzik */
.mug-card.cos-bg-lazy, .poster.cos-bg-lazy {
  background:
    radial-gradient(75% 38% at 30% calc(18% + var(--bgy) * 0.4), rgba(47, 227, 194, 0.32), transparent 72%),
    radial-gradient(65% 34% at 75% calc(72% - var(--bgy) * 0.4), rgba(90, 140, 255, 0.26), transparent 72%),
    linear-gradient(180deg, #06231f, #040d14) !important;
  --bg-anim: cos-bgy 13s ease-in-out infinite alternate;
}
/* Marci – a másik Marci: függőlegesen kettéosztott narancs-türkiz, a közepén forgó örvény */
.mug-card.cos-bg-twin, .poster.cos-bg-twin {
  background:
    conic-gradient(from var(--bga) at 50% 50%, rgba(255, 138, 61, 0.2), transparent 25%, rgba(47, 208, 197, 0.2) 50%, transparent 75%, rgba(255, 138, 61, 0.2)),
    radial-gradient(16% 100% at 50% 50%, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(90deg, #3a1a08 0 50%, #06302d 50% 100%) !important;
  --bg-anim: cos-bga 14s linear infinite;
}
/* Szipuska – a toborzó: terepmintás háttér, körbeforgó radar-sugár */
.mug-card.cos-bg-recruit, .poster.cos-bg-recruit {
  background:
    conic-gradient(from var(--bga) at 50% 50%, rgba(123, 208, 74, 0.34), transparent 22%),
    radial-gradient(34% 22% at 22% 24%, rgba(70, 90, 36, 0.7), transparent 72%),
    radial-gradient(36% 24% at 78% 40%, rgba(54, 70, 28, 0.7), transparent 72%),
    radial-gradient(40% 26% at 36% 82%, rgba(82, 98, 40, 0.65), transparent 72%),
    repeating-linear-gradient(135deg, rgba(123, 208, 74, 0.07) 0 5px, transparent 5px 16px),
    linear-gradient(180deg, #1b2410, #0b1005) !important;
  --bg-anim: cos-bga 5s linear infinite;
}
/* UltraGoku996 – elektromos: gyorsan forgó sárga sugarak, kék aura */
.mug-card.cos-bg-ultra, .poster.cos-bg-ultra {
  background:
    repeating-conic-gradient(from var(--bga) at 50% 40%, rgba(255, 230, 0, 0.07) 0 3deg, transparent 3deg 18deg),
    radial-gradient(52% 46% at 50% 40%, rgba(58, 180, 255, 0.2), transparent 72%),
    radial-gradient(100% 60% at 50% 110%, rgba(255, 230, 0, 0.09), transparent 70%),
    linear-gradient(180deg, #08173a, #03060f) !important;
  --bg-anim: cos-bga 24s linear infinite; /* lassú, finom forgás (korábban gyors és harsány volt) */
}
/* Képernyőn kívüli kártyák animációja szünetel (ne terhelje a telefont a 12 egyszerre mozgó kártya). */
.mug-card.off-screen, .mug-card.off-screen::after, .poster.off-screen, .poster.off-screen::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .mug-card[class*='cos-bg-'], .poster[class*='cos-bg-'] { --bg-anim: none; }
}
/* Telefonon a névválasztó 12 legenda-kártyáján a háttér csak áll (a keret továbbra is mozog): kíméli az akkut és a processzort. */
@media (max-width: 700px) {
  #mugGrid .mug-card[class*='cos-bg-'] { --bg-anim: none; }
}

/* névhatások: animált névtábla (kártya + plakát), a színpadi névtáblán csak a betűk */
.cos-name-gold .mug-name, .cos-name-gold .p-name,
.cos-name-fire .mug-name, .cos-name-fire .p-name,
.cos-name-ice .mug-name, .cos-name-ice .p-name,
.cos-name-royal .mug-name, .cos-name-royal .p-name { position: relative; }

/* arany: átfutó fénycsík + lüktető arany ragyogás */
.cos-name-gold .mug-name, .cos-name-gold .p-name {
  overflow: hidden; color: #ffe08a; border-color: #ffd75e;
  background: linear-gradient(180deg, #7a540f, #3f2905);
  animation: cos-gold 2.4s ease-in-out infinite alternate;
}
.cos-name-gold .mug-name::after, .cos-name-gold .p-name::after,
.cos-name-ice .mug-name::after, .cos-name-ice .p-name::after {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: skewX(-20deg); animation: cos-sheen 2.8s ease-in-out infinite;
}
.cos-name-gold .mug-name::after, .cos-name-gold .p-name::after { background: linear-gradient(100deg, transparent, rgba(255, 244, 190, 0.85), transparent); }
@keyframes cos-gold {
  from { text-shadow: 0 0 6px rgba(255, 200, 60, 0.7), 0 2px 0 #7a5410; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 8px rgba(255, 200, 60, 0.35), 0 4px 9px rgba(0, 0, 0, 0.45); }
  to { text-shadow: 0 0 14px #ffd75e, 0 0 24px rgba(255, 190, 40, 0.7), 0 2px 0 #7a5410; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 200, 60, 0.7), 0 4px 9px rgba(0, 0, 0, 0.45); }
}
@keyframes cos-sheen { 0%, 25% { left: -70%; } 70%, 100% { left: 130%; } }

/* láng: lobogó betűk, felszálló szikrák, forró keret */
.cos-name-fire .mug-name, .cos-name-fire .p-name {
  color: #fff0c2; border-color: #ff8a1f;
  background: linear-gradient(180deg, #5a1d08, #2a0d05);
  animation: cos-fire 0.9s ease-in-out infinite alternate;
}
.cos-name-fire .mug-name::before, .cos-name-fire .p-name::before,
.cos-name-fire .mug-name::after, .cos-name-fire .p-name::after {
  content: ''; position: absolute; left: 8%; bottom: 55%; width: 3px; height: 3px; border-radius: 50%; pointer-events: none;
  background: #ffd35e; opacity: 0;
  box-shadow: 22px -2px 0 #ff9a1f, 46px 3px 0 #ffd35e, 72px -3px 0 #ff6a00, 98px 2px 0 #ffb347, 124px -2px 0 #ff8a1f;
  animation: cos-embers 1.6s ease-out infinite;
}
.cos-name-fire .mug-name::after, .cos-name-fire .p-name::after {
  left: 3%; bottom: 40%; animation-duration: 2.1s; animation-delay: 0.7s;
  box-shadow: 14px 0 0 #ffd35e, 38px -3px 0 #ff7a18, 64px 2px 0 #ff9a1f, 90px -2px 0 #ffe27a, 116px 3px 0 #ff5a00;
}
@keyframes cos-fire {
  from { text-shadow: 0 0 2px #fff, 0 -2px 5px #ffd35e, 0 -5px 9px #ff9a1f, 0 -9px 14px #ff5a00, 0 -13px 20px #d92b00; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 10px rgba(255, 90, 0, 0.45), 0 4px 9px rgba(0, 0, 0, 0.45); }
  to { text-shadow: 0 0 3px #fff, 0 -3px 6px #ffe27a, 0 -7px 11px #ff8a1f, 0 -12px 17px #ff4a00, 0 -17px 24px #b81d00; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 22px rgba(255, 90, 0, 0.8), 0 4px 9px rgba(0, 0, 0, 0.45); }
}
@keyframes cos-embers {
  0% { transform: translateY(8px) scale(1); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-28px) scale(0.3); opacity: 0; }
}

/* jég: hideg ragyogás, átfutó csillanás, villogó jégcsillagok */
.cos-name-ice .mug-name, .cos-name-ice .p-name {
  overflow: hidden; color: #effbff; border-color: #7fd8ff;
  background: linear-gradient(180deg, #164a6b, #09263a);
  animation: cos-ice 2.2s ease-in-out infinite alternate;
}
.cos-name-ice .mug-name::before, .cos-name-ice .p-name::before {
  content: '✦'; position: absolute; right: 7px; top: 1px; font-size: 11px; line-height: 1; color: #fff; pointer-events: none;
  text-shadow: 0 0 6px #7fd8ff; animation: cos-twinkle 1.7s ease-in-out infinite;
}
@keyframes cos-ice {
  from { text-shadow: 0 0 5px #7fd8ff, 0 0 10px #2a8dff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 8px rgba(100, 200, 255, 0.35), 0 4px 9px rgba(0, 0, 0, 0.45); }
  to { text-shadow: 0 0 9px #bff0ff, 0 0 20px #4fc3ff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 20px rgba(120, 215, 255, 0.7), 0 4px 9px rgba(0, 0, 0, 0.45); }
}
@keyframes cos-twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }

/* királyi: lebegő korona, lila-arany színváltás */
.cos-name-royal .mug-name, .cos-name-royal .p-name {
  color: #f0d0ff; border-color: #ffd75e;
  background: linear-gradient(180deg, #46206e, #1f0b38);
  animation: cos-royal 2.6s ease-in-out infinite alternate;
}
.cos-name-royal .mug-name::before, .cos-name-royal .p-name::before {
  content: '♛'; position: absolute; top: -21px; left: 50%; font-size: 24px; line-height: 1; color: #ffd75e; pointer-events: none; z-index: 3;
  text-shadow: 0 0 6px #7c3aed, 0 0 12px #a855f7, 0 0 16px rgba(255, 215, 94, 0.85); transform: translateX(-50%); animation: cos-crown 1.8s ease-in-out infinite alternate;
}
.cos-name-royal .mug-name::after, .cos-name-royal .p-name::after {
  content: '✦'; position: absolute; right: 6px; bottom: 1px; font-size: 10px; line-height: 1; color: #ffe9a8; pointer-events: none;
  animation: cos-twinkle 2s ease-in-out infinite 0.6s;
}
@keyframes cos-royal {
  from { color: #f0d0ff; text-shadow: 0 0 6px #a855f7, 0 0 14px #7c3aed; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 10px rgba(168, 85, 247, 0.5), 0 4px 9px rgba(0, 0, 0, 0.45); }
  to { color: #ffe9a8; text-shadow: 0 0 8px #ffd75e, 0 0 18px #c084fc; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 20px rgba(255, 215, 94, 0.55), 0 4px 9px rgba(0, 0, 0, 0.45); }
}
@keyframes cos-crown { from { transform: translateX(-50%) translateY(1px) rotate(-6deg); } to { transform: translateX(-50%) translateY(-3px) rotate(6deg); } }

/* színpadi névtábla: csak a betűk kapják a hatást (a tábla kicsi és vágott) */
.stage-plate.cos-name-gold .plate-person b, .sb-row.cos-name-gold .sb-name { color: #ffe08a; animation: cos-gold-text 2.4s ease-in-out infinite alternate; }
.stage-plate.cos-name-fire .plate-person b, .sb-row.cos-name-fire .sb-name { color: #ffd9a0; animation: cos-flicker 0.9s ease-in-out infinite alternate; }
.stage-plate.cos-name-ice .plate-person b, .sb-row.cos-name-ice .sb-name { color: #dff6ff; animation: cos-ice-text 2.2s ease-in-out infinite alternate; }
.stage-plate.cos-name-royal .plate-person b, .sb-row.cos-name-royal .sb-name { color: #f0d0ff; animation: cos-royal-text 2.6s ease-in-out infinite alternate; }
@keyframes cos-gold-text { from { text-shadow: 0 0 4px rgba(255, 200, 60, 0.6); } to { text-shadow: 0 0 10px #ffd75e, 0 0 16px rgba(255, 190, 40, 0.7); } }
@keyframes cos-flicker { from { text-shadow: 0 0 4px #ff5a00, 0 0 8px #ff2a00; } to { text-shadow: 0 0 8px #ff7a18, 0 0 14px #ff3b00; } }
@keyframes cos-ice-text { from { text-shadow: 0 0 4px #7fd8ff; } to { text-shadow: 0 0 9px #bff0ff, 0 0 14px #4fc3ff; } }
@keyframes cos-royal-text { from { color: #f0d0ff; text-shadow: 0 0 5px #a855f7; } to { color: #ffe9a8; text-shadow: 0 0 9px #ffd75e; } }

@media (prefers-reduced-motion: reduce) {
  .cos-name-gold .mug-name, .cos-name-gold .p-name, .cos-name-fire .mug-name, .cos-name-fire .p-name,
  .cos-name-ice .mug-name, .cos-name-ice .p-name, .cos-name-royal .mug-name, .cos-name-royal .p-name,
  .cos-name-gold .mug-name::before, .cos-name-gold .mug-name::after, .cos-name-fire .mug-name::before, .cos-name-fire .mug-name::after,
  .cos-name-ice .mug-name::before, .cos-name-ice .mug-name::after, .cos-name-royal .mug-name::before, .cos-name-royal .mug-name::after,
  .cos-name-gold .p-name::before, .cos-name-gold .p-name::after, .cos-name-fire .p-name::before, .cos-name-fire .p-name::after,
  .cos-name-ice .p-name::before, .cos-name-ice .p-name::after, .cos-name-royal .p-name::before, .cos-name-royal .p-name::after,
  .stage-plate[class*='cos-name-'] .plate-person b, .sb-row[class*='cos-name-'] .sb-name { animation: none !important; }
  .cos-name-fire .mug-name::before, .cos-name-fire .mug-name::after, .cos-name-fire .p-name::before, .cos-name-fire .p-name::after { display: none; }
}

/* pecsét */
.cos-stamp {
  position: absolute; top: 11px; right: 8px; z-index: 4; max-width: 72%; text-align: center; line-height: 1.2;
  font-family: var(--font-disp); font-size: 10px; letter-spacing: 1.4px; color: #ffe08a;
  background: rgba(60, 18, 10, 0.95); border: 1.5px solid var(--gold); border-radius: 3px; padding: 3px 7px;
  transform: rotate(6deg); pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.poster .cos-stamp { top: auto; bottom: -11px; right: auto; left: 50%; max-width: 88%; white-space: nowrap; transform: translateX(-50%) rotate(-2deg); }

/* ============================================================
   BOLT: ELŐNÉZETI ABLAK
   ============================================================ */

.shop-panel { position: relative; }
.shop-pop {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 14px; border-radius: inherit; overflow: auto; background: rgba(8, 5, 2, 0.88); backdrop-filter: blur(2px);
}
.shop-pop.hidden { display: none; }
.pop-box {
  display: flex; align-items: center; justify-content: center; gap: 26px; width: min(720px, 100%); max-height: 100%;
  padding: 18px 22px; border-radius: 16px; border: 2px solid #8a6420; color: #f3e7c9;
  background: linear-gradient(180deg, #2f2012, #1b110a); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.pop-box.r-ritka { border-color: #3b6fd1; }
.pop-box.r-epikus { border-color: #9b5de5; }
.pop-box.r-legendas { border-color: #f2c14e; box-shadow: 0 0 26px rgba(242, 193, 78, 0.35), 0 16px 40px rgba(0, 0, 0, 0.7); }
.pop-card { flex: none; width: 240px; }
.pop-card .shop-preview { max-width: 240px; }
.pop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pop-info h3 { font-family: var(--font-disp); font-weight: 500; font-size: 26px; letter-spacing: 1px; color: #fff3d0; }
.pop-info p { font-size: 14px; color: #d8cdb2; line-height: 1.45; }
.pop-price { font-size: 13px; }
.pop-price b { color: #ffe08a; }
.pop-info .it-act { margin-top: 2px; }
.pop-info .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.pop-nav { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 13px; color: #b6a780; }
.pop-msg { min-height: 18px; margin: 0; }
.it-preview { align-self: flex-start; }
.it-act { gap: 6px; }
.it-act .btn { width: 100%; text-align: center; white-space: nowrap; letter-spacing: 1px; padding-left: 8px; padding-right: 8px; }
.it-need { color: #ff9d96; }

@media (max-width: 700px) {
  .shop-preview-col { display: none; }
  .pop-box { flex-direction: column; gap: 14px; padding: 14px; }
  .pop-card, .pop-card .shop-preview { width: 100%; max-width: 230px; }
  .pop-info { align-items: stretch; text-align: center; }
  .pop-info .it-top { justify-content: center; gap: 10px; }
  .pop-nav { justify-content: center; }
}

/* legendás kártya igénylése (igénylő-link a regisztrációs űrlapon) */
.auth-legend-note {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: #5a3d06;
  background: linear-gradient(180deg, #fff1c4, #f6d98a); border: 1px solid #c9973a;
}
#authRegisterName[readonly] { background: #efe4c8; color: #5a3d06; font-weight: 700; cursor: not-allowed; }

/* ============================================================
   SZOBAI CSEVEGŐ
   ============================================================ */

.chat-fab {
  position: fixed; right: 14px; bottom: 112px; z-index: 90; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-family: var(--font-disp); font-size: 14px; letter-spacing: 2px; color: #ffe08a;
  background: linear-gradient(180deg, rgba(48, 32, 18, 0.96), rgba(24, 16, 8, 0.96)); border: 2px solid var(--gold-dark, #8a6420);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); transition: transform 0.15s, border-color 0.15s;
}
.chat-fab:hover { transform: translateY(-2px); border-color: var(--gold); }
.chat-fab .shop-badge { margin-left: 0; }
.chat-panel {
  position: fixed; right: 14px; bottom: 112px; z-index: 95; /* a barát-gomb fölött (ne takarja) */ width: min(350px, calc(100vw - 28px)); height: min(430px, 62dvh);
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; color: #f3e7c9;
  background: linear-gradient(180deg, rgba(36, 24, 12, 0.97), rgba(17, 11, 6, 0.97));
  border: 2px solid var(--gold-dark, #8a6420); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7);
}
.chat-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; border-bottom: 1px solid #5a4528; background: rgba(0, 0, 0, 0.25); }
.chat-tabs { flex: 1; display: flex; gap: 6px; min-width: 0; }
.chat-tab {
  cursor: pointer; font-family: var(--font-disp); font-size: 13px; letter-spacing: 1.5px; padding: 7px 12px; white-space: nowrap;
  border-radius: 9px 9px 0 0; border: 1px solid #8a6420; border-bottom: none; margin-bottom: -1px;
  background: rgba(40, 26, 12, 0.85); color: #d9b25a;
}
.chat-tab[aria-selected='true'] { background: linear-gradient(180deg, #f8d672, #d99a2b); color: #241a06; }
.chat-tab.only { cursor: default; }
.chat-tab .shop-badge { margin-left: 4px; padding: 0 5px; }
.chat-sub { margin: 0; padding: 6px 12px; font-size: 11.5px; line-height: 1.35; color: #b6a780; border-bottom: 1px solid rgba(90, 69, 40, 0.5); }
.chat-ads { max-height: 150px; overflow-y: auto; padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid rgba(90, 69, 40, 0.5); background: rgba(242, 193, 78, 0.06); scrollbar-width: thin; }
.ad-card {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px;
  border: 1px solid #8a6420; background: linear-gradient(180deg, rgba(60, 40, 18, 0.9), rgba(30, 20, 9, 0.9));
}
.ad-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.3; }
.ad-main b { font-family: var(--font-disp); font-weight: 500; font-size: 14px; letter-spacing: 0.6px; color: #ffe08a; overflow-wrap: anywhere; }
.ad-main span { color: #f3e7c9; overflow-wrap: anywhere; }
.ad-main small { color: #b6a780; font-size: 11px; }
.ad-main small b { font-family: var(--font-body); font-size: 11px; letter-spacing: 1.5px; color: #ffe08a; }
.ad-note { font-size: 10.5px; color: #b6a780; max-width: 90px; text-align: right; }
.chat-msg.is-ad .cm-text { background: rgba(242, 193, 78, 0.16); border: 1px solid rgba(242, 193, 78, 0.35); }
.chat-adbtn { padding-left: 10px; padding-right: 10px; }
.chat-x { cursor: pointer; width: 28px; height: 28px; border-radius: 8px; color: #d7c9a8; background: transparent; border: 1px solid #5a5140; }
.chat-x:hover { border-color: var(--gold); color: var(--gold); }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.chat-empty { margin: auto; text-align: center; font-size: 13px; color: #9d8f6e; padding: 10px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.chat-msg:not(.cont) { margin-top: 8px; }
.chat-msg.me { align-items: flex-end; }
.cm-name { font-family: var(--font-disp); font-size: 13px; letter-spacing: 0.8px; overflow-wrap: anywhere; }
.cm-name time { margin-left: 8px; font-family: var(--font-body); font-size: 10px; color: #8b7f63; letter-spacing: 0; }
.cm-text {
  display: inline-block; max-width: 92%; padding: 6px 10px; border-radius: 4px 12px 12px 12px; font-size: 14px; line-height: 1.35;
  color: #f3e7c9; background: rgba(255, 255, 255, 0.08); overflow-wrap: anywhere; white-space: pre-wrap;
}
.chat-msg.me .cm-text { border-radius: 12px 4px 12px 12px; background: rgba(242, 193, 78, 0.2); color: #fff3d0; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 6px; border-top: 1px solid #5a4528; }
.chat-form input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; font-size: 16px; color: #fff3d0;
  background: rgba(0, 0, 0, 0.45); border: 1px solid #8a6420;
}
.chat-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.25); }
.chat-note { min-height: 16px; margin: 0; padding: 0 12px 8px; font-size: 12px; color: #ff9d96; }

/* dokkolt: a lobbiban széles képernyőn a tartalom MELLETT áll (a lobbi tartalma odébb tolódik, így semmit nem takar) */
.chat-panel.docked { left: 14px; top: 14px; bottom: 58px; height: auto; width: 350px; }
body.chat-docked #screen-lobby { padding-left: 372px; box-sizing: border-box; }

/* beágyazott: a játék oldalsávjának CSEVEGŐ füle (nem lóg a jelenetbe) */
.sb-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.sb-tab {
  flex: 1; cursor: pointer; font-family: var(--font-disp); font-size: 13px; letter-spacing: 1.2px; padding: 7px 4px; white-space: nowrap;
  border-radius: 8px; border: 1px solid #5a4528; background: rgba(40, 26, 12, 0.6); color: #d9b25a;
}
.sb-tab.active { background: linear-gradient(180deg, #f8d672, #d99a2b); color: #241a06; border-color: #d99a2b; }
.sb-tab .shop-badge { margin-left: 4px; padding: 0 5px; }
.sb-chat-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sb-toggle .shop-badge { margin-left: 6px; }
.chat-panel.embedded {
  position: static; width: auto; height: auto; flex: 1; min-height: 0; z-index: auto;
  border: 1px solid #5a4528; border-radius: 12px; box-shadow: none; background: rgba(9, 12, 20, 0.55);
}
.chat-panel.embedded .chat-x:not(.chat-snd) { display: none; }
.chat-snd { font-size: 14px; }
.ad-tools { display: flex; flex-direction: column; gap: 4px; }
.ad-mini { cursor: pointer; width: 30px; height: 26px; border-radius: 7px; font-size: 13px; color: #d7c9a8; background: transparent; border: 1px solid #5a5140; }
.ad-mini:hover, .ad-mini.on { border-color: var(--gold); color: var(--gold); }
.ad-qr { display: flex; justify-content: center; padding: 6px 0 2px; }
.ad-qr img { width: 130px; height: 130px; border-radius: 8px; border: 2px solid var(--gold-dark, #8a6420); background: #fdf6e3; }
.ad-wrap { display: flex; flex-direction: column; }
.chat-panel.embedded .chat-sub { display: none; }
@media (max-width: 700px) {
  .chat-fab { right: 10px; bottom: 108px; padding: 10px 13px; }
  .chat-fab .fab-text { display: none; }
  .chat-panel { left: 8px; right: 8px; width: auto; bottom: 106px; height: min(56dvh, 440px); }
}

/* ============================================================
   BARÁTLISTA
   ============================================================ */

.friends-panel { width: min(680px, 100%); max-height: min(90dvh, 760px); overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.friends-panel .shop-body { min-height: 220px; }
.fr-h { font-family: var(--font-disp); font-weight: 500; font-size: 13px; letter-spacing: 2.5px; color: #c9a85c; margin: 12px 0 6px; }
.fr-h:first-child { margin-top: 2px; }
.fr-empty { text-align: left; margin: 2px 0 8px; }
.fr-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 7px; border-radius: 12px;
  border: 1px solid #5a4528; color: #f3e7c9; background: linear-gradient(180deg, #2f2012, #1b110a);
}
.fr-row.off { opacity: 0.72; }
.fr-av {
  flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold);
  display: inline-flex; align-items: center; justify-content: center; background: #1b110a;
}
.fr-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.fr-mono { font-family: var(--font-disp); font-size: 20px; color: #fff; }
.fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-main b { font-family: var(--font-disp); font-weight: 500; font-size: 17px; letter-spacing: 0.5px; color: #fff3d0; overflow-wrap: anywhere; }
.fr-st { font-size: 12px; color: #b6a780; }
.fr-st b { font-family: var(--font-disp); font-size: 12px; letter-spacing: 2px; color: #ffe08a; }
.fr-st.online { color: #9be8a8; }
.fr-st.lobby { color: #ffe08a; }
.fr-st.game { color: #ffb38a; }
.fr-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.fr-full { font-size: 11px; color: #b6a780; padding: 0 4px; }
.fr-icon {
  cursor: pointer; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: #d7c9a8;
  background: transparent; border: 1px solid #5a5140; font-family: var(--font-body);
}
.fr-icon:hover { border-color: var(--gold); color: var(--gold); }
.fr-icon.danger, .btn.danger { color: #fff; background: var(--red-dark); border-color: var(--red); }
.fr-add { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.fr-add input {
  flex: 1; min-width: 200px; padding: 11px 14px; border-radius: 10px; font-size: 16px; color: #fff3d0;
  background: rgba(0, 0, 0, 0.4); border: 1px solid #8a6420;
}
.fr-add input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.25); }
.fr-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #d8cdb2; border-top: 1px solid #5a4528; padding-top: 10px; }
.fr-select {
  flex: 1; min-width: 220px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #fff3d0;
  background: rgba(0, 0, 0, 0.45); border: 1px solid #8a6420;
}
.fr-count { background: #2e7d4a; }
.fr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #d8cdb2; cursor: pointer; }
.fr-check input { width: 16px; height: 16px; accent-color: #d99a2b; }
.fr-row.unread { border-color: var(--gold); box-shadow: 0 0 12px rgba(242, 193, 78, 0.25); }
.fr-dm { position: relative; }
.fr-dm .shop-badge { position: absolute; top: -7px; right: -7px; margin: 0; padding: 0 5px; font-size: 10px; }
.fr-dm.has-unread { border-color: var(--gold); }

/* szezonális tárgyak + ajándék-mód a boltban */
.it-season { display: inline-block; align-self: flex-start; font-size: 11px; letter-spacing: 0.4px; padding: 2px 9px; border-radius: 999px; color: #ffd9a0; background: rgba(255, 140, 30, 0.14); border: 1px solid rgba(255, 140, 30, 0.45); }
.gift-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px;
  font-size: 13.5px; color: #fff3d0; background: linear-gradient(180deg, rgba(126, 226, 255, 0.18), rgba(126, 226, 255, 0.06)); border: 1px solid #7ee2ff;
}
.gift-note { color: #aef2c0; }
.fr-icon[data-gift-to]:hover { border-color: #7ee2ff; }

/* szezon: Halloween (Töklámpás keret, Kísértetház) és Karácsony (Izzósoros keret, Havazás) */
.cos-frame-pumpkin { --frame-c: #ff7a00; --frame-g: rgba(255, 122, 0, 0.6); --frame-anim: cos-glow 1.5s ease-in-out infinite alternate; --spin: 2.8s; }
.cos-frame-pumpkin::after { background: conic-gradient(from var(--ang), transparent 0 150deg, rgba(255, 122, 0, 0.6) 240deg, #ffd27a 310deg, #9b3dff 340deg, transparent 360deg); }
.cos-frame-holly { --frame-c: #e23b3b; --frame-g: rgba(226, 59, 59, 0.5); --frame-anim: cos-xmas 2.4s ease-in-out infinite; --spin: 9s; }
.cos-frame-holly::after { background: repeating-conic-gradient(from var(--ang), #ff3b3b 0 9deg, #2fd37a 9deg 18deg, #ffe27a 18deg 27deg, transparent 27deg 36deg); }
@keyframes cos-xmas {
  0%, 100% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 59, 59, 0.65), inset 0 0 0 1px var(--frame-c); }
  33% { box-shadow: var(--frame-base), 0 0 22px rgba(47, 211, 122, 0.65), inset 0 0 0 1px var(--frame-c); }
  66% { box-shadow: var(--frame-base), 0 0 22px rgba(255, 226, 122, 0.65), inset 0 0 0 1px var(--frame-c); }
}
.mug-card.cos-bg-haunted, .poster.cos-bg-haunted {
  background:
    radial-gradient(60% 40% at 50% 108%, rgba(255, 140, 30, 0.38), transparent 70%),
    radial-gradient(45% 28% at calc(15% + var(--bgx) * 0.7) 30%, rgba(170, 120, 255, 0.2), transparent 72%),
    radial-gradient(50% 30% at calc(90% - var(--bgx) * 0.7) 62%, rgba(120, 80, 200, 0.18), transparent 72%),
    linear-gradient(180deg, #1a0d2b, #05020a) !important;
  --bg-anim: cos-bgx 8s ease-in-out infinite alternate;
}
.mug-card.cos-bg-snowfall, .poster.cos-bg-snowfall {
  background:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent 70%) 0 var(--bgl) / 100px 100px,
    radial-gradient(1.4px 1.4px at 70% 60%, #dff3ff, transparent 70%) 0 calc(var(--bgl) * 2) / 50px 50px,
    radial-gradient(3px 3px at 45% 80%, rgba(255, 255, 255, 0.9), transparent 70%) 0 calc(var(--bgl) * 0.5) / 100px 100px,
    linear-gradient(180deg, #0e2447, #050f22) !important;
  --bg-anim: cos-bgl 7s linear infinite;
}

/* ranglista */
.rank-panel { width: min(640px, 100%); }
.rank-metrics { margin-bottom: 0; }
.rk-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin-bottom: 6px; border-radius: 12px;
  border: 1px solid #5a4528; color: #f3e7c9; background: linear-gradient(180deg, #2f2012, #1b110a);
}
.rk-row.top1 { border-color: #f2c14e; box-shadow: 0 0 14px rgba(242, 193, 78, 0.35); background: linear-gradient(180deg, #4a3510, #231708); }
.rk-row.top2 { border-color: #cfd6e2; background: linear-gradient(180deg, #3a3a42, #1d1d23); }
.rk-row.top3 { border-color: #c98a4b; background: linear-gradient(180deg, #4a2f1a, #22150b); }
.rk-row.me { outline: 2px solid #7ee2ff; outline-offset: -2px; }
.rk-pos { flex: none; width: 44px; font-family: var(--font-disp); font-size: 20px; letter-spacing: 1px; text-align: center; color: #ffe08a; }
.rk-name { flex: 1; min-width: 0; font-family: var(--font-disp); font-size: 17px; letter-spacing: 0.5px; color: #fff3d0; overflow-wrap: anywhere; }
.rk-val { font-family: var(--font-disp); font-weight: 500; font-size: 22px; color: #ffe08a; }
.rk-legend, .rk-you { font-style: normal; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.rk-legend { color: #241a06; background: linear-gradient(180deg, #f8d672, #d99a2b); }
.rk-you { color: #05222b; background: #7ee2ff; }
.rk-gap { text-align: center; color: #8b7f63; letter-spacing: 4px; margin: -2px 0 4px; }
.rank-foot { margin: 0; }
@media (max-width: 700px) {
  .rk-row { padding: 7px 10px; gap: 8px; }
  .rk-pos { width: 38px; font-size: 17px; }
  .rk-name { font-size: 15px; }
  .rk-val { font-size: 19px; }
}

/* privát beszélgetés a barátlista ablakban */
.dm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dm-log {
  height: min(34dvh, 250px); overflow-y: auto; padding: 8px 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid #5a4528; border-radius: 12px; background: rgba(0, 0, 0, 0.25); scrollbar-width: thin;
}
.dm-log .chat-msg { margin-top: 2px; }
.dm-time { margin-top: 1px; font-size: 10px; color: #8b7f63; }
.dm-form { padding: 0; border-top: 0; }

/* lebegő gomb: névválasztó, menü és lobbi (a hírszalag fölött) */
.friends-fab {
  position: fixed; right: 14px; bottom: 58px; z-index: 90; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  font-family: var(--font-disp); font-size: 14px; letter-spacing: 2px; color: #ffe08a;
  background: linear-gradient(180deg, rgba(48, 32, 18, 0.96), rgba(24, 16, 8, 0.96)); border: 2px solid var(--gold-dark, #8a6420);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); transition: transform 0.15s, border-color 0.15s;
}
.friends-fab:hover { transform: translateY(-2px); border-color: var(--gold); }
.friends-fab .shop-badge { margin-left: 0; }
.fab-online {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-family: var(--font-body); font-size: 11px; font-weight: 800; color: #08280f; background: #57d06b;
}
.friends-fab .hidden, .friends-fab.hidden { display: none; }

/* meghívó-kártyák */
.invite-stack { position: fixed; right: 14px; bottom: 170px; z-index: 130; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 28px)); }
.invite-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: #f3e7c9;
  background: linear-gradient(180deg, #3a2a14, #1d1408); border: 2px solid var(--gold);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 18px rgba(242, 193, 78, 0.3); animation: poster-pin 0.4s cubic-bezier(0.18, 1.4, 0.4, 1);
}
.iv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.iv-text b { font-family: var(--font-disp); font-weight: 500; font-size: 15px; color: #fff3d0; overflow-wrap: anywhere; }
.iv-text small { color: #ffe08a; letter-spacing: 1px; }

/* ＋ BARÁT gomb a lobbi plakátján */
.poster-friend {
  position: absolute; top: 9px; left: 9px; z-index: 5; cursor: pointer;
  font-family: var(--font-disp); font-size: 10.5px; letter-spacing: 1.5px; color: #ffe08a;
  background: rgba(24, 16, 8, 0.85); border: 1px solid var(--gold-dark, #8a6420); border-radius: 999px; padding: 3px 9px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.poster-friend:hover { transform: scale(1.06); box-shadow: 0 0 10px rgba(242, 193, 78, 0.45); }
.poster-friend:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 700px) {
  .friends-panel .shop-tabs { gap: 4px; }
  .friends-panel .shop-tab { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 11.5px; letter-spacing: 0.5px; white-space: nowrap; text-align: center; }
  .friends-panel .shop-badge { margin-left: 3px; padding: 1px 5px; }
  .fr-row { flex-wrap: wrap; }
  .fr-actions { width: 100%; justify-content: flex-start; }
  .friends-fab { right: 10px; bottom: 54px; padding: 10px 13px; }
  .friends-fab .fab-text { display: none; }
  .invite-stack { right: 8px; left: 8px; width: auto; bottom: 164px; }
}

/* ---- Ítélethirdetés: felmentés (galambok) és bűnös (rázkódás) + sarok-kapcsolók (hang / kevesebb mozgás) ---- */
.flying-emoji.dove { animation: dove-fly 2s ease-out backwards forwards; filter: drop-shadow(0 0 10px rgba(255, 243, 208, 0.9)); }
@keyframes dove-fly {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.7); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx, 10vw), var(--dy, -70vh)) rotate(var(--rot, 10deg)) scale(1.1); opacity: 0; }
}
#scenePanel.verdict-shake { animation: verdict-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes verdict-shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 1px, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, -1px, 0); }
  40%, 60% { transform: translate3d(8px, 1px, 0); }
}
.reduced-motion #scenePanel.verdict-shake { animation: none; }

.comfort-dock { display: none; position: fixed; top: 12px; left: 12px; z-index: 90; gap: 8px; }
body[data-screen="name"] .comfort-dock, body[data-screen="menu"] .comfort-dock, body[data-screen="lobby"] .comfort-dock { display: flex; }
.comfort-btn {
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer;
  color: #ffe3a5; background: rgba(24, 19, 26, 0.88); border: 2px solid rgba(223, 185, 109, 0.55);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}
.comfort-btn:hover { background: rgba(48, 35, 55, 0.95); }
.comfort-btn.active, .comfort-btn[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.35), 0 3px 10px rgba(0, 0, 0, 0.5); }
@media (max-width: 520px) { .comfort-btn { width: 40px; height: 40px; font-size: 18px; } .comfort-dock { top: 10px; left: 10px; gap: 6px; } }

/* ---- Fiók: adatok letöltése és végleges törlés ---- */
.account-data { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.account-data .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.danger { border-color: #b3353a; color: #ffb1b1; }
.btn.danger:hover, .btn.danger:focus-visible { border-color: #ff6b70; color: #fff; background: rgba(179, 53, 58, 0.55); }
.btn.small.danger:not(.ghost) { background: #b3353a; color: #fff; }
.account-delete { margin-top: 10px; padding: 12px; border: 1px solid #b3353a; border-radius: 10px; background: rgba(120, 20, 24, 0.22); }
.account-delete p { margin: 0 0 8px; font-size: 13px; line-height: 1.4; }
.account-delete label { display: block; font-size: 12px; margin-bottom: 4px; }
.account-delete input { width: 100%; box-sizing: border-box; }
.account-delete-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* ---- Moderáció: jelentés (⚑) és némítás (🔇) az üzenetek mellett ---- */
.cm-row { display: flex; align-items: flex-end; gap: 4px; max-width: 100%; }
.chat-msg.me .cm-row { flex-direction: row-reverse; }
.cm-actions { display: inline-flex; align-items: center; gap: 2px; flex: none; opacity: 0; transition: opacity 0.15s; }
.chat-msg:hover .cm-actions, .chat-msg:focus-within .cm-actions, .chat-msg.flagged .cm-actions { opacity: 1; }
@media (hover: none) { .cm-actions { opacity: 0.55; } }
.cm-act {
  min-width: 26px; height: 26px; padding: 0 4px; font-size: 13px; line-height: 1; cursor: pointer;
  color: #c9bca0; background: rgba(24, 19, 26, 0.7); border: 1px solid rgba(223, 185, 109, 0.35); border-radius: 8px;
}
.cm-act:hover:not(:disabled), .cm-act:focus-visible { color: #fff3d0; border-color: var(--gold); }
.cm-act.on { color: #ffb1b1; border-color: #b3353a; }
.cm-act.done { color: #6bfa8f; border-color: rgba(107, 250, 143, 0.4); cursor: default; }
.cm-flag { font-size: 11px; color: #ffb1b1; padding: 0 4px; white-space: nowrap; }
.chat-msg.flagged .cm-text { box-shadow: inset 0 0 0 1px rgba(229, 72, 77, 0.55); }
.chat-form input:disabled { opacity: 0.6; cursor: not-allowed; }
.it-need.it-perk { color: #c3cbff; } /* nem figyelmeztetés: a Discord-összekapcsolás jutalmát jelzi */
