/* ============================================================
   HolySound — listening UI
   Quiet black surfaces, teal used sparingly (logo stays).
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --bg-card: #181818;
  --bg-card-2: #242424;
  --bg-hover: #2a2a2a;
  --fg: #f5f5f5;
  --fg-muted: #b3b3b3;
  --fg-subtle: #6b6b6b;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --accent: #3dcfbe;
  --accent-soft: rgba(61, 207, 190, 0.14);
  --accent-2: #3dcfbe;
  --good: #3dcfbe;
  --bad: #e57373;
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --radius: 10px;
  --radius-lg: 12px;
  --nav-cols: 4;
}

/* Shared base overrides — drop factory “AI form” tells */
body {
  background: var(--bg);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
.screen {
  padding: 8px 16px 16px;
  animation: none;
}
.section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--fg);
  margin: 28px 0 12px;
  padding-bottom: 0;
  border-bottom: 0;
}
.btn {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 999px;
  padding: 14px 20px;
}
.btn-primary {
  background: var(--fg);
  border-color: var(--fg);
  color: #0a0a0a;
}
.btn-primary:active {
  transform: scale(0.98);
  opacity: 1;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--fg-muted);
}
.btn-ghost:hover,
.btn-ghost:active {
  color: var(--fg);
  background: var(--bg-hover);
}
.input,
.select {
  border-radius: var(--radius);
  border-color: transparent;
  background: var(--bg-card-2);
  font-size: 0.95rem;
}
.input:focus,
.select:focus {
  border-color: transparent;
  outline: 2px solid rgba(61, 207, 190, 0.35);
  outline-offset: 0;
}
.topbar {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.96) 40%, rgba(10, 10, 10, 0.72));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 0;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
}
.screen:not(.active) {
  display: none !important;
}
.app {
  overflow-x: hidden;
}
.bottom-nav {
  background: linear-gradient(180deg, transparent, rgba(10, 10, 10, 0.92) 28%);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border-top: 0;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
}
.nav-btn {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  gap: 4px;
  color: var(--fg-subtle);
}
.nav-btn svg {
  width: 22px;
  height: 22px;
}
.nav-btn.active {
  color: var(--fg);
}
.pro-pill {
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 8px 12px;
  border-radius: 999px;
}
.pro-pill.active {
  background: var(--accent);
  color: #06221e;
}
.list {
  background: transparent;
  border: 0;
  gap: 2px;
  border-radius: 0;
  overflow: visible;
}
.row {
  background: transparent;
  border-radius: var(--radius);
  padding: 10px 8px;
}
.row.tappable:active {
  background: var(--bg-hover);
}
.pricing-card {
  border: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  text-align: left;
  padding: 24px 20px;
}
.pitch-title {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.price {
  font-size: 2.2rem;
  letter-spacing: -0.03em;
}
.price-note,
.trust {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.72rem;
}
.sheet {
  border-top: 0;
  background: var(--bg-card);
  border-radius: 16px 16px 0 0;
  text-align: left;
}
.sheet-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sheet-later {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.ad-slot {
  border: 0;
  background: var(--bg-card);
}

/* Brand — keep the mark; quiet the wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  box-shadow: none;
}
.brand:active { opacity: 0.85; }
.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 0;
  background: none;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
}
.brand-mark svg { display: block; width: 28px; height: 28px; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

#appRoot { padding: 0; }

.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

/* ── Me ── */
.account-card,
.settings-card {
  background: var(--bg-card);
  border: 0;
  border-radius: var(--radius-lg);
}
.account-card {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-benefit {
  margin: 0 0 2px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--fg-muted);
}
.auth-switch {
  background: none;
  border: none;
  color: var(--fg-subtle);
  font-size: 0.8rem;
  letter-spacing: 0;
  cursor: pointer;
  padding: 4px;
}
.auth-msg {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.78rem;
  color: var(--bad);
}
.auth-msg.ok { color: var(--fg-muted); }
.auth-msg.ok a { color: var(--accent); }
.auth-row { display: flex; align-items: center; gap: 12px; }
.auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  display: grid;
  place-items: center;
}
.auth-avatar svg { display: block; width: 40px; height: 40px; }
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-info strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-info span { font-size: 0.75rem; color: var(--fg-subtle); }
#authSignedIn .btn { margin-top: 4px; }
.btn-ghost-danger { color: var(--bad); }

.social-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.social-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
}
.social-btn:active { transform: scale(0.98); background: var(--bg-hover); }
.social-btn.is-soon { opacity: 0.55; }
.social-btn-icon { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; }
.social-btn-icon svg { width: 20px; height: 20px; display: block; }
.social-btn-label { text-align: center; }
.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-subtle);
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.settings-card { overflow: hidden; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row > span { font-size: 0.9rem; }
.settings-value {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-align: right;
  max-width: 58%;
}
.lang-select {
  width: auto;
  min-width: 130px;
  padding: 9px 30px 9px 12px;
  font-size: 0.85rem;
}
.settings-toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.settings-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-toggle-ui {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #3a3a3a;
  border: 0;
  transition: background 0.15s ease;
}
.settings-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.settings-toggle input:checked + .settings-toggle-ui { background: var(--accent); }
.settings-toggle input:checked + .settings-toggle-ui::after { transform: translateX(18px); }
.settings-toggle input:focus-visible + .settings-toggle-ui {
  outline: 2px solid rgba(61, 207, 190, 0.45);
  outline-offset: 2px;
}

.legal-links { text-align: center; font-size: 0.78rem; margin: 24px 0 0; }
.legal-links a { color: var(--fg-subtle); text-decoration: none; }
#screen-me .ad-slot { margin: 18px 0 0; }
.version {
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-subtle);
  margin: 20px 0 4px;
}

.me-pro-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 20%, rgba(61, 207, 190, 0.22), transparent 50%),
    var(--bg-card);
}
.me-pro-card.is-pro {
  background:
    radial-gradient(circle at 90% 20%, rgba(61, 207, 190, 0.32), transparent 52%),
    var(--bg-card);
}
.me-pro-copy { flex: 1; min-width: 0; }
.me-pro-copy strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.me-pro-sub {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--fg-muted);
}
.me-pro-cta {
  width: auto;
  flex-shrink: 0;
  min-width: 96px;
  padding: 12px 16px;
  font-size: 0.82rem;
}
.me-pro-card.is-pro .me-pro-cta {
  background: var(--bg-card-2);
  border-color: transparent;
  color: var(--fg);
}

.settings-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 16px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.settings-card > .settings-link:first-child,
.settings-card > .settings-row + .settings-link { border-top: 1px solid var(--line); }
.settings-card > .settings-link:first-child { border-top: 0; }
.settings-link:active { background: rgba(255, 255, 255, 0.05); }
.settings-link-danger { color: var(--bad); }
.help-sheet { text-align: left; }
.help-body {
  max-height: 50vh;
  overflow: auto;
  margin: 8px 0 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--fg-muted);
}
.help-body strong {
  display: block;
  margin-top: 14px;
  color: var(--fg);
  font-size: 0.9rem;
}
.help-body p { margin: 4px 0 0; }
.help-body p:first-child strong { margin-top: 0; }

/* ── Pro ── */
.plan-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.plan-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 6px 12px;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
}
.plan-chip.active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.plan-chip .plan-name {
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-muted);
}
.plan-chip.active .plan-name { color: var(--fg); }
.plan-chip .plan-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.plan-chip .plan-price small {
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: var(--fg-subtle);
  margin-left: 1px;
}
.plan-chip .plan-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--fg);
  color: #0a0a0a;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 3px 8px;
  border-radius: 99px;
}
.btn-glow { box-shadow: none; }

/* ── House ad ── */
.house-ad {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  padding: 2px 0;
}
.ad-tag {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg-subtle);
  padding: 4px 7px;
  border-radius: 4px;
}
.house-body { flex: 1; min-width: 0; }
.house-body strong { display: block; font-size: 0.88rem; }
.house-body span { display: block; color: var(--fg-muted); font-size: 0.75rem; margin-top: 2px; }

.sheet-input { margin-bottom: 14px; text-align: left; }
.range { width: 100%; margin: 4px 0 12px; accent-color: var(--accent); }

/* ── Home tuner ── */
.hs-composer {
  margin: 4px 0 8px;
  padding: 8px 0 4px;
  text-align: left;
}
.hs-tagline {
  margin: 0 0 18px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--fg);
  text-align: left;
}
.hs-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.hs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hs-field-label {
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-subtle);
  padding-left: 4px;
  font-weight: 500;
}
.hs-input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  box-sizing: border-box;
}
.hs-input::placeholder { color: var(--fg-subtle); opacity: 1; }
.hs-input:focus {
  outline: none;
  background: #2f2f2f;
  box-shadow: none;
}
.hs-hz-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 72px;
  padding: 0 18px;
  border-radius: var(--radius-lg);
  border: 0;
  background: var(--bg-card);
  box-sizing: border-box;
}
.hs-field-hz:focus-within .hs-hz-box {
  background: var(--bg-card-2);
  box-shadow: none;
}
.hs-hz-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg);
  line-height: 1;
  padding: 0;
  -moz-appearance: textfield;
}
.hs-hz-input::-webkit-outer-spin-button,
.hs-hz-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hs-hz-unit {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg-muted);
  opacity: 1;
}
.hs-hear {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 4px;
}
.hs-hear.is-on {
  background: var(--bg-card-2);
  border-color: transparent;
  color: var(--fg);
}
.hs-nudge {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--fg-subtle);
  text-align: left;
}
.hs-quota {
  margin: 8px 0 0;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0;
  color: var(--fg-subtle);
}

.hs-wave {
  display: block;
  width: 100%;
  height: 56px;
  margin: 16px 0 8px;
  border-radius: var(--radius);
  background: transparent;
}
.hs-word {
  margin-top: 2px;
  font-size: 0.95rem;
  color: var(--fg);
  font-weight: 600;
  word-break: break-word;
}
.hs-note {
  margin-top: 4px;
  margin-bottom: 2px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  min-height: 1.2em;
  line-height: 1.35;
}
.hs-meta {
  margin-top: 6px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-subtle);
  line-height: 1.4;
}
.hs-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-start;
}
.hs-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin: 16px 0 8px;
}
.hs-play { min-width: 140px; }
.hs-play.is-on {
  background: var(--bg-card-2);
  border-color: transparent;
  color: var(--fg);
}
.hs-fav {
  width: 48px;
  font-size: 1.2rem;
  padding: 0;
  color: var(--fg-muted);
}
.hs-fav.is-on { color: var(--accent); border-color: transparent; }
.hs-vol { display: block; text-align: left; margin-top: 4px; }
.hs-vol span { font-size: 0.75rem; color: var(--fg-subtle); }
.hs-vol .range { margin: 6px 0 10px; }

.hs-waves {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.hs-wave-btn {
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg-muted);
  font-size: 0.72rem;
  letter-spacing: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
}
.hs-wave-btn.active {
  background: var(--fg);
  color: #0a0a0a;
}
.hs-wave-btn.locked { opacity: 0.4; }

.hs-chip {
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.hs-chip em {
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
  font-size: 0.74rem;
}
.hs-chip:active { transform: scale(0.97); background: var(--bg-hover); }
.hs-empty { font-size: 0.8rem; color: var(--fg-subtle); }
.hs-disclaimer {
  margin: 18px 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--fg-subtle);
  text-align: left;
}
.hs-wave-lock { margin-top: 10px; }
.hs-wave-lock .locked-more { width: 100%; }

/* ── Listening system ── */
.app { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.ms-h1 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.ms-sub {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.4;
}
.ms-greeting { margin-bottom: 4px; }
.ms-section { margin: 22px 0 6px; }
.ms-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ms-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-transform: none;
}
.ms-text-btn {
  border: none;
  background: none;
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
}
.ms-text-btn:active { color: var(--fg); }
.ms-empty { margin: 0; font-size: 0.8rem; color: var(--fg-subtle); }

.ms-jump { display: none; }

.ms-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 4px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ms-filters::-webkit-scrollbar { display: none; }
.ms-filter {
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.ms-filter.active {
  background: var(--fg);
  color: #0a0a0a;
}

.ms-continue {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin: 14px 0 4px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.ms-continue:active { background: var(--bg-hover); }
.ms-continue-art {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(61, 207, 190, 0.55), transparent 55%),
    linear-gradient(145deg, #1a3a34 0%, #0f1a18 55%, #1c2422 100%);
  border: 0;
}
.ms-continue-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-continue-meta strong {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-continue-meta span {
  font-size: 0.75rem;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-kicker {
  font-size: 0.68rem !important;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-subtle) !important;
  font-weight: 500;
}
.ms-continue-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fg);
  color: #0a0a0a;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.ms-station-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ms-session-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 420px) {
  .ms-session-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.ms-session {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  overflow: visible;
}
.ms-session:active { opacity: 0.85; }
.ms-session strong {
  padding: 0 2px;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.ms-session span {
  padding: 0 2px;
  font-size: 0.72rem;
  color: var(--fg-subtle);
  line-height: 1.35;
}
.ms-session-art {
  height: 132px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.ms-session-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}
.ms-session-art::after {
  content: attr(data-glyph);
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.55;
  filter: saturate(0.8);
  pointer-events: none;
}
.ms-toy-section .ms-sub {
  margin-top: -4px;
  margin-bottom: 14px;
}
.hs-composer-toy {
  margin: 0;
  padding: 0;
}
.hs-composer-toy .hs-hz-box {
  height: 64px;
}
.hs-composer-toy .hs-hz-input {
  font-size: 1.85rem;
}
.ms-station {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  overflow: visible;
}
.ms-station:active { opacity: 0.85; }
.ms-station strong {
  padding: 0 2px;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.ms-station span {
  padding: 0 2px;
  font-size: 0.72rem;
  color: var(--fg-subtle);
  line-height: 1.35;
}
.ms-station-art {
  height: 118px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.ms-station-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}
.ms-station-art::after {
  content: attr(data-glyph);
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.55;
  filter: saturate(0.8);
  pointer-events: none;
}
.ms-art-solfeggio {
  background:
    repeating-radial-gradient(circle at 42% 48%, rgba(61, 207, 190, 0.22) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, #0d2a26 0%, #16352f 40%, #061412 100%);
}
.ms-art-solfeggio::before {
  background:
    radial-gradient(circle at 70% 20%, rgba(180, 255, 230, 0.25), transparent 40%),
    conic-gradient(from 210deg at 40% 55%, transparent 0 60%, rgba(61, 207, 190, 0.18) 70%, transparent 100%);
}
.ms-art-sleep {
  background:
    linear-gradient(180deg, #0a1020 0%, #121a2e 45%, #070b14 100%);
}
.ms-art-sleep::before {
  background:
    radial-gradient(circle at 72% 28%, rgba(220, 230, 255, 0.55) 0 7%, transparent 8%),
    radial-gradient(circle at 68% 30%, rgba(10, 16, 32, 0.95) 0 9%, transparent 10%),
    radial-gradient(ellipse at 30% 80%, rgba(90, 120, 200, 0.2), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255,255,255,0.03) 10px 11px);
}
.ms-art-focus {
  background:
    linear-gradient(145deg, #1c160c 0%, #2a2418 50%, #0e0c08 100%);
}
.ms-art-focus::before {
  background:
    linear-gradient(115deg, transparent 35%, rgba(240, 200, 90, 0.35) 49%, transparent 52%),
    linear-gradient(115deg, transparent 55%, rgba(240, 200, 90, 0.18) 62%, transparent 65%),
    radial-gradient(circle at 22% 70%, rgba(255, 210, 120, 0.2), transparent 40%);
}
.ms-art-love {
  background:
    linear-gradient(160deg, #2a1218 0%, #1a0c12 55%, #10080c 100%);
}
.ms-art-love::before {
  background:
    radial-gradient(circle at 38% 48%, rgba(230, 100, 140, 0.45) 0 18%, transparent 19%),
    radial-gradient(circle at 58% 48%, rgba(230, 100, 140, 0.45) 0 18%, transparent 19%),
    radial-gradient(circle at 48% 62%, rgba(230, 100, 140, 0.4) 0 22%, transparent 23%),
    radial-gradient(circle at 80% 18%, rgba(255, 160, 180, 0.15), transparent 40%);
}
.ms-art-earth {
  background:
    linear-gradient(180deg, #14301c 0%, #0c1810 40%, #1a2818 70%, #0a100c 100%);
}
.ms-art-earth::before {
  background:
    repeating-linear-gradient(180deg,
      transparent 0 12px,
      rgba(120, 180, 110, 0.08) 12px 13px,
      transparent 13px 26px,
      rgba(90, 140, 80, 0.06) 26px 27px),
    radial-gradient(circle at 50% 20%, rgba(140, 200, 120, 0.25), transparent 45%);
}
.ms-art-chakra {
  background:
    linear-gradient(180deg,
      #4a2030 0%,
      #5a3820 16%,
      #5a5020 32%,
      #205030 48%,
      #203850 64%,
      #302060 80%,
      #401850 100%);
}
.ms-art-chakra::before {
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255,255,255,0.12) 49% 51%, transparent 58%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12), transparent 35%);
}

/* Per-track / per-station mini art variants for player chrome */
.np-art,
.ms-continue-art,
.fp-hero-art {
  background-size: cover;
}
.art-tone-teal {
  background:
    radial-gradient(circle at 30% 30%, rgba(61, 207, 190, 0.55), transparent 55%),
    linear-gradient(145deg, #1a3a34, #0f1a18) !important;
}
.art-tone-indigo {
  background:
    radial-gradient(circle at 70% 25%, rgba(140, 160, 255, 0.4), transparent 50%),
    linear-gradient(160deg, #151d2e, #0c1018) !important;
}
.art-tone-amber {
  background:
    linear-gradient(115deg, transparent 40%, rgba(240, 200, 90, 0.35) 50%, transparent 58%),
    linear-gradient(145deg, #2a2418, #12100c) !important;
}
.art-tone-rose {
  background:
    radial-gradient(circle at 40% 45%, rgba(230, 100, 140, 0.45), transparent 50%),
    linear-gradient(160deg, #2a161c, #120c10) !important;
}
.art-tone-moss {
  background:
    repeating-linear-gradient(180deg, transparent 0 8px, rgba(120,180,110,0.12) 8px 9px),
    linear-gradient(160deg, #18241c, #0c120e) !important;
}
.art-tone-violet {
  background:
    linear-gradient(180deg, #3a2048, #1c1228 60%, #120c18) !important;
}
.art-tone-gold {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 210, 120, 0.35), transparent 55%),
    linear-gradient(160deg, #2a2210, #141008) !important;
}
.art-tone-sky {
  background:
    radial-gradient(circle at 60% 30%, rgba(120, 200, 255, 0.35), transparent 50%),
    linear-gradient(160deg, #102030, #0a1218) !important;
}

.ms-tracklist { display: flex; flex-direction: column; gap: 2px; }
.ms-row-wrap { display: flex; align-items: center; gap: 2px; }
.ms-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.ms-row-wrap .ms-row { flex: 1; min-width: 0; }
.ms-row:active,
.ms-row:hover { background: rgba(255, 255, 255, 0.06); }
.ms-row-idx {
  width: 18px;
  font-size: 0.8rem;
  color: var(--fg-subtle);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ms-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-row-body strong {
  font-size: 0.92rem;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-row-body span {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.ms-row-play {
  color: var(--fg-subtle);
  font-size: 0.7rem;
  width: 20px;
  text-align: center;
  opacity: 0;
}
.ms-row:hover .ms-row-play,
.ms-row:active .ms-row-play { opacity: 1; color: var(--fg); }
.ms-row-x {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-subtle);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
}
.ms-row-x:active {
  color: var(--bad);
  background: rgba(255, 255, 255, 0.06);
}
.ms-save-hint {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--fg-subtle);
}
.ms-back {
  border: none;
  background: none;
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0 0 12px;
  cursor: pointer;
}
.ms-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ms-col-head .ms-h1 { margin-bottom: 2px; }
.ms-col-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.ms-collection-row .ms-col-art {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, rgba(61, 207, 190, 0.35), rgba(20, 30, 28, 0.95));
  border: 0;
}
.col-save-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 14px;
  max-height: 40vh;
  overflow: auto;
}
.col-save-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-card-2);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}
.col-save-item strong { font-size: 0.9rem; }
.col-save-item span { font-size: 0.75rem; color: var(--fg-subtle); }
.col-save-item.is-on {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.ms-search-form { margin-bottom: 10px; }
.ms-search-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  border: 0;
  background: var(--bg-card-2);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
}
.ms-search-input:focus {
  outline: none;
  background: #2f2f2f;
  box-shadow: none;
}
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Now playing — compact Spotify-style bar ── */
.now-playing {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  width: min(430px, 100%);
  z-index: 30;
  padding: 0 8px;
  pointer-events: none;
}
.now-playing > * { pointer-events: auto; }

.np-main {
  border: 0;
  border-radius: 8px;
  background: #1a1a1a;
  backdrop-filter: none;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}
.np-wave { display: none; }
.np-progress {
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  margin: 0;
  overflow: hidden;
}
.np-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}
.np-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 4px;
}
.np-art {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(61, 207, 190, 0.5), transparent 55%),
    linear-gradient(145deg, #1a3a34, #0f1a18);
}
.np-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 0;
  min-width: 0;
  flex: 1;
}
.np-meta strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-meta span {
  font-size: 0.7rem;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-times { display: none; }
.np-controls { display: none; }
.np-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
}
.np-btn.is-on { color: var(--accent); }
.np-play {
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--fg);
  font-size: 0.85rem;
}
.np-vol { display: none; }

html.has-now-playing .app {
  padding-bottom: calc(72px + 72px + env(safe-area-inset-bottom, 0px));
}
html.player-open .now-playing,
html.player-open .bottom-nav {
  visibility: hidden;
  pointer-events: none;
}

.ms-row-more {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-subtle);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.ms-row-more:active {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

/* Full player */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0a0a0a;
  display: flex;
  justify-content: center;
}
.player-sheet {
  width: min(430px, 100%);
  height: 100%;
  overflow: auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.fp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.fp-chevron,
.fp-more {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  font-size: 1.2rem;
  cursor: pointer;
  font-family: inherit;
}
.fp-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fp-art {
  width: min(72vw, 280px);
  aspect-ratio: 1;
  margin: 8px auto 28px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 28%, rgba(61, 207, 190, 0.55), transparent 52%),
    linear-gradient(160deg, #1a3a34 0%, #0c1412 55%, #1c2422 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.fp-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fp-sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--fg-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fp-progress {
  margin: 22px 0 6px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  touch-action: none;
  position: relative;
}
.fp-progress.is-drone { cursor: default; opacity: 0.55; }
.fp-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: var(--fg);
  pointer-events: none;
}
.fp-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--fg-subtle);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.fp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 4px;
}
.fp-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-muted);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.fp-btn.is-on { color: var(--accent); }
.fp-play {
  width: 64px;
  height: 64px;
  background: var(--fg);
  color: #0a0a0a;
  font-size: 1.15rem;
}
.fp-play:active { transform: scale(0.96); }
.fp-vol {
  display: block;
  margin: 8px 4px 18px;
}
.fp-vol input {
  width: 100%;
  accent-color: var(--accent);
}
.fp-queue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 10px;
}
.fp-queue-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.fp-queue .ms-row.is-current {
  background: rgba(255, 255, 255, 0.06);
}
.fp-queue .ms-row.is-current .ms-row-body strong { color: var(--accent); }

.track-sheet {
  text-align: left;
  padding-top: 20px;
}
.track-sheet-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
}
.track-sheet-head strong {
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-sheet-head span {
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.track-action {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 550;
  padding: 14px 4px;
  cursor: pointer;
  border-radius: 8px;
}
.track-action:active { background: rgba(255, 255, 255, 0.06); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 70;
  max-width: min(320px, calc(100% - 32px));
  padding: 10px 16px;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
html.player-open .toast {
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 431px) {
  .bottom-nav,
  .topbar {
    border-left: 0;
    border-right: 0;
  }
}
