@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #05060c;
  --bg-2: #0a0b12;
  --panel: rgba(12, 14, 24, .82);
  --panel-solid: #10121f;
  --panel-2: rgba(20, 22, 34, .92);
  --line: rgba(219, 187, 91, .20);
  --line-2: rgba(255,255,255,.085);
  --text: #f7f1e7;
  --muted: #aeb3c3;
  --dim: #72798b;
  --gold: #d6ad3f;
  --gold-2: #ffe39a;
  --red: #d6485e;
  --green: #35d49c;
  --blue: #6f88ff;
  --shadow: 0 18px 60px rgba(0,0,0,.48);
  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 13px;
  --topbar-h: 86px;
  --dock-h: 72px;
  --font-latin: Inter, "Segoe UI", Tahoma, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-rtl: Tahoma, "Segoe UI", Vazirmatn, "Noto Sans Arabic", Arial, sans-serif;
  font-family: var(--font-latin);
}

html[dir="rtl"] { font-family: var(--font-rtl); }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: inherit;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 7%, rgba(132, 25, 49, .36), transparent 28%),
    radial-gradient(circle at 84% 13%, rgba(213, 174, 60, .16), transparent 26%),
    radial-gradient(circle at 50% 112%, rgba(31, 43, 78, .44), transparent 38%),
    linear-gradient(140deg, #020308 0%, #070912 42%, #121018 76%, #04050a 100%);
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 48%, #000 0 62%, transparent 96%);
}
.noise-layer { position: fixed; inset: 0; pointer-events: none; opacity: .06; background: repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 1px, transparent 1px 6px); mix-blend-mode: screen; }
button, input, select, textarea { font: inherit; font-family: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1,h2,h3,p { margin-top: 0; }
.hidden { display: none !important; }
.noscript-banner {
  max-width: min(980px, calc(100% - 20px));
  margin: 10px auto 0;
  padding: 12px;
  border: 1px solid rgba(255,99,99,.4);
  border-radius: 12px;
  color: #ffd2d7;
  background: rgba(160, 24, 34, .22);
  font-size: .84rem;
  line-height: 1.55;
}

.app-shell { width: min(1680px, calc(100% - 28px)); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)); }
.scene-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, rgba(255,255,255,.052), rgba(255,255,255,.015)), var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
}
.eyebrow { margin: 0 0 5px; color: var(--gold-2); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
html[dir="rtl"] .eyebrow { letter-spacing: 0; }

.button, .entry-tab, .language-select, .input {
  min-height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  outline: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, opacity .18s ease;
}
.button, .entry-tab { display: inline-grid; place-items: center; padding: 0 15px; font-weight: 850; text-decoration: none; }
.button:hover, .entry-tab:hover, .input:focus, .language-select:focus { border-color: rgba(255,227,154,.45); background: rgba(255,255,255,.075); }
.button:active, .entry-tab:active { transform: translateY(1px); }
.button.primary { border-color: rgba(214,173,63,.52); color: #130d03; background: linear-gradient(180deg, #ffe08a, #c69624); box-shadow: 0 10px 28px rgba(214,173,63,.18); }
.button.danger { border-color: rgba(214,72,94,.45); color: #ffe5e9; background: rgba(214,72,94,.15); }
.button.ghost { background: rgba(255,255,255,.032); }
.button.chaos { border-color: rgba(142, 91, 255, .48); background: rgba(115, 72, 221, .20); }
.button.wide { width: 100%; }
.button.mini { min-height: 29px; padding: 0 9px; border-radius: 10px; font-size: .73rem; }
.input, .language-select { width: 100%; padding: 0 13px; font-weight: 750; color: var(--text); background-color: rgba(255,255,255,.045); }
select.input, .language-select {
  appearance: none;
  color-scheme: dark;
  padding-inline-end: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
html[dir="rtl"] select.input, html[dir="rtl"] .language-select { padding-inline-end: 13px; padding-inline-start: 36px; background-position: 18px 50%, 12px 50%; }
select.input option,
.language-select option,
select.input optgroup,
.language-select optgroup {
  color: var(--text);
  background: #171925;
}
.language-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
}
.language-picker__icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--gold-2);
  font-size: 1rem;
  flex: none;
  pointer-events: none;
}
.language-picker .language-select {
  width: auto;
  min-width: 88px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
}
html[dir="rtl"] .language-picker .language-select {
  padding: 0;
}
html[dir="rtl"] .language-picker {
  flex-direction: row-reverse;
}
.language-picker--compact .language-select {
  min-width: 78px;
}
.field-label { display: block; margin: 12px 0 7px; color: var(--muted); font-size: .82rem; font-weight: 850; }
.field-hint { display: block; margin: 6px 0 8px; color: var(--dim); font-size: .72rem; line-height: 1.55; }
.error-text { margin: 8px 0 0; min-height: 20px; color: #ff97a7; font-weight: 750; }
.tiny-note { margin: 8px 0 0; color: var(--dim); font-size: .74rem; line-height: 1.7; }

/* Landing: one clean card with two explicit tabs */
.landing { width: min(980px, 100%); margin: clamp(12px, 4vh, 58px) auto 0; padding: clamp(16px, 2.4vw, 28px); overflow: hidden; }
.landing { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(310px, 1.1fr); gap: 18px; align-items: stretch; }
.landing-hero { min-width: 0; padding: 6px; display: flex; flex-direction: column; justify-content: center; }
.landing-top, .brand-row, .resume-card, .mic-required, .status-row, .topbar, .top-actions, .identity-wrap, .panel-title-row, .chat-form, .stage-header, .stage-actions, .settings-panel, .action-row { display: flex; align-items: center; gap: 10px; }
.landing-top, .topbar, .stage-header, .panel-title-row { justify-content: space-between; }
.brand-row { align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid rgba(214,173,63,.36); border-radius: 18px; font-size: 1.65rem; background: radial-gradient(circle at 38% 20%, rgba(255,227,154,.32), transparent 34%), rgba(214,173,63,.10); }
.landing h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(2.45rem, 5vw, 4.2rem);
  line-height: .94;
  letter-spacing: -.04em;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}
html[dir="rtl"] .landing h1 { letter-spacing: -.01em; }
.landing-top {
  align-items: flex-start;
}
.landing-top .language-picker {
  margin-inline-start: auto;
}
.hero-copy { margin: 18px 0 16px; color: var(--muted); line-height: 1.85; font-size: .98rem; }
.compatibility-notice { width: min(980px, calc(100% - 28px)); margin: 0 auto 10px; padding: 10px 12px; border: 1px solid rgba(214,173,63,.22); border-radius: 14px; background: rgba(214,173,63,.08); display: flex; align-items: flex-start; gap: 9px; flex-wrap: wrap; justify-content: space-between; position: sticky; top: max(env(safe-area-inset-top), 6px); z-index: 12; }
.compatibility-notice .tiny-note { margin: 0; flex: 1 1 auto; min-width: 160px; color: var(--muted); }
.compatibility-notice .button { min-height: 34px; border-color: rgba(214,173,63,.34); }
.compatibility-notice.hidden { display: none; }
.footer-copyright { margin: 10px 0 0; color: #8189a0; font-size: .67rem; text-align: center; }
.mission-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.mission-steps span { padding: 8px 10px; border: 1px solid rgba(214,173,63,.18); border-radius: 999px; color: #e8d5a0; background: rgba(214,173,63,.07); font-size: .78rem; font-weight: 850; }
.resume-card { margin-top: 16px; padding: 12px; border: 1px solid rgba(214,173,63,.22); border-radius: 16px; background: rgba(214,173,63,.08); justify-content: space-between; }
.resume-card p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.entry-cards { min-width: 0; }
.entry-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; padding: 5px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(0,0,0,.23); }
.entry-tab { min-height: 40px; background: transparent; }
.entry-tab.active { color: #120c04; border-color: rgba(214,173,63,.5); background: linear-gradient(180deg, #ffe08a, #c69624); }
.entry-tab-panel { display: none; }
.entry-tab-panel.active { display: block; }
.entry-card { padding: 16px; border: 1px solid rgba(255,255,255,.075); border-radius: 18px; background: rgba(3,5,12,.44); }
.section-heading strong { display: block; font-size: 1.05rem; }
.section-heading span { display: block; margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.split-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.switch-row { display: flex; align-items: center; gap: 10px; margin: 13px 0; padding: 11px; border: 1px solid var(--line-2); border-radius: 15px; background: rgba(255,255,255,.035); }
.switch-row input { width: 42px; height: 24px; accent-color: var(--gold); }
.switch-row b { display: block; }
.switch-row small { display: block; color: var(--muted); line-height: 1.45; }
.landing-footer { grid-column: 1 / -1; }
.mic-required { padding: 10px 12px; border: 1px solid rgba(214,173,63,.18); border-radius: 14px; background: rgba(214,173,63,.06); }
.mic-required p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }

/* Room shell */
body.in-room { overflow: hidden; }
body.in-room .app-shell { width: min(1880px, calc(100% - 18px)); height: 100dvh; padding: calc(9px + env(safe-area-inset-top)) 0 calc(9px + env(safe-area-inset-bottom)); }
.room-view { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
.topbar { min-height: var(--topbar-h); padding: 12px 14px; }
.top-title { min-width: 0; }
.top-title h2 { margin: 0 0 4px; font-size: clamp(1.25rem, 2.4vw, 2.2rem); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-row { flex-wrap: wrap; }
.status-dot, .pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); font-size: .72rem; font-weight: 900; }
.status-dot::before { content: ''; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.status-dot.offline::before { background: var(--red); box-shadow: 0 0 12px var(--red); }
.pill.locked { color: #ffd4dc; background: rgba(214,72,94,.13); }
.top-actions { justify-content: flex-end; flex-wrap: wrap; max-width: min(880px, 64vw); }
.top-actions .button, .top-actions .language-select { min-height: 36px; width: auto; padding: 0 12px; font-size: .78rem; }
.top-actions .language-select { min-width: 130px; }
.volume-control { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 13px; background: rgba(255,255,255,.045); }
.volume-control__icon { color: var(--gold-2); font-size: .9rem; line-height: 1; }
.volume-control__slider { width: 112px; accent-color: var(--gold); background: transparent; }

.game-layout { min-height: 0; display: grid; grid-template-columns: 290px minmax(560px, 1fr) 320px; gap: 10px; }
.left-stack, .right-stack { min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.timer-card, .identity-card, .voice-card, .vote-panel, .chaos-panel, .chat-card, .center-stage { padding: 13px; }
.timer-card { flex: 0 0 auto; }
.identity-card { flex: 0 0 auto; }
.voice-card { flex: 0 0 auto; }
.chat-card { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.timer { margin: 8px 0 9px; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; font-weight: 950; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.meter, .vote-meter { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.meter span, .vote-meter span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #b3801d, #ffe494); transition: width .25s ease; }
.identity-wrap { align-items: flex-start; }
.identity-wrap h3 { margin: 0 0 4px; font-size: 1.15rem; }
.identity-wrap p, .voice-card p, .vote-panel p, .chaos-panel p, .table-core p, .role-card-description { color: var(--muted); line-height: 1.58; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 1px solid rgba(214,173,63,.26); border-radius: 14px; font-size: 1.25rem; background: radial-gradient(circle at 35% 20%, rgba(255,255,255,.18), transparent 32%), rgba(214,173,63,.10); box-shadow: inset 0 -12px 18px rgba(0,0,0,.18); }
.avatar.big { width: 58px; height: 58px; border-radius: 18px; font-size: 1.7rem; }
.role-badge { display: inline-flex; margin-bottom: 7px; padding: 5px 9px; border-radius: 999px; color: #f5ddb0; background: rgba(214,173,63,.10); border: 1px solid rgba(214,173,63,.20); font-size: .72rem; font-weight: 900; }
.character-card, .ability-box, .secret-word, .spy-guess { margin-top: 10px; }
.character-card { padding: 10px; border: 1px solid var(--line-2); border-radius: 15px; background: rgba(0,0,0,.18); }
.character-head { display: flex; gap: 10px; align-items: flex-start; }
.character-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: rgba(255,255,255,.06); }
.character-head b { display: block; margin-bottom: 3px; }
.character-head p, .ability-status { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.secret-word { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid rgba(53,212,156,.22); border-radius: 14px; background: rgba(53,212,156,.07); }
.secret-word span { color: var(--muted); font-size: .8rem; font-weight: 850; }
.secret-word strong { color: #bbf7d0; font-size: 1rem; }
.spy-guess, .chat-form { display: flex; gap: 8px; }
.remote-audios { display: grid; gap: 8px; margin-top: 10px; }
.audio-chip { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--muted); background: rgba(0,0,0,.18); }
.audio-chip span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Central game board */
.center-stage { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 9px; overflow: hidden; }
.stage-header { flex: 0 0 auto; }
.stage-header h3 { margin: 0; font-size: 1.06rem; }
.table-stage { position: relative; min-height: 0; overflow: hidden; border-radius: 22px; background: radial-gradient(circle at 50% 48%, rgba(214,173,63,.06), transparent 46%), rgba(2,4,10,.38); }
.table-stage::before { content: ''; position: absolute; inset: 18% 14%; border: 1px solid rgba(214,173,63,.26); border-radius: 999px; background: radial-gradient(ellipse at center, rgba(214,173,63,.11), transparent 42%), linear-gradient(90deg, rgba(11,10,16,.96), rgba(19,16,18,.94), rgba(6,8,15,.96)); box-shadow: inset 0 30px 55px rgba(255,255,255,.025), inset 0 -36px 70px rgba(0,0,0,.42), 0 24px 70px rgba(0,0,0,.36); }
.table-stage::after { content: ''; position: absolute; inset: 22% 18%; border-radius: 999px; border: 1px dashed rgba(255,255,255,.05); pointer-events: none; }
.table-core { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, 42%); padding: clamp(14px, 1.8vw, 22px); text-align: center; border: 1px solid rgba(214,173,63,.24); border-radius: 20px; background: rgba(3,4,9,.75); box-shadow: 0 14px 38px rgba(0,0,0,.34); }
html[dir="rtl"] .table-core { left: auto; right: 50%; transform: translate(50%, -50%); }
.table-icon { display: block; margin-bottom: 5px; font-size: 1.65rem; }
.table-core strong { display: block; margin-bottom: 6px; font-size: clamp(1.05rem, 2.1vw, 1.65rem); line-height: 1.25; }
.table-core p { margin: 0; font-size: .86rem; }
.players-ring.rail-layout { position: absolute; z-index: 5; inset: 8px; pointer-events: none; }
.seat-rail { position: absolute; display: flex; gap: 8px; pointer-events: auto; }
.seat-top, .seat-bottom { left: 14%; right: 14%; justify-content: center; }
.seat-top { top: 0; }
.seat-bottom { bottom: 0; }
.seat-left, .seat-right { top: 18%; bottom: 18%; flex-direction: column; justify-content: center; }
.seat-left { left: 0; }
.seat-right { right: 0; }
.seat-rail.empty { display: none; }
.player-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; width: clamp(118px, 9.8vw, 158px); min-height: 56px; padding: 7px; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: rgba(4,6,14,.86); box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease; }
.player-card .avatar { width: 36px; height: 36px; border-radius: 12px; font-size: 1rem; }
.player-main { min-width: 0; }
.player-name, .player-meta { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-name { font-size: .82rem; font-weight: 950; }
.player-meta { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.vote-target-btn { grid-column: 1 / -1; min-height: 25px; }
.player-card.me { border-color: rgba(214,173,63,.62); box-shadow: 0 0 0 3px rgba(214,173,63,.09), 0 12px 28px rgba(0,0,0,.34); }
.player-card.admin .player-name::after { content: ' ★'; color: var(--gold-2); }
.player-card.speaking { border-color: rgba(53,212,156,.76); box-shadow: 0 0 0 4px rgba(53,212,156,.10), 0 14px 32px rgba(0,0,0,.38); }
.player-card.speaking::before { content: ''; position: absolute; inset: -5px; border: 1px solid rgba(53,212,156,.34); border-radius: inherit; animation: pulse 900ms ease-in-out infinite alternate; pointer-events: none; }
.player-card.asking { border-color: rgba(111,136,255,.76); }
.player-card.targeted, .player-card.forced-answer { border-color: rgba(214,72,94,.78); }
.player-card.eliminated { opacity: .45; filter: grayscale(.55); }
.player-card.disconnected { opacity: .62; border-style: dashed; }
@keyframes pulse { from { opacity: .3; transform: scale(.99); } to { opacity: 1; transform: scale(1.03); } }
.stage-actions { justify-content: center; flex-wrap: wrap; }
.stage-actions .button { min-height: 38px; }
.settings-panel { flex-wrap: wrap; justify-content: center; padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(0,0,0,.18); }
.settings-panel label { display: grid; gap: 5px; min-width: 135px; color: var(--muted); font-size: .76rem; font-weight: 850; }
.settings-panel .small-select { min-height: 38px; }
.switch-row.compact { min-width: 180px; margin: 0; }
.role-plan-panel { flex: 1 1 100%; display: grid; grid-template-columns: minmax(210px, .8fr) minmax(260px, 1fr) auto; gap: 10px; align-items: stretch; padding: 10px; border: 1px solid rgba(214,173,63,.15); border-radius: 14px; background: rgba(214,173,63,.05); }
.role-plan-head b { display:block; }
.role-plan-head small { color: var(--muted); line-height:1.55; }
.role-deck-summary { color: var(--gold-2); font-weight: 850; font-size: .78rem; }
.role-plan-list { display:flex; flex-wrap: wrap; gap: 7px; align-content:flex-start; max-height: 92px; overflow:auto; }
.role-chip { display:inline-grid; gap:2px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: .72rem; }
.role-chip b { font-weight: 900; }
.role-chip small { color: var(--dim); }
.role-chip.spy { border-color: rgba(214,72,94,.32); }
.role-chip.neutral { border-color: rgba(255,211,84,.32); }
.role-plan-actions { display:grid; gap:7px; }

.vote-panel, .chaos-panel { flex: 0 0 auto; }
.vote-panel h3, .chaos-panel h3 { margin-bottom: 8px; font-size: 1.08rem; }
.action-row { flex-wrap: wrap; margin-top: 10px; }
.action-row .button { flex: 1 1 110px; }
.log-list { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-inline-end: 3px; }
.log-item { padding: 9px 10px; border: 1px solid rgba(255,255,255,.075); border-radius: 13px; color: var(--muted); background: rgba(0,0,0,.20); line-height: 1.45; font-size: .82rem; }
.log-item strong { color: var(--text); }
.log-item .time { display: block; margin-bottom: 3px; color: var(--dim); font-size: .66rem; font-weight: 900; }
.chat-form { margin-top: 9px; }

/* Drawers / fragments */
.mobile-dock, .mobile-overlay, .mobile-close { display: none; }
@media (max-width: 1499px) {
  body.in-room .app-shell { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 8px); }
  .game-layout { display: block; position: relative; }
  .center-stage { height: 100%; }
  .left-stack, .right-stack { position: fixed; z-index: 70; top: 0; bottom: 0; width: min(390px, 88vw); padding: calc(14px + env(safe-area-inset-top)) 12px calc(84px + env(safe-area-inset-bottom)); overflow: auto; background: rgba(6,8,16,.96); border: 1px solid var(--line); box-shadow: 0 0 80px rgba(0,0,0,.7); transition: transform .22s ease; }
  html[dir="rtl"] .left-stack, html[dir="rtl"] .right-stack { direction: rtl; }
  .left-stack { left: 0; transform: translateX(-105%); border-radius: 0 22px 22px 0; }
  .right-stack { right: 0; transform: translateX(105%); border-radius: 22px 0 0 22px; }
  body.mobile-panel-left .left-stack { transform: translateX(0); }
  body.mobile-panel-right .right-stack { transform: translateX(0); }
  html[dir="rtl"] .left-stack { left: auto; right: 0; transform: translateX(105%); border-radius: 22px 0 0 22px; }
  html[dir="rtl"] .right-stack { right: auto; left: 0; transform: translateX(-105%); border-radius: 0 22px 22px 0; }
  html[dir="rtl"] body.mobile-panel-left .left-stack, html[dir="rtl"] body.mobile-panel-right .right-stack { transform: translateX(0); }
  .mobile-close { display: inline-grid; margin-bottom: 8px; width: 100%; }
  .mobile-overlay { display: none; position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; background: rgba(0,0,0,.55); }
  body.mobile-panel-left .mobile-overlay, body.mobile-panel-right .mobile-overlay { display: block; }
  body.in-room.room-ready .mobile-dock { position: fixed; z-index: 80; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: min(480px, calc(100% - 18px)); padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(8,10,18,.92); box-shadow: 0 18px 50px rgba(0,0,0,.55); backdrop-filter: blur(16px); }
  .dock-button { min-height: 44px; border: 1px solid rgba(255,255,255,.10); border-radius: 13px; color: var(--text); background: rgba(255,255,255,.055); font-weight: 900; }
}

/* Overlays */
.finale-overlay, .reveal-overlay, .guide-overlay, .role-setup-overlay, .role-card-overlay, .picker-overlay { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.68); backdrop-filter: blur(10px); }
.finale-card, .reveal-card, .guide-card, .role-setup-card, .role-card-viewer, .picker-card { width: min(760px, 100%); max-height: min(92dvh, 900px); overflow: auto; border: 1px solid rgba(214,173,63,.30); border-radius: 24px; background: linear-gradient(145deg, rgba(24,25,36,.98), rgba(6,7,14,.98)); box-shadow: 0 28px 90px rgba(0,0,0,.62); padding: clamp(16px, 2.8vw, 28px); }
.finale-card, .reveal-card { position: relative; text-align: center; overflow: hidden; }
.reveal-avatar { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 10px; border-radius: 26px; border: 1px solid rgba(214,173,63,.35); background: rgba(214,173,63,.10); font-size: 2.4rem; }
.reveal-card h2, .finale-card h2 { margin: 0 0 10px; font-size: clamp(1.75rem, 5vw, 3.4rem); }
.reveal-role { display: inline-flex; margin-top: 12px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 900; color: var(--gold-2); }
.reveal-overlay.spy .reveal-card, .finale-overlay.spies .finale-card { border-color: rgba(214,72,94,.52); }
.reveal-overlay.civilian .reveal-card, .finale-overlay.civilians .finale-card { border-color: rgba(53,212,156,.42); }
.reveal-overlay.chaos .reveal-card { border-color: rgba(162,122,255,.52); }
.finale-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.finale-stats span { padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(0,0,0,.20); }
.finale-stats b, .finale-stats strong { display:block; }
.finale-stats b { color: var(--muted); font-size:.76rem; }
.finale-stats strong { margin-top:4px; }
.guide-top, .picker-top, .role-card-viewer-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 12px; }
.guide-copy, .picker-text { color: var(--muted); line-height:1.7; }
.guide-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap:12px; }
.guide-item { display:grid; grid-template-columns: minmax(0,1fr) 126px; gap:14px; align-items:start; padding:14px; border:1px solid var(--line-2); border-radius:18px; background:rgba(255,255,255,.035); }
.guide-item-body { min-width: 0; display: grid; gap: 10px; align-content: start; }
.guide-item-body strong { display:block; font-size: 1.15rem; }
.guide-card-art { width:126px; aspect-ratio:2/3; border-radius:10px; object-fit:cover; justify-self:end; }
.guide-item p, .guide-item small { color:var(--muted); line-height:1.5; }
.role-setup-card { width:min(1240px,100%); }
.role-setup-balance { margin: 10px 0 14px; padding: 10px 12px; border:1px solid rgba(214,173,63,.18); border-radius: 14px; background: rgba(214,173,63,.06); color: #f3dfac; font-weight: 850; }
.role-setup-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 12px; }
.role-option { display:grid; grid-template-columns: 82px minmax(0,1fr) auto; gap:12px; align-items:start; min-height: 172px; padding:12px; border:1px solid var(--line-2); border-radius:18px; background: rgba(255,255,255,.035); }
.role-option.selected { border-color: rgba(214,173,63,.43); background: rgba(214,173,63,.06); }
.role-option.disabled { opacity:.48; }
.role-art-button { border:0; background:transparent; padding:0; }
.role-art-button img { display:block; width:82px; aspect-ratio:2/3; border-radius:10px; object-fit:cover; box-shadow:0 10px 26px rgba(0,0,0,.35); }
.role-option-body strong { display:block; }
.role-option-body p, .role-option-body small { color:var(--muted); line-height:1.6; font-size:.83rem; }
.role-counter { display:grid; grid-template-columns:32px 28px 32px; align-items:center; gap:5px; }
.role-counter button { min-height:32px; border:1px solid var(--line-2); border-radius:10px; color:var(--text); background:rgba(255,255,255,.06); font-weight:900; }
.role-counter b { text-align:center; }
.role-setup-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:14px; flex-wrap:wrap; }
.role-card-viewer { width:min(520px,100%); text-align:center; }
.role-card-large { display:block; width:min(360px, 78vw); max-height:72dvh; object-fit:contain; margin:0 auto 12px; border-radius:18px; box-shadow:0 24px 70px rgba(0,0,0,.56); }
.picker-card { width:min(620px,100%); }
.picker-list { display:grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap:10px; }
.picker-player { display:flex; align-items:center; gap:9px; min-height:58px; padding:10px; border:1px solid var(--line-2); border-radius:15px; color:var(--text); background:rgba(255,255,255,.04); text-align:start; }
.picker-player:hover { border-color: rgba(214,173,63,.45); }
.picker-empty { color:var(--muted); }
.toast-stack { position:fixed; z-index:140; right:max(14px, env(safe-area-inset-right)); bottom:max(14px, env(safe-area-inset-bottom)); display:grid; gap:8px; width:min(380px, calc(100% - 28px)); pointer-events:none; }
html[dir="rtl"] .toast-stack { right:auto; left:max(14px, env(safe-area-inset-left)); }
.toast { padding:12px 13px; border:1px solid rgba(214,173,63,.24); border-radius:14px; background:rgba(7,9,17,.94); box-shadow:0 16px 42px rgba(0,0,0,.45); animation: toast-in .22s ease both; }
.toast.danger { border-color: rgba(214,72,94,.45); }
.toast.success { border-color: rgba(53,212,156,.40); }
@keyframes toast-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

@media (min-width: 1600px) {
  .game-layout { grid-template-columns: 320px minmax(760px,1fr) 350px; gap: 12px; }
  .player-card { width: clamp(138px, 8.5vw, 176px); }
}
@media (max-width: 1680px) and (min-width: 1500px) {
  .game-layout { grid-template-columns: 260px minmax(560px,1fr) 280px; }
  .topbar { min-height: 78px; }
  .top-actions .button, .top-actions .language-select { min-height: 34px; font-size: .72rem; padding:0 9px; }
  .timer-card, .identity-card, .voice-card, .vote-panel, .chaos-panel, .chat-card, .center-stage { padding: 11px; }
  .player-card { width: clamp(108px, 8.5vw, 142px); grid-template-columns: 34px minmax(0,1fr); }
  .player-card .avatar { width:32px; height:32px; }
  .player-name { font-size:.76rem; }
  .player-meta { font-size:.57rem; }
}
@media (max-width: 980px) {
  body.in-room .app-shell { width: 100%; padding-inline: 8px; }
  .topbar { min-height: auto; padding: 9px; border-radius: 18px; align-items: flex-start; grid-template-columns: 1fr; }
  .top-title h2 { max-width: 42vw; font-size: 1.15rem; }
  .top-actions { max-width: none; width: 100%; display:flex; flex-wrap: nowrap; overflow-x:auto; justify-content:flex-start; padding-bottom:2px; }
  .top-actions .button, .top-actions .language-select, .volume-control { flex: 0 0 auto; min-height: 32px; font-size: .68rem; border-radius: 10px; }
  .volume-control__slider { width: 92px; }
  .center-stage { border-radius: 18px; padding: 9px; }
  .table-stage::before { inset: 20% 10%; }
  .table-core { width: min(320px, 50%); }
  .seat-top, .seat-bottom { left: 9%; right: 9%; }
  .seat-left, .seat-right { top: 21%; bottom: 21%; }
  .player-card { width: 126px; min-height: 55px; }
  .role-plan-panel { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --dock-h: 70px; }
  body.in-room .app-shell { padding: calc(6px + env(safe-area-inset-top)) 7px calc(var(--dock-h) + env(safe-area-inset-bottom) + 8px); }
  .room-view { gap: 7px; }
  .topbar { display:grid; grid-template-columns: minmax(0, 1fr) auto; gap:8px; }
  .top-title .eyebrow { font-size:.56rem; margin-bottom:2px; }
  .top-title h2 { max-width: none; font-size: 1rem; }
  .status-dot, .pill { min-height: 21px; padding:0 7px; font-size:.58rem; }
  .top-actions { max-width: none; }
  .top-actions .button, .top-actions .language-select, .volume-control { min-height:30px; padding:0 8px; font-size:.62rem; }
  .top-actions .language-select { min-width: 100px; }
  .volume-control__slider { width: 80px; }
  .stage-header { gap: 6px; }
  .stage-header .eyebrow { font-size:.56rem; }
  .stage-header h3 { font-size:.88rem; }
  .center-stage { gap: 6px; }
  .table-stage { min-height: 0; }
  .table-stage::before { inset: 24% 6%; border-radius: 38px; }
  .table-stage::after { inset: 29% 12%; border-radius: 32px; }
  .table-core { width: min(260px, 58%); padding: 11px; border-radius: 16px; }
  .table-icon { font-size:1.2rem; }
  .table-core strong { font-size: 1.02rem; }
  .table-core p { font-size: .72rem; line-height:1.45; }
  .players-ring.rail-layout { inset: 4px; }
  .seat-rail { gap: 5px; }
  .seat-top, .seat-bottom { left: 4%; right: 4%; }
  .seat-left, .seat-right { top: 24%; bottom: 24%; }
  .player-card { width: min(39vw, 138px); min-height: 58px; grid-template-columns: 42px minmax(0,1fr); padding: 7px; border-radius: 15px; }
  .player-card .avatar { width: 40px; height:40px; font-size:1.15rem; }
  .player-name { font-size:.78rem; }
  .player-meta { font-size:.55rem; }
  .vote-target-btn { min-height:28px; font-size:.68rem; }
  .stage-actions { gap: 6px; }
  .stage-actions .button { flex: 1 1 42%; min-height: 34px; padding: 0 9px; font-size: .72rem; }
  .settings-panel { max-height: 25vh; overflow:auto; padding:8px; }
  .settings-panel label { min-width: 120px; font-size:.68rem; }
  .landing { grid-template-columns: 1fr; margin: 8px auto; padding: 12px; border-radius: 20px; }
  .landing-hero { padding:0; }
  .landing h1 { font-size: 2.45rem; }
  .hero-copy { margin: 12px 0; font-size:.87rem; line-height:1.65; }
  .mission-steps span { padding:6px 8px; font-size:.68rem; }
  .entry-card { padding: 12px; }
  .split-controls { grid-template-columns: 1fr 1fr; }
  .field-label { margin: 9px 0 5px; }
  .button, .entry-tab, .language-select, .input { min-height: 38px; border-radius: 11px; }
  .guide-card, .role-setup-card, .role-card-viewer, .picker-card, .finale-card, .reveal-card { padding: 14px; border-radius: 18px; }
  .guide-list { grid-template-columns: 1fr; }
  .guide-item { grid-template-columns: minmax(0,1fr) 102px; gap: 10px; padding: 12px; }
  .guide-card-art { width:102px; }
  .role-setup-list { grid-template-columns: 1fr; }
  .role-option { grid-template-columns: 66px minmax(0,1fr) auto; }
  .role-art-button img { width:66px; }
  .picker-list { grid-template-columns: 1fr; }
  .finale-stats { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .top-actions { max-width: 42vw; }
  .table-core { width: 62%; }
  .player-card { width: min(42vw, 132px); grid-template-columns: 38px minmax(0,1fr); }
  .player-card .avatar { width:36px; height:36px; }
  .player-meta { display:none; }
  .seat-left, .seat-right { top: 28%; bottom: 28%; }
  .landing { width: calc(100% - 10px); }
  .landing-top { align-items:flex-start; gap: 8px; }
  .brand-mark { width:46px; height:46px; border-radius:15px; font-size:1.35rem; }
  .language-picker { padding-inline: 8px; }
  .language-picker .language-select { min-width: 70px; font-size: .76rem; }
}

/* v14.2 mobile stability pass: responsive landing + typography safety */
html[dir="rtl"],
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
  font-family: var(--font-rtl);
}
:root {
  text-size-adjust: 100%;
}
body {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: normal;
}

.landing,
.landing * {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 980px) {
  .landing {
    width: min(100%, calc(100vw - 14px));
    border-radius: 18px;
    margin-top: 6px;
    grid-template-columns: 1fr;
  }
  .landing h1 {
    font-size: clamp(1.9rem, 7.6vw, 2.6rem);
    letter-spacing: -0.02em;
  }
  .landing-top {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .brand-row {
    min-width: 0;
  }
  .mission-steps {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .hero-copy,
  .landing p,
  .entry-card .field-label,
  .entry-card .error-text,
  .role-plan-list,
  .role-plan-head,
  .player-card,
  .player-name,
  .question-prompt,
  .chat-form .input,
  .chat-form .button {
    white-space: normal;
  }
  body.in-room .app-shell {
    width: 100%;
    padding-inline: 6px;
  }
  .top-title h2 {
    max-width: 100%;
  }
  .players-grid-list {
    max-height: min(42vh, 410px);
  }
}

@media (max-width: 430px) {
  .compatibility-notice { width: calc(100% - 12px); top: 0; left: 0; right: 0; margin: 0 auto; border-radius: 12px; box-shadow: 0 10px 24px rgba(0, 0, 0, .55); }
  body:not(.in-room) .app-shell { padding-top: 14px; }
  .landing { margin-top: 56px; }
  .compatibility-notice .button { width: 100%; }
  .landing {
    margin-inline: auto;
  }
  .landing h1 {
    font-size: clamp(1.65rem, 11vw, 2.2rem);
  }
  .hero-copy {
    font-size: .78rem;
    line-height: 1.65;
  }
  .mission-steps {
    gap: 6px;
  }
  .mission-steps span {
    width: 100%;
    text-align: center;
  }
}

/* v13 cleanup overrides */
.landing {
  width: min(1100px, calc(100% - 24px));
  min-height: min(760px, calc(100vh - 100px));
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  align-items: start;
  gap: 22px;
}
.landing-hero {
  align-self: center;
  padding: 8px 8px 8px 14px;
}
.entry-cards {
  display: block;
}
.entry-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 14px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(6,8,15,.72);
  backdrop-filter: blur(14px);
}
.entry-tab {
  min-height: 46px;
  font-size: .92rem;
}
.entry-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8,10,18,.82), rgba(6,8,14,.72));
}
.create-card, .join-card {
  max-width: 100%;
}
.landing-footer {
  margin-top: 4px;
}
.identity-card {
  min-height: 0;
  overflow: hidden;
}
.identity-scroll {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding-inline-end: 2px;
}
.voice-card {
  max-height: min(24vh, 220px);
  overflow: auto;
}
.game-layout {
  grid-template-columns: 280px minmax(520px, 1fr) 310px;
}
.center-stage {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.table-stage {
  min-height: 450px;
}
.settings-overlay { position: fixed; z-index: 125; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.settings-card {
  width: min(980px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  border: 1px solid rgba(214,173,63,.30);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24,25,36,.98), rgba(6,7,14,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
  padding: clamp(16px, 2.8vw, 28px);
}
.settings-card .settings-panel {
  display: flex;
  margin-top: 12px;
  align-items: flex-start;
}
.settings-card .role-plan-panel {
  max-height: none;
}
@media (max-width: 1499px) {
  .identity-scroll {
    max-height: none;
  }
}
@media (max-width: 980px) {
  .landing {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .landing-hero {
    padding: 0;
  }
  .entry-tabs {
    position: static;
  }
  .entry-card {
    padding: 14px;
  }
  .table-stage {
    min-height: 520px;
  }
}
@media (max-width: 700px) {
  .landing {
    width: calc(100% - 12px);
    padding: 12px;
    gap: 14px;
  }
  .brand-row {
    gap: 10px;
  }
  .landing h1 {
    font-size: 2.15rem;
    line-height: .95;
  }
  .hero-copy {
    font-size: .84rem;
  }
  .entry-tab {
    min-height: 40px;
    font-size: .82rem;
  }
  .table-stage {
    min-height: 480px;
  }
  .identity-scroll {
    max-height: min(52dvh, 420px);
  }
  .settings-card {
    padding: 14px;
    border-radius: 18px;
  }
}

/* v14: fixed landing tab layout, clean player grid, mobile-safe player details */
.landing {
  display: grid !important;
  grid-template-columns: minmax(320px, .95fr) minmax(360px, 1.05fr) !important;
  grid-template-areas:
    "hero entry"
    "footer footer";
  align-items: center;
  gap: 20px;
}
html[dir="rtl"] .landing {
  grid-template-areas:
    "entry hero"
    "footer footer";
}
.landing-hero { grid-area: hero; }
.entry-panel { grid-area: entry; min-width: 0; align-self: center; }
.entry-cards { width: 100%; }
.landing-footer { grid-area: footer; }
.entry-tabs { position: static !important; width: 100%; margin-bottom: 12px; }
.entry-card { min-height: 0; }

/* Replace fragile table seating with a stable clean player board */
.table-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 14px;
  padding: clamp(12px, 1.6vw, 20px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at 50% 10%, rgba(214,173,63,.09), transparent 35%),
    linear-gradient(180deg, rgba(5,7,14,.74), rgba(4,5,10,.52));
}
.table-stage::before,
.table-stage::after { display: none !important; }
.table-core,
html[dir="rtl"] .table-core {
  position: relative !important;
  z-index: 1;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  width: min(780px, 100%) !important;
  margin: 0 auto;
  padding: clamp(12px, 1.4vw, 18px);
}
.players-grid-list {
  position: relative;
  z-index: 2;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
  align-content: start;
  padding: 4px;
}
.players-grid-list .player-card {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
}
.players-grid-list .player-card .avatar {
  width: clamp(54px, 6vw, 70px);
  height: clamp(54px, 6vw, 70px);
  border-radius: 21px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}
.players-grid-list .player-main { width: 100%; }
.players-grid-list .player-name {
  max-width: 100%;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.players-grid-list .player-meta { display: none !important; }
.players-grid-list .vote-target-btn {
  grid-column: auto;
  width: min(96px, 100%);
  margin-top: 2px;
}
.players-grid-list .player-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,227,154,.38);
}
.player-info-overlay {
  position: fixed;
  z-index: 125;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(10px);
}
.player-info-card {
  width: min(540px, 100%);
  max-height: min(92dvh, 720px);
  overflow: auto;
  border: 1px solid rgba(214,173,63,.30);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24,25,36,.98), rgba(6,7,14,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
  padding: clamp(16px, 2.4vw, 24px);
}
.player-info-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.player-info-top h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.85rem); }
.player-info-status { display:flex; flex-wrap:wrap; gap:8px; margin: 10px 0 14px; }
.player-info-status span { padding: 6px 9px; border:1px solid rgba(255,255,255,.09); border-radius:999px; color:var(--muted); background:rgba(255,255,255,.045); font-size:.78rem; font-weight:850; }
.player-info-character { padding: 12px; border:1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.035); }
.player-info-character b { display:block; margin-bottom:6px; color: var(--gold-2); }
.player-info-character p { margin:0; color:var(--muted); line-height:1.7; }
.player-info-actions { margin-top: 12px; display:grid; gap:8px; }

@media (min-width: 1500px) {
  .game-layout { grid-template-columns: 280px minmax(720px, 1fr) 310px; }
  .players-grid-list { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 1499px) {
  .center-stage { height: 100%; }
  .table-stage { min-height: 0; }
  .players-grid-list { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
}
@media (max-width: 980px) {
  .landing,
  html[dir="rtl"] .landing {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "hero"
      "entry"
      "footer";
    align-items: stretch;
  }
  .landing-hero { text-align: start; }
  .table-stage { gap: 10px; }
  .players-grid-list { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 9px; }
  .players-grid-list .player-card { min-height: 106px; padding: 9px; }
}
@media (max-width: 700px) {
  .landing { width: calc(100% - 12px); margin: 6px auto; }
  .entry-card { padding: 13px; }
  .top-actions { scrollbar-width: thin; }
  .table-stage { padding: 10px; }
  .table-core { width: 100% !important; }
  .players-grid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .players-grid-list .player-card { min-height: 98px; border-radius: 16px; padding: 8px; }
  .players-grid-list .player-card .avatar { width: 48px; height: 48px; border-radius: 17px; font-size: 1.35rem; }
  .players-grid-list .player-name { font-size: .78rem; }
  .players-grid-list .vote-target-btn { min-height: 26px; font-size: .64rem; width: 100%; }
  .player-info-card { border-radius: 18px; padding: 14px; }
  .player-info-top { grid-template-columns: auto minmax(0, 1fr); }
  .player-info-top .button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 430px) {
  .players-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep this at the end so screen/overlay display rules never override explicit hides. */
.hidden,
[hidden] {
  display: none !important;
}
