:root {
  color-scheme: dark;
  --white: #f7fbff;
  --muted: rgba(240, 247, 255, 0.66);
  --dim: rgba(232, 241, 250, 0.42);
  --line: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.09);
  --glass: rgba(11, 19, 40, 0.48);
  --glass-deep: rgba(6, 11, 28, 0.62);
  --accent: #bdeaff;
  --accent-rgb: 189, 234, 255;
  --progress: 0%;
  --volume: 72%;
  --glass-x: 50%;
  --glass-y: 0%;
  --scene-focus-x: 88%;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body[data-scene="sky"] {
  --accent: #dff7ff;
  --accent-rgb: 223, 247, 255;
  --glass: rgba(20, 65, 112, 0.4);
  --glass-deep: rgba(7, 30, 66, 0.56);
  --scene-focus-x: 50%;
}

body[data-scene="cyber"] {
  --accent: #cfb8ff;
  --accent-rgb: 207, 184, 255;
  --glass: rgba(24, 13, 56, 0.5);
  --glass-deep: rgba(8, 7, 28, 0.66);
  --scene-focus-x: 50%;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #070c20;
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

::selection {
  background: rgba(var(--accent-rgb), 0.3);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-170%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scene,
.scene img,
.scene-shade,
#waterCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene {
  z-index: 0;
  overflow: hidden;
  background: #070c20;
  transition: opacity 420ms ease;
}

.scene img {
  object-fit: cover;
  object-position: var(--scene-focus-x) center;
  transform: scale(1.01);
}

#waterCanvas {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

body.webgl-water #waterCanvas {
  opacity: 1;
}

body.webgl-water .scene {
  opacity: 0;
}

body.scene-changing #waterCanvas {
  opacity: 0;
}

body.scene-changing .scene {
  opacity: 1;
}

.scene-shade {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(2, 6, 18, 0.34) 0%, rgba(2, 6, 18, 0.02) 34%, rgba(2, 6, 18, 0.08) 62%, rgba(2, 5, 16, 0.7) 100%),
    radial-gradient(circle at 50% 30%, transparent 0 28%, rgba(2, 5, 17, 0.08) 58%, rgba(1, 3, 11, 0.32) 100%);
  pointer-events: none;
  transition: background 500ms ease;
}

body[data-scene="sky"] .scene-shade {
  background:
    linear-gradient(180deg, rgba(8, 38, 86, 0.2) 0%, rgba(6, 33, 76, 0.02) 40%, rgba(6, 27, 63, 0.08) 66%, rgba(3, 15, 39, 0.68) 100%),
    radial-gradient(circle at 50% 20%, rgba(5, 27, 68, 0.16), transparent 38%);
}

body[data-scene="cyber"] .scene-shade {
  background:
    linear-gradient(180deg, rgba(3, 5, 23, 0.34) 0%, rgba(5, 4, 28, 0.01) 42%, rgba(4, 3, 21, 0.13) 64%, rgba(3, 2, 16, 0.72) 100%),
    radial-gradient(circle at 50% 36%, transparent 0 28%, rgba(5, 2, 25, 0.24) 100%);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 3vw, 46px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.72);
}

.brand b {
  color: #fff;
  font-weight: 720;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.34);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: scale(1.3);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 540;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.76);
  transition: color 160ms ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: #fff;
}

main {
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

.ambient-heading {
  position: absolute;
  top: clamp(92px, 12.5vh, 140px);
  left: 50%;
  width: min(90vw, 760px);
  text-align: center;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.72);
  transform: translateX(-50%);
  pointer-events: none;
}

.world-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: rgba(245, 250, 255, 0.68);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.world-label > span:first-child {
  color: var(--accent);
  font-size: 8px;
  text-shadow: 0 0 14px var(--accent);
}

.ambient-heading h1 {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 560;
  letter-spacing: 0.3em;
}

#sceneClock {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(80px, 9.5vw, 138px);
  font-variant-numeric: tabular-nums;
  font-weight: 250;
  letter-spacing: -0.07em;
  line-height: 1;
}

#sceneDate {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 480;
  letter-spacing: 0.05em;
}

.scene-switcher {
  position: fixed;
  top: 50%;
  left: clamp(22px, 3vw, 46px);
  z-index: 10;
  display: grid;
  gap: 9px;
  transform: translateY(-50%);
}

.scene-option {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  width: 112px;
  min-height: 54px;
  padding: 5px 10px 5px 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 17px;
  background: rgba(7, 12, 28, 0.38);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  transition: width 220ms ease, border-color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.scene-option > span:last-child {
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
}

.scene-thumb {
  width: 46px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
}

.scene-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-option[data-scene-choice="feline"] .scene-thumb img {
  object-position: 76% center;
}

.scene-option:hover,
.scene-option:focus-visible {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.34);
}

.scene-option[aria-pressed="true"] {
  width: 122px;
  border-color: rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.1), 0 12px 34px rgba(0, 0, 0, 0.28), 0 0 24px rgba(var(--accent-rgb), 0.18);
}

.scene-option[aria-pressed="true"] > span:last-child {
  color: #fff;
}

.liquid-player {
  position: absolute;
  right: clamp(24px, 5vw, 84px);
  bottom: clamp(50px, 7vh, 76px);
  left: clamp(24px, 5vw, 84px);
  width: min(900px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 20px 24px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 31px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 38%),
    linear-gradient(160deg, var(--glass), var(--glass-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 22px 70px rgba(0, 4, 18, 0.4),
    0 4px 18px rgba(0, 4, 18, 0.25),
    0 0 40px rgba(var(--accent-rgb), 0.06);
  backdrop-filter: blur(30px) saturate(150%) brightness(0.9);
  -webkit-backdrop-filter: blur(30px) saturate(150%) brightness(0.9);
  isolation: isolate;
}

.liquid-player::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% -15%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.045), transparent 45% 67%, rgba(var(--accent-rgb), 0.06));
  content: "";
  pointer-events: none;
}

.liquid-player::after {
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  content: "";
  opacity: 0.5;
  pointer-events: none;
}

.glass-specular {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, 0.17), transparent 21%);
  opacity: 0.86;
  pointer-events: none;
}

.track-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.artwork {
  position: relative;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: #0a1028;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-focus-x) center;
  transform: scale(1.1);
  transition: opacity 280ms ease;
}

.artwork-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38% 72%, rgba(var(--accent-rgb), 0.1));
  pointer-events: none;
}

.track-copy {
  min-width: 0;
}

.track-copy > p:first-child {
  margin: 0 0 6px;
  color: rgba(242, 247, 253, 0.44);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.track-copy h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.artist span {
  margin: 0 4px;
  color: var(--dim);
}

.open-music {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 580;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.open-music:hover,
.open-music:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.12);
  transform: translateY(-1px);
}

.open-music i {
  color: var(--accent);
  font-style: normal;
  font-size: 14px;
}

.progress-block {
  margin-top: 14px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: rgba(240, 246, 252, 0.44);
  font-family: var(--mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.range {
  --fill: 0%;
  display: block;
  width: 100%;
  height: 18px;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.92) 0 var(--fill), rgba(255, 255, 255, 0.2) var(--fill) 100%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.22);
}

.range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.92) 0 var(--fill), rgba(255, 255, 255, 0.2) var(--fill) 100%);
}

.range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12), 0 0 14px rgba(var(--accent-rgb), 0.5);
  opacity: 0;
  transition: opacity 160ms ease;
}

.range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12), 0 0 14px rgba(var(--accent-rgb), 0.5);
  opacity: 0;
}

.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb,
.range:hover::-moz-range-thumb,
.range:focus-visible::-moz-range-thumb {
  opacity: 1;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  margin-top: 2px;
}

.secondary-controls {
  justify-self: start;
}

.text-control,
.transport button,
.volume-wrap button {
  border: 0;
  background: none;
  cursor: pointer;
}

.text-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  letter-spacing: 0.025em;
}

.ripple-glyph {
  color: var(--accent);
  font-size: 17px;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.55);
}

.text-control[aria-pressed="false"] {
  color: rgba(255, 255, 255, 0.32);
}

.text-control[aria-pressed="false"] .ripple-glyph {
  color: rgba(255, 255, 255, 0.34);
  text-shadow: none;
}

.transport {
  display: flex;
  align-items: center;
  gap: 19px;
}

.transport button,
.volume-wrap button {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  color: rgba(255, 255, 255, 0.78);
  transition: color 160ms ease, transform 160ms ease;
}

.transport button:hover,
.transport button:focus-visible,
.volume-wrap button:hover,
.volume-wrap button:focus-visible {
  color: #fff;
  transform: scale(1.06);
}

.transport button:not(.play) span {
  font-size: 24px;
  line-height: 1;
}

.transport button small {
  position: absolute;
  top: 15px;
  font-size: 7px;
  font-weight: 700;
}

.transport .play {
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0b1025;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), 0 0 28px rgba(var(--accent-rgb), 0.14);
}

.transport .play:hover,
.transport .play:focus-visible {
  transform: scale(1.045);
}

.play-shape {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.pause-shape {
  display: none;
  gap: 4px;
}

.pause-shape i {
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: currentColor;
}

body.is-playing .play-shape {
  display: none;
}

body.is-playing .pause-shape {
  display: flex;
}

.volume-wrap {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
}

.volume-wrap button {
  min-width: 34px;
}

.volume-wrap .volume {
  width: 84px;
}

.player-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 24px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  color: rgba(237, 244, 252, 0.35);
  font-size: 9px;
}

.player-note p {
  margin: 0;
}

.player-note span {
  color: rgba(var(--accent-rgb), 0.54);
  white-space: nowrap;
}

footer {
  position: fixed;
  right: 0;
  bottom: calc(10px + var(--safe-bottom));
  left: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: rgba(235, 242, 249, 0.3);
  font-size: 8px;
  letter-spacing: 0.025em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.9);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .topbar {
    padding: 13px 18px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }

  .topbar nav {
    gap: 18px;
  }

  .ambient-heading {
    top: 72px;
  }

  .world-label {
    margin-bottom: 8px;
    font-size: 8px;
  }

  .ambient-heading h1 {
    font-size: 13px;
  }

  #sceneClock {
    font-size: clamp(72px, 24vw, 96px);
  }

  #sceneDate {
    margin-top: 7px;
    font-size: 11px;
  }

  .scene-switcher {
    top: 224px;
    left: 50%;
    display: flex;
    gap: 7px;
    width: calc(100vw - 28px);
    justify-content: center;
    transform: translateX(-50%);
  }

  .scene-option,
  .scene-option[aria-pressed="true"] {
    grid-template-columns: 34px 1fr;
    width: 104px;
    min-height: 44px;
    padding: 4px 8px 4px 4px;
    border-radius: 14px;
  }

  .scene-option:hover,
  .scene-option:focus-visible {
    transform: translateY(-2px);
  }

  .scene-thumb {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .scene-option > span:last-child {
    margin-left: 5px;
    font-size: 10px;
  }

  .liquid-player {
    right: 14px;
    bottom: calc(43px + var(--safe-bottom));
    left: 14px;
    width: auto;
    padding: 14px 15px 10px;
    border-radius: 27px;
  }

  .track-row {
    grid-template-columns: 56px minmax(0, 1fr) 42px;
    gap: 11px;
  }

  .artwork {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .track-copy > p:first-child {
    margin-bottom: 5px;
    font-size: 6px;
  }

  .track-copy h2 {
    font-size: 19px;
  }

  .artist {
    margin-top: 6px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .open-music {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .open-music span {
    display: none;
  }

  .progress-block {
    margin-top: 10px;
  }

  .control-row {
    min-height: 58px;
  }

  .text-control {
    padding: 0;
  }

  .text-control > span:last-child {
    display: none;
  }

  .ripple-glyph {
    font-size: 19px;
  }

  .transport {
    gap: 10px;
  }

  .transport button:not(.play) {
    min-width: 36px;
  }

  .transport .play {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
  }

  .volume-wrap .volume {
    display: none;
  }

  .volume-wrap button {
    min-width: 34px;
  }

  .player-note {
    justify-content: center;
    min-height: 20px;
    padding-top: 6px;
    font-size: 8px;
  }

  .player-note span {
    display: none;
  }

  footer {
    bottom: calc(9px + var(--safe-bottom));
    font-size: 6px;
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .ambient-heading {
    top: 82px;
  }

  .liquid-player {
    bottom: 42px;
  }
}

@media (max-height: 700px) and (max-width: 700px) {
  .ambient-heading {
    top: 58px;
  }

  #sceneClock {
    font-size: 70px;
  }

  .scene-switcher {
    top: 196px;
  }

  .liquid-player {
    bottom: calc(35px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-player,
  .scene-option {
    background: rgba(8, 13, 31, 0.86);
  }
}
