:root {
  color-scheme: dark;
  --night: #07111e;
  --night-soft: #0e2034;
  --panel: rgba(18, 38, 59, .9);
  --cream: #f6eedc;
  --mist: #cbd6df;
  --gold: #e6c47f;
  --gold-bright: #ffe2a0;
  --line: rgba(230, 196, 127, .34);
  --danger: #f0aaa0;
}

* { box-sizing: border-box; }

html { background: var(--night); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 5%, rgba(230, 196, 127, .12) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .16) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 45%, #132a43 0, var(--night) 58%);
  background-size: 110px 110px, 170px 170px, auto;
  font-family: "Trebuchet MS", Arial, sans-serif;
  line-height: 1.6;
}

body[data-theme="shadows"] { --experience-color: #cbb0ff; --experience-soft: #7d5ab2; --experience-glow: rgba(190, 151, 255, .34); }
body[data-theme="breath"] { --experience-color: #a8ecf4; --experience-soft: #4f9eb3; --experience-glow: rgba(133, 225, 241, .32); }
body[data-theme="warmth"] { --experience-color: #ffd294; --experience-soft: #c47b4f; --experience-glow: rgba(255, 184, 103, .34); }
.experience-page[data-theme] { background: radial-gradient(circle at 50% 20%, var(--experience-glow), transparent 36%), radial-gradient(circle at 50% 60%, #132a43 0, var(--night) 62%); }

button, a { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  color: #10233a;
  background: white;
  border-radius: 8px;
}

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

.minimal-header {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.brand-link { color: inherit; text-decoration: none; }
.brand-lockup { display: inline-flex; align-items: baseline; gap: 5px; }
.brand { font: 600 28px Georgia, serif; letter-spacing: .08em; }
.brand-separator { color: var(--gold); font-family: Georgia, serif; }
.brand-note { color: var(--gold); font-size: 11px; letter-spacing: .1em; text-transform: none; }

.experience-shell,
.journey-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 42px 0 70px;
}

.experience-panel {
  text-align: center;
  animation: reveal .45s ease both;
}

.experience-panel[hidden] { display: none; }

.experience-panel h1,
.experience-panel h2,
.journey-shell h1,
.journey-shell h2 {
  margin: 8px 0 18px;
  color: var(--cream);
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.13;
}

.experience-panel h1,
.journey-shell h1 { font-size: clamp(38px, 9vw, 62px); }
.experience-panel h2 { font-size: clamp(31px, 7vw, 48px); }
.journey-shell h2 { font-size: clamp(25px, 6vw, 36px); }

.experience-panel p { max-width: 590px; margin: 0 auto 18px; color: var(--mist); font-size: clamp(17px, 3.8vw, 20px); }
.lead { color: var(--cream) !important; }
.eyebrow { margin: 0 0 6px !important; color: var(--gold) !important; font-size: 12px !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.actions {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.experience-welcome { display: grid; gap: 24px; }
.story-cover { width: min(45%, 190px); aspect-ratio: 2 / 3; object-fit: cover; justify-self: center; border: 4px solid rgba(255, 255, 255, .82); border-radius: 18px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35), 0 0 28px var(--experience-glow); transform: rotate(-2deg); }
.helio-conversation { display: grid; grid-template-columns: minmax(90px, 150px) 1fr; align-items: end; gap: 8px; text-align: left; }
.talking-helio { width: 100%; max-height: 220px; object-fit: contain; filter: drop-shadow(0 13px 18px rgba(0, 0, 0, .35)); }
.speech-bubble { position: relative; padding: 22px 24px; color: #273448; background: linear-gradient(150deg, #fff9e8, #f4e7c5); border: 3px solid var(--experience-color, var(--gold)); border-radius: 26px 26px 26px 8px; box-shadow: 0 15px 35px rgba(0, 0, 0, .27); }
.speech-bubble::before { content: ""; position: absolute; left: -18px; bottom: 23px; width: 25px; height: 25px; background: #f4e7c5; border-left: 3px solid var(--experience-color, var(--gold)); border-bottom: 3px solid var(--experience-color, var(--gold)); transform: rotate(45deg); }
.speech-bubble h1 { margin-top: 2px; color: #273448; font-size: clamp(33px, 8vw, 52px); }
.speech-bubble p, .speech-bubble .lead { margin-left: 0; color: #3d4858 !important; }
.speech-bubble .eyebrow { color: var(--experience-soft, #8d6b2e) !important; }

.button,
.small-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
}

.button-primary,
.small-button { color: #10233a; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); font-weight: 700; box-shadow: 0 12px 30px rgba(230, 196, 127, .16); }
.experience-page .button-primary { background: linear-gradient(135deg, #fff3bd, var(--experience-color, var(--gold))); box-shadow: 0 12px 30px var(--experience-glow, rgba(230, 196, 127, .16)); }
.button:disabled { cursor: wait; opacity: .68; }
.button-quiet { color: var(--mist); background: transparent; border-color: rgba(255, 255, 255, .2); }
.button-danger { color: var(--danger); background: transparent; border-color: rgba(240, 170, 160, .5); }
.text-link { color: var(--gold); text-underline-offset: 5px; }
.button:focus-visible, .small-button:focus-visible, .text-link:focus-visible, summary:focus-visible, .brand-link:focus-visible { outline: 3px solid white; outline-offset: 4px; }

.power-reveal {
  width: min(100%, 460px);
  margin: 30px auto;
  padding: 26px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle, rgba(230, 196, 127, .18), rgba(18, 38, 59, .7));
  box-shadow: 0 0 50px rgba(230, 196, 127, .1);
}

.experience-page .power-reveal { border: 2px solid var(--experience-color); background: radial-gradient(circle, var(--experience-glow), rgba(18, 38, 59, .72)); box-shadow: 0 0 45px var(--experience-glow); }
.experience-page .power-reveal > span, .experience-page .power-reveal small { color: var(--experience-color); }
.celebration-stars { margin-bottom: 8px; color: var(--experience-color, var(--gold)); font-size: clamp(24px, 6vw, 36px); letter-spacing: .12em; text-shadow: 0 0 18px var(--experience-glow); animation: twinkle 1.7s ease-in-out infinite alternate; }

.power-reveal > span { color: var(--gold-bright); font-size: 38px; }
.power-reveal small { color: var(--gold); letter-spacing: .13em; text-transform: uppercase; }
.power-reveal strong { font: 400 clamp(27px, 6vw, 38px) Georgia, serif; }

.watch-card {
  position: relative;
  width: min(100%, 330px);
  margin: 28px auto;
}

.watch-card img,
.unlocked-watch > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.watch-card img { filter: brightness(.58) saturate(.7); transition: filter .7s, transform .7s, box-shadow .7s; }
.watch-card.is-awake img { filter: none; transform: scale(1.015); box-shadow: 0 0 55px rgba(255, 219, 143, .42); }
.watch-choice-grid { width: min(100%, 720px); margin: 30px auto 0; display: grid; gap: 22px; align-items: start; }
.watch-choice-grid.has-one { max-width: 350px; }
.watch-choice-grid.has-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.watch-choice { position: relative; margin: 0; padding: 14px; display: grid; gap: 13px; justify-items: center; background: linear-gradient(145deg, rgba(27, 52, 78, .86), rgba(11, 26, 43, .9)); border: 2px solid color-mix(in srgb, var(--experience-color, var(--gold)) 58%, transparent); border-radius: 26px 18px 26px 18px; transition: border-color 2.3s, box-shadow 2.3s, transform 2.3s; }
.watch-choice > img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 15px; filter: brightness(.72) saturate(.8); transition: filter 2.3s, box-shadow 2.3s; }
.watch-choice h3 { margin: 0; font: 400 clamp(20px, 4vw, 27px) Georgia, serif; line-height: 1.15; }
.watch-choice .button { width: 100%; min-height: 48px; padding: 11px 13px; font-size: 14px; }
.watch-choice.is-awake { border-color: var(--experience-color, var(--gold-bright)); box-shadow: 0 0 52px var(--experience-glow, rgba(255, 219, 143, .34)); transform: scale(1.015); }
.watch-choice.is-awake > img,
.watch-choice.is-awake .helio-card-mosaic { filter: none; box-shadow: 0 0 32px var(--experience-glow); }
.watch-choice.is-activating::after { content: "✦  ·  ✧  ·  ✦"; position: absolute; inset: 20% 0 auto; color: #fff1bb; font-size: clamp(20px, 6vw, 34px); text-shadow: 0 0 14px var(--experience-color); animation: activation-stars 2.4s ease-in-out both; pointer-events: none; }
.activation-status { min-height: 34px; margin: 18px auto 0 !important; color: var(--experience-color, var(--gold)) !important; font: 400 clamp(21px, 5vw, 29px) Georgia, serif !important; }
.helio-message { color: var(--cream) !important; font: 400 clamp(24px, 6vw, 34px) Georgia, serif; }
.confirmed-watch { width: min(58%, 270px); margin: 20px auto 28px; }
.confirmed-watch > img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border: 4px solid #fff4cb; border-radius: 18px; box-shadow: 0 0 52px var(--experience-glow), 0 20px 40px rgba(0, 0, 0, .32); }
.helio-card-mosaic { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: var(--card-ratio, 2 / 3); overflow: hidden; border-radius: 15px; background: #0b1a2b; color: var(--gold); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.watch-choice .helio-card-mosaic { filter: brightness(.72) saturate(.8); transition: filter 2.3s, box-shadow 2.3s; }
.confirmed-watch .helio-card-mosaic { border: 4px solid #fff4cb; border-radius: 18px; box-shadow: 0 0 52px var(--experience-glow), 0 20px 40px rgba(0, 0, 0, .32); }
.helio-card-mosaic:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.helio-card-mosaic-grid { position: absolute; inset: 0; display: grid; width: 100%; height: 100%; }
.helio-card-mosaic-grid img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: fill; pointer-events: none; -webkit-user-drag: none; }
.helio-reply { max-width: 650px; margin: 0 auto; display: grid; grid-template-columns: minmax(85px, 135px) 1fr; gap: 8px; align-items: end; text-align: left; }
.helio-reply > img { width: 100%; max-height: 200px; object-fit: contain; filter: drop-shadow(0 12px 15px rgba(0, 0, 0, .35)); }
.reply-bubble strong { display: block; margin-bottom: 6px; color: #273448; font: 400 clamp(24px, 6vw, 34px) Georgia, serif; }
.reply-bubble .helio-message { margin-bottom: 8px; color: #273448 !important; font-size: clamp(20px, 4.5vw, 27px); }
.reply-bubble p:last-child { margin-bottom: 0; }
.night-ending { padding-top: 12vh; }
.moon { display: block; color: var(--gold-bright); font-size: 74px; text-shadow: 0 0 35px rgba(255, 226, 160, .5); }

.storage-warning { max-width: 620px; margin: 34px auto 0; padding: 12px 16px; color: #ffe1a8; border: 1px solid #ffe1a844; border-radius: 10px; font-size: 14px; }

.journey-intro { margin-bottom: 52px; }
.journey-welcome { position: relative; min-height: 250px; display: grid; grid-template-columns: 1fr minmax(120px, 210px); align-items: center; gap: 10px; overflow: hidden; }
.journey-heading { position: relative; z-index: 1; }
.journey-heading > p:not(.eyebrow) { max-width: 490px; color: var(--mist); }
.journey-helio { align-self: end; width: 100%; max-height: 270px; object-fit: contain; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .35)); }
.journey-summary { position: relative; margin: 18px auto 0; padding: 14px 18px 14px 42px; color: var(--mist); background: rgba(255, 255, 255, .035); border: 1px solid rgba(230, 196, 127, .2); border-radius: 16px; box-shadow: none; font-size: 15px; text-align: left; }
.journey-summary::before { content: "✦"; position: absolute; left: 17px; top: 50%; color: var(--gold); font-size: 16px; transform: translateY(-50%); }
.empty-journey { margin-bottom: 38px; padding: 25px; text-align: center; border: 1px dashed var(--line); border-radius: 20px; }
.empty-journey > span { color: var(--gold); font-size: 32px; }

.night-path { position: relative; display: grid; gap: 34px; }
.night-path::before { content: ""; position: absolute; top: 28px; bottom: 28px; left: 23px; width: 3px; background: linear-gradient(var(--gold), #8fcce0, #efad72, rgba(230, 196, 127, .08)); border-radius: 10px; box-shadow: 0 0 12px rgba(230, 196, 127, .28); }
.journey-step { position: relative; padding-left: 66px; }
.journey-step[data-theme="shadows"] { --story-color: #c5a5ff; --story-soft: #6d4ca6; --story-glow: rgba(179, 137, 255, .26); }
.journey-step[data-theme="breath"] { --story-color: #a6e8f4; --story-soft: #397c96; --story-glow: rgba(117, 215, 237, .24); }
.journey-step[data-theme="warmth"] { --story-color: #ffd18c; --story-soft: #b66c42; --story-glow: rgba(255, 179, 102, .25); }
.path-marker { position: absolute; z-index: 1; left: 0; top: 25px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--story-color, var(--gold)); background: #14243a; border: 3px solid var(--story-color, var(--line)); border-radius: 50%; font-size: 20px; font-weight: 700; box-shadow: 0 0 20px var(--story-glow, transparent); }
.is-complete .path-marker { color: #14243a; background: var(--story-color); box-shadow: 0 0 30px var(--story-glow); }
.step-content { position: relative; overflow: hidden; padding: 24px; background: linear-gradient(145deg, rgba(23, 47, 72, .96), rgba(12, 27, 44, .96)); border: 2px solid color-mix(in srgb, var(--story-color, var(--gold)) 52%, transparent); border-radius: 30px 18px 30px 18px; box-shadow: 0 18px 45px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .05); }
.step-content::after { content: "✦"; position: absolute; right: 15px; bottom: -25px; color: var(--story-color, var(--gold)); font-size: 88px; opacity: .055; transform: rotate(12deg); pointer-events: none; }
.is-mysterious .step-content { border-style: dashed; text-align: center; }
.step-content p { color: var(--mist); }
.story-heading { display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: center; margin-bottom: 20px; }
.story-heading img { display: block; width: 82px; aspect-ratio: 2 / 3; object-fit: cover; border: 3px solid rgba(255, 255, 255, .7); border-radius: 12px; transform: rotate(-2deg); box-shadow: 0 10px 20px rgba(0, 0, 0, .3); }
.story-heading h2 { margin-bottom: 0; }
.mystery-visual { width: 130px; height: 92px; margin: 0 auto 14px; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--story-color); background: radial-gradient(circle, var(--story-glow), transparent 65%); }
.mystery-visual strong { display: grid; place-items: center; width: 60px; height: 72px; border: 2px dashed currentColor; border-radius: 30px 30px 14px 14px; font: 400 33px Georgia, serif; }
.mystery-visual span { font-size: 15px; animation: twinkle 2.3s ease-in-out infinite alternate; }
.mission-callout { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin: 18px 0; padding: 14px; color: #26344a; background: #fff0b5; border-radius: 17px 17px 17px 5px; transform: rotate(-.4deg); }
.mission-callout > span { font-size: 25px; }
.mission-callout p { margin: 0; color: inherit; }
.mission-stamp { width: fit-content; margin: 12px 0 20px; padding: 8px 13px; display: flex; gap: 8px; align-items: center; color: #14243a; background: var(--story-color); border-radius: 999px; transform: rotate(-1deg); box-shadow: 0 7px 18px var(--story-glow); }
.power-treasure { position: relative; margin: 20px 0 24px; padding: 20px 18px; display: grid; text-align: center; background: radial-gradient(circle at 50% 20%, var(--story-glow), rgba(255, 255, 255, .035)); border: 2px solid var(--story-color); border-radius: 22px; box-shadow: 0 0 26px var(--story-glow); }
.power-treasure small { color: var(--story-color); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.power-treasure strong { color: var(--cream); font: 400 clamp(25px, 6vw, 35px) Georgia, serif; }
.power-spark { position: absolute; top: -18px; left: 50%; color: var(--story-color); font-size: 28px; transform: translateX(-50%); text-shadow: 0 0 15px var(--story-color); }
.watch-list { display: grid; gap: 14px; }
.unlocked-watch { display: grid; grid-template-columns: 88px 1fr; gap: 15px; align-items: center; padding: 12px; background: rgba(4, 12, 22, .35); border: 1px solid var(--story-color, var(--line)); border-radius: 18px; }
.unlocked-watch > img { border-radius: 9px; }
.unlocked-watch .helio-card-mosaic { border-radius: 9px; }
.unlocked-watch > div { display: grid; gap: 5px; }
.unlocked-watch small { color: var(--story-color, var(--gold)); font-weight: 700; }
.unlocked-watch strong { line-height: 1.25; }
.small-button { width: fit-content; min-height: 42px; margin-top: 6px; padding: 9px 13px; font-size: 14px; }
.unlocked-watch .small-button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--cream);
  background: rgba(255, 255, 255, .045);
  border-color: color-mix(in srgb, var(--story-color, var(--gold)) 62%, transparent);
  box-shadow: none;
  font-weight: 600;
}
.unlocked-watch .small-button:hover,
.unlocked-watch .small-button:focus-visible {
  color: #14243a;
  background: var(--story-color, var(--gold));
}
.watch-symbol { display: grid; place-items: center; width: 68px; height: 68px; color: var(--gold); background: rgba(230, 196, 127, .09); border-radius: 50%; font-size: 36px; }
.prototype-note { color: #9eb0bf; font-size: 12px; }

.next-adventure { margin: 52px auto 42px; padding-top: 30px; display: grid; grid-template-columns: auto 1fr; gap: 17px; align-items: start; border-top: 1px solid rgba(230, 196, 127, .22); }
.next-moon { color: var(--gold); font-size: 35px; line-height: 1; text-shadow: 0 0 18px rgba(230, 196, 127, .28); }
.next-adventure h2 { margin: 0 0 7px; font-size: clamp(24px, 5vw, 31px); }
.next-adventure p { margin: 0 0 12px; color: var(--mist); }
.parent-discovery-link { color: var(--gold); font-size: 14px; text-underline-offset: 5px; }
.parent-discovery-link:focus-visible { outline: 3px solid white; outline-offset: 4px; }
.parent-tools { margin-top: 48px; border-top: 1px solid rgba(255, 255, 255, .12); }
.parent-tools summary { padding: 22px 0; color: var(--gold); cursor: pointer; }
.parent-tools-content { padding: 0 0 28px; color: var(--mist); }
.parent-tools-content h2 { font-size: 26px; }
.reset-help { min-height: 25px; font-size: 14px; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes twinkle {
  from { opacity: .4; transform: scale(.8); }
  to { opacity: 1; transform: scale(1.15); }
}

@keyframes activation-stars {
  0% { opacity: 0; transform: translateY(25px) scale(.7); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-45px) scale(1.2); }
}

@media (min-width: 680px) {
  .actions { flex-direction: row; justify-content: center; }
  .experience-shell { padding-top: 70px; }
  .experience-welcome { grid-template-columns: 180px 1fr; align-items: center; }
  .story-cover { width: 100%; }
  .journey-step:nth-child(even) { margin-left: 34px; }
  .journey-step:nth-child(odd) .step-content { margin-right: 34px; }
}

@media (max-width: 430px) {
  .helio-conversation { grid-template-columns: 82px 1fr; }
  .speech-bubble { padding: 18px 17px; }
  .speech-bubble::before { left: -14px; width: 20px; height: 20px; }
  .helio-reply { grid-template-columns: 78px 1fr; }
  .journey-welcome { min-height: 220px; grid-template-columns: 1fr 105px; }
  .journey-helio { max-height: 205px; transform: translateX(8px); }
  .journey-heading h1 { font-size: clamp(35px, 11vw, 48px); }
  .journey-step { padding-left: 48px; }
  .path-marker { width: 36px; height: 36px; top: 20px; }
  .night-path::before { left: 17px; }
  .step-content { padding: 20px 17px; }
  .story-heading { grid-template-columns: 68px 1fr; gap: 12px; }
  .story-heading img { width: 68px; }
  .unlocked-watch { grid-template-columns: 72px 1fr; }
  .watch-choice-grid.has-two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
