/* =====================================================================
   Ilha play layer: video hero, Sol the talking sun, illustrations,
   loaders, exit feedback, dress quiz, tide gauge, recently viewed, 404.
   Palette only: Near Black, Butter, Mint, Teal, plus white.
   ===================================================================== */

/* ---------- Home hero: the edit ----------
   Butter field, one huge headline, three films on a strict grid. Nothing decorative: the films carry it.
   The big frame is always 9:16; the two small frames stack to exactly its height. */
.hx {
  --hero-h: clamp(600px, calc(100svh - var(--header-h) - var(--announce-h)), 960px);
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));   /* same side line as .wrap and the header */
  --pad-t: clamp(24px, 4.4vh, 48px);
  --pad-b: calc(var(--wave-h) + clamp(20px, 3.6vh, 40px));
  --gap: clamp(10px, 1vw, 16px);
  --tile-h: calc(var(--hero-h) - var(--pad-t) - var(--pad-b));
  --main-w: calc(var(--tile-h) * 9 / 16);
  --small-w: calc((var(--tile-h) - var(--gap)) / 2 * 9 / 16);
  --films-w: calc(var(--main-w) + var(--gap) + var(--small-w));
  --copy-gap: clamp(32px, 4vw, 72px);
  --copy-w: calc(100vw - 2 * var(--edge) - var(--films-w) - var(--copy-gap));
  --t: clamp(56px, min(calc(var(--copy-w) / 3.98), calc(var(--hero-h) * .25)), 216px);
  position: relative; isolation: isolate; overflow: clip; overflow-clip-margin: 2px;
  height: var(--hero-h); padding: var(--pad-t) 0 var(--pad-b);
  background: var(--butter); color: var(--near-black);
  display: grid; grid-template-columns: var(--edge) minmax(0, 1fr) var(--films-w) var(--edge); grid-template-rows: minmax(0, 1fr);
}

/* copy column: kicker on the top line of the films, headline and buttons on their bottom line */
.hx__copy { grid-column: 2; display: flex; flex-direction: column; justify-content: space-between; padding-right: var(--copy-gap); min-width: 0; container-type: size; }

/* the film index: a quiet table of contents, synced with the big frame */
.hx__index { width: min(100%, 440px); }
.hx__ihead { margin: 0 0 14px; font-size: 13px; }
.hx__rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid rgba(39, 39, 37, .22); }
.hx__row { position: relative; width: 100%; min-height: 48px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0; border: 0; border-top: 1px solid rgba(39, 39, 37, .22); background: none; color: rgba(39, 39, 37, .7); text-align: left; cursor: pointer; transition: color .3s var(--ease); }
.hx__row:hover, .hx__row.is-on { color: var(--near-black); }
.hx__num { font: 700 13px/1 var(--head); letter-spacing: var(--track-label); }
.hx__rname { font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: var(--track-label); transition: transform .4s var(--ease-out); }
.hx__row:hover .hx__rname { transform: translateX(6px); }
.hx__meta { font-size: 14px; line-height: 1; white-space: nowrap; }
.hx__rbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; display: none; }
.hx__row.is-on .hx__rbar { display: block; }
.hx__rbar i { display: block; height: 100%; background: var(--near-black); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
/* not enough height for the index next to the headline: leave the top quiet */
@container (max-height: 580px) { .hx__index { visibility: hidden; } }
.hx__title { margin: 0; font-size: var(--t); line-height: .86; letter-spacing: var(--track-display); }
.hx__line { display: block; white-space: nowrap; clip-path: inset(-30% -6% 0 -6%); }
.hx__the { display: inline-block; font-size: .34em; line-height: 1; letter-spacing: -0.04em; text-transform: lowercase; margin-left: .1em; }
.hx__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-top: clamp(20px, 3.2vh, 36px); }
.hx__lede { flex: 1 1 0; min-width: 220px; margin: 0; max-width: 34ch; font-size: 16px; line-height: 1.45; }
.hx__cta { flex: none; display: flex; flex-wrap: wrap; gap: 12px; }
/* too narrow for the line and both buttons side by side: the buttons win */
@container (max-width: 640px) { .hx__lede { display: none; } }

/* the films */
.hx__films { grid-column: 3; position: relative; display: grid; grid-template-columns: var(--main-w) var(--small-w); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--gap); height: var(--tile-h); }
.hx__tile { position: relative; margin: 0; overflow: hidden; background: var(--near-black); min-width: 0; }
.hx__tile[data-slot="main"] { grid-column: 1; grid-row: 1 / 3; }
.hx__tile[data-slot="a"] { grid-column: 2; grid-row: 1; }
.hx__tile[data-slot="b"] { grid-column: 2; grid-row: 2; }
.hx__tile img, .hx__tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform 1.2s var(--ease-out), opacity .5s var(--ease); }
.hx__tile video { z-index: 1; opacity: 0; }
.hx__tile.is-live video { opacity: 1; }
.hx__tile:hover img, .hx__tile:hover video { transform: scale(1.04); }

/* captions: the big frame names the dress and its price; a small frame offers to play here */
.hx__cap { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px; display: flex; }
.hx__shop, .hx__chip { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border-radius: var(--pill); background: var(--near-black); color: var(--butter); font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: var(--track-label); white-space: nowrap; transition: background-color .25s var(--ease), color .25s var(--ease); }
.hx__shop:hover, .hx__pick:hover .hx__chip, .hx__pick:focus-visible .hx__chip { background: var(--butter); color: var(--near-black); }
.hx__price { font-weight: 400; opacity: .8; }
.hx__dot { width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
/* a small frame is one big button: press anywhere on it to bring that film into the big frame */
.hx__pick { position: absolute; inset: 0; z-index: 3; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.hx__chip { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); gap: 8px; padding: 0 12px; }
.hx__tile { container-type: inline-size; }
/* a narrow frame shows just the play mark, centred, rather than a cut-off name */
@container (max-width: 170px) {
  .hx__chip { left: 50%; bottom: 10px; translate: -50% 0; width: 40px; padding: 0; justify-content: center; }
  .hx__chip .hx__name { display: none; }
}
.hx__tile[data-slot="main"] .hx__pick, .hx__tile:not([data-slot="main"]) .hx__shop { display: none; }
.hx__tile:not([data-slot="main"]) .hx__cap { position: static; }

/* playback line along the bottom of the big frame */
.hx__bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(39, 39, 37, .35); }
.hx__bar i { display: block; height: 100%; width: 100%; background: var(--butter); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hx__tile:not([data-slot="main"]) .hx__bar { display: none; }

.hx__pause { position: absolute; z-index: 4; top: 12px; left: calc(var(--main-w) - 56px); }
.vhero__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: var(--pill); background: var(--near-black); color: var(--butter); transition: background-color .25s, color .25s; }
.vhero__btn:hover, .vhero__btn[aria-pressed="true"] { background: var(--butter); color: var(--near-black); }
.vhero__btn svg { width: 14px; height: 14px; }
.hx > .wave-edge { --wave-fill: var(--sea-deep); z-index: 5; }

/* Phones, tablets and tall screens: headline, then the films, then the buttons */
@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  .hx {
    --t: min(calc((100vw - 2 * var(--gutter)) / 4.2), 132px);
    --pad-t: clamp(18px, 4vw, 32px);
    --pad-b: calc(var(--wave-h) + 24px);
    height: auto; row-gap: clamp(16px, 3vw, 24px);
    grid-template-columns: var(--gutter) minmax(0, 1fr) var(--gutter); grid-template-rows: auto auto auto;
  }
  .hx__copy, .hx__lead { display: contents; }
  .hx__index, .hx__lede { display: none; }
  .hx__title { grid-column: 2; grid-row: 1; }
  .hx__films { grid-column: 2; grid-row: 2; justify-self: center; width: min(100%, calc(48svh / 1.1)); height: auto; aspect-ratio: 1 / 1.1; grid-template-columns: minmax(0, 1fr) 30%; }
  .hx__foot { grid-column: 2; grid-row: 3; margin-top: 0; }
  .hx__cta { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hx__cta .btn { padding-inline: 12px; }
  .hx__pause { left: auto; right: calc(30% + var(--gap) + 10px); top: 10px; }
  .hx__cap { left: 10px; right: 10px; bottom: 10px; }
  .hx__shop { gap: 8px; padding: 0 14px; }
}
/* Tablets in portrait: the grid runs the full text width so every left edge lines up */
@media (max-width: 900px) and (min-width: 600px), (max-aspect-ratio: 4/5) and (min-width: 600px) {
  .hx__films { width: 100%; aspect-ratio: auto; height: min(calc((100vw - 2 * var(--gutter)) * .8), 50svh); grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .hx__pause { right: calc(40% + 10px); }
  .hx__cta { flex: 0 1 auto; display: flex; }
  .hx__cta .btn { padding-inline: 28px; }
}

/* ---------- Sol, the talking sun ---------- */
.sol { width: 100%; height: 100%; overflow: visible; display: block; }
.sol__rays { transform-origin: 60px 60px; animation: spin 26s linear infinite; }
.sol__eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
.sol__pupils { transition: transform .18s linear; }
.sol__shades { opacity: 0; transform: translateY(-16px); transition: opacity .35s, transform .5s var(--ease-out); }
.sol.is-cool .sol__shades { opacity: 1; transform: none; }
.sol__talk { opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-talking .sol__smile { opacity: 0; }
.is-talking .sol__talk { opacity: 1; animation: talk .22s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

.sol-dock { position: fixed; left: 18px; bottom: 18px; z-index: 66; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; transition: bottom .35s var(--ease), transform .6s var(--ease-out), opacity .4s, visibility .6s; }
.sol-dock.is-away { opacity: 0; visibility: hidden; transform: translateY(40px) scale(.6); transform-origin: 0 100%; }
.sol-btn { pointer-events: auto; width: 76px; height: 76px; flex: none; border-radius: 50%; transition: transform .45s var(--ease-out), width .35s, height .35s; filter: drop-shadow(0 10px 14px rgba(39, 39, 37, .22)); }
.sol-btn:hover { transform: scale(1.08) rotate(-8deg); }
.sol-btn:focus-visible { outline: 2px solid var(--near-black); outline-offset: 4px; }
.sol-dock.is-quiet .sol-btn { width: 50px; height: 50px; }
.sol-bubble { pointer-events: none; position: relative; width: max-content; max-width: min(310px, calc(100vw - 120px)); margin-bottom: 46px; background: var(--white); color: var(--near-black); border: 1.5px solid var(--near-black); border-radius: 22px 22px 22px 6px; padding: 14px 42px 14px 16px; font-size: 16px; line-height: 1.4; box-shadow: 0 22px 40px -24px rgba(39, 39, 37, .55); transform-origin: 0 100%; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.7); transition: opacity .3s, visibility .3s, transform .5s var(--ease-out); }
.sol-bubble.is-open { pointer-events: auto; opacity: 1; visibility: visible; transform: none; }
.sol-bubble__x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.sol-bubble__x:hover { background: var(--mint); }
.sol-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sol-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--pill); border: 1.5px solid var(--near-black); font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: var(--track-label); transition: background-color .2s, color .2s; }
.sol-chip:hover, .sol-chip:focus-visible { background: var(--near-black); color: var(--butter); }
body:has(.sticky-buy.is-on) .sol-dock { bottom: 96px; }
@media (max-width: 720px) {
  .sol-dock { left: 10px; bottom: 80px; }
  .sol-btn { width: 60px; height: 60px; }
  .sol-dock.is-quiet .sol-btn { width: 44px; height: 44px; }
  .sol-bubble { margin-bottom: 40px; max-width: calc(100vw - 96px); font-size: 15px; }
  body:has(.sticky-buy.is-on) .sol-dock { bottom: 150px; }
}

/* ---------- Illustration stickers ---------- */
.art { display: block; width: 100%; height: auto; overflow: visible; }
.sticker { position: absolute; z-index: 5; width: var(--s, 110px); transition: transform .7s var(--ease-out); }
.sticker:hover { transform: rotate(-12deg) scale(1.1); }
.sticker--bob .art { animation: bob 5.5s ease-in-out infinite alternate; }
.has-art { position: relative; }
.art-inline { display: inline-block; width: 1.2em; vertical-align: -.2em; }

/* Paper boat sailing on the tides wave */
.boat-sail { position: absolute; z-index: 5; bottom: calc(var(--wave-h) * .35); left: 0; width: clamp(48px, 5vw, 76px); animation: sail 34s linear infinite; pointer-events: none; }
.boat-sail .art { animation: rock 3.2s ease-in-out infinite alternate; transform-origin: 50% 80%; }
@keyframes sail { from { transform: translateX(-12vw); } to { transform: translateX(108vw); } }
@keyframes rock { from { rotate: -6deg; } to { rotate: 6deg; } }

/* Crab walking along the footer shore as you scroll */
.crab-walk { position: absolute; z-index: 3; left: 0; bottom: 30%; width: clamp(54px, 5vw, 80px); transform: translateX(calc(var(--cx, 0) * (100vw - 90px))); pointer-events: none; }
.crab-walk .art { animation: scuttle .35s ease-in-out infinite alternate; }
.crab-walk.is-still .art { animation: none; }
@keyframes scuttle { from { rotate: -4deg; translate: 0 0; } to { rotate: 4deg; translate: 0 -3px; } }

/* ---------- Tide gauge: the water rises as you scroll, a boat rides it ---------- */
.tidegauge { position: fixed; right: 12px; top: 50%; width: 28px; height: min(36vh, 300px); transform: translateY(-50%); z-index: 61; pointer-events: none; }
.tidegauge__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 4px; background: rgba(133, 163, 163, .28); overflow: hidden; }
.tidegauge__fill { position: absolute; inset: 0; background: var(--sea); transform-origin: 50% 100%; transform: scaleY(var(--p, 0)); }
.tidegauge__boat { position: absolute; left: 0; width: 28px; bottom: calc(var(--p, 0) * 100% - 10px); }
.tidegauge__boat .art { animation: rock 2.6s ease-in-out infinite alternate; transform-origin: 50% 80%; }
@media (max-width: 900px) { .tidegauge { display: none; } }

/* ---------- Pop-ups: message in a bottle (exit feedback) and the dress quiz ---------- */
.pop { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.pop.is-open { visibility: visible; }
.pop__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .4s var(--ease); }
.pop.is-open .pop__scrim { opacity: 1; }
.pop__card { position: relative; width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto; overscroll-behavior: contain; background: var(--white); color: var(--near-black); border-radius: 28px; padding: clamp(24px, 4vw, 40px); opacity: 0; transform: translateY(48px) scale(.96); transition: opacity .35s, transform .6s var(--ease-out); }
.pop.is-open .pop__card { opacity: 1; transform: none; }
.pop--wide .pop__card { width: min(920px, 100%); }
.pop__x { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; z-index: 2; }
.pop__x:hover { background: var(--mint); }
.pop__x svg { width: 20px; height: 20px; }
.pop__art { display: block; width: 112px; margin: -6px 0 10px; }
.pop__art--center { margin-left: auto; margin-right: auto; }
.pop__eyebrow { font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: var(--track-label); color: var(--near-black); opacity: .7; }
.pop__title { font: 700 clamp(30px, 4.2vw, 46px)/.9 var(--head); text-transform: uppercase; letter-spacing: var(--track-head); margin: 10px 0 10px; }
.pop__lede { font-size: 16px; line-height: 1.5; max-width: 42ch; }
.pop__step { animation: step-in .5s var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
.opts { display: grid; gap: 8px; margin-top: 20px; }
.opts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts--sizes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.opt-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 54px; padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--white); font-size: 16px; line-height: 1.25; transition: border-color .2s, background-color .2s, transform .25s var(--ease-out); }
.opt-card:hover { border-color: var(--near-black); transform: translateY(-2px); }
.opt-card[aria-checked="true"] { background: var(--butter); border-color: var(--near-black); }
.opt-card .art { width: 38px; height: 38px; flex: none; }
.opt-card__dot { width: 20px; height: 20px; margin-left: auto; flex: none; border-radius: 50%; border: 1.5px solid var(--near-black); display: grid; place-items: center; }
.opt-card[aria-checked="true"] .opt-card__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--near-black); }
.opts--grid .opt-card { flex-direction: column; align-items: flex-start; min-height: 120px; padding: 14px; }
.opts--grid .opt-card .art { width: 52px; height: 52px; }
.opts--grid .opt-card__dot { position: absolute; top: 12px; right: 12px; }
.opts--grid .opt-card { position: relative; }
.opts--sizes .opt-card { justify-content: center; text-align: center; font: 700 16px/1 var(--head); min-height: 56px; padding: 0; }
.pop textarea { width: 100%; min-height: 88px; margin-top: 10px; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; resize: vertical; }
.pop textarea:focus { outline: none; border-color: var(--near-black); }
.pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.pop__skip { font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.pop .btn[disabled] { background: transparent; color: rgba(39, 39, 37, .55); box-shadow: inset 0 0 0 1.5px var(--line-strong); border-color: transparent; pointer-events: none; }
.pop__reply { display: grid; gap: 14px; justify-items: start; }
.pop__reply .say { display: flex; gap: 12px; align-items: flex-start; }
.pop__reply .say .sol-face { width: 58px; flex: none; }
.pop__reply .say p { background: var(--mint); border-radius: 18px 18px 18px 6px; padding: 12px 16px; font-size: 16px; line-height: 1.45; }
.quiz-progress { display: flex; gap: 6px; margin-bottom: 4px; }
.quiz-progress i { width: 28px; height: 4px; border-radius: 4px; background: var(--line); transition: background-color .3s; }
.quiz-progress i.is-on { background: var(--near-black); }
.quiz-results { margin-top: 20px; }
.quiz-results .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) {
  .opts--grid { grid-template-columns: minmax(0, 1fr); }
  .opts--grid .opt-card { flex-direction: row; align-items: center; min-height: 64px; }
  .opts--grid .opt-card .art { width: 40px; height: 40px; }
  .opts--grid .opt-card__dot { position: static; }
  .opts--sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz-results .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pop { align-items: end; padding: 0; }
  .pop__card { border-radius: 24px 24px 0 0; max-height: 92svh; }
}

/* ---------- Home: chat band, Sol asks the first quiz question ---------- */
.chat-band { position: relative; overflow: clip; background: var(--white); }
.chat-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.chat-band__text { display: grid; gap: 18px; justify-items: start; position: relative; z-index: 2; }
.chat { position: relative; z-index: 2; display: grid; gap: 14px; background: var(--mint); border-radius: 32px; padding: clamp(20px, 3vw, 36px); }
.chat__row { display: flex; gap: 12px; align-items: flex-end; }
.chat__avatar { width: 64px; flex: none; }
.chat__msg { background: var(--white); border-radius: 22px 22px 22px 6px; padding: 14px 18px; font-size: 17px; line-height: 1.4; box-shadow: 0 14px 30px -24px rgba(39, 39, 37, .6); }
.chat__typing { display: inline-flex; gap: 4px; padding: 16px 18px; background: var(--white); border-radius: 22px 22px 22px 6px; }
.chat__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--near-black); animation: dots 1s ease-in-out infinite; }
.chat__typing i:nth-child(2) { animation-delay: .15s; }
.chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-left: 76px; }
.chat__choices .opt-card { min-height: 60px; }
.chat__choices .opt-card .art { width: 34px; height: 34px; }
.chat-band .sticker--a { --s: clamp(80px, 9vw, 140px); left: -2%; bottom: 8%; }
.chat-band .sticker--b { --s: clamp(70px, 7vw, 110px); right: 2%; top: 10%; }
@media (max-width: 900px) {
  .chat-band__grid { grid-template-columns: minmax(0, 1fr); }
  .chat__choices { padding-left: 0; grid-template-columns: minmax(0, 1fr); }
  .chat-band .sticker--a { display: none; }
}

.chat-band { padding-block: calc(var(--wave-h) + clamp(48px, 6vw, 96px)); overflow-clip-margin: 2px; }
.chat .opt-card { background: var(--white); }
.page-hero__quiz { margin-top: 18px; gap: 10px; }
.page-hero__quiz .art-inline { width: 30px; }
.lost__text .link-arrow { margin-top: 4px; }

/* ---------- Loading states ---------- */
/* Images: a mint card with a white wave of light passing through until the photo lands */
.card__media, .gallery__item, .arch-fig, .print__img, .postcard__img { background-color: var(--mint); }
.card__media:not(.is-loaded)::after, .gallery__item:not(.is-loaded):not([data-video])::after, .arch-fig:not(.is-loaded)::after, .print__img:not(.is-loaded)::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .9) 50%, rgba(255, 255, 255, 0) 65%);
  transform: translateX(-100%); animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
/* Add to bag: confirmed state */
.btn.is-done { background: var(--teal); border-color: var(--teal); color: var(--near-black); }
.btn.is-done svg { display: none; }

/* Preloader: Sol rises out of the sea while the page loads */
.curtain__scene { display: none; width: clamp(150px, 17vw, 230px); aspect-ratio: 1; }
.curtain__scene svg { width: 100%; height: 100%; display: block; overflow: visible; }
.curtain.is-preloader .curtain__scene { display: block; }
.curtain.is-preloader .curtain__flower { display: none; }
.curtain__msg { display: none; min-height: 1.2em; font: 700 14px/1.2 var(--head); text-transform: uppercase; letter-spacing: var(--track-label); }
.curtain.is-preloader .curtain__msg { display: block; }
.curtain.is-preloader .curtain__label { font-size: clamp(40px, 6.4vw, 104px); }

/* Empty states get illustrations */
.empty .art { width: 120px; }

/* ---------- 404: lost at sea ---------- */
.lost { position: relative; overflow: clip; background: var(--mint); min-height: calc(100svh - var(--header-h) - var(--announce-h)); display: grid; align-items: center; padding: clamp(48px, 8vw, 120px) 0 calc(var(--wave-h) + clamp(80px, 10vw, 160px)); }
.lost__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 80px); align-items: center; position: relative; z-index: 2; }
.lost__text { display: grid; gap: 18px; justify-items: start; }
.lost__code { font: 700 clamp(110px, 20vw, 320px)/.78 var(--head); letter-spacing: var(--track-display); }
.lost__scene { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.lost__scene .sol-wrap { position: absolute; width: 46%; right: 4%; top: 2%; }
.lost__scene .bottle-wrap { position: absolute; width: 42%; left: 2%; bottom: 14%; animation: bob 4.5s ease-in-out infinite alternate; }
.lost__scene .boat-wrap { position: absolute; width: 40%; left: 38%; bottom: 30%; animation: bob 5.5s ease-in-out infinite alternate-reverse; }
.lost .wave-edge { --wave-fill: var(--sea); }
.lost__sea { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--wave-h) + 60px); background: var(--sea); }
.lost__sea .wave-edge { bottom: 100%; top: auto; }
@media (max-width: 860px) { .lost__grid { grid-template-columns: minmax(0, 1fr); } .lost__scene { max-width: 340px; } }

/* ---------- Recently viewed ---------- */
.recent .section-head__text .art-inline { width: 46px; vertical-align: middle; margin-left: 8px; }

/* Tab bar labels meet the 13px label minimum */
@media (max-width: 720px) { .tabbar a, .tabbar button { font-size: 13px; } }

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  .sol__rays, .sol__eyes, .is-talking .sol__talk, .boat-sail, .boat-sail .art, .crab-walk .art, .tidegauge__boat .art, .sticker--bob .art, .chat__typing i, .lost__scene > * { animation: none !important; }
  .card__media:not(.is-loaded)::after, .gallery__item:not(.is-loaded)::after, .arch-fig:not(.is-loaded)::after, .print__img:not(.is-loaded)::after { display: none; }
  .pop__card, .sol-bubble { transition: opacity .2s; transform: none; }
  .boat-sail { left: 70%; }
}

/* ---------- Touch: every control gets a 44px target, without changing the look on desktop ---------- */
.card__wish { width: 44px; height: 44px; }
.sol-bubble__x { width: 44px; height: 44px; top: 2px; right: 2px; }
.sol-chip { min-height: 44px; padding: 0 16px; }
.chip sup { font-size: 13px; }
.qty { height: 44px; }
.qty button { width: 44px; }
.line-item__remove { display: inline-block; padding: 12px 0; margin: -12px 0; }
@media (pointer: coarse) {
  .cols button { width: 44px; height: 44px; }
  .swatches { gap: 14px; }
  .swatch { width: 30px; height: 30px; }
  .swatch::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
  .card__quick { display: none; }
  /* no sticky hover states after a tap */
  .card:hover .card__media img, .print:hover .print__img img { transform: none; }
}
.chip { min-height: 44px; }
/* text links keep their look; an invisible pad makes them 44px tall to a finger */
.link-arrow, .card__title a { position: relative; }
.link-arrow::before { content: ""; position: absolute; inset: -9px -4px -10px; }
.card__title a::before { content: ""; position: absolute; inset: -5px 0; }
.toast .btn, .btn--sm { --bh: 44px; }
.search__tags a { min-height: 44px; }
.crumbs a { position: relative; }
.crumbs a::before { content: ""; position: absolute; inset: -11px -6px; }

/* ---------- Nothing hangs off an edge: decorations sit fully inside their sections ---------- */
.letters2 .flower { width: clamp(64px, 7vw, 104px); right: var(--gutter); top: clamp(16px, 2.4vw, 32px); }
.page-hero .flower { width: clamp(72px, 8vw, 120px); right: var(--gutter); top: clamp(20px, 3vw, 40px); bottom: auto; }
.pillar .flower { width: 56px; right: 24px; bottom: 24px; }
.chat-band .sticker--a { left: var(--gutter); }
@media (max-width: 860px) {
  .origin2__media .flower { left: -8px; top: -16px; width: 88px; }
  .pillar { padding-bottom: 96px; }
}
@media (max-width: 720px) {
  .page-hero__sun { right: var(--gutter); width: 96px; }
  .letters2 .flower { width: 44px; top: 12px; }
  /* the filter strip scrolls sideways: fade its edge so the last chip reads as "more", not cut */
  .toolbar__inner { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 40px; }
}
/* Line-by-line heading reveal: room for descenders and the butter highlight inside each line mask */
[data-split="lines"] > div { padding-bottom: 0.22em; margin-bottom: -0.22em; }
/* Sol: smaller on desktop; on phones the tab bar and the "Find my dress" buttons do its job, so it doesn't cover text */
.sol-btn { width: 60px; height: 60px; }
@media (max-width: 900px) { .sol-dock { display: none; } }

/* ---------- Closed panels are fully gone: nothing peeks in, nothing takes keyboard focus ---------- */
.menu:not(.is-open) { visibility: hidden; transition: transform .7s var(--ease-out), visibility 0s linear .7s; }
.menu.is-open { visibility: visible; transition: transform .7s var(--ease-out), visibility 0s; }
.sticky-buy:not(.is-on) { visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
.sticky-buy.is-on { visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
