/* ==========================================================================
   COMPOUNDOLOGY STUDIO // 12-KINETIC-COLOR
   Style Direction: "06 + Living Color Blocks"
   Warm Rice-Gray / Chalk-Beige Base x Massive Kinetic Typography
   05's Living Color Bento (Warm Yellow #F6D84F, Sky Blue #B8DAF5, Ink Black #141818, Chalk Cream)
   Interactive Draggable Horizontal Book Shelf + 3D Tilt Wave Reaction
   ========================================================================== */

:root {
  /* Rice-Gray Base (Light Mode Default) */
  --bg: #f3eee2;
  --bg-subtle: #e8e1cf;
  --bg-elevated: #ddd5c0;
  --bg-card: #fbf8f1;
  --text: #26241f;
  --text-muted: #4d4a41;
  --text-dim: #889096;
  --border: rgba(20, 24, 25, 0.12);
  --border-strong: rgba(20, 24, 25, 0.3);
  --border-focus: #26241f;
  --line-hairline: rgba(20, 24, 25, 0.08);

  /* 05 Vibrant Kinetic Color Palette */
  --color-yellow: #cdd4c2;
  --color-yellow-light: #e4e7da;
  --color-yellow-dark: #6f7d63;
  --color-blue: #e8e1cf;
  --color-blue-light: #efe9db;
  --color-blue-dark: #8f1f3d;
  --color-ink: #26241f;
  --color-ink-light: #34312b;
  --color-cream: #fbf8f1;
  --color-terracotta: #8f1f3d;
  --color-green: #6f7d63;

  /* Typography Stacks */
  --f-display-latin: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-italic-latin: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
  --f-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-serif: 'Noto Serif TC', Georgia, serif;
  --f-mono: 'Space Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Motion & Dynamics */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-spring);
  --transition-normal: 0.35s var(--ease-spring);
  --transition-slow: 0.6s var(--ease-spring);

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-bento: 4px 4px 0px rgba(20, 24, 25, 0.9);
}

/* Explicit Dark Theme via data-theme="dark" */
[data-theme="dark"] {
  --bg: #1b1a16;
  --bg-subtle: #24221d;
  --bg-elevated: #2e2c26;
  --bg-card: #211f1a;
  --text: #f3eee2;
  --text-muted: #9DA3AA;
  --text-dim: #656C74;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.32);
  --border-focus: #4a5540;
  --line-hairline: rgba(255, 255, 255, 0.08);

  --color-yellow: #5d6853;
  --color-yellow-light: #262b22;
  --color-yellow-dark: #4a5540;
  --color-blue: #2e2c26;
  --color-blue-light: #24221d;
  --color-blue-dark: #b8566d;
  --color-ink: #12110e;
  --color-ink-light: #26241f;
  --color-cream: #24221d;
  --color-terracotta: #b8566d;
  --color-green: #8f9c82;

  --shadow-bento: 4px 4px 0px rgba(111, 125, 99, 0.85);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Top Scroll Progress Indicator */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-yellow), var(--color-blue), var(--color-terracotta));
  z-index: 1000;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--color-yellow);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  z-index: 1100;
  transition: top 0.2s var(--ease-spring);
  text-decoration: none;
  border: 2px solid var(--color-ink);
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-ink);
}

/* Custom Interactive Cursor Followers */
.custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: var(--color-yellow);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease-spring), height 0.2s var(--ease-spring), background-color 0.2s;
  mix-blend-mode: difference;
}
.custom-cursor-aura {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--color-yellow);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.25s var(--ease-spring), height 0.25s var(--ease-spring), border-color 0.2s;
}
.custom-cursor.cursor-hover {
  width: 22px;
  height: 22px;
  background-color: var(--color-blue);
}
.custom-cursor-aura.cursor-hover {
  width: 56px;
  height: 56px;
  border-color: var(--color-blue);
  background-color: rgba(111, 125, 99, 0.12);
}

@media (hover: none) or (pointer: coarse) {
  .custom-cursor, .custom-cursor-aura {
    display: none !important;
  }
}

/* Top Kinetic HUD Ticker */
.top-ticker {
  background-color: var(--color-ink);
  color: #FFFFFF;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  user-select: none;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 0;
  position: relative;
  z-index: 80;
}
[data-theme="dark"] .top-ticker {
  background-color: #0A0C0E;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.ticker-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
  animation: tickerScroll 32s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.75rem;
}
.ticker-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-yellow);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 1.6s infinite ease-in-out;
}
.ticker-highlight {
  color: var(--accent-text);
  font-weight: 700;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Main Site Header */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(243, 238, 226, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 70;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}
[data-theme="dark"] .site-header {
  background-color: rgba(27, 26, 22, 0.92);
}
.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* COMPOUND/OLOGY Iconic Brandmark Lockup */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition-fast);
}
.brand-link:hover {
  transform: translateY(-1px);
}
.brand-mark {
  width: 42px;
  height: 42px;
  background-color: var(--color-yellow);
  color: var(--on-accent);
  font-family: var(--f-display-latin);
  font-weight: 800;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 2px solid var(--color-ink);
  box-shadow: 2px 2px 0px var(--color-ink);
  position: relative;
  transition: all var(--transition-fast);
}
.brand-mark-dot {
  color: var(--color-terracotta);
  font-size: 0.9rem;
  margin-left: 1px;
}
.brand-link:hover .brand-mark {
  background-color: var(--color-blue);
  box-shadow: 3px 3px 0px var(--color-ink);
  transform: rotate(-3deg);
}
[data-theme="dark"] .brand-mark {
  border-color: var(--color-yellow);
  box-shadow: 2px 2px 0px var(--color-yellow);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  font-family: var(--f-display-latin);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.brand-name span {
  font-weight: 600;
  opacity: 0.85;
}
.brand-sub {
  font-size: 0.6875rem;
  font-family: var(--f-mono);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Primary Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}
.nav-link:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text);
}
.nav-link.active {
  background-color: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 1.5px 1.5px 0px var(--color-ink);
  font-weight: 700;
}
[data-theme="dark"] .nav-link.active {
  box-shadow: 1.5px 1.5px 0px var(--color-yellow);
}
.nav-pill-badge {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  padding: 0.1rem 0.35rem;
  background-color: var(--color-blue);
  color: var(--on-accent);
  border-radius: 3px;
  font-weight: 700;
}

/* Header Utilities */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
  background: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 2px 2px 0px var(--color-ink);
}
.mobile-menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(20, 24, 25, 0.7);
  z-index: 999;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 82%;
  max-width: 360px;
  height: 100%;
  background-color: var(--bg);
  border-left: 2px solid var(--border-strong);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}
.mobile-nav-drawer.open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.mobile-nav-close {
  background: transparent;
  border: 1px solid var(--border-strong);
  font-family: var(--f-mono);
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text);
}
.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-nav-links .nav-link {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

/* Layout Containers & Grids */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
.section-spacer {
  padding: clamp(3rem, 6vw, 6.5rem) 0;
}
.section-spacer-sm {
  padding: clamp(1.75rem, 3.5vw, 3.5rem) 0;
}

/* Kinetic Type System (From 06) */
.t-mega {
  font-family: var(--f-sans);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.t-display {
  font-family: var(--f-sans);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.t-heading {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  line-height: 1.25;
}
.t-subheading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-muted);
}
.t-mono {
  font-family: var(--f-mono);
  letter-spacing: -0.01em;
}
.t-serif-italic {
  font-family: var(--f-italic-latin);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* The Signature Hollow English Outline (With Hover Color Infill) */
.t-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  transition: all var(--transition-normal);
  cursor: pointer;
  display: inline-block;
}
.t-outline:hover {
  color: var(--accent-text);
  -webkit-text-stroke: 1.5px var(--color-ink);
  text-shadow: 2px 2px 0px var(--color-ink);
  transform: translateY(-2px) skewX(-4deg);
}
[data-theme="dark"] .t-outline {
  -webkit-text-stroke: 1.5px #FFFFFF;
}
[data-theme="dark"] .t-outline:hover {
  color: var(--accent-text);
  -webkit-text-stroke: 1.5px var(--color-yellow);
  text-shadow: 0 0 16px rgba(111, 125, 99, 0.4);
}
.t-outline-blue:hover {
  color: var(--color-blue) !important;
  -webkit-text-stroke: 1.5px var(--color-ink) !important;
}

/* Staggered Text Line Reveal Container */
.reveal-line {
  overflow: hidden;
  display: block;
}
.reveal-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-inner.revealed {
  transform: translateY(0%);
  opacity: 1;
}

/* Magnetic Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  border: 2px solid var(--color-ink);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.btn-yellow {
  background-color: var(--color-yellow);
  color: var(--on-accent);
  box-shadow: 3px 3px 0px var(--color-ink);
}
.btn-yellow:hover {
  background-color: #cdd4c2;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--color-ink);
}
.btn-blue {
  background-color: var(--color-blue);
  color: var(--on-accent);
  box-shadow: 3px 3px 0px var(--color-ink);
}
.btn-blue:hover {
  background-color: #e8e1cf;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--color-ink);
}
.btn-ink {
  background-color: var(--color-ink);
  color: #FFFFFF;
  border-color: var(--color-ink);
  box-shadow: 3px 3px 0px var(--color-yellow);
}
.btn-ink:hover {
  background-color: var(--color-ink-light);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--color-yellow);
}
.btn-ghost {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background-color: var(--bg-card);
  border-color: var(--text);
  transform: translate(-1px, -1px);
}
[data-theme="dark"] .btn-yellow,
[data-theme="dark"] .btn-blue {
  border-color: #000000;
  box-shadow: 3px 3px 0px var(--color-yellow);
}
[data-theme="dark"] .btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Badge Pill Tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
}
.badge-tag.yellow {
  background: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
}
.badge-tag.blue {
  background: var(--color-blue);
  color: var(--on-accent);
  border-color: var(--color-ink);
}
.badge-tag.ink {
  background: var(--color-ink);
  color: #FFFFFF;
  border-color: var(--color-yellow);
}

/* ==========================================================================
   LIVING BENTO GRID SYSTEM (05 + 06 FUSION)
   Dynamic Color Blocks that Slide In, Expand, Push on Scroll
   ========================================================================== */
.bento-kinetic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* Individual Bento Block Base */
.bento-tile {
  position: relative;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  background-color: var(--bg-card);
  padding: clamp(1.5rem, 2.8vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  will-change: transform;
}
.bento-tile:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0px var(--color-ink);
  border-color: var(--color-ink);
}
[data-theme="dark"] .bento-tile:hover {
  box-shadow: 6px 6px 0px var(--color-yellow);
  border-color: var(--color-yellow);
}

/* Specific Bento Color Personalities (05's Colors) */
.tile-yellow {
  background-color: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 4px 4px 0px var(--color-ink);
}
.tile-yellow .text-muted-custom {
  color: rgba(20, 24, 25, 0.75);
}
.tile-blue {
  background-color: var(--color-blue);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 4px 4px 0px var(--color-ink);
}
.tile-blue .text-muted-custom {
  color: rgba(20, 24, 25, 0.75);
}
.tile-ink {
  background-color: var(--color-ink);
  color: #FFFFFF;
  border-color: var(--color-ink);
  box-shadow: 4px 4px 0px var(--color-yellow);
}
.tile-ink .text-muted-custom {
  color: rgba(255, 255, 255, 0.7);
}
.tile-cream {
  background-color: var(--color-cream);
  color: var(--text);
  border-color: var(--border-strong);
}
[data-theme="dark"] .tile-yellow {
  background-color: #3b4234;
  color: #f3eee2;
  border-color: #000000;
  box-shadow: 4px 4px 0px var(--color-yellow);
}
[data-theme="dark"] .tile-blue {
  background-color: #2e2c26;
  color: #f3eee2;
  border-color: #000000;
  box-shadow: 4px 4px 0px #12110e;
}
[data-theme="dark"] .tile-ink {
  background-color: #12110e;
  color: #F5F4EE;
  border-color: var(--border-strong);
  box-shadow: 4px 4px 0px var(--color-yellow);
}
[data-theme="dark"] .tile-cream {
  background-color: #24221d;
  color: #F5F4EE;
  border-color: var(--border);
}

/* Kinetic Push / Scroll Shift Attributes */
.kinetic-shift {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.kinetic-shift.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Circular Orbit Floating Text Badge (05 signature) */
.kinetic-orbit-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1.5px dashed var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.15;
  animation: orbitSpin 24s linear infinite;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.2);
}
.kinetic-orbit-badge b {
  font-family: var(--f-sans);
  font-size: 0.6875rem;
  color: var(--on-accent);
}
@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   DRAGGABLE & HORIZONTALLY SCROLLABLE BOOK CARD WALL
   "書卡牆做成可拖曳／橫向捲動的一排，hover 傾斜。整體明亮、有活力。"
   ========================================================================== */
.book-shelf-section {
  position: relative;
  padding: 3.5rem 0;
  background: var(--bg-subtle);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  overflow: hidden;
}
.book-shelf-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.shelf-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.shelf-arrow-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 1.125rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.shelf-arrow-btn:hover {
  background: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 2px 2px 0px var(--color-ink);
}

.book-shelf-viewport {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: var(--color-yellow) transparent;
  padding: 1.5rem 0 2.5rem 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.book-shelf-viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.book-shelf-viewport::-webkit-scrollbar {
  height: 6px;
}
.book-shelf-viewport::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
.book-shelf-viewport::-webkit-scrollbar-thumb {
  background-color: var(--color-yellow);
  border-radius: 3px;
}

.book-shelf-track {
  display: inline-flex;
  gap: 1.5rem;
  padding: 0 1.5rem;
  perspective: 1000px;
}

/* Individual 3D Interactive Book Card */
.book-card-item {
  flex: 0 0 240px;
  width: 240px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 0px var(--color-ink);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), border-color 0.25s;
  text-decoration: none;
  color: var(--text);
  transform-style: preserve-3d;
  position: relative;
}
[data-theme="dark"] .book-card-item {
  box-shadow: 3px 3px 0px rgba(255, 255, 255, 0.2);
}
.book-card-item:hover {
  transform: translateY(-8px) rotateY(-4deg) rotateX(4deg) scale(1.03);
  box-shadow: 8px 14px 20px rgba(0, 0, 0, 0.16);
  border-color: var(--color-yellow);
  z-index: 10;
}
[data-theme="dark"] .book-card-item:hover {
  box-shadow: 8px 14px 25px rgba(111, 125, 99, 0.25);
  border-color: var(--color-yellow);
}

/* Neighboring Wave Reaction Class */
.book-card-item.wave-neighbor-left {
  transform: translateY(-4px) rotateY(-8deg) scale(1.01);
}
.book-card-item.wave-neighbor-right {
  transform: translateY(-4px) rotateY(8deg) scale(1.01);
}

.book-cover-wrap {
  width: 100%;
  aspect-ratio: 1 / 1.45;
  background-color: var(--bg-subtle);
  overflow: hidden;
  position: relative;
  border-bottom: 2px solid var(--border);
}
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-spring);
  display: block;
}
.book-card-item:hover .book-cover-img {
  transform: scale(1.06);
}
.book-badge-overlay {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--color-ink);
  color: #FFFFFF;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
  border: 1px solid var(--color-yellow);
}
.book-card-body {
  padding: 1rem 1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.book-card-title {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.book-card-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--f-mono);
  margin-bottom: 0.75rem;
}
.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  font-size: 0.75rem;
  font-family: var(--f-mono);
  color: var(--text-muted);
}
.book-card-link-icon {
  font-weight: 700;
  color: var(--on-accent);
  transition: transform var(--transition-fast);
}
[data-theme="dark"] .book-card-link-icon {
  color: var(--accent-text);
}
.book-card-item:hover .book-card-link-icon {
  transform: translate(3px, -3px);
}

/* ==========================================================================
   STICKY SCROLL NARRATIVE SECTION
   "至少一處視差或釘選（sticky/pin）敘事"
   ========================================================================== */
.sticky-narrative-section {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) 0;
  border-bottom: 2px solid var(--border);
}
.narrative-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 3rem;
  align-items: start;
}
.narrative-pinned-panel {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.narrative-steps-flow {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.narrative-step-card {
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  padding: 2rem;
  background: var(--bg-card);
  box-shadow: 4px 4px 0px var(--color-ink);
  transition: all var(--transition-normal);
  position: relative;
}
[data-theme="dark"] .narrative-step-card {
  box-shadow: 4px 4px 0px var(--color-yellow);
}
.narrative-step-card.active-step {
  border-color: var(--color-yellow);
  background: var(--bg-subtle);
  transform: translateX(12px);
}
.step-num-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  background: var(--color-yellow);
  color: var(--on-accent);
  border: 1.5px solid var(--color-ink);
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* ==========================================================================
   DUAL MARQUEES & SPEED DYNAMICS
   ========================================================================== */
.kinetic-marquee-band {
  background: var(--color-yellow);
  color: var(--on-accent);
  padding: 0.85rem 0;
  overflow: hidden;
  user-select: none;
  border-top: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .kinetic-marquee-band {
  background: #4a5540;
  color: #f3eee2;
  border-color: #000000;
}
.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
}
.marquee-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-family: var(--f-display-latin);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  padding-right: 2.5rem;
}
.marquee-content span.star {
  color: var(--color-terracotta);
  font-size: 1.2rem;
}

/* Weekly Feature Bento Box */
.weekly-bento-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  background-color: var(--color-yellow);
  color: var(--on-accent);
  border: 2px solid var(--color-ink);
  border-radius: 8px;
  padding: clamp(1.75rem, 3.5vw, 3rem);
  box-shadow: 6px 6px 0px var(--color-ink);
  align-items: center;
}
[data-theme="dark"] .weekly-bento-card {
  background-color: #4a5540;
  border-color: #000000;
  box-shadow: 6px 6px 0px var(--color-yellow);
}
.weekly-art-frame {
  position: relative;
  aspect-ratio: 1 / 1.35;
  border-radius: 6px;
  border: 2px solid var(--color-ink);
  overflow: hidden;
  box-shadow: 4px 4px 0px var(--color-ink);
}
.weekly-art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wonder Woods Child Section (with '籌備中' badge) */
.wonder-woods-tile {
  background: linear-gradient(135deg, #e4e7da 0%, #dfe3d3 100%);
  color: #262b22;
  border: 2px solid #55614b;
  box-shadow: 4px 4px 0px #55614b;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .wonder-woods-tile {
  background: linear-gradient(135deg, #1f231b 0%, #262b22 100%);
  color: #e4e7da;
  border-color: #6f7d63;
  box-shadow: 4px 4px 0px #6f7d63;
}
.forest-mark-float {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 8rem;
  font-family: var(--f-serif);
  font-weight: 900;
  opacity: 0.18;
  pointer-events: none;
  line-height: 1;
}

/* Media Page Enhancements */
.media-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  box-shadow: 3px 3px 0px var(--color-ink);
  margin-bottom: 2.5rem;
}
[data-theme="dark"] .media-filter-bar {
  box-shadow: 3px 3px 0px var(--color-yellow);
}
.filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-btn {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--color-yellow);
  color: var(--on-accent);
  border-color: var(--color-ink);
  box-shadow: 2px 2px 0px var(--color-ink);
}
.search-input-wrap {
  position: relative;
  min-width: 240px;
}
.search-input-wrap input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 0.875rem;
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  border-radius: 4px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.search-input-wrap input:focus {
  border-color: var(--color-ink);
  background: var(--bg-card);
}
[data-theme="dark"] .search-input-wrap input:focus {
  border-color: var(--color-yellow);
}
.search-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Audio Player Mock Deck (for episode.html & player bars) */
.audio-player-deck {
  background: var(--color-ink);
  color: #FFFFFF;
  border: 2px solid var(--color-ink);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 4px 4px 0px var(--color-yellow);
  margin: 2rem 0;
}
.player-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.player-controls-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.play-btn-circle {
  width: 48px;
  height: 48px;
  background: var(--color-yellow);
  color: var(--on-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  border: 2px solid var(--color-ink);
  transition: all var(--transition-fast);
}
.play-btn-circle:hover {
  transform: scale(1.08);
  background: #cdd4c2;
}
.player-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}
.wave-bar {
  width: 3px;
  background: var(--color-yellow);
  border-radius: 1px;
  height: 30%;
  transition: height 0.15s ease;
}
.is-playing .wave-bar:nth-child(1) { animation: wavePulse 0.8s infinite 0.1s; }
.is-playing .wave-bar:nth-child(2) { animation: wavePulse 0.8s infinite 0.3s; }
.is-playing .wave-bar:nth-child(3) { animation: wavePulse 0.8s infinite 0.5s; }
.is-playing .wave-bar:nth-child(4) { animation: wavePulse 0.8s infinite 0.2s; }
.is-playing .wave-bar:nth-child(5) { animation: wavePulse 0.8s infinite 0.4s; }
@keyframes wavePulse {
  0%, 100% { height: 20%; }
  50% { height: 95%; }
}

.player-timeline-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  margin: 0.75rem 0;
}
.player-timeline-fill {
  width: 35%;
  height: 100%;
  background: var(--color-yellow);
  border-radius: 3px;
  position: relative;
}
.player-timeline-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -4px;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border: 2px solid var(--color-ink);
  border-radius: 50%;
}

/* Practice Details Collapsibles (practice.html) */
.details-flow-card {
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-card);
  margin-bottom: 1.25rem;
  box-shadow: 2px 2px 0px var(--border-strong);
  transition: border-color var(--transition-fast);
}
.details-flow-card[open] {
  border-color: var(--color-ink);
  box-shadow: 4px 4px 0px var(--color-yellow);
}
[data-theme="dark"] .details-flow-card[open] {
  border-color: var(--color-yellow);
}
.details-flow-summary {
  padding: 1.25rem 1.5rem;
  font-weight: 800;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.details-flow-summary::-webkit-details-marker {
  display: none;
}
.details-flow-summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform var(--transition-fast);
}
.details-flow-card[open] .details-flow-summary::after {
  content: '−';
}
.details-flow-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.details-flow-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-terracotta);
  margin-top: 0.75rem;
}

/* Data Table Clean Design */
.clean-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-card);
  margin: 1.5rem 0;
}
.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}
.clean-table th, .clean-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.clean-table th {
  background: var(--bg-subtle);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.clean-table tr:last-child td {
  border-bottom: none;
}
.clean-table input[type="text"] {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  font-family: var(--f-sans);
  color: var(--text);
  border-radius: 3px;
}

/* Footer Section */
.site-footer {
  margin-top: auto;
  background: var(--color-ink);
  color: #FFFFFF;
  border-top: 3px solid var(--color-yellow);
  padding: 4rem 0 2.5rem 0;
  font-size: 0.875rem;
}
[data-theme="dark"] .site-footer {
  background: #0C0E10;
  border-top-color: var(--color-yellow);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brandmark {
  font-family: var(--f-display-latin);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent-text);
  margin-bottom: 1rem;
}
.footer-col-title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--accent-text);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Print Stylesheet for Practice Observational Table */
@media print {
  .top-ticker, .site-header, .site-footer, .theme-toggle-btn, .custom-cursor, .custom-cursor-aura, #scroll-progress, .btn, .no-print {
    display: none !important;
  }
  body, html {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .details-flow-card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .details-flow-content {
    display: block !important;
  }
  .clean-table {
    border: 1px solid #000000 !important;
  }
  .clean-table th, .clean-table td {
    border: 1px solid #000000 !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (Zero Horizontal Overflow, Mobile 375px Friendly)
   ========================================================================== */
@media (max-width: 1024px) {
  .bento-kinetic-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .narrative-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .narrative-pinned-panel {
    position: static;
  }
  .weekly-bento-card {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
  .bento-kinetic-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .book-card-item {
    flex: 0 0 200px;
    width: 200px;
  }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track {
    animation: none !important;
  }
  .kinetic-shift {
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal-inner {
    transform: none !important;
    opacity: 1 !important;
  }
  .bento-tile:hover, .book-card-item:hover {
    transform: none !important;
  }
}

/* ===== 13-kinetic-night opening (ported verbatim; colors mapped to this palette) ===== */
.story{height:310vh;position:relative}
.story-pin{height:calc(100vh - var(--hdr,82px));min-height:570px;position:sticky;top:var(--hdr,82px);overflow:hidden;display:flex;align-items:center;padding:5vw;background:var(--bg)}
.story-copy{position:relative;z-index:2;max-width:68%;pointer-events:none}
.story-copy a{pointer-events:auto}
.story .story-eyebrow{font:700 .78rem/1.4 ui-monospace,Menlo,monospace;letter-spacing:.12em;color:var(--color-blue-dark);margin:0 0 1.2rem}
.story h1{font-size:clamp(4rem,9.2vw,10rem);line-height:1.03;margin:0 0 1.5rem;font-weight:900;letter-spacing:-.02em;color:var(--text)}
.story h1 span{display:block;transition:opacity .35s,transform .35s}
.story h1 span:nth-child(3){color:var(--color-blue-dark)}
.story-copy p.story-lede{max-width:25rem;font-size:1.1rem;color:var(--text-muted)}
.story-art{position:absolute;right:5%;width:41%;height:75%;top:10%;perspective:900px}
.story-art img{position:absolute;width:38%;height:auto;box-shadow:0 18px 50px #0006;transform:translate(var(--x,0),var(--y,0)) rotate(var(--rot,0deg));will-change:transform;border:2px solid var(--color-ink)}
.story-art img:nth-child(1){left:0;top:4%;--rot:-10deg}
.story-art img:nth-child(2){left:48%;top:0;--rot:9deg}
.story-art img:nth-child(3){left:8%;top:42%;--rot:7deg}
.story-art img:nth-child(4){left:53%;top:42%;--rot:-8deg}
.story .scroll-cue{position:absolute;bottom:2rem;left:5vw;font:700 .7rem ui-monospace,Menlo,monospace;letter-spacing:.15em;color:var(--text-muted)}
@keyframes storyRise{from{opacity:0;transform:translateY(.4em)}to{opacity:1;transform:none}}
@media(max-width:900px){.story-copy{max-width:100%}.story h1{font-size:clamp(3.6rem,11vw,7rem)}.story-art{opacity:.27;width:65%;right:-6%}}
@media(max-width:560px){.story{height:250vh}.story-pin{min-height:500px}.story h1{font-size:clamp(3.2rem,13vw,4.8rem)}.story-art{width:80%;right:-15%;top:20%;height:55%}}
@media(prefers-reduced-motion:reduce){.story{height:auto}.story-pin{position:relative;top:auto;min-height:600px}.story-art img{transform:rotate(var(--rot,0deg))!important}.story h1 span{animation:none;opacity:1!important}}

html,body{overflow-x:clip!important;overflow-y:visible!important}

.brand-logo{width:44px;height:44px;border-radius:8px;border:2px solid var(--color-ink);object-fit:cover;flex:none}

.book-cover-img,.book-cover-wrap img,img[class*="cover"]{object-position:top center!important}
.book-badge-overlay{top:auto!important;bottom:.6rem}
.footer-ribbon{display:block;width:100%;height:clamp(90px,14vw,190px);color:var(--color-yellow-dark);opacity:.55;margin-bottom:-1rem}
.site-footer{padding-top:0!important}

[data-theme="dark"] .tile-yellow,[data-theme="dark"] .tile-blue{color:#f3eee2;border-color:var(--border-strong);box-shadow:4px 4px 0 #12110e}
[data-theme="dark"] .tile-yellow *,[data-theme="dark"] .tile-blue *{color:inherit}

/* ===== semantic text-on-block tokens (contrast in both themes) ===== */
:root{--on-accent:#26241f;--on-accent-soft:rgba(38,36,31,.78);--accent-text:#55614b;--color-green:#55614b;--text-dim:#6b6a60}
[data-theme="dark"]{--on-accent:#f3eee2;--on-accent-soft:rgba(243,238,226,.8);--accent-text:#b9c6aa;--color-yellow:#4a5540;--color-blue:#3a372f;--color-green:#b9c6aa;--color-blue-dark:#e08fa3;--color-terracotta:#e08fa3;--text-dim:#a7a394;--text-muted:#c2bdae}
.site-footer,.tile-ink,.top-ticker,[data-theme="dark"] .site-footer{--accent-text:#b9c6aa}
[data-theme="dark"] .tile-yellow{background-color:#4a5540}
[data-theme="dark"] .tile-blue{background-color:#3a372f}
[data-theme="dark"] .nav-pill-badge,[data-theme="dark"] .badge-tag,[data-theme="dark"] .nav-link.active,[data-theme="dark"] .filter-btn.active,[data-theme="dark"] .btn-yellow,[data-theme="dark"] .btn-blue,[data-theme="dark"] .skip-link,[data-theme="dark"] .play-btn-circle,[data-theme="dark"] .step-num-badge{color:#f3eee2!important}
[data-theme="dark"] .star{color:#f3eee2}
[data-theme="dark"] .footer-col-title,[data-theme="dark"] .footer-brandmark,[data-theme="dark"] .ticker-highlight,[data-theme="dark"] .book-card-link-icon{color:#b9c6aa}
:root{--color-yellow-dark:#5f6c54}
[data-theme="dark"]{--color-yellow-dark:#5d6853}
[data-theme="dark"] .footer-ribbon{color:#8f9c82}
[data-theme="dark"] .star{color:#f3eee2!important}
[data-theme="dark"] .step-num-badge[style]{background:#3a372f!important;color:#f3eee2!important}
[data-theme="dark"] .badge-tag[style]{background-color:#3a372f!important;color:#f3eee2!important;border-color:#6b6a60!important}
[data-theme="dark"] [style*="color-yellow-dark"]{color:#b9c6aa!important}
[data-theme="dark"]{--border-focus:#b9c6aa}
/* dark mode red: true burgundy-red, not pink */
[data-theme="dark"]{--color-blue-dark:#d9506a;--color-terracotta:#d9506a}
[data-theme="dark"] .story h1 span:nth-child(3){color:#cf3555}

/* Necessary production fallbacks; the approved stylesheet above is unchanged. */
[hidden]{display:none!important}
.bento-kinetic-grid>*{min-width:0}
.book-placeholder{min-height:100%;overflow-wrap:anywhere}
.practice-content{line-height:1.8;overflow-wrap:anywhere}
.practice-content table{border-collapse:collapse;width:100%}
.practice-content th,.practice-content td{padding:.6rem;border:1px solid var(--border-strong)}
.practice-content details{margin-block:1rem}
.practice-content summary{cursor:pointer;font-weight:700;padding:1rem}
button,input,select,textarea{font:inherit}
.button{display:inline-flex;align-items:center;justify-content:center;padding:.7rem 1rem;border:2px solid var(--color-ink);border-radius:6px;text-decoration:none;color:var(--text)}
.button--ink{background:var(--color-ink);color:white}
html.shot .kinetic-shift,html.shot .reveal-inner{opacity:1!important;transform:none!important}
@media(max-width:1024px){.bento-kinetic-grid>[style*="span 8"],.bento-kinetic-grid>[style*="span 7"]{grid-column:1/-1!important}}
@media(max-width:768px){.bento-kinetic-grid>[style*="grid-column"]{grid-column:1/-1!important}.media-card-item>div{flex-wrap:wrap}.clean-table-wrap{overflow-x:auto}.story-pin{min-height:500px}}
@media print{.kinetic-shift,.reveal-inner{opacity:1!important;transform:none!important}.mobile-nav-drawer{display:none!important}.practice-content details{break-inside:auto}.flow-obs-input{min-height:3rem;border:0!important}}

/* keep side gutters when a spacing class is combined with .container */
.container.section-spacer,.container.section-spacer-sm{padding-left:1.5rem;padding-right:1.5rem}
@media(max-width:560px){.container.section-spacer,.container.section-spacer-sm{padding-left:1rem;padding-right:1rem}}

/* contrast fixes found in built-site audit */
a:not([class]){color:inherit;text-underline-offset:.2em}
[data-theme="dark"]{--color-blue-dark:#e46a82;--color-terracotta:#e46a82}
[data-theme="dark"] .story-eyebrow{color:#e46a82}
