/* Read Achilles Game Studio & Social Learning Sanctuary (`https://readachilles.app`)
   Inherits Official Read Achilles Brand Tokens (`brand-tokens.css`) + Sovereign Obsidian Studio Mode */

:root {
  --brand-gold: #C89838;
  --brand-gold-bright: #FDE047;
  --brand-navy: #0B1F3A;
  --brand-amber: #F5A623;
  --brand-cream: #FAF6EE;
  --brand-ink: #101418;
  --serif: "Newsreader", Georgia, serif;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Default: Sovereign Obsidian Studio Theme */
  --bg-page: #071120;
  --bg-elevated: #0D1B31;
  --bg-card: #11223E;
  --bg-card-hover: #162B4D;
  --bg-glass: rgba(13, 27, 49, 0.88);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-soft: #CBD5E1;
  --border-subtle: rgba(200, 152, 56, 0.24);
  --border-strong: rgba(245, 166, 35, 0.52);
  --shadow-studio: 0 18px 42px rgba(2, 6, 23, 0.55);
}

html[data-theme="parchment"] {
  --bg-page: #FAF6EE;
  --bg-elevated: #F3EDDD;
  --bg-card: #FFFDF7;
  --bg-card-hover: #FBF3DC;
  --bg-glass: rgba(250, 246, 238, 0.94);
  --text-main: #101418;
  --text-muted: #5A6068;
  --text-soft: #2C3540;
  --border-subtle: #D8CFBB;
  --border-strong: #C89838;
  --shadow-studio: 0 14px 32px rgba(11, 31, 58, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 14% 8%, rgba(200, 152, 56, 0.13), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(56, 189, 248, 0.09), transparent 32%);
}

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

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

/* Top Telemetry Ticker */
.studio-ticker {
  background: linear-gradient(90deg, #060D1A 0%, #0B1F3A 50%, #060D1A 100%);
  border-bottom: 1px solid rgba(200, 152, 56, 0.35);
  color: #F8FAFC;
  font-size: 13px;
  padding: 7px 18px;
}

.studio-ticker-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ticker-badge {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34D399;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ticker-marquee {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  color: #E2E8F0;
}

.ticker-editorial-link {
  color: #FDE047;
  font-weight: 600;
  white-space: nowrap;
  font-size: 12.5px;
}

/* Primary Header */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.studio-header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.brand-crest {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(200, 152, 56, 0.35);
}

.brand-overline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand-gold);
}

.studio-pill {
  background: linear-gradient(135deg, #FDE047, #C89838);
  color: #0B1F3A;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10.5px;
}

.domain-pill {
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10.5px;
}

.brand-main-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-top: 2px;
}

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

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--text-soft);
  transition: all 0.16s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(200, 152, 56, 0.16);
  color: var(--brand-gold-bright);
}

html[data-theme="parchment"] .nav-link:hover,
html[data-theme="parchment"] .nav-link.active {
  color: #8A6414;
}

.studio-hud {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hud-label {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
}

.theme-toggle-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Main Container */
.studio-main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* Hero Section */
.hero-sanctuary {
  margin-bottom: 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-studio);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.council-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.council-pill {
  background: rgba(200, 152, 56, 0.2);
  border: 1px solid var(--brand-gold);
  color: var(--brand-gold-bright);
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 999px;
}

html[data-theme="parchment"] .council-pill {
  color: #8A6414;
}

.partner-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-headline {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.12;
  margin-bottom: 16px;
}

.gold-gradient-text {
  background: linear-gradient(135deg, #FDE047 0%, #F5A623 55%, #C89838 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="parchment"] .gold-gradient-text {
  background: linear-gradient(135deg, #B45309 0%, #8A6414 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 17px;
  color: var(--text-soft);
  margin-bottom: 24px;
  max-width: 68ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #FDE047 0%, #D99B26 60%, #B45309 100%);
  color: #0B1F3A;
  font-weight: 700;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(217, 155, 38, 0.32);
}

.btn-secondary-outline {
  background: rgba(200, 152, 56, 0.12);
  border: 1.5px solid var(--brand-gold);
  color: var(--text-main);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-ghost-warm {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 10px;
}

.philosophy-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pillar-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 13px;
}

.pillar-kicker {
  display: block;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--brand-amber);
  margin-bottom: 3px;
}

.pillar-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

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

/* Daily Shrine of Discovery Card */
.hero-spotlight-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-studio);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

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

.shrine-badge {
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: #34D399;
}

.shrine-reward {
  background: rgba(52, 211, 153, 0.16);
  color: #34D399;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.spotlight-game-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.spotlight-icon {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  border: 2px solid var(--brand-gold);
}

.spotlight-code-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.code-tag {
  font-family: var(--display);
  font-size: 11px;
  background: rgba(200, 152, 56, 0.22);
  color: var(--brand-gold-bright);
  padding: 2px 8px;
  border-radius: 5px;
}

.era-tag {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 6px;
}

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

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

.shrine-question-box {
  background: var(--bg-elevated);
  border-left: 3.5px solid var(--brand-gold);
  padding: 12px 14px;
  border-radius: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15.5px;
  color: var(--text-main);
}

.poll-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.poll-option-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.poll-option-btn:hover,
.poll-option-btn.selected {
  border-color: var(--brand-gold);
  background: rgba(200, 152, 56, 0.16);
}

.poll-feedback {
  margin-top: 9px;
  font-size: 12.5px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-main);
}

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

.btn-launch-full {
  flex: 1;
  text-align: center;
  background: var(--brand-navy);
  border: 1px solid var(--brand-gold);
  color: #FDE047;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 10px;
}

.btn-cycle-shrine {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Studio Sections */
.studio-section {
  margin-bottom: 60px;
}

/* Headline Flagship Banner: Achilles Royale */
.headline-royale-banner {
  margin-bottom: 56px;
  background: linear-gradient(135deg, rgba(17, 34, 62, 0.96) 0%, rgba(11, 31, 58, 0.98) 100%);
  border: 2px solid var(--brand-gold);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 22px 54px rgba(200, 152, 56, 0.22);
}

html[data-theme="parchment"] .headline-royale-banner {
  background: linear-gradient(135deg, #FFFDF7 0%, #FBF3DC 100%);
}

.headline-royale-grid {
  display: grid;
  grid-template-columns: 1.08fr 1.12fr;
  gap: 28px;
  align-items: center;
}

.headline-royale-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.headline-hero-img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  display: block;
}

.headline-overlay-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.flagship-crown-pill {
  background: linear-gradient(135deg, #FDE047, #D99B26);
  color: #0B1F3A;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.flagship-live-pill {
  background: rgba(7, 17, 32, 0.86);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #34D399;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.headline-royale-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.headline-icon {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  border: 2.5px solid var(--brand-gold-bright);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.headline-kicker {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand-gold-bright);
  margin-bottom: 3px;
}

html[data-theme="parchment"] .headline-kicker {
  color: #8A6414;
}

.headline-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
}

.headline-sub {
  font-size: 13.5px;
  color: var(--brand-amber);
  font-weight: 600;
}

.headline-desc {
  font-size: 15px;
  color: var(--text-soft);
}

.headline-models-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.headline-model-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 14px;
}

.headline-model-chip span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.headline-model-chip strong {
  font-size: 13px;
  color: var(--text-main);
}

.headline-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.game-studio-card.headline-card {
  border: 2px solid var(--brand-gold-bright);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(200, 152, 56, 0.14) 100%);
}

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

.section-kicker {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--brand-amber);
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 34px);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 74ch;
}

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

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill.active {
  background: linear-gradient(135deg, #FDE047, #C89838);
  color: #0B1F3A;
  border-color: transparent;
  font-weight: 700;
}

/* 9-Game Showcase Grid */
.games-grid-9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.game-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  box-shadow: var(--shadow-studio);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.game-studio-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-gold);
}

.game-card-top {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.game-app-icon {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(200, 152, 56, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.game-meta-top {
  flex: 1;
}

.game-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.game-code-pill {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(200, 152, 56, 0.2);
  color: var(--brand-gold-bright);
  padding: 2px 8px;
  border-radius: 5px;
}

.game-learners-pill {
  font-size: 11.5px;
  color: #34D399;
  font-weight: 600;
}

.game-card-title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.18;
  margin-bottom: 4px;
}

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

.mental-model-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.mm-kicker {
  display: block;
  font-family: var(--display);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--brand-amber);
  margin-bottom: 3px;
}

.mm-title {
  font-weight: 700;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.mm-desc {
  font-size: 12.5px;
  color: var(--text-soft);
}

.game-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-tag {
  font-size: 11.5px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 3px 9px;
  border-radius: 6px;
}

.game-card-footer {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 13px;
}

.game-btn-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.btn-play-domain {
  background: linear-gradient(135deg, #FDE047, #C89838);
  color: #0B1F3A;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 9px;
  text-align: center;
}

.btn-play-theater {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.game-domain-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.game-domain-bar code {
  color: var(--brand-gold);
}

/* Civilization Tech Tree Section */
.civ-tree-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  align-items: stretch;
}

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

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

.civ-era-header {
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--brand-gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.civ-node-btn {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
}

.civ-node-btn:hover,
.civ-node-btn.active {
  border-color: var(--brand-gold-bright);
  background: rgba(200, 152, 56, 0.18);
}

.civ-node-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.civ-node-title {
  font-weight: 700;
  font-size: 13.5px;
  display: block;
}

.civ-node-model {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
}

.codex-inspector {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.civ-progress-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
}

/* Study Houses (Supercell Clans) */
.houses-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.house-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 13px;
}

.house-card.pledged {
  border: 2px solid var(--brand-gold-bright);
}

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

.house-crest {
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chest-bar-track {
  height: 9px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}

.chest-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F5A623, #34D399);
}

.btn-pledge-house {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--brand-gold);
  background: rgba(200, 152, 56, 0.16);
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
}

/* Agora Campfire Section */
.agora-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.45fr;
  gap: 22px;
  align-items: start;
}

.agora-compose-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.compose-header {
  display: flex;
  align-items: center;
  gap: 11px;
}

.compose-header h3 {
  font-family: var(--serif);
  font-size: 19px;
}

.compose-header p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agora-compose-card label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.agora-compose-card input,
.agora-compose-card select,
.agora-compose-card textarea,
.studio-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 11px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13.5px;
}

.full-width {
  width: 100%;
  justify-content: center;
}

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

.agora-note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.note-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.note-model-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-amber);
}

.note-body {
  font-size: 13.5px;
  color: var(--text-main);
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  font-size: 12px;
}

.btn-kindle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Quests & League */
.quests-league-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
}

.quests-panel,
.league-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
}

.section-title-sm {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 4px;
}

.section-subtitle-sm {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.quests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-claim-quest {
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid #34D399;
  color: #34D399;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.league-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
}

/* Embedded Studio Theater Modal */
.theater-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

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

.theater-modal-container {
  width: min(1360px, 96vw);
  height: min(860px, 92vh);
  background: #071120;
  border: 2px solid var(--brand-gold);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.theater-header {
  padding: 12px 18px;
  background: #0B1F3A;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theater-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theater-icon {
  border-radius: 8px;
}

.theater-model-pill {
  font-size: 12px;
  color: #FDE047;
}

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

.btn-theater-ext,
.btn-theater-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

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

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

/* Footer */
.studio-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  padding: 42px 20px;
}

.studio-footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

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

.footer-brand-row span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-links-col h4 {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brand-gold);
  margin-bottom: 10px;
}

.footer-game-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

@media (max-width: 1080px) {
  .hero-grid,
  .games-grid-9,
  .civ-tree-layout,
  .houses-grid-4,
  .agora-layout,
  .quests-league-grid,
  .studio-footer-inner {
    grid-template-columns: 1fr;
  }
}
