/* Loss Musify — warm-gray canvas, black and white components, one font.
   Motion lives in TypeScript springs; this file has no transitions. */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}

:root {
  /* The palette. Light and dark share every role; only the values change. */
  --c-canvas: #eae8e4;
  --c-surface: #ffffff;
  --c-ink: #0a0a0a;
  --c-ink-2: rgb(10 10 10 / 0.58);
  --c-ink-3: rgb(10 10 10 / 0.32);
  /* A fill on a surface: tracks, chips, the artwork's placeholder. */
  --c-tint: rgb(10 10 10 / 0.07);
  --c-line: rgb(10 10 10 / 0.08);
  --c-hover: rgb(10 10 10 / 0.05);
  /* What sits on ink: solid buttons, the active tab. */
  --c-on-ink: #ffffff;
  --c-on-ink-2: rgb(255 255 255 / 0.6);
  --c-on-ink-3: rgb(255 255 255 / 0.15);
  /* Layers that float over the page: a hairline and a soft drop, never a glow. */
  --c-float: 0 0 0 1px var(--c-line), 0 12px 36px rgb(0 0 0 / 0.12);

  --canvas: var(--c-canvas);
  --surface: var(--c-surface);
  --ink: var(--c-ink);
  --ink-2: var(--c-ink-2);
  --ink-3: var(--c-ink-3);
  --line: var(--c-line);
  --hover: var(--c-hover);
  /* "Paper" is whatever sits on ink: the shape's own foreground. */
  --paper: var(--c-on-ink);
  --paper-2: var(--c-on-ink-2);
  --paper-3: var(--c-on-ink-3);
  --bar: 76px;
}

:root[data-theme='dark'] {
  --c-canvas: #121110;
  --c-surface: #1f1e1c;
  --c-ink: #f4f2ee;
  --c-ink-2: rgb(244 242 238 / 0.6);
  --c-ink-3: rgb(244 242 238 / 0.34);
  --c-tint: rgb(244 242 238 / 0.08);
  --c-line: rgb(244 242 238 / 0.09);
  --c-hover: rgb(244 242 238 / 0.06);
  --c-on-ink: #0a0a0a;
  --c-on-ink-2: rgb(10 10 10 / 0.6);
  --c-on-ink-3: rgb(10 10 10 / 0.12);
  --c-float: 0 0 0 1px var(--c-line), 0 12px 36px rgb(0 0 0 / 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.35 'Geist', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

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

button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

input:focus-visible {
  outline: none;
}

input {
  font: inherit;
  color: inherit;
  border: 0;
  outline: 0;
  background: none;
  min-width: 0;
}

img {
  display: block;
  object-fit: cover;
  -webkit-user-drag: none;
}

.icon {
  display: block;
  flex: none;
}

kbd {
  font: 500 11.5px/1 'Geist', sans-serif;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--hover);
  color: var(--ink-2);
  white-space: nowrap;
}

::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-thumb {
  background: var(--ink-3);
  background-clip: content-box;
  border: 4px solid transparent;
  border-radius: 6px;
}

.ellipsis,
.row-title,
.row-sub,
.card-sub,
.island-title,
.island-sub,
.player-title,
.player-sub,
.queue-title,
.queue-sub,
.palette-title,
.palette-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── World ────────────────────────────────────────────────────────────── */

.world {
  position: fixed;
  inset: 0;
  transform-origin: 50% 50%;
}

.titlebar {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--bar);
  z-index: 5;
  background: var(--canvas);
  -webkit-app-region: drag;
}

.chrome {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* The right inset clears the native window controls on Windows. */
  padding: 0 156px 0 30px;
}

/* On macOS the window controls are top-left traffic lights. Clear them on the left,
   and use standard padding on the right where there are no controls. */
body.is-mac .chrome {
  padding: 0 30px 0 96px;
}

/* Centred with auto margins, not a transform: Windows computes the window's drag region from
   layout boxes and ignores transforms, so a translated bar is left under the draggable title
   bar and never receives a click. */
.chrome > .tabs {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
}

.chrome .tabs,
.chrome-actions,
.chrome button {
  -webkit-app-region: no-drag;
}

.brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.chrome-actions {
  display: flex;
  gap: 8px;
}

.chrome-btn {
  height: 36px;
  padding: 0 8px 0 12px;
  border-radius: 18px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chrome-btn.is-round {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.chrome-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

.stage {
  position: absolute;
  inset: var(--bar) 0 0 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 40px 150px;
}

.page-title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 8px 0 0;
}

.section {
  margin-top: 38px;
}

.section-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */

.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
}

.tabs-row {
  display: flex;
}

.tab {
  height: 34px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--ink-2);
}

.tabs-row .tab:hover {
  color: var(--ink);
}

.tabs-indicator {
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: var(--ink);
}

.tabs-inverted {
  position: absolute;
  inset: 0;
  padding: 4px;
  pointer-events: none;
}

.tabs-inverted .tab {
  color: var(--paper);
}

/* ── Shape ────────────────────────────────────────────────────────────── */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.scrim.is-active {
  pointer-events: auto;
}

.shape {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  overflow: hidden;
  /* The island, the player and the panels wear the app's own theme: a surface with ink on it.
     Their rules were written as "paper on ink", so here paper is the ink and ink the surface;
     a solid control (paper) is then ink, with the surface colour on it. */
  --ink: var(--c-surface);
  --paper: var(--c-ink);
  --paper-2: var(--c-ink-2);
  --paper-3: var(--c-tint);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--c-float);
  transform-origin: 50% 50%;
}

/* The sign-in button is the one solid shape: the first thing to press. */
.shape[data-mode='login'] {
  --ink: var(--c-ink);
  --paper: var(--c-on-ink);
  --paper-2: var(--c-on-ink-2);
  --paper-3: var(--c-on-ink-3);
  box-shadow: none;
}

.shape[data-mode='hidden'] {
  box-shadow: none;
}

.shape[data-mode='login'],
.shape[data-mode='island'] {
  cursor: pointer;
}

.shape kbd {
  background: var(--paper-3);
  color: var(--paper-2);
}

.shape-art {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--paper-3);
  pointer-events: none;
}

.face {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
  scale: var(--presence, 1);
  transform-origin: 50% 0;
}

.face-center {
  top: 50%;
  translate: -50% -50%;
  transform-origin: 50% 50%;
}

.face-login {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 15.5px;
  font-weight: 500;
}

.spinner {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.25px solid var(--paper-3);
  border-top-color: var(--paper);
}

.face-check svg {
  display: block;
}

/* Island */

.face-island {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 64px;
}

.island-lead {
  position: absolute;
  left: 20px;
  display: none;
  color: var(--paper-2);
}

.island-text {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.island-title {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.island-sub {
  font-size: 12.5px;
  color: var(--paper-2);
  margin-top: 1px;
}

.island-kbd {
  display: none;
  margin-right: 10px;
}

.island-quality {
  flex: none;
  margin-right: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--paper-3);
  color: var(--paper-2);
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.island-quality:empty {
  display: none;
}

.island-btn {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.island-btn:hover {
  background: var(--paper-3);
}

.face-island.is-empty {
  padding-left: 52px;
}
.face-island.is-empty .island-lead {
  display: block;
}
.face-island.is-empty .island-kbd {
  display: block;
}
.face-island.is-empty .island-btn {
  display: none;
}
.face-island.is-empty .island-title {
  color: var(--paper-2);
  font-weight: 400;
}

.island-ring {
  position: absolute;
  inset: 0;
}

.ring-track {
  stroke: var(--paper-3);
  stroke-width: 2;
}

.ring-fill {
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 20px 20px;
}

.playpause path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

/* Toast */

.face-toast {
  height: 48px;
  width: max-content;
  /* A long track title is cut short rather than stretching the pill across the window. */
  max-width: min(440px, calc(100vw - 64px));
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px 0 18px;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}

.face-toast span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player */

.face-player {
  margin-left: var(--shift, 0px);
  padding: 14px 28px 22px;
  display: flex;
  flex-direction: column;
}

.player-head {
  height: 36px;
  margin: 0 -8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--paper-2);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  background: var(--paper-3);
}

.heart.is-liked svg {
  fill: currentColor;
}

.player-stage {
  position: relative;
  height: 312px;
  margin-bottom: 20px;
}

.player-queue {
  position: absolute;
  inset: 0 -8px;
  overflow-y: auto;
  scale: var(--presence, 1);
}

.player-queue::-webkit-scrollbar-thumb {
  background-color: var(--paper-3);
}

.queue-row {
  height: 52px;
  display: grid;
  grid-template-columns: 36px 1fr auto 24px;
  gap: 12px;
  align-items: center;
  padding: 0 8px;
  border-radius: 14px;
  cursor: pointer;
}

.queue-row:hover {
  background: var(--paper-3);
}

.queue-thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.queue-text {
  min-width: 0;
}

.queue-title {
  font-size: 14px;
  font-weight: 500;
}

.queue-row.is-current .queue-title {
  font-weight: 600;
}

.queue-sub,
.queue-time {
  font-size: 12.5px;
  color: var(--paper-2);
}

.queue-time {
  font-variant-numeric: tabular-nums;
}

.queue-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.queue-row:hover .queue-remove {
  visibility: visible;
}

.player-meta {
  height: 52px;
  margin-bottom: 14px;
}

.player-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.player-sub {
  font-size: 13.5px;
  color: var(--paper-2);
  margin-top: 3px;
}

.bar {
  position: relative;
  flex: none;
  margin-bottom: 6px;
  cursor: pointer;
  touch-action: none;
}

.bar-track {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  background: var(--paper-3);
}

.bar-fill {
  height: 100%;
  background: var(--paper);
}

.bar-times {
  position: absolute;
  inset: 24px 0 auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--paper-2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Icon and value invert against whatever part of the slider is behind them. */
.bar-volume {
  position: absolute;
  inset: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.player-controls {
  height: 68px;
  margin: 0 -4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.play-main {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
}

.play-spinner {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--paper);
  visibility: hidden;
}

.play-main.is-loading .play-spinner {
  visibility: visible;
}

.quality-area {
  height: 44px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quality-badge {
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 13px;
  background: var(--paper-3);
  color: var(--paper-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.quality-badge:hover {
  color: var(--paper);
}

.quality-badge.is-empty {
  visibility: hidden;
}

/* Palette */

.palette-input {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.palette-lead {
  color: var(--paper-2);
}

.palette-field {
  flex: 1;
  font-size: 17px;
  caret-color: var(--paper);
}

.palette-field::placeholder {
  color: var(--paper-2);
}

.palette-list {
  position: relative;
  margin: 0 8px;
}

.palette-highlight {
  position: absolute;
  inset: 0 0 auto 0;
  border-radius: 14px;
  background: var(--paper-3);
}

.palette-row {
  position: relative;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  cursor: pointer;
}

.palette-thumb,
.palette-glyph {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.palette-glyph {
  display: grid;
  place-items: center;
  background: var(--paper-3);
}

.palette-text {
  flex: 1;
  min-width: 0;
}

.palette-title {
  font-size: 14.5px;
  font-weight: 500;
}

.palette-sub,
.palette-hint {
  font-size: 12.5px;
  color: var(--paper-2);
}

.palette-hint {
  flex: none;
  font-variant-numeric: tabular-nums;
}

/* Settings */

.face-settings {
  padding: 8px 12px;
}

.settings-head {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.settings-row {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
  border-radius: 16px;
  cursor: pointer;
}

.settings-row:hover {
  background: var(--paper-3);
}

.settings-text {
  flex: 1;
  min-width: 0;
}

.settings-quality {
  height: 100px;
  padding: 10px 12px 0;
}

.settings-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* Tabs inside the shape sit on ink, so their colours flip. */
.shape .tabs {
  background: var(--paper-3);
}

.shape .tabs-indicator {
  background: var(--paper);
}

.shape .tabs-row .tab {
  color: var(--paper-2);
}

.shape .tabs-row .tab:hover {
  color: var(--paper);
}

.shape .tabs-inverted .tab {
  color: var(--ink);
}

.settings-title,
.account-name {
  font-size: 14.5px;
  font-weight: 500;
}

.settings-sub,
.account-status {
  font-size: 12.5px;
  color: var(--paper-2);
  margin-top: 1px;
}

.settings-account {
  height: 68px;
  margin-top: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--paper-3);
}

.account-avatar img {
  width: 100%;
  height: 100%;
}

/* Unisono */

.face-unisono {
  padding: 8px 12px;
}

.unisono-views {
  position: relative;
  height: 316px;
}

.unisono-view {
  position: absolute;
  inset: 0;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scale: var(--presence, 1);
}

.unisono-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--paper-2);
}

.unisono-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.unisono-field {
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--paper-3);
  font-size: 15px;
  user-select: text;
}

.unisono-field::placeholder {
  color: var(--paper-2);
}

.unisono-field.is-code {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.unisono-btn {
  flex: none;
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  font-size: 14.5px;
  font-weight: 500;
  background: var(--paper-3);
  color: var(--paper);
}

.unisono-btn.is-solid {
  background: var(--paper);
  color: var(--ink);
}

.unisono-or {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--paper-2);
  text-align: center;
}

.unisono-row {
  display: flex;
  gap: 8px;
}

.unisono-error {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--paper-2);
}

.unisono-code {
  margin: 10px 0 4px;
  font-size: 54px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  user-select: text;
}

.unisono-peers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.unisono-peer {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper-3);
  font-size: 13px;
}

.unisono-spacer {
  flex: 1;
}

.unisono-delay {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.unisono-delay-text {
  flex: 1;
  min-width: 0;
}

.unisono-delay-title {
  font-size: 14px;
  font-weight: 500;
}

.unisono-delay .unisono-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
}

.unisono-delay-value {
  width: 64px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ── Toggle ───────────────────────────────────────────────────────────── */

.toggle {
  --on: 0;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) calc(var(--on) * 100%), var(--paper-3));
}

.toggle-knob {
  position: absolute;
  left: 3px;
  top: 3px;
  height: 22px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--ink) calc(var(--on) * 100%), var(--paper));
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.pill-btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  color: var(--ink);
}

.pill-btn.is-solid {
  background: var(--ink);
  color: var(--paper);
}

.shape .pill-btn {
  height: 36px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px -6px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
}

.back:hover {
  background: var(--hover);
  color: var(--ink);
}

/* ── Rows ─────────────────────────────────────────────────────────────── */

.rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -10px;
}

.row {
  display: grid;
  grid-template-columns: 48px 1fr auto 34px;
  gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 16px;
  cursor: pointer;
}

.row:hover {
  background: var(--hover);
}

.row-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--hover);
}

.row-thumb img {
  width: 100%;
  height: 100%;
}

.row-eq {
  position: absolute;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 16px;
  background: rgb(0 0 0 / 0.5);
}

.row-eq i {
  width: 3px;
  height: 4px;
  border-radius: 1.5px;
  background: #fff;
  /* One beat up, one beat down. */
  animation: eq 1s ease-in-out infinite;
}
.row-eq i:nth-child(2) {
  animation-delay: -0.33s;
}
.row-eq i:nth-child(3) {
  animation-delay: -0.66s;
}

@keyframes eq {
  50% {
    height: 15px;
  }
}

.is-playing .row-eq {
  display: flex;
}

.row-text {
  min-width: 0;
}

.row-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.is-playing .row-title,
.is-playing .card-title {
  font-weight: 600;
}

.row-sub,
.row-time {
  font-size: 13px;
  color: var(--ink-2);
}

.row-time {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

/* What a local file is: codec and resolution, as read from the file. */
.row-tag {
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--hover);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.row.is-off {
  cursor: default;
}

.row.is-off .row-thumb,
.row.is-off .row-text {
  opacity: 0.4;
}

.row-more {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.row:hover .row-more {
  visibility: visible;
}

.row-more:hover {
  background: var(--hover);
}

.skeleton {
  height: 64px;
  background: var(--hover);
  cursor: default;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

/* ── Cards ────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 22px 20px;
}

.card {
  min-width: 0;
  cursor: pointer;
}

.card-art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface);
}

.card-art.is-round {
  border-radius: 50%;
}

.card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-glyph {
  color: var(--ink-3);
}

.card-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0a0a0a;
  visibility: hidden;
}

.card-play svg {
  fill: currentColor;
}

.card:hover .card-play {
  visibility: visible;
}

.card-title {
  margin-top: 11px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ── Welcome ──────────────────────────────────────────────────────────── */

.welcome {
  height: calc(100vh - var(--bar) - 160px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.welcome-mark {
  margin: 0;
  font-size: 76px;
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.welcome-line {
  max-width: 400px;
  margin: 20px 0 40px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
}

.welcome-slot {
  width: 252px;
  height: 56px;
}

.welcome-late {
  min-height: 96px;
  margin-top: 22px;
}

.welcome-skip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.welcome-skip:hover {
  background: var(--hover);
  color: var(--ink);
}

.welcome-note {
  max-width: 340px;
  margin: 16px auto 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ── Search ───────────────────────────────────────────────────────────── */

.search-bar {
  height: 62px;
  margin-top: 8px;
  padding: 0 24px;
  border-radius: 31px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
}

.search-bar > span {
  color: var(--ink-2);
}

.search-field {
  flex: 1;
  font-size: 18px;
  letter-spacing: -0.01em;
  user-select: text;
}

.search-field::placeholder {
  color: var(--ink-3);
}

.search-filters {
  margin: 18px 0 16px;
}

/* ── Collections ──────────────────────────────────────────────────────── */

.collection-head {
  display: flex;
  align-items: flex-end;
  gap: 30px;
  margin: 8px 0 30px;
}

.collection-art {
  flex: none;
  width: 208px;
  height: 208px;
  border-radius: 26px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface);
}

.collection-art.is-round {
  border-radius: 50%;
}

.collection-art img {
  width: 100%;
  height: 100%;
}

.collection-text {
  min-width: 0;
}

.collection-sub {
  margin: 10px 0 22px;
  color: var(--ink-2);
}

.collection-actions {
  display: flex;
  gap: 10px;
}

/* ── Stats ────────────────────────────────────────────────────────────── */

.stat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.stat-caption {
  margin-top: 8px;
  color: var(--ink-2);
}

.stat-card {
  margin-top: 26px;
  padding: 30px 30px 14px;
  border-radius: 30px;
  background: var(--surface);
}

.stat-number {
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chart {
  position: relative;
  margin-top: 6px;
}

.chart-svg {
  display: block;
  overflow: visible;
}

.chart-grid {
  stroke: var(--line);
}

.chart-guide {
  stroke: var(--ink-3);
  stroke-dasharray: 3 4;
  opacity: 0;
}

.chart-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2.25;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.chart-label {
  font-size: 12px;
  fill: var(--ink-2);
  text-anchor: middle;
}

.chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  padding: 8px 13px 9px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
  font-size: 12.5px;
  background: var(--ink);
  color: var(--paper-2);
  pointer-events: none;
}

.chart-tooltip strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper);
}

.stat-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.rank {
  margin: 0 -10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
}

.rank-row:hover {
  background: var(--hover);
}

.rank-row.is-static {
  cursor: default;
}

.rank-n {
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ── Menu ─────────────────────────────────────────────────────────────── */

.menu {
  position: fixed;
  z-index: 50;
  min-width: 228px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 14px 40px rgb(0 0 0 / 0.14);
}

.menu-item {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  text-align: left;
  white-space: nowrap;
}

.menu-item:hover {
  background: var(--hover);
}

/* ── Empty ────────────────────────────────────────────────────────────── */

.empty {
  padding: 64px 0;
  text-align: center;
}

.empty-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-body {
  max-width: 380px;
  margin: 8px auto 22px;
  color: var(--ink-2);
}

.empty.is-compact {
  padding: 22px 0 26px;
}

.empty.is-compact .empty-body {
  max-width: 460px;
}

/* ── Local files ──────────────────────────────────────────────────────── */

.local-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 18px;
}

.local-summary {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.local-none {
  color: var(--ink-2);
}

.folders {
  margin: 20px -10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder {
  height: 38px;
  padding: 0 6px 0 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.folder:hover {
  background: var(--hover);
}

.folder-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder.is-away .folder-path,
.folder-note {
  color: var(--ink-3);
}

.folder-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.folder:hover .folder-remove {
  visibility: visible;
}

.folder-remove:hover {
  background: var(--hover);
  color: var(--ink);
}

/* Audio Intelligence */

.face-laie {
  padding: 8px 12px;
}

.laie-body {
  position: relative;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.laie-top {
  display: flex;
  align-items: center;
  gap: 22px;
}

.laie-main {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.laie-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.laie-equivalent {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.laie-fidelity {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 500;
}

.laie-sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--paper-2);
}

.laie-notes:empty {
  display: none;
}

.laie-ring {
  position: relative;
  flex: none;
}

.laie-ring svg {
  display: block;
  rotate: -90deg;
}

.laie-ring-track {
  stroke: var(--paper-3);
}

.laie-ring-arc {
  stroke: var(--paper);
  stroke-linecap: round;
}

.laie-ring-figure {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.laie-main .laie-ring-figure {
  font-size: 40px;
  letter-spacing: -0.04em;
}

.laie-ring.is-empty .laie-ring-figure {
  color: var(--paper-2);
}

.laie-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.laie-small {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.laie-small-name {
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 500;
}

.laie-small-label {
  min-height: 15px;
  font-size: 11.5px;
  color: var(--paper-2);
  font-variant-numeric: tabular-nums;
}

.laie-enhancement {
  min-height: 34px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--paper-3);
  font-size: 12px;
  line-height: 1.35;
  color: var(--paper-2);
}

.laie-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 22px;
}

.laie-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'name value' 'bar bar';
  gap: 5px 8px;
  font-size: 12px;
}

.laie-meter-name {
  grid-area: name;
  color: var(--paper-2);
}

.laie-meter-value {
  grid-area: value;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.laie-meter-bar {
  grid-area: bar;
  height: 4px;
  border-radius: 2px;
  background: var(--paper-3);
  overflow: hidden;
}

.laie-meter-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--paper);
}

.laie-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.laie-history {
  flex: 1;
  height: 40px;
  min-width: 0;
}

.laie-history-line {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.laie-waiting {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--paper-2);
}

.face-laie.is-waiting .laie-body > :not(.laie-waiting) {
  visibility: hidden;
}

.face-laie.is-waiting .laie-waiting {
  display: flex;
}

/* Shared with the account */

.section-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.recent-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-chip {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 6px 0 14px;
  border-radius: 18px;
  background: var(--surface);
  font-size: 13.5px;
}

.recent-query {
  padding-right: 6px;
}

.recent-forget {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink-2);
}

.recent-forget:hover {
  background: var(--surface-2, var(--surface));
  color: var(--ink);
}

/* Smart-search habit chips: what you keep looking for, one tap away. */
.smart-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-suggest:empty {
  display: none;
}

.smart-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-2);
}

.smart-chip:hover {
  color: var(--ink);
}

.recent-chip.is-habit {
  outline: 1px solid var(--line);
}

.stat-note {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 560px;
}

/* Lyrics */

.player-head-actions {
  display: flex;
  gap: 2px;
}

.player-lyrics {
  position: absolute;
  inset: 0 -8px;
  overflow-y: auto;
  padding: 0 8px;
  scale: var(--presence, 1);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}

.player-lyrics::-webkit-scrollbar {
  width: 0;
}

.lyrics-pad {
  height: 40%;
}

.lyrics-line {
  padding: 7px 4px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--paper);
  opacity: 0.32;
  cursor: pointer;
  transition: opacity 220ms;
}

.lyrics-line:hover {
  opacity: 0.6;
}

.lyrics-line.is-current {
  opacity: 1;
}

.lyrics-line.is-gap {
  font-size: 15px;
}

.lyrics-plain {
  padding: 12px 4px 0;
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.55;
  color: var(--paper);
}

.lyrics-note {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: var(--paper-2);
}

.lyrics-source {
  padding: 18px 4px 10px;
  font-size: 11.5px;
  color: var(--paper-2);
}

/* Downloads */

.player-controls .save.is-hidden {
  visibility: hidden;
}

.player-controls .save.is-saved {
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
}

.player-controls .save.is-saving {
  background: conic-gradient(var(--paper) calc(var(--saved) * 360deg), var(--paper-3) 0);
  border-radius: 50%;
  color: var(--ink);
}

/* Settings that scroll */

.settings-scroll {
  height: calc(100% - 56px - 84px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.settings-scroll::-webkit-scrollbar {
  width: 0;
}

.settings-quality.is-wide .settings-quality-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.settings-quality.is-wide {
  height: auto;
  padding-bottom: 14px;
}

/* Moods and the year */

.mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mood-chip {
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
}

.mood-chip:hover {
  background: var(--ink);
  color: var(--canvas, var(--bg));
}

.stat-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-facts {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.year-fact {
  padding: 26px 24px;
  border-radius: 24px;
  background: var(--surface);
}

.year-value {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-transform: capitalize;
}

.year-label {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ── Tiles: moods and genres ──────────────────────────────────────────── */
/* A surface with the name, and the category's cover tilted out of the corner. */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  height: 108px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tile:hover {
  background: color-mix(in srgb, var(--surface) 92%, var(--ink));
}

.tile-art {
  position: absolute;
  right: -14px;
  bottom: -12px;
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  rotate: 24deg;
  visibility: hidden;
}

.tile.has-art .tile-art {
  visibility: visible;
}

.tile-title {
  position: absolute;
  left: 16px;
  right: 64px;
  top: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-note {
  margin: -8px 0 16px;
  color: var(--ink-2);
  font-size: 14px;
}

/* ── Pure black ───────────────────────────────────────────────────────── */

:root[data-theme='dark'][data-black] {
  --c-canvas: #000000;
  --c-surface: #161514;
}

/* ── Ambient mode ─────────────────────────────────────────────────────── */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 7vh 6vw 3.5vh;
  background: var(--canvas);
  color: var(--c-ink);
  /* Lyrics are written as paper on ink, as in the player. */
  --paper: var(--c-ink);
  --paper-2: var(--c-ink-2);
  --paper-3: var(--c-tint);
}

.ambient.is-idle {
  cursor: none;
}

.ambient-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6vw;
  align-items: center;
}

.ambient-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ambient-art {
  width: min(56vh, 38vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 28px;
  background: var(--c-tint);
}

.ambient-title,
.ambient-sub {
  width: min(56vh, 38vw);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ambient-title {
  margin-top: 28px;
  font-size: clamp(22px, 2.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ambient-sub {
  margin-top: 6px;
  font-size: clamp(15px, 1.3vw, 21px);
  color: var(--c-ink-2);
}

.ambient-right {
  position: relative;
  height: 72vh;
}

.ambient-right .player-lyrics {
  inset: 0;
}

.ambient .lyrics-line {
  padding: 10px 4px;
  font-size: clamp(22px, 2.3vw, 36px);
}

.ambient .lyrics-plain {
  font-size: clamp(16px, 1.4vw, 22px);
}

.ambient-foot {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.ambient-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--c-tint);
}

.ambient-fill {
  height: 100%;
  background: var(--c-ink);
}

.ambient-time {
  min-width: 100px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink-2);
}

.ambient-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ambient-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--c-ink);
}

.ambient-btn:hover {
  background: var(--c-hover);
}

.ambient-btn.is-main {
  width: 56px;
  height: 56px;
  background: var(--c-ink);
  color: var(--c-on-ink);
}

.ambient.is-idle .ambient-controls,
.ambient.is-idle .ambient-time {
  visibility: hidden;
}

/* ── Settings: groups, actions, choices ───────────────────────────────── */

.settings-group {
  padding: 22px 12px 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--paper-2);
}

.settings-group:first-child {
  padding-top: 4px;
}

.settings-row {
  min-height: 62px;
  height: auto;
  padding-top: 9px;
  padding-bottom: 9px;
}

.settings-row.is-action,
.settings-row.is-static {
  cursor: default;
}

.settings-row.is-static:hover {
  background: none;
}

.settings-row.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.shape .pill-btn.is-small {
  flex: none;
  height: 34px;
  padding: 0 15px;
  font-size: 13.5px;
  background: var(--paper-3);
  color: var(--paper);
}

.shape .pill-btn.is-small:hover {
  background: var(--paper);
  color: var(--ink);
}

.pill-btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.settings-select {
  flex: none;
  height: 34px;
  max-width: 170px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--paper-3);
  color: var(--paper);
  cursor: pointer;
}

.settings-select option {
  background: var(--c-surface);
  color: var(--c-ink);
}

.ambient .lyrics-note {
  font-size: clamp(16px, 1.4vw, 22px);
}

/* ── Devices ──────────────────────────────────────────────────────────── */

.face-devices {
  padding: 8px 12px;
}

.devices-note {
  padding: 0 12px 12px;
  font-size: 13px;
  color: var(--paper-2);
}

.devices-body {
  height: calc(100% - 118px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.devices-body::-webkit-scrollbar {
  width: 0;
}

.devices-empty {
  margin: 8px 12px;
  padding: 22px;
  border-radius: 18px;
  background: var(--paper-3);
  font-size: 14px;
  line-height: 1.45;
  color: var(--paper-2);
}

.device-card {
  margin: 0 0 10px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: var(--paper-3);
}

.device-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-glyph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
}

.device-name {
  font-size: 14.5px;
  font-weight: 600;
}

.device-status {
  font-size: 12px;
  color: var(--paper-2);
}

.device-now {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-art {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--paper-3);
}

.device-text {
  min-width: 0;
}

.device-title,
.device-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.device-title {
  font-size: 14px;
  font-weight: 500;
}

.device-sub {
  font-size: 12.5px;
  color: var(--paper-2);
}

.device-progress {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-3);
  cursor: pointer;
}

.device-fill {
  height: 100%;
  background: var(--paper);
}

.device-time {
  min-width: 78px;
  text-align: right;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--paper-2);
}

.device-controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.device-play {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
}

.device-volume-row {
  margin-left: 6px;
  display: flex;
  align-items: center;
}

.device-volume {
  min-width: 38px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--paper-2);
}

.device-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.device-card.is-idle .device-progress,
.device-card.is-idle .device-play,
.device-card.is-idle .icon-btn[title='Precedente'],
.device-card.is-idle .icon-btn[title='Successivo'] {
  visibility: hidden;
}

/* TV-code sign-in dialog: floats above everything, paper on ink. */
.tvcode-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.45);
}

.tvcode-card {
  position: relative;
  width: min(380px, calc(100vw - 48px));
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
}

.tvcode-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  padding: 8px;
  border-radius: 50%;
  color: var(--ink-2);
}

.tvcode-close:hover {
  background: var(--hover);
}

.tvcode-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tvcode-body {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.tvcode-code {
  margin: 18px 0 4px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.tvcode-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.tvcode-count {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.tvcode-legacy {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ── Web iOS Banner & PC Modal Additions ────────────────────────────────────── */

.ios-install-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface, #1e1e1e);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink, #fff);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ios-install-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ios-banner-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px;
}

.pc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s ease-out;
}

.pc-modal-backdrop.is-closing {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pc-modal-box {
  background: var(--surface, #1e1d1b);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.16));
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  text-align: center;
  color: var(--ink, #fff);
  animation: modalScaleUp 0.25s ease-out;
}

.pc-modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-2, #aaa);
  margin-bottom: 12px;
}

.pc-modal-title {
  font-size: 22px;
  font-weight: 750;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.pc-modal-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2, #888);
  margin: 0 0 24px;
}

.pc-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-modal:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-modal-primary {
  background: var(--ink, #fff);
  color: var(--canvas, #000);
  border: none;
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink, #fff);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
}

.pc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-2, #777);
}

.pc-modal-footer label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-text {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 13px;
}

.btn-text:hover {
  color: var(--ink, #fff);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
