/* Read Achilles Game Studio (https://readachilles.app)
   Design System: Gold-on-Obsidian Greek · Riot-Style Viewport Cadence · HoYoLAB-Style Agora Feed
   Rule: Gold is the single accent and means "act" — primary CTAs and active states only. */

:root {
  --bg-obsidian: #060a12;
  --bg-elevated: #0b1220;
  --bg-card: #0f192b;
  --bg-card-hover: #152238;
  --bg-input: #09101c;
  --bg-header: rgba(6, 10, 18, 0.9);

  --gold: #c89838;
  --gold-bright: #e7ba58;
  --gold-deep: #9e7320;
  --gold-tint: rgba(200, 152, 56, 0.14);
  --gold-ink: #070b12;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8b9bb4;

  --border-hairline: rgba(226, 232, 240, 0.1);
  --border-strong: rgba(226, 232, 240, 0.2);
  --border-gold: rgba(231, 186, 88, 0.65);

  --serif: "Newsreader", Georgia, serif;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-h: 64px;
  --container-max: 1360px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-deep: 0 24px 56px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 14px 34px rgba(2, 6, 16, 0.48);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg-obsidian);
  color: var(--text-primary);
}

body {
  font-family: var(--sans);
  background: var(--bg-obsidian);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.studio-container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
}

.royale-spotlight-grid > *,
.news-editorial-grid > *,
.civ-tree-shell > *,
.community-teaser-grid > *,
.game-hero-inner > *,
.game-modes-model-grid > *,
.agora-shell > *,
.dashboard-two-col > * {
  min-width: 0;
}

/* =========================================================
   BUTTONS — Gold Strictly Reserved for Primary Action
   ========================================================= */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 65%, var(--gold-deep) 100%);
  color: var(--gold-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 236, 179, 0.45);
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 8px 26px rgba(200, 152, 56, 0.25);
  white-space: nowrap;
}

.btn-gold:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(200, 152, 56, 0.36);
}

.btn-gold:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.btn-gold-sm {
  padding: 9px 18px;
  font-size: 12.5px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(15, 25, 43, 0.78);
  color: var(--text-primary);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   1. SLIM STICKY HEADER (64px, No Ticker, No Theme Toggle)
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-h);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
}

.site-header-inner {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.studio-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

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

.studio-brand-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

.studio-brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.primary-nav-link {
  position: relative;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 20px 14px;
  transition: color 0.16s ease;
}

.primary-nav-link:hover {
  color: var(--text-primary);
}

.primary-nav-link.is-active {
  color: var(--gold-bright);
}

.primary-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--gold-bright);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Header Search */
.header-search-wrap {
  position: relative;
  width: 220px;
}

.header-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  transition: border-color 0.16s ease;
}

.header-search-box:focus-within {
  border-color: var(--border-gold);
}

.header-search-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.header-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
}

.header-search-input::placeholder {
  color: var(--text-muted);
}

.search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-deep);
  padding: 8px;
  z-index: 120;
}

.search-popover-group {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.14s ease;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.search-result-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
}

.header-account-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.header-account-link:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.header-account-link.is-active {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* =========================================================
   SECTION RHYTHM — Riot-Style Left-Aligned Headings & Spacing
   ========================================================= */
.viewport-section {
  padding: 104px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.viewport-section--alt {
  background: var(--bg-elevated);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
  text-align: left;
}

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

.section-head-bar .section-head {
  margin-bottom: 0;
}

.section-eyebrow {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-intro {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 66ch;
}

/* =========================================================
   2. HERO — Full Viewport, Royale Key Art, 1 Headline, 1 Subline, 1 CTA
   ========================================================= */
.hero-royale {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-obsidian);
}

.hero-royale-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-royale-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  filter: saturate(1.04) contrast(1.04);
}

.hero-royale-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.96) 0%, rgba(6, 10, 18, 0.85) 42%, rgba(6, 10, 18, 0.35) 75%, rgba(6, 10, 18, 0.72) 100%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.45) 0%, rgba(6, 10, 18, 0.15) 50%, rgba(6, 10, 18, 0.96) 100%);
}

.hero-royale-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 72px 0;
}

.hero-royale-copy {
  max-width: 670px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 66px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 22px;
}

.hero-subline {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.58;
  color: var(--text-secondary);
  margin-bottom: 34px;
  max-width: 56ch;
}

/* =========================================================
   3. GAMES CAROUSEL — 15 Tall Portrait Key-Art Cards + Era Chips
   ========================================================= */
.carousel-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-chips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.era-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.era-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.era-chip.is-active {
  background: var(--gold);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
}

.carousel-arrows {
  display: flex;
  gap: 8px;
}

.carousel-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.carousel-arrow-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.games-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 2px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 232, 240, 0.2) transparent;
  cursor: grab;
  user-select: none;
}

.games-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.games-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.games-carousel-track::-webkit-scrollbar-thumb {
  background: rgba(226, 232, 240, 0.18);
  border-radius: 999px;
}

/* Riot-Style Tall Portrait Card: Key Art + Game Wordmark Logo + Platform Icons ONLY */
.portrait-game-card {
  position: relative;
  flex: 0 0 272px;
  aspect-ratio: 3 / 4.25;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  scroll-snap-align: start;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.24s ease;
}

.portrait-game-card:hover,
.portrait-game-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.72);
  outline: none;
}

.portrait-art-bg {
  display: none;
}

.portrait-art-focal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.portrait-game-card:hover .portrait-art-focal {
  transform: scale(1.05);
}

.portrait-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 10, 18, 0.24) 0%,
    rgba(6, 10, 18, 0.04) 42%,
    rgba(6, 10, 18, 0.84) 75%,
    rgba(6, 10, 18, 0.98) 100%
  );
  pointer-events: none;
}

.portrait-new-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(6, 10, 18, 0.82);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.portrait-bottom-lockup {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portrait-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 0.96;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
}

.portrait-wordmark-top {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.portrait-wordmark-main {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.portrait-platforms {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.platform-svg {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

/* =========================================================
   4. ONE ROYALE SPOTLIGHT — 4 Modes + Single CTA
   ========================================================= */
.royale-spotlight-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 44px;
  align-items: center;
}

.royale-spotlight-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-deep);
  background: var(--bg-card);
}

.royale-spotlight-stage img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.royale-stage-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 10, 18, 0.94) 75%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.royale-stage-stat {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.royale-modes-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.mode-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.mode-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.mode-tile.is-active {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(200, 152, 56, 0.12) 0%, var(--bg-card) 100%);
}

.mode-tile-kicker {
  display: block;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mode-tile.is-active .mode-tile-kicker {
  color: var(--gold-bright);
}

.mode-tile-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.mode-tile-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* =========================================================
   5. NEWS GRID — Riot-Style 1-Featured + 4-Card Editorial Grid
   ========================================================= */
.news-editorial-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.news-featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.news-featured-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.news-featured-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-obsidian);
}

.news-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-featured-card:hover .news-featured-media img {
  transform: scale(1.03);
}

.news-featured-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-featured-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  color: var(--text-primary);
}

.news-featured-summary {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.58;
}

.news-side-grid {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 14px;
}

.news-compact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.news-compact-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
}

.news-compact-thumb {
  width: 88px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-hairline);
}

.news-compact-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--text-primary);
  margin-top: 3px;
}

/* =========================================================
   6. CIVILIZATION TREE — Compact Interactive 3-Era Tree (15 Nodes)
   ========================================================= */
.civ-tree-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}

.civ-eras-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.civ-era-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.civ-era-col-head {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-hairline);
}

.civ-era-roman {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.civ-era-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.civ-node {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.civ-node:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.civ-node.is-active {
  border-color: var(--gold-bright);
  background: var(--gold-tint);
}

.civ-node.is-prereq {
  border-color: rgba(231, 186, 88, 0.35);
}

.civ-node-img {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.civ-node-code {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
}

.civ-node.is-active .civ-node-code {
  color: var(--gold-bright);
}

.civ-node-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.codex-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 88px;
}

.codex-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.codex-top img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.codex-model-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  color: var(--text-primary);
}

.codex-parallel-box {
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.codex-parallel-label {
  display: block;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* =========================================================
   7. STUDY HOUSES — 4 Compact Cards, Zero Pledge Buttons on Landing
   ========================================================= */
.houses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.house-compact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.house-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.house-monogram {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-strong);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.house-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.house-count {
  font-size: 12.5px;
  color: var(--text-muted);
}

.house-motto {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.52;
}

.house-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.house-progress-track {
  height: 6px;
  background: var(--bg-obsidian);
  border-radius: 999px;
  overflow: hidden;
}

.house-progress-fill {
  height: 100%;
  background: var(--text-secondary);
  border-radius: 999px;
}

/* =========================================================
   8. COMMUNITY TEASER — Hot Topics + Tag Shortcuts + 1 CTA
   ========================================================= */
.community-teaser-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.teaser-topics-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teaser-topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.teaser-topic-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
}

.teaser-topic-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.teaser-topic-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.teaser-topic-stats {
  text-align: right;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.teaser-shortcuts-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shortcut-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.tag-pill.is-active {
  background: var(--gold);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
}

/* =========================================================
   PER-GAME LANDING PAGES (`/games/[slug]`)
   ========================================================= */
.game-page-breadcrumb {
  padding: 20px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-page-breadcrumb a:hover {
  color: var(--text-primary);
}

.game-hero {
  position: relative;
  padding: 56px 0 84px;
  border-bottom: 1px solid var(--border-hairline);
  overflow: hidden;
}

.game-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.game-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(34px) brightness(0.24) saturate(1.2);
  transform: scale(1.15);
}

.game-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.game-hero-title {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1.08;
  margin: 10px 0 16px;
}

.game-hero-pitch {
  font-size: 19px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 22px;
  max-width: 54ch;
}

.game-hero-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.game-hero-platforms {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
  border-right: 1px solid var(--border-hairline);
}

.game-hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.game-hero-art-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-deep);
  background: var(--bg-card);
  max-width: 460px;
  margin-left: auto;
}

.game-hero-art-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.game-hero-art-frame--wide {
  max-width: 560px;
}

.game-hero-art-frame--wide img {
  aspect-ratio: 16 / 10;
}

/* Mandatory How to Play — Riftbound-Guide Shape */
.howto-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.howto-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 26px;
}

.howto-step-num {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.howto-step-title {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 10px;
}

.howto-step-body {
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-secondary);
}

.howto-terms-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 28px;
}

.howto-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.term-item {
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.term-name {
  font-family: var(--display);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.term-def {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.52;
}

/* Visible placeholder badge for undefined studio rules */
.studio-input-flag {
  display: inline-block;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(231, 186, 88, 0.16);
  border: 1px dashed var(--border-gold);
  color: var(--gold-bright);
  vertical-align: baseline;
}

.game-modes-model-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.modes-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.game-mode-box {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
}

.game-mode-box h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin-bottom: 6px;
}

.game-mode-box p {
  font-size: 14px;
  color: var(--text-secondary);
}

.mental-model-feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.related-games-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.related-games-row .portrait-game-card {
  flex: initial;
  width: 100%;
}

/* =========================================================
   THE AGORA FORUM (`/agora` & `/agora/[threadId]`)
   HoYoLAB-Style Visual Card Feed + Sticky Sidebar Toolbox
   ========================================================= */
.agora-page-wrap {
  padding: 44px 0 96px;
}

.agora-top-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-hairline);
  flex-wrap: wrap;
}

.agora-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.agora-controls-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.agora-sort-tabs {
  display: inline-flex;
  gap: 6px;
}

.sort-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.sort-tab.is-active {
  background: var(--gold);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
  font-weight: 700;
}

.agora-search-select-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 280px;
}

.studio-input,
.studio-select,
.studio-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}

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

.agora-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.agora-feed-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Pinned Megathreads Strip */
.megathreads-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.megathreads-label {
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.megathread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.megathread-row:hover {
  border-color: var(--border-gold);
}

.megathread-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
}

.megathread-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* HoYoLAB-Style Spacious Feed Card */
.hoyolab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hoyolab-card:hover {
  border-color: var(--border-strong);
}

.hoyolab-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.author-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-strong);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

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

.author-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
}

.house-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.post-timestamp {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.card-badges-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-tag-badge {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.hoyolab-card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.26;
  color: var(--text-primary);
  cursor: pointer;
}

.hoyolab-card-title:hover {
  color: var(--gold-bright);
}

.hoyolab-card-body {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Game Key Art Banner on Card */
.card-game-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.card-game-banner img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-game-label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
}

.card-game-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.card-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hashtag-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.hashtag-chip:hover {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.hoyolab-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  font-size: 13px;
  color: var(--text-muted);
}

.card-metrics-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.metric-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.metric-btn:hover,
.metric-btn.is-active {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

/* Sticky Sidebar Toolbox */
.agora-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 84px;
}

.toolbox-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbox-title {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.toolbox-standing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 5px 0;
}

/* Thread View & Replies */
.thread-mod-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-btn {
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
}

.mod-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.reply-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-quote-box {
  background: var(--bg-obsidian);
  border-left: 2px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.reply-composer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

/* =========================================================
   AUTHENTICATED SCHOLAR DASHBOARD (`/dashboard`)
   ========================================================= */
.dashboard-wrap {
  padding: 56px 0 96px;
}

.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

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

.stat-card-label {
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.stat-card-value {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.quest-row,
.leaderboard-row {
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* =========================================================
   9. COMPLETE FOOTER
   ========================================================= */
.site-footer {
  background: #04070d;
  border-top: 1px solid var(--border-hairline);
  padding: 72px 0 36px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-hairline);
}

.footer-heading {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

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

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.social-icon-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-icon-link:hover {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.footer-bottom-bar {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal-links a:hover {
  color: var(--text-primary);
}

/* =========================================================
   MODALS — Studio Theater & Read Achilles Passport Sign-In
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 6, 12, 0.86);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-card {
  width: min(480px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-deep);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.theater-dialog {
  width: min(1380px, 96vw);
  height: min(860px, 92vh);
  background: var(--bg-obsidian);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

.theater-bar {
  height: 56px;
  padding: 0 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theater-frame-wrap {
  flex: 1;
  background: #000;
}

.theater-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 1120px) {
  .royale-spotlight-grid,
  .news-editorial-grid,
  .civ-tree-shell,
  .community-teaser-grid,
  .game-hero-inner,
  .game-modes-model-grid,
  .agora-shell,
  .dashboard-two-col {
    grid-template-columns: 1fr;
  }

  .houses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .codex-panel,
  .agora-sidebar {
    position: static;
  }

  .game-hero-art-frame {
    margin: 0;
  }
}

@media (max-width: 860px) {
  .studio-container,
  .site-header-inner {
    padding: 0 18px;
  }

  .viewport-section {
    padding: 68px 0;
  }

  .primary-nav {
    display: none;
  }

  .site-header.nav-open .primary-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
    padding: 12px 18px;
  }

  .site-header.nav-open .primary-nav-link {
    padding: 12px 8px;
  }

  .header-search-wrap {
    width: 150px;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .civ-eras-board,
  .howto-grid-3,
  .howto-terms-grid,
  .modes-list-grid,
  .royale-modes-stack,
  .dashboard-stats-row,
  .houses-grid,
  .footer-top-grid {
    grid-template-columns: 1fr;
  }

  .portrait-game-card {
    flex: 0 0 236px;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .header-left {
    gap: 10px;
    min-width: 0;
  }

  .studio-brand {
    gap: 8px;
  }

  .studio-brand-mark {
    width: 28px;
    height: 28px;
  }

  .studio-brand-name {
    font-size: 12.5px;
    letter-spacing: 0.06em;
  }

  .studio-brand-sub {
    display: none;
  }

  .header-right {
    gap: 6px;
  }

  .header-account-link {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .header-right .btn-gold-sm {
    padding: 7px 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  .mobile-menu-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .header-search-wrap {
    display: none;
  }

  .site-header.nav-open .header-search-wrap {
    display: block;
    position: absolute;
    top: calc(var(--header-h) + 210px);
    left: 18px;
    right: 18px;
    width: auto;
    z-index: 95;
  }

  .agora-search-select-group {
    min-width: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .agora-search-select-group input,
  .agora-search-select-group select {
    max-width: 100% !important;
    width: 100%;
  }

  .teaser-topic-card,
  .megathread-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .teaser-topic-stats {
    text-align: left;
    display: flex;
    gap: 12px;
  }

  .news-compact-card {
    grid-template-columns: 1fr;
  }

  .news-compact-thumb {
    width: 100%;
    height: 140px;
  }
}


/* =========================================================
   ACHILLES STUDIO ANALYTICS MASTER COCKPIT (`/analytics`)
   ========================================================= */
.analytics-cockpit {
  padding: 40px 32px 96px;
}

.cockpit-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-hairline);
  flex-wrap: wrap;
}

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

.cockpit-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.cockpit-pill--emerald {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: #34d399;
}

.cockpit-pill--gold {
  background: var(--gold-tint);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

.window-toggle-group {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.win-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 8px 13px;
  cursor: pointer;
}

.win-btn.is-active {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}

.cockpit-toast {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #e2e8f0;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
}

.cockpit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cockpit-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.cockpit-tab.is-active {
  background: var(--gold);
  border-color: var(--gold-bright);
  color: var(--gold-ink);
  font-weight: 700;
}

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-status {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
}

.kpi-status--ok {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.kpi-status--warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.kpi-value {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.cockpit-grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.cockpit-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.cockpit-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.cockpit-panel-title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
}

.analytics-svg-chart {
  width: 100%;
  height: auto;
  display: block;
}

.cockpit-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.cockpit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cockpit-table th {
  text-align: left;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.cockpit-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: middle;
}

.waterfall-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 310px;
  overflow-y: auto;
}

.waterfall-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-hairline);
  border-radius: 5px;
  font-size: 12.5px;
}

.waterfall-idx {
  font-family: var(--display);
  font-size: 11px;
  color: var(--text-muted);
}

/* Semantic Answer-First AIO Capsule in Footer (Visible, Zero Cloaking) */
.aio-footer-capsule {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
  font-size: 12px;
  color: var(--text-muted);
}

.aio-footer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 11.5px;
}

.aio-footer-table th,
.aio-footer-table td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.06);
}

@media (max-width: 1080px) {
  .cockpit-grid-2,
  .kpi-grid-6 {
    grid-template-columns: 1fr;
  }

  .analytics-cockpit {
    padding: 28px 18px 72px;
  }
}

@media (max-width: 560px) {
  .analytics-cockpit {
    padding: 20px 14px 64px;
  }

  .cockpit-panel {
    padding: 16px 14px;
  }
}
