/* ==========================================================================
   MINDECHO.ART - PREMIUM COSMIC DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Retro-Futuristic Noir Palette */
  --color-space-obsidian: #121212; /* Obsidian Black base */
  --color-space-indigo: #0C0B0E;   /* Rich dark backplate */
  --color-dream-zinc: #1A1A1A;     /* Charcoal/dark-grey zine cards */
  --color-nebula-purple: #8A2BE2;  /* Primal violet */
  --color-nebula-purple-rgb: 138, 43, 226;
  --color-astral-gold: #FFD700;    /* Primal Gold */
  --color-astral-gold-rgb: 255, 215, 0;
  --color-soft-lavender: #A78BFA;
  --color-text-bright: #F5F5F7;    /* High contrast text */
  --color-text-dim: #E1E1E6;       /* Readable humanist serif body text */
  --color-text-muted: #7A7982;
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  
  --font-heading: 'Playfair Display', serif; /* Editorial Serif */
  --font-body: 'Lora', serif;                /* Humanist Serif */
  --font-mono: 'IBM Plex Mono', monospace;    /* Inline annotation typewriter */
  
  --shadow-gold-glow: 0 0 20px rgba(255, 215, 0, 0.1);
  --shadow-purple-glow: 0 0 20px rgba(138, 43, 226, 0.12);
  --shadow-card-default: 0 8px 30px rgba(0, 0, 0, 0.9);
  
  --border-glass-purple: 1.5px solid rgba(138, 43, 226, 0.15);
  --border-glass-gold: 1.5px solid rgba(255, 215, 0, 0.25);
  
  --border-radius-default: 4px; /* Sharp zine panels */
  --border-radius-inner: 2px;
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-space-obsidian);
  color: var(--color-text-bright);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Newsprint Film/Paper Grain Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------
   TWINKLING STARS & FLOATING NEBULA BACKDROP
   ------------------------------------------------------------- */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at center, #07070a 0%, #020202 100%);
}

.star {
  position: absolute;
  background-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--twinkle-duration, 5s) infinite ease-in-out;
  animation-delay: var(--twinkle-delay, 0s);
}

.star.gold {
  background-color: var(--color-astral-gold);
  box-shadow: 0 0 6px var(--color-astral-gold);
}

.star.purple {
  background-color: var(--color-soft-lavender);
  box-shadow: 0 0 6px var(--color-soft-lavender);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(0.75); }
  50% { opacity: var(--star-opacity, 0.85); transform: scale(1.3); }
}

/* Faint grid overlay */
.stars-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  mask-image: radial-gradient(circle at center, black 10%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at center, black 10%, transparent 90%);
  pointer-events: none;
  z-index: -1.2;
}

/* Drifting cosmic gas nebula clouds */
.stars-container .nebula {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 65%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 25%, rgba(245, 158, 11, 0.03) 0%, transparent 55%);
  filter: blur(80px);
  opacity: 0.85;
  animation: nebula-drift 40s infinite alternate ease-in-out;
  z-index: -1.5;
  pointer-events: none;
}

@keyframes nebula-drift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(4%, 3%) scale(1.08) rotate(15deg); }
}

/* -------------------------------------------------------------
   HEADER & FOOTER LAYOUT
   ------------------------------------------------------------- */
.oracle-header {
  text-align: center;
  padding: 4.5rem 1.5rem 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
}

.oracle-logo {
  filter: drop-shadow(0 4px 15px rgba(245, 158, 11, 0.35));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.oracle-logo:hover {
  transform: rotate(20deg) scale(1.08);
}

.oracle-logo.pulse {
  animation: orb-aura-pulse 2s infinite alternate ease-in-out;
}

.oracle-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 2px 2px 0px var(--color-nebula-purple), 4.5px 4.5px 0px var(--color-astral-gold);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: inline-block;
}

.oracle-title:hover {
  letter-spacing: 0.22em;
  color: var(--color-astral-gold);
  text-shadow: -2px -2px 0px var(--color-nebula-purple), 2px 2px 0px #ffffff;
}

.oracle-tagline {
  color: var(--color-text-muted);
  font-family: var(--font-mono); /* typewriter annotation tagline */
  font-size: 0.95rem;
  font-weight: 400;
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
}

.btn-header-about {
  max-width: 220px;
  margin: 1.5rem auto 0;
  font-size: 0.85rem;
  padding: 0.65rem 1.5rem;
  border-radius: 30px;
}

.oracle-footer {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 6rem;
}

/* -------------------------------------------------------------
   REUSABLE DYNAMIC CARD (GLASSMORPHISM)
   ------------------------------------------------------------- */
.oracle-card {
  background: rgba(13, 13, 17, 0.6);
  backdrop-filter: blur(25px) saturate(145%);
  -webkit-backdrop-filter: blur(25px) saturate(145%);
  border: var(--border-glass-purple);
  border-radius: var(--border-radius-default);
  box-shadow: var(--shadow-card-default);
  padding: 2.2rem;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.oracle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.02), rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.02));
  z-index: 2;
  pointer-events: none;
}

.oracle-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--shadow-purple-glow);
}

/* Spotlight mouse gradient layer */
.glow-hover {
  position: relative;
}

.glow-hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(139, 92, 246, 0.07) 0%, transparent 80%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

.glow-hover:hover::after {
  opacity: 1;
}

.card-header {
  position: relative;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 3;
}

.card-number {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--color-astral-gold);
  opacity: 0.85;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.accent-line {
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-astral-gold), transparent);
  margin-top: 0.6rem;
}

.card-desc {
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.8rem;
  z-index: 3;
  position: relative;
  opacity: 0.85;
}

/* -------------------------------------------------------------
   MAIN PAGE & BENTO GRID
   ------------------------------------------------------------- */
.oracle-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Bento Grid dashboard structure */
.bento-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1.5rem;
  position: relative;
}

@media(min-width: 900px) {
  .bento-dashboard {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }
  
  .cell-input {
    grid-column: span 1;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
  }
  
  .cell-style {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .cell-agents {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* TEXTAREA WRAPPER */
.textarea-wrapper {
  position: relative;
  margin-bottom: 1.8rem;
  border-radius: var(--border-radius-inner);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

textarea {
  width: 100%;
  height: 196px;
  background: rgba(18, 17, 22, 0.96);
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1.5px, transparent 1.5px);
  background-size: 100% 28px;
  line-height: 28px; /* Sync line height with background grid */
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--border-radius-default);
  color: var(--color-text-bright);
  font-family: var(--font-body);
  font-style: italic; /* literary personal diary feel */
  font-size: 0.95rem;
  padding: 14px 18px 2.2rem;
  resize: none;
  outline: none;
  transition: all 0.4s ease;
  z-index: 3;
}

textarea:focus {
  border-color: var(--color-nebula-purple);
  background-color: rgba(12, 11, 14, 0.98);
  animation: ink-bleed-pulse 2.5s infinite alternate ease-in-out;
}

@keyframes ink-bleed-pulse {
  0% {
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.18), inset 0 0 8px rgba(0, 0, 0, 0.6);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.22), 0 0 8px rgba(138, 43, 226, 0.25), inset 0 0 8px rgba(0, 0, 0, 0.6);
  }
}

.textarea-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 4;
}

/* ART CUSTOMIZER PILLS & GRID */
.style-preferences {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 3;
  position: relative;
}

.style-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.style-group-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-astral-gold);
  letter-spacing: 0.05em;
}

.style-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.style-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: var(--color-space-indigo);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--border-radius-default);
  padding: 0.55rem 1rem;
  font-family: var(--font-mono); /* editorial monospaced labels */
  font-size: 0.8rem;
  color: var(--color-text-dim);
  cursor: pointer;
  user-select: none;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.style-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-badge {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--color-text-muted);
  border-radius: 2px;
  background: transparent;
  margin-right: 0.65rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: bold;
}

.style-pill:hover {
  background: rgba(138, 43, 226, 0.08);
  border-color: var(--color-nebula-purple);
  color: #ffffff;
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4.5px 4.5px 0px var(--color-nebula-purple);
}

/* Zine selected checkbox indicators */
.style-pill:has(input[type="checkbox"]:checked) {
  background: rgba(138, 43, 226, 0.12);
  border-color: var(--color-astral-gold);
  color: #ffffff;
  box-shadow: 4.5px 4.5px 0px var(--color-astral-gold);
  transform: translate(-3px, -3px);
}

.style-pill:has(input[type="checkbox"]:checked) .pill-badge {
  border-color: var(--color-astral-gold);
  background-color: rgba(255, 215, 0, 0.12);
}

.style-pill:has(input[type="checkbox"]:checked) .pill-badge::after {
  content: 'X';
  color: var(--color-astral-gold);
}

/* TEMPLE AGENTS INLINE LIST */
.agent-roles-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 3;
  position: relative;
}

.agent-role-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-inner);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.agent-role-item:hover {
  transform: translateX(4px);
  border-color: rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.agent-role-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.agent-role-text h5 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-soft-lavender);
  margin-bottom: 0.15rem;
}

.agent-role-text p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-dim);
  opacity: 0.95;
}

/* SUBMIT BUTTON */
.btn-submit {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0.5rem 0 0;
  position: relative;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-inner);
  padding: 1.1rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

.btn-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.55), var(--shadow-purple-glow);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* -------------------------------------------------------------
   ORACLE PROCESSING PORTAL & PULSING ORB
   ------------------------------------------------------------- */
.portal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 0;
}

.portal-main {
  width: 100%;
  max-width: 1200px;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-back {
  align-self: flex-start;
  color: var(--color-astral-gold);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.btn-back:hover {
  color: var(--color-text-bright);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.portal-panel {
  width: 100%;
  padding: 3.5rem;
}

.oracle-orb-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  height: 220px;
}

.oracle-orb {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orb-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--color-nebula-purple);
  border-right-color: var(--color-nebula-purple);
  animation: orb-spin 1.4s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.orb-aura {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, transparent 70%);
  animation: orb-aura-pulse 2.2s ease-in-out infinite;
  z-index: 1;
}

@keyframes orb-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orb-aura-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.portal-title {
  font-family: var(--font-heading);
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, var(--color-text-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-status-text {
  text-align: center;
  color: var(--color-soft-lavender);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.portal-status-subtext {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  opacity: 0.8;
  margin-top: 0;
  margin-bottom: 2.5rem;
  min-height: 1.2rem;
  font-family: var(--font-mono);
}

/* PROCESS CHECKLIST */
.agent-checklist {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.9rem 1.4rem;
  background: rgba(4, 4, 6, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-inner);
  transition: all 0.35s ease;
}

.checklist-item.active {
  border-color: var(--color-nebula-purple);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.08);
}

.checkbox-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: transparent;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.checkbox-circle.checked {
  background: var(--color-astral-gold);
  border-color: var(--color-astral-gold);
  color: var(--color-space-obsidian);
}

.checkbox-circle.active {
  border-color: var(--color-nebula-purple);
  background: transparent;
  animation: item-border-pulse 1.5s infinite alternate ease-in-out;
}

.checkbox-circle.pending::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

@keyframes item-border-pulse {
  from { box-shadow: 0 0 2px var(--color-nebula-purple); }
  to { box-shadow: 0 0 12px var(--color-nebula-purple); border-color: var(--color-soft-lavender); }
}

.step-label {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.7;
  color: var(--color-text-dim);
}

.checklist-item.active .step-label {
  opacity: 1;
  color: var(--color-text-bright);
}

/* -------------------------------------------------------------
   RESULTS VIEW GRID
   ------------------------------------------------------------- */
.results-panel {
  padding: 3.5rem;
}

.results-header {
  text-align: center;
  margin-bottom: 2.8rem;
}

.dream-title-heading {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 30%, #e4e4e7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dream-date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-panel .accent-line {
  margin: 0.8rem auto 0;
  background: linear-gradient(90deg, transparent, var(--color-astral-gold), transparent);
  width: 180px;
}

.results-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 3rem;
}

@media(min-width: 900px) {
  .results-container {
    grid-template-columns: 5fr 6fr;
  }
}

/* Image column frame styling */
.dream-image-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.image-frame-gold {
  position: relative;
  border-radius: var(--border-radius-default);
  overflow: hidden;
  border: 2px solid var(--color-astral-gold);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.95), var(--shadow-gold-glow);
  aspect-ratio: 16 / 9;
  background: #020203;
}

.dream-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.image-frame-gold:hover .dream-artwork {
  transform: scale(1.05);
}

.image-overlay-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 40%, rgba(3, 3, 4, 0.5) 100%);
  pointer-events: none;
}

.image-actions {
  display: flex;
  gap: 1rem;
}

.btn-action {
  flex: 1;
  background: rgba(13, 13, 17, 0.55);
  border: var(--border-glass-gold);
  color: var(--color-text-bright);
  padding: 0.9rem;
  border-radius: var(--border-radius-inner);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.btn-action:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--color-astral-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

/* Interpretation/Details Column Card */
.dream-details-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dream-original-text {
  background: rgba(4, 4, 6, 0.4);
  border-left: 3.5px solid var(--color-astral-gold);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--border-radius-inner) var(--border-radius-inner) 0;
}

.dream-original-text h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-astral-gold);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.dream-original-text blockquote {
  font-size: 0.95rem;
  color: var(--color-text-dim);
  font-style: italic;
  line-height: 1.5;
}

/* TABS ROW SYSTEM */
.details-tabs {
  display: flex;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.06);
  gap: 2rem;
  margin-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.8rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn:hover {
  color: var(--color-text-bright);
}

.tab-btn.active {
  color: var(--color-astral-gold);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--color-astral-gold);
  box-shadow: 0 0 10px var(--color-astral-gold);
}

.tab-contents {
  min-height: 300px;
}

.tab-pane {
  display: none;
  animation: page-fade-in 0.5s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Markdown rendering tags styles (Indie Zine Staggered Panels & Vector Markers) */
.markdown-content {
  position: relative;
  padding-left: 1.6rem;
  border-left: 2px dashed rgba(138, 43, 226, 0.22);
  margin-left: 0.5rem;
}

.markdown-content p,
.markdown-content blockquote,
.markdown-content ul {
  background: var(--color-dream-zinc);
  border: 2px solid var(--color-border-subtle);
  border-left: 5px solid var(--color-nebula-purple);
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-default);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.4);
  position: relative;
  color: var(--color-text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

.markdown-content blockquote {
  border-left-color: var(--color-astral-gold);
  font-style: italic;
}

.markdown-content p::before,
.markdown-content blockquote::before,
.markdown-content ul::before {
  content: '';
  position: absolute;
  left: calc(-1.6rem - 7.5px);
  top: 1.8rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-astral-gold);
  border: 2px solid var(--color-space-obsidian);
  box-shadow: 0 0 6px var(--color-astral-gold);
  z-index: 5;
  transition: all 0.2s ease;
}

.markdown-content p:hover::before,
.markdown-content blockquote:hover::before,
.markdown-content ul:hover::before {
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
  transform: scale(1.3);
}

.markdown-content strong {
  color: var(--color-soft-lavender);
  font-weight: 600;
}

/* -------------------------------------------------------------
   SAVED HISTORY & GALLERY GRIDS
   ------------------------------------------------------------- */
.gallery-grid, .history-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1.8rem;
}

@media(min-width: 600px) {
  .gallery-grid, .history-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 950px) {
  .gallery-grid, .history-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-card-item {
  background: rgba(13, 13, 17, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gallery-card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75), var(--shadow-gold-glow);
}

.card-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 15;
}

.card-delete-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  transform: scale(1.1);
}

.gallery-card-img-wrapper {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #040406;
  position: relative;
}

.gallery-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card-item:hover .gallery-card-img-wrapper img {
  transform: scale(1.04);
}

.gallery-card-info {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.gallery-card-text {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  line-height: 1.4;
  opacity: 0.9;
}

.gallery-card-meta {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--color-astral-gold);
  margin-top: auto;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--color-text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(139, 92, 246, 0.1);
  border-top-color: var(--color-astral-gold);
  border-radius: 50%;
  animation: spinner-spin 0.8s linear infinite;
  margin: 0 auto 1.2rem;
}

@keyframes spinner-spin {
  to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   LIGHTBOX / MODAL VIEWER SYSTEM
   ------------------------------------------------------------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  animation: modal-zoom-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-zoom-in {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.6rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 1002;
  transition: color 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-astral-gold);
}

.modal-body {
  margin-top: 0.5rem;
}

/* Settings modal overrides */
.settings-tab-pane {
  display: none;
  animation: tab-slide-up 0.4s ease forwards;
}

.settings-tab-pane.active {
  display: block;
}

@keyframes tab-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Settings page markdown */
.markdown-content h3 {
  font-family: var(--font-heading);
  color: var(--color-astral-gold);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.markdown-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.markdown-content li {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: var(--color-text-dim);
}

/* -------------------------------------------------------------
   VISUAL DETAILS SUB-COMPONENTS (AUDIO, SYMBOLS, ALIGNMENTS)
   ------------------------------------------------------------- */

/* Ambient Backdrop Glow Behind Artwork */
.dream-artwork-glow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.dream-artwork-glow {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(50px) opacity(0.4);
  transform: scale(1.15);
}

/* Audio Player */
.narration-player {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  margin-top: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-narration {
  background: none;
  border: none;
  color: var(--color-astral-gold);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  outline: none;
  transition: all 0.3s ease;
}

.btn-narration:hover {
  color: var(--color-text-bright);
}

.btn-narration.playing {
  color: #ef4444;
}

/* Waveform Visualizer */
.soundwave-container {
  display: flex;
  align-items: flex-end;
  gap: 3.5px;
  height: 16px;
  width: 32px;
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.soundwave-container.active {
  opacity: 1;
}

.soundwave-bar {
  width: 3.2px;
  background: var(--color-soft-lavender);
  height: 20%;
  border-radius: 2px;
  transition: height 0.15s ease;
}

.soundwave-container.active .soundwave-bar {
  animation: wave-bar-bounce 0.8s ease-in-out infinite alternate;
}

/* Randomize bar animation offsets */
.soundwave-container.active .soundwave-bar:nth-child(1) { animation-duration: 0.6s; animation-delay: 0.1s; background-color: var(--color-astral-gold); }
.soundwave-container.active .soundwave-bar:nth-child(2) { animation-duration: 0.8s; animation-delay: 0.3s; }
.soundwave-container.active .soundwave-bar:nth-child(3) { animation-duration: 0.7s; animation-delay: 0.2s; background-color: var(--color-nebula-purple); }
.soundwave-container.active .soundwave-bar:nth-child(4) { animation-duration: 0.9s; animation-delay: 0.0s; }
.soundwave-container.active .soundwave-bar:nth-child(5) { animation-duration: 0.5s; animation-delay: 0.4s; background-color: var(--color-astral-gold); }

@keyframes wave-bar-bounce {
  0% { height: 15%; }
  100% { height: 100%; }
}

/* Glassmorphic Core Quote Block */
.core-message-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-default);
  padding: 2.2rem 2.2rem 1.8rem;
  margin-bottom: 2.5rem;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.04), var(--shadow-purple-glow);
}

.core-message-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text-bright);
  position: relative;
  z-index: 2;
  margin-bottom: 0.25rem;
}

.quote-mark {
  position: absolute;
  font-size: 5.5rem;
  font-family: Georgia, serif;
  color: rgba(255, 255, 255, 0.025);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.quote-mark.left {
  top: -10px;
  left: 20px;
}

.quote-mark.right {
  bottom: -40px;
  right: 20px;
}

/* Decoded Symbols Grid list */
.symbol-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 1rem;
  margin-top: 1rem;
}

@media(min-width: 550px) {
  .symbol-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.symbol-card-item {
  display: flex;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
  border-radius: var(--border-radius-inner);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.symbol-card-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(245, 158, 11, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.symbol-card-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.08);
}

.symbol-card-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.symbol-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.symbol-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-soft-lavender);
  letter-spacing: 0.02em;
}

.symbol-card-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-dim);
  text-align: left;
  opacity: 0.9;
}

/* 3-Column Esoteric Alignments layout (Mystic Almanac Asymmetric Design) */
.alignments-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 2.2rem;
  margin-top: 1.5rem;
  padding-bottom: 2rem;
}

@media(min-width: 800px) {
  .alignments-grid {
    grid-template-columns: 1.15fr 0.85fr 1fr; /* Asymmetric zine columns of varying widths */
    grid-gap: 2.8rem;
  }
  /* Offset zine columns for dynamic asymmetry */
  .alignment-column.spiritual-column {
    transform: translateY(1.5rem);
  }
  .alignment-column.biblical-column {
    transform: translateY(-0.8rem);
  }
}

.alignment-column {
  background: var(--color-space-indigo);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--border-radius-default);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
  padding-left: 0.4rem; /* leave margin for vertical marginalia */
}

/* Rotated Vertical Marginalia tags */
.alignment-column::before {
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  position: absolute;
  top: 5.5rem;
  left: -1.75rem;
  transform: rotate(-90deg);
  transform-origin: right center;
  white-space: nowrap;
  pointer-events: none;
}

.astral-column::before {
  content: 'COSMOLOGICAL // ALMANAC [IX]';
}

.spiritual-column::before {
  content: 'SOMATIC // PSYCHE [II]';
}

.biblical-column::before {
  content: 'MYTHOLOGICAL // LITERARY [IV]';
}

.alignment-column:hover {
  border-color: var(--color-nebula-purple);
  box-shadow: 6px 6px 0px var(--color-nebula-purple);
  transform: translateY(-2px);
}

@media(min-width: 800px) {
  .alignment-column.spiritual-column:hover {
    transform: translateY(calc(1.5rem - 2px));
  }
  .alignment-column.biblical-column:hover {
    transform: translateY(calc(-0.8rem - 2px));
  }
}

.astral-column:hover { border-color: var(--color-astral-gold); box-shadow: 6px 6px 0px var(--color-astral-gold); }
.spiritual-column:hover { border-color: var(--color-nebula-purple); }
.biblical-column:hover { border-color: var(--color-soft-lavender); box-shadow: 6px 6px 0px var(--color-soft-lavender); }

.alignment-column-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 1.25rem 0.8rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.alignment-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.alignment-column-header h5 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-bright);
  line-height: 1.3;
}

.alignment-card-body {
  padding: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-dim);
  flex-grow: 1;
  /* Astrological glyph watermark background */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' opacity='0.02'%3E%3Ccircle cx='50' cy='50' r='40' stroke='white' stroke-width='1.2' fill='none'/%3E%3Cpath d='M50,10 L50,90 M10,50 L90,50 M22,22 L78,78 M22,78 L78,22' stroke='white' stroke-width='0.6'/%3E%3Ccircle cx='50' cy='50' r='18' stroke='white' stroke-width='1' fill='none'/%3E%3Cpolygon points='50,16 79,68 21,68' stroke='white' stroke-width='0.6' fill='none'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  background-position: center 60px;
  background-repeat: no-repeat;
}

.alignment-card-body p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-dim);
  margin-bottom: 0.75rem;
  text-align: left;
}

.alignment-card-body p:last-child {
  margin-bottom: 0;
}

.alignment-card-body h3, .alignment-card-body h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-astral-gold);
  margin: 1.1rem 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alignment-card-body h3:first-child, .alignment-card-body h4:first-child {
  margin-top: 0;
}

.alignment-card-body ul {
  padding-left: 1.2rem;
  margin-bottom: 0.75rem;
}

.alignment-card-body li {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--color-text-dim);
}

.alignment-card-body strong {
  color: var(--color-soft-lavender);
}

/* -------------------------------------------------------------
   MOBILE SPECIFIC OVERRIDES & BOTTOM SHEETS
   ------------------------------------------------------------- */
@media(max-width: 767px) {
  .oracle-header {
    padding: 3.5rem 1rem 1.8rem;
  }
  
  .oracle-title {
    font-size: 2.3rem;
  }
  
  .oracle-card {
    padding: 1.6rem;
  }
  
  .portal-panel {
    padding: 1.8rem;
  }
  
  .results-panel {
    padding: 1.8rem;
  }

  .results-header {
    margin-bottom: 1.8rem;
  }

  .dream-title-heading {
    font-size: 1.7rem;
  }

  /* Make modal feel like an elegant slide-up bottom sheet on mobile devices */
  .modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .modal-content {
    max-height: 85vh;
    border-radius: var(--border-radius-default) var(--border-radius-default) 0 0;
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  @keyframes modal-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-close {
    top: 0.8rem;
    right: 1.2rem;
  }
  
  /* Large touch targets for buttons/controls */
  .btn-submit, .btn-action, .btn-toggle {
    min-height: 48px;
  }
  
  .style-pill {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }

  /* Zine Mobile Overrides */
  .alignment-column.spiritual-column,
  .alignment-column.biblical-column {
    transform: none !important;
  }
  
  .alignment-column {
    padding-left: 0.4rem !important;
    margin-bottom: 1.5rem;
  }
  
  /* Disable rotated marginalia on mobile for clean zine layout */
  .alignment-column::before {
    display: none !important;
  }
  
  /* Reset paragraph rotation on small screens */
  .scroll-reveal.unfolded {
    --zine-rotation: 0deg !important;
  }
  
  .dream-image-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   FLOATING DRAGGABLE SYSTEM PROCESS MONITOR (v1.2.0)
   ========================================================================== */

.float-monitor-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  font-size: 0.85rem;
  background: rgba(13, 13, 17, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--color-soft-lavender);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(139, 92, 246, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  max-width: 180px;
}

.float-monitor-btn:hover {
  border-color: var(--color-nebula-purple);
  color: var(--color-text-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), var(--shadow-purple-glow);
}

.system-monitor-window {
  position: fixed;
  top: 100px;
  right: 2rem;
  width: 530px;
  z-index: 998;
  background: rgba(9, 9, 12, 0.9);
  backdrop-filter: blur(35px) saturate(160%);
  -webkit-backdrop-filter: blur(35px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), var(--shadow-purple-glow);
  border-radius: var(--border-radius-default);
  animation: monitor-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes monitor-slide-in {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.monitor-titlebar {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.monitor-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-monitor-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}

.btn-monitor-close:hover {
  color: #ef4444;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-indicator.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: led-blink 1.5s infinite alternate ease-in-out;
}

.pulse-indicator.red {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: led-blink 0.5s infinite alternate ease-in-out;
}

@keyframes led-blink {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.monitor-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  grid-gap: 1.1rem;
  padding: 1.1rem;
}

.monitor-cell {
  display: flex;
  flex-direction: column;
}

.monitor-visualizer-cell {
  align-items: center;
  justify-content: flex-start;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding-right: 1.1rem;
}

.canvas-wrap {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-inner);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

#webgpu-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.webgpu-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.agent-led-indicators {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.led-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.led-bulb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.led-bulb.grey {
  background-color: #27272a;
  box-shadow: none;
}

.led-bulb.blue {
  background-color: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: led-blink 0.8s infinite alternate ease-in-out;
}

.led-bulb.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.led-bulb.red {
  background-color: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: led-blink 0.4s infinite alternate ease-in-out;
}

.gauges-row {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.gauge-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-inner);
  padding: 0.5rem;
}

.gauge-item canvas {
  display: block;
  margin-bottom: 0.25rem;
}

.gauge-item span {
  font-size: 0.65rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chart-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-inner);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.85rem;
}

#chart-canvas {
  width: 100%;
  height: 60px;
  display: block;
}

.chart-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.2rem;
}

.monitor-console {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-inner);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.console-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-console-copy {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--color-text-dim);
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-console-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-bright);
}

#console-logs-textbox {
  width: 100%;
  height: 90px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: #10b981;
  font-family: monospace;
  font-size: 0.7rem;
  padding: 0.5rem;
  line-height: 1.3;
  overflow-y: auto;
}

#console-logs-textbox.error {
  color: #ef4444;
}

@media(max-width: 600px) {
  .system-monitor-window {
    top: auto;
    bottom: 5.5rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .monitor-grid {
    grid-template-columns: 1fr;
    grid-gap: 0.85rem;
    padding: 0.85rem;
  }
  
  .monitor-visualizer-cell {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-right: 0;
    padding-bottom: 0.85rem;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
  }
  
  .canvas-wrap {
    width: 80px;
    height: 80px;
    margin-bottom: 0;
  }
  
  .agent-led-indicators {
    width: calc(100% - 100px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0.4rem;
  }
  
  .float-monitor-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.8rem;
  }
}

/* -------------------------------------------------------------
   MAGAZINE GRID LAYOUTS & STYLES (v1.0.8)
   ------------------------------------------------------------- */
.results-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media(min-width: 900px) {
  .results-top-grid {
    grid-template-columns: 6fr 4fr; /* Double-Page Spread: Hero image takes 60% width */
    align-items: stretch;
  }

  .dream-image-wrapper {
    margin-left: 0;
    width: 100%;
  }
}

.dream-original-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.dream-original-card .dream-original-text {
  height: 100%;
  box-sizing: border-box;
  background: rgba(4, 4, 6, 0.4);
  border-left: 3.5px solid var(--color-astral-gold);
  padding: 1.25rem 1.6rem;
  border-radius: 0 var(--border-radius-inner) var(--border-radius-inner) 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.results-analysis-section {
  width: 100%;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

/* Magazine Newspaper Multi-Column Text Block */
.magazine-text-block {
  column-count: 1;
  column-gap: 2.8rem;
  line-height: 1.75;
  color: var(--color-text-dim);
  font-size: 0.95rem;
  text-align: justify;
  margin: 1.5rem 0;
}

@media(min-width: 768px) {
  .magazine-text-block {
    column-count: 2;
  }
}

.magazine-text-block p {
  margin-bottom: 1.4rem;
}

/* Editorial Drop Cap for First Paragraph */
.magazine-text-block p:first-of-type {
  font-size: 1.05rem;
  color: var(--color-text-bright);
}

.magazine-text-block p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  font-weight: 800;
  float: left;
  color: var(--color-astral-gold);
  line-height: 0.8;
  margin-right: 0.7rem;
  margin-top: 0.25rem;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* Markdown Table & Wrappers */
.table-wrapper {
  column-span: all; /* Span full-width across multi-columns */
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--border-radius-inner);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.magazine-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--color-text-dim);
  text-align: left;
}

.magazine-table th {
  background: rgba(139, 92, 246, 0.12);
  color: var(--color-astral-gold);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.95rem 1.25rem;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.2);
}

.magazine-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  line-height: 1.6;
}

.magazine-table tr:last-child td {
  border-bottom: none;
}

.magazine-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.magazine-table tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Lightbox Modal Structure */
.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modal-zoom-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--border-radius-default);
  border: 1.5px solid var(--color-astral-gold);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95), var(--shadow-gold-glow);
  object-fit: contain;
}

#lightbox-close-btn {
  position: absolute;
  top: -2.8rem;
  right: 0;
  color: var(--color-text-dim);
  font-size: 2.8rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

#lightbox-close-btn:hover {
  color: var(--color-text-bright);
}

/* -------------------------------------------------------------
   READ MORE TOGGLES & TEXT MINIFICATION
   ------------------------------------------------------------- */
.read-more-wrapper {
  position: relative;
  width: 100%;
}

.read-more-content {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.read-more-content.collapsed {
  max-height: 140px;
}

.read-more-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent 0%, rgba(13, 13, 17, 0.95) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.read-more-content:not(.collapsed) .read-more-fade {
  opacity: 0;
}

.btn-read-more {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem auto 0 auto;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: var(--color-soft-lavender);
  padding: 0.45rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-read-more:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--color-text-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.15);
}

.btn-read-more:active {
  transform: translateY(0);
}

/* -------------------------------------------------------------
   INTERACTIVE DEFINITION WORD HIGHLIGHTS
   ------------------------------------------------------------- */
.markdown-content .glossary-term,
.magazine-text-block .glossary-term,
.alignment-card-body .glossary-term {
  color: var(--color-soft-lavender);
  border-bottom: 1.5px dotted rgba(139, 92, 246, 0.5);
  cursor: help;
  position: relative;
  transition: all 0.25s ease;
  padding: 0 3px;
  font-weight: 600;
}

.markdown-content .glossary-term:hover,
.magazine-text-block .glossary-term:hover,
.alignment-card-body .glossary-term:hover {
  color: var(--color-astral-gold);
  border-bottom-color: var(--color-astral-gold);
  background: rgba(139, 92, 246, 0.12);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.1);
}

/* -------------------------------------------------------------
   ALCHEMICAL DEFINITION POPUP CARD
   ------------------------------------------------------------- */
.definition-popup-card {
  position: absolute;
  z-index: 10000;
  background: #F5F1E6; /* Tactile cream paper backplate */
  border: 2.2px solid #1C1B1F; /* Thick zine outline */
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px; /* Organic hand-drawn paper edges */
  box-shadow: 4.5px 4.5px 0px #1C1B1F; /* Flat zine offset shadow */
  padding: 1.1rem;
  width: 290px;
  font-family: var(--font-mono); /* Typewriter annotations */
  font-size: 0.8rem;
  line-height: 1.6;
  color: #1C1B1F; /* High-contrast ink text */
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.96) rotate(-1.5deg); /* Tactile zine rotation */
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.definition-popup-card.show {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(-1.5deg);
}

.definition-popup-card .popup-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1.5px solid rgba(28, 27, 31, 0.15);
  padding-bottom: 0.4rem;
}

.definition-popup-card .popup-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-nebula-purple); /* Editorial accent colour */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  flex-grow: 1;
}

.definition-popup-card .popup-icon {
  font-size: 1.05rem;
}

.definition-popup-card .btn-popup-close {
  background: none;
  border: none;
  color: #7A7982;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 0.8;
  transition: color 0.2s ease;
}

.definition-popup-card .btn-popup-close:hover {
  color: #ef4444;
}

.definition-popup-card .popup-desc {
  margin: 0;
  color: #1C1B1F;
  font-size: 0.78rem;
  font-weight: 500;
}

/* -------------------------------------------------------------
   DEVELOPER TELEMETRY COST ROW (BIG & CLEAR)
   ------------------------------------------------------------- */
.monitor-cost-row {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  width: 100%;
}

.cost-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--border-radius-inner);
  padding: 0.55rem 0.5rem;
  transition: all 0.3s ease;
}

.cost-stat:last-child {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.15);
}

.cost-stat-label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.cost-stat:first-child .cost-stat-label {
  color: var(--color-soft-lavender);
}

.cost-stat:last-child .cost-stat-label {
  color: var(--color-astral-gold);
}

.cost-stat-value {
  font-family: 'Outfit', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-bright);
}

.cost-stat:first-child .cost-stat-value {
  text-shadow: 0 0 15px rgba(139, 92, 246, 0.45);
}

.cost-stat:last-child .cost-stat-value {
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.45);
}

/* -------------------------------------------------------------
   HIGH-FIDELITY PRINT & PDF STYLESHEET
   ------------------------------------------------------------- */
@media print {
  /* Force exact color reproduction in PDFs */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Set page size and margins */
  @page {
    size: letter;
    margin: 1.2cm 1.5cm;
  }

  /* Hide interactive elements, headers, footers, system monitor, narration players */
  .oracle-header,
  .oracle-footer,
  .image-actions,
  .details-tabs,
  .narration-player,
  .btn-back,
  #btn-toggle-monitor,
  #system-monitor-panel,
  .btn-read-more,
  .lightbox-modal {
    display: none !important;
  }

  /* Make background and results panel full width with no margins/borders */
  .portal-body {
    background: #050409 !important;
  }

  .results-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force display of both tabs consecutively in the printout */
  .tab-contents {
    display: block !important;
  }

  .tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 2rem;
  }

  /* Break pages cleanly so the Archetypes are on Page 2 */
  #tab-references {
    page-break-before: always;
    margin-top: 3rem;
    padding-top: 1rem;
  }

  /* Expand all collapsed read-more text fully for print */
  .read-more-content {
    max-height: none !important;
    overflow: visible !important;
  }

  .read-more-fade {
    display: none !important;
  }

  /* Prevent elements breaking awkwardly across pages */
  .core-message-card,
  .symbol-card-item,
  .alignment-column,
  .table-wrapper {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Modal Tab Styles for Settings & Projections */
.modal-tabs {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1.2rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: var(--color-astral-gold);
  border-bottom: 2px solid var(--color-astral-gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.settings-tab-pane {
  display: none;
  animation: tab-slide-up 0.4s ease forwards;
}

.settings-tab-pane.active {
  display: block;
}

.projection-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.5rem 0;
  padding: 1.2rem;
  background: rgba(4, 4, 6, 0.3);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
  .projection-controls {
    grid-template-columns: 1fr;
  }
}

.projection-controls label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
  font-family: 'Outfit', sans-serif;
}

/* Custom styled sliders */
.projection-controls input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  transition: background 0.3s;
}

.projection-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-astral-gold);
  cursor: pointer;
  box-shadow: 0 0 8px var(--color-astral-gold);
  transition: transform 0.1s ease;
}

.projection-controls input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.projection-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.projection-stats .stat-card {
  border-radius: 8px;
  padding: 0.8rem 0.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projection-stats .stat-card:hover {
  transform: translateY(-2px);
}

.projection-stats .gross-card {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: inset 0 0 12px rgba(16, 185, 129, 0.05);
}

.projection-stats .gross-card:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15), inset 0 0 12px rgba(16, 185, 129, 0.05);
}

.projection-stats .costs-card {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.05);
}

.projection-stats .costs-card:hover {
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.12), inset 0 0 12px rgba(239, 68, 68, 0.05);
}

.projection-stats .net-card {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.05);
}

.projection-stats .net-card:hover {
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15), inset 0 0 12px rgba(139, 92, 246, 0.05);
}

/* -------------------------------------------------------------
   SCROLL REVEAL STAGGERED REVEALS (v1.2.0)
   ------------------------------------------------------------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.unfolded {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(var(--zine-rotation, 0deg));
}

/* Add custom rotations to staggered items */
.markdown-content p:nth-of-type(even) {
  --zine-rotation: 0.55deg;
}
.markdown-content p:nth-of-type(odd) {
  --zine-rotation: -0.55deg;
}
.markdown-content ul:nth-of-type(even) {
  --zine-rotation: 0.4deg;
}
.markdown-content ul:nth-of-type(odd) {
  --zine-rotation: -0.4deg;
}

/* ==========================================================================
   ZINE MODAL ALERT & TIMER STYLING (v1.3.0)
   ========================================================================== */
.zine-alert-modal {
  max-width: 500px !important;
  background: var(--color-space-obsidian) !important;
  border: 3px solid var(--color-nebula-purple) !important;
  box-shadow: 8px 8px 0px var(--color-astral-gold) !important;
  border-radius: 0px !important; /* Sharp zine/comic look */
  padding: 2.5rem !important;
  font-family: var(--font-body);
}

.zine-alert-modal.cooldown {
  border: 3px solid var(--color-astral-gold) !important;
  box-shadow: 8px 8px 0px var(--color-nebula-purple) !important;
}

.zine-alert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 0.75rem;
}

.zine-alert-icon {
  font-size: 2rem;
}

.zine-alert-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--color-astral-gold);
  letter-spacing: 0.05em;
  margin: 0;
}

.zine-alert-modal.cooldown .zine-alert-title {
  color: var(--color-soft-lavender);
}

.zine-alert-message {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-dim);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.zine-alert-timer-box {
  background: var(--color-dream-zinc);
  border: 1px solid var(--color-border-subtle);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.zine-alert-timer-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.zine-alert-timer-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--color-astral-gold);
}

.zine-alert-modal.cooldown .zine-alert-timer-value {
  color: var(--color-soft-lavender);
}

.btn-zine-alert {
  display: block;
  width: 100%;
  background: var(--color-dream-zinc);
  border: 2px solid var(--color-text-muted);
  color: var(--color-text-bright);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.75rem;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.btn-zine-alert:hover {
  background: var(--color-nebula-purple);
  border-color: var(--color-nebula-purple);
  color: #fff;
  box-shadow: 4px 4px 0px var(--color-astral-gold);
}

.zine-alert-modal.cooldown .btn-zine-alert:hover {
  background: var(--color-astral-gold);
  border-color: var(--color-astral-gold);
  color: var(--color-space-obsidian);
  box-shadow: 4px 4px 0px var(--color-nebula-purple);
}

/* ==========================================================================
   DAW-INSPIRED COMPACT & STRAIGHT CARDS OVERRIDES
   ========================================================================== */

@media (min-width: 800px) {
  .alignments-grid {
    grid-template-columns: 1.15fr 0.85fr 1fr !important;
    grid-gap: 2rem !important;
  }
  .alignment-column.astral-column,
  .alignment-column.spiritual-column,
  .alignment-column.biblical-column {
    transform: none !important; /* Completely flat columns */
  }
  
  /* Remove separator lines to keep columns clean and stacked */
  .alignment-column:not(:last-child)::after {
    display: none !important;
  }
}

.alignment-column {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  background: rgba(13, 13, 17, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Flatten all rotations on bento cards, symbol cards, and history */
.bento-card,
.symbol-card-item,
.community-dream-card,
.history-grid > div {
  transform: none !important;
}
@media (min-width: 768px) {
  .bento-card:nth-child(even),
  .symbol-card-item:nth-child(even),
  .community-dream-card:nth-child(even),
  .history-grid > div:nth-child(even),
  .bento-card:nth-child(odd),
  .symbol-card-item:nth-child(odd),
  .community-dream-card:nth-child(odd),
  .history-grid > div:nth-child(odd) {
    transform: none !important;
  }
  
  .bento-card:nth-child(even):hover,
  .symbol-card-item:nth-child(even):hover,
  .community-dream-card:nth-child(even):hover,
  .bento-card:nth-child(odd):hover,
  .symbol-card-item:nth-child(odd):hover,
  .community-dream-card:nth-child(odd):hover {
    transform: none !important;
  }
}

/* Section IV: Handwritten Note Tooltip styling (Flat & Tape-Free) */
.definition-popup-card {
  background: #fef8d4 !important;
  color: #111111 !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  padding: 0.75rem !important;
  font-family: 'Courier Prime', Courier, monospace !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
  border-radius: 4px !important;
  transform: none !important;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.definition-popup-card.show {
  opacity: 1 !important;
  transform: none !important;
}

.definition-popup-card::before {
  display: none !important; /* Remove tape overlays */
}

.definition-popup-card .popup-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  padding-bottom: 0.25rem !important;
}

.definition-popup-card .popup-title {
  font-family: 'Courier Prime', Courier, monospace !important;
  color: #111111 !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.definition-popup-card .popup-desc {
  color: #111111 !important;
  font-family: 'Courier Prime', Courier, monospace !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
}

.definition-popup-card .btn-popup-close {
  color: #555555 !important;
  font-weight: bold !important;
}

/* SVG Tooltip Connector Stroke - Thinner & Subtle */
#tooltip-connector-svg path {
  fill: none !important;
  stroke: var(--color-soft-lavender) !important; /* Soft lavender indicator */
  stroke-width: 1.5px !important; /* Subtle thin connector line */
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  filter: none !important; /* Remove heavy drop shadow */
  opacity: 0.75 !important;
}

/* Button pop-art enhancements (Subtle & Flat) */
.btn-submit {
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2) !important;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%) !important;
  transition: all 0.2s ease !important;
  transform: none !important;
}
.btn-submit:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35) !important;
}
.btn-submit:active {
  transform: none !important;
}

.btn-action {
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
  background: #1A1A1A !important;
  transition: all 0.2s ease !important;
  transform: none !important;
}
.btn-action:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #222222 !important;
}
.btn-action:active {
  transform: none !important;
}


/* ==========================================================================
   LANDING PAGE BENTO GRID & SCROLLBAR OVERRIDES
   ========================================================================== */

/* 1. DAW-Inspired Compact Card Padding */
.oracle-card {
  padding: 1.25rem !important; /* Compact DAW-like padding */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  background: rgba(13, 13, 17, 0.95) !important;
  transform: none !important;
}

/* 2. Bento Dashboard Layout Organization */
@media(min-width: 900px) {
  .bento-dashboard {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 Columns */
    grid-template-rows: auto auto !important;
    grid-gap: 1rem !important;
  }
  
  .cell-input {
    grid-column: span 2 !important; /* Input panel spans full width */
    grid-row: span 1 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .cell-style {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  
  .cell-agents {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* 3. Textarea & Content Spacing Refinements */
textarea#dream-input {
  background: #fdf9d8 !important;
  color: #111111 !important;
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
  box-shadow: none !important;
  font-family: 'Courier Prime', Courier, monospace !important;
  font-size: 1.05rem !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  border-radius: 4px !important;
  background-image: none !important;
  padding: 14px 18px !important;
  height: 220px !important; /* Snug height to fit standard viewports */
  margin-bottom: 1rem !important;
  width: 100% !important;
}
.card-header {
  margin-bottom: 0.65rem !important;
}
.card-desc {
  margin-bottom: 0.85rem !important;
  font-size: 0.9rem !important;
}
.textarea-wrapper {
  margin-bottom: 1rem !important;
}
.btn-submit {
  max-width: 280px !important;
  padding: 0.8rem 1.5rem !important;
  margin-top: 0 !important;
}

/* 4. Sleek, Compact Controls & List Densities */
.style-preferences {
  gap: 1rem !important;
}
.style-group {
  gap: 0.4rem !important;
}
.style-pill {
  padding: 0.45rem 0.75rem !important;
  font-size: 0.75rem !important;
  margin-bottom: 0.25rem !important;
}
.agent-roles-list {
  gap: 0.85rem !important;
}
.agent-role-item {
  padding: 0.65rem 0.85rem !important;
  gap: 0.75rem !important;
}
.agent-role-item h5 {
  font-size: 0.9rem !important;
  margin-bottom: 0.1rem !important;
}
.agent-role-item p {
  font-size: 0.78rem !important;
}

/* 5. Subtle Custom Scrollbars for All Elements */
::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}
::-webkit-scrollbar-track {
  background: rgba(12, 11, 14, 0.95) !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(138, 43, 226, 0.4) !important;
  border-radius: 4px !important;
  border: 1px solid rgba(13, 13, 17, 0.95) !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 43, 226, 0.6) !important;
}
* {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(138, 43, 226, 0.4) rgba(12, 11, 14, 0.95) !important;
}

/* 6. Remove rotated background vertical marginalia tags */
.alignment-column::before {
  display: none !important;
}

/* 7. Clear vertical displacement translation offsets in columns */
@media (min-width: 800px) {
  .alignment-column.astral-column,
  .alignment-column.spiritual-column,
  .alignment-column.biblical-column {
    transform: none !important;
    margin: 0 !important;
  }
}

/* 8. Staggered text rotation overrides (Straightened) */
.markdown-content p:nth-of-type(even) {
  --zine-rotation: 0deg !important;
}
.markdown-content p:nth-of-type(odd) {
  --zine-rotation: 0deg !important;
}
.markdown-content ul:nth-of-type(even) {
  --zine-rotation: 0deg !important;
}
.markdown-content ul:nth-of-type(odd) {
  --zine-rotation: 0deg !important;
}
.scroll-reveal.unfolded {
  --zine-rotation: 0deg !important;
}

/* 9. Disable double-carding in alignment columns */
.alignment-card-body p,
.alignment-card-body blockquote,
.alignment-card-body ul {
  background: transparent !important;
  border: none !important;
  border-left: none !important;
  padding: 0 !important;
  margin-bottom: 1rem !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--color-text-dim) !important;
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
}

.alignment-card-body p::before,
.alignment-card-body blockquote::before,
.alignment-card-body ul::before {
  display: none !important; /* Hide timeline yellow dots inside alignment columns */
}

/* 10. Hide empty paragraphs globally within markdown contents to prevent empty cards */
.markdown-content p:empty,
.markdown-content p:blank {
  display: none !important;
}



