/* PinkOut worlds: the colour-changing mood stage and the world board.
   Loaded late; selectors are scoped to .mood-stage / .world-board so older stage rules no longer apply. */

/* ---------- Mood stage ---------- */
.world-stage.mood-stage{
  --ms-bg:#fff0aa;--ms-shift:8px;
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,1fr);
  grid-template-areas:"copy window choices" "copy detail choices";grid-template-rows:minmax(0,1fr) auto;
  align-items:center;gap:16px clamp(24px,3vw,56px);
  height:calc(100svh - 88px);min-height:0;margin:0 16px;padding:clamp(24px,4svh,48px) clamp(24px,4vw,64px);
  direction:inherit;color:#7d163f;background:var(--ms-bg);border-radius:32px;
  overflow:hidden;isolation:isolate;contain:paint;transition:background-color .7s ease;
}
html[dir=ltr] .world-stage.mood-stage{--ms-shift:-8px}
.mood-stage[data-world="2"]{--ms-bg:#ffd3e2}
.mood-stage[data-world="3"]{--ms-bg:#c7efdf}
.mood-stage[data-world="4"]{--ms-bg:#ddcffb}
.mood-stage[data-world="5"]{--ms-bg:#ffdcc7}
.mood-stage[data-world="6"]{--ms-bg:#cfe6ff}
.mood-stage[data-world="7"]{--ms-bg:#f6c9f0}
.mood-stage .stage-background,.mood-stage .stage-shade{display:none}
/* Progress through the seven worlds, drawn as a cherry ribbon along the bottom edge. */
.world-stage.mood-stage::after{left:32px;right:32px;bottom:16px;height:6px;border-radius:6px;background:#df004c}
/* White line doodles (matching About) drift upward as the stage moves through the seven worlds. */
.ms-dots{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;opacity:.9;-webkit-mask-image:radial-gradient(ellipse at 50% 55%,#000 25%,transparent 78%);mask-image:radial-gradient(ellipse at 50% 55%,#000 25%,transparent 78%)}
.ms-dots::before{content:'';position:absolute;inset:0 0 -160px;background:url(../images/patterns/stage-icons.svg) 0 0/280px 280px;transform:translate3d(0,calc(var(--stage-progress,0) * -140px),0)}
@media(max-width:800px){.ms-dots::before{background-size:220px 220px}}
.ms-watermark{position:absolute;z-index:-1;left:50%;bottom:-.16em;margin:0;translate:calc(-50% + (.5 - var(--stage-progress,0)) * 22vw) 0;font:900 clamp(80px,13vw,210px)/1 Arial,Helvetica,sans-serif;letter-spacing:-.04em;text-transform:uppercase;white-space:nowrap;color:#fff;opacity:.5;pointer-events:none}

.ms-copy{grid-area:copy;display:flex;flex-direction:column;align-items:flex-start;gap:18px;min-width:0}
.ms-copy .ms-eyebrow{margin:0;text-align:start;color:#df004c}
.ms-copy .section-title{margin:0;font-size:clamp(34px,3.6vw,58px);line-height:1.2;color:#7d163f}
html[dir=ltr] .ms-copy .section-title{font-size:clamp(28px,2.55vw,42px)}
.ms-lead{max-width:360px;font-size:16px;line-height:1.8;color:#7d3658}

.ms-window{grid-area:window;position:relative;justify-self:center;align-self:end;width:min(100%,41svh,390px)}
.ms-arch{position:relative;width:100%;aspect-ratio:3/4;border:10px solid #fff;border-radius:200px 200px 26px 26px;overflow:hidden;background:#fff;box-shadow:0 30px 60px #7d163f2e}
.world-stage.mood-stage .stage-preview{position:absolute;inset:-24px;left:-24px;top:-24px;width:auto;height:auto;grid-column:auto;grid-row:auto;align-self:auto;z-index:0;border-radius:0;box-shadow:none;overflow:hidden;pointer-events:none}
.world-stage.mood-stage .stage-preview img{width:100%;height:100%;object-fit:cover}
.ms-sticker{position:absolute;z-index:2;bottom:4%;inset-inline-end:-16%;width:clamp(96px,10vw,150px);aspect-ratio:1;rotate:10deg;animation:ms-bob 5.5s ease-in-out infinite alternate}
.ms-sticker img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 16px 18px #7d163f33)}
.ms-count{position:absolute;z-index:2;top:16px;inset-inline-start:-12%;padding:8px 14px;border-radius:999px;background:#fff;rotate:-6deg;font:700 14px/1 Arial,Helvetica,sans-serif;letter-spacing:.06em;color:#7d163f;box-shadow:0 10px 20px #7d163f1f}
.ms-count b{color:#df004c}
.ms-spark{position:absolute;z-index:2;font:22px/1 Arial,sans-serif;color:#df004c;animation:ms-twinkle 2.6s ease-in-out infinite}
.ms-spark-1{top:10%;inset-inline-end:-12%}
.ms-spark-2{top:44%;inset-inline-start:-18%;color:#fff;font-size:28px;animation-delay:-.9s}
.ms-spark-3{bottom:26%;inset-inline-start:-9%;font-size:18px;animation-delay:-1.7s}
@keyframes ms-bob{from{transform:translateY(0) rotate(-4deg)}to{transform:translateY(-12px) rotate(5deg)}}
@keyframes ms-twinkle{0%,100%{transform:scale(.7);opacity:.4}50%{transform:scale(1.15);opacity:1}}

.ms-detail{grid-area:detail;justify-self:center;max-width:420px;min-height:7.5em;text-align:center}
.ms-name{margin:0;font:700 12px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#df004c}
.ms-heading{margin:6px 0 4px;font-size:22px;font-weight:600;line-height:1.4}
.ms-text{font-size:15px;line-height:1.75;color:#7d3658}

.ms-choices{grid-area:choices;display:flex;flex-direction:column;align-items:flex-start;gap:8px;justify-self:end;min-width:0}
.ms-choices button{display:inline-flex;align-items:center;gap:12px;min-height:48px;max-width:100%;padding:7px 20px 7px 8px;border-radius:999px;background:#ffffffad;color:#7d163f;font:500 clamp(16px,1.35vw,20px)/1.3 var(--font);text-align:start;box-shadow:0 1px 0 #7d163f14;transition:background-color .3s,color .3s,box-shadow .3s,transform .4s cubic-bezier(.3,1.5,.5,1)}
html[dir=rtl] .ms-choices button{padding:7px 8px 7px 20px}
.ms-num{flex:0 0 auto;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#fff;color:#df004c;font:700 12px/1 Arial,Helvetica,sans-serif;transition:background-color .3s,color .3s}
.ms-choices button:hover{background:#fff}
.ms-choices button[aria-pressed=true]{background:#df004c;color:#fff;transform:translateX(var(--ms-shift)) scale(1.06);box-shadow:0 12px 26px #df004c40}
.ms-choices button[aria-pressed=true] .ms-num{background:#ffffff33;color:#fff}
.ms-choices button[aria-pressed=true]::after{content:'✿';font-size:.8em}

/* ---------- World board ----------
   Seven photo panels in one row; the chosen one widens to tell its story, so nothing opens in a popup.
   Mood chips light up a three-stop route and fade the rest. Phones stack the panels as an accordion. */
.world-board{max-width:1360px;margin:44px auto 0;color:#7d163f;text-align:start}
.wb-bar{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:22px;scroll-margin-top:96px;text-align:center}
.wb-label{margin:0;font-size:15px;font-weight:600;color:#df004c}
.wb-moods{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.wb-chip{display:inline-flex;align-items:center;gap:8px;min-height:50px;padding:6px 20px;border-radius:999px;background:#fff;color:#7d163f;font-size:16px;font-weight:600;line-height:1.2;box-shadow:inset 0 0 0 1px #7d163f1f;transition:background-color .25s,color .25s,box-shadow .25s,transform .35s cubic-bezier(.3,1.5,.5,1)}
.wb-chip:has(.wb-chip-art){padding-inline-start:6px}
.wb-chip-art{display:block;flex:0 0 auto;width:38px;height:38px;border-radius:50%;background:#fff0f5}
.wb-chip-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 5px #7d163f26)}
.wb-chip-count{min-width:26px;padding:2px 8px;border-radius:999px;background:#ffe1ec;color:#df004c;font:700 12px/1.4 Arial,Helvetica,sans-serif;direction:ltr}
.wb-chip:hover{transform:translateY(-2px);box-shadow:inset 0 0 0 1px #df004c80}
.wb-chip[aria-pressed=true]{background:#df004c;color:#fff;box-shadow:0 10px 22px #df004c40}
.wb-chip[aria-pressed=true] .wb-chip-art{background:#fff}
.wb-chip[aria-pressed=true] .wb-chip-count{background:#ffffff33;color:#fff}
.wb-note{margin:0;min-height:1.7em;font-size:15px;line-height:1.7;color:#7d3658}
.wb-note b{color:#df004c;font-family:Arial,Helvetica,sans-serif;font-weight:700}

.wb-panels{container-type:inline-size;display:flex;gap:10px;height:clamp(440px,64svh,600px)}
.wb-panel{--grow:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;flex:var(--grow) 1 0;min-width:0;padding:24px;border-radius:26px;overflow:hidden;isolation:isolate;background:#f3c6d8;color:#fff;scroll-margin-top:96px;transition:flex-grow .75s cubic-bezier(.65,0,.35,1),opacity .45s,filter .45s}
.wb-panel.is-dim{--grow:.7;opacity:.5;filter:saturate(.3)}
.wb-panel.is-active{--grow:5;opacity:1;filter:none}
.wb-panel::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#3c0b2414 0%,#3c0b2400 35%,#3c0b24b3 100%);transition:opacity .5s}
.wb-panel.is-active::after{background:linear-gradient(180deg,#3c0b2400 25%,#3c0b24e6 100%)}
.world-board .wb-photo{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;scale:1.14;transition:scale 1.2s cubic-bezier(.2,.8,.2,1)}
.wb-panel.is-active .wb-photo{scale:1}
@media(hover:hover){.wb-panel:not(.is-active):hover .wb-photo{scale:1.08}}

/* The opener's ::before covers the whole panel, so a tap anywhere opens it; the body sits above it. */
.wb-open{position:static;display:block;width:100%;padding:0;color:inherit;text-align:start}
.wb-open::before{content:'';position:absolute;inset:0;z-index:0;border-radius:inherit}
.wb-panel:has(.wb-open:focus-visible){outline:3px solid #df004c;outline-offset:3px}
.wb-open:focus-visible{outline:0}
.wb-num{position:absolute;z-index:1;top:16px;inset-inline-start:16px;padding:6px 10px;border-radius:999px;background:#ffffffe0;color:#7d163f;font:700 12px/1 Arial,Helvetica,sans-serif;letter-spacing:.04em;transition:background-color .3s,color .3s}
.wb-panel.is-match .wb-num{background:#df004c;color:#fff}
.wb-panel.is-saved .wb-num::after{content:' ♥';color:#df004c}
.wb-panel.is-match.is-saved .wb-num::after{color:#fff}
.wb-name{display:block;font:700 14px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.1em;text-transform:uppercase;text-shadow:0 1px 10px #3c0b2466;animation:wb-name-in .5s .15s both}
/* Narrow panels read their name upwards along the bottom edge. */
.wb-live .wb-panel:not(.is-active) .wb-name{position:absolute;bottom:24px;left:50%;writing-mode:vertical-rl;transform:translateX(-50%) rotate(180deg);white-space:nowrap;font-size:16px;letter-spacing:.08em;animation-name:wb-name-side}
@keyframes wb-name-in{from{opacity:0;translate:0 10px}}
@keyframes wb-name-side{from{opacity:0}}

.wb-body{position:relative;z-index:1;display:grid;grid-template-rows:1fr}
/* A fixed width stops the copy re-wrapping while the panel widens: 5/11 of the row left after six gaps and seven paddings. */
.wb-body-in{min-height:0;overflow:hidden;width:min(480px,calc((100cqw - 396px) * .45))}
.wb-live .wb-body{grid-template-rows:0fr;transition:grid-template-rows .6s cubic-bezier(.65,0,.35,1)}
.wb-live .wb-panel.is-active .wb-body{grid-template-rows:1fr}
.wb-heading{margin:10px 0 6px;font-size:clamp(22px,2vw,30px);font-weight:600;line-height:1.35;color:#fff}
.wb-text{margin:0;font-size:15px;line-height:1.8;color:#ffe9f1}
.world-board .wb-save{display:inline-flex;flex-direction:row;align-items:center;gap:8px;min-height:46px;margin-top:16px;padding:0 20px;border-radius:999px;background:#fff;color:#7d163f;font-size:15px;font-weight:600;box-shadow:0 8px 20px #3c0b2433;transition:background-color .25s,color .25s,transform .3s cubic-bezier(.3,1.6,.5,1)}
.world-board .wb-save .save-symbol{font:20px/1 Arial,Helvetica,sans-serif;color:#df004c}
.world-board .wb-save:hover{transform:scale(1.04)}
.world-board .wb-save[aria-pressed=true]{background:#df004c;color:#fff}
.world-board .wb-save[aria-pressed=true] .save-symbol{color:#fff}
/* Body lines rise in one after another once the panel has room. */
.wb-live .wb-body-in>*{opacity:0;translate:0 16px;transition:opacity .3s,translate .3s}
.wb-live .wb-panel.is-active .wb-body-in>*{opacity:1;translate:none;transition:opacity .5s .3s,translate .6s .3s cubic-bezier(.2,.8,.2,1)}
.wb-live .wb-panel.is-active .wb-text{transition-delay:.38s}
.wb-live .wb-panel.is-active .wb-save{transition:opacity .5s .46s,translate .6s .46s cubic-bezier(.2,.8,.2,1),background-color .25s,color .25s,transform .3s cubic-bezier(.3,1.6,.5,1)}

/* Smaller laptops give the open panel a bigger share so its copy keeps a comfortable measure. */
@media(min-width:901px) and (max-width:1200px){
  .wb-panel.is-active{--grow:7}
  .wb-body-in{width:calc((100cqw - 396px) * .53)}
}

.wb-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 20px;margin-top:14px;padding-inline:6px;font-size:13px;color:#924060}
.wb-foot p{margin:0}
.wb-foot button{min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:4px}

/* Without the script every panel shows its full story as a simple grid. */
.world-board:not(.wb-live) .wb-panels{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));height:auto}
.world-board:not(.wb-live) .wb-panel{min-height:420px}
.world-board:not(.wb-live) .wb-body-in{width:auto}

/* Calm states */
.motion-paused .ms-sticker,.motion-paused .ms-spark{animation:none}
@media(prefers-reduced-motion:reduce){.ms-sticker,.ms-spark{animation:none}.ms-choices button{transition:none}}
.motion-paused :is(.wb-panel,.wb-photo,.wb-body,.wb-body-in>*,.wb-chip),.motion-paused .wb-name{transition:none!important;animation:none}
@media(prefers-reduced-motion:reduce){:is(.wb-panel,.wb-photo,.wb-body,.wb-body-in>*,.wb-chip),.wb-name{transition:none!important;animation:none}}

/* ---------- Tablet and phone: everything stacks inside one screen ---------- */
@media(max-width:900px){
  .world-stage.mood-stage{grid-template-columns:minmax(0,1fr);grid-template-areas:"copy" "window" "detail" "choices";grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px;height:calc(100svh - 84px);margin:0 10px;padding:20px 14px 30px;border-radius:24px;text-align:center}
  .world-stage.mood-stage::after{left:24px;right:24px;bottom:12px;height:5px}
  .ms-copy{align-items:center;gap:6px}
  .ms-copy .ms-eyebrow{text-align:center;font-size:12px}
  .ms-copy .section-title,html[dir=ltr] .ms-copy .section-title{font-size:clamp(26px,7vw,40px);text-align:center}
  .ms-lead,.ms-copy .button{display:none}
  .ms-window{align-self:center;width:min(56vw,24svh,300px)}
  .ms-arch{border-width:7px}
  .ms-sticker{width:clamp(70px,20vw,110px);inset-inline-end:-30%}
  .ms-count{inset-inline-start:-30%;top:10px;padding:6px 11px;font-size:12px}
  .ms-spark-2{inset-inline-start:-26%}
  .ms-detail{min-height:0}
  .ms-heading{font-size:18px;margin-block:2px}
  .ms-text{display:none}
  /* The seven choices become one flip card: only the current world shows, and scrolling turns the deck.
     Passed worlds flip away upwards, upcoming ones wait folded below, so scrolling back flips the other way. */
  .ms-choices{display:grid;justify-items:center;justify-self:center;perspective:700px}
  .ms-choices button,html[dir=rtl] .ms-choices button{grid-area:1/1;min-height:46px;padding:6px 18px 6px 7px;gap:10px;font-size:15px;backface-visibility:hidden}
  .ms-choices button{transition:transform .5s cubic-bezier(.5,0,.75,0),opacity .25s .2s,visibility 0s .5s,background-color .3s,color .3s}
  html[dir=rtl] .ms-choices button{padding:6px 7px 6px 18px}
  .ms-num{width:32px;height:32px;font-size:11px}
  .ms-choices button[aria-pressed=false]{opacity:0;visibility:hidden;pointer-events:none;transform:rotateX(-90deg);transform-origin:50% 0}
  .ms-choices button:has(~ [aria-pressed=true]){transform:rotateX(90deg);transform-origin:50% 100%}
  .ms-choices button[aria-pressed=true]{transform:none;transform-origin:50% 50%;box-shadow:0 12px 24px #df004c40;
    transition:transform .6s .18s cubic-bezier(.3,1.4,.5,1),opacity .2s .18s,visibility 0s,background-color .3s,color .3s}
  .ms-watermark{font-size:26vw;bottom:-.1em;opacity:.55}
}
.motion-paused .ms-choices button{transition:none!important}
@media(max-width:900px) and (prefers-reduced-motion:reduce){.ms-choices button{transition:none!important}}
/* Taller phones and tablets have room for the description too. */
@media(max-width:900px) and (min-height:760px){
  .ms-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:520px;margin-inline:auto;font-size:14px}
}

/* Short phones: tighter type and a slimmer card. */
@media(max-width:900px) and (max-height:700px){
  .ms-copy .ms-eyebrow{display:none}
  .ms-copy .section-title,html[dir=ltr] .ms-copy .section-title{font-size:24px}
  .ms-window{width:min(50vw,22svh)}
  .ms-heading{font-size:16px}
  .ms-choices button,html[dir=rtl] .ms-choices button{min-height:40px;font-size:14px}
  .ms-num{width:28px;height:28px}
}

/* Phones and tablets: the panels stack and open like an accordion. */
@media(max-width:900px){
  .world-board{margin-top:32px}
  .wb-bar{gap:10px;margin-bottom:16px}
  .wb-moods{gap:6px}
  .wb-chip{min-height:44px;padding:4px 14px;font-size:14px}
  .wb-chip:has(.wb-chip-art){padding-inline-start:4px}
  .wb-chip-art{width:34px;height:34px}
  .wb-note{font-size:14px}
  .wb-panels{flex-direction:column;gap:8px;height:auto}
  .wb-panel{flex:none;padding:30px 18px;border-radius:20px;transition:padding .6s cubic-bezier(.65,0,.35,1),opacity .45s,filter .45s}
  .wb-panel.is-active{padding-top:210px;padding-bottom:20px}
  .wb-panel::after{background:#3c0b2470}
  .wb-num{top:50%;translate:0 -50%;inset-inline-start:auto;inset-inline-end:16px}
  .wb-panel.is-active .wb-num{top:16px;translate:none}
  .wb-live .wb-panel:not(.is-active) .wb-name{position:static;writing-mode:horizontal-tb;transform:none;font-size:15px;animation-name:wb-name-in}
  .wb-body-in{width:auto}
  .wb-heading{font-size:21px}
  .wb-text{font-size:14px}
  .wb-foot{justify-content:center;text-align:center;font-size:12px}
  /* Pinned below the header: every panel is a 44px title row that grows by its scroll-driven --open share.
     The row never moves; the photo and story are uncovered beneath it, all following the scroll with no timed transitions. */
  .wb-pinned .wb-panels{position:sticky;top:var(--wb-top,72px);height:calc(100svh - var(--wb-top,72px) - 12px)}
  .wb-pinned .wb-panel,.wb-pinned .wb-panel.is-active{flex:var(--open,0) 0 44px;min-height:0;justify-content:flex-start;padding:13px 18px;transition:opacity .45s,filter .45s}
  .wb-pinned .wb-panel::after,.wb-pinned .wb-panel.is-active::after{background:linear-gradient(180deg,#3c0b2485 0,#3c0b2459 44px,#3c0b2414 40%,#3c0b24e6 100%)}
  .wb-pinned .wb-panel .wb-photo{scale:calc(1.14 - var(--open,0) * .14);transition:none}
  .wb-pinned .wb-panel .wb-num{top:22px;translate:0 -50%}
  .wb-pinned.wb-live .wb-panel .wb-name{position:static;writing-mode:horizontal-tb;transform:none;font-size:15px;line-height:18px;white-space:nowrap;animation:none}
  .wb-pinned .wb-panel .wb-body{position:absolute;inset-inline:18px;bottom:20px;grid-template-rows:1fr;transition:none;
    opacity:clamp(0,calc(var(--open,0) * 2.5 - 1.5),1);translate:0 calc((1 - var(--open,0)) * 32px)}
  .wb-pinned.wb-live .wb-panel .wb-body-in>*{opacity:1;translate:none;transition:none}
}
/* Short phones: the open panel keeps its story to three lines. */
@media(max-width:900px) and (max-height:740px){
  .wb-pinned .wb-heading{font-size:19px;margin-block:6px 4px}
  .wb-pinned .wb-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
  .wb-pinned .wb-save{min-height:42px;margin-top:10px}
}

/* ---------- PinkOut video wall framing ----------
   Replaces the per-cell positions tuned for the earlier stock clips; equal specificity, loaded later. */
.memory-scene :is(.cinema-main,.cinema-side) :is(.cinema-video,.cinema-poster){object-position:center}
.memory-scene .ps-two :is(.cinema-video,.cinema-poster){object-position:40% center}
.memory-scene .cs-5 :is(.cinema-video,.cinema-poster){object-position:center 62%}
.memory-scene .cs-6 :is(.cinema-video,.cinema-poster){object-position:center}
.memory-scene .cs-4 :is(.cinema-video,.cinema-poster){object-position:center}
.memory-scene .ps-one :is(.cinema-video,.cinema-poster){object-position:center}
