@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/bricolage-grotesque-latin-7bec0498.woff2") format("woff2");
}

:root {
  --plum: #352348;
  --paper: #f6eef9;
  --lavender: #d8b9f2;
  --muted: #c8b9d2;
  --rose: #e8bdd7;
  color-scheme: dark;
  font-family: "Bricolage Grotesque", Arial, sans-serif;
  background: var(--plum);
  color: var(--paper);
  scrollbar-color: var(--muted) var(--plum);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { opacity: .3; cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--lavender); outline-offset: 6px; }
h1:focus, h2:focus { outline: none; }
::selection { background: var(--rose); color: var(--plum); }

.review {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  padding: 0 5.3vw;
  display: flex;
  flex-direction: column;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.035' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.masthead { height: 112px; flex-shrink: 0; display: flex; align-items: center; gap: 36px; border-bottom: 1px solid #f6eef925; position: relative; z-index: 2; }
.wordmark { text-decoration: none; font-size: 32px; letter-spacing: -1.8px; font-weight: 750; display: flex; align-items: center; }
.brand-flower { font-size: 35px; font-weight: 400; color: var(--lavender); margin-right: 12px; line-height: 1; }
.flower-icon, .heart-icon { display: block; width: 100%; height: 100%; }
.brand-flower { width: 35px; height: 35px; }
.wordmark, h1, .chapter-copy h2, .slide--closing h2 { font-family: "Bricolage Grotesque", Arial, sans-serif; }
.wordmark-period { color: var(--lavender); }
.masthead-note { font: italic 18px Georgia, serif; opacity: .75; margin-top: 4px; }
.sound-button { margin-left: auto; display: flex; align-items: center; gap: 12px; background: none; border: 1px solid #f6eef950; padding: 12px 18px; border-radius: 40px; font-size: 14px; min-height: 44px; transition: background .2s; }
.sound-button:hover { background: #ffffff0b; }
.sound-bars { display: flex; align-items: center; gap: 3px; height: 17px; }
.sound-bars i { height: 6px; width: 2px; background: var(--paper); border-radius: 2px; }
.sound-bars i:nth-child(2) { height: 15px; }
.sound-bars i:nth-child(3) { height: 10px; }
.sound-bars i:nth-child(4) { height: 13px; }
.sound-button[aria-pressed=true] i { animation: music-bar .8s ease-in-out infinite alternate; }
.sound-button i:nth-child(2) { animation-delay: .2s; }
.sound-button i:nth-child(3) { animation-delay: .4s; }

.story { flex: 1; display: flex; align-items: stretch; position: relative; }
.slide { width: 100%; min-height: 610px; display: flex; align-items: center; justify-content: space-between; gap: 4vw; padding: 45px 0 50px; }
.review[data-ready=true] .slide:not(.is-active) { display: none; }
.review:not([data-ready=true]) .story { display: block; }
.review:not([data-ready=true]) { height: auto; }
.enhanced-control { visibility: hidden; }
.review[data-ready=true] .enhanced-control { visibility: visible; }
.is-active .cover-copy, .is-active .chapter-copy, .is-active .letter-copy { animation: copy-enter .65s both; }
.is-active .photo-scatter, .is-active .chapter-photo { animation: photo-enter .8s .1s both; }
.cover-copy { width: 53%; z-index: 1; padding-bottom: 10px; }
h1 { font-size: clamp(80px, 8.6vw, 120px); font-weight: 750; letter-spacing: -.04em; line-height: .98; margin: 0 0 36px; }
.serif-word { font-family: Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.04em; position: relative; color: var(--lavender); }
.serif-word svg { position: absolute; width: 100%; height: 18px; bottom: -13px; left: 0; fill: none; stroke: var(--lavender); stroke-width: 2; stroke-linecap: round; }
.title-period { color: var(--lavender); }
.story-copy { font-size: 18px; line-height: 1.8; color: #e5daec; max-width: 390px; margin: 0 0 31px; text-wrap: pretty; }
.primary-button { background: var(--lavender); color: var(--plum); text-decoration: none; border: 0; display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; padding: 19px 25px; border-radius: 4px; font-size: 15px; font-weight: 650; transition: transform .2s, background .2s; min-height: 54px; }
.primary-button:hover { transform: translateY(-3px); background: #e7d2fa; }
.primary-button:focus-visible { outline-color: var(--paper); }
.button-spark { font-size: 24px; line-height: 18px; }
.button-spark { width: 22px; height: 22px; }
.cover-footnote { font-size: 12px; color: var(--muted); margin-top: 21px; letter-spacing: .15px; }

.photo-scatter { width: 47%; height: 490px; position: relative; margin-right: 12px; }
.photo-print { background: #faf4fb; color: #493353; padding: 13px 13px 0; box-shadow: 0 15px 40px #1b0b2b40; position: relative; margin: 0; }
.photo-print img { width: 100%; height: calc(100% - 46px); object-fit: cover; display: block; filter: saturate(.75); }
.photo-print figcaption { font: italic 17px Georgia, serif; text-align: center; height: 46px; display: flex; align-items: center; justify-content: center; }
.print--back { width: 250px; height: 300px; transform: rotate(11deg); position: absolute; right: 8px; top: 4px; }
.print--front { width: 315px; height: 365px; transform: rotate(-9deg); position: absolute; top: 118px; left: 0; transition: transform .35s; }
.photo-scatter:hover .print--front { transform: rotate(-5deg) translateY(-4px); }
.photo-tape { position: absolute; top: -14px; left: 35%; width: 100px; height: 29px; background: #cbbad6c4; transform: rotate(4deg); z-index: 1; clip-path: polygon(2% 3%, 98% 0, 100% 95%, 0 100%); }
.orbit-doodle { position: absolute; left: 28px; top: -12px; font-size: 93px; color: var(--lavender); line-height: 1; transform: rotate(12deg); }
.orbit-doodle { width: 90px; height: 90px; }
.round-stamp { background: var(--rose); width: 116px; height: 116px; position: absolute; right: 0; bottom: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--plum); border-radius: 50%; transform: rotate(13deg); font-size: 10px; letter-spacing: 2.5px; line-height: 1.6; outline: 1px dashed #35234855; outline-offset: -8px; }
.round-stamp strong { font: italic 26px Georgia, serif; letter-spacing: -1px; }
.handwritten { font: italic 23px/1.5 Georgia, serif; color: var(--lavender); }
.scatter-note { position: absolute; bottom: -38px; left: 48px; font-size: 19px; transform: rotate(-5deg); }
.demo-note { position: absolute; bottom: -69px; left: 48px; font-size: 12px; color: var(--muted); letter-spacing: .4px; }

.story-footer { flex-shrink: 0; padding: 24px 0 18px; }
.footer-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); }
.edition { letter-spacing: .3px; }
.story-position { color: var(--paper); font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.position-divider { color: #b5a2c2; margin: 0 6px; }
.keyboard-hint { font-size: 12px; }
.story-progress { display: flex; gap: 8px; margin: 8px 0 3px; }
.progress-step { padding: 12px 0; background: none; border: 0; flex: 1; min-width: 0; min-height: 44px; }
.progress-step span { display: block; height: 3px; background: #f6eef930; transition: background .3s, transform .2s; border-radius: 2px; }
.progress-step[aria-current] span { background: var(--lavender); }
.progress-step.is-complete span { background: #f6eef990; }
.progress-step:hover span { transform: scaleY(2); background: var(--paper); }
.footer-controls { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.playback-controls { display: flex; align-items: center; gap: 22px; }
.text-button, .autoplay-button { border: 0; background: none; min-height: 44px; padding: 8px 0; font-size: 14px; }
.text-button { min-width: 44px; }
.autoplay-button { color: var(--paper); border: 1px solid #f6eef935; border-radius: 30px; padding: 8px 17px; }
.text-button:hover:not(:disabled) { color: var(--lavender); }

.chapter-copy { width: 48%; }
.story-copy--caption { display: none; }
.chapter-copy h2 { font-size: clamp(45px, 5.5vw, 82px); line-height: 1.04; letter-spacing: -3px; max-width: 650px; margin: 0 0 28px; text-wrap: balance; }
.chapter-note { display: block; max-width: 340px; font-size: 21px; transform: rotate(-3deg); margin-top: 35px; }
.chapter-photo { width: min(42%, 420px); height: 450px; margin-right: 4%; transform: rotate(5deg); }
.photo-placeholder-label { position: absolute; left: 23px; bottom: 64px; color: #fff; background: #352348e6; padding: 7px 11px; border-radius: 2px; font-size: 12px; letter-spacing: .3px; }
.letter-copy { max-width: 850px; text-align: center; margin: auto; padding: 0 35px; }
.letter-copy h2 { font-size: clamp(48px, 6.2vw, 90px); letter-spacing: -3px; line-height: 1.05; margin: 0 0 28px; text-wrap: balance; }
.letter-copy .story-copy { max-width: 510px; margin: 0 auto 25px; }
.letter-copy .handwritten { margin: 24px 0; }
.letter-flower { display: block; font-size: 70px; line-height: 1; color: var(--lavender); margin-bottom: 28px; }
.letter-flower { width: 70px; height: 70px; margin-left: auto; margin-right: auto; }
.slide--interlude .letter-copy h2 { font-family: Georgia, serif; font-weight: 400; font-style: italic; color: var(--lavender); }
.slide--closing .primary-button { margin-top: 12px; }
.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: -100px; left: 20px; z-index: 10; padding: 12px; background: var(--lavender); color: var(--plum); }
.skip-link:focus { top: 12px; }
.noscript-note { padding: 20px; text-align: center; }

@keyframes copy-enter { from { transform: translateY(20px); } to { transform: translateY(0); } }
@keyframes photo-enter { from { translate: 0 22px; } to { translate: 0 0; } }
@keyframes music-bar { to { transform: scaleY(.4); } }

@media (min-width: 1450px) {
  .review { padding: 0 max(5.3vw, calc((100vw - 1400px)/2)); }
  .slide { min-height: 690px; }
  .photo-scatter { margin-right: 30px; height: 520px; }
  .print--back { width: 290px; height: 340px; }
  .print--front { width: 355px; height: 410px; }
  .round-stamp { bottom: 0; }
}
@media (min-width: 900px) and (min-height: 850px) {
  .slide { min-height: 0; }
  .story-footer { padding-bottom: 28px; }
}
@media (max-width: 1050px) {
  .masthead { height: 92px; }
  .slide { min-height: 570px; }
  .photo-scatter { scale: .87; transform-origin: center right; margin-left: -20px; }
  .cover-copy { width: 57%; }
  .chapter-photo { height: 400px; margin-right: 1%; }
}
@media (max-width: 700px) {
  .review { padding: 0 7vw; min-height: 100svh; }
  .masthead { height: 79px; gap: 14px; }
  .wordmark { font-size: 27px; }
  .brand-flower { width: 29px; height: 29px; margin-right: 8px; }
  .masthead-note { display: none; }
  .sound-button { padding: 10px 14px; font-size: 14px; }
  .slide { flex-direction: column; gap: 28px; padding: 35px 0 20px; min-height: 0; justify-content: center; }
  .cover-copy, .chapter-copy { width: 100%; padding: 0; }
  h1 { font-size: clamp(78px, 17.5vw, 120px); line-height: .95; margin-bottom: 24px; }
  .serif-word svg { bottom: -10px; height: 13px; }
  .story-copy { font-size: 16px; line-height: 1.7; max-width: 360px; margin-bottom: 24px; }
  .primary-button { padding: 15px 20px; font-size: 14px; gap: 22px; min-height: 50px; }
  .cover-footnote { font-size: 12px; margin: 15px 0 0; }
  .photo-scatter { width: 100%; height: 290px; scale: 1; margin: 10px 0 30px; max-width: 390px; }
  .print--front { width: 210px; height: 243px; top: 47px; left: 10px; padding: 9px 9px 0; }
  .print--back { width: 170px; height: 210px; top: 0; right: 12px; padding: 9px 9px 0; }
  .photo-print figcaption { font-size: 12px; height: 34px; }
  .photo-print img { height: calc(100% - 34px); }
  .orbit-doodle { width: 63px; height: 63px; left: 25px; top: -10px; }
  .round-stamp { width: 85px; height: 85px; font-size: 8px; right: 4px; bottom: 0; letter-spacing: 1.5px; }
  .round-stamp strong { font-size: 21px; }
  .scatter-note { bottom: -28px; left: 25px; font-size: 15px; }
  .demo-note { bottom: -50px; left: 25px; font-size: 12px; }
  .photo-tape { width: 75px; height: 23px; top: -11px; }
  .story-footer { padding: 28px 0 10px; }
  .footer-topline { font-size: 12px; }
  .keyboard-hint { display: none; }
  .story-progress { gap: 5px; margin-top: 4px; }
  .footer-controls { font-size: 12px; }
  .playback-controls { gap: 10px; }
  .autoplay-button { padding: 6px 12px; }
  .chapter-copy h2 { font-size: 49px; letter-spacing: -2px; margin-bottom: 20px; }
  .chapter-note { font-size: 19px; margin: 20px 0 4px; }
  .chapter-photo { width: 78%; max-width: 320px; height: 330px; flex-shrink: 0; margin: 12px 0 15px; transform: rotate(4deg); }
  .chapter-photo figcaption { font-size: 14px; height: 40px; }
  .chapter-photo img { height: calc(100% - 40px); }
  .photo-placeholder-label { bottom: 55px; font-size: 12px; left: 20px; right: 20px; text-align: center; }
  .letter-copy { padding: 30px 0; min-height: 530px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .letter-copy h2 { font-size: 52px; letter-spacing: -2px; }
  .letter-copy .handwritten { font-size: 21px; }
  .letter-flower { font-size: 62px; margin-bottom: 30px; }
}
@media (max-width: 380px) {
  h1 { font-size: 76px; }
  .photo-scatter { height: 260px; }
  .print--front { width: 185px; height: 220px; }
  .print--back { width: 155px; height: 190px; }
  .story-position { letter-spacing: 1px; }
  .chapter-label { max-width: 110px; }
  .chapter-copy h2 { font-size: 43px; }
}
.mobile-story-hint { display: none; }

/* The enhanced phone layout is a story viewer; no-JS remains a full document. */
@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  .review[data-ready=true] {
    height: 100dvh;
    min-height: 0;
    padding: 0;
    isolation: isolate;

    .masthead {
      display: grid;
      grid-template-columns: 1fr auto;
      grid-template-rows: auto auto;
      height: calc(100px + env(safe-area-inset-top, 0px));
      padding: calc(38px + env(safe-area-inset-top, 0px)) 22px 12px;
      border: 0;
      column-gap: 12px;
      row-gap: 0;
      z-index: 4;
      flex-shrink: 0;
    }
    .wordmark { font-size: 25px; grid-column: 1; grid-row: 1; }
    .brand-flower { width: 25px; height: 25px; }
    .masthead-note { display: block; grid-column: 1; grid-row: 2; font: 12px/1.3 "Bricolage Grotesque", Arial, sans-serif; max-width: 100%; margin-top: 2px; opacity: 1; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sound-button { grid-column: 2; grid-row: 1 / span 2; padding: 10px 12px; font-size: 12px; gap: 8px; background: #352348a6; }
    .story { min-height: 0; position: static; touch-action: pan-y pinch-zoom; -webkit-touch-callout: none; user-select: none; }
    .slide { min-height: 0; height: 100%; padding: 10px 24px 18px; gap: 12px; justify-content: center; }
    .slide--cover { justify-content: space-evenly; }
    .cover-copy { width: 100%; }
    h1 { font-size: clamp(58px, 17vw, 88px); line-height: .95; margin: 0 0 22px; }
    .story-copy { font-size: 16px; line-height: 1.55; margin-bottom: 18px; max-width: 420px; }
    .primary-button { min-height: 44px; padding: 13px 18px; }
    .cover-footnote { display: none; }
    .photo-scatter { height: clamp(135px, 25dvh, 245px); width: min(100%, 340px); margin: 0 auto 16px; scale: 1; }
    .print--front { width: 53%; height: 92%; top: 8%; left: 12%; }
    .print--back { width: 45%; height: 83%; top: 0; right: 2%; }
    .photo-print figcaption { font-size: 11px; height: 28px; }
    .photo-print img { height: calc(100% - 28px); }
    .orbit-doodle { width: 45px; height: 45px; left: 0; top: -5px; }
    .round-stamp { width: 64px; height: 64px; right: 0; bottom: -4px; font-size: 6px; letter-spacing: 1px; }
    .round-stamp strong { font-size: 18px; }
    .scatter-note { font-size: 15px; left: 0; bottom: -24px; }
    .demo-note { display: none; }

    .slide--photo { justify-content: flex-end; }
    .chapter-photo {
      position: absolute;
      inset: 0;
      z-index: -1;
      width: 100%;
      max-width: none;
      height: 100%;
      margin: 0;
      padding: 0;
      transform: none;
      animation: none;
      box-shadow: none;
      background: var(--plum);
    }
    .chapter-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
    .chapter-photo figcaption, .chapter-photo .photo-tape { display: none; }
    .slide--photo::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: linear-gradient(180deg, #1c102bbf 0%, #1c102b05 28%, #24152da6 52%, #24152df5 82%, #24152d 100%);
    }
    .chapter-copy { position: relative; z-index: 1; width: 100%; padding-bottom: 14px; }
    .chapter-copy h2 { font-size: clamp(34px, 10.5vw, 48px); letter-spacing: -.035em; line-height: 1.03; max-width: 480px; margin-bottom: 18px; }
    .chapter-copy .story-copy { color: var(--paper); margin-bottom: 0; }
    .chapter-copy .story-copy--caption { display: block; }
    .chapter-note { display: none; }
    .photo-placeholder-label { top: calc(112px + env(safe-area-inset-top, 0px)); bottom: auto; left: 24px; right: auto; background: #352348d9; font-size: 12px; }

    .letter-copy { min-height: 0; max-height: 100%; overflow-y: auto; padding: 14px 0; justify-content: safe center; }
    .letter-copy > * { flex-shrink: 0; }
    .letter-copy h2 { font-size: clamp(34px, 10.5vw, 48px); letter-spacing: -.035em; line-height: 1.05; margin-bottom: 22px; }
    .letter-flower { width: 44px; height: 44px; margin-bottom: 24px; flex-shrink: 0; }
    .letter-copy .story-copy { margin-bottom: 14px; }
    .letter-copy .handwritten { font-size: 20px; margin: 12px 0; }
    .slide--closing .primary-button { margin-top: 12px; flex-shrink: 0; }

    .story-footer { position: relative; z-index: 4; flex-shrink: 0; padding: 0 24px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .footer-topline, .chapter-label { display: none; }
    .story-progress { position: fixed; top: env(safe-area-inset-top, 0px); left: 14px; right: 14px; z-index: 5; gap: 5px; margin: 0; }
    .progress-step { min-height: 44px; padding: 20px 0 21px; }
    .progress-step span { height: 3px; background: #f6eef945; overflow: hidden; position: relative; transform: none; }
    .progress-step span::after { content: ""; display: block; position: absolute; inset: 0; background: var(--paper); transform-origin: left; transform: scaleX(var(--story-progress, 0)); }
    .progress-step[aria-current] span { background: #f6eef945; }
    .progress-step.is-complete span::after { transform: scaleX(1); }
    .playback-controls { width: 100%; justify-content: space-between; gap: 16px; }
    .autoplay-button { background: #352348b3; font-size: 14px; min-width: 114px; }
    .text-button { font-size: 14px; color: var(--paper); }
    .mobile-story-hint { display: block; text-align: center; font-size: 12px; color: var(--muted); margin: 9px 0 0; line-height: 1.25; }
    &[data-holding=true] .mobile-story-hint { color: var(--paper); }
    &[data-holding=true] .sound-bars i { animation-play-state: paused; }
  }
}

@media (max-width: 700px) and (max-height: 680px) {
  .review[data-ready=true] {
    .masthead { height: calc(86px + env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
    .slide { padding-top: 4px; padding-bottom: 10px; gap: 8px; }
    h1 { font-size: 56px; margin-bottom: 15px; }
    .story-copy { font-size: 15px; line-height: 1.45; margin-bottom: 14px; }
    .photo-scatter { height: 125px; margin-bottom: 8px; }
    .scatter-note { display: none; }
    .letter-copy h2 { font-size: 34px; margin-bottom: 16px; }
    .letter-copy { padding: 4px 0; }
    .letter-flower { width: 24px; height: 24px; margin-bottom: 12px; }
    .letter-copy .handwritten { font-size: 17px; line-height: 1.35; margin: 6px 0; }
    .chapter-copy h2 { font-size: 34px; margin-bottom: 14px; }
    .mobile-story-hint { margin-top: 4px; }
  }
}

@media (min-width: 701px) and (max-width: 950px) and (max-height: 500px) {
  .review[data-ready=true] {
    .masthead { height: 78px; padding-top: 30px; }
    .slide--cover { flex-direction: row; gap: 36px; align-items: center; padding: 8px 5vw; }
    .cover-copy { width: 55%; }
    h1 { font-size: 48px; margin-bottom: 14px; }
    .story-copy { font-size: 14px; line-height: 1.45; margin-bottom: 12px; }
    .photo-scatter { width: 35%; height: 180px; }
    .chapter-copy { width: 60%; margin-right: auto; }
    .chapter-copy h2, .letter-copy h2 { font-size: 32px; }
    .letter-copy { max-width: 650px; display: block; }
    .letter-flower { width: 26px; height: 26px; margin-bottom: 12px; }
    .letter-copy .handwritten { font-size: 18px; margin: 8px 0; }
    .mobile-story-hint { margin-top: 2px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .photo-scatter:hover .print--front { transform: rotate(-9deg); }
}
