/* === CSS Custom Properties === */
:root {
  --bg-deep: #0f0d0b;
  --bg-card: #1a1714;
  --bg-card-hover: #242019;
  --accent-gold: #c9a84c;
  --accent-gold-dim: #a08535;
  --accent-warm: #e8d5b0;
  --text-primary: #f2ece3;
  --text-secondary: #b5aa9e;
  --text-muted: #9e958c;
  --border-subtle: #2a2520;
  --chip-selected-bg: #2d2515;
  --danger: #c44;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-handwritten: 'Caveat', cursive;
  --font-terminal: 'IBM Plex Mono', 'Courier New', monospace;
  --adventure-terminal: #33ff33;
  --adventure-scanline: rgba(0,0,0,0.03);
  --adventure-glow: rgba(201, 168, 76, 0.15);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* === Focus styles for keyboard navigation === */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* === Skip to content (screen reader) === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 300;
  padding: 12px 24px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100dvh;
  overflow-x: hidden;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* === Breadcrumbs === */
.breadcrumbs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  padding-right: 160px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(15, 13, 11, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.breadcrumbs.hidden {
  display: none;
}

.breadcrumb-link {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb-link:hover {
  color: var(--text-primary);
}

.breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* === Screens === */
.screen {
  display: none;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
}

/* === Welcome Screen === */
.brand-header {
  text-align: center;
  margin-bottom: 12px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 6vw, 3.5rem);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.welcome-headline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--accent-gold);
  text-align: center;
  max-width: 460px;
  margin-top: 8px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.welcome-description {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 380px;
}

.welcome-stat {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin: 0 0 24px;
  opacity: 0.85;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 480px;
}

/* Primary cards take full-width rows on mobile. */
.mode-card[data-priority="primary"] {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 640px;
    gap: 16px;
  }
  .mode-card[data-priority="primary"] {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .mode-grid {
    grid-template-columns: repeat(6, 1fr);
    max-width: 900px;
  }
  .mode-card[data-priority="primary"] {
    grid-column: span 3;
  }
  /* With two secondary modes enabled, span 3 so they mirror the primary row
     and stay centered. If a third secondary is ever re-added (e.g. specific),
     reduce this to span 2. */
  .mode-card[data-priority="secondary"] {
    grid-column: span 3;
  }
}


.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mode-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.08);
}

.mode-card:active {
  transform: scale(0.97);
}

/* Primary cards: larger padding + icon, heavier name, subtle gold rim + dot. */
.mode-card[data-priority="primary"] {
  padding: 32px 22px;
  gap: 14px;
  border-color: var(--accent-gold-dim);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.08);
  position: relative;
}

.mode-card[data-priority="primary"]::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0.85;
}

.mode-card-icon {
  font-size: 1.8rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.mode-card-icon .wax-seal-icon {
  width: 48px;
  height: 48px;
}

.mode-card[data-priority="primary"] .mode-card-icon {
  height: 72px;
}

.mode-card[data-priority="primary"] .mode-card-icon .wax-seal-icon {
  width: 72px;
  height: 72px;
}

.mode-card-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
}

.mode-card[data-priority="primary"] .mode-card-name {
  font-size: 1.25rem;
  font-weight: 500;
}

.mode-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mode-card[data-priority="primary"] .mode-card-desc {
  font-size: 0.95rem;
}

/* === Mode Separator & Game Cards === */
.mode-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 16px 0 0;
  grid-column: 1 / -1;
}
.mode-separator-line  { flex: 1; height: 1px; background: var(--border-subtle); }
.mode-separator-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-card--game {
  width: 100%;
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 16px;
  background: transparent;
  border-style: dashed;
  border-color: var(--border-subtle);
  padding: 18px 24px;
  /* Reset primary-card overrides if a game card is ever marked primary. */
  box-shadow: none;
}

.mode-card--game::before {
  content: none;
}
.mode-card--game .mode-card-icon { height: auto; font-size: 1.1rem; color: var(--text-muted); }
.mode-card--game .mode-card-name { font-size: 0.95rem; color: var(--text-secondary); }
.mode-card--game .mode-card-desc { font-size: 0.8rem; color: var(--text-muted); }
.mode-card--game:hover {
  background: rgba(74, 103, 65, 0.08);
  border-color: #4a6741;
  border-style: solid;
  box-shadow: 0 4px 20px rgba(74, 103, 65, 0.10);
  transform: translateY(-2px);
}
.mode-card--game svg { width: 40px; height: 40px; flex-shrink: 0; }

/* === Quiz Screen === */
.quiz-chrome {
  width: 100%;
  margin-bottom: 48px;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.back-btn {
  position: absolute;
  top: 16px;
  left: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.2s;
}

.back-btn:hover { color: var(--text-primary); }
.back-btn.hidden { visibility: hidden; }

.question-container {
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.question-inner {
  width: 100%;
  text-align: center;
  animation: fadeSlideIn 0.3s ease forwards;
}

.question-inner.exiting {
  animation: fadeSlideOut 0.25s ease forwards;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-24px); }
}

@keyframes fadeSlideInReverse {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-text {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.4;
}

/* Chips */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 560px;
  margin: 0 auto;
}

.chip {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.chip.selected {
  background: var(--chip-selected-bg);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.chip.max-reached:not(.selected) {
  opacity: 0.4;
  cursor: default;
}

.chip-limit-note {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.chip-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  font-size: 0.55rem;
  font-style: italic;
  color: var(--text-muted);
  margin-left: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.chip-tooltip {
  position: fixed;
  transform: translateX(-50%) translateY(-100%);
  background: var(--bg-card, #1a1714);
  color: var(--text-primary, #f2ece3);
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 8px 14px;
  border-radius: 8px;
  max-width: 240px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chip-tooltip.visible {
  opacity: 1;
}

/* Freetext */
.freetext-input {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
  outline: none;
}

.freetext-input::placeholder {
  color: var(--text-muted);
}

.freetext-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

/* Slider */
.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  gap: 12px;
}

.slider-current-label {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent-gold);
  min-height: 1.4em;
}

.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--bg-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--bg-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 300;
}

.slider-labels span {
  text-align: center;
  flex: 1;
}

/* Quiz nav */
.quiz-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

/* === Buttons === */
.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-deep);
  border: none;
  border-radius: 100px;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-gold-dim);
  transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-secondary.hidden { display: none; }

/* === View All Books Button === */
.view-all-btn {
  position: fixed;
  top: 8px;
  right: 16px;
  z-index: 120;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(30, 25, 18, 0.95);
  border: 1px solid var(--accent-gold);
  border-radius: 8px;
  padding: 8px 18px;
  text-decoration: none;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
  box-shadow: 0 0 12px 2px rgba(201, 168, 76, 0.15);
  letter-spacing: 0.02em;
}

.view-all-btn:hover {
  box-shadow: 0 0 20px 4px rgba(201, 168, 76, 0.25);
  border-color: var(--accent-gold);
}

/* === Loading Screen === */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loading-animation {
  flex-shrink: 0;
}

.bookshelf-anim .book {
  transform-origin: bottom center;
  animation: bookPull 3.6s ease-in-out infinite;
}

.bookshelf-anim .book:nth-child(1) { animation-delay: 0s; }
.bookshelf-anim .book:nth-child(2) { animation-delay: 0.6s; }
.bookshelf-anim .book:nth-child(3) { animation-delay: 1.2s; }
.bookshelf-anim .book:nth-child(4) { animation-delay: 1.8s; }
.bookshelf-anim .book:nth-child(5) { animation-delay: 2.4s; }
.bookshelf-anim .book:nth-child(6) { animation-delay: 3.0s; }

.scan-highlight {
  animation: scanBooks 3.6s ease-in-out infinite;
}

@keyframes scanBooks {
  0% { transform: translateX(0); opacity: 0.7; }
  100% { transform: translateX(105px); opacity: 0.3; }
}

@keyframes bookPull {
  0%, 70%, 100% { transform: translateY(0); }
  15% { transform: translateY(-8px); }
  30% { transform: translateY(0); }
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.loading-subtext {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 1.4em;
  transition: opacity 0.4s ease;
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 100%;
  overflow-wrap: break-word;
}

.queue-notice {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.queue-notice.visible {
  opacity: 1;
}

/* === Results Screen === */
#screen-results {
  max-width: 960px;
}

.results-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
}

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

.result-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-bottom: 3px solid var(--mood-color, var(--accent-gold));
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  animation: revealCard 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.3s;
  position: relative;
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.result-card:nth-child(odd)::before {
  mix-blend-mode: soft-light;
}

.result-card:nth-child(even)::before {
  mix-blend-mode: overlay;
}

.result-card:hover {
  border-color: var(--mood-color, var(--accent-gold));
  transform: scale(1.02);
}

.result-card {
  animation: revealCard 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             moodGlow 4s ease-in-out 0.8s infinite;
}

@keyframes moodGlow {
  0%, 100% {
    box-shadow: 0 0 20px 8px color-mix(in srgb, var(--mood-color, var(--accent-gold)) 25%, transparent);
  }
  50% {
    box-shadow: 0 0 35px 15px color-mix(in srgb, var(--mood-color, var(--accent-gold)) 40%, transparent);
  }
}

.result-card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.result-card:nth-child(1) { animation-delay: 0ms; }
.result-card:nth-child(2) { animation-delay: 200ms; }
.result-card:nth-child(3) { animation-delay: 400ms; }
.result-card:nth-child(4) { animation-delay: 600ms; }

@keyframes revealCard {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-cover {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--bg-card-hover);
}

.result-cover-fallback {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #1a1714 0%, #2a2520 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.fallback-icon {
  width: 56px;
  height: 56px;
  opacity: 0.6;
}

.fallback-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent-gold);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.result-body {
  padding: 20px;
}

.result-role {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.role-bestMatch {
  background: rgba(201, 168, 76, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.role-safeBet {
  background: rgba(180, 180, 180, 0.1);
  color: #b0aba3;
  border: 1px solid rgba(180, 180, 180, 0.2);
}

.role-wildcard {
  background: rgba(140, 100, 180, 0.12);
  color: #b89cd8;
  border: 1px solid rgba(140, 100, 180, 0.25);
}

.role-hiddenGem {
  background: rgba(120, 160, 130, 0.12);
  color: #8bb89a;
  border: 1px solid rgba(120, 160, 130, 0.25);
}

.role-topRated {
  background: rgba(212, 162, 78, 0.12);
  color: #d4a24e;
  border: 1px solid rgba(212, 162, 78, 0.25);
}

.role-wildCard {
  background: rgba(185, 78, 78, 0.12);
  color: #c47a7a;
  border: 1px solid rgba(185, 78, 78, 0.25);
}

.role-aiPick, .role-aiPick2 {
  background: rgba(91, 143, 185, 0.12);
  color: #5b8fb9;
  border: 1px solid rgba(91, 143, 185, 0.25);
}

.result-reason {
  font-size: 0.88rem;
  color: var(--accent-warm);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-reason.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.result-expand {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.result-expand:hover {
  color: var(--accent-gold);
}

/* Star rating block */
.result-rating-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
}

.star-row {
  display: flex;
  gap: 2px;
}

.star-icon {
  width: 18px;
  height: 18px;
}

.rating-numeric {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4a24e;
  letter-spacing: 0.02em;
}

/* Wax seal badge — scalloped edge, color varies by role */
.wax-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  padding: 16px;
  color: #f0e6d2;
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin: 12px auto;
  transform: rotate(var(--seal-rotation, 0deg));
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  clip-path: url(#scallop-clip);
  /* Default: classic crimson */
  background: radial-gradient(circle at 35% 35%, #8b2020, #6b1515 60%, #4a0e0e);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* Color variants */
.wax-seal[data-seal="amber"] {
  background: radial-gradient(circle at 35% 35%, #b8862a, #8a5e1a 60%, #5c3d0e);
}

.wax-seal[data-seal="plum"] {
  background: radial-gradient(circle at 35% 35%, #7a3b6a, #5c2250 60%, #3d1035);
}

.wax-seal[data-seal="forest"] {
  background: radial-gradient(circle at 35% 35%, #3d7a4a, #2a5c35 60%, #1a3d22);
}

.wax-seal[data-seal="navy"] {
  background: radial-gradient(circle at 35% 35%, #3b5a8a, #2a4068 60%, #1a2a45);
}

/* Feedback row */
.feedback-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.feedback-prompt {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.feedback-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.feedback-btn:hover {
  border-color: var(--text-muted);
  transform: scale(1.1);
}

.feedback-btn.active {
  border-color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.1);
  transform: scale(1.1);
}

.result-debug-score {
  display: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: monospace;
}

.debug-active .result-debug-score {
  display: block;
}

.result-cta {
  display: block;
  margin-top: 16px;
  padding: 10px 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-gold);
  text-align: center;
  text-decoration: none;
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.result-card:hover .result-cta {
  color: var(--text-primary);
}

/* === Gift Message Section === */
.gift-message-section {
  margin-top: 48px;
  text-align: center;
}

.gift-message-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.gift-message-subtext {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.gift-message-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px 28px;
  max-width: 520px;
  margin: 0 auto;
}

.gift-message-text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 16px;
}

.gift-copy-btn {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gift-copy-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-main);
}

.start-over-btn {
  margin-top: 40px;
}

/* === Email Results Button === */
.btn-email-results {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-dim);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-email-results:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: var(--accent-gold);
}

/* === Email Prompt Overlay === */
.email-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 20px;
}

.email-prompt-overlay.visible {
  opacity: 1;
}

.email-prompt-overlay.exiting {
  opacity: 0;
}

.email-prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: fadeSlideIn 0.3s ease-out;
}

.email-prompt-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.email-prompt-subtext {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.5;
}

.email-prompt-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.email-prompt-input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.email-prompt-input:focus {
  border-color: var(--accent-gold);
}

.email-prompt-input::placeholder {
  color: var(--text-muted);
}

.email-prompt-send {
  background: var(--accent-gold);
  color: var(--bg-main);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.email-prompt-send:hover {
  background: var(--accent-gold-dim);
}

.email-prompt-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.email-prompt-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.email-prompt-dismiss:hover {
  color: var(--text-secondary);
}

.email-prompt-feedback {
  font-family: var(--font-body);
  font-size: 0.82rem;
  min-height: 1.2em;
  margin-bottom: 8px;
}

.email-prompt-feedback.success {
  color: #8bb89a;
}

.email-prompt-feedback.error {
  color: #c47a7a;
}

.email-prompt-feedback.sending {
  color: var(--text-muted);
}

/* === Email Inline Form (under button) === */
.email-inline-form {
  width: 100%;
  max-width: 420px;
  margin: 16px auto 0;
  text-align: center;
  animation: fadeSlideIn 0.2s ease-out;
}

.email-inline-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.4;
}

.email-inline-row {
  display: flex;
  gap: 8px;
}

/* === No Match Screen === */
.no-match-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.no-match-icon {
  color: var(--text-muted);
}

.no-match-text {
  font-size: 1.05rem;
  color: var(--accent-warm);
  max-width: 440px;
  line-height: 1.7;
}

/* === Error Screen === */
.error-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.6;
}
.rate-limit-timer {
  display: inline-block;
  color: var(--accent-gold-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.error-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* === Debug Panel === */
.debug-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 0.2s;
  z-index: 100;
}

.debug-toggle:hover { opacity: 0.7; }

.debug-panel {
  position: fixed;
  bottom: 60px;
  right: 16px;
  width: 380px;
  max-height: 50vh;
  overflow-y: auto;
  background: rgba(15, 13, 11, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  z-index: 99;
  backdrop-filter: blur(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.debug-panel.hidden {
  display: none;
}

.debug-panel h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.debug-section {
  margin-bottom: 16px;
}

.debug-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.debug-panel pre {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

/* === Error toast === */
.error-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 200;
  animation: fadeSlideIn 0.3s ease;
}

/* === Shake animation === */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.shake { animation: shake 0.4s ease; }

/* === Disclosure footer === */
.disclosure {
  text-align: center;
  padding: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 40px auto 0;
}

.disclosure a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.disclosure a:hover {
  color: var(--text-primary);
}

.footer-signature {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.footer-signature a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-signature a:hover {
  color: var(--text-primary);
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  text-decoration: none;
}

.footer-instagram:hover {
  color: var(--text-primary);
}

.footer-instagram svg {
  vertical-align: middle;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Responsive === */
@media (max-width: 767px) {
  .breadcrumbs {
    padding-right: 20px;
  }

  .screen {
    padding: 44px 16px 24px;
  }

  .loading-content {
    gap: 16px;
  }

  .candle-glow {
    width: 60px;
    height: 60px;
  }

  .loading-text {
    font-size: 1.25rem;
  }

  .loading-subtext {
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .debug-panel {
    width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
  }

  .result-card {
    max-width: 100%;
    margin: 0 auto;
  }

  .chip {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .quiz-nav {
    margin-top: 24px;
  }

  .btn-primary, .btn-secondary {
    padding: 14px 28px;
    min-height: 48px;
  }

  .chip {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .chip-with-desc {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 14px;
    padding: 10px 16px;
    text-align: left;
    width: 100%;
  }

  .chip-desc {
    display: block;
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 3px;
  }

  .chip-with-desc.selected .chip-desc {
    color: var(--accent-gold);
    opacity: 0.7;
  }

  .chip-grid:has(.chip-with-desc) {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .mode-card {
    min-height: 48px;
  }

  .freetext-input {
    font-size: 16px;
  }

  /* Keep View All fixed on mobile too so it doesn't scroll away with the page. */
  .view-all-btn {
    top: 6px;
    right: 12px;
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

/* === "Show Me Different" Button === */
.different-books-btn {
  display: block;
  margin: 32px auto 0;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-dim);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.different-books-btn:hover:not(:disabled) {
  background: rgba(201, 168, 76, 0.1);
}

.different-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.different-books-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* === Browsing Signal === */
.browsing-signal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.8;
}

.browsing-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* === Resume Modal === */
.resume-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 11, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.resume-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  max-width: 360px;
  text-align: center;
}

.resume-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.resume-actions .btn-primary,
.resume-actions .btn-secondary {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.resume-actions .btn-primary {
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-weight: 600;
}

.resume-actions .btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* === Share Button === */
.results-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-dim);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-share:hover {
  background: rgba(201, 168, 76, 0.1);
}

/* === Help/Feedback FAB === */
.help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.85;
  text-decoration: none;
}

.help-fab:hover,
.help-fab:focus-visible {
  opacity: 1;
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
}

/* Swap FAB to bottom-left in the band where the mode grid fills the viewport
   and would otherwise collide with the bottom-right pill. */
@media (min-width: 900px) and (max-width: 1100px) {
  .help-fab {
    right: auto;
    left: 24px;
  }
}

/* === Promotion Banner === */
.promo-banner {
  background: var(--accent-gold);
  color: var(--bg-deep);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
}

/* === Easter Egg Styles === */
.easter-egg-banner {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-style: italic;
  margin-top: 8px;
  animation: fadeIn 0.5s ease, fadeOut 0.5s ease 5s forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

.card-staff-pick {
  border: 1px solid var(--accent-gold) !important;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.2);
}

.card-dressed-up {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(201, 168, 76, 0.05) 100%) !important;
}

.easter-egg-badge {
  display: inline-block;
  font-family: var(--font-handwritten);
  font-size: 0.9rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.card-editor-fave {
  border: 1px solid rgba(201, 168, 76, 0.4) !important;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.15);
}

.card-cult-classic {
  border: 1px solid rgba(91, 143, 185, 0.4) !important;
  box-shadow: 0 0 8px rgba(91, 143, 185, 0.15);
}

.card-sleeper-hit {
  border: 1px solid rgba(139, 184, 154, 0.4) !important;
  box-shadow: 0 0 8px rgba(139, 184, 154, 0.15);
}

.answer-egg {
  font-size: 0.82rem;
  color: var(--accent-gold);
  font-style: italic;
  text-align: center;
  margin-top: 12px;
  animation: fadeIn 0.4s ease, fadeOut 0.4s ease 2.2s forwards;
}

.different-egg {
  text-align: center;
  margin-bottom: 12px;
}

/* ============================================================
   FAQ Widget
   ============================================================ */
.faq-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 900;
  font-family: 'Inter', -apple-system, sans-serif;
}

/* Pill */
.faq-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(26, 23, 20, 0.92);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: #b5aa9e;
  padding: 9px 16px 9px 13px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.faq-pill:hover {
  border-color: rgba(201, 168, 76, 0.5);
  color: #f2ece3;
}
.faq-pill--active {
  border-color: rgba(201, 168, 76, 0.4);
  color: #c9a84c;
}
.faq-pill-icon { flex-shrink: 0; opacity: 0.7; }
.faq-pill--active .faq-pill-icon { opacity: 1; color: #c9a84c; }

/* Panel */
.faq-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 340px;
  max-height: 480px;
  background: #1a1714;
  border: 1px solid #2a2520;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.faq-panel[hidden] { display: none; }

.faq-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #2a2520;
  flex-shrink: 0;
}
.faq-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: #f2ece3;
  font-style: italic;
}
.faq-close {
  background: transparent;
  border: none;
  color: #7a7168;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.faq-close:hover { color: #f2ece3; }

/* Scrollable list */
.faq-items {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  padding: 8px 0;
}
.faq-items::-webkit-scrollbar { width: 4px; }
.faq-items::-webkit-scrollbar-track { background: transparent; }
.faq-items::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 2px; }

/* Accordion */
.faq-item { border-bottom: 1px solid #231f1c; }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #c9b99a;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.15s;
}
.faq-question:hover { color: #f2ece3; }
.faq-question[aria-expanded="true"] { color: #f2ece3; }

.faq-chevron {
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.2s;
  color: #5a5248;
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: #c9a84c;
}

.faq-answer { padding: 0 16px 14px; }
.faq-answer p {
  color: #9a9084;
  font-size: 0.8rem;
  line-height: 1.65;
  margin: 0;
}

/* Mobile */
@media (max-width: 480px) {
  .faq-widget { bottom: 16px; left: 16px; }
  .faq-panel { width: calc(100vw - 32px); max-height: 60vh; }
}

/* === Accessibility: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .result-card {
    transform: none !important;
  }

  .result-card:hover {
    transform: none !important;
  }

  .browsing-dot {
    animation: none;
    opacity: 1;
  }
}

/* === Adventure Results Override === */
.adventure-results-headline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  opacity: 0.8;
}

/* === Toast Notification === */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--accent-gold-dim);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw;
  text-align: center;
}

.toast-notification.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === Skeleton Loading Cards === */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  height: 280px;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* === Loading Cancel Button === */
.loading-cancel-btn {
  margin-top: 24px;
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* === Print Styles === */
@media print {
  .help-fab, #faq-widget, .quiz-nav, .results-actions, .feedback-row,
  .debug-panel, .promo-banner, .email-prompt-overlay, .breadcrumbs,
  .btn-different-books, .loading-cancel-btn, .different-hint,
  .email-inline-form, .gift-message-section .gift-copy-btn { display: none !important; }
  .screen { max-width: 100%; padding: 0; }
  .result-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .gift-message-card { border: 1px solid #ccc; }
  body { background: white !important; color: black !important; }
  .result-reason, .gift-message-text { color: #222 !important; }
  .result-role { color: #333 !important; }
  .results-heading { color: #000 !important; }
  .star-row svg path { stroke: #888 !important; }
}

