/* Two real viewport-sized sections. Native touch scrolling snaps; JS only
   normalizes a wheel gesture to one section on desktop. */
html, body { margin: 0; height: 100%; overscroll-behavior-y: none; }
body { overflow: hidden; background: #080809; }
.site.two-screens {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #080809;
}
.site.two-screens::-webkit-scrollbar, .now-playing-card::-webkit-scrollbar { display: none; }
.site.two-screens > .screen {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex: 0 0 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.site.two-screens > .hero.screen,
.site.two-screens > .hero.screen:first-child {
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 20px 20px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site.two-screens .hero .hero-content {
  width: 100%;
  flex: 0 0 auto;
  padding: 0;
}
.site.two-screens .hero .hero-content h1 { max-width: min(100%, 1100px); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.site.two-screens .player-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
           max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: hidden;
  background: #080809;
}
.now-playing-card {
  --player-accent: #b5a0fa;
  width: min(100%, 392px);
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  display: block;
  flex: 0 1 auto;
  padding: 22px 22px 19px;
  border: 1px solid #303034;
  border-radius: 25px;
  background: #151516;
  box-shadow: 0 22px 70px rgba(0,0,0,.24);
  color: #f7f7f7;
  font-size: 14px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.now-playing-card button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.now-playing-card button:focus-visible,
.now-playing-card [role="slider"]:focus-visible,
.now-playing-card input:focus-visible {
  outline: 2px solid #efeff5;
  outline-offset: 3px;
}
.player-top { position: relative; isolation: isolate; display: flex; align-items: center; gap: 30px; min-width: 0; }
.player-vinyl-wrap {
  --record-enter-x: calc(100% + 28px);
  position: relative;
  z-index: 3;
  width: 127px;
  height: 127px;
  flex: 0 0 127px;
  user-select: none;
}
.player-disc {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  outline-offset: 4px;
  transition: transform var(--motion-record) var(--ease-record);
}
.player-disc.is-dragging { cursor: grabbing; }
/* Both records travel the same distance while shrinking out and growing in. */
.player-disc-incoming {
  position: absolute;
  z-index: 2;
  inset: 0;
  transform: translate3d(var(--record-enter-x),0,0) scale(.8);
  transform-origin: center;
  pointer-events: none;
  transition: transform var(--motion-record) var(--ease-record);
}
.player-disc-incoming[hidden] { display: none !important; }
.player-disc-incoming .player-vinyl { pointer-events: none; }
.now-playing-card.is-swapping .player-disc {
  transform: translate3d(calc(-100% - 28px),0,0) scale(.8);
  pointer-events: none;
}
.now-playing-card.is-swapping .player-disc-incoming {
  transform: translate3d(0,0,0);
}
.now-playing-card.is-swap-reset .player-disc,
.now-playing-card.is-swap-reset .player-disc-incoming {
  transition: none !important;
}
.now-playing-card.is-swap-reset .player-disc {
  transform: none;
  opacity: 1;
}

.player-vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #1d1d21 0 3px, #28282e 4px 5px, #202025 6px 8px);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 6px 18px rgba(0,0,0,.5), inset 0 0 0 4px #1e1e22;
  will-change: transform;
}
.player-vinyl:before {
  position: absolute; inset: 11%; content: "";
  pointer-events: none; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.085);
  box-shadow: 0 0 0 8px rgba(255,255,255,.025), 0 0 0 17px rgba(255,255,255,.02);
}
.player-vinyl-label {
  position: absolute; inset: 26%;
  overflow: hidden; border-radius: 50%;
  background: var(--player-accent);
  border: 2px solid rgba(255,255,255,.16);
}
.player-vinyl-label img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.player-spindle {
  position: absolute; z-index: 2; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 5px; height: 5px;
  background: #ededed; border-radius: 50%;
}
.player-tonearm {
  position: absolute;
  z-index: 4;
  height: 102px; width: auto;
  right: -14px; top: -6px;
  pointer-events: none;
  transform: rotate(-8deg);
  transform-origin: 76% 11%;
  transition: transform var(--motion-needle) var(--ease-in-out);
}
/* The needle follows an explicit transport phase, not the audio 'playing'
   state. Playback only starts AFTER this animation has landed. */
.now-playing-card.is-needle-down .player-tonearm { transform: rotate(11deg); }
/* The metadata sits above both moving records. */
.player-track-meta {
  position: relative;
  z-index: 4;
  flex: 1 1 0;
  min-width: 0;
}
/* Hide the passing record behind the text without covering its destination. */
.player-track-meta::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -26px -12px -26px -18px;
  background: linear-gradient(90deg,
    rgb(21 21 22 / 0),
    #151516 18%,
    #151516 100%);
  opacity: 0;
  pointer-events: none;
}
.now-playing-card.is-swapping .player-track-meta::before { opacity: 1; }
.player-track-meta > * {
  transition: opacity 180ms ease, transform 180ms ease;
}
.now-playing-card.is-track-fading .player-track-meta > * {
  opacity: 0;
  transform: translateY(-4px);
}
.player-label-row { display: flex; align-items: end; gap: 8px; }
.player-levels { height: 13px; display: flex; align-items: end; gap: 2px; }
.player-levels i {
  display: block; width: 3px; height: 100%;
  border-radius: 2px;
  background: var(--player-accent);
  transform-origin: bottom;
  transform: scaleY(.16);
  will-change: transform;
}
.player-overline {
  color: #98989e;
  font-size: 10px; line-height: 1.15;
  font-weight: 610; letter-spacing: .095em;
}
.player-track-meta h2 {
  margin: 10px 0 2px;
  font-size: 17px; line-height: 1.22;
  font-weight: 650; letter-spacing: -.025em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #f9f9fa;
}
.player-track-meta p {
  margin: 0;
  font-size: 13px; line-height: 1.35;
  color: #9999a2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-rpm {
  display: inline-block;
  margin-top: 10px;
  color: #797981;
  font: 11px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
  font-variant-numeric: tabular-nums;
}
.player-timeline { margin-top: 22px; }
.player-seek {
  appearance: none;
  display: block; width: 100%; height: 24px; margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  touch-action: pan-x;
  --seek-percent: 0%;
}
.player-seek::-webkit-slider-runnable-track {
  height: 5px; border-radius: 10px;
  background: linear-gradient(to right, var(--player-accent) 0 var(--seek-percent), #414149 var(--seek-percent) 100%);
}
.player-seek::-moz-range-track { height: 5px; border-radius: 10px; background: #414149; }
.player-seek::-moz-range-progress { height: 5px; border-radius: 10px; background: var(--player-accent); }
.player-seek::-webkit-slider-thumb {
  appearance: none; height: 13px; width: 13px;
  margin-top: -4px; border-radius: 50%; border: 0;
  background: #fafafa; opacity: 0;
  transition: opacity .2s ease;
}
.player-seek::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%; background: #fafafa; border: 0;
  opacity: 0;
}
.player-seek:hover::-webkit-slider-thumb,
.player-seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.player-seek:hover::-moz-range-thumb,
.player-seek:focus-visible::-moz-range-thumb { opacity: 1; }
.player-times {
  margin-top: 1px;
  display: flex; justify-content: space-between;
  color: #9898a1;
  font-size: 12px; font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.player-footer {
  display: flex;
  justify-content: center;
  position: relative;
  align-items: center;
  min-height: 58px;
  margin-top: 9px;
}
.player-transport { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.player-icon-button, .player-play-button {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%; background: transparent; color: #c5c5ca;
  transition: background-color var(--motion-press) ease,
    color var(--motion-press) ease,
    transform var(--motion-press) var(--ease-out);
}
.player-icon-button svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) {
  .player-icon-button:hover { background: #29292c; color: #fff; }
}
.player-icon-button:active,
.player-play-button:active { transform: scale(.97); }
.now-playing-card .player-play-button {
  width: 48px; height: 48px; color: #141415;
  background: #f5f5f5;
}
@media (hover: hover) and (pointer: fine) {
  .player-play-button:hover { background: #dfdfe3; }
}
/* One filled Play/Pause SVG: two compatible polygons morph in place. */
.player-play-button .player-play-morph {
  display: block;
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: currentColor;
  stroke: none;
  pointer-events: none;
}
/* Compact morph-popover-style volume control, adapted to vanilla HTML/CSS.
   The trigger occupies one 44px slot; the slider floats over the card
   without moving Play, Previous, Next or the mascot. */
.player-volume {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
}
.now-playing-card .player-volume-trigger {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #aaaab1;
  transition: background-color var(--motion-press) ease,
    color var(--motion-press) ease,
    transform var(--motion-press) var(--ease-out);
}
.player-volume-trigger svg { width: 21px; height: 21px; pointer-events: none; }
.player-volume-trigger[aria-expanded="true"] {
  color: #f6f6f7;
  background: #28282d;
}
@media (hover: hover) and (pointer: fine) {
  .player-volume-trigger:hover {
    color: #f6f6f7;
    background: #28282d;
  }
}
.player-volume-trigger:active { transform: scale(.97); }
.player-volume-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(204px, calc(100vw - 44px));
  padding: 13px 15px 12px;
  border: 1px solid #404046;
  border-radius: 15px;
  background: #242427;
  box-shadow: 0 10px 32px rgb(0 0 0 / .42);
  color: #f2f2f3;
  transform-origin: 22px 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px) scale(.95);
  transition: opacity var(--motion-popover) var(--ease-out),
    transform var(--motion-popover) var(--ease-out),
    visibility 0s linear var(--motion-popover);
}
.player-volume-popover[hidden] { display: none !important; }
.player-volume-popover[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity var(--motion-popover) var(--ease-out),
    transform var(--motion-popover) var(--ease-out),
    visibility 0s linear 0s;
}
.player-volume-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #bcbcc1;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.3;
}
.player-volume-meta output {
  color: #f3f3f5;
  font-variant-numeric: tabular-nums;
}
#player-volume-slider {
  --volume-percent: 12%;
  display: block;
  appearance: none;
  width: 100%;
  height: 30px;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-x;
}
#player-volume-slider[hidden],
.player-volume-meta output[hidden],
.player-volume-device-only[hidden] { display: none !important; }
.player-volume-device-only {
  margin: 9px 0 0;
  color: #bdbdc3;
  font-size: 12px;
  line-height: 1.45;
}
#player-volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--player-accent) 0 var(--volume-percent), #505057 var(--volume-percent) 100%);
}
#player-volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #505057;
}
#player-volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--player-accent);
}
#player-volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #242427;
  border-radius: 50%;
  background: #f7f7f8;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .25);
}
#player-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #242427;
  border-radius: 50%;
  background: #f7f7f8;
}
.now-playing-card .player-mood-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 10px;
  background: transparent;
  color: #aaaab1;
}
@media (hover: hover) and (pointer: fine) {
  .player-mood-button:hover { background: #28282d; }
}
.player-mood-button:active { transform: translateY(-50%) scale(.97); }
.player-mood-mascot { display: block; width: 35px; height: 35px; }
.player-mood-body { fill: var(--player-accent); transition: fill .25s ease; }
.player-mood-eye { fill: none; stroke: #131319; stroke-linecap: round; stroke-linejoin: round; }
.player-mood-eye-rotation, .player-mood-blink { transform-box: view-box; transform-origin: 0 0; }
.player-mood-button span { display: none; }
.player-status { margin: 10px 0 0; color: #e3b3ba; font-size: 11px; line-height: 1.3; }
.player-status:empty { display: none; }
.player-screen:focus { outline: none; }
@media (max-width: 700px) {
  .site.two-screens > .hero.screen { padding: 16px 15px; }
  .now-playing-card { width: min(100%, 372px); padding: 20px 18px 17px; }
  /* Keep a real clearance for the tonearm, not merely a flex gap
     between the vinyl box and text. The stylus extends past the disc. */
  .player-top { gap: clamp(32px, 7vw, 38px); }
  .player-vinyl-wrap { width: 104px; height: 104px; flex-basis: 104px; }
  .player-tonearm { height: 90px; right: 4px; }
  .player-track-meta h2 { font-size: 16px; }
}
@media (max-width: 360px) {
  .now-playing-card { padding: 17px 15px 14px; border-radius: 22px; }
  .player-vinyl-wrap { width: 94px; height: 94px; flex-basis: 94px; }
  .player-top { gap: 30px; }
  .player-tonearm { height: 80px; right: 4px; }
  .player-track-meta h2 { font-size: 15px; }
  .player-track-meta p { font-size: 12px; }
  .player-overline { font-size: 9px; }
  .player-timeline { margin-top: 14px; }
}
@media (max-height: 570px) {
  .now-playing-card { padding-top: 13px; padding-bottom: 12px; }
  .player-timeline { margin-top: 12px; }
  .site.two-screens > .hero.screen { padding: 5px 16px; }
  .site.two-screens .hero .hero-content { transform: scale(.89); }
}
@media (prefers-reduced-motion: reduce) {
  .player-volume-popover { 
    transform: none !important;
    transition: opacity 120ms var(--ease-out), visibility 0s linear 120ms !important;
  }
  .player-volume-popover[data-open="true"] {
    transition: opacity 120ms var(--ease-out), visibility 0s linear 0s !important;
  }
  .player-volume-trigger, .player-mood-button { transition: none !important; }
  .site.two-screens { scroll-behavior: auto; }
  .player-tonearm, .player-mood-body, .player-icon-button, .player-play-button,
  .player-disc, .player-disc-incoming {
    transition: none !important;
  }
  .player-track-meta > * { transition: none !important; }
  .player-icon-button:active,
  .player-play-button:active,
  .player-volume-trigger:active { transform: none !important; }
  .player-mood-button:active { transform: translateY(-50%) !important; }
  .player-levels i, .player-vinyl { will-change: auto; }
}

/* Three-section page index, DesignBookmark Pagination Dots spring geometry.
   The active pill has independent leading/trailing edge springs in JS. */
.screen-pagination {
  --page-step: 36px;
  --active-page: 0;
  position: fixed;
  z-index: 80;
  top: 50%;
  right: max(24px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36px;
  transform: translateY(-50%);
  isolation: isolate;
}
.screen-pagination__button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 var(--page-step);
  width: 36px;
  height: var(--page-step);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.screen-pagination__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  transition: background-color 180ms ease, transform 180ms var(--ease-out);
}
.screen-pagination__active {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  width: 8px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  pointer-events: none;
  will-change: transform, height;
  transform: translate3d(-50%, calc((var(--page-step) - 20px) / 2 + var(--active-page) * var(--page-step)), 0);
}
@media (hover: hover) and (pointer: fine) {
  .screen-pagination__button:hover .screen-pagination__dot {
    background: rgba(255, 255, 255, .84);
    transform: scale(1.25);
  }
}
.screen-pagination__button:focus-visible {
  outline: 2px solid #f8f8f9;
  outline-offset: -3px;
  border-radius: 12px;
}
@media (max-width: 700px) {
  .screen-pagination { right: max(7px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  .screen-pagination__active,
  .screen-pagination__dot { transition: none !important; }
}

/* Mobile: native horizontal swipe tracks the finger and snaps on release.
   Vertical swipes continue to navigate through the JS gesture shortcut.
   Keep both native axes available for scrollable player/legal content. */
@media (max-width: 700px) {
  .site.two-screens {
    display: flex;
    flex-direction: row;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: auto;
  }
  .site.two-screens > .screen {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    scroll-snap-align: start;
  }
  /* The indicator is fixed at the top on every page. Keep player controls
     clear of both the top pager and the device's bottom safe area. */
  .site.two-screens .player-screen {
    padding-top: max(62px, calc(54px + env(safe-area-inset-top)));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .screen-pagination {
    --page-step: 44px;
    flex-direction: row;
    width: auto;
    height: 44px;
    top: max(12px, env(safe-area-inset-top));
    right: auto;
    left: 50%;
    bottom: auto;
    transform: translateX(-50%);
  }
  .screen-pagination__button {
    flex: 0 0 var(--page-step);
    width: 44px;
    height: 44px;
  }
  .screen-pagination__active {
    top: 50%;
    left: 0;
    width: 20px;
    height: 8px;
    will-change: transform, width;
    transform: translate3d(calc((var(--page-step) - 20px) / 2 + var(--active-page) * var(--page-step)), -50%, 0);
  }
}
