/* Executive Residence Digital Experience — styles */
:root {
  --bg-0: oklch(0.14 0.04 260);
  --bg-1: oklch(0.18 0.05 260);
  --bg-2: oklch(0.22 0.055 260);
  --bg-3: oklch(0.26 0.06 260);
  --line: oklch(0.32 0.05 260);
  --line-soft: oklch(0.28 0.045 260 / 0.6);
  --text-0: oklch(0.98 0.005 260);
  --text-1: oklch(0.88 0.01 260);
  --text-2: oklch(0.68 0.02 260);
  --text-3: oklch(0.52 0.02 260);
  --accent-blue: oklch(0.68 0.17 245);
  --accent-blue-soft: oklch(0.68 0.17 245 / 0.18);
  --accent-gold: oklch(0.82 0.12 85);
  --accent-red: oklch(0.66 0.21 22);
  --accent-ivory: oklch(0.94 0.03 85);
  --grad-flag: linear-gradient(90deg, var(--accent-red), #fff 50%, var(--accent-blue) 100%);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 8px -4px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 50px -16px rgba(0, 0, 0, 0.7), 0 4px 12px -4px rgba(0, 0, 0, 0.5);

  --sidebar-w: 80px;
  --topbar-h: 72px;

  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(1400px 700px at 85% -10%, oklch(0.26 0.09 255 / 0.55), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, oklch(0.22 0.07 270 / 0.4), transparent 60%),
    var(--bg-0);
  background-attachment: fixed;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----------- App Shell ----------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  min-height: 100vh;
}

/* ----------- Top Bar ----------- */
.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px 0 0;
  border-bottom: 1px solid var(--line-soft);
  background: oklch(0.14 0.04 260 / 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .menu-btn {
  width: var(--sidebar-w);
  height: var(--topbar-h);
  display: grid; place-items: center;
  border-radius: 0;
  color: var(--text-1);
  transition: background 0.15s;
  flex-shrink: 0;
  margin-right: -4px;
}
.topbar .menu-btn:hover { background: var(--bg-2); }

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
  margin-right: 8px;
  border-right: 1px solid var(--line-soft);
  height: 48px;
}
.wordmark-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--accent-ivory);
}
.wordmark-text {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  line-height: 1;
}
.wordmark-text .title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-0);
}
.wordmark-text .sub {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-2);
  margin-top: 4px;
  font-family: var(--font-sans);
  font-weight: 500;
}

.topnav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  margin-right: auto;
}
.topnav button {
  position: relative;
  padding: 10px 18px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: color 0.2s;
}
.topnav button:hover { color: var(--text-0); }
.topnav button.active { color: var(--text-0); }
.topnav button.active::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px;
  bottom: 2px;
  height: 2px;
  background: var(--grad-flag);
  border-radius: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-1);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text-0); }

/* ----------- Sidebar ----------- */
.sidebar {
  grid-area: sidebar;
  padding: 20px 0;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: oklch(0.14 0.04 260 / 0.5);
}
.side-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  margin: 0 10px;
  border-radius: 10px;
  color: var(--text-3);
  transition: all 0.15s;
}
.side-item svg { width: 22px; height: 22px; }
.side-item .label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.side-item:hover { color: var(--text-0); background: var(--bg-2); }
.side-item.active {
  color: var(--accent-ivory);
  background: linear-gradient(180deg, oklch(0.68 0.17 245 / 0.22), oklch(0.68 0.17 245 / 0.08));
  box-shadow: inset 0 0 0 1px oklch(0.68 0.17 245 / 0.35);
}
.side-item.active svg { color: var(--accent-gold); }

.side-spacer { flex: 1; }

/* ----------- Main ----------- */
.main {
  grid-area: main;
  padding: 24px 32px 56px;
  overflow-x: hidden;
}

/* ----------- Hero ----------- */
.hero {
  position: relative;
  height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slide.active { opacity: 1; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, oklch(0.12 0.05 260 / 0.92) 0%, oklch(0.12 0.05 260 / 0.7) 32%, oklch(0.12 0.05 260 / 0.15) 60%, transparent 80%),
    linear-gradient(180deg, transparent 50%, oklch(0.08 0.04 260 / 0.75) 100%);
}

.hero-content {
  position: absolute;
  left: 56px;
  top: 56px;
  max-width: 480px;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 20px;
  font-weight: 600;
}
.hero-eyebrow::before {
  content: ""; display: block;
  width: 28px; height: 1px;
  background: var(--accent-gold);
}
.hero-title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.02;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero-title .accent {
  color: var(--accent-red);
  font-style: italic;
}
.hero-desc {
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 28px;
  text-wrap: pretty;
  max-width: 420px;
}

.hero-actions { display: flex; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), oklch(0.55 0.18 255));
  color: white;
  box-shadow: 0 8px 24px -8px oklch(0.5 0.18 250);
}
.btn-primary:hover { box-shadow: 0 12px 30px -8px oklch(0.5 0.18 250); }
.btn-ghost {
  background: oklch(0.98 0.005 260 / 0.08);
  color: var(--text-0);
  border: 1px solid oklch(0.98 0.005 260 / 0.22);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: oklch(0.98 0.005 260 / 0.15); }

.hero-room-label {
  position: absolute;
  right: 44px;
  bottom: 44px;
  text-align: right;
  z-index: 2;
}
.hero-room-label .name {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-room-label .view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}
.hero-room-label .view:hover { color: var(--accent-gold); }

.hero-dots {
  position: absolute;
  right: 44px;
  bottom: 24px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.hero-dots button {
  width: 22px; height: 3px;
  border-radius: 2px;
  background: oklch(0.98 0.005 260 / 0.3);
  transition: background 0.2s, width 0.3s;
}
.hero-dots button.active {
  background: var(--accent-blue);
  width: 36px;
}

/* ----------- Section ----------- */
.section {
  margin-top: 36px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}
.section-head .view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s, gap 0.15s;
}
.section-head .view-all:hover { color: var(--accent-gold); gap: 10px; }

/* ----------- Room cards ----------- */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.room-card {
  position: relative;
  aspect-ratio: 4/3.2;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.room-card .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.room-card:hover { transform: translateY(-3px); }
.room-card:hover .bg { transform: scale(1.06); }
.room-card .bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, oklch(0.08 0.03 260 / 0.9) 100%);
}
.room-card.selected {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue), 0 10px 30px -10px oklch(0.5 0.18 250);
}
.room-card .label {
  position: absolute;
  left: 14px; bottom: 12px;
  font-weight: 600;
  font-size: 14px;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.room-card .badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: oklch(0.12 0.04 260 / 0.7);
  color: var(--accent-gold);
  backdrop-filter: blur(6px);
}

/* ----------- Tour cards ----------- */
.tours-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tour-card {
  position: relative;
  height: 130px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line-soft);
  background: var(--bg-1);
  display: flex;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tour-card:hover {
  transform: translateY(-2px);
  border-color: oklch(0.5 0.12 255 / 0.5);
  box-shadow: var(--shadow-hover);
}
.tour-card .thumb {
  width: 40%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.tour-card .thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 40%, var(--bg-1) 100%);
}
.tour-card .info {
  flex: 1;
  padding: 18px 16px 18px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tour-card .info h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}
.tour-card .meta {
  color: var(--text-2);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tour-card .play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text-0);
  transition: background 0.15s, transform 0.2s;
}
.tour-card:hover .play {
  background: var(--accent-blue);
  transform: scale(1.08);
}

/* ----------- Learn cards ----------- */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.learn-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 108px;
}
.learn-card:hover {
  transform: translateY(-2px);
  border-color: oklch(0.5 0.12 255 / 0.4);
}
.learn-card.featured {
  background:
    linear-gradient(135deg, oklch(0.5 0.18 255 / 0.25), oklch(0.28 0.09 260 / 0.15)),
    var(--bg-1);
  border-color: oklch(0.5 0.18 255 / 0.5);
}
.learn-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: oklch(0.5 0.18 255 / 0.18);
  color: var(--accent-blue);
  flex-shrink: 0;
}
.learn-card.featured .learn-icon {
  background: oklch(0.5 0.18 255 / 0.3);
  color: oklch(0.85 0.12 255);
}
.learn-card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-display);
}
.learn-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 180px;
}
.learn-chev {
  position: absolute;
  right: 18px; bottom: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2);
  color: var(--text-1);
  transition: background 0.15s, color 0.15s;
}
.learn-card:hover .learn-chev { background: var(--accent-blue); color: white; }

/* ----------- Page transitions ----------- */
.page {
  animation: pageIn 0.35s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------- Explore page ----------- */
.explore-hero {
  padding: 40px 48px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, oklch(0.14 0.05 260 / 0.92), oklch(0.14 0.05 260 / 0.4)),
    url("https://images.unsplash.com/photo-1555848962-6e79363ec58f?auto=format&fit=crop&w=2000&q=80");
  background-size: cover;
  background-position: center;
  margin-bottom: 32px;
}
.explore-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  margin: 0 0 10px;
  font-weight: 700;
}
.explore-hero p {
  color: var(--text-1);
  max-width: 520px;
  margin: 0;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--line); color: var(--text-0); }
.filter-chip.active {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-ivory);
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.explore-card {
  position: relative;
  aspect-ratio: 16/11;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line-soft);
  transition: transform 0.25s, box-shadow 0.25s;
}
.explore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.explore-card .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s;
}
.explore-card:hover .bg { transform: scale(1.05); }
.explore-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(0.08 0.03 260 / 0.95) 100%);
}
.explore-card .content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 22px;
}
.explore-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 600;
}
.explore-card .sub {
  color: var(--text-2);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.explore-card .tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  background: oklch(0.12 0.03 260 / 0.75);
  color: var(--accent-gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

/* ----------- Room detail ----------- */
.room-detail { animation: pageIn 0.4s ease; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  transition: color 0.15s, gap 0.15s;
}
.back-btn:hover { color: var(--accent-gold); gap: 12px; }

.room-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 440px;
  margin-bottom: 28px;
}
.room-hero .bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.room-hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, oklch(0.08 0.03 260 / 0.95) 100%);
}
.room-hero .info {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.room-hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  margin: 0 0 8px;
  font-weight: 700;
}
.room-hero .kicker {
  color: var(--accent-gold);
  letter-spacing: 0.3em;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 600;
}
.room-hero .meta {
  color: var(--text-1);
  font-size: 14px;
  max-width: 540px;
}

.room-stats {
  display: flex;
  gap: 28px;
}
.room-stats .stat { text-align: right; }
.room-stats .stat .n {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-gold);
}
.room-stats .stat .l {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 2px;
}

.room-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}
.room-body .prose {
  color: var(--text-1);
  line-height: 1.7;
  font-size: 15px;
}
.room-body .prose h3 {
  font-family: var(--font-display);
  color: var(--text-0);
  font-size: 22px;
  margin: 0 0 10px;
}
.room-body .prose p { margin: 0 0 16px; text-wrap: pretty; }

.object-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  margin-bottom: 10px;
}
.object-card:hover { border-color: var(--line); transform: translateX(2px); }
.object-card .obj-thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.object-card .obj-info h4 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.object-card .obj-info .date {
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.object-card .obj-info p {
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.4;
}

.sidebar-panel {
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 20px;
}
.sidebar-panel h4 {
  font-family: var(--font-display);
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
}

/* ----------- Quiz ----------- */
.quiz-card {
  max-width: 720px;
  margin: 40px auto;
  padding: 40px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}
.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.quiz-progress .dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
}
.quiz-progress .dot.done { background: var(--accent-gold); }
.quiz-progress .dot.current { background: var(--accent-blue); }

.quiz-q {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 28px;
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.25;
}
.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--text-0);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}
.quiz-option:hover { border-color: var(--accent-blue); background: var(--bg-3); }
.quiz-option.selected { border-color: var(--accent-blue); background: var(--accent-blue-soft); }
.quiz-option.correct { border-color: oklch(0.7 0.18 150); background: oklch(0.6 0.18 150 / 0.18); }
.quiz-option.wrong { border-color: var(--accent-red); background: oklch(0.5 0.18 25 / 0.18); }

/* ----------- Games ----------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.game-card {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
}
.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 100% 0%, oklch(0.5 0.18 255 / 0.18), transparent);
  pointer-events: none;
}
.game-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-3);
  color: var(--accent-gold);
}
.game-card h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}
.game-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  margin-top: 12px;
}
.game-footer .play-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-blue);
  color: white;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ----------- Stories page ----------- */
.story-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  margin-top: 24px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.story-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.story-featured-img {
  position: relative;
  min-height: 280px;
  background-size: cover;
  background-position: center;
}
.story-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 50%, var(--bg-1) 100%);
}
.story-featured-content {
  padding: 36px 36px 36px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.story-featured-tag {
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.story-featured-content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.1;
}
.story-featured-content p {
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 16px;
  text-wrap: pretty;
}
.story-featured-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.story-grid-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.story-grid-card:hover {
  transform: translateY(-3px);
  border-color: oklch(0.5 0.12 255 / 0.5);
  box-shadow: var(--shadow-hover);
}
.story-grid-img {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
}
.story-grid-tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: oklch(0.12 0.04 260 / 0.75);
  color: var(--accent-gold);
  backdrop-filter: blur(6px);
}
.story-grid-info {
  padding: 18px;
}
.story-grid-date {
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.story-grid-info h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.story-grid-info p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-grid-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 11.5px;
}

/* ----------- Objects collection grid ----------- */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.obj-collection-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.obj-collection-card:hover {
  transform: translateY(-3px);
  border-color: oklch(0.5 0.12 255 / 0.5);
  box-shadow: var(--shadow-hover);
}
.obj-collection-img {
  position: relative;
  height: 200px;
  background-size: cover;
  background-position: center;
}
.obj-collection-cat {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: oklch(0.12 0.04 260 / 0.75);
  color: var(--accent-gold);
  backdrop-filter: blur(6px);
}
.obj-collection-info {
  padding: 18px;
}
.obj-collection-date {
  color: var(--accent-gold);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.obj-collection-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.2;
}
.obj-collection-info p {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.obj-collection-room {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

/* ----------- Object detail stories ----------- */
.obj-stories-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.obj-story-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.obj-story-link:hover {
  border-color: var(--line);
  transform: translateX(3px);
}
.obj-story-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-gold);
  flex-shrink: 0;
  width: 32px;
}
.obj-story-link h4 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.obj-story-link p {
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.4;
}
.obj-story-arrow {
  margin-left: auto;
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 0.15s;
}
.obj-story-link:hover .obj-story-arrow { color: var(--accent-blue); }

/* ----------- Story chapter nav ----------- */
.story-chapter-nav {
  display: flex;
  gap: 4px;
  margin-top: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.story-chapter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.story-chapter-btn:hover { color: var(--text-0); border-color: var(--line); }
.story-chapter-btn.active {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--text-0);
}
.story-chapter-num {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

/* ----------- Story timeline ----------- */
.story-timeline {
  position: relative;
  padding-left: 20px;
}
.story-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line-soft);
}
.timeline-item {
  position: relative;
  padding-bottom: 14px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -18px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1.5px solid var(--line);
}
.timeline-item.highlight .timeline-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px oklch(0.82 0.12 85 / 0.5);
}
.timeline-year {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 1px;
}
.timeline-item.highlight .timeline-year {
  color: var(--accent-gold);
}
.timeline-event {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

/* ----------- Stories scroll ----------- */
.stories-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.stories-scroll::-webkit-scrollbar { height: 6px; }
.stories-scroll::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.story-card {
  flex: 0 0 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line-soft);
  background: var(--bg-1);
  scroll-snap-align: start;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.story-card:hover {
  transform: translateY(-3px);
  border-color: oklch(0.5 0.12 255 / 0.5);
  box-shadow: var(--shadow-hover);
}
.story-img {
  position: relative;
  height: 160px;
  background-size: cover;
  background-position: center;
}
.story-tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: oklch(0.12 0.04 260 / 0.75);
  color: var(--accent-gold);
  backdrop-filter: blur(6px);
}
.story-info {
  padding: 16px;
}
.story-info h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.2;
}
.story-info p {
  margin: 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------- Placeholder images ---------- */
.placeholder-room {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg,
      oklch(0.28 0.06 260) 0 12px,
      oklch(0.24 0.05 260) 12px 24px);
  display: grid; place-items: center;
  color: oklch(0.6 0.02 260);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ----------- Menu drawer ----------- */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.08 0.03 260 / 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: var(--bg-1);
  border-right: 1px solid var(--line-soft);
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 20px 0 60px -20px rgba(0, 0, 0, 0.5);
}
.menu-drawer.open {
  transform: translateX(0);
}

.menu-drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.menu-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}

.menu-drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
  width: 100%;
  text-align: left;
}
.menu-drawer-item:hover {
  color: var(--text-0);
  background: var(--bg-2);
}
.menu-drawer-item.active {
  color: var(--accent-ivory);
  background: var(--accent-blue-soft);
}
.menu-drawer-item.active svg {
  color: var(--accent-gold);
}

.menu-drawer-footer {
  padding: 12px 12px 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ----------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

/* ----------- Tweaks tweaks (applied via CSS vars) ---------- */
.theme-ivory {
  --bg-0: oklch(0.96 0.008 85);
  --bg-1: oklch(0.98 0.008 85);
  --bg-2: oklch(0.94 0.012 85);
  --bg-3: oklch(0.90 0.015 85);
  --line: oklch(0.82 0.015 85);
  --line-soft: oklch(0.86 0.012 85 / 0.8);
  --text-0: oklch(0.18 0.03 260);
  --text-1: oklch(0.32 0.025 260);
  --text-2: oklch(0.48 0.02 260);
  --text-3: oklch(0.62 0.018 260);
}
.theme-ivory body, .theme-ivory.app {
  background:
    radial-gradient(1400px 700px at 85% -10%, oklch(0.88 0.03 85 / 0.7), transparent 60%),
    var(--bg-0);
}

.density-compact { --topbar-h: 60px; }
.density-compact .main { padding: 18px 24px 40px; }
.density-compact .hero { height: 380px; }
.density-compact .hero-title { font-size: 44px; }
.density-compact .section { margin-top: 26px; }

/* ----------- Featured game card (Brief the Chief) ----------- */
.game-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  margin-top: 28px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-card);
}
.game-featured:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  box-shadow: 0 24px 50px rgba(0,0,0,0.45);
}
.game-featured-img {
  background-size: cover;
  background-position: center;
  min-height: 320px;
}
.game-featured-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.game-featured-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}
.game-featured-title {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--text-0);
}
.game-featured-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-1);
  margin: 0 0 24px;
  max-width: 460px;
}
.game-featured-foot {
  display: flex;
  align-items: center;
  gap: 16px;
}
.game-featured-meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
@media (max-width: 768px) {
  .game-featured { grid-template-columns: 1fr; }
  .game-featured-img { min-height: 200px; }
  .game-featured-body { padding: 24px 22px; }
  .game-featured-title { font-size: 28px; }
  .game-featured-desc { font-size: 14px; }
}

/* ============================================
   MATCH THE PORTRAIT — game styles
   ============================================ */
.mp-intro {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  margin-top: 28px;
  padding: 40px 32px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}
.mp-intro-frame {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.5));
}
.mp-title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.0;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  color: var(--text-0);
}
.mp-title-italic {
  font-style: italic;
  color: var(--accent-gold);
}
.mp-lede {
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.55;
  max-width: 480px;
  margin: 0 0 28px;
}
.mp-rules {
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
}
.mp-rule {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--text-1);
}
.mp-rule-num {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-gold);
  min-width: 36px;
  letter-spacing: 0.04em;
}
.mp-intro-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* HUD */
.mp-hud {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  margin-top: 18px;
  margin-bottom: 28px;
}
.mp-hud-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mp-hud-value {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-0);
  margin-top: 2px;
}
.mp-hud-of { color: var(--text-3); font-size: 14px; font-style: italic; }
.mp-hud-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.mp-hud-pip {
  width: 36px; height: 6px;
  border-radius: 3px;
  background: var(--bg-3);
  transition: background 0.3s;
}
.mp-hud-pip.active { background: var(--accent-gold); }
.mp-hud-pip.ok     { background: oklch(0.7 0.15 150); }
.mp-hud-pip.miss   { background: var(--accent-red); }
.mp-hud-right {
  display: flex;
  gap: 16px;
  align-items: center;
}
.mp-hud-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-0);
}
.mp-hud-stat svg { color: var(--accent-gold); }

/* Stage */
.mp-stage {
  display: grid;
  grid-template-columns: minmax(360px, 480px) 1fr;
  gap: 56px;
  align-items: flex-start;
}
.mp-portrait-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 20px 0;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}
.mp-portrait { transition: transform 0.4s ease, filter 0.4s ease; }
.mp-portrait.answered { filter: brightness(0.85); }
.mp-timer {
  position: absolute;
  top: 0; right: 0;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  padding: 4px;
  box-shadow: var(--shadow-card);
}

.mp-prompt { padding-top: 24px; }
.mp-prompt-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
}
.mp-prompt-q {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 28px;
  color: var(--text-0);
}

.mp-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.mp-choice {
  position: relative;
  text-align: left;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  color: var(--text-0);
  min-height: 76px;
}
.mp-choice:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}
.mp-choice-name {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 4px;
}
.mp-choice-era {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.mp-choice.correct {
  background: oklch(0.32 0.14 150 / 0.4);
  border-color: oklch(0.7 0.15 150);
}
.mp-choice.wrong {
  background: oklch(0.32 0.18 22 / 0.4);
  border-color: var(--accent-red);
}
.mp-choice.dim { opacity: 0.45; }
.mp-choice-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.mp-choice-badge.ok { background: oklch(0.7 0.15 150); color: #0a1a0a; }
.mp-choice-badge.miss { background: var(--accent-red); color: #fff; }

.mp-feedback {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-2);
  color: var(--text-1);
  animation: pageIn 0.3s ease;
}
.mp-feedback.ok { border-left-color: oklch(0.7 0.15 150); }
.mp-feedback.miss { border-left-color: var(--accent-red); }
.mp-feedback strong { color: var(--text-0); }
.mp-bonus { color: var(--accent-gold); font-weight: 600; margin-left: 6px; }

/* Results */
.mp-results { margin-top: 28px; }
.mp-results-head { text-align: center; margin-bottom: 36px; }
.mp-results-head .mp-lede { margin-left: auto; margin-right: auto; }
.mp-ribbon-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
}
.mp-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.mp-stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--text-0);
  line-height: 1;
  margin-bottom: 6px;
}
.mp-stat-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.mp-roundup { margin-bottom: 32px; }
.mp-roundup h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 18px;
}
.mp-roundup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-roundup-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
}
.mp-roundup-row.ok   { border-left-color: oklch(0.7 0.15 150); }
.mp-roundup-row.miss { border-left-color: var(--accent-red); }
.mp-roundup-num {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.mp-roundup-pic {
  width: 48px; height: 64px;
  overflow: hidden;
  border-radius: 4px;
  display: grid;
  place-items: center;
}
.mp-roundup-pic svg { transform: scale(0.16); transform-origin: center; }
.mp-roundup-name { font-family: var(--font-display); font-size: 15px; color: var(--text-0); }
.mp-roundup-era  { font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; margin-top: 2px; }
.ok-pill {
  font-size: 12px;
  font-weight: 600;
  color: oklch(0.85 0.15 150);
  background: oklch(0.32 0.14 150 / 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}
.miss-pill {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}

.mp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Mobile overrides */
@media (max-width: 768px) {
  .mp-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 18px;
  }
  .mp-title { font-size: 36px; }
  .mp-lede { font-size: 14.5px; }
  .mp-hud { grid-template-columns: 1fr; gap: 12px; padding: 12px 16px; }
  .mp-hud-progress { order: 3; }
  .mp-hud-right { justify-content: space-between; }
  .mp-stage { grid-template-columns: 1fr; gap: 24px; }
  .mp-portrait-wrap svg { width: 100%; height: auto; max-width: 320px; }
  .mp-prompt-q { font-size: 24px; margin-bottom: 18px; }
  .mp-choices { grid-template-columns: 1fr; }
  .mp-choice-name { font-size: 16px; }
  .mp-ribbon-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; text-align: center; }
  .mp-stat-grid { gap: 16px; }
  .mp-stat-num { font-size: 26px; }
  .mp-roundup-grid { grid-template-columns: 1fr; }
}

/* ============================================
   MOBILE RESPONSIVE — < 768px
   ============================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --topbar-h: 60px;
  }

  html { scroll-padding-top: 60px; }
  html, body { font-size: 15px; }

  /* App shell — collapse sidebar entirely */
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas:
      "topbar"
      "main";
  }
  .sidebar { display: none; }

  /* Topbar — tighten and hide non-essentials */
  .topbar {
    padding: 0 14px 0 0;
    gap: 8px;
  }
  .topbar .menu-btn {
    width: 52px;
    height: var(--topbar-h);
  }
  .wordmark {
    padding-right: 12px;
    margin-right: 0;
    border-right: none;
    height: 40px;
    gap: 8px;
  }
  .wordmark-icon { width: 32px; height: 32px; }
  .wordmark-icon img { height: 28px !important; }
  .wordmark-text .title { font-size: 12px; letter-spacing: 0.1em; }
  .wordmark-text .sub { font-size: 8.5px; letter-spacing: 0.18em; margin-top: 2px; }
  .topnav { display: none; }
  .topbar-actions { gap: 4px; margin-left: auto; }
  .topbar-actions .icon-btn { width: 36px; height: 36px; }
  .topbar-actions .search-pill {
    padding: 6px 10px;
    font-size: 12px;
    max-width: 140px;
  }
  .topbar-actions .search-pill span:not(.search-key) { display: none; }
  .topbar-actions .search-key { display: none; }

  /* Menu drawer — full-width on mobile */
  .menu-drawer { width: 85vw; max-width: 320px; }

  /* Main — bumped bottom padding */
  .main { padding: 16px 16px 64px; }

  /* Hero — tightened, room label & dots moved below */
  .hero {
    height: auto;
    min-height: 420px;
    border-radius: var(--radius-md);
  }
  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 28px;
    top: auto;
    max-width: none;
  }
  .hero-title { font-size: 30px; line-height: 1.05; margin-bottom: 10px; }
  .hero-desc { font-size: 13px; margin-bottom: 14px; }
  .hero-eyebrow { font-size: 10px; margin-bottom: 10px; }
  .hero-actions { flex-wrap: wrap; gap: 8px; }
  /* Hide overlapping room label and dots inside the hero on mobile */
  .hero-room-label { display: none; }
  .hero-dots {
    position: static;
    margin-top: 12px;
    justify-content: center;
    padding: 6px 0;
  }

  /* Tap targets — Apple HIG ≥44pt */
  .btn { padding: 12px 16px; font-size: 13.5px; min-height: 44px; }

  /* Section heads */
  .section { margin-top: 32px; }
  .section-head h2 { font-size: 22px; }
  .view-all { font-size: 12px; min-height: 44px; }

  /* Stories scroll cards — snap */
  .story-card { flex: 0 0 240px; }
  .story-img { height: 140px; }
  .stories-scroll { scroll-snap-type: x mandatory; }
  .story-card { scroll-snap-align: start; }

  /* Room grid — 1 column */
  .rooms-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .room-card { height: 220px; }

  /* All multi-column grids → 1 column on mobile */
  .tours-grid,
  .highlights-grid,
  .quick-links,
  .objects-grid,
  .stories-grid,
  .learn-grid,
  .explore-grid,
  .games-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* Story featured — stack image on top */
  .story-featured {
    grid-template-columns: 1fr !important;
  }
  .story-featured-img { min-height: 200px; }
  .story-featured-overlay { display: none; }
  .story-featured-content { padding: 24px !important; }
  .story-featured-content h2 { font-size: 24px; }

  /* Explore hero */
  .explore-hero {
    padding: 28px 22px;
    border-radius: var(--radius-md);
  }
  .explore-hero h1 { font-size: 28px; }
  .explore-hero p { font-size: 14px; }

  /* Filter bar — snap */
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .filter-chip { white-space: nowrap; flex-shrink: 0; font-size: 12px; padding: 8px 14px; min-height: 38px; scroll-snap-align: start; }

  /* Room detail hero */
  .room-hero { height: 360px !important; }
  .room-hero h1 { font-size: 32px !important; }
  .room-hero .info {
    padding: 0 20px 20px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .room-hero .meta { font-size: 13px; }
  .room-stats { gap: 16px; }
  .room-stats .stat { text-align: left; }
  .room-stats .stat .n { font-size: 18px !important; }
  .room-stats .stat .l { font-size: 10px; }

  /* Hero actions on detail pages */
  .hero-actions { flex-wrap: wrap; }

  /* Room body — stack columns */
  .room-body {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .prose h3 { font-size: 18px; }
  .prose p { font-size: 14.5px; }

  /* Sidebar panels */
  .sidebar-panel { padding: 16px; }

  /* Object cards */
  .object-card { padding: 10px; gap: 12px; }
  .obj-thumb { width: 64px; height: 64px; }
  .obj-info h4 { font-size: 14px; }
  .obj-info p { font-size: 12px; }

  /* Object collection cards */
  .obj-collection-img { height: 180px; }

  /* Stories grid */
  .story-grid-img { height: 160px; }

  /* Story chapter nav — snap */
  .story-chapter-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .story-chapter-btn { flex-shrink: 0; font-size: 12px; padding: 10px 14px; min-height: 44px; scroll-snap-align: start; }

  /* Object stories list */
  .obj-story-link { padding: 14px; gap: 12px; }
  .obj-story-num { font-size: 18px; width: 24px; }
  .obj-story-link h4 { font-size: 14px; }

  /* Quiz */
  .quiz-card { padding: 24px 20px; }
  .quiz-card h2 { font-size: 22px; }
  .quiz-options { gap: 8px; }
  .quiz-option { padding: 14px 16px; font-size: 13.5px; min-height: 48px; }

  /* Back button */
  .back-btn { font-size: 13px; padding: 10px 14px; min-height: 40px; }

  /* Tweaks panel */
  .tweaks-panel { width: 92vw !important; max-width: 360px; right: 8px !important; }
}

/* Small mobile — iPhone SE etc. */
@media (max-width: 380px) {
  .wordmark-text .title { font-size: 10.5px; letter-spacing: 0.08em; }
  .wordmark-text .sub { font-size: 7.5px; letter-spacing: 0.14em; }
  .wordmark-icon { width: 28px; height: 28px; }
  .wordmark-icon img { height: 24px !important; }
  .topbar .menu-btn { width: 44px; }
  .hero-title { font-size: 26px; }
  .room-hero h1 { font-size: 26px !important; }
  .main { padding: 14px 12px 56px; }
}

/* ============ Architectural History Module ============ */
.arch-module { animation: pageIn 0.35s ease; }

.arch-progress {
  margin: 28px 0 24px;
  padding: 18px 22px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.arch-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.arch-progress-eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.arch-progress-title {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text-0);
}
.arch-progress-pct {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}
.arch-progress-bar {
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.arch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
  transition: width 0.4s ease;
}

.arch-chapter-nav .story-chapter-btn.complete {
  border-color: oklch(0.65 0.15 145 / 0.35);
}
.arch-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: oklch(0.65 0.15 145);
  color: white;
  margin-left: 6px;
}

.arch-chapter-body {
  margin-top: 28px;
  animation: pageIn 0.4s ease;
}
.arch-chapter-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: start;
}
.arch-chapter-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-2);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}
.arch-chapter-kicker { color: var(--accent-gold); }
.arch-chapter-dot { color: var(--text-3); }
.arch-chapter-meta svg { color: var(--accent-gold); margin-right: 2px; }
.arch-chapter-title {
  font-family: var(--font-display);
  font-size: 38px;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.arch-chapter-p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-1);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.arch-pullquote {
  margin: 28px 0 8px;
  padding: 22px 26px;
  border-left: 3px solid var(--accent-gold);
  background: linear-gradient(90deg, oklch(0.7 0.13 80 / 0.08), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}
.arch-pullquote-mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.6;
  color: var(--accent-gold);
  opacity: 0.5;
  margin-bottom: 4px;
}
.arch-pullquote-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--text-0);
  line-height: 1.45;
  margin-bottom: 10px;
  text-wrap: balance;
}
.arch-pullquote-attr {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-2);
  text-transform: uppercase;
  font-weight: 600;
}

.arch-chapter-side { position: sticky; top: 80px; }
.arch-chapter-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.arch-side-card {
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.arch-side-eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.arch-term {
  border-top: 1px solid var(--line-soft);
  padding: 12px 0;
  cursor: pointer;
}
.arch-term:first-of-type { border-top: none; padding-top: 4px; }
.arch-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-0);
}
.arch-term-word {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.arch-term-def {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-1);
  line-height: 1.55;
}

/* Compare slider */
.arch-compare {
  margin: 36px 0;
  padding: 24px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.arch-compare-eyebrow {
  font-size: 10px; letter-spacing: 0.28em;
  color: var(--accent-gold); text-transform: uppercase;
  font-weight: 600; margin-bottom: 8px;
}
.arch-compare-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 6px;
}
.arch-compare-sub { color: var(--text-2); margin: 0 0 18px; font-size: 14px; }
.arch-compare-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  user-select: none;
}
.arch-compare-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.arch-compare-label {
  position: absolute;
  top: 14px;
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; font-weight: 600;
  color: white;
  padding: 6px 12px;
  background: oklch(0.12 0.04 260 / 0.7);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}
.arch-compare-label.left { left: 14px; }
.arch-compare-label.right { right: 14px; }
.arch-compare-divider {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: white;
  box-shadow: 0 0 12px oklch(0 0 0 / 0.5);
  transform: translateX(-1px);
  pointer-events: none;
}
.arch-compare-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--bg-0);
  display: grid; place-items: center;
  grid-auto-flow: column;
  gap: 0;
  box-shadow: 0 4px 14px oklch(0 0 0 / 0.4);
}
.arch-compare-range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

/* Inline knowledge check */
.arch-check-card {
  margin: 36px 0 8px;
  padding: 26px;
  background: linear-gradient(180deg, oklch(0.5 0.18 255 / 0.08), var(--bg-1));
  border: 1px solid oklch(0.5 0.18 255 / 0.25);
  border-radius: var(--radius-md);
}
.arch-check-eyebrow {
  font-size: 10px; letter-spacing: 0.28em;
  color: var(--accent-blue); text-transform: uppercase;
  font-weight: 600; margin-bottom: 8px;
}
.arch-check-q {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 18px;
  text-wrap: balance;
}
.arch-check-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.arch-check-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 14px;
  color: var(--text-1);
  transition: all 0.15s;
}
.arch-check-opt:hover:not(:disabled) {
  border-color: var(--accent-blue);
  color: var(--text-0);
}
.arch-check-opt.correct {
  background: oklch(0.55 0.16 145 / 0.18);
  border-color: oklch(0.65 0.15 145);
  color: var(--text-0);
}
.arch-check-opt.wrong {
  background: oklch(0.5 0.18 25 / 0.18);
  border-color: oklch(0.6 0.18 25);
  color: var(--text-0);
}
.arch-check-opt.disabled { opacity: 0.5; }
.arch-check-letter {
  font-family: var(--font-display);
  color: var(--text-3);
  width: 16px;
}
.arch-check-text { flex: 1; }
.arch-check-explain {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13.5px;
  line-height: 1.6;
}
.arch-check-explain strong {
  color: var(--accent-gold);
  font-weight: 600;
  margin-right: 4px;
}

.arch-nav-row {
  display: flex;
  align-items: center;
  margin-top: 28px;
}

/* Timeline */
.arch-timeline-section {
  margin: 56px 0 36px;
  padding: 36px 0 56px;
  border-top: 1px solid var(--line-soft);
}
.arch-section-head { margin-bottom: 32px; }
.arch-section-eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.arch-section-title {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.arch-section-sub {
  color: var(--text-2);
  margin: 0;
  font-size: 14.5px;
  max-width: 600px;
}
.arch-timeline {
  position: relative;
  height: 130px;
  margin: 0 24px;
}
.arch-timeline-line {
  position: absolute;
  top: 22px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.arch-timeline-pt {
  position: absolute;
  transform: translateX(-50%);
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.arch-timeline-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--line);
  margin: 16px 0 8px;
  transition: all 0.2s;
}
.arch-timeline-pt:hover .arch-timeline-dot,
.arch-timeline-pt.active .arch-timeline-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: scale(1.2);
  box-shadow: 0 0 14px oklch(0.7 0.13 80 / 0.5);
}
.arch-timeline-year {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-0);
  font-weight: 600;
}
.arch-timeline-label {
  font-size: 11px;
  color: var(--text-2);
  text-align: center;
  margin-top: 4px;
  line-height: 1.3;
  text-wrap: pretty;
}
.arch-timeline-pt.active .arch-timeline-year { color: var(--accent-gold); }

/* Final quiz */
.arch-final-quiz {
  margin: 36px 0;
  padding: 36px;
  background:
    linear-gradient(180deg, oklch(0.5 0.18 255 / 0.1), oklch(0.7 0.13 80 / 0.04)),
    var(--bg-1);
  border: 1px solid oklch(0.5 0.18 255 / 0.3);
  border-radius: var(--radius-lg);
}
.arch-quiz-card { background: var(--bg-2); border: 1px solid var(--line-soft); }
.arch-quiz-step {
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--accent-gold); text-transform: uppercase;
  font-weight: 600; margin-bottom: 14px;
}
.arch-quiz-explain {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-1);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13.5px;
  line-height: 1.6;
}

.arch-quiz-result {
  text-align: center;
  padding: 40px 32px;
}
.arch-quiz-ribbon { display: flex; justify-content: center; margin-bottom: 18px; }
.arch-ribbon-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 32px;
  background: linear-gradient(180deg, oklch(0.7 0.13 80 / 0.2), oklch(0.7 0.13 80 / 0.05));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  color: var(--accent-gold);
}
.arch-ribbon-badge.dim {
  border-color: var(--line);
  background: var(--bg-2);
  color: var(--text-2);
}
.arch-ribbon-label {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.arch-quiz-score {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 8px;
}
.arch-quiz-score span { color: var(--text-3); font-size: 36px; }
.arch-quiz-msg {
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 28px;
}
.arch-quiz-actions { display: flex; gap: 10px; justify-content: center; }

/* Related */
.arch-related { margin: 36px 0; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.arch-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .arch-chapter-grid { grid-template-columns: 1fr; gap: 24px; }
  .arch-chapter-side { position: static; }
  .arch-chapter-title { font-size: 26px; }
  .arch-check-options { grid-template-columns: 1fr; }
  .arch-timeline { overflow-x: auto; height: auto; }
  .arch-timeline-pt { position: static; transform: none; width: auto; flex-direction: row; gap: 12px; padding: 10px 0; text-align: left; }
  .arch-timeline-pt .arch-timeline-dot { margin: 0; }
  .arch-timeline-line { display: none; }
  .arch-related-grid { grid-template-columns: 1fr; }
  .arch-final-quiz { padding: 22px; }
  .arch-quiz-score { font-size: 48px; }
  .arch-section-title { font-size: 24px; }
  .arch-pullquote-text { font-size: 16px; }
}

/* ============ Lesson Plans Module ============ */
.lp-module { animation: pageIn 0.35s ease; }

.lp-grade-filter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}
.lp-grade-btn {
  padding: 16px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  text-align: left;
  transition: all 0.2s;
  cursor: pointer;
}
.lp-grade-btn:hover { border-color: var(--line); }
.lp-grade-btn.active {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
}
.lp-grade-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 2px;
}
.lp-grade-sub {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.08em;
}

.lp-overview {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 36px;
  animation: pageIn 0.35s ease;
}
.lp-plan-title {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lp-plan-sub {
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.lp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.lp-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.lp-meta-chip svg { color: var(--accent-gold); }

.lp-essential {
  margin-bottom: 24px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent-gold);
  background: linear-gradient(90deg, oklch(0.7 0.13 80 / 0.08), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.lp-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.lp-essential-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--text-0);
  line-height: 1.45;
  text-wrap: balance;
}

.lp-section { margin-bottom: 20px; }
.lp-objectives {
  margin: 0;
  padding-left: 18px;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.65;
}
.lp-objectives li { margin-bottom: 6px; }
.lp-objectives li::marker { color: var(--accent-blue); }

.lp-overview-side { position: sticky; top: 80px; }
.lp-side-card {
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.lp-materials {
  margin: 0;
  padding-left: 16px;
  color: var(--text-1);
  font-size: 13.5px;
  line-height: 1.55;
}
.lp-materials li { margin-bottom: 4px; }
.lp-materials li::marker { color: var(--accent-gold); }

.lp-vocab-item {
  border-top: 1px solid var(--line-soft);
  padding: 10px 0;
  cursor: pointer;
}
.lp-vocab-item:first-of-type { border-top: none; padding-top: 2px; }
.lp-vocab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-0);
}
.lp-vocab-word {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.lp-vocab-def {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.5;
}

/* Session detail */
.lp-session-section {
  margin: 36px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.lp-session-detail {
  margin-top: 24px;
  animation: pageIn 0.35s ease;
}
.lp-session-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.lp-session-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.lp-session-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 4px;
  font-weight: 700;
}
.lp-session-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.lp-session-time svg { color: var(--accent-gold); }

/* Steps timeline */
.lp-steps { display: flex; flex-direction: column; gap: 0; }
.lp-step {
  display: flex;
  gap: 18px;
  min-height: 80px;
}
.lp-step.activity .lp-step-content {
  background: linear-gradient(135deg, oklch(0.5 0.18 255 / 0.06), oklch(0.7 0.13 80 / 0.04));
  border: 1px solid oklch(0.5 0.18 255 / 0.2);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.lp-step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
  flex-shrink: 0;
}
.lp-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.lp-step.activity .lp-step-num {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}
.lp-step-line {
  flex: 1;
  width: 1px;
  background: var(--line-soft);
  min-height: 20px;
}
.lp-step-content {
  flex: 1;
  padding-bottom: 20px;
}
.lp-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.lp-step-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-0);
}
.lp-step-time {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.lp-step-badge {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  padding: 3px 10px;
  border-radius: 999px;
}
.lp-step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.65;
  text-wrap: pretty;
}

.lp-assessment {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.lp-assessment p {
  margin: 0;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.6;
}

/* Standards */
.lp-standards-section {
  margin: 36px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.lp-standards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.lp-standard-card {
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.lp-standard-code {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.lp-standard-text {
  font-size: 13.5px;
  color: var(--text-1);
  line-height: 1.5;
}

/* Extensions */
.lp-extensions-section {
  margin: 36px 0;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.lp-extensions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.lp-extension-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.lp-extension-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  opacity: 0.5;
  flex-shrink: 0;
  width: 28px;
}
.lp-extension-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .lp-grade-filter { grid-template-columns: 1fr; }
  .lp-overview { grid-template-columns: 1fr; gap: 20px; }
  .lp-overview-side { position: static; }
  .lp-plan-title { font-size: 24px; }
  .lp-standards-grid { grid-template-columns: 1fr; }
  .lp-extensions-grid { grid-template-columns: 1fr; }
  .lp-essential-text { font-size: 16px; }
  .lp-session-title { font-size: 20px; }
}
