:root {
  --bg: #07060c;
  --text: #f7f2ff;
  --muted: #b9b0c7;
  --dim: #8d839d;
  --panel: rgba(14, 10, 21, 0.78);
  --panel-solid: rgba(16, 11, 23, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #a970ff;
  --accent-soft: rgba(169, 112, 255, 0.17);
  --city-accent: #ff7ac8;
  --city-accent-soft: rgba(255, 122, 200, 0.16);
  --green: #64e39a;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: #160f1c;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

/* ------------------------------------------------------------------ scene */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #06050b;
}

#scene {
  position: absolute;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: translateZ(0);
}

.scene-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 3, 9, 0.7) 0%, rgba(4, 3, 9, 0.18) 17%, transparent 34%),
    linear-gradient(0deg, rgba(4, 3, 9, 0.78) 0%, rgba(4, 3, 9, 0.28) 17%, transparent 34%),
    radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(4, 3, 9, 0.45) 100%);
}

.scene-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* --------------------------------------------------------------------- ui */

.ui {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

body.is-ready .topbar,
body.is-ready .bottom-stack {
  animation: ui-in 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.is-ready .bottom-stack {
  animation-delay: 0.08s;
}

@keyframes ui-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: calc(18px + var(--safe-top)) 20px 0;
}

.scene-head {
  pointer-events: auto;
  min-width: 0;
  max-width: min(640px, 56vw);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.pixel-star {
  width: 2px;
  height: 2px;
  margin: 0 4px;
  background: var(--accent);
  box-shadow:
    -4px 0 0 -0.5px var(--accent),
    4px 0 0 -0.5px var(--accent),
    0 -4px 0 -0.5px var(--accent),
    0 4px 0 -0.5px var(--accent),
    -2px -2px 0 -1px var(--accent),
    2px -2px 0 -1px var(--accent),
    -2px 2px 0 -1px var(--accent),
    2px 2px 0 -1px var(--accent);
}

.scene-head h1 {
  margin: 0;
  font-size: clamp(44px, 5.7vw, 76px);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.058em;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 12px 34px rgba(0, 0, 0, 0.45);
}

.scene-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
}

.time-pill,
.live-pill,
.ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 6, 14, 0.56);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}

.time-pill .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.live-pill {
  gap: 7px;
  border-color: rgba(100, 227, 154, 0.23);
  background: rgba(7, 26, 21, 0.62);
  color: rgba(226, 255, 239, 0.92);
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(100, 227, 154, 0.12), 0 0 8px rgba(100, 227, 154, 0.7);
}

.ghost-pill {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  transition: 160ms ease;
}

.ghost-pill .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.ghost-pill:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(22, 16, 30, 0.8);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  padding-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pill .icon {
  width: 15px;
  height: 15px;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill-accent {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--accent);
  color: #1b1120;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.38),
    0 6px 22px color-mix(in srgb, var(--accent) 32%, transparent);
}

.pill-accent:hover {
  filter: brightness(1.06);
}

.pill-plum {
  border-color: rgba(183, 144, 255, 0.27);
  background: rgba(91, 55, 142, 0.62);
  color: #f4ecff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.pill-plum:hover {
  background: rgba(106, 64, 165, 0.8);
}

.pill-coffee {
  border-color: rgba(255, 236, 191, 0.34);
  background: #ffcf8a;
  color: #2b1a08;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.45),
    0 6px 22px rgba(255, 179, 92, 0.22);
}

.pill-coffee:hover {
  filter: brightness(1.05);
}

.pill-sponsor {
  border-color: rgba(245, 166, 200, 0.34);
  background: rgba(112, 57, 90, 0.72);
  color: #ffe9f3;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.pill-sponsor .icon {
  color: #f5a6c8;
}

.pill-sponsor:hover {
  background: rgba(136, 70, 109, 0.86);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
}

.glass {
  background: rgba(9, 7, 15, 0.55);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}

.icon-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(30, 22, 40, 0.82);
}

/* -------------------------------------------------------------- bottom bar */

.bottom-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px calc(15px + var(--safe-bottom));
  pointer-events: none;
}

.statusbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 8, 16, 0.68);
  color: rgba(255, 255, 255, 0.76);
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.chip:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(26, 19, 35, 0.8);
}

.chip .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.chip-city {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 20%, rgba(10, 8, 16, 0.76));
}

.chip-city .icon {
  color: var(--accent);
}

.chip-label {
  font-weight: 650;
}

.chip-mono {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.chip-state {
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.chip-square {
  width: 30px;
  justify-content: center;
  padding: 0;
}

.player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(37, 29, 28, 0.55) 0%, transparent 45%),
    linear-gradient(180deg, rgba(25, 19, 22, 0.95), rgba(12, 9, 13, 0.97));
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  pointer-events: auto;
}

.player-main,
.player-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.player-main {
  flex: 1;
  gap: 7px;
}

.player-side {
  gap: 7px;
  flex: none;
}

.play-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--accent);
  color: #1a101f;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.45),
    0 4px 18px color-mix(in srgb, var(--accent) 38%, transparent);
  flex: none;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.play-btn:hover {
  transform: scale(1.035);
  filter: brightness(1.07);
}

.play-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.play-btn .icon {
  width: 19px;
  height: 19px;
}

.play-btn .pause-icon {
  display: none;
}

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

body.is-playing .play-btn .pause-icon {
  display: block;
}

.transport {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.68);
  flex: none;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.transport:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.transport.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.transport .icon {
  width: 17px;
  height: 17px;
}

.timer-badge {
  position: absolute;
  top: -3px;
  right: -7px;
  padding: 1px 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: var(--accent);
  color: #1a101f;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.library-count {
  position: absolute;
  top: -3px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 12px;
  padding: 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: var(--accent);
  color: #1a101f;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.track {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 6px;
  overflow: hidden;
}

.track-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.96);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.002em;
}

.track-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.01em;
}

.volume {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 132px;
  color: rgba(255, 255, 255, 0.55);
}

.volume .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.volume.ambience-vol {
  width: 106px;
}

input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--fill),
    rgba(255, 255, 255, 0.16) var(--fill),
    rgba(255, 255, 255, 0.16) 100%
  );
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 99px;
  background: var(--accent);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* ----------------------------------------------------------------- dialogs */

dialog.sheet {
  width: min(880px, calc(100vw - 32px));
  max-height: min(86dvh, 820px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background:
    radial-gradient(110% 130% at 12% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(28, 21, 36, 0.98), rgba(13, 10, 18, 0.99));
  color: var(--text);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    inset 0 1px rgba(255, 255, 255, 0.07);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

dialog.sheet[open] {
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

dialog.sheet::backdrop {
  background: rgba(4, 3, 8, 0.66);
  backdrop-filter: blur(9px) saturate(0.9);
  -webkit-backdrop-filter: blur(9px) saturate(0.9);
  animation: backdrop-in 0.25s ease both;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet-small {
  width: min(560px, calc(100vw - 32px));
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sheet h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.038em;
}

.sheet-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.035);
  transition: 150ms ease;
}

.sheet-close:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.sheet-close .icon {
  width: 15px;
  height: 15px;
}

.sheet-note {
  margin: 15px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.55;
}

.sheet-note.inline {
  margin: 0;
}

.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-color: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease;
}

.text-btn .icon {
  width: 13px;
  height: 13px;
}

.text-btn:hover {
  color: #fff;
}

/* city grid */

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.city-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.city-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.city-card.is-active {
  border-color: color-mix(in srgb, var(--city-accent) 55%, transparent);
  background: var(--city-accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--city-accent) 26%, transparent);
}

.city-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #090712;
  border-bottom: 1px solid var(--line);
}

.city-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 6, 12, 0.4));
  pointer-events: none;
}

.city-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.city-weather {
  position: absolute;
  left: 8px;
  bottom: 7px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(7, 5, 12, 0.65);
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.city-weather i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--city-accent);
  box-shadow: 0 0 5px var(--city-accent);
}

.city-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px 11px;
}

.city-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.city-card-title strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.city-card-time {
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--mono);
  font-size: 8.5px;
}

.city-card-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.city-card-index {
  color: rgba(255, 255, 255, 0.26);
  font-family: var(--mono);
  font-size: 8.5px;
}

.city-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 600;
}

.city-card-cta .icon {
  width: 11px;
  height: 11px;
}

/* vibe */

.vibe-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.vibe {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.vibe:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.vibe.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--accent-soft);
}

.vibe-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}

.vibe-icon .icon {
  width: 17px;
  height: 17px;
}

.vibe-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vibe-copy strong {
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
}

.vibe-copy small {
  color: var(--dim);
  font-size: 10.5px;
}

.vibe-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-left: auto;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #1a101f;
  opacity: 0;
  transform: scale(0.8);
  transition: 160ms ease;
}

.vibe.is-active .vibe-check {
  opacity: 1;
  transform: scale(1);
}

.vibe-check .icon {
  width: 12px;
  height: 12px;
}

/* library */

.sheet.library-sheet {
  width: min(680px, calc(100vw - 32px));
}

.library-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 11px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.library-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 29px;
  padding: 0 5px;
  border-radius: 5px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.library-tab small {
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
}

.library-tab:hover {
  color: #fff;
}

.library-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.library-tab.is-active small {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(48dvh, 430px);
  margin: 0;
  padding: 0 4px 0 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.song-row {
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.song-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  background: var(--accent-soft);
}

.song-play {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto auto 23px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 45px;
  padding: 6px 9px;
  color: inherit;
  text-align: left;
}

.song-index {
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 8px;
}

.song-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.song-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-copy small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8px;
}

.song-tag {
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cat-lofi {
  background: rgba(255, 190, 120, 0.13);
  color: #ffc97e;
}

.cat-focus {
  background: rgba(142, 205, 247, 0.13);
  color: #9bd5ff;
}

.cat-edm {
  background: rgba(100, 227, 154, 0.12);
  color: #7ce3a7;
}

.song-duration {
  color: rgba(255, 255, 255, 0.32);
  font-family: var(--mono);
  font-size: 8px;
}

.song-action {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.song-action .icon {
  width: 10px;
  height: 10px;
}

.song-row.is-active .song-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #1a101f;
}

.song-play:hover .song-action {
  color: #1a101f;
  border-color: var(--accent);
  background: var(--accent);
}

/* queue */

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.queue-item.is-current {
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: var(--accent-soft);
}

.queue-play {
  display: grid;
  grid-template-columns: 28px 1fr 27px;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: inherit;
  text-align: left;
}

.queue-index {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.queue-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.queue-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-copy small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8.5px;
}

.queue-play-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: 150ms ease;
}

.queue-play:hover .queue-play-icon {
  color: #1a101f;
  border-color: var(--accent);
  background: var(--accent);
}

.queue-play-icon .icon {
  width: 11px;
  height: 11px;
}

.queue-current {
  margin-left: auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* timer */

.timer-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.timer-tab {
  flex: 1;
  height: 27px;
  border-radius: 5px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  transition: 150ms ease;
}

.timer-tab:hover {
  color: #fff;
}

.timer-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.timer-clock {
  margin: 22px 0 18px;
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(52px, 11vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.07em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.timer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.timer-actions .pill {
  background: var(--accent);
  color: #1a101f;
}

.timer-actions .pill:hover {
  filter: brightness(1.06);
}

/* shortcuts */

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
  margin: 0;
}

.shortcut-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.shortcut-grid dt,
.shortcut-grid dd {
  margin: 0;
}

.shortcut-grid dd {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

/* guide */

.guide-intro {
  max-width: 60ch;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.guide-list strong {
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

.guide-list span {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}

/* about */

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.about-copy p:first-child {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.about-copy a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 2px;
}

.about-copy code {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--mono);
  font-size: 10px;
}

.about-meta {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.about-support {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.about-support p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.about-support .about-links {
  margin-top: 11px;
}

.about-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 17px;
  flex-wrap: wrap;
}

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + var(--safe-bottom));
  z-index: 80;
  max-width: min(90vw, 440px);
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 7px;
  background: rgba(15, 11, 22, 0.92);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.015em;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 5px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #090713;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 100;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .volume.ambience-vol,
  #downloadBtn,
  #shareBtn {
    display: none;
  }

  .scene-head {
    max-width: 62vw;
  }
}

@media (max-width: 860px) {
  .desktop-only {
    display: none !important;
  }

  .topbar {
    padding: calc(14px + var(--safe-top)) 14px 0;
    gap: 10px;
  }

  .scene-head {
    max-width: none;
    width: 100%;
    padding: 12px 14px 13px;
    padding-right: 86px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    background:
      linear-gradient(180deg, rgba(21, 15, 29, 0.74), rgba(10, 8, 16, 0.67));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
  }

  .wordmark {
    margin-bottom: 8px;
    font-size: 8px;
    letter-spacing: 0.21em;
  }

  .scene-head h1 {
    font-size: clamp(38px, 10vw, 54px);
    letter-spacing: -0.055em;
  }

  .scene-sub {
    margin-top: 7px;
    font-size: 11.5px;
  }

  .scene-meta {
    gap: 5px;
    margin-top: 11px;
  }

  .time-pill,
  .live-pill,
  .ghost-pill {
    height: 24px;
    padding: 0 7px;
    gap: 5px;
    font-size: 8.5px;
  }

  .time-pill .icon,
  .ghost-pill .icon {
    width: 10px;
    height: 10px;
  }

  .live-dot {
    width: 4px;
    height: 4px;
  }

  .top-actions {
    position: absolute;
    top: calc(18px + var(--safe-top));
    right: 18px;
    gap: 6px;
    z-index: 2;
  }

  .top-actions .icon-btn {
    width: 30px;
    height: 30px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(20, 14, 28, 0.65);
  }

  .top-actions .icon-btn .icon {
    width: 14px;
    height: 14px;
  }

  .bottom-stack {
    gap: 6px;
    padding: 0 10px calc(10px + var(--safe-bottom));
  }

  .statusbar {
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .statusbar::-webkit-scrollbar {
    display: none;
  }

  .chip {
    height: 28px;
    padding: 0 7px;
    gap: 4px;
    font-size: 10.5px;
    flex: none;
  }

  .chip .icon {
    width: 12px;
    height: 12px;
  }

  .chip-state {
    font-size: 8px;
  }

  .chip-mono {
    font-size: 8px;
  }

  .chip-square {
    display: none;
  }

  .player {
    min-height: 0;
    padding: 8px 9px;
    gap: 7px;
    flex-wrap: wrap;
  }

  .player-main {
    flex: 1 1 100%;
    gap: 5px;
  }

  .player-side {
    flex: 1 1 100%;
    gap: 6px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: space-between;
  }

  .play-btn {
    width: 38px;
    height: 38px;
  }

  .play-btn .icon {
    width: 17px;
    height: 17px;
  }

  .transport {
    width: 29px;
    height: 29px;
  }

  .transport .icon {
    width: 16px;
    height: 16px;
  }

  .track {
    margin-left: 4px;
  }

  .track-title {
    font-size: 11.5px;
  }

  .track-sub {
    font-size: 8px;
  }

  .volume {
    width: 126px;
  }

  .volume.ambience-vol {
    display: flex;
    width: 94px;
  }

  .volume .icon {
    width: 13px;
    height: 13px;
  }

  #downloadBtn,
  #shareBtn {
    display: none;
  }

  .player-side .transport {
    width: 28px;
    height: 28px;
  }

  .toast {
    bottom: calc(136px + var(--safe-bottom));
  }

  dialog.sheet,
  .sheet-small {
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: auto 0 0;
    padding: 18px 16px calc(18px + var(--safe-bottom));
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }

  .city-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sheet.library-sheet {
    width: 100%;
    max-width: none;
  }

  .about-support .about-links {
    gap: 10px;
  }

  .city-card {
    flex-direction: row;
  }

  .city-preview {
    width: 42%;
    flex: none;
    aspect-ratio: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .city-card-body {
    flex: 1;
    justify-content: center;
    padding: 9px 10px;
  }

  .city-card-title strong {
    font-size: 14px;
  }

  .city-card-sub {
    white-space: normal;
  }

  .city-card-foot {
    margin-top: 4px;
  }

  .sheet-head {
    margin-bottom: 13px;
  }

  .sheet h2 {
    font-size: 22px;
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .guide-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .guide-list span {
    font-size: 10.5px;
  }

  .sheet-foot {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  .scene-head h1 {
    font-size: 38px;
  }

  .scene-meta .live-pill {
    display: none;
  }

  .chip {
    padding: 0 6px;
    font-size: 10px;
    gap: 3px;
  }

  .chip-city .chip-mono {
    display: none;
  }

  .volume {
    width: 104px;
  }

  .volume.ambience-vol {
    width: 82px;
  }

  .track-sub {
    display: none;
  }

  .toast {
    font-size: 9px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .scene-head {
    padding: 8px 12px;
    max-width: 58vw;
  }

  .scene-head h1 {
    font-size: 34px;
  }

  .wordmark,
  .scene-sub,
  .scene-meta .live-pill {
    display: none;
  }

  .scene-meta {
    margin-top: 7px;
  }

  .bottom-stack {
    padding-bottom: calc(6px + var(--safe-bottom));
  }

  .statusbar {
    display: none;
  }

  .player {
    min-height: 54px;
  }

  dialog.sheet {
    max-height: 92dvh;
  }
}

@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;
  }
}
