/* Live game — host dashboard & player mobile */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: #d4af37;
  color: #12080c;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
}

:root {
  --live-primary: #8B0000;
  --live-secondary: #D4AF37;
  --live-accent: #1a1a2e;
  --live-bg: #f5f0e6;
  --live-panel: #1a1a24;
  --live-text: #e8e6e3;
  --live-muted: #9a9aaa;
}

/* Host */
.live-host {
  min-height: 100vh;
  background: #0f0f14;
  color: var(--live-text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.live-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--live-secondary);
  background: linear-gradient(135deg, rgba(92,26,26,0.4), var(--live-panel));
  flex-wrap: wrap;
}

.live-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  width: 100%;
  order: -1;
}

.live-header-nav .nav-link {
  color: var(--live-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.live-header-nav .nav-link.active,
.live-header-nav .nav-link:hover {
  color: var(--live-secondary);
}

.host-dashboard.host-connecting .room-actions,
.host-dashboard.host-connecting #host-controls-grid {
  display: none;
}

.join-lead {
  color: var(--live-muted);
  margin-bottom: 1rem;
}

.join-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.join-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  min-height: 48px;
}

.join-card .btn-lg {
  min-height: 52px;
  font-size: 1.05rem;
}

.solo-player.solo-launching .join-card label,
.solo-player.solo-launching .join-card .join-error,
.solo-player.solo-launching .join-card .btn {
  display: none;
}

.solo-player .play-room,
.solo-player .chat-section {
  display: none;
}

.live-header h1 {
  font-family: Georgia, serif;
  color: var(--live-secondary);
  font-size: 1.25rem;
}

.back-link {
  color: var(--live-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover { color: var(--live-text); }

.live-title {
  margin-left: auto;
  font-style: italic;
  color: var(--live-muted);
}

.host-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.setup-card {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
  background: var(--live-panel);
  border: 1px solid #2a2a3a;
  border-radius: 12px;
}

.setup-card h2 { color: var(--live-secondary); margin-bottom: 1rem; }

.setup-note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--live-muted); }

.resume-prompt {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--live-secondary);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.room-banner {
  background: linear-gradient(135deg, var(--live-primary), #3a1010);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.room-banner-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.qr-wrap {
  background: #fff;
  padding: 0.5rem;
  border-radius: 10px;
  line-height: 0;
}

.qr-wrap img { display: block; }

.qr-caption {
  font-size: 0.65rem;
  margin-top: 0.35rem;
  opacity: 0.85;
  color: #fff;
}

.room-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.room-code {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 0.35em;
  font-family: monospace;
  margin: 0.5rem 0 1rem;
}

.room-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.join-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.phone-join-label {
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.phone-join-url {
  font-family: monospace;
  font-size: 0.95rem;
  word-break: break-all;
  background: rgba(0,0,0,0.25);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.firewall-hint {
  color: #f0c060;
  font-size: 0.75rem;
  margin-top: 0.75rem;
}

.phase-badge {
  display: inline-block;
  background: var(--live-secondary);
  color: #1a1a1a;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.host-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.host-panel {
  background: var(--live-panel);
  border: 1px solid #2a2a3a;
  border-radius: 10px;
  padding: 1rem;
}

.host-panel.full { grid-column: 1 / -1; }

.host-panel h2 {
  font-size: 1rem;
  color: var(--live-secondary);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #2a2a3a;
  padding-bottom: 0.5rem;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #2a2a3a;
  font-size: 0.9rem;
}

.player-row.offline { opacity: 0.5; }

.player-row.npc-player-row {
  grid-template-columns: minmax(120px, 1fr) auto minmax(100px, 1fr) auto;
  background: rgba(201, 162, 39, 0.07);
}

.npc-badge {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(240, 192, 96, 0.55);
  border-radius: 999px;
  color: #f0c060;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.npc-remove {
  border: 0;
  background: transparent;
  color: #d9a2a2;
  cursor: pointer;
  font-size: 0.72rem;
  text-decoration: underline;
}

.npc-briefing-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  border: 1px solid #353548;
  border-left: 3px solid #c9a227;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.npc-briefing-card > img {
  width: 92px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.npc-briefing-card h3 { margin: 0 0 0.35rem; color: #fff; }
.npc-briefing-card h3 span { display: block; color: var(--live-muted); font-size: 0.72rem; font-weight: 400; }
.npc-briefing-card details { margin-top: 0.45rem; font-size: 0.82rem; }
.npc-briefing-label { margin: 0 0 0.15rem; color: #f0c060; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.npc-current-cue { color: #f8e7b1; }

@media (max-width: 620px) {
  .player-row.npc-player-row { grid-template-columns: 1fr auto; }
  .player-row.npc-player-row .assign-select,
  .player-row.npc-player-row .assigned { grid-column: 1 / -1; }
  .npc-briefing-card { grid-template-columns: 64px minmax(0, 1fr); }
  .npc-briefing-card > img { width: 64px; }
}

.assign-select {
  padding: 0.3rem;
  background: #0f0f14;
  color: var(--live-text);
  border: 1px solid #3a3a4a;
  border-radius: 6px;
  font-size: 0.8rem;
}

.assigned {
  font-size: 0.8rem;
  color: var(--live-muted);
  text-align: right;
}

.host-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.host-actions.wrap .btn { flex: 1 1 auto; min-width: 140px; }

.clue-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.85rem;
}

.clue-cols h4 { color: var(--live-secondary); margin-bottom: 0.5rem; font-size: 0.8rem; }

.clue-cols ul { list-style: none; }

.clue-cols li { padding: 0.35rem 0; border-bottom: 1px solid #2a2a3a; }

.clue-cols li.done { color: var(--live-muted); text-decoration: line-through; }

.host-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.host-table th, .host-table td {
  border: 1px solid #3a3a4a;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.host-table th { background: rgba(139,0,0,0.3); }

.host-table td.acc-correct,
.verdict-list li.acc-correct {
  background: rgba(46, 125, 50, 0.35);
  color: #b8f5bc;
  font-weight: 600;
}

.host-table td.acc-wrong,
.verdict-list li.acc-wrong {
  background: rgba(183, 28, 28, 0.35);
  color: #ffc9c9;
}

.host-table td.acc-partial {
  background: rgba(201, 162, 39, 0.25);
  color: #ffe9a8;
  font-weight: 600;
}

.reveal-box, .solution-box {
  background: rgba(139,0,0,0.15);
  border-left: 4px solid var(--live-primary);
  padding: 1rem;
  margin-top: 0.75rem;
}

.live-status {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.8);
  font-size: 0.8rem;
  color: var(--live-muted);
  text-align: center;
}

.live-status.error { color: #f88; }

/* Shared buttons */
.btn {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.btn-block { width: 100%; }

.btn-primary { background: var(--live-primary); color: #fff; }

.btn-secondary { background: #2a2a3a; color: var(--live-text); border: 1px solid #3a3a4a; }

.btn-accent { background: #4a6fa5; color: #fff; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.hidden { display: none !important; }

.host-pending .setup-card {
  max-width: 28rem;
  margin: 1.5rem auto;
  text-align: center;
}

.host-pending .room-code {
  font-size: 2rem;
  letter-spacing: 0.2em;
  margin: 0.75rem 0;
}

/* Player mobile */
.live-player {
  min-height: 100vh;
  background: var(--live-bg);
  color: var(--live-accent);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.join-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, #1a0a0a 0%, #1a1a2e 100%);
}

.join-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.join-card h1 {
  text-align: center;
  color: var(--live-primary);
  font-family: Georgia, serif;
  margin-bottom: 0.5rem;
}

.join-card > p {
  text-align: center;
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.join-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
}

.join-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  text-align: center;
  letter-spacing: 0.1em;
}

.join-card input:focus {
  outline: none;
  border-color: var(--live-primary);
}

.join-error {
  color: #c44;
  font-size: 0.85rem;
  min-height: 1.2rem;
  text-align: center;
}

.join-error.ok { color: #2a7a4b; }

.server-hint {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  font-family: monospace;
  margin-bottom: 0.75rem;
}

.btn-sm { padding: 0.5rem; font-size: 0.85rem; margin-bottom: 0.75rem; }

.play-header {
  background: linear-gradient(135deg, var(--live-primary), #3a1515);
  color: #fff;
  padding: 1.25rem 1rem 1rem;
  text-align: center;
}

.play-room {
  font-family: monospace;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  opacity: 0.8;
}

.play-header h1 {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  margin: 0.25rem 0;
}

.play-phase {
  font-size: 0.85rem;
  opacity: 0.9;
}

.play-content {
  padding: 1rem;
  padding-bottom: 2rem;
  max-width: 480px;
  margin: 0 auto;
}

.char-card, .act-card, .reveal-card, .waiting-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}

.char-card h2 {
  color: var(--live-primary);
  font-family: Georgia, serif;
}

.character-dossier-header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.character-dossier-header:not(:has(.character-portrait)) {
  grid-template-columns: 1fr;
}

.character-portrait {
  display: block;
  width: 92px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 3px solid #f5ead8;
  border-radius: 7px;
  box-shadow: 0 5px 14px rgba(24, 14, 18, 0.24);
}

.character-dossier-label {
  margin: 0 0 0.2rem;
  color: #8a735c;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.character-dossier-header h2,
.character-dossier-header .char-role { margin: 0; }

.experience-scene,
.experience-reveal {
  margin: -1rem -1rem 1rem;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #17131a;
}

.experience-scene img,
.experience-reveal img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.experience-scene img { max-height: 240px; }
.experience-reveal img { max-height: 260px; }

.act-eyebrow {
  margin: 0 0 0.25rem;
  color: #777;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.act-card h3 { margin-bottom: 0.35rem; }
.act-card > p:last-child { color: #555; line-height: 1.45; }

.char-role { font-style: italic; color: #666; margin-bottom: 0.75rem; }

.char-costume { font-size: 0.85rem; margin-bottom: 0.75rem; }

.npc-cast-section { border-top: 3px solid #c9a227; }

.npc-cast-card {
  margin-bottom: 0.65rem;
  border: 1px solid #e6dcc9;
  border-radius: 9px;
  background: #fffdf8;
  overflow: hidden;
}

.npc-cast-card summary {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem;
  cursor: pointer;
  list-style: none;
}

.npc-cast-card summary::-webkit-details-marker { display: none; }
.npc-cast-card summary img,
.npc-avatar { width: 50px; height: 58px; border-radius: 5px; object-fit: cover; }
.npc-avatar { display: grid; place-items: center; background: #302635; color: #f3d88d; font-size: 0.65rem; font-weight: 800; }
.npc-cast-card summary span:last-child { min-width: 0; }
.npc-cast-card summary strong,
.npc-cast-card summary small { display: block; }
.npc-cast-card summary small { margin-top: 0.15rem; color: #756b70; font-size: 0.72rem; }
.npc-cast-card > p,
.npc-cast-card > .npc-cue,
.npc-cast-card > .npc-evidence { margin: 0 0.75rem 0.75rem; }
.npc-cast-card > p { color: #514a4e; font-size: 0.85rem; line-height: 1.45; }
.npc-cue { padding: 0.6rem; border-left: 3px solid #c9a227; background: #fbf4df; color: #3f3434; font-size: 0.83rem; }
.npc-cue span { display: block; margin-bottom: 0.2rem; color: #8a6b16; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.npc-evidence h3 { margin-bottom: 0.4rem; color: var(--live-primary); font-size: 0.78rem; text-transform: uppercase; }
.npc-shared-clue { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 0.55rem; margin-top: 0.45rem; }
.npc-shared-clue:not(:has(img)) { grid-template-columns: 1fr; }
.npc-shared-clue img { width: 58px; height: 58px; border-radius: 5px; object-fit: cover; }
.npc-shared-clue p { margin: 0.12rem 0 0; color: #5f565a; font-size: 0.78rem; }

.char-card details {
  margin-top: 0.75rem;
  border-top: 1px solid #eee;
  padding-top: 0.5rem;
}

.char-card summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--live-primary);
}

.killer-banner {
  background: var(--live-primary);
  color: #fff;
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.play-section h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.75rem;
}

.clue-item {
  background: #fff;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.6rem;
  border-left: 4px solid var(--live-secondary);
}

.clue-item.private { border-left-color: var(--live-primary); }

.clue-item.has-image {
  background: linear-gradient(180deg, #fffaf0 0%, #fff 45%);
}

.clue-image-wrap {
  margin: 0.45rem 0 0.45rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #1a1520;
  max-height: 220px;
}

.clue-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
}

.clue-image-caption {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-style: italic;
  color: #666;
}

.clue-badge {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #888;
  display: block;
  margin-bottom: 0.25rem;
}

.clue-item strong { display: block; margin-bottom: 0.25rem; }

.clue-item p { font-size: 0.9rem; color: #444; }

.puzzle-scenario {
  white-space: pre-line;
}

.accusation-form {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.accusation-form h3 {
  color: var(--live-primary);
  margin-bottom: 1rem;
}

.accusation-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.accusation-form select,
.accusation-form input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.submitted {
  text-align: center;
  color: var(--live-primary);
  font-weight: 600;
  padding: 1rem;
}

.reveal-card h2 { color: var(--live-primary); font-family: Georgia, serif; }

.reveal-script {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 1rem 0;
}

.reveal-facts { list-style: none; }

.reveal-facts li { padding: 0.35rem 0; border-top: 1px solid #eee; }

.verdict-list li {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.35rem;
  border-top: none;
}

.my-accusation-results {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px solid #eee;
}

.my-accusation-results h3 {
  color: var(--live-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.verdict-summary {
  text-align: center;
  font-weight: 600;
  margin-top: 0.75rem;
  color: var(--live-accent);
}

.verdict-summary.acc-perfect {
  color: #2e7d32;
  font-size: 1.05rem;
}

.muted { color: #888; font-style: italic; text-align: center; padding: 1rem; }

.act-card h3 { color: var(--live-primary); font-size: 0.95rem; }

/* Breaking news */
.breaking-news-panel .breaking-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.breaking-news-panel input,
.breaking-news-panel textarea,
.breaking-news-panel select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #3a3a4a;
  background: #0f0f14;
  color: var(--live-text);
  font-family: inherit;
}

.panel-hint {
  font-size: 0.8rem;
  color: var(--live-muted);
  margin-bottom: 0.75rem;
}

.host-wait-hint {
  color: #f0c060;
  margin-top: 0.5rem;
}

.host-player-warnings {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: #f5d98a;
}

.host-player-warnings-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #ffd978;
}

.host-player-warnings ul {
  margin: 0.35rem 0 0.5rem 1.1rem;
}

.host-player-warnings li + li {
  margin-top: 0.25rem;
}

.host-player-warnings-note {
  font-size: 0.78rem;
  color: var(--live-muted);
  margin: 0;
}

.news-history { max-height: 200px; overflow-y: auto; }

.news-item {
  border-left: 3px solid var(--live-secondary);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(0,0,0,0.2);
  font-size: 0.85rem;
}

.news-time { font-size: 0.7rem; color: var(--live-muted); }

.breaking-news-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #c9a227, #8B6914);
  color: #1a1a1a;
  padding: 0.85rem 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: newsPulse 0.5s ease;
}

@keyframes newsPulse {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.news-flash-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  font-weight: bold;
}

.news-flash strong { display: block; margin: 0.25rem 0; font-size: 1rem; }

.news-flash p { font-size: 0.9rem; margin: 0.25rem 0; }

.news-dismiss { font-size: 0.7rem; opacity: 0.7; }

.narration-controls {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: calc(100vw - 1.5rem);
}

.narration-voice-picker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  background: rgba(26, 26, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.narration-voice-picker.hidden {
  display: none;
}

.narration-voice-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--live-muted, #9aa0b0);
}

.narration-voice-select {
  max-width: min(220px, calc(100vw - 2rem));
  font-size: 0.78rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: var(--live-text, #f0f0f5);
}

.narration-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  background: rgba(26, 26, 36, 0.92);
  color: var(--live-text, #f0f0f5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.narration-toggle[aria-pressed="true"] {
  opacity: 0.85;
}

.narration-toggle.needs-unlock {
  animation: narrationPulse 1.4s ease infinite;
  border-color: var(--live-secondary, #c9a227);
}

@keyframes narrationPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(201, 162, 39, 0); }
}

.auto-host-guide-card {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.auto-host-guide-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--live-secondary, #c9a227);
}

.auto-host-next {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.auto-host-progress {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--live-muted, #9aa0b0);
}

.puzzle-hint-request {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Chat */
.chat-log {
  background: rgba(0,0,0,0.25);
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  padding: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.chat-log.tall { max-height: 280px; }

.chat-msg {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  line-height: 1.4;
}

.chat-msg.private { color: #b8c8e8; }
.chat-msg.system { color: var(--live-secondary); font-style: italic; }

.chat-from {
  font-weight: 600;
  color: var(--live-secondary);
  margin-right: 0.35rem;
}

.chat-compose {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chat-compose input,
.chat-compose select {
  flex: 1;
  min-width: 120px;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #3a3a4a;
  background: #0f0f14;
  color: var(--live-text);
}

.player-compose input { min-width: 0; }

.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.8rem; }

.player-chat .chat-msg { color: #333; }
.player-chat .chat-from { color: var(--live-primary); }
.player-chat .chat-msg.system { color: #666; }

.chat-section {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
}

/* Puzzles */
.puzzle-item {
  background: #fff;
  border: 1px solid rgba(92, 26, 26, 0.15);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.puzzle-item.locked {
  opacity: 0.75;
  background: #f8f4ec;
}

.puzzle-item.solved {
  border-color: #2d6a4f;
  background: #edf7f1;
}

.puzzle-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--live-primary);
  margin-bottom: 0.35rem;
}

.puzzle-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.puzzle-answer {
  flex: 1;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.puzzle-attempts {
  font-size: 0.8rem;
  color: #666;
  margin: 0.35rem 0 0;
}

.puzzle-feedback {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
}

.puzzle-table tr.locked td { color: var(--live-muted); }
.puzzle-table tr.done td { color: #7dcea0; }

#puzzles-host-panel.hidden { display: none; }

.clue-lock-tag {
  font-size: 0.7rem;
  color: var(--live-secondary);
  font-weight: 600;
}

.clue-cols li.puzzle-locked { opacity: 0.7; }

.puzzle-timer-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, #1a1a24, #2a1a1a);
  color: var(--live-secondary);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--live-secondary);
}

.puzzle-timer-banner.timer-paused { opacity: 0.85; }
.puzzle-timer-banner.timer-expired {
  background: linear-gradient(135deg, #3a1010, #1a1a24);
  color: #ffb4b4;
}

.puzzle-timer-banner .timer-label {
  margin-right: 0.35rem;
  font-weight: 600;
}

.puzzle-hint {
  background: #fff8e6;
  border-left: 3px solid var(--live-secondary);
  padding: 0.45rem 0.6rem;
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.puzzle-hint .hint-label {
  font-weight: 700;
  color: var(--live-primary);
  margin-right: 0.35rem;
}

.puzzle-timer-host {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid #2a2a3a;
}

.timer-host-label { color: var(--live-secondary); font-weight: 600; }
.timer-host-status { color: var(--live-muted); font-size: 0.85rem; }
.puzzle-timer-actions { margin: 0; }
.puzzle-action-cell { white-space: nowrap; }
.puzzle-action-cell .btn { margin: 0.15rem 0.1rem; }

.puzzle-win-progress {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--live-secondary);
}

.pack-style-panels {
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pack-style-badge,
.pack-style-runner-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--live-secondary);
  color: var(--live-secondary);
}

.pack-style-surreal { border-color: #9b7bd4; color: #c4b5fd; }
.pack-style-narrative { border-color: #6b9bd1; color: #93c5fd; }
.pack-style-school { border-color: #4caf50; color: #86efac; }
.pack-style-horror-lite { border-color: #8b3a3a; color: #fca5a5; }

.mood-profile-bar,
.motif-reminder-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mood-chip,
.motif-reminder,
.motif-chip-live {
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #3a3a4a;
}

.state-shift-banner,
.reveal-beat-live {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #4a3a6a;
  background: rgba(44, 22, 84, 0.35);
}

.puzzle-presentation,
.puzzle-meaning-note,
.puzzle-atmosphere {
  font-size: 0.9rem;
  color: var(--live-muted);
  margin: 0.35rem 0;
}

.puzzle-recontext,
.recontext-block {
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--live-secondary);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.88rem;
}

.recontext-before span,
.recontext-after span {
  font-weight: 700;
  color: var(--live-secondary);
}

.scan-loc-item.optional-discovery { border-style: dashed; }
.optional-badge {
  font-size: 0.68rem;
  margin-left: 0.35rem;
  color: var(--live-secondary);
}

.discovery-effect {
  font-style: italic;
  color: #c4b5fd;
  margin: 0.25rem 0 0;
}

.victory-card {
  background: linear-gradient(135deg, #1a2a1a, #2a2210);
  border: 2px solid var(--live-secondary);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.victory-card h2,
.victory-card h3 {
  color: var(--live-secondary);
  margin: 0 0 0.65rem;
}

.victory-message {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}

.victory-score {
  font-weight: 700;
  color: #9ae6b4;
  margin: 0.5rem 0;
}

.victory-meta,
.victory-sub {
  color: var(--live-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0;
}

.player-victory {
  background: linear-gradient(135deg, #edf7ed, #faf3e0);
  border-color: var(--live-primary);
  color: #222;
  margin-bottom: 1rem;
}

.player-victory h2 { color: var(--live-primary); }
.player-victory .victory-score { color: #276749; }

#victory-host-panel.hidden { display: none; }

.host-actions .btn.hidden { display: none; }

/* QR scan locations */
.scan-progress,
.scan-progress-host {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--live-secondary);
}

.scan-loc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.scan-loc-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2a2a3a;
  background: rgba(0, 0, 0, 0.2);
}

.scan-loc-item.discovered {
  border-color: #276749;
  background: rgba(39, 103, 73, 0.15);
}

.scan-loc-badge {
  font-weight: 700;
  color: var(--live-secondary);
  min-width: 1.25rem;
}

.scan-host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.scan-host-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.scan-host-card.discovered {
  border-color: #276749;
}

.scan-qr-thumb {
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
}

.scan-host-meta strong { display: block; margin-bottom: 0.25rem; }
.scan-token code {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.scan-status {
  font-size: 0.85rem;
  margin: 0.35rem 0;
  color: var(--live-muted);
}

.scan-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scan-modal.hidden { display: none; }

.scan-modal-card {
  width: min(100%, 22rem);
  background: var(--live-surface, #1e1e28);
  border: 2px solid var(--live-secondary);
  border-radius: 12px;
  padding: 1rem;
}

.scan-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.scan-modal-header h3 {
  margin: 0;
  color: var(--live-secondary);
}

.scan-close {
  background: none;
  border: none;
  color: var(--live-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.scan-camera {
  min-height: 220px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.scan-video {
  width: 100%;
  height: auto;
  display: block;
}

.scan-hint {
  font-size: 0.85rem;
  color: var(--live-muted);
  margin: 0 0 0.65rem;
  text-align: center;
}

.scan-manual {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.scan-manual input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #3a3a4a;
  background: #12121a;
  color: inherit;
}

.scan-modal-error {
  color: #fc8181;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: center;
}

.scan-modal-error.hidden { display: none; }

#scan-host-panel.hidden { display: none; }

.host-format-banner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 2px solid var(--live-secondary);
  background: rgba(0, 0, 0, 0.25);
}

.host-format-banner.hidden { display: none; }

.host-format-banner .play-format-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.host-format-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--live-secondary);
}

.host-format-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--live-muted);
  line-height: 1.45;
}

.host-format-banner.format-print-only {
  border-color: #c9a227;
}

.host-format-banner.format-online-only {
  border-color: #63b3ed;
}

.host-format-banner.format-print-and-live {
  border-color: #68d391;
}

/* Player decor panel */
.decor-panel {
  margin-bottom: 1rem;
}

.decor-panel-inner {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 2px solid var(--live-secondary);
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.35), rgba(139, 0, 0, 0.15));
  font-family: var(--live-font-display, Georgia, serif);
}

.decor-banner {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  color: var(--live-secondary);
  text-align: center;
  letter-spacing: 0.04em;
}

.decor-lines {
  text-align: center;
  margin: 0.5rem 0;
}

.decor-line {
  margin: 0.35rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--live-text);
  letter-spacing: 0.06em;
}

.decor-line-2 {
  font-size: 1.1rem;
  color: var(--live-secondary);
}

.decor-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.decor-asset {
  margin: 0;
  max-width: 140px;
  text-align: center;
}

.decor-asset img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.decor-asset figcaption {
  font-size: 0.7rem;
  color: var(--live-muted);
  margin-top: 0.25rem;
}

.decor-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--live-muted);
  text-align: center;
}

/* Accusation polish */
.accusation-phase-banner {
  margin-bottom: 1rem;
}

.accusation-banner-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 2px solid #c9a227;
  background: rgba(201, 162, 39, 0.15);
}

.accusation-phase-banner.accusation-urgent .accusation-banner-inner {
  border-color: #fc8181;
  background: rgba(252, 129, 129, 0.12);
  animation: pulse-urgent 1.2s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.accusation-banner-icon {
  font-size: 1.5rem;
}

.accusation-wizard {
  padding: 1rem;
  background: #f7f7fb;
  color: #171723;
  border-radius: 12px;
  border: 1px solid #d4d4df;
}

.accusation-wizard h3,
.accusation-wizard label {
  color: #171723;
}

.accusation-steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.acc-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a4a;
}

.acc-step-dot.active {
  background: var(--live-secondary);
  transform: scale(1.2);
}

.acc-step-dot.done {
  background: #68d391;
}

.accusation-cards {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.accusation-card {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 2px solid #8c8c9f;
  background: #fff;
  color: #171723;
  cursor: pointer;
}

.accusation-card:hover,
.accusation-card:focus-visible {
  border-color: #725b00;
  background: #fff9df;
  outline: 3px solid rgba(201, 162, 39, 0.35);
  outline-offset: 1px;
}

.accusation-card.selected {
  border-color: #725b00;
  background: #fff0ad;
  color: #111;
}

.acc-card-sub {
  display: block;
  font-size: 0.8rem;
  color: #4a4a5e;
  margin-top: 0.2rem;
}

.accusation-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.accusation-submitted-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid #68d391;
  background: rgba(104, 211, 145, 0.1);
}

.accusation-submitted-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.reveal-dramatic {
  animation: reveal-in 0.6s ease-out;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--live-secondary);
  margin: 0 0 0.5rem;
}

.reveal-answer-key li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reveal-perfect {
  border-color: #68d391;
}

/* Host automated + accusation progress */
.auto-host-banner {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 2px solid #63b3ed;
  background: rgba(99, 179, 237, 0.12);
}

.auto-host-banner.hidden {
  display: none;
}

.auto-host-schedule {
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(106, 190, 255, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  color: #eef8ff;
}

.auto-host-schedule > span {
  color: #8fd0ff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#auto-host-countdown { color: #f0c060; white-space: nowrap; }

.auto-host-pace-label {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.5rem;
  color: #c7d7e3;
  font-size: 0.75rem;
}

.auto-host-pace-label select {
  padding: 0.35rem 0.45rem;
  border: 1px solid #476378;
  border-radius: 5px;
  background: #101923;
  color: #fff;
}

.accusation-progress {
  height: 8px;
  background: #2a2a3a;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.accusation-progress-bar {
  height: 100%;
  background: var(--live-secondary);
  transition: width 0.3s ease;
}

.accusation-progress-label {
  font-size: 0.85rem;
  color: var(--live-muted);
  margin: 0 0 0.75rem;
}

.npc-vote-note {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #63b3ed;
  background: rgba(99, 179, 237, 0.1);
  color: #ddecf7;
  font-size: 0.82rem;
  line-height: 1.45;
}

.accusation-awaiting td {
  color: var(--live-muted);
  font-style: italic;
}

.auto-host-toggle {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-align: left;
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid #3a3a4a;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--live-muted);
  cursor: pointer;
}
