/* Party Room: χειριστήριο κινητού (μεγάλα πατήματα, μόνο ό,τι χρειάζεται κάθε στιγμή) */
:root {
  --c0: #2fbf8a; --c0-ink: #062a1c;
  --c1: #ff4f62; --c1-ink: #2a0a0f;
  --c2: #4f86ff; --c2-ink: #0a1630;
  --c3: #ff6fd2; --c3-ink: #2d0a22;
  --good: #3ddc84; --good-ink: #06281a;
  --badbg: #c62a3f;
}
html, body { overscroll-behavior: none; }
body { touch-action: manipulation; }
body.in-game {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
}
#app { height: 100%; }
::-moz-selection { background: rgba(255,204,51,0.4); color: #fff; }
::selection { background: rgba(255,204,51,0.4); color: #fff; }
input { caret-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button { cursor: pointer; }
.sub, .big, .q, .msg, .res-title { text-wrap: balance; }
p { margin: 0; }

/* Κοινά κουμπιά */
.primary {
  width: 100%; min-height: 60px; border: 0; border-radius: 18px; background: var(--accent); color: #1a1500;
  font-size: 1.25rem; font-weight: 900; padding: 0 18px; transition: transform .08s;
}
.primary.huge { min-height: 88px; font-size: 1.6rem; }
.primary:active { transform: scale(.97); }
.primary:disabled { background: var(--panel); color: var(--muted); }
.secondary { width: 100%; min-height: 52px; border: 0; border-radius: 16px; background: var(--panel); color: var(--text); font-size: 1.05rem; font-weight: 800; }
.link { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 1rem; padding: 12px; min-height: 44px; }
.field-err { margin-top: 4px; min-height: 1.2em; color: #ff8a96; font-size: .95rem; font-weight: 600; }
.field-err:empty { min-height: 0; margin: 0; }
.label { color: var(--muted); font-size: .95rem; margin-top: 10px; }

/* ---------- Σύνδεση ---------- */
.join { max-width: 440px; margin: 0 auto; padding: 24px 18px 0; display: flex; flex-direction: column; gap: 8px; min-height: 100%; }
.nfg .join > * + * {
  margin-top: 8px;
}
.join-head { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; margin-bottom: 6px; }
.nfg .join-head > * + * {
  margin-top: 2px;
}
.join-head h1 { margin: 0; font-size: 2rem; }
.kicker { font-size: .85rem; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.join label { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.join input {
  width: 100%; height: 58px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--bg2); color: var(--text); font-size: 1.3rem; font-weight: 700;
}
.join input::-webkit-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.join input::-ms-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.join input::placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.join input:focus { outline: none; border-color: var(--accent); }
.join input[aria-invalid] { border-color: var(--bad); }
#code { font-size: 2rem; letter-spacing: .4em; text-align: center; font-weight: 800; }
#code::-webkit-input-placeholder { letter-spacing: .1em; }
#code::-ms-input-placeholder { letter-spacing: .1em; }
#code::placeholder { letter-spacing: .1em; }
.code-block { display: flex; flex-direction: column; gap: 6px; }
.nfg .code-block > * + * {
  margin-top: 6px;
}
.code-block.hidden { display: none; }
.me-card { display: flex; flex-direction: column; gap: 6px; align-items: stretch; background: var(--panel); border-radius: 22px; padding: 16px; }
.nfg .me-card > * + * {
  margin-top: 6px;
}
.me-card .big-av { align-self: center; }
.big-av {
  width: 104px; height: 104px; border-radius: 52px; background: var(--bg2); border: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: grid; align-items: center; justify-items: center; place-items: center; font-size: 60px; line-height: 1;
}
.avatars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-gap: 6px; gap: 6px; }
.avatars .av { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: var(--bg2); font-size: 1.35rem; padding: 0; }
.avatars .av.on { border-color: var(--accent); background: var(--panel); }
.cta-bar {
  position: -webkit-sticky;
  position: sticky; bottom: 0; margin: auto -18px 0; padding: 14px 18px calc(12px + 0px); padding: 14px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(20,18,31,0), var(--bg) 30%);
}
.privacy-note { margin: 8px 0 0; text-align: center; color: #b3aecb; font-size: .8rem; line-height: 1.4; }
.privacy-note a { color: inherit; -webkit-text-decoration: underline; text-decoration: underline; }
.version { margin: 4px 0 16px; text-align: center; color: #8f89ad; font-size: .8rem; }

/* ---------- Οθόνη παιχνιδιού ---------- */
.ctl {
  height: 100%; display: flex; flex-direction: column;
  padding: 0px 0px 0px 0px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px 16px; font-size: .95rem; color: var(--muted); }
.nfg .bar > * + * {
  margin-left: 10px;
}
.bar .who { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bar .timer { font-size: 1.3rem; font-weight: 900; color: var(--text); -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.bar .timer.low { color: #ff8a96; }
.bar .leave { border: 0; background: rgba(255,255,255,0.07059); color: var(--muted); border-radius: 10px; padding: 0 12px; min-height: 44px; font-size: .85rem; font-weight: 700; }
.offline-banner { display: none; }
body.offline .offline-banner { display: block; margin: 0 12px; padding: 10px 12px; border-radius: 12px; background: #c62a3f; background: var(--badbg); color: #fff; font-weight: 800; text-align: center; }
body.offline .view { opacity: .4; pointer-events: none; }

.view { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 10px 16px 18px; }

.nfg .view > * + * {
  margin-top: 14px;
}
.grow { flex: 1; min-height: 0; }
.scroll { overflow: auto; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.nfg .center > * + * {
  margin-top: 12px;
}
.big { font-size: 1.5rem; font-weight: 800; }
.big.left, .sub.left { text-align: left; }
.sub { color: var(--muted); font-size: 1rem; }
.q { font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: #e4e0f7; }
.done-note { text-align: center; color: #3ddc84; color: var(--good); font-weight: 800; padding: 14px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nfg .chip-row > * {
  margin: calc(8px / 2) calc(8px / 2);
}
.chip { background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 1rem; }
.roster { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 1.8rem; }
.nfg .roster > * {
  margin: calc(6px / 2) calc(6px / 2);
}

/* 👑 επιλογή παιχνιδιού */
.pick-head { display: flex; flex-direction: column; gap: 2px; }
.nfg .pick-head > * + * {
  margin-top: 2px;
}
.games { display: flex; flex-direction: column; gap: 8px; }
.nfg .games > * + * {
  margin-top: 8px;
}
.game {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 3px solid transparent;
  color: #fff; text-align: left; min-height: 60px; flex-shrink: 0;
}
.nfg .game > * + * {
  margin-left: 12px;
}
.game .gi { font-size: 1.9rem; }
.game .gt { display: flex; flex-direction: column; gap: 1px; }
.nfg .game .gt > * + * {
  margin-top: 1px;
}
.game .gt b { font-size: 1.15rem; }
.game .gt { min-width: 0; }
.game .gt span { font-size: .85rem; color: rgba(255,255,255,0.85098); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-scroll { display: flex; flex-direction: column; gap: 8px; margin: 0 -4px; padding: 4px; }
.nfg .pick-scroll > * + * {
  margin-top: 8px;
}
.game.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,204,51,0.2); }
.g-quiz { background: linear-gradient(135deg, #4a2fd6, #1f86c9); }
.g-bluff { background: linear-gradient(135deg, #0d4f42, #13866a); }
.g-vote { background: linear-gradient(135deg, #8a2c1c, #b0461f); }
.g-imp { background: linear-gradient(135deg, #3d0911, #7d1426); }
.g-mix { background: linear-gradient(135deg, #6a2559, #8a5a14); }
.rounds-row { display: flex; align-items: center; gap: 12px; }
.nfg .rounds-row > * + * {
  margin-left: 12px;
}
.rounds-row .label { margin: 0; }
.rounds-row .rounds { flex: 1; }
.rounds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; }
.rounds button { min-height: 48px; border: 0; border-radius: 14px; background: var(--panel); color: var(--text); font-size: 1.2rem; font-weight: 800; }
.rounds button.on { background: var(--text); color: var(--bg); }

/* Quiz: 4 μεγάλα χρωματιστά πλακίδια (ίδια θέση και χρώμα με την TV) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; }
.tile {
  border: 0; border-radius: 24px; padding: 12px; font-size: 1.35rem; font-weight: 800; line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: grid; align-items: center; justify-items: center; place-items: center; text-align: center; transition: transform .08s, -webkit-filter .08s; transition: transform .08s, filter .08s; transition: transform .08s, filter .08s, -webkit-filter .08s;
}
.tile:active { transform: scale(.96); -webkit-filter: brightness(1.1); filter: brightness(1.1); }
.c0 { background: #2fbf8a; background: var(--c0); color: #062a1c; color: var(--c0-ink); }
.c1 { background: #ff4f62; background: var(--c1); color: #2a0a0f; color: var(--c1-ink); }
.c2 { background: #4f86ff; background: var(--c2); color: #0a1630; color: var(--c2-ink); }
.c3 { background: #ff6fd2; background: var(--c3); color: #2d0a22; color: var(--c3-ink); }

/* Κλείδωσε: όλη η οθόνη στο χρώμα της επιλογής */
body[data-locked="c0"] { background: #2fbf8a; background: var(--c0); color: #062a1c; color: var(--c0-ink); }
body[data-locked="c1"] { background: #ff4f62; background: var(--c1); color: #2a0a0f; color: var(--c1-ink); }
body[data-locked="c2"] { background: #4f86ff; background: var(--c2); color: #0a1630; color: var(--c2-ink); }
body[data-locked="c3"] { background: #ff6fd2; background: var(--c3); color: #2d0a22; color: var(--c3-ink); }
body[data-locked^="c"] .bar, body[data-locked^="c"] .bar .who, body[data-locked^="c"] .bar .timer { color: inherit; }
.locked .check {
  width: 150px; height: 150px; border-radius: 75px; background: rgba(0,0,0,0.13333); display: flex; flex-direction: column; align-items: center; justify-content: center; display: grid; align-items: center; justify-items: center; place-items: center;
  font-size: 84px; font-weight: 900; line-height: 1;
}
.pill { border-radius: 999px; padding: 8px 18px; font-weight: 900; background: rgba(0,0,0,0.2); }

/* Λίστες: ψηφοφορία (φατσούλες) και επιλογές μπλόφας (κάρτες) */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 10px; gap: 10px; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.nfg .choices > * + * {
  margin-top: 10px;
}
.card {
  border: 3px solid transparent; border-radius: 18px; background: var(--panel); color: var(--text);
  display: flex; align-items: center; gap: 10px; padding: 14px; font-size: 1.15rem; font-weight: 700; text-align: left; min-height: 60px;
}
.nfg .card > * + * {
  margin-left: 10px;
}
.people .card { flex-direction: column; justify-content: center; text-align: center; gap: 4px; padding: 12px 6px; font-size: 1rem; }
.people .card .av { font-size: 2.6rem; line-height: 1.1; }
.card .lbl { overflow-wrap: anywhere; }
.card.on { border-color: var(--accent); background: #3a3322; }
.card.off { opacity: .35; }
.confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: var(--panel); }
.nfg .confirm > * + * {
  margin-top: 10px;
}
.confirm p { text-align: center; font-size: 1.05rem; }
.confirm b { color: var(--accent); }

/* Κείμενο (μπλόφα / μαντεψιά) */
.text-form { display: flex; flex-direction: column; gap: 10px; }
.nfg .text-form > * + * {
  margin-top: 10px;
}
.text-form .field { position: relative; }
.text-form input {
  width: 100%; height: 64px; padding: 0 70px 0 16px; border-radius: 16px; border: 2px solid var(--accent);
  background: var(--bg2); color: var(--text); font-size: 1.35rem; font-weight: 700;
}
.text-form input::-webkit-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.text-form input::-ms-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.text-form input::placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.text-form input:focus-visible { outline: none; }
.text-form .count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* Impostor: κάρτα που σηκώνεται όσο κρατάς */
.role-card {
  width: 100%; min-height: 300px; border-radius: 28px; background: var(--panel); border: 1px solid rgba(255,255,255,0.12157);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center;
  touch-action: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.nfg .role-card > * + * {
  margin-top: 10px;
}
.role-card .hold-icon { font-size: 3rem; }
.role-card.open { background: linear-gradient(160deg, #2e2948, #1d1a31); transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.53333); }
.role-card .tag { font-size: .8rem; letter-spacing: .15em; color: var(--muted); font-weight: 800; }
.role-card .word { font-size: 2.2rem; font-weight: 900; color: var(--accent); overflow-wrap: anywhere; }
.role-card .sub, .role-card .goal { color: #d6d1ee; }
.secret {
  margin: 0 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.05098); color: var(--muted);
  text-align: center; font-size: .95rem; touch-action: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
.secret.open { background: rgba(255,255,255,0.10196); color: var(--text); }

/* Αποτέλεσμα: όλη η οθόνη πράσινη (σωστό) ή κόκκινη (λάθος) */
body[data-tone="good"] { background: #3ddc84; background: var(--good); color: #06281a; color: var(--good-ink); }
body[data-tone="bad"] { background: #c62a3f; background: var(--badbg); color: #fff; }
body[data-tone="good"] .bar .who, body[data-tone="good"] .bar .timer, body[data-tone="bad"] .bar .who, body[data-tone="bad"] .bar .timer { color: inherit; }
.result .res-title { font-size: 2rem; font-weight: 900; }
.result .gain { font-size: 5rem; font-weight: 900; line-height: 1; -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
body:not([data-tone="good"]):not([data-tone="bad"]) .result .gain { color: #3ddc84; color: var(--good); }
.res-sub { font-size: 1.05rem; font-weight: 600; opacity: .9; }
.stats { display: flex; gap: 10px; margin-top: 8px; }
.nfg .stats > * + * {
  margin-left: 10px;
}
.stats div { display: flex; flex-direction: column; align-items: center; padding: 10px 18px; border-radius: 16px; background: rgba(0,0,0,0.13333); }
.stats span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.stats b { font-size: 1.6rem; -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + 0px); bottom: calc(12px + env(safe-area-inset-bottom)); padding: 12px; border-radius: 14px;
  background: #c62a3f;
  background: var(--badbg); color: #fff; font-weight: 700; text-align: center;
  opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; z-index: 5;
}
.toast.show { opacity: 1; transform: none; }

@media (orientation: landscape) and (max-height: 500px) {
  .role-card { min-height: 180px; }
  .result .gain { font-size: 3rem; }
  /* Οριζόντιο κινητό: τα πλακίδια κρατάνε ύψος για το δάχτυλο και η οθόνη κυλάει */
  .view { gap: 10px; padding-top: 4px; }
  .tiles { flex: none; grid-template-rows: none; grid-auto-rows: minmax(56px, auto); }
  .tile { font-size: 1.1rem; border-radius: 18px; }
  .q { font-size: 1rem; }
  .bw-extras .secondary { min-height: 48px; }
  .locked .check { width: 96px; height: 96px; font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= BRAIN WARS (κινητό) ================= */
.g-bw { background: linear-gradient(135deg, #0b0f2e, #3a0a5c 55%, #00b3c7); box-shadow: inset 0 0 0 1px rgba(34,230,255,0.33333); }
body.bw:not([data-tone="good"]):not([data-tone="bad"]) {
  background: radial-gradient(circle at 50% -10%, #3a0a5c 0%, #0a0820 55%) #0a0820;
}
.bw-head { display: flex; flex-direction: column; gap: 2px; }
.nfg .bw-head > * + * {
  margin-top: 2px;
}
.bw-kicker { font-size: .85rem; font-weight: 900; letter-spacing: .14em; color: #22e6ff; text-transform: uppercase; }
.q.small { font-size: 1rem; color: var(--muted); }
.fixed-len { text-align: center; }
.bw-big-num { font-size: 3.2rem; font-weight: 900; color: #22e6ff; -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bw-num-form input { font-size: 2rem; text-align: center; padding: 0 120px 0 16px; height: 76px; border-color: #22e6ff; }
.bw-unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); max-width: 110px;
  color: #22e6ff; font-size: .9rem; font-weight: 700; text-align: right; line-height: 1.1;
}
.tile.gone { opacity: .15; }
.tile.dim { opacity: .35; }
.tile.picked { outline: 4px solid #fff; outline-offset: -4px; }
.bw-extras { display: flex; gap: 10px; }
.nfg .bw-extras > * + * {
  margin-left: 10px;
}
.bw-extras .secondary { flex: 1; min-height: 56px; font-size: 1.1rem; }
.bw-extras .life { background: #2a1f4d; color: #e8d9ff; box-shadow: inset 0 0 0 2px rgba(162,107,255,0.4); }

.bw-buzz {
  width: 72vw;
  width: min(72vw, 300px); aspect-ratio: 1; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #5a5570, #2b2840); color: #8f89ad;
  font-size: 12vw;
  font-size: max(2.4rem, min(12vw, 3.6rem)); font-weight: 900; letter-spacing: .06em;
  box-shadow: 0 10px 0 #15121f, 0 18px 40px rgba(0,0,0,0.6); transition: transform .06s, box-shadow .06s;
  touch-action: none;
}
.bw-buzz.armed {
  background: radial-gradient(circle at 35% 30%, #ff6a7d, #d0102e 70%); color: #fff;
  box-shadow: 0 10px 0 #7d0718, 0 0 0 6px rgba(255,79,98,0.33333), 0 0 60px rgba(255,31,74,0.53333);
  animation: buzz-pulse .9s ease-in-out infinite alternate;
}
.bw-buzz.hit { transform: translateY(8px) scale(.97); box-shadow: 0 2px 0 #7d0718, 0 0 80px rgba(255,31,74,0.8); }
@keyframes buzz-pulse { to { box-shadow: 0 10px 0 #7d0718, 0 0 0 14px rgba(255,79,98,0.13333), 0 0 90px rgba(255,31,74,0.66667); } }

.num-row { display: flex; gap: 8px; align-items: stretch; }

.nfg .num-row > * + * {
  margin-left: 8px;
}
.num-row .field { flex: 1; min-width: 0; }
.bw-sign { width: 64px; min-height: 76px; flex: 0 0 auto; font-size: 1.8rem; font-weight: 900; }

/* ================= Παλιά κινητά ================= */
@supports not (aspect-ratio: 1) {
  .avatars .av { height: 40px; }
  .bw-buzz { height: 72vw; max-height: 300px; }
}
/* Χωρίς CSS Grid (Android 7 WebView / iOS < 10.3) */
@supports not (display: grid) {
  .avatars { display: flex; flex-wrap: wrap; margin: -3px; }
  .avatars .av { width: calc(12.5% - 6px); margin: 3px; }
  .rounds, .tiles { display: flex; flex-wrap: wrap; margin: -6px; }
  .rounds > * { flex: 1 1 0; margin: 4px; }
  .tiles > * { width: calc(50% - 12px); height: calc(50% - 12px); margin: 6px; }
  .people { display: flex; flex-wrap: wrap; margin: -5px; }
  .people > * { width: calc(33.333% - 10px); margin: 5px; }
}
.nfg .join > .cta-bar { margin-top: auto; }

/* Οριζόντιο κινητό (μετά τους βασικούς κανόνες, για να υπερισχύει) */
@media (orientation: landscape) and (max-height: 500px) {
  .bw-buzz { width: 46vh; height: 46vh; max-width: 200px; max-height: 200px; font-size: 2rem; }
  .pick-scroll { flex: none; overflow: visible; min-height: auto; }
}
/* Στενά κινητά (iPhone SE): η μονάδα κάτω από το πεδίο, για να χωράει ο αριθμός */
@media (max-width: 380px) {
  .bw-num-form input { padding: 0 12px; font-size: 1.7rem; }
  .bw-unit { position: static; transform: none; display: block; max-width: none; text-align: center; margin-top: 6px; font-size: .95rem; }
  .tile { font-size: 1.15rem; padding: 8px; }
}
/* Μεγάλες λέξεις (π.χ. «Βουγιουκλάκη») δεν βγαίνουν από το πλακίδιο */
.tile, .card .lbl, .q { overflow-wrap: break-word; word-break: break-word; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; }
/* Αντίθεση της πάνω μπάρας όταν όλη η οθόνη είναι πράσινη/κόκκινη/χρωματιστή */
body[data-tone="good"] .bar { color: #06281a; color: var(--good-ink); }
body[data-tone="bad"] .bar { color: #fff; }
body[data-tone] .bar .leave, body[data-locked^="c"] .bar .leave { background: rgba(0, 0, 0, .16); color: inherit; }

/* Παύση (το 👑 πάγωσε το παιχνίδι) */
.bar .pause-btn { font-size: 1.1rem; min-width: 44px; padding: 0 10px; }
.paused .pause-icon { font-size: 4.5rem; line-height: 1; margin: 0; }
.secondary.danger { background: transparent; color: #ff8a96; box-shadow: inset 0 0 0 2px rgba(255,138,150,0.4); }
.bar .pause-btn { font-size: .95rem; letter-spacing: -.1em; color: var(--text); }
@media (max-width: 360px) {
  .bar { gap: 6px; padding-left: 12px; }
  .bar .pts { font-size: .8rem; }
  .bar .leave { padding: 0 8px; }
}

/* Κατηγορίες (το 👑 τις ανοίγει/κλείνει) */
.cats-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px;
  border: 0; border-radius: 14px; background: var(--panel); color: var(--text); text-align: left; flex-shrink: 0;
}
.nfg .cats-row > * + * {
  margin-left: 10px;
}
.cats-row .label { margin: 0; }
.cats-val { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.cats-go { font-size: 1.4rem; color: var(--muted); }
.cats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 8px; gap: 8px; align-content: start; }
.cat {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 10px;
  border: 2px solid transparent; border-radius: 14px; background: var(--bg2); color: var(--muted); text-align: left; opacity: .7;
}
.nfg .cat > * + * {
  margin-left: 8px;
}
.cat.on { background: var(--panel); border-color: var(--accent); color: var(--text); opacity: 1; }
.cat:disabled { cursor: not-allowed; }
.cat-ic { font-size: 1.6rem; flex: none; }
.cat-t { display: flex; flex-direction: column; min-width: 0; }
.cat-t b { font-size: .95rem; line-height: 1.2; overflow-wrap: break-word; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; }
.cat-t span { font-size: .75rem; color: var(--muted); }
.cat-mark { position: absolute; top: 4px; right: 8px; color: var(--accent); font-weight: 900; }
.cats-sum { text-align: center; }
.cats-sum.warn { color: #ff8a96; font-weight: 700; }
.cats-actions { display: flex; gap: 10px; }
.nfg .cats-actions > * + * {
  margin-left: 10px;
}
.cats-actions > * { flex: 1; }
@supports not (display: grid) {
  .cats-grid { display: flex; flex-wrap: wrap; margin: -4px; }
  .cats-grid > * { width: calc(50% - 8px); margin: 4px; }
}
@media (max-width: 360px) { .cats-grid { grid-template-columns: 1fr; } .cat { min-height: 52px; } }

/* ================= ΠΕΣ ΒΡΕΣ! (κινητό) ================= */
.g-fi { background: linear-gradient(135deg, #2a0a4a, #8a1a5c 55%, #0d4a8a); box-shadow: inset 0 0 0 1px rgba(255,200,61,0.33333); }
body.fi:not([data-tone="good"]):not([data-tone="bad"]) { background: radial-gradient(circle at 50% -10%, #4a1470 0%, #0b0820 60%) #0b0820; }
.fi-head { display: flex; flex-direction: column; gap: 4px; }
.nfg .fi-head > * + * {
  margin-top: 4px;
}
.fi-cat { font-size: .85rem; font-weight: 900; letter-spacing: .08em; color: #ffc83d; text-transform: uppercase; }
.fi-q { font-size: 1.15rem; }
.fi-form { display: flex; gap: 8px; }
.nfg .fi-form > * + * {
  margin-left: 8px;
}
.fi-form input {
  flex: 1; min-width: 0; height: 60px; padding: 0 14px; border-radius: 16px; border: 2px solid #ffc83d;
  background: var(--bg2); color: var(--text); font-size: 1.3rem; font-weight: 700;
}
.fi-form input::-webkit-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.fi-form input::-ms-input-placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.fi-form input::placeholder { color: #8f89ad; opacity: 1; font-weight: 500; }
.fi-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,200,61,0.26667); }
.fi-send { width: auto; min-height: 60px; padding: 0 18px; flex: none; }
.fi-fb { min-height: 1.6em; margin: 0; padding: 8px 12px; border-radius: 12px; font-weight: 800; text-align: center; background: rgba(255,255,255,0.05098); color: var(--muted); }
.fi-fb:empty { background: transparent; }
.fi-fb.ok { background: rgba(61,220,132,0.2); color: #b8ffd6; animation: fi-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.fi-fb.dup { background: rgba(255,200,61,0.14902); color: #ffe39a; }
.fi-fb.bad { background: rgba(255,79,98,0.14902); color: #ffb3bb; animation: fi-shake .3s; }
.fi-fb.wait { color: var(--muted); }
.fi-stats { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; font-size: .95rem; }
.nfg .fi-stats > * + * {
  margin-left: 10px;
}
.fi-count { color: #ffc83d; }
.fi-mine { color: #3de0ff; }
.fi-label { color: var(--muted); font-size: .9rem; }
.fi-found { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nfg .fi-found > * + * {
  margin-top: 6px;
}
.fi-found li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,200,61,0.12157); border: 1px solid rgba(255,200,61,0.33333); }
.nfg .fi-found li > * + * {
  margin-left: 10px;
}
.fi-found li.miss { background: rgba(255,61,154,0.07843); border-color: rgba(255,61,154,0.26667); }
.fi-n { flex: none; width: 26px; height: 26px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; display: grid; align-items: center; justify-items: center; place-items: center; font-weight: 900; font-size: .85rem; background: #ffc83d; color: #2a1d00; }
.fi-found li.miss .fi-n { background: rgba(255,61,154,0.4); color: #fff; }
.fi-a { flex: 1; min-width: 0; font-weight: 800; overflow-wrap: break-word; }
.fi-by { flex: none; font-size: .8rem; color: var(--muted); max-width: 40%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fi-pop { from { transform: scale(.85); } }
@keyframes fi-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .fi-fb { animation: none !important; } }

/* Αντίστροφη μέτρηση & «επόμενος γύρος σε…» */
.cd .cd-game { font-size: 1rem; font-weight: 900; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.cd .cd-num { font-size: 7rem; font-weight: 900; line-height: 1; -webkit-font-feature-settings: "tnum"; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.next-in { text-align: center; font-weight: 800; color: inherit; opacity: .9; margin-top: 4px; }
.fi-found li.other { background: rgba(255,255,255,0.05098); border-color: rgba(255,255,255,0.13333); }

/* Επιβεβαίωση μέσα στη σελίδα (αντί για window.confirm) */
.ask-veil { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: calc(16px + 0px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: rgba(10, 8, 22, .75); }
.ask-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; background: var(--panel); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); text-align: center; animation: ask-up .2s ease-out; }
.nfg .ask-box > * + * {
  margin-top: 10px;
}
.primary.danger-fill { background: #e0364b; color: #fff; }
@keyframes ask-up { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ask-box { animation: none; } }
