/* ==========================================================================
   THE REALFIGHTERS CHAI-LOG | USELESS PROJECTS 3.0 JOURNAL
   Aesthetic: Warm Kerala Chaya Kada, Rich Milk Tea Ambiance, Hacker Scrapbook
   ========================================================================== */

:root {
  /* Rich Chaya Palette */
  --chai-deep: #28140a;
  --chai-roast: #3d1d0e;
  --chai-base: #5c2c16;
  --chai-rich: #8c421d;
  --chai-amber: #c46215;
  --chai-warm: #d97706;
  --chai-milk: #e8974d;
  --chai-froth: #faedcd;
  --chai-cream: #fff3e3;
  --paper-cream: #fbf7ee;
  --paper-bg: #fffdf9;

  /* Accents */
  --stamp-red: #dc2626;
  --stamp-green: #16a34a;
  --marker-yellow: #fef08a;
  --ink-dark: #1e120c;
  --ink-faded: #5a4033;
  --tape-color: rgba(254, 243, 199, 0.7);

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-hand: 'Kalam', 'Caveat', cursive, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--chai-deep);
  /* Rich, warm, swirling Kerala milk-tea background */
  background:
    radial-gradient(ellipse at 15% 10%, rgba(217, 119, 6, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 25%, rgba(140, 66, 29, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 70%, rgba(232, 151, 77, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse at 80% 90%, rgba(61, 29, 14, 0.8) 0%, transparent 50%),
    linear-gradient(135deg, #231007 0%, #3a1c0d 25%, #4f2512 50%, #2e1509 75%, #1c0a04 100%);
  background-attachment: fixed;
  color: var(--ink-dark);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient animated Chai steam & froth canvas overlay */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Tea wave graphic animation in background */
.tea-wave-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.tea-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: repeat-x url("data:image/svg+xml;utf8,<svg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'><path d='M0,0 C150,90 350,-40 500,60 C650,140 900,10 1200,40 L1200,120 L0,120 Z' fill='%23d97706'/></svg>");
  animation: waveMotion 18s linear infinite;
  transform: translate3d(0, 0, 0);
}

@keyframes waveMotion {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Floating Audio / Theme Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(35, 16, 7, 0.85);
  border-bottom: 2px solid rgba(217, 119, 6, 0.3);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.journal-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--chai-froth);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.journal-badge span.cup {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
  animation: cupBob 3s ease-in-out infinite alternate;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-btn {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--chai-froth);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.audio-btn:hover {
  background: rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.5);
}

/* Journal Wrapper */
.journal-layout {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 2.5rem auto 5rem;
  padding: 0 1.25rem;
}

/* The Scrapbook Journal Cover / Header */
.journal-cover-sheet {
  background: var(--paper-bg);
  background-image:
    radial-gradient(#e2d5c3 0.75px, transparent 0.75px),
    linear-gradient(to bottom, #fffef9, #f7f1e5);
  background-size: 20px 20px, 100% 100%;
  border-radius: 20px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(140, 66, 29, 0.2),
    inset 0 0 60px rgba(180, 110, 60, 0.08);
  padding: 3.5rem 3rem 2.5rem;
  position: relative;
  margin-bottom: 3.5rem;
  overflow: hidden;
}

/* Realistic Washi Tape at Top */
.washi-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 170px;
  height: 34px;
  background: rgba(253, 230, 138, 0.85);
  border-left: 2px dashed rgba(217, 119, 6, 0.4);
  border-right: 2px dashed rgba(217, 119, 6, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

.washi-tape.corner-right {
  top: 15px;
  right: -25px;
  left: auto;
  transform: rotate(45deg);
  width: 120px;
  height: 28px;
  background: rgba(244, 114, 182, 0.6);
}

/* Tea Mug Stain on Paper */
.tea-ring-stain {
  position: absolute;
  top: 30px;
  right: 40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 7px solid rgba(140, 66, 29, 0.16);
  box-shadow: inset 0 0 15px rgba(140, 66, 29, 0.12), 0 0 12px rgba(180, 83, 9, 0.1);
  transform: rotate(25deg) skewX(4deg);
  pointer-events: none;
}

.tea-ring-stain::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 3px solid rgba(140, 66, 29, 0.1);
  border-radius: 50%;
}

/* Red / Green Rubber Stamps */
.rubber-stamp {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 6px;
  transform: rotate(-3deg);
}

.stamp-red {
  color: var(--stamp-red);
  border: 2px solid var(--stamp-red);
  background: rgba(220, 38, 38, 0.06);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.stamp-green {
  color: var(--stamp-green);
  border: 2px solid var(--stamp-green);
  background: rgba(22, 163, 74, 0.08);
}

.stamp-tea {
  color: var(--chai-rich);
  border: 2px solid var(--chai-rich);
  background: rgba(140, 66, 29, 0.08);
  transform: rotate(2deg);
}

/* Journal Header Content */
.journal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(140, 66, 29, 0.25);
  padding-bottom: 1rem;
}

.meta-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-faded);
  font-weight: 600;
}

.journal-main-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--chai-deep);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.journal-main-title span.highlight {
  color: var(--chai-amber);
  position: relative;
  display: inline-block;
}

.journal-main-title span.highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 12px;
  background: rgba(254, 240, 138, 0.55);
  z-index: -1;
  transform: rotate(-1deg);
}

.journal-subtitle {
  font-size: 1.15rem;
  color: var(--ink-faded);
  max-width: 720px;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Doodled quick note */
.doodle-note {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--chai-rich);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Compact Tea Glass & Froth Popping Station (Inside Journal) */
.journal-tea-station {
  background: linear-gradient(135deg, rgba(255, 243, 227, 0.9), rgba(250, 237, 205, 0.7));
  border: 1px solid rgba(196, 98, 21, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 6px 16px rgba(140, 66, 29, 0.08);
}

.tea-station-info h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--chai-deep);
  margin-bottom: 0.3rem;
}

.tea-station-info p {
  font-size: 0.9rem;
  color: var(--ink-faded);
}

/* Mini Chaya Glass graphic */
.mini-chaya-glass {
  width: 90px;
  height: 110px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 2.5px solid rgba(140, 66, 29, 0.35);
  border-top: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px 4px 18px 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 10px rgba(217, 119, 6, 0.3);
  transition: transform 0.2s ease;
  user-select: none;
}

.mini-chaya-glass:hover {
  transform: scale(1.05);
}

.mini-tea-liquid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72%;
  background: linear-gradient(180deg, var(--chai-amber) 0%, var(--chai-rich) 40%, var(--chai-roast) 100%);
  border-top: 6px solid var(--chai-froth);
}

.mini-bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  animation: floatUp 2.5s infinite ease-in-out alternate;
}

.tea-station-action-btn {
  background: linear-gradient(135deg, var(--chai-amber) 0%, var(--chai-rich) 100%);
  color: #fff;
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(196, 98, 21, 0.35);
  transition: all 0.2s ease;
}

.tea-station-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(196, 98, 21, 0.5);
}

/* ==========================================================================
   JOURNAL ENTRIES / CHAPTERS (The Core Story)
   ========================================================================== */

.journal-timeline {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
}

.journal-entry-card {
  background: var(--paper-bg);
  background-image:
    radial-gradient(#e2d5c3 0.7px, transparent 0.7px),
    linear-gradient(to bottom, #ffffff, #faf6ee);
  background-size: 24px 24px, 100% 100%;
  border-radius: 18px;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(140, 66, 29, 0.15);
  padding: 2.5rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.journal-entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

/* Colored Entry Ribbon / Label */
.entry-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--chai-rich);
  background: rgba(196, 98, 21, 0.12);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.entry-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--chai-deep);
  margin-bottom: 1.2rem;
  line-height: 1.25;
}

.entry-narrative {
  font-size: 1.05rem;
  color: #2b1a11;
  line-height: 1.8;
}

.entry-narrative p+p {
  margin-top: 1rem;
}

.entry-narrative strong {
  color: var(--chai-roast);
  font-weight: 700;
}

/* Polaroid Photo Style Card tucked in entry */
.polaroid-card {
  background: #fff;
  padding: 12px 12px 28px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  max-width: 280px;
  margin: 1.5rem auto;
  transform: rotate(2deg);
  border: 1px solid #e5e5e5;
  text-align: center;
}

.polaroid-card.rotate-left {
  transform: rotate(-2.5deg);
}

.polaroid-photo-area {
  height: 150px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
}

.polaroid-caption {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: #3f2e24;
  margin-top: 12px;
}

/* Sticky Post-it Notes */
.post-it {
  background: #fef08a;
  color: #422006;
  padding: 1.2rem 1.4rem;
  border-radius: 2px 2px 14px 2px;
  box-shadow: 2px 6px 15px rgba(0, 0, 0, 0.12);
  margin: 1.5rem 0;
  position: relative;
  transform: rotate(-1deg);
  border-top: 6px solid #facc15;
}

.post-it.pink {
  background: #fbcfe8;
  border-top: 6px solid #f472b6;
  color: #500724;
  transform: rotate(1.5deg);
}

.post-it-author {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-it-body {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  line-height: 1.45;
}

/* The Brainstorming Napkin / 3 Contenders in Journal */
.napkin-arena {
  background: #fff;
  border: 2px dashed rgba(140, 66, 29, 0.35);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
}

.napkin-watermark {
  position: absolute;
  top: 10px;
  right: 15px;
  font-family: var(--font-hand);
  color: rgba(140, 66, 29, 0.3);
  font-size: 1.5rem;
  pointer-events: none;
}

.contenders-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.2rem;
}

.contender-box {
  background: #fffdf9;
  border: 1px solid rgba(140, 66, 29, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.contender-box.winner-box {
  border: 2px solid var(--chai-amber);
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.18);
}

.contender-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.contender-header .icon {
  font-size: 1.8rem;
}

.contender-header h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--chai-deep);
}

.contender-box p {
  font-size: 0.88rem;
  color: var(--ink-faded);
  line-height: 1.5;
  margin-bottom: 0.8rem;
  flex-grow: 1;
}

.contender-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
}

.tag-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.tag-chosen {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #f59e0b;
}

/* Quotes in Story */
.grand-quote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.6rem;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.6), rgba(254, 215, 170, 0.4));
  border-left: 5px solid var(--chai-amber);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--chai-deep);
  line-height: 1.5;
}

.grand-quote span.sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--chai-rich);
  margin-top: 0.4rem;
}

/* Introduction Scrapbook Cards (Circular Glowing Tea-Ring Presentation) */
.intro-scrapbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin: 2.2rem 0;
}

.member-circle-card {
  background: #ffffff;
  padding: 2.2rem 1.6rem 2rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(140, 66, 29, 0.15);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  text-align: center;
  overflow: hidden;
}

.member-circle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--chai-amber), var(--chai-rich), var(--chai-milk));
}

.member-circle-card.tilt-left {
  transform: rotate(-1.5deg);
}

.member-circle-card.tilt-right {
  transform: rotate(1.5deg);
}

.member-circle-card:hover {
  transform: translateY(-8px) rotate(0deg);
  box-shadow: 0 24px 50px rgba(61, 29, 14, 0.28), 0 0 0 2px var(--chai-amber);
}

/* Glowing Rotating Circular Frame */
.member-circle-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0.5rem auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-circle-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #d97706, #fbbf24, #ea580c, #f59e0b, #d97706);
  animation: spinChaiRing 10s linear infinite;
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.member-circle-card:hover .member-circle-ring {
  animation-duration: 4s;
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.75));
}

.member-circle-img-box {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #ffffff;
  background: #f1f5f9;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), inset 0 0 15px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.member-circle-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.member-circle-card:hover .member-circle-img-box img {
  transform: scale(1.08);
}

.member-circle-badge-pill {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--chai-deep), var(--chai-roast));
  color: var(--chai-froth);
  border: 2px solid var(--chai-amber);
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 3;
}

.member-circle-caption {
  margin-top: 1rem;
}

.member-circle-caption h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--chai-deep);
  margin-bottom: 0.25rem;
}

.member-circle-caption .sub-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--chai-amber);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.member-circle-caption p {
  font-family: var(--font-hand);
  font-size: 1.18rem;
  color: #3b281d;
  line-height: 1.45;
  background: rgba(254, 243, 199, 0.4);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(217, 119, 6, 0.3);
}

@keyframes spinChaiRing {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Team realFighters Profiles (Scrapbook Dossier) */
.team-dossier {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.member-sheet {
  background: #fff;
  border: 1px solid rgba(140, 66, 29, 0.2);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  position: relative;
}

.member-badge-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.avatar-emoji {
  width: 54px;
  height: 54px;
  background: #fff7ed;
  border: 2px solid var(--chai-milk);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.avatar-photo-thumb {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--chai-amber);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.45);
}

.member-sheet h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--chai-deep);
}

.member-sheet .role {
  font-size: 0.82rem;
  color: var(--chai-amber);
  font-weight: 700;
  text-transform: uppercase;
}

.member-stats-list {
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-faded);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-stats-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted rgba(140, 66, 29, 0.2);
  padding-bottom: 0.25rem;
}

.member-stats-list span.val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--chai-roast);
}

/* Interactive Fun Journal Tools: Useless Chaya AI Scanner */
.journal-scanner-card {
  background: linear-gradient(135deg, #2b1409 0%, #441e0c 100%);
  color: #fff;
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  margin-top: 3.5rem;
  border: 2px solid rgba(245, 158, 11, 0.35);
  position: relative;
  overflow: hidden;
}

.journal-scanner-card h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--chai-froth);
  margin-bottom: 0.5rem;
}

.scanner-terminal {
  background: #140904;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #86efac;
  min-height: 110px;
  margin-top: 1.2rem;
  line-height: 1.6;
}

.scan-btn-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #210d02;
  border: none;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  margin-top: 0.8rem;
}

.scan-btn-amber:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Journal Footer */
.journal-footer-note {
  text-align: center;
  color: var(--chai-froth);
  font-size: 0.92rem;
  margin-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.journal-footer-note a {
  color: var(--chai-milk);
  text-decoration: none;
  font-weight: bold;
}

/* Animations */
@keyframes cupBob {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-4px) rotate(5deg);
  }
}

@keyframes floatUp {
  0% {
    transform: translateY(0px);
    opacity: 0.6;
  }

  100% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Pop particle effect */
.pop-particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  animation: particleBurst 0.55s ease-out forwards;
  z-index: 9999;
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* ==========================================================================
   CHAPTER 02 STYLES: THE BUBBLE DETECTION NIGHTMARE & SPECIMEN ANALYZER
   ========================================================================== */

/* AI Trials Breakdown Grid */
.ai-trials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.8rem 0;
}

.ai-trial-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(140, 66, 29, 0.18);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.2s ease;
}

.ai-trial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.ai-trial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.ai-trial-header h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--chai-deep);
}

.ai-trial-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.ai-trial-status.status-fail {
  background: #fee2e2;
  color: #991b1b;
}

.ai-trial-status.status-partial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #f59e0b;
}

.ai-trial-desc {
  font-size: 0.88rem;
  color: var(--ink-faded);
  line-height: 1.5;
  margin-bottom: 0.8rem;
  flex-grow: 1;
}

.ai-trial-footnote {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--chai-rich);
  border-top: 1px dashed rgba(140, 66, 29, 0.18);
  padding-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Interactive Specimen Analyzer (Matching Attached Screenshot)
   -------------------------------------------------------------------------- */

.specimen-analyzer-container {
  background: #f8f6f0;
  border: 2px solid #2b1a11;
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2.2rem 0;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  color: #2b1a11;
  position: relative;
}

/* Top Nav of Specimen Viewer */
.specimen-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #dfd8cc;
  padding-bottom: 0.9rem;
  margin-bottom: 1.4rem;
}

.specimen-nav-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #4b3621;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.specimen-nav-back:hover {
  color: var(--chai-roast);
}

.debug-mode-btn {
  background: #ffffff;
  border: 1.5px solid #2b1a11;
  border-radius: 6px;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #2b1a11;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 2px 2px 0px #2b1a11;
  transition: all 0.15s ease;
}

.debug-mode-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #2b1a11;
}

.debug-mode-btn.active {
  background: #2b1a11;
  color: #fef3c7;
}

/* Specimen Dashboard Layout */
.specimen-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .specimen-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Specimen Left Frame */
.specimen-viewport-card {
  background: #ffffff;
  border: 2px solid #2b1a11;
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 3px 4px 0px #2b1a11;
  display: flex;
  flex-direction: column;
}

.specimen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.3;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.specimen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Coordinate Grid Overlay on Chaya */
.specimen-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(234, 88, 12, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(234, 88, 12, 0.22) 1px, transparent 1px);
  background-size: 16.666% 20%;
}

.specimen-col-labels {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(234, 88, 12, 0.85);
  font-weight: 700;
  pointer-events: none;
}

.specimen-row-labels {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(234, 88, 12, 0.85);
  font-weight: 700;
  pointer-events: none;
}

/* HUD Readout Box in Top Right of Image */
.specimen-hud-box {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid #2b1a11;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #2b1a11;
  text-align: right;
  line-height: 1.25;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 5;
}

.specimen-hud-box .hud-id {
  font-weight: 800;
  font-size: 0.85rem;
}

.specimen-hud-box .hud-stats {
  font-size: 0.68rem;
  color: #554438;
}

/* Bottom Badge on Specimen Image */
.specimen-bottom-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #ffffff;
  border: 1.5px solid #2b1a11;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #2b1a11;
  box-shadow: 1px 1px 0px #2b1a11;
  pointer-events: none;
  z-index: 5;
}

/* Interactive SVG Bubble Layer */
.specimen-bubble-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}

.bubble-marker {
  fill: rgba(245, 158, 11, 0.3);
  stroke: #ea580c;
  stroke-width: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bubble-marker:hover {
  fill: rgba(239, 68, 68, 0.7);
  stroke: #ffffff;
  stroke-width: 2;
  r: 9;
}

.bubble-center-dot {
  fill: #2b1a11;
  pointer-events: none;
}

.bubble-debug-ring {
  stroke: #ef4444;
  stroke-dasharray: 2 2;
  fill: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.debug-mode-active .bubble-debug-ring {
  opacity: 1;
}

/* Filter Bar Below Specimen */
.specimen-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.45rem;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #786b5e;
  font-weight: 700;
  scrollbar-width: none;
}

.specimen-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  background: #f1ede4;
  border: 1px solid #c9bea9;
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b1a11;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill-btn:hover {
  background: #e5dfd2;
}

.filter-pill-btn.active {
  background: #2b1a11;
  color: #ffffff;
  border-color: #2b1a11;
}

/* --------------------------------------------------------------------------
   Specimen Right Column: Stats & Classification
   -------------------------------------------------------------------------- */

.specimen-stats-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Grid-paper Population Card */
.specimen-census-card {
  background: #ffffff;
  background-image:
    linear-gradient(#ece7dc 1px, transparent 1px),
    linear-gradient(to right, #ece7dc 1px, #ffffff 1px);
  background-size: 16px 16px;
  border: 2px solid #2b1a11;
  border-radius: 12px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  box-shadow: 4px 4px 0px #2b1a11;
  position: relative;
}

.census-header-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #8c6d56;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.census-big-number {
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 8vw, 6.2rem);
  font-weight: 800;
  color: #2b1a11;
  line-height: 1;
  margin: 0.2rem 0;
  letter-spacing: -2px;
}

.census-title-brush {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  color: #c2410c;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.census-footer-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #9a8b79;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: 1px dashed #d5cdbf;
  padding-top: 0.8rem;
}

/* Classification Breakdown Card */
.specimen-classification-card {
  background: #ffffff;
  border: 2px solid #2b1a11;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 4px 4px 0px #2b1a11;
}

.classification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1.5px solid #efeae0;
  padding-bottom: 0.6rem;
}

.classification-header h4 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #2b1a11;
  text-transform: uppercase;
}

.classification-header span.italic-sub {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #b45309;
}

.classification-tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.class-mini-box {
  background: #faf7f2;
  border: 1.5px solid #2b1a11;
  border-radius: 8px;
  padding: 0.9rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.class-dot-icons {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  height: 18px;
}

.dot-indicator {
  border-radius: 50%;
  display: inline-block;
}

.dot-small {
  width: 7px;
  height: 7px;
  background: #d97706;
}

.dot-med {
  width: 11px;
  height: 11px;
  background: #ea580c;
}

.dot-large {
  width: 17px;
  height: 17px;
  background: #451a03;
}

.class-mini-num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: #2b1a11;
  line-height: 1;
}

.class-mini-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #635043;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Archival Disclaimer Ribbon */
.archival-disclaimer {
  background: #fffbeb;
  border: 1.5px dashed #d97706;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.5;
}

.archival-disclaimer .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Vibe Coding Terminal Crisis Card
   -------------------------------------------------------------------------- */

.vibe-terminal-card {
  background: #18110b;
  color: #fdba74;
  border: 2px solid #ea580c;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.8rem 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-family: var(--font-mono);
}

.vibe-terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(234, 88, 12, 0.3);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.vibe-terminal-dots {
  display: flex;
  gap: 6px;
}

.vibe-terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.vibe-terminal-dots span:nth-child(1) {
  background: #ef4444;
}

.vibe-terminal-dots span:nth-child(2) {
  background: #f59e0b;
}

.vibe-terminal-dots span:nth-child(3) {
  background: #10b981;
}

.vibe-terminal-title {
  font-size: 0.78rem;
  color: #fed7aa;
  font-weight: 700;
}

.vibe-log-line {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #fed7aa;
}

.vibe-log-line.warn {
  color: #facc15;
}

.vibe-log-line.error {
  color: #f87171;
  font-weight: bold;
}

.vibe-log-line.panic {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* Architecture Pivot Comparison */
.architecture-pivot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.8rem 0;
}

@media (max-width: 640px) {
  .architecture-pivot-grid {
    grid-template-columns: 1fr;
  }
}

.arch-side-box {
  border-radius: 12px;
  padding: 1.25rem;
  border: 1.5px solid;
}

.arch-side-box.fail-side {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.arch-side-box.win-side {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d;
}

.arch-side-box h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.arch-side-box ul {
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.6;
  padding-left: 0;
}

.arch-side-box ul li {
  margin-bottom: 0.3rem;
}

/* ==========================================================================
   CHAPTER 03: EUREKA BOX + IMAGE SHOWCASE
   ========================================================================== */

.eureka-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2.5px solid #16a34a;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.18), 4px 4px 0px #15803d;
}

.eureka-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #15803d;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.eureka-text {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #14532d;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.eureka-sub {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: #166534;
  opacity: 0.85;
}

/* Chapter Image Showcase */
.chapter-img-showcase {
  margin: 2.5rem 0;
  background: #fff;
  border: 2px solid #2b1a11;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 5px 5px 0px #2b1a11;
}

.img-showcase-badge {
  background: #2b1a11;
  color: #fef3c7;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 0.6rem 1.25rem;
}

.img-showcase-frame {
  padding: 1rem;
  background: #f8f6f0;
}

.chapter-showcase-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1.5px solid #ddd6c8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.img-showcase-caption {
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.92rem;
  color: var(--chai-roast);
  line-height: 1.65;
  border-top: 1px dashed #ddd6c8;
}

/* ==========================================================================
   CHAPTER 04: MODI REVEAL CARD
   ========================================================================== */

.modi-reveal-card {
  background: #fefce8;
  border: 2px solid #d97706;
  border-radius: 16px;
  overflow: hidden;
  margin: 2.2rem 0;
  box-shadow: 5px 5px 0px #b45309;
}

.modi-reveal-badge {
  background: #d97706;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0.65rem 1.25rem;
}

.modi-reveal-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
}

@media (max-width: 760px) {
  .modi-reveal-content {
    grid-template-columns: 1fr;
  }
}

.modi-img-wrapper {
  border-right: 2px solid #fde68a;
  overflow: hidden;
  background: #f8f6f0;
}

@media (max-width: 760px) {
  .modi-img-wrapper {
    border-right: none;
    border-bottom: 2px solid #fde68a;
  }
}

.modi-ui-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  max-height: 340px;
}

.modi-reveal-text {
  padding: 1.5rem;
}

.modi-reveal-text h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--chai-deep);
  margin-bottom: 0.75rem;
}

.modi-reveal-text p {
  font-size: 0.92rem;
  color: var(--chai-roast);
  line-height: 1.65;
}

/* ==========================================================================
   CHAPTER 05: CHAISCRIPT BLOCKS
   ========================================================================== */

.chaiscript-block {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  margin: 2.5rem 0;
  border: 2px solid #2b1a11;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 5px 5px 0px #2b1a11;
}

.chaiscript-block-alt .chaiscript-number {
  background: #7c3aed;
}

.chaiscript-block-alt {
  border-color: #7c3aed;
  box-shadow: 5px 5px 0px #5b21b6;
}

@media (max-width: 640px) {
  .chaiscript-block {
    grid-template-columns: 1fr;
  }

  .chaiscript-number {
    writing-mode: horizontal-tb;
    padding: 0.65rem 1rem;
    font-size: 1.8rem;
    border-right: none !important;
    border-bottom: 2px solid #2b1a11;
  }
}

.chaiscript-number {
  background: #2b1a11;
  color: #fef3c7;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 4px;
  border-right: 2px solid #2b1a11;
  flex-shrink: 0;
}

.chaiscript-body {
  background: #fffdf9;
  padding: 1.5rem;
}

.chaiscript-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #8c421d;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.chaiscript-block-alt .chaiscript-label {
  color: #6d28d9;
}

.chaiscript-desc {
  font-size: 0.92rem;
  color: var(--chai-roast);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.chaiscript-desc code {
  background: #1e1e1e;
  color: #4ade80;
  font-family: var(--font-mono);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.chaiscript-img-frame {
  border: 1.5px solid #ddd6c8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #f8f6f0;
}

.chaiscript-screenshot {
  width: 100%;
  display: block;
}

.chaiscript-verdict {
  background: #f8f6f0;
  border-left: 3px solid var(--chai-amber);
  padding: 0.65rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: var(--chai-roast);
  line-height: 1.5;
}

.chaiscript-block-alt .chaiscript-verdict {
  border-left-color: #7c3aed;
}

/* ==========================================================================
   CHAPTER 06: FLOP TIMELINE + DEVASTATION CARD
   ========================================================================== */

.flop-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
  border: 2px solid #fee2e2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 4px 4px 0px #fca5a5;
}

.flop-act {
  padding: 1.5rem 1.75rem;
  border-bottom: 1.5px solid #fee2e2;
  position: relative;
}

.flop-act:last-child {
  border-bottom: none;
}

.flop-act:nth-child(odd) {
  background: #fff5f5;
}

.flop-act:nth-child(even) {
  background: #fef2f2;
}

.flop-act-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.flop-act-num {
  background: #dc2626;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.flop-act-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #7f1d1d;
}

.flop-act-body {
  font-size: 0.92rem;
  color: #991b1b;
  line-height: 1.7;
}

.devastation-card {
  background: #fff;
  border: 2px solid #2b1a11;
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: 4px 4px 0px #2b1a11;
}

.devastation-header {
  background: #2b1a11;
  color: #fef3c7;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 0.65rem 1.25rem;
}

.devastation-body {
  padding: 0.75rem 0;
}

.devastation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f5ede4;
  gap: 1rem;
  flex-wrap: wrap;
}

.devastation-item:last-child {
  border-bottom: none;
}

.dev-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #5a4033;
  letter-spacing: 0.5px;
}

.dev-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: right;
}

.dev-red {
  color: #dc2626;
}

/* ==========================================================================
   CHAPTER 07: REWARD CARD
   ========================================================================== */

.reward-card {
  display: flex;
  gap: 1.5rem;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 2px solid #d97706;
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: 5px 5px 0px #b45309;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .reward-card {
    flex-direction: column;
  }
}

.reward-left {
  text-align: center;
  flex-shrink: 0;
  min-width: 90px;
}

.reward-big-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.reward-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #92400e;
  text-transform: uppercase;
}

.reward-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reward-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.reward-item-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.reward-item strong {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: #78350f;
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.reward-item p {
  font-size: 0.88rem;
  color: #92400e;
  margin: 0;
  line-height: 1.55;
}

/* ==========================================================================
   CLOSING CREDITS
   ========================================================================== */

.closing-credits-card {
  background: linear-gradient(135deg, #fffdf9, #fdf8ee);
  border: 2px solid var(--chai-amber) !important;
}

.closing-team-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.closing-member {
  flex: 1;
  min-width: 180px;
  max-width: 260px;
  text-align: center;
}

.closing-photo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.85rem;
}

.closing-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--chai-amber);
  box-shadow: 4px 4px 0px var(--chai-roast), 0 8px 20px rgba(0, 0, 0, 0.2);
  display: block;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.closing-photo:hover {
  filter: grayscale(0%);
}

.closing-photo-sticker {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #2b1a11;
  color: #fef3c7;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.closing-member-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--chai-deep);
  margin-bottom: 0.4rem;
  margin-top: 0.5rem;
}

.closing-member-quote {
  font-family: var(--font-hand);
  font-size: 0.92rem;
  color: var(--ink-faded);
  line-height: 1.5;
  font-style: italic;
}

.closing-vs {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 800;
  color: var(--chai-amber);
  align-self: center;
  opacity: 0.6;
}

.final-disclaimer {
  background: #fff;
  border: 2px dashed var(--chai-amber);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--chai-roast);
  line-height: 1.75;
}

.final-disclaimer-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  line-height: 1;
}