.shore-carousel {
  --rail-edge: max(clamp(12px, 1.25vw, 24px), env(safe-area-inset-right));
  --listen-width: clamp(264px, 24vw, 316px);
  position: relative; isolation: isolate; background: rgb(var(--shore-story-rgb));
}
.scene-stack { display: grid; }
.scene-stack > .shore-hero { grid-area: 1 / 1; min-width: 0; }
.scene-stack > .shore-hero[hidden], .scene-dock[hidden] { display: none; }
.scene-stack > .shore-hero[aria-hidden="true"] { opacity: 0; visibility: hidden; pointer-events: none; }
.shore-carousel[data-ready] .shore-hero { transition: opacity .65s ease, visibility 0s; }
.shore-carousel[data-ready] .shore-hero[aria-hidden="true"] { transition-delay: 0s, .65s; }
[data-art="cloud-tide"] #scene-forest-whisper .shore-water { object-position: 65% 52%; }
[data-art="cloud-tide"] #scene-starlit-breeze .shore-water { object-position: 68% 51%; }
.scene-symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.scene-dock {
  position: absolute; z-index: 3; right: var(--rail-edge); top: 53%;
  transform: translateY(-50%);
}
.scene-controls {
  display: grid; gap: 1px; padding: 3px; border-radius: 28px;
  background: linear-gradient(145deg, #ffffff12, transparent 65%), #202429; color: #efeeed;
  border: 1px solid #e5edf33e;
  box-shadow: inset 0 1px 0 #ffffff23, inset 0 -1px 1px #0003, 0 5px 20px #0003;
}
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .scene-controls { background: linear-gradient(145deg, #ffffff12, transparent 65%), rgb(24 28 32 / .75); -webkit-backdrop-filter: blur(18px) saturate(117%); backdrop-filter: blur(18px) saturate(117%); }
}
.scene-controls button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.scene-icon {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round;
}
.scene-choice[aria-pressed="true"] .scene-icon { color: var(--scene-light); }
.scene-controls .scene-choice[aria-pressed="true"] { color: #fff; background: #ffffff1e; border-color: #ffffff37; }
.scene-choice[aria-controls="scene-seaside-nostalgia"] { --scene-light: #efb394; }
.scene-choice[aria-controls="scene-forest-whisper"] { --scene-light: #a3c6a7; }
.scene-choice[aria-controls="scene-starlit-breeze"] { --scene-light: #becdfa; }
.scene-controls button:focus-visible { outline: 2px solid #f4d4ac; outline-offset: 2px; }
@media (min-width: 761px) {
  .shore-carousel .shore-intro { padding-block: 38px 90px; }
}
@media (hover: hover) {
  .scene-controls button:hover { background: #ffffff14; color: #fff; }
}
@media (max-width: 760px) {
  .shore-carousel .shore-type h1 span { display: block; }
  [data-art="cloud-tide"] #scene-forest-whisper .shore-water { object-position: 76% 51%; }
  [data-art="cloud-tide"] #scene-starlit-breeze .shore-water { object-position: 72% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .shore-carousel[data-ready] .shore-hero { transition: none; }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .scene-controls { background: #181b1d; border-color: #959696; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .scene-controls, .scene-controls button { border-color: ButtonText; }
  .scene-controls .scene-choice[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -4px; }
}


/* The expanded player takes its transport artwork from the phone display. */
.shore-carousel .shore-hero {
  --listen-accent: #e4becc;
  --listen-light: #adaadf;
  /* Cool, diffuse skylight from the whitewater and open sky. */
  --hand-light: saturate(.70) brightness(.85);
  --hand-reflections: radial-gradient(ellipse 61% 62% at 83% 22%, rgb(211 237 246 / .30), transparent 90%),
    linear-gradient(157deg, rgb(113 169 194 / .20) 14%, rgb(88 143 164 / .20) 54%, rgb(28 64 83 / .35) 88%);
}
#scene-forest-whisper {
  --listen-accent: #b8deaa; --listen-light: #7cb9a5;
  /* A break in the canopy lights the upper knuckles. Leaves tint the shaded palm. */
  --hand-light: saturate(.76) brightness(.75);
  --hand-reflections: radial-gradient(ellipse 36% 45% at 71% 27%, rgb(225 235 186 / .27), transparent 92%),
    linear-gradient(153deg, rgb(74 115 82 / .17) 20%, rgb(97 136 79 / .19) 58%, rgb(24 49 39 / .39) 91%);
}
#scene-starlit-breeze {
  --listen-accent: #c4c2f5; --listen-light: #8bb9df;
  /* The display lights the fingers nearest its edges. The outer wrist falls into night. */
  --hand-light: saturate(.48) brightness(.37);
  --hand-reflections: radial-gradient(ellipse 17% 43% at 59% 49%, rgb(194 199 219 / .36), transparent 94%),
    radial-gradient(ellipse 11% 30% at 16% 48%, rgb(175 186 209 / .28), transparent 94%),
    linear-gradient(136deg, rgb(95 106 130 / .25), rgb(83 94 115 / .29) 57%, rgb(24 28 39 / .45) 87%);
}
.shore-carousel .listen-unit {
  position: relative; display: flex; width: min(100%, var(--listen-width));
  color: #faf8f6;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
.shore-carousel .listen-face {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr);
  width: 100%; padding: 0; text-align: left;
  color: #faf8f6; border: 1px solid rgb(243 244 255 / .23); border-radius: 26px;
  background: linear-gradient(128deg, rgb(252 241 244 / .07), transparent 56%), #252629;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .11), inset 0 -1px 0 rgb(12 14 18 / .25), 0 6px 22px rgb(6 8 12 / .22);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .shore-carousel .listen-panel.listen-face {
    background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--listen-light) 20%, transparent), transparent 73%), rgb(23 25 30 / .74);
    -webkit-backdrop-filter: blur(19px) saturate(115%); backdrop-filter: blur(19px) saturate(115%);
  }
}
/* A softened patch of the screen art catches in the glass on the phone-facing edge. */
.shore-carousel .listen-panel { isolation: isolate; }
.shore-carousel .listen-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: var(--scene-reflection) center / cover no-repeat;
  mask-image: linear-gradient(105deg, transparent 16%, rgb(0 0 0 / .50) 68%, black 100%);
  opacity: .20;
}

.shore-carousel .listen-surface {
  display: grid; grid-template-columns: minmax(0,1fr); gap: 11px;
  width: 100%; margin: 0; padding: 13px 16px 11px; border: none; border-radius: 25px 25px 0 0;
  background: transparent; color: inherit; box-shadow: none; font-family: inherit; text-align: left;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.preset-download {
  display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 3px 16px; margin: 0;
  color: #f1eeee; border-top: 1px solid #ffffff20; border-radius: 0 0 25px 25px;
  font-size: .82rem; font-weight: 500; text-decoration: none;
}
.scene-download-label { display: grid; gap: 2px; padding-block: 4px; }
.scene-download-label small { font-size: .72rem; font-weight: 400; color: #c5c7c8; }
.preset-download::before {
  content: ""; width: 17px; height: 17px; flex: none; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v12m-4-4 4 4 4-4M7 7H5a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.preset-pro { margin-left: auto; padding: 3px 6px; border-radius: 4px; color: #ffd2ae; background: rgb(255 106 26 / .12); font: 600 11px/1.15 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.shore-carousel .listen-unit:has(.sample-button:not([hidden])) .sample-caption { display: none; }
.shore-carousel a.preset-download:focus-visible, .shore-carousel .sample-button.listen-surface:focus-visible { outline: 2px solid #fff0dc; outline-offset: 2px; }
.listen-head { display: flex; align-items: center; gap: 12px; }
.listen-disc {
  flex: none; width: clamp(52px, 4.7vw, 62px); aspect-ratio: 1; border-radius: 50%;
  background-image: var(--screen-ready), var(--screen-playing);
  background-position: 8.995% 74.161%; background-size: 709.677% 1541.935%; background-repeat: no-repeat;
  box-shadow: 0 3px 6px rgb(0 0 0 / .5);
}
.listen-unit[data-state="playing"] .listen-disc { background-image: var(--screen-playing); }
.listen-label { display: grid; gap: 3px; }
.listen-name { font-size: 1.075rem; line-height: 1.15; font-weight: 480; letter-spacing: -.025em; }
.listen-status { font-size: .86rem; line-height: 1.2; font-weight: 400; color: #d2d3d5; }
.listen-preview { display: flex; align-items: center; gap: 9px; font-size: .74rem; line-height: 16px; color: #e0dfe1; font-weight: 450; }
.listen-track {
  flex: 1; height: 4px; overflow: hidden; border-radius: 3px;
  background: #0e1011; box-shadow: 0 1px 0 rgb(255 255 255 / .12);
}
.listen-fill { display: block; width: var(--played, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--listen-accent), var(--listen-light)); }
.listen-time { min-width: 3.3ch; text-align: right; font-variant-numeric: tabular-nums; }
/* The hand and display share a pose, with the scene fade painted between them. */
.handheld-stage {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.handheld, .handheld-light {
  position: absolute; left: 68%; bottom: -2%; height: clamp(368px, 59%, 525px); aspect-ratio: 1024 / 1536;
  transform: translateX(-44%) rotate(-5deg); transform-origin: 43% 66%;
}
.handheld { z-index: 2; }
.handheld-light { isolation: isolate; }
.handheld-photo, .phone-display :is(img, video, canvas) {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none;
}
.handheld-photo { object-fit: contain; filter: var(--hand-light); }
.handheld-light::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--hand-reflections);
  mix-blend-mode: hard-light;
  /* Use the photograph’s own alpha so light never spills onto the landscape. */
  -webkit-mask: url("/seaside-assets/handheld-listen.webp") center / contain no-repeat;
  mask: url("/seaside-assets/handheld-listen.webp") center / contain no-repeat;
}
.phone-display {
  position: absolute; left: 16.1133%; top: 1.9531%; width: 45.7031%; height: 62.7604%;
  overflow: hidden; isolation: isolate; border-radius: 12.6% / 6.1%; background: #0a0b0e;
}
.phone-display :is(img, video) { object-fit: fill; }
.phone-screen-playing { opacity: 0; }
.shore-hero[data-playing]:not([data-film-player]) .phone-screen-playing { opacity: 1; }
/* The poster is frame zero. Keep the same video surface visible when paused. */
.phone-screen-film, .phone-screen-surface, .phone-idle-controls { visibility: hidden; pointer-events: none; }
[data-film-player] .phone-screen-film,
[data-film-player] .phone-screen-surface[data-painted],
[data-film-player] .phone-screen-film:not([data-frame-visible]) ~ .phone-idle-controls { visibility: visible; }
.phone-transport {
  position: absolute; z-index: 1; left: 4%; top: 66%; width: 92%; height: 14%; cursor: pointer;
  min-height: 44px;
}
.shore-hero:has(.sample-button:not([hidden])) .phone-transport { pointer-events: auto; }
[data-art="cloud-tide"] .shore-carousel .shore-hero::after {
  z-index: 1; height: clamp(170px, 33%, 270px);
}
.shore-carousel .listen-unit .sample-audio { width: 100%; }
.shore-carousel .listen-unit .sample-error { color: white; padding: 6px 10px; border-radius: 10px; background: #191b20; }
@media (hover: hover) {
  .shore-carousel .sample-button.listen-surface:hover, .shore-carousel a.preset-download:hover { background: rgb(255 255 255 / .06); }
}
.shore-carousel .sample-button.listen-surface:active .listen-disc { translate: 0 1px; filter: brightness(.91); }
@media (min-width: 761px) {
  .shore-carousel .shore-type { width: clamp(275px, 34vw, 385px); }
  .shore-carousel .shore-type > p { margin-bottom: 1.45rem; }
}
@media (max-width: 760px) {
  .shore-carousel { --photo-height: clamp(410px, 104vw, 500px); }
  [data-art="cloud-tide"] .shore-carousel .shore-hero {
    display: flex; flex-direction: column; min-height: 0; background: rgb(var(--shore-story-rgb));
  }
  [data-art="cloud-tide"] .shore-carousel .shore-water { height: var(--photo-height); }
  [data-art="cloud-tide"] .shore-carousel .shore-hero::before {
    height: var(--photo-height); background: linear-gradient(180deg, #080b108c, transparent 36%);
  }
  [data-art="cloud-tide"] .shore-carousel .shore-hero::after {
    top: calc(var(--photo-height) * .65); bottom: auto; height: calc(var(--photo-height) * .35 + 1px);
  }
  .handheld-stage {
    position: relative; inset: auto; order: 0; height: var(--photo-height); width: 100%; flex: none;
  }
  .handheld, .handheld-light { height: clamp(312px, 70%, 354px); bottom: -3%; left: 49%; }
  .scene-dock { top: calc(var(--photo-height) * .53); }
  [data-art="cloud-tide"] .shore-carousel .shore-hero .shore-intro { order: 1; padding-block: 8px 32px; }
  .shore-carousel .shore-type h1 { font-size: clamp(2.8rem, 10.5vw, 4rem); line-height: 1; }
  .shore-carousel .shore-type h1 span { display: inline; }
  .shore-carousel .shore-type > p { margin: .75rem 0 1.1rem; max-width: 42ch; }
  .shore-carousel .listen-unit { width: min(100%, 316px); }
}
/* A short phone held sideways has room beside the handset for the scene story. */
@media (min-width: 520px) and (max-width: 980px) and (max-height: 480px) and (orientation: landscape) {
  [data-art="cloud-tide"] .shore-carousel .shore-hero {
    display: grid; align-items: start; min-height: max(100svh, 345px); padding-top: 0;
  }
  [data-art="cloud-tide"] .shore-carousel .shore-water,
  [data-art="cloud-tide"] .shore-carousel .shore-hero::before,
  .shore-carousel .handheld-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  [data-art="cloud-tide"] .shore-carousel .shore-hero::before {
    display: block;
    background: linear-gradient(90deg, rgb(5 12 16 / .9), rgb(5 12 16 / .73) 38%, transparent 73%);
  }
  [data-art="cloud-tide"] .shore-carousel .shore-hero::after { inset: auto 0 0; height: 31%; }
  [data-art="cloud-tide"] .shore-carousel .shore-hero .shore-intro {
    padding-block: clamp(76px, 20svh, 98px) 26px;
  }
  .shore-carousel .shore-type { width: min(54%, 420px); }
  .shore-carousel .shore-type h1 { font-size: clamp(2.1rem, 5.4vw, 3rem); line-height: 1; }
  .shore-carousel .shore-type h1 span { display: inline; }
  .shore-carousel .shore-type > p {
    max-width: 37ch; margin: .65rem 0 .8rem; font-size: 1rem; line-height: 1.36;
  }
  .shore-carousel .listen-unit { width: min(100%, 275px); }
  .shore-carousel :is(.handheld, .handheld-light) { left: 73%; bottom: -3%; height: min(77%, 342px); }
  .scene-dock { top: 52%; }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .shore-carousel .listen-panel::before { display: none; }
  .shore-carousel .listen-panel.listen-face { background: #202124; border-color: #9a9b9f; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (forced-colors: active) {
  .shore-carousel .listen-panel::before { display: none; }
  .shore-carousel .listen-panel.listen-face { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .listen-status, .listen-preview { color: ButtonText; }
  .listen-track { border: 1px solid ButtonText; }
  .listen-fill { background: Highlight; }
  .listen-disc { forced-color-adjust: none; }
}
