/* ═══════════════════════════════════════════════════════════
   STAGE 1 — TAROT CARD SYSTEM  v4
   Bright, upbeat, socialist-utopian aesthetic
   ═══════════════════════════════════════════════════════════ */

/* ── Landing screen — bright & friendly ──────────────────── */
#screen-landing {
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf4e3 50%, #e8f4d8 100%);
}

#screen-landing .landing-bg {
  background: none;
}

#screen-landing .stars {
  background-image: none;
}

#screen-landing .landing-title {
  color: #2a1a06;
  text-shadow: none;
}

#screen-landing .landing-title-secondary {
  color: #2a1a06;
  text-shadow: none;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

#screen-landing .landing-title-inverted {
  color: #CFCFCF;
  text-shadow: none;
}

#screen-landing .landing-title em {
  color: #c07010;
}

#screen-landing .landing-sub {
  color: #6b4a20;
}

#screen-landing .landing-eyebrow {
  color: #9a6a30;
}

#screen-landing .privacy-notice {
  color: #7a5a30;
  background: rgba(180,120,20,0.08);
  border-color: rgba(180,120,20,0.2);
}

/* ── Stage 1 screen ──────────────────────────────────────── */
#screen-stage1 {
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf4e3 60%, #e8d5a0 100%);
  justify-content: flex-start;
  min-height: 100dvh;
}

.stage1-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
}

.stage1-header { text-align: center; max-width: 480px; }

.stage-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7a4a10;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.stage-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  color: #2a1a06;
  line-height: 1.1;
}

.stage-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: #6b4a20;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ── Three cards row ─────────────────────────────────────── */
.cards-area {
  display: flex;
  flex-direction: row;
  gap: 0.875rem;
  width: 100%;
  max-width: 480px;
  justify-content: center;
  align-items: flex-start;
}

.tarot-card-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

/* ── Card outer container (perspective, static) ─────────── */
.tarot-card {
  width: 100%;
  aspect-ratio: 2 / 3.4;
  cursor: pointer;
  perspective: 1000px;
  border-radius: 12px;
}

/* ── Inner wrapper — THIS is what rotates ────────────────── */
.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}

.tarot-card:hover:not(.tarot-flipped) .tarot-card-inner {
  transform: rotateY(8deg) translateY(-3px);
}

.tarot-card.tarot-flipped .tarot-card-inner {
  transform: rotateY(180deg);
}

/* ── Both faces ──────────────────────────────────────────── */
.tarot-back,
.tarot-front {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── BACK: upbeat utopian world ──────────────────────────── */
.tarot-back {
  background: linear-gradient(160deg, #e8a020 0%, #f5c040 40%, #e87830 100%);
  border: 2px solid rgba(255,255,255,0.45);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.1);
  justify-content: space-between;
  padding: 0.65rem 0.6rem 0.55rem;
}

.tarot-back-tagline {
  font-family: var(--font-display);
  font-size: clamp(0.45rem, 1.5vw, 0.6rem);
  font-weight: 700;
  color: rgba(50,20,0,0.55);
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
}

.tarot-back-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  width: 78%;
}

.tarot-back-img svg,
.tarot-back-img img {
  width: 100%;
  height: auto;
  fill: rgba(50,20,0,0.7);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.tarot-back-hint {
  font-size: clamp(0.42rem, 1.4vw, 0.55rem);
  color: rgba(50,20,0,0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── FRONT: condition revealed ───────────────────────────── */
/* Back face starts at rotateY(180deg) — hidden until inner flips */
.tarot-front {
  transform: rotateY(180deg);
  border: 2px solid;
  justify-content: center;
  padding: 0.75rem 0.6rem;
  gap: 0.5rem;
  text-align: center;
}

.tarot-front-risk {
  background: linear-gradient(180deg, #fff8f0 0%, #fae8d0 100%);
  border-color: #d4602a;
  border-top: 4px solid #c0392b;
  box-shadow: inset 0 -3px 0 rgba(192,57,43,0.15);
}

.tarot-front-safe {
  background: linear-gradient(180deg, #f0faf4 0%, #d4f0dc 100%);
  border-color: #27ae60;
  border-top: 4px solid #27ae60;
}

/* Happy state after saving */
.tarot-card.tarot-resolved .tarot-front-risk {
  background: linear-gradient(180deg, #f0faf4 0%, #d4f0dc 100%);
  border-color: #27ae60;
  border-top: 4px solid #27ae60;
}

.tarot-target {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.35);
  font-weight: 600;
}

.tarot-emoji {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1;
}
.tarot-card.tarot-resolved .tarot-emoji { display: none; }

.tarot-condition-name {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 3vw, 1.1rem);
  font-weight: 700;
  color: #1a0a00;
  line-height: 1.2;
}
.tarot-card.tarot-resolved .tarot-condition-name { display: none; }

/* Happy replacement content */
.tarot-happy-icon {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1;
  display: none;
}
.tarot-happy-text {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  font-weight: 700;
  color: #1a6630;
  line-height: 1.3;
  display: none;
  text-align: center;
}
.tarot-card.tarot-resolved .tarot-happy-icon { display: block; }
.tarot-card.tarot-resolved .tarot-happy-text { display: block; }

/* Target label below card */
.tarot-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a4a10;
  font-weight: 600;
  text-align: center;
}

/* ── Info area — single entry, replaced on each new flip ─── */
.narrative-area {
  width: 100%;
  max-width: 480px;
}

.nar-entry {
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeUp 0.35s ease both;
}

.nar-risk { background: #fff8f0; border: 1px solid #e0c090; }
.nar-safe { background: #f0faf4; border: 1px solid #90d0a0; }

.nar-target-badge {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7a4a10;
  background: rgba(200,140,0,0.12);
  border-radius: 100px;
  padding: 0.15rem 0.65rem;
  align-self: flex-start;
}

/* Figure section */
.nar-fig-row {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.nar-fig-img,
.nar-fig-ph {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  object-position: top;
  border: 2px solid rgba(200,140,0,0.3);
  background: #f0e8d0;
}

.nar-fig-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #a07030;
}

.nar-fig-info { flex: 1; min-width: 0; }

.nar-fig-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a0a00;
  line-height: 1.2;
}

.nar-fig-years {
  font-size: 0.72rem;
  color: #a07030;
  margin-bottom: 0.2rem;
}

/* Narrative text */
.nar-dealt {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: #8b2a10;
  line-height: 1.55;
  margin: 0;
}

.nar-lucky {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: #1a6630;
  line-height: 1.55;
  margin: 0;
}

.nar-bio {
  font-size: 0.82rem;
  color: #4a3a20;
  line-height: 1.55;
  margin: 0;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.nar-personal {
  font-size: 0.76rem;
  color: #7a5a30;
  font-style: italic;
  line-height: 1.4;
  margin: 0;
}

/* Save button at bottom of info */
.nar-save-btn {
  align-self: flex-start;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(180deg, #e8a020 0%, #c07010 100%);
  color: #fff8e8;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 #8a4a00, 0 4px 12px rgba(150,80,0,0.25);
  transition: transform 0.08s, box-shadow 0.08s;
  margin-top: 0.25rem;
}
.nar-save-btn:hover { background: linear-gradient(180deg, #f5b030 0%, #d08020 100%); }
.nar-save-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a4a00; }
.nar-save-btn.saved {
  background: #27ae60;
  box-shadow: none;
  color: #f0fff4;
  cursor: default;
}

.nar-safe-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #1a6630;
  line-height: 1.5;
  margin: 0;
}

/* ── Continue & deal-again ───────────────────────────────── */
.stage1-continue {
  max-width: 340px;
  background: linear-gradient(180deg, #2a8a50 0%, #1a6a38 100%);
  color: #f0fff4;
  box-shadow: 0 4px 0 #0d4a20, 0 6px 20px rgba(0,100,40,0.25);
  animation: fadeUp 0.4s ease both;
  font-size: 1.1rem;
}
.stage1-continue:hover { background: linear-gradient(180deg, #35a060 0%, #25804a 100%); }

.stage1-deal-again {
  max-width: 200px;
  color: #7a4a10;
  border-color: rgba(150,80,0,0.3);
  font-size: 0.9rem;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  background: rgba(0,0,0,0.15);
  border-radius: 100px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.5rem;
}

/* ── Onboarding (bright) ─────────────────────────────────── */
#screen-onboard {
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf4e3 60%, #e8f4d8 100%);
}

.onboard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.25rem 3rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.onboard-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  color: #2a1a06;
  text-align: center;
}

.onboard-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: #6b4a20;
  text-align: center;
  margin-top: -0.75rem;
}

.onboard-section { width: 100%; display: flex; flex-direction: column; gap: 0.6rem; }

.onboard-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a6a30;
  font-weight: 600;
}

.onboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.onboard-btn {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(180,120,20,0.25);
  border-radius: var(--radius);
  color: #3a2a10;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.onboard-btn:hover { border-color: #c07010; color: #7a3a00; background: rgba(255,220,100,0.15); }
.onboard-btn.selected {
  background: rgba(220,140,20,0.18);
  border-color: #c07010;
  color: #7a3a00;
  box-shadow: inset 0 0 0 1px rgba(200,120,0,0.3);
}

/* ── Landing begin button (warm amber on bright bg) ─────── */
.landing-begin-btn {
  background: linear-gradient(180deg, #e8a020 0%, #c07010 100%);
  color: #fff8e8;
  box-shadow: 0 4px 0 #8a4a00, 0 6px 20px rgba(150,80,0,0.3);
}
.landing-begin-btn:hover {
  background: linear-gradient(180deg, #f5b030 0%, #d08020 100%);
  color: #fff8e8;
}

/* ── SVG color — make icons dark on amber card back ──────── */
.tarot-back-img img {
  filter: brightness(0) opacity(0.65);
}

/* Bio section — revealed after saving */
.nar-bio-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 0.25rem;
}

/* ── Meet-the-person card (post-save reveal) ─────────────── */
.nar-meet {
  background: #fff8f0;
  border: 1px solid #e0c090;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.5rem 1.25rem;
}

.nar-meet-img-wrap {
  margin-bottom: 0.25rem;
}

.nar-meet-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid rgba(200,140,0,0.35);
  box-shadow: 0 4px 16px rgba(150,80,0,0.15);
}

.nar-meet-ph {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8a020, #c07010);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff8e8;
  border: 3px solid rgba(200,140,0,0.35);
}

.nar-meet-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a0a00;
  line-height: 1.2;
}

.nar-meet-years {
  font-size: 0.78rem;
  color: #a07030;
}

.nar-meet-badge {
  display: inline-block;
  background: #27ae60;
  color: #f0fff4;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 100px;
  padding: 0.3rem 1rem;
  margin: 0.1rem 0;
}

.nar-meet-bio {
  font-size: 0.9rem;
  color: #4a3a20;
  line-height: 1.6;
  margin: 0;
  text-align: left;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  width: 100%;
}

.nar-meet-personal {
  font-size: 0.8rem;
  color: #7a5a30;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
  text-align: left;
  width: 100%;
}

/* ── Multi-figure queue styles ───────────────────────────── */
.nar-fig-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeUp 0.35s ease both;
}

.nar-more-banner {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #8b2a10;
  font-style: italic;
  padding: 0.5rem 0.75rem;
  background: rgba(139,42,16,0.08);
  border-left: 3px solid #c0392b;
  border-radius: 0 6px 6px 0;
}

/* ── End screen — bright theme ───────────────────────────── */
.screen-end-bright {
  background: linear-gradient(160deg, #f5e6c8 0%, #fdf4e3 60%, #e8d5a0 100%);
}

.screen-end-bright .end-title {
  color: #2a1a06;
}

.screen-end-bright .end-subtitle {
  color: #6b4a20;
}

.screen-end-bright .end-quote {
  border-left-color: rgba(180,120,20,0.4);
  color: #7a5a30;
  background: rgba(200,140,0,0.06);
}

.screen-end-bright .end-actions .btn-primary {
  background: linear-gradient(180deg, #e8a020 0%, #c07010 100%);
  color: #fff8e8;
  box-shadow: 0 4px 0 #8a4a00, 0 6px 20px rgba(150,80,0,0.25);
}

.screen-end-bright .figure-card {
  background: #fff8f0;
  border-color: rgba(180,120,20,0.2);
}

.screen-end-bright .figure-card-name  { color: #1a0a00; }
.screen-end-bright .figure-card-years { color: #a07030; }
.screen-end-bright .figure-card-bio   { color: #4a3a20; }

/* Summary lines */
.end-summary {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0 0.5rem;
}

.end-summary-line {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  color: #6b2a10;
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  padding-left: 0.75rem;
  border-left: 3px solid rgba(180,60,20,0.3);
}

/* ═══════════════════════════════════════════════════════════
   STAGE 2 — TECH DUNGEON
   ═══════════════════════════════════════════════════════════ */
#screen-stage2 {
  background: linear-gradient(180deg, #0a0618 0%, #12082a 100%);
  justify-content: flex-start;
}

.s2-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem 2rem;
  width: 100%;
}

.s2-title { color: #f0e8d5; }
.s2-sub   { color: rgba(201,168,76,0.6); font-style: normal; font-size: 0.85rem; }

.s2-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

#s2-canvas { display: block; width: 100%; background: #0a0618; }

.s2-jump-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 0.6rem 1.2rem;
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.s2-popup {
  width: 100%;
  max-width: 480px;
  background: #1a0d3a;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeUp 0.3s ease both;
}

.s2-popup-emoji { font-size: 2.5rem; line-height: 1; }
.s2-popup-name  { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--gold-light); }
.s2-popup-text  { font-size: 0.88rem; color: var(--cream-dim); line-height: 1.55; }
.s2-popup-figure{ font-size: 0.82rem; color: var(--text-dim); font-style: italic; line-height: 1.45;
                   border-top: 1px solid rgba(255,255,255,0.07); padding-top: 0.5rem; }

.s2-complete {
  width: 100%; max-width: 480px;
  background: linear-gradient(135deg, #0d2a15, #1a3a22);
  border: 1px solid rgba(100,220,130,0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  animation: fadeUp 0.4s ease both;
}
.s2-complete-icon  { font-size: 2.5rem; }
.s2-complete-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #a8e6c8; }
.s2-complete-text  { font-size: 0.88rem; color: rgba(168,230,200,0.8); line-height: 1.55; }

/* ── Landing video background ────────────────────────────── */
.landing-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.landing-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,6,2,0.25) 0%,
    rgba(10,6,2,0.1) 40%,
    rgba(10,6,2,0.5) 100%
  );
  z-index: 1;
}
#screen-landing .landing-content { position: relative; z-index: 2; }

/* ── End summary safe line ───────────────────────────────── */
.end-summary-safe {
  color: #1a6630;
  border-left-color: rgba(30,120,60,0.3);
}

/* ── Stage 2 complete figures ────────────────────────────── */
.s2-complete-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  width: 100%;
}

.s2-fig-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 60px;
}

.s2-fig-img, .s2-fig-ph {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover; object-position: top;
  border: 2px solid rgba(100,220,130,0.3);
  background: rgba(0,0,0,0.3);
}

.s2-fig-ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; color: #6ecf99;
}

.s2-fig-nm {
  font-size: 0.6rem; color: rgba(168,230,200,0.7);
  text-align: center; line-height: 1.2;
}

.s2-complete-without {
  font-family: var(--font-display);
  font-size: 0.95rem; font-style: italic;
  color: rgba(168,230,200,0.85);
  line-height: 1.55; text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(100,220,130,0.15);
  width: 100%; margin: 0;
}

/* Stage 2 launch button — prominent, warm amber */
.stage2-launch-btn {
  background: linear-gradient(180deg, #e8a020 0%, #c07010 100%);
  color: #fff8e8;
  box-shadow: 0 4px 0 #8a4a00, 0 6px 20px rgba(150,80,0,0.25);
  font-size: 1rem;
  max-width: 400px;
}
.stage2-launch-btn:hover {
  background: linear-gradient(180deg, #f5b030 0%, #d08020 100%);
  color: #fff8e8;
}

.end-actions-secondary {
  margin-top: 0.5rem;
}

/* Keep stage 2 bright */
#screen-stage2 {
  background: linear-gradient(180deg, #e8f4ff 0%, #d0e8f8 40%, #b8d8f0 100%);
}
.s2-title { color: #1a3a5a; }
.s2-sub   { color: rgba(30,80,140,0.6); }

.s2-canvas-wrap {
  border-color: rgba(30,100,200,0.3);
}

/* ── Landing page text improvements ─────────────────────── */
#screen-landing .landing-title {
  font-size: clamp(2.4rem, 10vw, 4.5rem);
  color: #1a0a00;
  text-shadow: 1px 1px 0 #fff, 2px 2px 6px rgba(255,255,255,0.7);
  line-height: 1.15;
}

#screen-landing .landing-title em {
  color: #8b3a00;
  font-style: italic;
  text-shadow: 1px 1px 0 #fff, 2px 2px 6px rgba(255,255,255,0.7);
}

#screen-landing .privacy-notice {
  color: #ffffff;
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.2);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
}

/* Slow the video way down via CSS animation trick */
#screen-landing .landing-video {
  animation: videoSlow 1s linear infinite;
  /* We control playback rate via JS instead */
}
/* ── Card shimmer & shine ─────────────────────────────────── */
@keyframes cardShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes cardGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(200,120,0,0.3), inset 0 0 0 2px rgba(255,255,255,0.15); }
  50%       { box-shadow: 0 6px 32px rgba(200,140,0,0.55), inset 0 0 0 2px rgba(255,255,255,0.3); }
}

/* Shimmer sweep over the back face */
.tarot-back::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.22) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: cardShimmer 3s ease-in-out infinite;
  pointer-events: none;
}

/* Glow pulse on the card border */
.tarot-card-inner {
  animation: cardGlow 4s ease-in-out infinite;
}

/* Stop glow once flipped */
.tarot-card.tarot-flipped .tarot-card-inner {
  animation: none;
}

/* "Tap to Reveal" — white for contrast */
.tarot-back-hint {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  font-weight: 600;
  letter-spacing: 0.15em;
}

/* ── Particle canvas ─────────────────────────────────────── */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Ensure stage1 content sits above particles */
#screen-stage1 { position: relative; }
#screen-stage1 .stage1-wrap { position: relative; z-index: 1; }

/* ── Stage 2 background particle canvas ─────────────────── */
.s2-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#screen-stage2 { position: relative; overflow: hidden; }
#screen-stage2 .s2-wrap { position: relative; z-index: 1; }

/* ── Stage 3: Culture Room ───────────────────────────────── */
#screen-stage3 { position: relative; }
#screen-stage3.active { display: flex; flex-direction: column; min-height: 100vh; }

.s3-wrap {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 1rem 1.5rem;
}

.s3-header { text-align: center; padding: 1rem 0 0.5rem; }

.s3-canvas-wrap {
  width: 100%; max-width: 800px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,0.38);
}

#s3-canvas { display: none; }

/* Soft gold fill when area has saved content */
.s3-fill-overlay {
  position: absolute; pointer-events: none; z-index: 1;
  background: rgba(201,168,76,0.32);
  mix-blend-mode: multiply;
  border-radius: 3px;
  transition: background 0.4s ease;
}

/* Hotspot buttons — transparent over white photo areas */
.s3-hotspot {
  position: absolute; background: rgba(255,255,255,0.08);
  border: 2px dashed rgba(200,160,20,0.0);
  border-radius: 4px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0;
}
.s3-hotspot:hover {
  background: rgba(201,168,76,0.22);
  border: 2px dashed rgba(200,160,20,0.7);
}
.s3-hotspot-done {
  background: rgba(42,138,64,0.12);
  border: 2px solid rgba(42,138,64,0.4);
}
.s3-hs-hint {
  font-size: 0.65rem; font-weight: 700; color: #1a0a00;
  text-align: center; line-height: 1.3; padding: 4px;
  background: rgba(255,255,255,0.7); border-radius: 4px;
  opacity: 0; transition: opacity 0.2s;
}
.s3-hotspot:hover .s3-hs-hint { opacity: 1; }
.s3-hs-badge {
  font-size: 0.7rem; font-weight: 700; color: white;
  background: #2a8a40; padding: 2px 7px; border-radius: 10px;
}

/* Saved content overlays inside the photo white areas */
.s3-saved-overlay {
  position: absolute; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; padding: 2px;
  overflow: hidden;
}

/* Book spines */
.s3-shelf-overlay { flex-direction: row; align-items: flex-end; gap: 1px; }
.s3-book-spine {
  flex: 1; min-width: 8px; max-width: 22px;
  height: 85%; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.s3-book-spine span {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 7px; font-weight: 800; color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap; overflow: hidden;
  padding: 2px 1px; max-height: 95%;
}

/* TV tiles */
.s3-tv-overlay {
  flex-direction: row; flex-wrap: wrap; gap: 2px;
  padding: 8px 6px; align-content: flex-start;
  background: rgba(0,0,40,0.5);
}
.s3-tv-tile {
  flex: 1 1 calc(33% - 2px); min-width: 60px;
  padding: 4px 5px; border-radius: 3px;
  font-size: 8px; font-weight: 800; color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-align: center; line-height: 1.2;
  display: flex; align-items: center; justify-content: center;
}

/* Vinyl label */
.s3-vinyl-overlay {
  align-items: center; justify-content: center;
  background: radial-gradient(circle, #1a0a00 40%, #2a1a00 60%, #3a2800 100%);
  border-radius: 50%;
}
.s3-vinyl-label {
  font-size: 7px; font-weight: 700; color: #f5c040;
  text-align: center; padding: 0 4px; line-height: 1.2;
}

.s3-continue { margin-top: 1.2rem; }
.s3-title { color: #1a3a10; }

/* ── Stage 3 screen background — warm light sage ─────────── */
#screen-stage3 {
  background: linear-gradient(135deg, #e8f0e0 0%, #dde8d0 50%, #e4edd8 100%);
  min-height: 100vh;
}

/* Rain particle canvas behind room */
.s3-rain-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.s3-wrap { position: relative; z-index: 1; }

/* ── Stage 3 panel overlay ───────────────────────────────── */
.s3-canvas-wrap { position: relative; }

.s3-panel {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(228,218,196,0.99);
  overflow-y: auto;
  z-index: 9999;
  padding: 0 0 90px;
  font-family: 'DM Sans', sans-serif;
  -webkit-overflow-scrolling: touch;
}

.s3-panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: sticky; top: 0;
  background: rgba(228,218,196,0.99);
  z-index: 2;
}
.s3-panel-emoji { font-size: 1.4rem; }
.s3-panel-header h3 { margin: 0; flex: 1; font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; color: #0a1a00; font-weight: 700; }
.s3-close { background: none; border: none; cursor: pointer; font-size: 1rem; color: #888; padding: 4px 8px; }

.s3-panel-q { padding: 8px 16px 4px; margin: 0; color: #2a1a00; font-size: 0.88rem; font-weight: 500; }

.s3-genre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; padding: 10px 16px;
}
.s3-genre-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #e8e0d0; border-radius: 8px;
  border: 1.5px solid #a89060; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; color: #1a0a00;
  transition: border-color 0.15s, background 0.15s;
}
.s3-genre-label:has(input:checked) {
  border-color: #8a5a00; background: #c9a84c; color: #1a0a00;
}
.s3-genre-label input { accent-color: #6a3a00; }

.s3-item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px; padding: 10px 16px;
}
.s3-item-card {
  display: block; cursor: pointer;
  padding: 10px; background: white;
  border: 1.5px solid #ddd; border-radius: 8px;
  transition: border-color 0.15s;
}
.s3-item-card:has(input:checked) { border-color: #c9a84c; background: #fdf4e3; }
.s3-item-card input { display: none; }
.s3-item-title { font-weight: 600; font-size: 0.9rem; color: #1a0a00; margin-bottom: 2px; }
.s3-item-meta  { font-size: 0.78rem; color: #5a4020; font-weight: 500; margin-bottom: 4px; }
.s3-item-desc  { font-size: 0.78rem; color: #2a1a06; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.s3-item-check { font-size: 0.9rem; margin-bottom: 4px; opacity: 0; transition: opacity 0.15s; }
.s3-item-card:has(input:checked) .s3-item-check { opacity: 1; }

.s3-conn-list { padding: 10px 16px; display: flex; flex-direction: column; gap: 14px; }
.s3-conn-card {
  background: white; border-radius: 10px;
  border: 1.5px solid #ddd; padding: 14px;
}
/* "Presumed Innocent was written by a Jew!" */
.s3-conn-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 700;
  color: #1a3a10; margin-bottom: 10px; line-height: 1.3;
}
.s3-conn-headline em { font-style: italic; }

.s3-conn-fig-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.s3-fig-img    { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #c9a84c; }
.s3-fig-ph     { width: 48px; height: 48px; border-radius: 50%; background: #c9a84c; color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.s3-conn-fig-detail { flex: 1; }
.s3-fig-name   { font-weight: 700; font-size: 0.92rem; color: #1a0a00; margin-bottom: 2px; }
.s3-fig-role   { font-size: 0.78rem; color: #666; line-height: 1.4; }

.s3-save-btn   { width: 100%; margin-top: 4px; }
.s3-save-btn.s3-saved { background: #2a8a40 !important; }

.s3-auto-note  { padding: 8px 16px; font-size: 0.82rem; color: #666; font-style: italic; }
.s3-loading    { padding: 32px; text-align: center; color: #888; }

.s3-panel-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: rgba(228,218,196,0.99);
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex; justify-content: flex-end; gap: 8px;
  z-index: 9001;
}
.s3-panel-btn { min-width: 120px; }

/* Hotspot buttons over canvas */
.s3-hotspot {
  position: absolute; background: rgba(255,255,255,0.0);
  border: 2px dashed rgba(200,160,20,0.0);
  border-radius: 4px; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}
.s3-hotspot:hover {
  background: rgba(201,168,76,0.18);
  border-color: rgba(200,160,20,0.6);
}
.s3-hotspot-active {
  border-color: rgba(42,138,64,0.4);
}
.s3-hs-emoji { font-size: 1.2rem; filter: drop-shadow(0 0 4px rgba(0,0,0,0.3)); }
.s3-hs-count {
  background: #2a8a40; color: white;
  font-size: 0.65rem; font-weight: 700;
  padding: 1px 5px; border-radius: 10px;
}


/* ── Stage 2 mobile sizing ───────────────────────────────── */
.s2-canvas-wrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
  flex: 1;
}

/* On portrait phones, make the canvas taller */
@media (max-width: 500px) {
  .s2-canvas-wrap canvas {
    height: 55vw !important;
    min-height: 220px;
  }
  .s2-header .stage-title { font-size: 1.4rem; }
  .s2-header .stage-sub   { font-size: 0.82rem; }
  .s2-jump-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  /* Popup scrollable on small screens */
  .s2-popup {
    max-height: 80vh;
    overflow-y: auto;
    font-size: 0.82rem;
  }
}

/* ── End screen stage groupings ─────────────────────────── */
.end-stage-section {
  width: 100%;
  margin-bottom: 1rem;
}
.end-stage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(201,168,76,0.15);
  border: 1.5px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a0a00;
  margin-bottom: 6px;
  text-align: left;
}
.end-stage-toggle:hover { background: rgba(201,168,76,0.25); }
.end-stage-count {
  background: #c9a84c;
  color: white;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  margin-left: auto;
  margin-right: 10px;
}
.end-stage-arrow { font-size: 0.9rem; color: #8a6020; }
.end-stage-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 4px 8px;
}

/* ── Invite & email ──────────────────────────────────────── */
.invite-result {
  background: rgba(201,168,76,0.12);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 0.8rem auto;
  max-width: 500px;
  text-align: center;
}
.end-email-signup {
  background: rgba(201,168,76,0.1);
  border-radius: 12px;
  border: 1.5px solid rgba(201,168,76,0.3);
  padding: 1.5rem 1.5rem 1.2rem;
  margin: 1.5rem auto 2rem;
  max-width: 480px;
  text-align: center;
}
.end-email-signup h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: #1a0a00;
  margin: 0 0 0.4rem;
}
.end-email-signup p {
  color: #3a2a10;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.email-form-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.email-input {
  flex: 1;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 14px;
  border: 1.5px solid #c9a84c;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  color: #1a0a00;
}
.email-submit { min-width: 100px; }
.email-privacy {
  font-size: 0.75rem;
  color: #8a7050;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

/* ── Stage 3 panel inside room canvas ────────────────────── */
.s3-canvas-wrap { position: relative; }

.s3-panel {
  position: absolute;
  inset: 0;
  background: rgba(245,238,220,0.97);
  border-radius: 10px;
  overflow-y: auto;
  z-index: 20;
  padding: 0 0 70px;
  font-family: 'DM Sans', sans-serif;
  /* scroll inside the room area */
  -webkit-overflow-scrolling: touch;
}

/* Tutorial pointer animation */
@keyframes s3TutorialClick {
  0%   { transform: translate(0,0) scale(1); opacity:0; }
  15%  { opacity:1; }
  40%  { transform: translate(var(--tx),var(--ty)) scale(1); }
  60%  { transform: translate(var(--tx),var(--ty)) scale(0.85); }
  80%  { transform: translate(var(--tx),var(--ty)) scale(1); opacity:1; }
  100% { opacity:0; }
}
.s3-tutorial-cursor {
  position: absolute;
  width: 28px; height: 28px;
  background: rgba(201,168,76,0.9);
  border: 3px solid white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: s3TutorialClick 2.4s ease-in-out forwards;
  --tx: 0px; --ty: 0px;
}

/* Stage 3 "Done with Culture" button */
.s3-stage-done {
  display: block;
  margin: 0.8rem auto 0;
  width: calc(100% - 2rem);
  max-width: 400px;
  z-index: 1;
  position: relative;
}

/* ══════════════════════════════════════════════════════
   STAGE 4 — NEWSPAPER
   ══════════════════════════════════════════════════════ */

#screen-stage4.active {
  display: flex;
  flex-direction: column;
  background: #f8f4e8;
  min-height: 100vh;
}
#screen-stage4 { background: #f8f4e8; }

/* Newspaper container */
.np-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0.5rem 4rem;
  background: #fcfaf2;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}
@media (max-width: 400px) {
  .np-wrap { padding: 0 0 3rem; box-shadow: none; }
  .np-masthead { font-size: 2.2rem !important; }
  .np-meta-row { flex-wrap: wrap; gap: 4px; }
  .np-year-tabs { width: 100%; justify-content: center; }
  .np-article-inner { padding: 0.6rem 0.7rem; }
  .np-headline { font-size: 0.95rem !important; }
  .np-stub { font-size: 0.78rem; }
  .np-modal-inner { padding: 1rem 0.9rem 2rem; }
  .np-modal-headline { font-size: 1.2rem !important; }
}

/* Masthead */
.np-masthead-wrap {
  padding: 1.2rem 1rem 0;
  border-bottom: 3px double #111;
}
.np-kicker {
  text-align: center;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.4rem;
}
.np-masthead {
  font-family: 'UnifrakturMaguntia', 'Chomsky', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  text-align: center;
  color: #111;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.np-masthead-rule {
  border: none;
  border-top: 3px solid #111;
  margin: 0.4rem 0 0;
}
.np-rule-thin { border-top-width: 1px; margin-top: 3px; }

.np-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.72rem;
  color: #444;
  gap: 0.5rem;
}
.np-meta { white-space: nowrap; }
.np-price { text-align: right; }

/* Year tabs (edition switcher) */
.np-year-tabs {
  display: flex;
  gap: 6px;
}
.np-year-tab {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border: 1.5px solid #111;
  background: white;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  color: #111;
}
.np-year-tab.active,
.np-year-tab:hover { background: #111; color: white; }

/* Edition subtitle */
.np-edition-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.82rem;
  text-align: center;
  font-style: italic;
  color: #444;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #ccc;
  letter-spacing: 0.02em;
}

/* Dateline */
.np-dateline {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.72rem;
  color: #666;
  padding: 0.5rem 0 0.3rem;
  letter-spacing: 0.04em;
}

/* Paper body */
.np-paper { padding: 0 0.5rem; }
.np-loading {
  text-align: center;
  padding: 3rem;
  font-family: 'Lora', Georgia, serif;
  color: #888;
  font-style: italic;
}

/* Section separator */
.np-section-rule {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.8rem 0 0.5rem;
}
.np-section-rule::before,
.np-section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #111;
}
.np-section-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #111;
  white-space: nowrap;
}
.np-hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0.6rem 0;
}

/* Article grid row */
.np-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 2px solid #111;
}
.np-col-1 { grid-column: span 2; }
.np-col-2 { grid-column: span 3; }
.np-col-3 { grid-column: span 6; }

/* On small screens collapse to single column */
@media (max-width: 600px) {
  .np-col-1, .np-col-2, .np-col-3 { grid-column: span 6; }
  .np-row { grid-template-columns: 1fr; }
  .np-article + .np-article { border-left: none; border-top: 1px solid #ddd; }
}

/* Article card */
.np-article { padding: 0; }
.np-article + .np-article { border-left: 1px solid #ccc; }

.np-article-inner {
  padding: 0.8rem 0.9rem 0.7rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}
.np-article-inner:hover { background: rgba(0,0,0,0.02); }
.np-article-saved { background: rgba(201,168,76,0.08) !important; }

.np-section-tag {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.np-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 0.3rem;
}
/* Lead article gets larger headline */
.np-col-3 .np-headline {
  font-size: clamp(1.3rem, 4vw, 2rem);
}
.np-byline {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.68rem;
  font-style: italic;
  color: #666;
  margin-bottom: 0.3rem;
}
.np-divider {
  border-top: 1px solid #111;
  margin: 0.35rem 0;
}
.np-stub {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: justify;
  color: #222;
  margin: 0 0 0.6rem;
  flex: 1;
}
/* Lead stub larger */
.np-col-3 .np-stub { font-size: 0.9rem; }

/* ── Newspaper-style 2-column flow for wide article stubs ─────────────
   Only kicks in on wide screens where the article itself is wide enough
   to read comfortably in two columns. Narrower stubs stay single-column. */
@media (min-width: 900px) {
  .np-col-3 .np-stub {
    column-count: 2;
    column-gap: 1.6rem;
    column-rule: 1px solid #ddd;
  }
}
@media (min-width: 1200px) {
  .np-col-2 .np-stub {
    column-count: 2;
    column-gap: 1.4rem;
    column-rule: 1px solid #ddd;
  }
}

.np-read-more {
  align-self: stretch;
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  background: #1a6fd4;
  color: #fff !important;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  font-style: normal !important;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(26,111,212,0.4);
}
.np-read-more:hover { background: #1558b0; }
.np-read-more-saved {
  background: #2a7a40;
  color: white !important;
}

/* ── Modal ── */
.np-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,8,4,0.82);
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 4rem;
}
.np-modal[hidden] { display: none; }

.np-modal-inner {
  background: #fcfaf2;
  max-width: 680px;
  width: 100%;
  padding: 2rem 2.2rem 2.5rem;
  position: relative;
  box-shadow: 0 8px 48px rgba(0,0,0,0.4);
}
.np-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: 1px solid #888;
  color: #444;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.np-modal-close:hover { background: #111; color: white; border-color: #111; }

.np-modal-kicker {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.5rem;
}
.np-modal-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 0.4rem;
}
.np-modal-byline {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #666;
  margin-bottom: 0.4rem;
}
.np-modal-rule {
  border: none;
  border-top: 2px solid #111;
  margin: 0.6rem 0 1rem;
}

/* Two-column article body on wide screens */
.np-modal-columns {
  column-count: 2;
  column-gap: 1.8rem;
  column-rule: 1px solid #ddd;
}
@media (max-width: 680px) {
  .np-modal-columns { column-count: 1; }
  .np-modal-inner { padding: 1.4rem 1.2rem 2rem; }
}

.np-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.65;
  text-align: justify;
  color: #222;
  margin: 0 0 0.75rem;
  break-inside: avoid;
}

/* Institution box */
.np-modal-institution {
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.4);
  break-inside: avoid;
}
.np-inst-rule {
  border-top: 2px solid #c9a84c;
  margin-bottom: 0.7rem;
}
.np-inst-label {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6020;
  margin-bottom: 0.2rem;
}
.np-inst-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a0a00;
  margin-bottom: 0.5rem;
}
.np-inst-role {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #333;
  margin-bottom: 0.8rem;
}
.np-inst-link {
  display: inline-block;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #1a3a60;
  text-decoration: underline;
  margin-bottom: 0.8rem;
}
.np-save-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #111;
  color: #fcfaf2;
  border: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
}
.np-save-btn:hover { background: #333; }
.np-save-btn-saved { background: #2a7a40 !important; }

/* ── Stage transition title card ─────────────────────────── */
.stt-screen.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  transition: opacity 0.6s ease;
}
.stt-screen:not(.active) { display: none !important; }
.stt-fade-out { opacity: 0 !important; }

.stt-inner {
  text-align: center;
  padding: 2rem;
  max-width: 480px;
  animation: sttReveal 0.7s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes sttReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.stt-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}
.stt-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  font-weight: 700;
  color: #f5e8c8;
  line-height: 1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.stt-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin: 0;
}

/* Stage 2 full-height layout */
#screen-stage2.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}
#screen-stage2 .s2-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 0.5rem 0.5rem;
}
#screen-stage2 .s2-canvas-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#screen-stage2 .s2-canvas-wrap canvas {
  flex: 1;
  width: 100% !important;
}

/* ── Password gate ───────────────────────────────────────── */
.screen-password {
  background: linear-gradient(135deg, #0a0a14, #1a1a2e);
}
.screen-password.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.pw-inner {
  text-align: center;
  padding: 2rem;
  max-width: 360px;
  width: 100%;
}
.pw-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 8vw, 2.8rem);
  color: #f5e8c8;
  margin: 0 0 0.3rem;
  line-height: 1.1;
}
.pw-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 0 0 2rem;
}
.pw-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pw-input {
  padding: 12px 16px;
  border: 1.5px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #f5e8c8;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
}
.pw-input:focus { border-color: #c9a84c; }
.pw-input::placeholder { color: rgba(255,255,255,0.25); letter-spacing: 0.05em; }
.pw-btn { width: 100%; }
.pw-error {
  margin-top: 0.8rem;
  color: #e05050;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
}

/* ── Newspaper article states ────────────────────────────── */

/* DEFAULT (unsaved): all articles start gray — not yet real */
.np-article-inner {
  background: #edecea !important;
}
.np-article-inner .np-section-tag { color: #bbb !important; }
.np-article-inner .np-headline     { color: #aaa !important; font-style: italic; }
.np-article-inner .np-byline       { color: #ccc !important; }
.np-article-inner .np-divider      { border-color: #d8d4cc; }
.np-article-inner .np-stub         { color: #bbb !important; }
.np-article-inner .np-read-more    { opacity: 0.5; }

/* Make it Real / Read more button always visible and blue */
.np-article-inner .np-make-real-btn,
.np-article-inner .np-read-more {
  color: #fff !important;
  font-style: normal !important;
}

/* SAVED: spring to full color */
.np-article-inner.np-article-saved {
  background: #fcfaf2 !important;
  border-left: 3px solid #c9a84c;
}
.np-article-inner.np-article-saved .np-section-tag { color: inherit !important; }
.np-article-inner.np-article-saved .np-headline     { color: #111 !important; font-style: normal; }
.np-article-inner.np-article-saved .np-byline       { color: #666 !important; }
.np-article-inner.np-article-saved .np-divider      { border-color: #111; }
.np-article-inner.np-article-saved .np-stub         { color: #222 !important; }
.np-article-inner.np-article-saved .np-saved-tag    { color: #2a7a40; }

/* Make it Real — very prominent */
.np-make-real-overlay {
  margin-top: auto;
  padding-top: 0.7rem;
}
/* Bright blue — visually jarring against the gray article intentionally */
.np-make-real-btn {
  width: 100%;
  padding: 12px 14px;
  background: #1a6fd4;
  color: #ffffff;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 3px 12px rgba(26,111,212,0.45);
  border-radius: 3px;
}
.np-make-real-btn:hover {
  background: #1558b0;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(26,111,212,0.5);
}
.np-make-real-btn:active { transform: translateY(0); }

/* Saved tag on article */
.np-saved-tag {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #2a7a40;
  font-weight: 700;
}

/* Year tabs tutorial target */
.np-year-tab:first-child { position: relative; }

/* ── Pre-summary dramatic cards ──────────────────────────── */
.presum-screen.active {
  display: flex !important;
  flex-direction: column;
  background: linear-gradient(135deg, #0a0a14, #1a1020, #0a1a10);
  min-height: 100vh;
}
.presum-screen:not(.active) { display: none !important; }
.presum-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}
.presum-card {
  max-width: 560px;
  opacity: 0;
  transform: translateY(20px);
}
.presum-card.presum-in {
  animation: presumReveal 0.7s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes presumReveal {
  to { opacity: 1; transform: translateY(0); }
}
.presum-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 6vw, 2.8rem);
  font-weight: 600;
  color: #f5e8c8;
  line-height: 1.3;
  margin: 0 0 2.5rem;
}
.presum-continue {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding: 12px 32px;
  background: transparent;
  border: 1.5px solid rgba(201,168,76,0.6);
  color: #c9a84c;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.presum-continue:hover {
  background: rgba(201,168,76,0.15);
  color: #f5e8c8;
}

/* ── End screen redesign ─────────────────────────────────── */
.end-intro {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #2a1a00;
  max-width: 580px;
  margin: 0 auto 0.8rem;
  text-align: center;
}
.end-intro-sub {
  font-size: 0.88rem;
  color: #6a5030;
  margin-bottom: 1.5rem;
}

/* ── Social sharing ──────────────────────────────────────── */
.end-share-section {
  text-align: center;
  padding: 1.5rem 1rem;
  margin: 1rem 0;
  border-top: 1px solid rgba(201,168,76,0.3);
  border-bottom: 1px solid rgba(201,168,76,0.3);
}
.end-share-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: #1a0a00;
  margin: 0 0 0.3rem;
}
.end-share-sub {
  font-size: 0.85rem;
  color: #6a5030;
  margin: 0 0 1rem;
}
.end-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.end-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  color: white;
  white-space: nowrap;
}
.end-share-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.end-share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.end-share-fb { background: #1877f2; }
.end-share-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.end-share-li { background: #0a66c2; }
.end-share-wa { background: #25d366; }
.end-share-tw { background: #111; }

/* ── Stage 3 floating Done button on room photo ───────────── */
.s3-done-float {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(20,20,20,0.82);
  color: #f5e8c8;
  border: 1.5px solid rgba(201,168,76,0.6);
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s, border-color 0.2s;
}
.s3-done-float:hover {
  background: rgba(201,168,76,0.85);
  color: #1a0a00;
  border-color: #c9a84c;
}

/* ── Stage 2 DOM info overlay — replaces canvas text ────── */
.s2-dom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 12px;
}
.s2-dom-inner {
  background: #f5eed8;
  border-radius: 12px;
  border: 2px solid rgba(60,100,160,0.35);
  width: 100%;
  max-width: 420px;
  max-height: 90%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.s2-dom-header {
  padding: 12px 14px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.s2-dom-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 700;
  color: #1a3a60;
  margin: 0;
  line-height: 1.2;
}
.s2-dom-body {
  padding: 10px 14px;
  flex: 1;
}
.s2-dom-fig-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.s2-dom-img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(180,120,20,0.4);
  flex-shrink: 0;
}
.s2-dom-initials {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #c9a84c;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
  flex-shrink: 0;
}
.s2-dom-figname {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.8rem, 3vw, 0.95rem);
  font-weight: 600;
  color: #7a5a30;
}
.s2-dom-text {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.82rem, 2.8vw, 0.95rem);
  line-height: 1.6;
  color: #2a1a06;
  margin: 0;
}
.s2-dom-btn {
  margin: 10px 14px 14px;
  padding: 11px;
  background: #c9a84c;
  color: #1a0a00;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.s2-dom-btn:hover { background: #b8932a; }
/* ── Children toggle in onboard ─────────────────────────── */
.onboard-children-section {
  margin-top: 1rem;
}
.onboard-children-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 0.4rem;
}
.onboard-children-btn {
  min-width: 80px;
}