@font-face {
  font-family: 'Silkscreen';
  src: url('/public/fonts/Silkscreen-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PressStart2P';
  src: url('/public/fonts/PressStart2P-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070B18;
  --bg-elevated: #0E152B;
  --bg-card: #0E152B;
  --bg-card-hover: #131D3A;
  --bg-deep: #050812;

  --gold: #FACC15;
  --gold-soft: #FEF08A;
  --gold-deep: #CA8A04;
  --gold-rgb: 250, 204, 21;

  --nordar: #60A5FA;
  --vesper: #FACC15;
  --rubra: #EF4444;
  --morven: #34D399;

  --text: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #8FA0BC;
  --text-dim: #64748B;

  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --border-gold: rgba(250, 204, 21, 0.42);

  --font-pixel: 'Silkscreen', 'Courier New', monospace;
  --font-retro: 'PressStart2P', 'Silkscreen', monospace;
  --font-body: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

.pixel-art {
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ==========================================================================
   Ambient Background Layers
   ========================================================================== */
#ember-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(250, 204, 21, 0.055), transparent 65%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(7, 11, 24, 0.85), transparent 70%);
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 11, 24, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(250, 204, 21, 0.14);
}

.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  transition: opacity 150ms var(--ease);
}

.brand:hover {
  opacity: 0.92;
}

.brand-crest {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: #0B1224;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.brand-sub {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
}

.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
}

.nav-link-gold {
  color: var(--gold-soft);
}

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

.yt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #DC2626;
  box-shadow: 0 0 0 2px rgba(7, 11, 24, 0.45);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 24, 0.98);
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-link {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.mobile-nav-link.is-active {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  border-color: rgba(250, 204, 21, 0.25);
}

.mobile-nav-gold {
  color: var(--gold-soft);
}

.mobile-sub-btn {
  margin-top: 8px;
  justify-content: center;
}

/* ==========================================================================
   Buttons & Reusable Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition:
    transform 120ms var(--ease),
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    color 160ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  font-size: 0.72rem;
  padding: 8px 14px;
}

.btn-lg {
  font-size: 0.9rem;
  padding: 14px 26px;
}

.btn-gold {
  background: linear-gradient(180deg, #FDE047 0%, #FACC15 65%, #EAB308 100%);
  color: #090D18;
  border-color: #FEF08A;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 18px rgba(250, 204, 21, 0.24);
}

.btn-gold:hover {
  background: linear-gradient(180deg, #FEF08A 0%, #FDE047 65%, #FACC15 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 6px 24px rgba(250, 204, 21, 0.36);
}

.btn-ghost {
  background: rgba(14, 21, 43, 0.75);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(25, 37, 72, 0.85);
  border-color: rgba(250, 204, 21, 0.5);
  color: var(--gold-soft);
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-subtle.is-active {
  background: rgba(250, 204, 21, 0.14);
  color: var(--gold);
  border-color: var(--border-gold);
}

.btn-crimson {
  background: linear-gradient(180deg, #DC2626 0%, #991B1B 100%);
  color: #FEF2F2;
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.28);
}

.btn-crimson:hover {
  background: linear-gradient(180deg, #EF4444 0%, #B91C1C 100%);
}

/* ==========================================================================
   Layout & Typography Helpers
   ========================================================================== */
.app-main {
  position: relative;
  z-index: 2;
  flex: 1;
  outline: none;
}

.view-enter {
  animation: viewFadeIn 220ms var(--ease) both;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section-tight {
  padding: 36px 0;
}

.page-header {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pixel-heading {
  font-family: var(--font-pixel);
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text);
}

.page-title {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.section-title {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-lead {
  color: var(--text-muted);
  max-width: 64ch;
  margin: 0;
  font-size: 0.98rem;
}

.inline-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.pixel-frame {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 32px rgba(3, 6, 16, 0.55);
}

.pixel-frame-gold {
  border-color: var(--border-gold);
  box-shadow:
    inset 0 1px 0 rgba(250, 204, 21, 0.2),
    0 12px 34px rgba(3, 6, 16, 0.6),
    0 0 28px rgba(250, 204, 21, 0.07);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: rgba(7, 11, 24, 0.72);
  color: var(--text-secondary);
}

.badge-gold {
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.1);
}

.badge-red {
  color: #FCA5A5;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.14);
}

/* ==========================================================================
   HOME — Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(250, 204, 21, 0.16);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  filter: brightness(0.46) contrast(1.06) saturate(1.05);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 24, 0.52) 0%, rgba(7, 11, 24, 0.42) 45%, rgba(7, 11, 24, 0.96) 100%),
    radial-gradient(circle at 50% 35%, rgba(250, 204, 21, 0.08), transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 68px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-crest-wrap {
  position: relative;
  width: 124px;
  height: 124px;
  margin-bottom: 22px;
  border-radius: 50%;
  padding: 4px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.25) 0%, rgba(7, 11, 24, 0.85) 72%);
  border: 2px solid rgba(250, 204, 21, 0.55);
  box-shadow:
    0 0 36px rgba(250, 204, 21, 0.24),
    0 12px 32px rgba(0, 0, 0, 0.7);
}

.hero-crest {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  background: rgba(7, 11, 24, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 5px 14px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.85rem, 4.4vw, 3.25rem);
  line-height: 1.12;
  margin: 0 0 16px;
  max-width: 18ch;
  color: #FFFBEB;
  text-shadow:
    0 3px 0 rgba(7, 11, 24, 0.95),
    0 10px 30px rgba(0, 0, 0, 0.75);
}

.hero-title span {
  color: var(--gold);
}

.hero-subtitle {
  max-width: 58ch;
  margin: 0 0 28px;
  font-size: 1.06rem;
  color: #E2E8F0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-metrics {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 680px;
}

.metric-pill {
  background: rgba(14, 21, 43, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}

.metric-val {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   HOME — Live House Scoreboard
   ========================================================================== */
.scoreboard-card {
  padding: 28px;
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.house-score-row {
  position: relative;
  background: rgba(7, 11, 24, 0.62);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}

.house-score-row:hover {
  border-color: var(--house-color, var(--border-strong));
  transform: translateY(-2px);
}

.house-score-row.is-leader {
  border-color: rgba(250, 204, 21, 0.45);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.06), rgba(7, 11, 24, 0.78));
}

.house-score-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.house-crest-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: #070B18;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.house-score-info {
  flex: 1;
  min-width: 0;
}

.house-score-name {
  font-family: var(--font-pixel);
  font-size: 0.98rem;
  color: var(--house-color, var(--text));
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.leader-pill {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(250, 204, 21, 0.16);
  color: var(--gold);
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.house-score-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.house-score-numbers {
  text-align: right;
  flex-shrink: 0;
}

.house-power-num {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.1;
}

.house-juror-num {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.score-bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.score-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--house-color, var(--gold));
  box-shadow: 0 0 14px var(--house-color, var(--gold));
  transition: width 700ms var(--ease);
}

.house-score-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.house-motto-inline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
}

.house-join-link {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--house-color, var(--gold));
  white-space: nowrap;
}

.house-join-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   HOME — Episode 1 Spotlight
   ========================================================================== */
.ep1-spotlight {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 28px;
  padding: 24px;
  align-items: center;
}

.ep1-poster {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.35);
  aspect-ratio: 9 / 12;
  background: #050812;
}

.ep1-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.ep1-poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.ep1-poster-play {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: rgba(7, 11, 24, 0.86);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ep1-body h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.ep1-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.06rem;
  color: #E2E8F0;
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 16px;
  margin: 16px 0;
}

.ep1-house-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.ep1-house-pill {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 24, 0.65);
  color: var(--text-secondary);
}

.ep1-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   HOME — Unanswered Mysteries (4 cards)
   ========================================================================== */
.mysteries-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mystery-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}

.mystery-card:hover {
  transform: translateY(-3px);
  border-color: var(--mystery-accent, var(--gold));
}

.mystery-thumb {
  position: relative;
  height: 148px;
  overflow: hidden;
  background: #050812;
  border-bottom: 1px solid var(--border);
}

.mystery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.76);
  transition: transform 280ms var(--ease), filter 200ms var(--ease);
}

.mystery-card:hover .mystery-thumb img {
  transform: scale(1.04);
  filter: brightness(0.92);
}

.mystery-icon-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 24, 0.88);
  border: 1px solid var(--mystery-accent, var(--gold));
  color: var(--mystery-accent, var(--gold));
  display: grid;
  place-items: center;
}

.mystery-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(7, 11, 24, 0.88);
  color: var(--mystery-accent, var(--gold));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.mystery-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.mystery-title {
  font-family: var(--font-pixel);
  font-size: 0.92rem;
  line-height: 1.25;
  margin: 0;
  color: var(--text);
}

.mystery-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.mystery-clue {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.mystery-link {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--gold);
  margin-top: 4px;
}

/* ==========================================================================
   MAP PAGE (/mapa)
   ========================================================================== */
.map-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot-region {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
}

.legend-dot-mystery {
  background: #EF4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.75);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(320px, 470px) 1fr;
  gap: 28px;
  align-items: start;
}

.map-board {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(250, 204, 21, 0.36);
  background: #050812;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
}

.map-image {
  width: 100%;
  height: auto;
  display: block;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #070B18;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
  padding: 0;
  z-index: 3;
}

.map-pin:hover {
  transform: translate(-50%, -50%) scale(1.16);
  z-index: 6;
}

.map-pin.is-selected {
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 7;
}

.map-pin-region {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--pin-color, var(--gold));
  color: #070B18;
  box-shadow:
    0 0 0 2px rgba(7, 11, 24, 0.85),
    0 0 16px var(--pin-color, var(--gold));
  font-family: var(--font-pixel);
  font-size: 0.72rem;
}

.map-pin-region.is-selected {
  box-shadow:
    0 0 0 3px #FFFBEB,
    0 0 24px var(--pin-color, var(--gold));
}

.map-pin-mystery {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #DC2626;
  color: #FFFBEB;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  border: 2px solid #FCA5A5;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
  animation: mysteryPulse 2.4s ease-in-out infinite;
}

.map-pin-mystery.is-selected {
  box-shadow:
    0 0 0 3px #FFFBEB,
    0 0 24px rgba(239, 68, 68, 0.95);
}

@keyframes mysteryPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7), 0 0 14px rgba(239, 68, 68, 0.85);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0), 0 0 20px rgba(239, 68, 68, 0.95);
  }
}

.map-pin-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  background: rgba(7, 11, 24, 0.92);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

.map-pin-label-right {
  left: auto;
  right: -6px;
  transform: none;
}

.map-pin-label-left {
  left: -6px;
  transform: none;
}

.map-dossier {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dossier-art-wrap {
  position: relative;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #050812;
}

.dossier-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.dossier-art-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 11, 24, 0.92) 100%);
}

.dossier-art-badges {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dossier-title {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.dossier-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.dossier-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.dossier-rumor {
  background: rgba(7, 11, 24, 0.7);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.dossier-rumor strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--gold);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

.dossier-episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-quick-list {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-loc-btn {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 24, 0.65);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background-color 150ms var(--ease);
}

.quick-loc-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.quick-loc-btn.is-active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(250, 204, 21, 0.1);
}

.quick-loc-btn.is-mystery {
  border-color: rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.quick-loc-btn.is-mystery.is-active {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.18);
  color: #FEF2F2;
}

/* ==========================================================================
   RESIDENTS & CHARACTER CREATOR (/moradores)
   ========================================================================== */
.council-section {
  margin-bottom: 42px;
}

.council-banner {
  padding: 24px;
  background:
    radial-gradient(ellipse 65% 75% at 50% 0%, rgba(250, 204, 21, 0.11), transparent 70%),
    var(--bg-card);
}

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

.council-card {
  position: relative;
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.08) 0%, rgba(7, 11, 24, 0.92) 48%);
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow:
    inset 0 1px 0 rgba(254, 240, 138, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.council-crown-tag {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #090D18;
  background: linear-gradient(90deg, #FDE047, #FACC15);
  padding: 3px 9px;
  border-radius: 3px;
}

.sprite-pedestal {
  width: 108px;
  height: 124px;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(ellipse 65% 24% at 50% 88%, rgba(250, 204, 21, 0.16), transparent 72%),
    #070B18;
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  place-items: center;
}

.council-card .sprite-pedestal {
  border-color: rgba(250, 204, 21, 0.38);
}

.resident-name {
  font-family: var(--font-pixel);
  font-size: 0.92rem;
  color: var(--text);
  margin: 2px 0 0;
}

.resident-handle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.resident-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.house-chip {
  font-family: var(--font-pixel);
  font-size: 0.64rem;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(7, 11, 24, 0.85);
  border: 1px solid var(--house-color, var(--border));
  color: var(--house-color, var(--text));
}

.role-chip {
  font-family: var(--font-pixel);
  font-size: 0.64rem;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.resident-oath {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Character Creator Studio */
.creator-card {
  padding: 26px;
  margin-bottom: 44px;
}

.creator-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 28px;
  align-items: start;
}

.creator-stage {
  background:
    radial-gradient(ellipse 70% 55% at 50% 62%, rgba(250, 204, 21, 0.1), transparent 72%),
    linear-gradient(180deg, #090F22 0%, #050812 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 86px;
}

.stage-house-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.stage-house-name {
  font-family: var(--font-pixel);
  font-size: 0.88rem;
}

.stage-canvas-frame {
  position: relative;
  width: 240px;
  height: 264px;
  border-radius: var(--radius-md);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.025) 0% 25%, transparent 0% 50%) 50% / 16px 16px,
    radial-gradient(ellipse 60% 22% at 50% 88%, rgba(250, 204, 21, 0.2), transparent 70%),
    #070B18;
  border: 1px solid rgba(250, 204, 21, 0.28);
  display: grid;
  place-items: center;
}

.stage-toolbar {
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr;
  gap: 6px;
}

.stage-toolbar .btn {
  padding: 8px 6px;
  font-size: 0.64rem;
  gap: 5px;
}

.stage-summary {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.creator-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section-label {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.house-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.house-option {
  background: rgba(7, 11, 24, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), transform 120ms var(--ease);
}

.house-option:hover {
  border-color: var(--house-color);
  background: rgba(19, 29, 58, 0.7);
}

.house-option.is-selected {
  border-color: var(--house-color);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 16px rgba(var(--house-rgb), 0.22);
}

.house-option-title {
  font-family: var(--font-pixel);
  font-size: 0.74rem;
  color: var(--house-color);
}

.house-option-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.role-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.role-tiers-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demography-strip {
  background: rgba(7, 11, 24, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demography-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.demography-bar {
  display: flex;
  height: 8px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.demography-seg {
  height: 100%;
  transition: width 320ms var(--ease);
}

.demography-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.role-tier-group {
  background: rgba(7, 11, 24, 0.45);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tier-color, var(--border-strong));
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.role-tier-title {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--tier-color, var(--text));
  letter-spacing: 0.05em;
}

.role-tier-meta {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--text-muted);
}

.role-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.role-option {
  background: rgba(7, 11, 24, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 8px;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  transition: border-color 150ms var(--ease), color 150ms var(--ease), background-color 150ms var(--ease);
}

.role-option:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.role-option.is-selected {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.12);
  color: var(--gold);
}

.role-option.is-full {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.07);
}

.role-option.is-full.is-selected {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.16);
  color: #FCA5A5;
}

.role-quota-pill {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-quota-pill.is-unlimited {
  color: #6EE7B7;
  background: rgba(52, 211, 153, 0.12);
}

.role-quota-pill.is-limited {
  color: #FDE047;
  background: rgba(250, 204, 21, 0.12);
}

.role-quota-pill.is-full {
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.18);
}

.role-quota-pill.is-priority {
  color: #090D18;
  background: linear-gradient(90deg, #FDE047, #FACC15);
}

.quota-alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 24, 0.65);
  color: var(--text-secondary);
}

.quota-alert.is-full {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(127, 29, 29, 0.22);
  color: #FECACA;
}

.quota-alert.is-priority {
  border-color: rgba(250, 204, 21, 0.55);
  background: rgba(250, 204, 21, 0.09);
  color: #FEF08A;
}

.quota-alert-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.waitlist-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}

.waitlist-chip {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #FCA5A5;
}

/* Live Modular Village Card (/mapa) */
.village-panel {
  margin-top: 28px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.village-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.village-canvas-shell {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(250, 204, 21, 0.32);
  background: #050812;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.village-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.village-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.village-stats-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.village-search-wrap {
  min-width: 240px;
  flex: 0 1 320px;
}

.village-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.village-camera-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.village-explorer-shell {
  max-width: 840px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  touch-action: none;
  user-select: none;
}

.yt-join-banner {
  padding: 24px;
}

.village-tooltip {
  position: absolute;
  z-index: 15;
  width: min(310px, calc(100% - 20px));
  background: rgba(7, 11, 24, 0.96);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(250, 204, 21, 0.2);
  pointer-events: none;
}

.vt-layout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vt-portrait-box {
  flex: 0 0 54px;
  height: 68px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: radial-gradient(circle at 50% 78%, rgba(250, 204, 21, 0.16), #050812);
  display: grid;
  place-items: center;
}

.vt-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.vt-name {
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  line-height: 1.2;
}

.vt-role {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
}

.vt-role span {
  color: var(--gold-soft);
}

.vt-handle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.vt-district {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.vt-oath {
  margin-top: 4px;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Conselho de Guerra · Urna Oficial do Episódio 2 */
.war-council-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.war-council-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.war-council-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.poll-option-card {
  width: 100%;
  text-align: left;
  background: rgba(7, 11, 24, 0.78);
  border: 1px solid var(--border);
  border-left: 3px solid var(--house-color, var(--gold));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), background-color 140ms var(--ease);
}

.poll-option-card:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--house-color, var(--gold));
  background: rgba(19, 29, 58, 0.85);
}

.poll-option-card.is-voted {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.16);
}

.poll-option-card.is-locked {
  cursor: default;
}

.poll-opt-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.poll-opt-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.35;
}

.poll-risk-tag {
  font-size: 0.76rem;
  color: #FCA5A5;
  line-height: 1.35;
}

.poll-bar-track {
  width: 100%;
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 2px;
}

.poll-bar-fill {
  height: 100%;
  background: var(--house-color, var(--gold));
  transition: width 360ms var(--ease);
}

.poll-meta-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  color: var(--text-muted);
}

.poll-meta-row strong {
  color: var(--house-color, var(--gold));
}

.war-council-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.appearance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.control-label {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.seg-btn {
  flex: 1;
  min-width: 70px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(7, 11, 24, 0.72);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 140ms var(--ease), color 140ms var(--ease), background-color 140ms var(--ease);
}

.seg-btn.is-selected {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.14);
  color: var(--gold);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  padding: 0;
  transition: transform 120ms var(--ease), border-color 120ms var(--ease);
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #070B18, 0 0 12px rgba(250, 204, 21, 0.7);
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: #070B18;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--text);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.14);
}

.field-textarea {
  resize: vertical;
  min-height: 112px;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.council-code-box {
  background: rgba(250, 204, 21, 0.05);
  border: 1px dashed rgba(250, 204, 21, 0.35);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.council-code-feedback {
  font-size: 0.8rem;
  min-height: 1.25em;
}

.council-code-feedback.is-valid {
  color: #34D399;
}

.council-code-feedback.is-invalid {
  color: #FCA5A5;
}

/* Mural Gallery */
.mural-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 7px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 140ms var(--ease);
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-pill.is-active {
  border-color: var(--pill-color, var(--gold));
  color: var(--pill-color, var(--gold));
  background: rgba(250, 204, 21, 0.08);
}

.mural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.resident-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}

.resident-card:hover {
  transform: translateY(-2px);
  border-color: var(--house-color, var(--border-strong));
}

.resident-card.is-council {
  border-color: rgba(250, 204, 21, 0.5);
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.06), var(--bg-card) 50%);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   CRÔNICAS PAGE (/lore)
   ========================================================================== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-left: 26px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(250, 204, 21, 0.25) 70%, rgba(239, 68, 68, 0.45));
}

.timeline-chapter {
  position: relative;
  padding: 26px;
}

.timeline-node {
  position: absolute;
  left: -26px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.7);
}

.timeline-node-red {
  background: #EF4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.75);
}

.prologue-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  align-items: center;
}

.chronicle-prose p {
  color: var(--text-secondary);
  margin: 0 0 14px;
  font-size: 0.98rem;
}

.chronicle-prose p:last-child {
  margin-bottom: 0;
}

.ep1-scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.scene-card {
  background: #070B18;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scene-img-wrap {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.scene-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  background: rgba(7, 11, 24, 0.88);
  color: var(--gold);
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.scene-body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-badge {
  font-family: var(--font-pixel);
  font-size: 0.66rem;
}

.scene-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
}

.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.outcome-card {
  background: rgba(7, 11, 24, 0.72);
  border: 1px solid var(--border);
  border-left: 3px solid var(--house-color);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}

.outcome-card.is-leading {
  border-color: var(--house-color);
  background: rgba(250, 204, 21, 0.05);
}

.outcome-head {
  font-family: var(--font-pixel);
  font-size: 0.74rem;
  color: var(--house-color);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.outcome-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   RAVEN PAGE (/corvo) — Wax-Sealed Letter Form
   ========================================================================== */
.raven-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: start;
}

.parchment-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(30, 24, 18, 0.96) 0%, rgba(20, 17, 14, 0.98) 100%);
  border: 2px solid rgba(217, 169, 78, 0.45);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow:
    inset 0 0 48px rgba(0, 0, 0, 0.5),
    0 18px 40px rgba(0, 0, 0, 0.6);
}

.parchment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px dashed rgba(217, 169, 78, 0.32);
}

.wax-seal-emblem {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #EF4444, #991B1B 68%, #450A0A 100%);
  border: 3px solid rgba(254, 202, 202, 0.35);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.25),
    0 4px 14px rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 0.88rem;
  color: #FEF2F2;
  flex-shrink: 0;
  transition: transform 200ms var(--ease), background 200ms var(--ease);
}

.wax-seal-emblem.is-stamping {
  transform: scale(1.16) rotate(-8deg);
}

.raven-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.raven-form .field-input,
.raven-form .field-select,
.raven-form .field-textarea {
  background: rgba(9, 10, 14, 0.72);
  border-color: rgba(217, 169, 78, 0.32);
}

.raven-form .field-input:focus,
.raven-form .field-select:focus,
.raven-form .field-textarea:focus {
  border-color: var(--gold);
}

.raven-archive {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.raven-art-mini {
  height: 136px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.raven-art-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
}

.raven-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 4px;
}

.raven-item {
  background: rgba(7, 11, 24, 0.76);
  border: 1px solid var(--border);
  border-left: 3px solid var(--house-color, var(--gold));
  border-radius: var(--radius-sm);
  padding: 13px;
}

.raven-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.raven-item-subject {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--text);
  margin: 0 0 6px;
}

.raven-item-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.raven-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* ==========================================================================
   SUPPORT PAGE (/apoie)
   ========================================================================== */
.support-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 36px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.tier-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tier-price {
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--gold);
}

.tier-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.tier-check {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-badge {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--gold);
}

.code-demo-strip {
  margin-top: 28px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.code-pill {
  font-family: var(--font-pixel);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: #070B18;
  border: 1px solid var(--border-gold);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Modal & Toasts & Footer
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 6, 16, 0.8);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  padding: 28px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-lead {
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.rules-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rules-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  background: rgba(7, 11, 24, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.step-num {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--gold);
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 3px;
  height: 32px;
  display: grid;
  place-items: center;
}

.rules-steps strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 4px;
}

.rules-steps p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: #0E152B;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.88rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  animation: toastIn 200ms var(--ease) both;
}

.toast strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.74rem;
  color: var(--gold);
  margin-bottom: 2px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.92);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.footer-title {
  font-family: var(--font-pixel);
  font-size: 0.84rem;
  color: var(--gold);
}

.footer-tagline {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-yt {
  color: var(--gold-soft);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
.raven-layout > *,
.support-hero-grid > *,
.tier-grid > *,
.map-layout > *,
.creator-grid > *,
.scoreboard-grid > *,
.ep1-spotlight > *,
.steps-grid > *,
.outcomes-grid > *,
.prologue-grid > *,
.mysteries-grid > *,
.council-grid > *,
.mural-grid > *,
.appearance-grid > *,
.identity-grid > *,
.ep1-scenes-grid > * {
  min-width: 0;
}

.pixel-heading,
.dossier-title,
.raven-item-subject,
.resident-name {
  overflow-wrap: break-word;
}

.stage-canvas-frame {
  max-width: 100%;
}

.map-board {
  width: 100%;
}

@media (max-width: 1040px) {
  .mysteries-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .creator-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .creator-stage {
    position: static;
  }
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .map-board {
    max-width: 480px;
    margin: 0 auto;
  }
  .support-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .main-nav,
  .subscribe-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .scoreboard-grid,
  .war-council-grid,
  .ep1-spotlight,
  .raven-layout,
  .tier-grid,
  .steps-grid,
  .outcomes-grid,
  .prologue-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ep1-poster {
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
  }
  .role-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .house-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
    line-height: 1.25;
  }
  .btn-lg {
    font-size: 0.76rem;
    padding: 12px 14px;
  }
  .btn-sm {
    font-size: 0.68rem;
    padding: 8px 11px;
  }
  .badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
  }
  .hero-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .mysteries-grid,
  .appearance-grid,
  .identity-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .council-grid,
  .mural-grid,
  .ep1-scenes-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .scoreboard-card,
  .creator-card,
  .parchment-card,
  .timeline-chapter,
  .map-dossier,
  .council-banner,
  .tier-card,
  .code-demo-strip,
  .village-panel,
  .war-council-card {
    padding: 16px;
  }
  .village-search-wrap {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .role-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .creator-stage {
    padding: 14px;
  }
  .stage-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stage-toolbar .btn {
    font-size: 0.58rem;
    padding: 8px 4px;
    gap: 4px;
  }
  .house-score-top {
    flex-wrap: wrap;
  }
  .house-score-numbers {
    text-align: left;
  }
  .parchment-header {
    flex-wrap: wrap;
  }
  .timeline {
    padding-left: 20px;
  }
  .timeline-node {
    left: -20px;
  }
  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
