:root {
  color-scheme: light;
  --bg: #efe7d8;
  --ink: #1b1713;
  --text-primary: var(--ink);
  --text-secondary: #625950;
  --accent: #a33a21;
  --accent-soft: #d9a27f;
  --card: #fbf6ee;
  --card-alt: #f4ecde;
  --border: #d6c2a5;
  --muted: #625950;
  --surface-panel: rgba(251, 246, 238, 0.96);
  --surface-panel-soft: rgba(251, 246, 238, 0.66);
  --surface-elevated: rgba(251, 246, 238, 0.98);
  --surface-control: rgba(255,255,255,0.45);
  --surface-control-strong: rgba(255,255,255,0.58);
  --surface-control-soft: rgba(255,255,255,0.42);
  --surface-control-hover: #ede1ce;
  --surface-control-active: #1b1713;
  --surface-control-active-ink: #f7f1e8;
  --surface-switch: rgba(255,255,255,0.72);
  --surface-switch-active: rgba(163, 58, 33, 0.14);
  --surface-modal:
    radial-gradient(circle at top right, rgba(214, 172, 121, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(251, 246, 238, 0.98), rgba(246, 238, 226, 0.98));
  --surface-overlay: rgba(27, 23, 19, 0.36);
  --surface-subtle: rgba(27, 23, 19, 0.04);
  --surface-tab-strip: transparent;
  --shadow-soft: 0 8px 18px rgba(72, 49, 38, 0.07);
  --shadow-elevated: 0 20px 38px rgba(60, 42, 30, 0.14);
  --shadow: 0 18px 40px rgba(36, 28, 20, 0.10);
  --pill: #ede1ce;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-700-normal.woff2') format('woff2');
}
body[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1114;
  --ink: #edf0f4;
  --text-primary: var(--ink);
  --text-secondary: #a8b0be;
  --accent: #ff9269;
  --accent-soft: #ffbf9a;
  --card: #191d23;
  --card-alt: #13171d;
  --border: #323846;
  --muted: #a8b0be;
  --surface-panel: rgba(20, 24, 30, 0.94);
  --surface-panel-soft: rgba(20, 24, 30, 0.72);
  --surface-elevated: rgba(20, 24, 30, 0.98);
  --surface-control: rgba(255,255,255,0.04);
  --surface-control-strong: rgba(255,255,255,0.06);
  --surface-control-soft: rgba(255,255,255,0.04);
  --surface-control-hover: rgba(255,255,255,0.08);
  --surface-control-active: #edf0f4;
  --surface-control-active-ink: #101419;
  --surface-switch: rgba(255,255,255,0.04);
  --surface-switch-active: rgba(255, 146, 105, 0.18);
  --surface-modal: rgba(20, 24, 30, 0.96);
  --surface-overlay: rgba(5, 8, 12, 0.62);
  --surface-subtle: rgba(255,255,255,0.04);
  --surface-tab-strip: rgba(24, 28, 35, 0.72);
  --shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.18);
  --shadow-elevated: 0 20px 38px rgba(0, 0, 0, 0.34);
  --shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
  --pill: #20262e;
}
* { box-sizing: border-box; }
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(163, 58, 33, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(111, 89, 57, 0.12), transparent 22%),
    linear-gradient(180deg, #eadfcb 0%, var(--bg) 100%);
  color: var(--text-primary);
}
body[data-theme='dark'] {
  background:
    radial-gradient(circle at top left, rgba(255, 146, 105, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(87, 110, 169, 0.18), transparent 24%),
    linear-gradient(180deg, #12161d 0%, #0c1015 100%);
}
body[data-theme='dark'] .tab-button.active,
body[data-theme='dark'] .tab-overflow-item.active,
body[data-theme='dark'] .sync-button.primary,
body[data-theme='dark'] .favorite-button.active {
  background: var(--surface-control-active);
  color: var(--surface-control-active-ink);
}
body[data-theme='dark'] .favorite-button {
  background: var(--surface-control-strong);
}
body[data-theme='dark'] .meta-link {
  text-decoration-color: rgba(255, 146, 105, 0.45);
}
body[data-theme='dark'] .cover-placeholder,
body[data-theme='dark'] .store-add-logo-fallback {
  background: linear-gradient(135deg, rgba(47, 54, 66, 0.78), rgba(26, 30, 38, 0.96));
}
body[data-theme='dark'] .card img,
body[data-theme='dark'] .store-add-preview-cover img {
  background: #13171d;
}
body[data-theme='dark'] .cover-placeholder {
  background: linear-gradient(135deg, rgba(33, 38, 47, 0.98), rgba(18, 21, 27, 0.98));
  color: #8a94a3;
}
body[data-theme='dark'] .store-add-list-button,
body[data-theme='dark'] .store-add-preview-shell,
body[data-theme='dark'] .store-add-preview-card,
body[data-theme='dark'] .store-add-preview-loading,
body[data-theme='dark'] .store-add-preview-empty,
body[data-theme='dark'] .store-add-empty,
body[data-theme='dark'] .store-add-logo,
body[data-theme='dark'] .store-add-status,
body[data-theme='dark'] .setting-switch-track {
  background: var(--surface-control-soft);
  color: var(--text-primary);
}
body[data-theme='dark'] .store-add-preview-shell,
body[data-theme='dark'] .store-add-preview-card,
body[data-theme='dark'] .store-add-list-button,
body[data-theme='dark'] .store-add-logo,
body[data-theme='dark'] .store-add-preview-loading,
body[data-theme='dark'] .store-add-preview-empty,
body[data-theme='dark'] .store-add-empty,
body[data-theme='dark'] .setting-switch-track {
  border-color: var(--border);
}
body[data-theme='dark'] .setting-switch-thumb {
  background: var(--surface-control-active);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.34);
}
body[data-theme='dark'] .setting-switch-control input:checked + .setting-switch-track {
  background: var(--surface-switch-active);
  border-color: rgba(255, 146, 105, 0.34);
}
body[data-theme='dark'] .store-add-list-button.is-selected {
  background: rgba(255, 146, 105, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
body[data-theme='dark'] .store-add-list-button.is-focused {
  background: rgba(255, 146, 105, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
body[data-theme='dark'] .store-add-preview-toggle {
  background: rgba(26, 31, 37, 0.88);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
body[data-theme='dark'] .store-add-preview-toggle.is-selected {
  background: rgba(108, 190, 145, 0.16);
  border-color: rgba(108, 190, 145, 0.22);
  color: #98ddb9;
}
body[data-theme='dark'] .store-add-list-badge {
  background: rgba(108, 190, 145, 0.14);
  color: #87d6ae;
}
body[data-theme='dark'] .store-add-list-state.is-focused {
  background: rgba(108, 190, 145, 0.16);
  color: #98ddb9;
}
body[data-theme='dark'] .store-add-list-state.is-filtered {
  background: rgba(149, 165, 255, 0.14);
  color: #bcc7ff;
}
body[data-theme='dark'] .store-add-list-summary-chip {
  background: rgba(26, 31, 37, 0.82);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
body[data-theme='dark'] .store-add-name-field input {
  background: rgba(26, 31, 37, 0.88);
  border-color: var(--border);
}
body[data-theme='dark'] .store-add-backdrop,
body[data-theme='dark'] .store-remove-backdrop {
  background: var(--surface-overlay);
}
body[data-theme='dark'] .store-panel-status {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
body[data-theme='dark'] .store-panel-status.is-stale {
  background: rgba(255, 146, 105, 0.14);
  color: #ffbf9a;
}
body[data-theme='dark'] .store-panel-status.is-error {
  background: rgba(255, 105, 105, 0.14);
  color: #ffb0b0;
}
body[data-theme='dark'] .store-panel-retry {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-secondary);
}
body[data-theme='dark'] .store-panel-retry:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: var(--text-primary);
}
body[data-theme='dark'] .sync-panel {
  background: var(--surface-subtle);
}
body[data-theme='dark'] .sync-copy strong,
body[data-theme='dark'] .sync-status,
body[data-theme='dark'] .sync-copy p {
  color: var(--text-secondary);
}
body[data-theme='dark'] .sync-copy strong {
  color: var(--text-primary);
}
body[data-theme='dark'] .card[data-heard='true'] {
  position: relative;
  background:
    linear-gradient(180deg, rgba(39, 37, 34, 0.98) 0%, rgba(24, 23, 22, 0.98) 100%);
  border-color: rgba(142, 133, 126, 0.42);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
body[data-theme='dark'] .card[data-heard='true'] .eyebrow,
body[data-theme='dark'] .card[data-heard='true'] .catalog-line,
body[data-theme='dark'] .card[data-heard='true'] .tracklink,
body[data-theme='dark'] .card[data-heard='true'] .description-toggle {
  color: #b8aba2;
}
body[data-theme='dark'] .card[data-heard='true'] .meta,
body[data-theme='dark'] .card[data-heard='true'] .description,
body[data-theme='dark'] .card[data-heard='true'] .trackbox summary,
body[data-theme='dark'] .card[data-heard='true'] .tracklist,
body[data-theme='dark'] .card[data-heard='true'] .chip {
  color: #c8c1bb;
}
body[data-theme='dark'] .card[data-heard='true'] .title,
body[data-theme='dark'] .card[data-heard='true'] .meta-link {
  color: #f4f1ed;
}
body[data-theme='dark'] .card[data-heard='true'] .chip {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(184, 171, 162, 0.10);
}
body[data-theme='dark'] .card[data-heard='true'] .chip-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(184, 171, 162, 0.16);
  color: #fbf8f4;
}
body[data-theme='dark'] .card[data-heard='true'] .meta-link {
  text-decoration-color: rgba(184, 171, 162, 0.34);
}
body[data-theme='dark'] .card[data-heard='true'] .title {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}
body[data-theme='dark'] .card[data-heard='true'] .description-toggle:hover,
body[data-theme='dark'] .card[data-heard='true'] .tracklink:hover {
  color: #d8c8bf;
}
body[data-theme='dark'] .card[data-heard='true'] .trackbox {
  border-top-color: rgba(184, 171, 162, 0.16);
}
html.store-add-scroll-lock,
body.store-add-scroll-lock {
  overflow: hidden;
}
body.store-add-scroll-lock {
  position: fixed;
  width: 100%;
}
main { max-width: 1280px; margin: 0 auto; padding: 28px 18px 64px; }
.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--surface-panel);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.masthead-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.masthead-logo {
  display: block;
  width: 56px;
  height: auto;
  flex: 0 0 auto;
}
body[data-theme='dark'] .masthead-logo {
  filter: invert(1) brightness(1.08) contrast(0.92);
}
h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 0.94;
}
p.lead { max-width: 760px; margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.masthead-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.masthead-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(100%, 380px);
}
.settings-menu {
  position: relative;
  width: auto;
  align-self: flex-end;
}
.settings-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.84rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-soft);
  user-select: none;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
  box-shadow: var(--shadow-soft);
}
.settings-menu summary:hover {
  background: var(--surface-control-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.settings-menu summary::-webkit-details-marker {
  display: none;
}
.settings-menu-label {
  display: flex;
  align-items: center;
  font-weight: 600;
}
.settings-menu-caret {
  color: var(--muted);
  font-size: 0.82rem;
  transition: transform 120ms ease;
}
.settings-menu[open] .settings-menu-caret {
  transform: rotate(180deg);
}
.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(340px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-elevated);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-elevated);
}
.summary-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  background: var(--pill);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}
.top-setting {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-control-soft);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.4;
  cursor: pointer;
}
.top-setting input {
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.top-setting strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.top-setting-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.setting-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.setting-switch-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}
.setting-switch-control {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
}
.setting-switch-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.setting-switch-track {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-switch);
  transition: background 140ms ease, border-color 140ms ease;
}
.setting-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--text-primary);
  box-shadow: 0 4px 10px rgba(36, 28, 20, 0.18);
  transition: transform 140ms ease, background 140ms ease;
}
.setting-switch-control input:checked + .setting-switch-track {
  background: var(--surface-switch-active);
  border-color: rgba(163, 58, 33, 0.28);
}
.setting-switch-control input:checked + .setting-switch-track + .setting-switch-thumb {
  transform: translateX(22px);
}
.setting-switch-control input:focus-visible + .setting-switch-track {
  outline: 2px solid rgba(163, 58, 33, 0.22);
  outline-offset: 2px;
}
.sync-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-control-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sync-copy strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.sync-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}
.sync-status {
  color: var(--text-secondary);
  font-size: 0.81rem;
  line-height: 1.4;
}
.sync-status[data-tone='error'] {
  color: var(--accent);
}
.sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sync-button,
.sync-link {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-control-strong);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.81rem;
  text-decoration: none;
  cursor: pointer;
}
.sync-button.primary {
  background: var(--surface-control-active);
  border-color: var(--surface-control-active);
  color: var(--surface-control-active-ink);
}
.sync-button[hidden],
.sync-link[hidden],
.sync-qr[hidden],
.sync-pairing-link[hidden] {
  display: none !important;
}
.sync-qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: white;
  padding: 8px;
}
.sync-pairing-link {
  word-break: break-all;
  color: var(--accent);
  font-size: 0.78rem;
  line-height: 1.4;
}
.sync-debug {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font: 0.76rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.sync-debug[hidden] {
  display: none !important;
}
.store { margin-top: 42px; }
.tab-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 12px;
}
.tabs-region {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  position: relative;
}
.tab-strip-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.tab-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  isolation: isolate;
}
.tab-chip-removing {
  z-index: 1;
}
.tab-chip-removing:hover {
  z-index: 2;
}
.store-add-shell {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab-overflow-shell {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.tab-button-overflow {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
}
.tab-overflow-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 40px));
  max-height: min(360px, calc(100vh - 180px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow);
  z-index: 32;
}
.tab-overflow-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tab-overflow-item:hover {
  background: var(--surface-control-hover);
}
.tab-overflow-item.active {
  background: var(--surface-control-active);
  color: var(--surface-control-active-ink);
}
.store-add-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 39;
}
.store-remove-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 39;
}
.tab-button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-control);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.tab-button:hover {
  background: var(--surface-control-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.tab-button.active {
  background: var(--surface-control-active);
  color: var(--surface-control-active-ink);
  border-color: var(--surface-control-active);
}
.tab-button-add {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}
.tab-button-remove-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}
.tab-chip-removing .tab-button {
  perspective: 220px;
}
.tab-chip-removing .tab-button .store-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-origin: center;
  backface-visibility: hidden;
  animation: tab-count-flip-out 220ms cubic-bezier(0.3, 0.9, 0.25, 1) both;
}
.tab-remove-button {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 10px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(163, 58, 33, 0.18);
  background: rgba(163, 58, 33, 0.10);
  color: var(--accent);
  border-radius: 999px;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(163, 58, 33, 0.10);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease, opacity 120ms ease;
  animation: tab-remove-flip-in 220ms cubic-bezier(0.3, 0.9, 0.25, 1) both;
  transform-origin: center;
  backface-visibility: hidden;
}
.tab-remove-button:hover {
  background: rgba(163, 58, 33, 0.18);
  border-color: rgba(163, 58, 33, 0.28);
  color: var(--accent);
  transform: translateY(-50%) scale(1.06);
}
.tab-chip-removing.is-active .tab-remove-button:hover {
  background: rgba(247,241,232,0.24);
  color: #f7f1e8;
}
.tab-chip-removing.is-active .tab-remove-button {
  background: rgba(247,241,232,0.14);
  border-color: rgba(247,241,232,0.22);
  color: #f7f1e8;
  box-shadow: none;
}
@keyframes tab-count-flip-out {
  0% {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotateY(88deg) scale(0.84);
  }
}
@keyframes tab-remove-flip-in {
  0% {
    opacity: 0;
    transform: translateY(-50%) rotateY(-88deg) scale(0.82);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) rotateY(0deg) scale(1);
  }
}
.tab-button-add[disabled] {
  cursor: default;
  opacity: 0.55;
  transform: none;
}
.tab-button-remove-toggle[disabled] {
  cursor: default;
  opacity: 0.55;
  transform: none;
}
.store-add-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1040px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 52px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-modal);
  box-shadow: 0 32px 88px rgba(30, 23, 18, 0.24);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 40;
  overflow: hidden;
}
.store-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.store-add-header-spacer {
  flex: 1 1 auto;
}
.store-remove-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-elevated);
  box-shadow: 0 28px 64px rgba(30, 23, 18, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 40;
}
.store-add-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-strong);
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
  z-index: 2;
  flex: 0 0 auto;
}
.store-add-back {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-strong);
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
  z-index: 2;
  flex: 0 0 auto;
}
.store-remove-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-strong);
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
}
.store-add-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(100%, 430px);
  padding-left: 10px;
  padding-right: 18px;
}
.store-add-panel-copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.store-add-panel-copy strong {
  font-size: 1.05rem;
}
.store-add-panel-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.store-add-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 4px;
  border: 1px solid rgba(150, 120, 87, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
}
.store-add-mode-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  width: 100%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
.store-add-mode-button.active {
  background: var(--surface-control-strong);
  color: var(--text-primary);
  box-shadow: 0 6px 14px rgba(72, 49, 38, 0.08);
}
.store-add-filter-toggle {
  flex: 0 0 auto;
  min-width: 0;
  max-width: min(52%, 320px);
  padding-inline: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-add-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(150, 120, 87, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
.store-add-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.store-add-filter-head strong {
  font-size: 0.94rem;
}
.store-add-focused-store {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
}
.store-add-selected-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.store-add-selected-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.store-add-selected-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(150, 120, 87, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}
.store-add-selected-chip span {
  color: var(--muted);
}
.store-add-selected-chip.is-active {
  border-color: rgba(145, 91, 53, 0.32);
  background: rgba(249, 237, 220, 0.92);
}
.store-add-filter-close {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(72, 49, 38, 0.08);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}
.store-add-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}
.store-add-filter-field span {
  color: var(--ink);
  font-weight: 600;
}
.store-add-filter-field input {
  width: 100%;
  border: 1px solid rgba(150, 120, 87, 0.22);
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}
.store-add-filter-field input:focus {
  outline: 2px solid rgba(145, 91, 53, 0.18);
  border-color: rgba(145, 91, 53, 0.32);
}
.store-add-filter-actions {
  display: flex;
  justify-content: flex-end;
}
.store-add-name-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(100%, 720px);
}
.store-add-name-field span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}
.store-add-name-field input {
  width: 100%;
  border: 1px solid rgba(150, 120, 87, 0.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  padding: 11px 13px;
  font: inherit;
}
.store-add-name-field input:focus {
  outline: 2px solid rgba(145, 91, 53, 0.18);
  border-color: rgba(145, 91, 53, 0.32);
}
.store-remove-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 36px;
}
.store-remove-panel-copy strong {
  font-size: 1rem;
}
.store-remove-panel-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}
.store-add-browser {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  flex: 1 1 auto;
}
.store-add-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.store-add-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.store-add-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 112px;
}
.store-add-list-item.is-multi {
  grid-template-columns: minmax(0, 1fr);
}
.store-add-list-button {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(150, 120, 87, 0.2);
  border-radius: 18px;
  background: var(--surface-panel-soft);
  padding: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
  align-items: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.store-add-list-button:hover {
  transform: translateY(-1px);
  border-color: rgba(145, 91, 53, 0.28);
  background: var(--surface-panel);
  box-shadow: 0 10px 24px rgba(72, 49, 38, 0.08);
}
.store-add-list-button.is-selected {
  border-color: rgba(145, 91, 53, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249, 237, 220, 0.92));
  box-shadow: 0 12px 28px rgba(72, 49, 38, 0.10);
}
.store-add-list-button.is-focused {
  border-color: rgba(145, 91, 53, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249, 237, 220, 0.92));
  box-shadow: 0 12px 28px rgba(72, 49, 38, 0.10);
}
.store-add-list-button:focus-visible {
  outline: 2px solid rgba(145, 91, 53, 0.2);
  outline-offset: 2px;
}
.store-add-preview-toggle {
  appearance: none;
  min-width: 124px;
  border: 1px solid rgba(150, 120, 87, 0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
}
.store-add-preview-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(145, 91, 53, 0.3);
}
.store-add-preview-toggle.is-selected {
  border-color: rgba(37, 111, 82, 0.24);
  background: rgba(37, 111, 82, 0.12);
  color: #256f52;
  box-shadow: 0 10px 24px rgba(72, 49, 38, 0.08);
}
.store-add-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5f3924;
  background: var(--surface-elevated);
  border: 1px solid rgba(150, 120, 87, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
.store-add-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: transparent;
}
.store-add-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f4ece1;
}
.store-add-logo-large {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 18px;
  font-size: 1.05rem;
}
.store-add-list-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.store-add-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.store-add-list-row strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.98rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-add-list-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.store-add-list-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(37, 111, 82, 0.10);
  color: #256f52;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.store-add-list-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(145, 91, 53, 0.1);
  color: #7e4d2d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.store-add-list-state.is-selected {
  background: rgba(145, 91, 53, 0.12);
  width: 30px;
  height: 30px;
  padding: 0;
}
.store-add-list-state-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.store-add-list-state.is-focused {
  background: rgba(63, 114, 89, 0.14);
  color: #2f6a51;
}
.store-add-list-state.is-filtered {
  background: rgba(91, 103, 145, 0.12);
  color: #495782;
}
.store-add-list-blurb {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 2px;
}
.store-add-list-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.store-add-list-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(150, 120, 87, 0.16);
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.store-add-preview-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid rgba(150, 120, 87, 0.18);
  border-radius: 22px;
  background: var(--surface-panel-soft);
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.store-add-preview {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}
.store-add-preview-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}
.store-add-preview-brand {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}
.store-add-preview-title {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.store-add-preview-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.store-add-preview-title h3 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}
.store-add-preview-title p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.6;
}
.store-add-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.store-add-preview-stats .store-add-preview-toggle {
  margin-left: auto;
}
.store-add-preview-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.store-add-preview-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}
.store-add-preview-section-head strong {
  color: var(--ink);
  font-size: 1rem;
}
.store-add-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.store-add-preview-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(150, 120, 87, 0.16);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 24px rgba(72, 49, 38, 0.06);
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}
.store-add-preview-cover {
  display: block;
  align-self: start;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #efe7d8;
}
.store-add-preview-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.store-add-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.store-add-preview-eyebrow,
.store-add-preview-meta,
.store-add-preview-description {
  margin: 0;
}
.store-add-preview-eyebrow,
.store-add-preview-meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.store-add-preview-copy h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}
.store-add-preview-copy h4 a {
  color: inherit;
  text-decoration: none;
}
.store-add-preview-copy h4 a:hover {
  text-decoration: underline;
}
.store-line {
  margin: 0;
}
.store-add-preview-description {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.5;
}
.store-add-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.store-add-preview-loading,
.store-add-preview-empty,
.store-add-empty {
  border: 1px dashed rgba(150, 120, 87, 0.24);
  border-radius: 18px;
  background: rgba(255,255,255,0.5);
  padding: 24px 20px;
  color: var(--muted);
  line-height: 1.6;
}
.store-add-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.store-add-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.store-add-actions-primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.store-add-actions-row .sync-button {
  width: auto;
  min-width: 0;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#store-add-filter-toggle {
  flex: 0 1 176px;
  min-width: 92px;
  max-width: 40%;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(150, 120, 87, 0.32);
  box-shadow: none;
}
#store-add-filter-toggle:hover {
  background: rgba(255,255,255,0.72);
  border-color: rgba(150, 120, 87, 0.44);
  color: var(--text-primary);
}
#store-add-select-current {
  flex: 1 1 140px;
  justify-content: center;
  background: rgba(255,255,255,0.78);
  color: var(--text-secondary);
  border-color: rgba(150, 120, 87, 0.28);
  box-shadow: none;
}
#store-add-select-current:hover {
  background: rgba(255,255,255,0.94);
  border-color: rgba(150, 120, 87, 0.4);
  color: var(--text-primary);
}
#store-add-select-current[aria-pressed='true'] {
  background: rgba(95, 140, 116, 0.16);
  border-color: rgba(95, 140, 116, 0.38);
  color: #2d6a4f;
}
#store-add-select-current[aria-pressed='true']:hover {
  background: rgba(95, 140, 116, 0.22);
  border-color: rgba(95, 140, 116, 0.46);
  color: #22553f;
}
#store-add-submit {
  flex: 1.2 1 220px;
  min-width: 0;
  padding-inline: 18px;
  box-shadow: 0 12px 24px rgba(33, 26, 21, 0.16);
}
#store-add-submit:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(33, 26, 21, 0.2);
}
#store-add-submit:disabled {
  box-shadow: none;
}
.store-add-status {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.store-add-status.is-added {
  color: #256f52;
}
.store-remove-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.store-remove-actions .sync-button {
  min-width: 88px;
}
.heard-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface-control-soft);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  user-select: none;
  margin-left: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: fit-content;
}
.heard-filter input {
  margin: 0;
  accent-color: var(--accent);
}
body[data-theme='dark'] .heard-filter {
  border-color: rgba(124, 135, 153, 0.32);
  background: rgba(255, 255, 255, 0.04);
  color: #c6ceda;
}
body[data-theme='dark'] .heard-filter:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #edf0f4;
}
body[data-theme='dark'] .heard-filter input {
  accent-color: #ff9269;
}
@media (max-width: 1180px) and (min-width: 641px) {
  .tab-strip {
    align-items: center;
    gap: 12px;
  }
  .tabs-region {
    flex: 1 1 auto;
    min-width: 0;
  }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-bottom: 2px;
    scroll-behavior: smooth;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tabs-region.has-left-fade .tabs,
  .tabs-region.has-right-fade .tabs {
    --tab-fade-left: 0px;
    --tab-fade-right: 0px;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 var(--tab-fade-left),
      #000 calc(100% - var(--tab-fade-right)),
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 var(--tab-fade-left),
      #000 calc(100% - var(--tab-fade-right)),
      transparent 100%
    );
  }
  .tabs-region.has-left-fade .tabs {
    --tab-fade-left: 30px;
  }
  .tabs-region.has-right-fade .tabs {
    --tab-fade-right: 30px;
  }
  .tab-button,
  .tab-chip {
    flex: 0 0 auto;
  }
  .tab-strip-controls {
    flex: 0 0 auto;
    min-width: fit-content;
    justify-content: flex-end;
    gap: 8px;
  }
  .heard-filter {
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
  }
}
@media (max-width: 920px) and (min-width: 641px) {
  .tab-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .tabs-region {
    width: 100%;
    min-width: 0;
  }
  .tab-strip-controls {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}
.store-panel { display: none; }
.store-panel.active { display: block; }
.store-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  position: relative;
}
.store-head-copy {
  min-width: 0;
}
.store-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.store h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.65rem;
  margin: 0;
  letter-spacing: -0.03em;
}
.store-count { color: var(--muted); font-size: 0.9rem; }
.store-panel-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 180px;
  min-width: min(100%, 180px);
  max-width: 220px;
}
.store-panel-search-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.store-panel-search-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-soft);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.store-panel-search-trigger:hover {
  background: var(--surface-control-hover);
  color: var(--text-primary);
}
.store-panel-search-trigger[aria-expanded='true'] {
  background: var(--surface-control-active);
  border-color: var(--surface-control-active);
  color: var(--surface-control-active-ink);
}
.store-panel-search-trigger .store-panel-search-icon {
  position: static;
  flex: 0 0 auto;
}
.store-panel-search-trigger span {
  display: inline-flex;
  align-items: center;
}
.store-panel-search-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 35;
  min-width: min(360px, calc(100vw - 36px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-elevated);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.store-panel-search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  width: 17px;
  height: 17px;
  display: block;
  pointer-events: none;
}
.store-panel-search-input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-control-soft);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8rem;
  padding: 7px 30px 7px 30px;
  box-shadow: var(--shadow-soft);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
.store-panel-search-input::placeholder {
  color: var(--muted);
}
.store-panel-search-input:focus {
  outline: none;
  border-color: rgba(163, 58, 33, 0.42);
  background: var(--surface-control-hover);
  box-shadow: 0 0 0 3px rgba(163, 58, 33, 0.10);
}
.store-panel-search-clear {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.store-panel-search-clear:hover {
  background: rgba(163, 58, 33, 0.10);
  color: var(--accent);
  transform: scale(1.05);
}
body[data-theme='dark'] .store-panel-search-trigger[aria-expanded='true'] {
  background: var(--surface-control-active);
  color: var(--surface-control-active-ink);
}
.store-panel-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(72, 49, 38, 0.08);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.store-panel-status.is-stale {
  background: rgba(163, 58, 33, 0.08);
  color: var(--accent);
}
.store-panel-status.is-error {
  background: rgba(127, 41, 28, 0.1);
  color: #8f3d2f;
}
.store-panel-retry {
  border: 1px solid rgba(150, 120, 87, 0.24);
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  min-height: 28px;
}
.store-panel-retry:hover {
  color: var(--text-primary);
  border-color: rgba(150, 120, 87, 0.38);
  background: rgba(255,255,255,0.92);
}
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
#app-root[data-card-size='small'] .grid {
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.store-panel .grid {
  transition: opacity 220ms ease;
}
.store-panel.filtering .grid {
  opacity: 0.68;
}
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-alt) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  content-visibility: auto;
  contain-intrinsic-size: 420px 860px;
}
#app-root[data-card-size='small'] .card {
  contain-intrinsic-size: 340px 700px;
}
.grid-loading {
  margin-bottom: 12px;
}
.panel-load-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}
.virtualized-panel-shell {
  position: relative;
}
.sectioned-panel-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sectioned-panel-section {
  min-height: 0;
}
.virtualized-panel-spacer {
  width: 100%;
  pointer-events: none;
}
.virtualized-panel-grid {
  min-height: 0;
}
.card-skeleton {
  pointer-events: none;
}
.card-skeleton .chip,
.card-skeleton .trackbox,
.card-skeleton .cover-placeholder {
  border-color: transparent;
}
.skeleton-block,
.skeleton-line,
.skeleton-chip {
  position: relative;
  overflow: hidden;
  background: rgba(214, 194, 165, 0.36);
  color: transparent !important;
}
.skeleton-block::after,
.skeleton-line::after,
.skeleton-chip::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}
.skeleton-line {
  display: block;
  border-radius: 999px;
  min-height: 0.9rem;
  margin: 0;
}
.skeleton-line-short {
  width: 38%;
}
.skeleton-line-medium {
  width: 62%;
}
.skeleton-line-full {
  width: 100%;
}
.skeleton-line-title {
  width: 84%;
  min-height: 1.1rem;
}
.skeleton-chip {
  display: inline-flex;
  width: 64px;
  min-height: 26px;
  border-radius: 999px;
}
.skeleton-chip-wide {
  width: 108px;
}
.skeleton-trackbox .tracklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 0;
  list-style: none;
  margin: 0;
}
.skeleton-trackbox .tracklist li {
  min-height: 0.9rem;
}
@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}
.card.heard-hidden {
  display: none !important;
}
.card.search-hidden {
  display: none !important;
}
.card[data-heard='true'] {
  background: linear-gradient(180deg, rgba(227, 218, 204, 0.99) 0%, rgba(214, 204, 189, 0.99) 100%);
  border-color: rgba(170, 136, 104, 0.55);
  box-shadow: 0 16px 34px rgba(84, 66, 50, 0.12);
}
.card[data-heard='true'] .eyebrow,
.card[data-heard='true'] .catalog-line,
.card[data-heard='true'] .tracklink,
.card[data-heard='true'] .description-toggle {
  color: rgba(128, 75, 54, 0.96);
}
.card[data-heard='true'] .meta,
.card[data-heard='true'] .description,
.card[data-heard='true'] .trackbox summary,
.card[data-heard='true'] .tracklist,
.card[data-heard='true'] .chip {
  color: rgba(85, 74, 67, 0.94);
}
.card[data-heard='true'] .title,
.card[data-heard='true'] .meta-link {
  color: rgba(41, 34, 31, 0.9);
}
[data-tab-panel='favorites'] .card[data-heard='true'] {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-alt) 100%);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
[data-tab-panel='favorites'] .card[data-heard='true'] .eyebrow,
[data-tab-panel='favorites'] .card[data-heard='true'] .catalog-line,
[data-tab-panel='favorites'] .card[data-heard='true'] .tracklink,
[data-tab-panel='favorites'] .card[data-heard='true'] .description-toggle {
  color: var(--accent);
}
[data-tab-panel='favorites'] .card[data-heard='true'] .meta,
[data-tab-panel='favorites'] .card[data-heard='true'] .description,
[data-tab-panel='favorites'] .card[data-heard='true'] .trackbox summary,
[data-tab-panel='favorites'] .card[data-heard='true'] .tracklist,
[data-tab-panel='favorites'] .card[data-heard='true'] .chip {
  color: var(--muted);
}
[data-tab-panel='favorites'] .card[data-heard='true'] .title,
[data-tab-panel='favorites'] .card[data-heard='true'] .meta-link {
  color: inherit;
}
.card-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cover-shell {
  position: relative;
}
.cover-media {
  position: relative;
  display: block;
}
.cover-store-source {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 64px);
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(27, 23, 19, 0.6);
  color: rgba(251, 246, 238, 0.96);
  box-shadow: 0 8px 18px rgba(27, 23, 19, 0.18);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.cover-store-source[hidden] {
  display: none !important;
}
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #efe7d8; }
.cover-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 194, 165, 0.5), rgba(237, 225, 206, 0.95));
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.summary-copy {
  padding: 8px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#app-root[data-card-size='small'] .summary-copy {
  padding: 8px 12px 0;
  gap: 6px;
}
.copy {
  padding: 10px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
#app-root[data-card-size='small'] .copy {
  padding: 10px 14px 16px;
  gap: 8px;
}
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.13em; margin: 0; }
.title {
  font-family: 'Fraunces', serif;
  font-size: 1.08rem;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
#app-root[data-card-size='small'] .title {
  font-size: 0.98rem;
}
.meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
#app-root[data-card-size='small'] .meta {
  font-size: 0.86rem;
}
.meta-link {
  text-decoration: underline;
  text-decoration-color: rgba(163, 58, 33, 0.35);
  text-underline-offset: 0.12em;
}
.meta-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}
.catalog-line {
  margin: -2px 0 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#app-root[data-card-size='small'] .catalog-line {
  font-size: 0.74rem;
}
.description {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}
#app-root[data-card-size='small'] .description {
  font-size: 0.78rem;
  line-height: 1.42;
}
.description-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.description-full {
  display: none;
}
.description-box.expanded .description-preview {
  display: none;
}
.description-box.expanded .description-full {
  display: block;
}
.description-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-control-soft);
  padding: 4px 9px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.source-chip {
  display: none;
  background: rgba(163, 58, 33, 0.08);
  border-color: rgba(163, 58, 33, 0.24);
  color: var(--text-secondary);
}
.chip-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.chip-link:hover {
  color: var(--accent);
  border-color: rgba(163, 58, 33, 0.35);
  background: rgba(255, 255, 255, 0.92);
}
#app-root[data-card-size='small'] .chip {
  padding: 3px 8px;
  font-size: 0.72rem;
}
@media (max-width: 640px) {
  #app-root[data-card-size='small'] .grid {
    gap: 14px;
    grid-template-columns: 1fr;
  }
  #app-root[data-card-size='small'] .card {
    contain-intrinsic-size: 320px 620px;
  }
  #app-root[data-card-size='small'] .summary-copy {
    padding: 0;
    gap: 7px;
  }
  #app-root[data-card-size='small'] .copy {
    padding: 10px 12px 14px;
    gap: 8px;
  }
  #app-root[data-card-size='small'] .title {
    font-size: 1rem;
    line-height: 1.12;
  }
  #app-root[data-card-size='small'] .meta {
    font-size: 0.88rem;
  }
  #app-root[data-card-size='small'] .catalog-line {
    font-size: 0.76rem;
  }
  #app-root[data-card-size='small'] .description {
    font-size: 0.8rem;
    line-height: 1.42;
  }
  #app-root[data-card-size='small'] .chip {
    padding: 4px 9px;
    font-size: 0.78rem;
  }
}
.player-button {
  border: 1px solid var(--border);
  background: var(--surface-control);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.favorite-button {
  border: 1px solid rgba(163, 58, 33, 0.28);
  background: rgba(248, 242, 232, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(72, 49, 38, 0.12);
  border-radius: 999px;
  padding: 0;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.favorite-button svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  pointer-events: none;
  transform: translateY(-0.75px);
}
.favorite-button .heart-outline,
.favorite-button .heart-fill {
  transition: opacity 120ms ease;
}
.favorite-button .heart-fill {
  opacity: 0;
}
.favorite-button:hover {
  border-color: rgba(163, 58, 33, 0.45);
  background: rgba(163, 58, 33, 0.14);
  transform: translateY(-1px);
}
.favorite-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff7ef;
}
.favorite-button.active .heart-outline {
  opacity: 0;
}
.favorite-button.active .heart-fill {
  opacity: 1;
}
.card-favorite {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
}
.favorite-empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 18px 0;
}
.trackbox {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.trackbox-title {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0 0 6px;
}
.track-extra {
  display: none;
}
.trackbox.expanded .track-extra {
  display: list-item;
}
.track-toggle {
  margin-top: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.tracklist {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}
.tracklist li { margin: 0 0 8px; }
.tracklink {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.player-shell {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
#app-root.store-add-open .player-shell {
  display: none;
}
.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.player-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.player-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.player-now {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.player-track {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.player-track:hover { text-decoration: underline; }
.player-store {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
  cursor: pointer;
}
.player-store:hover { text-decoration: underline; }
.inline-player {
  width: 100%;
  height: 40px;
}
.footer-drawer {
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-panel-soft);
  overflow: hidden;
}
.footer-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.92rem;
}
.footer-drawer summary::-webkit-details-marker {
  display: none;
}
.footer-drawer summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 auto;
}
.footer-drawer[open] summary::after {
  content: "−";
}
.footer-drawer-title {
  font-weight: 600;
}
.footer-drawer-meta {
  color: var(--muted);
  font-size: 0.84rem;
}
.footer-drawer-panel {
  padding: 0 16px 12px;
  border-top: 1px solid var(--border);
}
.health-panel {
  padding-top: 14px;
}
.health-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}
.health-summary strong {
  color: var(--ink);
  font-weight: 600;
}
.health-list {
  display: grid;
  gap: 10px;
}
.health-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(88px, 110px) minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.5fr) auto;
  gap: 10px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid rgba(214, 194, 165, 0.7);
  font-size: 0.8rem;
  color: var(--muted);
}
.health-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.health-store {
  color: var(--ink);
  font-weight: 600;
}
.health-status {
  color: var(--accent);
  text-transform: lowercase;
}
.health-time {
  white-space: nowrap;
}
a { color: inherit; text-decoration: none; }
.footer { margin-top: 42px; color: var(--muted); font-size: 0.9rem; }
/* iOS WebKit occasionally mis-rasterizes clipped cards when content-visibility
   and backdrop blur are combined with sticky/fixed UI layers. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .card,
    .store-add-list-item,
    .store-add-preview-card {
      content-visibility: visible;
      contain-intrinsic-size: unset;
    }
    .tab-strip,
    .player-shell,
    .favorite-button,
    .store-add-actions {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .tab-strip,
    .player-shell,
    .store-add-actions {
      background: rgba(248, 242, 232, 0.96);
    }
    body[data-theme='dark'] .tab-strip,
    body[data-theme='dark'] .player-shell,
    body[data-theme='dark'] .store-add-actions {
      background: rgba(20, 24, 30, 0.96);
    }
  }
}
@media (max-width: 640px) {
  main { padding: 16px 12px 148px; }
  .top-setting-card-size {
    display: none;
  }
  .masthead {
    padding: 16px;
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
  }
  .masthead-actions {
    justify-content: space-between;
    align-items: stretch;
  }
  .masthead-tools {
    align-items: stretch;
    width: 100%;
  }
  .settings-menu {
    align-self: flex-start;
  }
  .settings-panel {
    right: auto;
    left: 0;
    width: min(340px, calc(100vw - 56px));
  }
  .tab-strip {
    position: sticky;
    top: 10px;
    z-index: 24;
    margin-top: 16px;
    margin-bottom: 12px;
    padding: 8px 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: rgba(248, 242, 232, 0.9);
    border: 1px solid rgba(205, 182, 148, 0.45);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(72, 49, 38, 0.06);
  }
  body[data-theme='dark'] .tab-strip {
    background: rgba(20, 24, 30, 0.96);
    border-color: rgba(88, 97, 114, 0.68);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  }
  .tabs-region {
    gap: 8px;
    width: 100%;
  }
  .tab-strip-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
  }
  .heard-filter {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: 0;
    margin-right: auto;
  }
  .tab-overflow-shell,
  .store-add-shell {
    flex: 0 0 auto;
    margin-left: 0;
  }
  .tabs {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 2px 2px 0;
    scrollbar-width: none;
    width: 100%;
    flex: 0 0 auto;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-button {
    padding: 8px 12px;
    font-size: 0.9rem;
    flex: 0 0 auto;
  }
  body[data-theme='dark'] .tab-button {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(124, 135, 153, 0.32);
    color: #c6ceda;
  }
  body[data-theme='dark'] .tab-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #edf0f4;
  }
  body[data-theme='dark'] .tab-overflow-item {
    color: #c6ceda;
  }
  body[data-theme='dark'] .tab-overflow-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .tab-button-add {
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }
  .tab-button-remove-toggle {
    min-width: 40px;
    min-height: 40px;
  }
  .tab-chip {
    flex: 0 0 auto;
  }
  .store-add-panel {
    width: min(860px, calc(100vw - 42px));
    max-height: min(720px, calc(100vh - 42px));
  }
  .store-remove-panel {
    width: min(300px, calc(100vw - 42px));
  }
  .store-add-browser {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  }
  .store-add-preview-grid {
    grid-template-columns: 1fr;
  }
  .heard-filter {
    margin-left: 0;
    align-self: flex-start;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.82rem;
    background: rgba(251, 246, 238, 0.96);
    box-shadow: 0 4px 12px rgba(72, 49, 38, 0.06);
    white-space: nowrap;
  }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .store-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy meta";
    align-items: end;
    gap: 8px 12px;
    padding-right: 0;
    overflow: visible;
    z-index: 12;
  }
  .store-head-copy {
    grid-area: copy;
    min-width: 0;
    flex: 1 1 auto;
  }
  .store-head-meta {
    grid-area: meta;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-top: 0;
    gap: 7px;
  }
  .store-count {
    line-height: 1;
    position: relative;
    top: 0;
    font-size: 0.82rem;
  }
  .store-panel-search-shell {
    position: relative;
    top: 0;
    right: 0;
    transform: none;
    margin-left: 0;
    z-index: 40;
  }
  .store-panel-search-trigger {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
  }
  .store-panel-search-popover {
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    width: min(420px, calc(100vw - 20px));
    min-width: 0;
    z-index: 50;
  }
  .store-panel-search-popover .store-panel-search {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
  .store-panel-search-popover .store-panel-search-input {
    width: 100%;
    font-size: 16px;
    line-height: 1.2;
  }
  .store-panel-status,
  .store-panel-retry {
    min-height: 26px;
    font-size: 0.7rem;
  }
  .sectioned-panel-shell {
    gap: 14px;
  }
  .card {
    border-radius: 16px;
    contain-intrinsic-size: 320px 620px;
  }
  .card-head {
    display: grid;
    grid-template-columns: clamp(112px, 30vw, 132px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px 12px 0;
  }
  .cover-shell {
    align-self: start;
  }
  .card img {
    border-radius: 12px;
  }
  .cover-store-source {
    display: none !important;
  }
  .summary-copy {
    padding: 0;
    gap: 7px;
  }
  .copy {
    padding: 10px 12px 14px;
    gap: 8px;
  }
  .eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }
  .title {
    font-size: 1rem;
    line-height: 1.12;
  }
  .meta {
    font-size: 0.88rem;
  }
  .catalog-line {
    font-size: 0.76rem;
  }
  .description {
    font-size: 0.8rem;
    line-height: 1.42;
  }
  .chips {
    gap: 6px;
  }
  .chip {
    padding: 3px 8px;
    font-size: 0.74rem;
  }
  .source-chip {
    display: inline-flex;
  }
  .favorite-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 1.05rem;
  }
  .card-favorite {
    right: 8px;
    bottom: 8px;
  }
  .trackbox {
    padding-top: 8px;
  }
  .trackbox-title,
  .tracklist,
  .track-toggle,
  .description-toggle {
    font-size: 0.8rem;
  }
  .tracklist {
    line-height: 1.55;
  }
  .tracklist li {
    margin: 0 0 6px;
  }
  .player-shell {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 40;
    margin-top: 0;
    padding: 10px 12px;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(61, 41, 28, 0.18);
  }
  .player-controls {
    gap: 6px;
    margin-bottom: 8px;
  }
  .player-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .player-meta {
    gap: 8px;
    margin-bottom: 8px;
  }
  .player-track {
    font-size: 0.92rem;
  }
  .player-store,
  .player-now {
    font-size: 0.78rem;
  }
  .inline-player {
    height: 36px;
  }
  .footer-drawer {
    margin-top: 26px;
  }
  .footer-drawer summary {
    padding: 13px 12px;
  }
  .footer-drawer-meta {
    font-size: 0.78rem;
  }
  .footer-drawer-panel {
    padding: 0 12px 10px;
  }
  .health-panel {
    padding-top: 12px;
  }
  .health-summary {
    gap: 6px 10px;
    font-size: 0.78rem;
  }
  .health-row {
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 0.76rem;
  }
  .health-time {
    white-space: normal;
  }
}
@media (max-width: 520px) {
  main { padding-bottom: 140px; }
  .card-head {
    grid-template-columns: clamp(96px, 28vw, 118px) minmax(0, 1fr);
    gap: 8px;
  }
  .tab-strip {
    top: 6px;
    gap: 7px;
  }
  .tabs-region,
  .tab-strip-controls {
    gap: 7px;
    width: 100%;
  }
  .tab-strip-controls {
    align-items: center;
  }
  .tabs {
    width: 100%;
  }
  .store-add-panel {
    width: min(640px, calc(100vw - 28px));
    padding: 14px;
  }
  .store-remove-panel {
    width: min(280px, calc(100vw - 28px));
    padding: 14px;
  }
  .store-add-browser {
    grid-template-columns: 1fr;
  }
  .store-add-sidebar {
    gap: 10px;
  }
  .store-add-list {
    max-height: 220px;
  }
  .store-add-list-button {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .store-add-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .store-add-logo-large {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
  .store-add-preview-shell {
    padding: 14px;
  }
  .store-add-preview-brand {
    gap: 12px;
  }
  .store-add-preview-title h3 {
    font-size: 1.5rem;
  }
  .store-add-preview-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
  }
  .title {
    font-size: 0.96rem;
  }
  .meta,
  .description,
  .trackbox-title,
  .tracklist,
  .track-toggle,
  .description-toggle {
    font-size: 0.78rem;
  }
  .chip {
    font-size: 0.72rem;
  }
  .player-shell {
    padding: 9px 10px;
    left: 6px;
    right: 6px;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
  .player-button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.76rem;
  }
  .favorite-button {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 1rem;
  }
}
@media (max-width: 920px) {
  .store-add-panel {
    width: min(920px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 24px;
  }
  .store-add-browser {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: 16px;
  }
  .store-add-preview-grid {
    grid-template-columns: 1fr;
  }
  .store-add-preview-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .store-add-preview-title h3 {
    font-size: 1.7rem;
  }
  .store-add-preview-description {
    font-size: 0.8rem;
  }
}
@media (max-width: 640px) {
  .store-add-backdrop {
    background:
      radial-gradient(circle at top left, rgba(214, 172, 121, 0.18), transparent 28%),
      linear-gradient(180deg, rgba(251, 246, 238, 0.98), rgba(246, 238, 226, 0.98));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .store-add-panel {
    inset: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    left: 0;
    top: 0;
    transform: none;
    padding: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
  }
  .store-add-header {
    padding:
      calc(10px + env(safe-area-inset-top))
      calc(6px + env(safe-area-inset-right))
      8px
      calc(6px + env(safe-area-inset-left));
  }
  .store-add-close,
  .store-add-back {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 18px rgba(72, 49, 38, 0.10);
    z-index: 2;
  }
  .store-add-browser {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
  }
  .store-add-panel[data-mobile-view="list"] .store-add-preview-shell {
    display: none;
  }
  .store-add-panel[data-mobile-view="preview"] .store-add-sidebar {
    display: none;
  }
  .store-add-panel[data-filter-open="true"] .store-add-sidebar {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 4;
    padding: 0;
    background: rgba(248, 242, 233, 0.98);
  }
  .store-add-panel[data-filter-open="true"] .store-add-panel-copy,
  .store-add-panel[data-filter-open="true"] .store-add-list {
    display: none;
  }
  .store-add-panel[data-filter-open="true"] .store-add-filter-panel {
    display: flex;
    position: absolute;
    inset:
      calc(6px + env(safe-area-inset-top))
      calc(6px + env(safe-area-inset-right))
      calc(6px + env(safe-area-inset-bottom))
      calc(6px + env(safe-area-inset-left));
    max-height: none;
    border: 0;
    border-radius: 20px;
    box-shadow: none;
    overflow: auto;
    margin: 0;
    background: rgba(255,255,255,0.98);
    padding:
      calc(16px + env(safe-area-inset-top))
      16px
      calc(20px + env(safe-area-inset-bottom))
      16px;
  }
  .store-add-sidebar,
  .store-add-preview-shell {
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
  }
  .store-add-sidebar {
    padding:
      0
      calc(6px + env(safe-area-inset-right))
      calc(12px + env(safe-area-inset-bottom))
      calc(6px + env(safe-area-inset-left));
  }
  .store-add-panel-copy {
    padding-right: 0;
  }
  .store-add-list {
    max-height: none;
    padding-right: 0;
  }
  .store-add-list-button {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .store-add-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .store-add-logo-large {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
  .store-add-preview-shell {
    position: relative;
    padding:
      0
      calc(6px + env(safe-area-inset-right))
      calc(var(--store-add-actions-offset, 0px) + env(safe-area-inset-bottom) + 10px)
      calc(6px + env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 12px;
  }
  .store-add-preview {
    padding-right: 0;
  }
  .store-add-preview-head {
    margin-bottom: 10px;
  }
  .store-add-preview-brand {
    gap: 12px;
  }
  .store-add-preview-title h3 {
    font-size: 1.45rem;
  }
  .store-add-preview-grid {
    grid-template-columns: 1fr;
  }
  .store-add-preview-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .store-add-actions {
    position: fixed;
    left: calc(6px + env(safe-area-inset-left));
    right: calc(6px + env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 42;
    padding: 10px;
    border: 1px solid rgba(150, 120, 87, 0.10);
    border-radius: 16px;
    background: rgba(248, 242, 233, 0.86);
    box-shadow: 0 6px 16px rgba(72, 49, 38, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .store-add-panel[data-mobile-view="list"] .store-add-actions,
  .store-add-panel[data-filter-open="true"] .store-add-actions {
    display: none;
  }
  .store-add-actions-row {
    gap: 10px;
  }
  .store-add-status {
    display: none;
  }
  .store-add-name-field {
    width: 100%;
  }
  .store-add-actions-row .sync-button {
    min-width: 0;
  }
  .store-add-actions-primary {
    gap: 10px;
  }
  #store-add-filter-toggle {
    flex-basis: 120px;
    min-width: 84px;
    max-width: 34%;
  }
  #store-add-select-current {
    flex-basis: 108px;
  }
  #store-add-submit {
    flex-basis: 156px;
  }
}
@media (min-width: 641px) and (max-width: 720px) {
  .tabs-region,
  .tab-strip-controls,
  .tabs {
    width: 100%;
  }
  .tab-strip-controls {
    align-items: center;
    justify-content: space-between;
  }
  .store-add-panel {
    width: calc(100vw - 16px);
    min-height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    padding: 12px;
  }
}
