/* ============================================================
   БУНКЕР — стили этапа 1
   Две пастельные темы: «дневная смена» и «ночная смена».
   Палитра: пыльный бетон, шалфей, выцветшая охра. Без неона.
   ============================================================ */

:root {
  --bg: #ECE9DF;            /* пыльная бумага-бетон */
  --surface: #F7F5EE;
  --surface-2: #EFEDE3;
  --ink: #34382E;
  --muted: #7C8071;
  --line: #D8D4C6;
  --sage: #7E9873;          /* основной акцент — шалфей */
  --sage-ink: #FBFAF5;
  --sage-soft: #DDE6D6;
  --amber: #B8934C;         /* выцветшая охра — код, ведущий */
  --amber-soft: #F0E4C8;
  --danger: #B96A5E;
  --danger-soft: #F0DBD6;
  --shadow: 0 2px 10px rgba(52, 56, 46, 0.08);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #22251E;            /* тёмная олива-уголь, мягкая */
  --surface: #2C2F27;
  --surface-2: #33362D;
  --ink: #E7E5D8;
  --muted: #9BA08F;
  --line: #3E4237;
  --sage: #A6BD95;
  --sage-ink: #23261F;
  --sage-soft: #3A4434;
  --amber: #D6B36E;
  --amber-soft: #45402D;
  --danger: #CC8A7F;
  --danger-soft: #46332F;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ---------- шапка ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--sage);
  color: var(--sage-ink);
  font-size: 18px;
}

.brand-name {
  font-family: "Russo One", sans-serif;
  font-size: 20px;
  letter-spacing: 0.14em;
}

/* мягкая «предупредительная» полоса — подпись места, без неона */
.hazard-strip {
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    var(--amber-soft) 0 14px,
    var(--surface-2) 14px 28px
  );
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whoami {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- базовые элементы ---------- */

.content {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.page-title {
  font-family: "Russo One", sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin: 0 0 6px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible,
input:focus-visible, .code-plate:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.btn-primary { background: var(--sage); color: var(--sage-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }

.btn-secondary {
  background: var(--sage-soft);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover:not(:disabled) { filter: brightness(0.98); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { filter: brightness(0.97); }

.btn-sm { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 17px; }
.btn-block { width: 100%; }

.icon-btn {
  font: inherit;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { filter: brightness(1.03); }

.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

input[type="text"], input[type="password"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
input::placeholder { color: var(--muted); opacity: 0.7; }

input[type="range"] { width: 100%; accent-color: var(--sage); }

.code-input {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
  font-size: 20px;
}

/* ---------- уведомления ---------- */

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}
.toast-error { background: var(--danger-soft); color: var(--danger); }
.toast-ok { background: var(--sage-soft); color: var(--ink); }

.toast-enter-active, .toast-leave-active { transition: opacity 0.25s, transform 0.25s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translate(-50%, -8px); }

/* ---------- экран входа ---------- */

.auth-wrap { display: flex; justify-content: center; padding-top: 4vh; }

.auth-card { width: 100%; max-width: 420px; }

.auth-title {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 4px;
  letter-spacing: 0.03em;
}
.auth-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab {
  font: inherit;
  font-weight: 600;
  padding: 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- меню ---------- */

.menu-wrap .page-title { margin-bottom: 20px; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.menu-card-head h2 {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 4px;
}
.menu-card-head p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ---------- лобби ---------- */

.lobby-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

/* фирменный элемент: штампованная табличка с кодом */
.code-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin-bottom: 20px;
  padding: 18px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  background: var(--amber-soft);
  border: 2px dashed var(--amber);
  border-radius: var(--radius);
  transition: filter 0.15s ease;
}
.code-plate:hover { filter: brightness(1.02); }

.code-plate-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.code-plate-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.3em;
  margin-left: 0.3em; /* компенсация трекинга последней буквы */
}

.code-plate-hint { font-size: 12px; color: var(--muted); }

.roster-card { padding: 20px 24px; }

.roster-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.roster-head h2 {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0;
}
.roster-count {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  color: var(--muted);
}

.roster { list-style: none; margin: 0; padding: 0; }

.roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 4px;
  border-top: 1px solid var(--line);
}
.roster-item:first-child { border-top: none; }

.roster-name { font-weight: 500; }
.roster-you { color: var(--muted); font-weight: 400; font-size: 14px; }

.roster-empty .roster-name {
  color: var(--muted);
  font-weight: 400;
  opacity: 0.65;
  font-style: italic;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-host { background: var(--amber-soft); color: var(--amber); }

.lobby-footer { margin-top: 24px; text-align: center; }

/* ---------- адаптив и доступность ---------- */

@media (max-width: 680px) {
  .menu-grid { grid-template-columns: 1fr; }
  .code-plate-value { font-size: 30px; }
  .lobby-head { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Этап 2 — игровой экран
   ============================================================ */

.content-wide { max-width: 1080px; }

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

/* таймер обсуждения */
.timer-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 120px;
}

.timer-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.timer-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
}

.timer-alarm {
  background: var(--danger-soft);
  border-color: var(--danger);
}
.timer-alarm .timer-value, .timer-alarm .timer-label { color: var(--danger); }

/* брифинг */
.brief-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.brief-card { padding: 20px 24px; }

.eyebrow-danger { color: var(--danger); }
.eyebrow-amber { color: var(--amber); }

.brief-title {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 20px;
  margin: 2px 0 8px;
}

.brief-text { margin: 0; font-size: 15px; }

.brief-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 15px;
}
.brief-list li { padding: 3px 0; }

.places-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
}
.places-note strong { color: var(--amber); font-size: 16px; }

/* моё досье */
.dossier-card { margin-bottom: 24px; }

.hint-inline { font-size: 13px; color: var(--muted); }

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.char-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.char-revealed {
  background: var(--sage-soft);
  border-color: var(--sage);
}

.char-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.char-value { font-size: 14px; font-weight: 500; flex: 1; }

.char-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* другие игроки */
.section-title {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 18px;
  margin: 0 0 12px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.pcard { padding: 16px 18px; }

.pcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pcard-name { font-weight: 600; }

.pcard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
}

.pcard-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}
.pcard-list li:first-child { border-top: none; }

.pcard-cat { color: var(--muted); flex-shrink: 0; }
.pcard-val { text-align: right; font-weight: 500; }

.pcard-hidden .pcard-val {
  color: var(--muted);
  opacity: 0.55;
  letter-spacing: 0.2em;
}

/* панель ведущего */
.host-panel { margin-bottom: 20px; }

.host-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 8px;
}

.host-group { display: flex; flex-direction: column; gap: 8px; }

.host-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

.hint-center { text-align: center; }

.game-footer { text-align: center; margin-top: 8px; }

@media (max-width: 800px) {
  .brief-grid { grid-template-columns: 1fr; }
  .dossier-grid { grid-template-columns: repeat(2, 1fr); }
  .game-head { flex-direction: column; align-items: stretch; }
  .timer-box { align-items: center; }
}

/* ============================================================
   Этап 3 — голосование, спецкарты, журнал, финал
   ============================================================ */

.phase-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.phase-discussion { background: var(--sage-soft); color: var(--sage); }
.phase-voting { background: var(--danger-soft); color: var(--danger); }

.excluded-banner {
  margin-bottom: 20px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 500;
  text-align: center;
}

/* спецкарты */
.specials-card { margin-bottom: 24px; }

.specials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.special-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 10px;
  border: 2px dashed var(--amber);
  background: var(--amber-soft);
}

.special-pending { opacity: 0.75; border-style: solid; }

.special-title {
  font-family: "Russo One", sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.special-desc { font-size: 13px; color: var(--muted); flex: 1; }

.special-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* голосование */
.voting-card {
  margin-bottom: 24px;
  border: 1px solid var(--danger);
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vote-btn:hover:not(:disabled) { border-color: var(--danger); }
.vote-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.vote-mine {
  background: var(--danger-soft);
  border-color: var(--danger);
}
.vote-mine .vote-name { color: var(--danger); }

.vote-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.vote-mine .vote-tag { color: var(--danger); }

/* бейджи игроков */
.pcard-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.badge-out { background: var(--danger-soft); color: var(--danger); }
.badge-immune { background: var(--sage-soft); color: var(--sage); }
.badge-voted { background: var(--surface-2); color: var(--muted); }
.badge-winner { background: var(--sage-soft); color: var(--sage); }

.pcard-excluded { opacity: 0.75; }
.pcard-excluded .pcard-name { text-decoration: line-through; text-decoration-thickness: 1px; }

.pcard-winner { border-color: var(--sage); }

/* журнал */
.log-card { margin-bottom: 20px; }

.log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  font-size: 13.5px;
}

.log-list li {
  display: flex;
  gap: 10px;
  padding: 6px 2px;
  border-top: 1px solid var(--line);
}
.log-list li:first-child { border-top: none; }

.log-round {
  flex-shrink: 0;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 12px;
  color: var(--amber);
  padding-top: 1px;
}

.log-text { color: var(--ink); }

/* финал */
.finale-head { text-align: center; margin-bottom: 24px; }
.finale-sub { color: var(--muted); margin: 4px 0 0; }

/* ============================================================
   Этап 4 — список лобби, статистика, наблюдающий ведущий
   ============================================================ */

.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
}
.field-check input { width: 17px; height: 17px; accent-color: var(--sage); }

/* список лобби */
.list-card { margin-top: 20px; }

.lobby-list { list-style: none; margin: 4px 0 0; padding: 0; }

.lobby-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-top: 1px solid var(--line);
}
.lobby-row:first-child { border-top: none; }

.lobby-row-name { font-weight: 600; display: flex; align-items: center; gap: 7px; }

.lock-mark { color: var(--amber); font-size: 15px; }

.lobby-row-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }

.lobby-row-join { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.list-pass {
  width: 130px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}

/* статистика */
.stats-card { margin-top: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.stat-value {
  font-family: "Russo One", sans-serif;
  font-size: 24px;
  color: var(--sage);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-title {
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-size: 15px;
  margin: 20px 0 8px;
}

.history-list { list-style: none; margin: 0; padding: 0; }

.history-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 2px;
  border-top: 1px solid var(--line);
}
.history-row:first-child { border-top: none; }

.history-result {
  flex-shrink: 0;
  min-width: 86px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  margin-top: 2px;
}
.history-win { background: var(--sage-soft); color: var(--sage); }
.history-loss { background: var(--danger-soft); color: var(--danger); }

.history-name { display: block; font-weight: 500; }
.history-meta { display: block; font-size: 12.5px; color: var(--muted); }

/* наблюдающий ведущий */
.spectator-banner {
  margin-bottom: 20px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 500;
  text-align: center;
}

@media (max-width: 680px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lobby-row { flex-wrap: wrap; }
}

/* ============================================================
   Этап 5 — профиль и редактор наборов карточек
   ============================================================ */

.whoami-btn {
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.whoami-btn:hover, .whoami-btn.active { color: var(--ink); background: var(--surface-2); }

.select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.set-note { margin: -8px 0 20px; }

/* редактор набора */
.editor-card { margin-top: 20px; }

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  resize: vertical;
}
textarea::placeholder { color: var(--muted); opacity: 0.6; }
textarea:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

.catastrophe-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}
.cat-title { align-self: stretch; }

@media (max-width: 680px) {
  .editor-grid { grid-template-columns: 1fr; }
  .catastrophe-row { grid-template-columns: 1fr; }
}

/* этап 6 — каталог наборов */
.nav-active { color: var(--ink); background: var(--surface-2); }

/* ============================================================
   Этап 7 — модальные подтверждения, аккаунт, ИИ-эпилог
   ============================================================ */

/* модальное подтверждение */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 32, 26, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  padding: 22px 24px;
}

.modal-text { margin: 0 0 18px; font-size: 15.5px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* разделитель на экране входа */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* аккаунт в профиле */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin-top: 8px;
}

/* ИИ-эпилог */
.epilogue-card {
  margin-bottom: 24px;
  border: 1px solid var(--amber);
}

.epilogue-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  white-space: pre-line;
}

.epilogue-pending {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  animation: epilogue-pulse 1.6s ease-in-out infinite;
}

@keyframes epilogue-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (max-width: 680px) {
  .account-grid { grid-template-columns: 1fr; }
}

/* вердикт ИИ-хроники */
.verdict {
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 10px;
  text-align: center;
  font-family: "Russo One", sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.verdict-good { background: var(--sage-soft); color: var(--sage); border: 1px solid var(--sage); }
.verdict-bad { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }

/* ============================================================
   Этап 8 — разведка
   ============================================================ */

.expedition-card {
  margin-bottom: 24px;
  border: 2px dashed var(--sage);
}

.expedition-scout { margin: 0 0 10px; }
.expedition-scout .badge { margin-left: 8px; }

.expedition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.expedition-cardface {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, var(--bg) 10px 20px);
}

.expedition-q {
  font-family: "Russo One", sans-serif;
  font-size: 34px;
  color: var(--muted);
  opacity: 0.75;
}

.expedition-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}

/* результат */
.expedition-result {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.expedition-result-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.expedition-tier {
  font-family: "Russo One", sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.expedition-text { margin: 0; }

.expedition-loot {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 14px;
}
.expedition-loot li { padding: 3px 0; }
.expedition-loot li::before { content: "▸ "; color: var(--sage); }

.expedition-death { background: var(--danger-soft); border-color: var(--danger); }
.expedition-death .expedition-tier { color: var(--danger); }
.expedition-bad { border-color: var(--danger); }
.expedition-bad .expedition-tier { color: var(--danger); }
.expedition-empty .expedition-tier { color: var(--muted); }
.expedition-loot .expedition-tier, .expedition-result.expedition-loot { border-color: var(--sage); }
.expedition-result.expedition-loot .expedition-tier { color: var(--sage); }
.expedition-jackpot { background: var(--amber-soft); border-color: var(--amber); }
.expedition-jackpot .expedition-tier { color: var(--amber); }

@media (max-width: 680px) {
  .expedition-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Этап 9 — разведка на карте города + фиксы плашек
   ============================================================ */

/* карта города; палитра сепии фиксирована — карта тёмная в обеих темах */
.exp-map {
  position: relative;
  aspect-ratio: 1400 / 788;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: url("/static/img/city-map.jpg") center / cover no-repeat #1c1913;
  overflow: hidden;
}

/* полупрозрачная карта-точка на карте */
.exp-site {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 21%;
  min-width: 118px;
  height: 40%;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  font: inherit;
  text-align: center;
  color: #E8DCC0;
  background: rgba(15, 12, 9, 0.26);
  border: 1.5px solid rgba(226, 212, 180, 0.75);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.exp-site:hover:not(:disabled) {
  border-color: #E8C97D;
  background: rgba(15, 12, 9, 0.4);
  box-shadow: 0 0 0 1px rgba(232, 201, 125, 0.35), 0 4px 18px rgba(0, 0, 0, 0.45);
}

.exp-site:disabled { cursor: default; }
.exp-site:focus-visible { outline: 2px solid #E8C97D; outline-offset: 2px; }

.exp-site-icon {
  position: absolute;
  top: -16px;
  left: -16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #E8DCC0;
  background: rgba(15, 12, 9, 0.92);
  border: 1.5px solid rgba(226, 212, 180, 0.75);
}
.exp-site-icon svg { width: 21px; height: 21px; }

.exp-site-name {
  display: block;
  padding: 6px 8px 5px;
  font-family: "Russo One", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.25;
  background: rgba(15, 12, 9, 0.88);
}

.exp-site-cat {
  display: block;
  padding: 3px 8px 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 220, 192, 0.8);
  background: rgba(15, 12, 9, 0.66);
  border-top: 1px solid rgba(226, 212, 180, 0.35);
}

/* на узких экранах — сетка 2x2 поверх карты */
@media (max-width: 680px) {
  .exp-map {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px;
  }
  .exp-site {
    position: static;
    transform: none;
    width: auto;
    min-width: 0;
    height: 128px;
  }
  .exp-site-icon { top: -10px; left: -10px; width: 34px; height: 34px; }
}

/* бейджи: гибель и разведка */
.badge-dead { background: var(--danger); color: #F6EEE9; }
.badge-scout { background: var(--amber-soft); color: var(--amber); }

/* фикс: длинные ники больше не выталкивают плашки за карточку —
   бейджи переносятся под имя, карточки чуть шире */
.players-grid { grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.pcard-head { flex-wrap: wrap; row-gap: 5px; align-items: flex-start; }
.pcard-name { overflow-wrap: anywhere; min-width: 0; }
.pcard-badges { flex-wrap: wrap; row-gap: 5px; }
.vote-name, .roster-name, .lobby-row-name, .expedition-scout strong {
  overflow-wrap: anywhere;
}
