/* =====================================================================================================
   Material Design 3 for the whole site, loaded after app.css.
   The values come from Google's open-source Material Web tokens (material-components/material-web,
   tokens v0_192): colour roles, the type scale, the corner scale, elevation, motion easing and durations,
   state-layer opacities and the component specs (navigation bar, buttons, chips, fields, dialogs, menus,
   snackbar, tabs, progress, FAB, search bar, lists). The site's own names (--bg, --text, --green …) are
   pointed at the M3 roles here, so every page follows them at once.
   ===================================================================================================== */

:root {
  /* ---- Motion (md.sys.motion) ---- */
  --md-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-easing-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
  --md-easing-standard-decelerate: cubic-bezier(0, 0, 0, 1);
  --md-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --md-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
  --md-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-duration-short1: 50ms; --md-duration-short2: 100ms; --md-duration-short3: 150ms; --md-duration-short4: 200ms;
  --md-duration-medium1: 250ms; --md-duration-medium2: 300ms; --md-duration-medium3: 350ms; --md-duration-medium4: 400ms;
  --md-duration-long1: 450ms; --md-duration-long2: 500ms; --md-duration-long3: 550ms; --md-duration-long4: 600ms;

  /* ---- Shape (md.sys.shape) ---- */
  --md-shape-none: 0px;
  --md-shape-extra-small: 4px;
  --md-shape-small: 8px;
  --md-shape-medium: 12px;
  --md-shape-large: 16px;
  --md-shape-extra-large: 28px;
  --md-shape-full: 9999px;

  /* ---- State layers (md.sys.state) ---- */
  --md-state-hover: 0.08;
  --md-state-focus: 0.12;
  --md-state-pressed: 0.12;
  --md-state-dragged: 0.16;

  /* ---- Elevation (levels 1–3 as Material's shadow pairs) ---- */
  --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-elevation-3: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
  --md-elevation-4: 0 2px 3px rgba(0, 0, 0, 0.3), 0 6px 10px 4px rgba(0, 0, 0, 0.15);

  /* ---- Type scale (md.sys.typescale: size / line height; the site keeps its Hebrew fonts) ---- */
  --md-headline-large: 2rem; --md-headline-large-lh: 2.5rem;
  --md-headline-medium: 1.75rem; --md-headline-medium-lh: 2.25rem;
  --md-headline-small: 1.5rem; --md-headline-small-lh: 2rem;
  --md-title-large: 1.375rem; --md-title-large-lh: 1.75rem;
  --md-title-medium: 1rem; --md-title-medium-lh: 1.5rem;
  --md-title-small: 0.875rem; --md-title-small-lh: 1.25rem;
  --md-body-large: 1rem; --md-body-large-lh: 1.5rem;
  --md-body-medium: 0.875rem; --md-body-medium-lh: 1.25rem;
  --md-body-small: 0.75rem; --md-body-small-lh: 1rem;
  --md-label-large: 0.875rem; --md-label-large-lh: 1.25rem;
  --md-label-medium: 0.75rem; --md-label-medium-lh: 1rem;
  --md-label-small: 0.6875rem; --md-label-small-lh: 1rem;

  /* ---- Colour roles: dark scheme (the site opens dark). Seed: the collection's green; neutrals keep
     the site's purple tint; tertiary is the brand purple. ---- */
  --md-sys-color-primary: #95d690;
  --md-sys-color-on-primary: #003910;
  --md-sys-color-primary-container: #1f5125;
  --md-sys-color-on-primary-container: #b0f3aa;
  --md-sys-color-secondary: #bacbb4;
  --md-sys-color-on-secondary: #253424;
  --md-sys-color-secondary-container: #3b4b39;
  --md-sys-color-on-secondary-container: #d6e8cf;
  --md-sys-color-tertiary: #dcb9ff;
  --md-sys-color-on-tertiary: #431169;
  --md-sys-color-tertiary-container: #5b2d82;
  --md-sys-color-on-tertiary-container: #f0dbff;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  --md-sys-color-surface: #131017;
  --md-sys-color-surface-dim: #131017;
  --md-sys-color-surface-bright: #3a363e;
  --md-sys-color-surface-container-lowest: #0e0b12;
  --md-sys-color-surface-container-low: #1b181f;
  --md-sys-color-surface-container: #201c23;
  --md-sys-color-surface-container-high: #2a262e;
  --md-sys-color-surface-container-highest: #353139;
  --md-sys-color-on-surface: #e8e0e9;
  --md-sys-color-on-surface-variant: #cbc3cf;
  --md-sys-color-outline: #958e99;
  --md-sys-color-outline-variant: #4a454e;
  --md-sys-color-inverse-surface: #e8e0e9;
  --md-sys-color-inverse-on-surface: #322f35;
  --md-sys-color-inverse-primary: #2f6a35;
  --md-sys-color-scrim: #000000;
  --md-sys-color-shadow: #000000;
}

html[data-theme="light"] {
  --md-sys-color-primary: #2f6a35;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #b0f3aa;
  --md-sys-color-on-primary-container: #002107;
  --md-sys-color-secondary: #52634f;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d6e8cf;
  --md-sys-color-on-secondary-container: #111f10;
  --md-sys-color-tertiary: #74469b;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #f0dbff;
  --md-sys-color-on-tertiary-container: #2c0050;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-surface: #fcf8f3;
  --md-sys-color-surface-dim: #dcd9d4;
  --md-sys-color-surface-bright: #fcf8f3;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f6f2ed;
  --md-sys-color-surface-container: #f0ede7;
  --md-sys-color-surface-container-high: #ebe7e2;
  --md-sys-color-surface-container-highest: #e5e2dc;
  --md-sys-color-on-surface: #1d1b1f;
  --md-sys-color-on-surface-variant: #49454e;
  --md-sys-color-outline: #7a757f;
  --md-sys-color-outline-variant: #cbc4cf;
  --md-sys-color-inverse-surface: #322f35;
  --md-sys-color-inverse-on-surface: #f5eff5;
  --md-sys-color-inverse-primary: #95d690;
}

/* ---- The site's own names, pointed at the M3 roles (dark and light alike) ---- */
:root, html[data-theme="light"] {
  --bg: var(--md-sys-color-surface);
  --bg-elev: var(--md-sys-color-surface-container-low);
  --bg-elev-solid: var(--md-sys-color-surface-container-low);
  --bg-elev-2: var(--md-sys-color-surface-container-high);
  --bg-elev-2-solid: var(--md-sys-color-surface-container-high);
  --text: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --line: color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
  --line-strong: var(--md-sys-color-outline-variant);
  --green: var(--md-sys-color-primary);
  --green-2: var(--md-sys-color-primary);
  --green-ink: var(--md-sys-color-on-primary);
  --danger: var(--md-sys-color-error);
  --shadow-sm: var(--md-elevation-1);
  --shadow: var(--md-elevation-2);
  --shadow-lg: var(--md-elevation-3);
  /* Focus indicator: 3px, 2px outside, in the secondary colour. */
  --ring: 0 0 0 2px var(--md-sys-color-surface), 0 0 0 5px var(--md-sys-color-secondary);
  --r-sm: var(--md-shape-small);
  --r-md: var(--md-shape-medium);
  --r-lg: var(--md-shape-large);
  --r-xl: var(--md-shape-extra-large);
  --radius: var(--md-shape-medium);
  --ease: var(--md-easing-emphasized-decelerate);
  /* A soft spring for things that move in space (M3 Expressive), with only a slight overshoot. */
  --spring: cubic-bezier(0.32, 1.18, 0.5, 1);
  --t-page: var(--md-headline-large);
  --t-section: var(--md-title-large);
  --t-meta: var(--md-body-small);
}
/* Pictures and videos stay on a dark surface whatever the theme. */
.viewer, .reel-show { --bg: #131017; --text: #e8e0e9; --muted: #cbc3cf; }

/* ---- Base ---- */
body { font-size: var(--md-body-large); line-height: var(--md-body-large-lh); background: var(--md-sys-color-surface); }
body::before { opacity: 0.5; }
::selection { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--md-sys-color-secondary); outline-offset: 2px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--md-sys-color-on-surface) 22%, transparent); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--md-sys-color-on-surface) 22%, transparent); }

/* ---- Type scale ---- */
.page-title { font-size: var(--md-headline-large); line-height: var(--md-headline-large-lh); font-weight: 600; margin-bottom: 8px; }
.section-head h2, .block-title, .panel h2 { font-size: var(--md-title-large); line-height: var(--md-title-large-lh); font-weight: 600; }
.panel h3 { font-size: var(--md-title-medium); line-height: var(--md-title-medium-lh); font-weight: 600; }
.quiet, .lede { font-size: var(--md-body-medium); line-height: var(--md-body-medium-lh); color: var(--md-sys-color-on-surface-variant); }
.eyebrow, .kicker { font-size: var(--md-label-medium); line-height: var(--md-label-medium-lh); font-weight: 600; letter-spacing: 0; color: var(--md-sys-color-on-surface-variant); }

/* ---- State layer: hover 8%, focus 12%, pressed 12% of the content colour ---- */
.btn, .btn-primary, .btn-ghost, .btn-danger, .icon-btn, .chip, .music-pill, .music-ball, .more-menu button,
.ms-tab, .admin-nav a, .np-icon, .upload-btn, .flair-top, .sheet a:not(.brand), .sheet-row, .side-fold { position: relative; }
.btn::before, .icon-btn::before, .chip::before, .music-pill::before, .music-ball::before, .more-menu button::before,
.ms-tab::before, .admin-nav a::before, .np-icon::before, .upload-btn::before, .flair-top::before, .side-fold::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none;
  transition: opacity var(--md-duration-short3) var(--md-easing-standard);
}
.btn:hover::before, .icon-btn:hover::before, .chip:hover::before, .music-pill:hover::before, .music-ball:hover::before, .more-menu button:hover::before,
.ms-tab:hover::before, .admin-nav a:hover::before, .np-icon:hover::before, .upload-btn:hover::before, .flair-top:hover::before, .side-fold:hover::before { opacity: var(--md-state-hover); }
.btn:focus-visible::before, .icon-btn:focus-visible::before, .chip:focus-visible::before, .music-pill:focus-visible::before, .music-ball:focus-visible::before,
.more-menu button:focus-visible::before, .ms-tab:focus-visible::before, .admin-nav a:focus-visible::before, .np-icon:focus-visible::before { opacity: var(--md-state-focus); }
.btn:active::before, .icon-btn:active::before, .chip:active::before, .music-pill:active::before, .music-ball:active::before, .more-menu button:active::before,
.ms-tab:active::before, .admin-nav a:active::before, .np-icon:active::before, .upload-btn:active::before { opacity: var(--md-state-pressed); }
@media (hover: none) { .btn:hover::before, .icon-btn:hover::before, .chip:hover::before, .music-pill:hover::before, .music-ball:hover::before, .more-menu button:hover::before, .ms-tab:hover::before, .admin-nav a:hover::before, .np-icon:hover::before, .upload-btn:hover::before { opacity: 0; } }

/* Ripple (from ripple.js): grows from the touch point, fades when let go. */
.md-ripple { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.md-ripple > span { position: absolute; border-radius: 50%; background: currentColor; opacity: 0.12; transform: scale(0); pointer-events: none; }

/* ---- Buttons: filled, outlined, tonal (error), text — 40px, full corners, label-large ---- */
.btn, .btn-primary, .btn-ghost, .btn-danger {
  min-height: 40px; padding: 0 24px; border-radius: var(--md-shape-full); gap: 8px;
  font-size: var(--md-label-large); line-height: var(--md-label-large-lh); font-weight: 500;
  transition: box-shadow var(--md-duration-short4) var(--md-easing-standard), background-color var(--md-duration-short4) var(--md-easing-standard), color var(--md-duration-short4) var(--md-easing-standard);
}
.btn svg { width: 18px; height: 18px; }
.btn:has(> svg:first-child) { padding-inline-start: 16px; }
.btn-primary, .btn.btn-primary {
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border: 0; box-shadow: none;
}
.btn-primary:hover { background: var(--md-sys-color-primary); box-shadow: var(--md-elevation-1); transform: none; }
.btn-ghost, .btn.btn-ghost {
  background: transparent; color: var(--md-sys-color-primary); border: 1px solid var(--md-sys-color-outline);
}
.btn-ghost:hover { background: transparent; transform: none; }
.btn-ghost:focus-visible { border-color: var(--md-sys-color-primary); }
.btn-danger, .btn.btn-danger { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); border: 0; }
.btn-danger:hover { background: var(--md-sys-color-error-container); border-color: transparent; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 1; background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); border-color: transparent; box-shadow: none; }
.btn-ghost:disabled { background: transparent; border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); }

/* ---- Icon buttons: 40px, no outline, 48px to touch ---- */
.icon-btn {
  width: 40px; height: 40px; min-height: 40px; background: transparent; border: 0; color: var(--md-sys-color-on-surface-variant);
  transition: background-color var(--md-duration-short4) var(--md-easing-standard), color var(--md-duration-short4) var(--md-easing-standard);
}
.icon-btn:hover { background: transparent; border-color: transparent; transform: none; box-shadow: none; }
.icon-btn:hover svg { transform: none; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn::after { content: ""; position: absolute; inset: -4px; }
.icon-btn .dot { z-index: 1; }

/* ---- Top app bar: the surface colour, turning to surface-container when the page scrolls under it ---- */
.topbar {
  background: var(--md-sys-color-surface); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; min-height: 64px;
  transition: background-color var(--md-duration-medium2) var(--md-easing-standard);
}
.topbar.is-scrolled { background: var(--md-sys-color-surface-container); box-shadow: none; }

/* ---- Search bar: 56px (48px on phones), full corners, surface-container-high ---- */
.search {
  height: 56px; padding: 0 20px; border: 0; border-radius: var(--md-shape-full);
  background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface);
  transition: background-color var(--md-duration-short4) var(--md-easing-standard), box-shadow var(--md-duration-short4) var(--md-easing-standard);
}
.search:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, var(--md-sys-color-surface-container-high)); border-color: transparent; }
.search:focus-within { background: var(--md-sys-color-surface-container-highest); border-color: transparent; box-shadow: var(--md-elevation-1); }
.search input { font-size: var(--md-body-large); font-weight: 400; color: var(--md-sys-color-on-surface); }
.search input::placeholder { color: var(--md-sys-color-on-surface-variant); }
@media (max-width: 839px) { .search { height: 48px; padding: 0 16px; } }

/* "Download": a tonal button */
.upload-btn {
  background: var(--md-sys-color-secondary-container) !important; color: var(--md-sys-color-on-secondary-container) !important;
  border: 0 !important; box-shadow: none !important; border-radius: var(--md-shape-full) !important; min-height: 40px;
  font-size: var(--md-label-large); font-weight: 500; transform: none !important;
}
.upload-btn .upload-mark { background: transparent !important; box-shadow: none !important; color: inherit !important; }
.upload-btn:hover { box-shadow: var(--md-elevation-1) !important; }

/* ---- Chips: 32px, small corners, outlined; selected = secondary-container, no outline ---- */
.chip, select.chip, .toolbar select, .ms-tab, .role-chip {
  min-height: 32px; padding: 0 16px; border-radius: var(--md-shape-small); border: 1px solid var(--md-sys-color-outline);
  background: transparent; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-label-large); font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color var(--md-duration-short4) var(--md-easing-standard), color var(--md-duration-short4) var(--md-easing-standard), border-color var(--md-duration-short4) var(--md-easing-standard);
}
.chip:hover, select.chip:hover, .toolbar select:hover { background: transparent; border-color: var(--md-sys-color-outline); }
.chip.on, html[data-theme="light"] .chip.on, .ms-tab.is-on, .role-chip.is-on {
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent;
}
.ms-tab.is-on small { opacity: 0.8; }
.ms-tabs { gap: 8px; }

/* ---- Text fields: outlined, 4px corners, 1px outline → 2px primary when focused ---- */
.field span { font-size: var(--md-body-small); line-height: var(--md-body-small-lh); color: var(--md-sys-color-on-surface-variant); font-weight: 500; }
.field input, .field textarea, .field select, .inline-input {
  min-height: 48px; padding: 12px 16px; border-radius: var(--md-shape-extra-small); background: transparent;
  border: 1px solid var(--md-sys-color-outline); color: var(--md-sys-color-on-surface); font-size: var(--md-body-large);
  transition: border-color var(--md-duration-short3) var(--md-easing-standard), box-shadow var(--md-duration-short3) var(--md-easing-standard);
}
.field input:hover, .field textarea:hover, .field select:hover, .inline-input:hover { border-color: var(--md-sys-color-on-surface); }
.field input:focus, .field textarea:focus, .field select:focus, .inline-input:focus {
  border-color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); outline: none;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--md-sys-color-primary); width: 18px; height: 18px; }
select { accent-color: var(--md-sys-color-primary); }

/* ---- Cards: filled (surface-container-low), 12px corners, no outline or shadow ---- */
.panel { background: var(--md-sys-color-surface-container-low); border: 0; box-shadow: none; border-radius: var(--md-shape-medium); }

/* ---- Snackbar: inverse surface, 4px corners, 48px, above the navigation bar ---- */
.toasts { bottom: calc(var(--tabbar-h, 66px) + var(--tab-gap, 12px) + 16px + env(safe-area-inset-bottom)); }
.toast {
  min-height: 48px; padding: 14px 16px; border-radius: var(--md-shape-extra-small);
  background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface);
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--md-elevation-3);
  font-size: var(--md-body-medium); line-height: var(--md-body-medium-lh); font-weight: 400; max-width: min(600px, calc(100vw - 32px));
  animation: md-snack-in var(--md-duration-medium2) var(--md-easing-emphasized-decelerate), md-snack-out var(--md-duration-short4) var(--md-easing-emphasized-accelerate) 3.4s forwards;
}
.toast::before { display: none; }
@keyframes md-snack-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes md-snack-out { to { opacity: 0; transform: translateY(6px); } }

/* ---- Dialogs: 28px corners, surface-container-high, headline-small, actions at the end, 32% scrim ---- */
.list-editor, .modal-back, .lyrics-editor { background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.list-editor-card, .modal, .lyrics-editor-card, .chat-people-card, .palette-panel {
  border-radius: var(--md-shape-extra-large); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface);
  border: 0; box-shadow: var(--md-elevation-3);
}
.list-editor-card, .modal, .lyrics-editor-card { padding: 24px; }
.list-editor-card h3, .modal h2, .lyrics-editor-card header strong {
  font-family: var(--sans); font-size: var(--md-headline-small); line-height: var(--md-headline-small-lh); font-weight: 500; margin: 0 0 4px;
}
.list-editor-card .quiet, .modal .quiet { font-size: var(--md-body-medium); color: var(--md-sys-color-on-surface-variant); }
.list-editor-row { justify-content: flex-end; gap: 8px; margin-top: 12px; }
.list-editor-row .btn { flex: 0 0 auto; }
.modal { animation: md-dialog-in var(--md-duration-medium4) var(--md-easing-emphasized-decelerate); }
.lyrics-editor-card, .chat-people-card { animation: md-dialog-in var(--md-duration-medium4) var(--md-easing-emphasized-decelerate); }
@keyframes md-dialog-in { from { opacity: 0; transform: translateY(-12px) scale(0.96); } }
.list-editor-card textarea, .lyrics-editor-card textarea { border-radius: var(--md-shape-extra-small); border: 1px solid var(--md-sys-color-outline); background: transparent; }
.list-editor-card input:not([type="checkbox"]):not([type="radio"]), .list-editor-card select {
  min-height: 48px; border-radius: var(--md-shape-extra-small); border: 1px solid var(--md-sys-color-outline); background: transparent; color: inherit; padding: 0 14px;
}
.list-editor-card input:focus, .list-editor-card select:focus, .list-editor-card textarea:focus, .lyrics-editor-card textarea:focus { border-color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); outline: none; }
.list-delete { color: var(--md-sys-color-error); font-size: var(--md-label-large); font-weight: 500; }

/* ---- Menus: 4px corners, surface-container, 48px items, opening down from where they were asked ---- */
.more-menu {
  padding: 8px 0; border-radius: var(--md-shape-extra-small); background: var(--md-sys-color-surface-container);
  border: 0; box-shadow: var(--md-elevation-2); transform-origin: top center;
  animation: md-menu-in var(--md-duration-medium2) var(--md-easing-emphasized-decelerate);
}
.more-menu button { min-height: 48px; padding: 0 16px; border-radius: 0; gap: 12px; font-size: var(--md-label-large); font-weight: 500; color: var(--md-sys-color-on-surface); }
.more-menu button:hover, .more-menu button:focus-visible { background: transparent; }
.more-menu button svg { width: 24px; height: 24px; color: var(--md-sys-color-on-surface-variant); }
.more-menu .menu-danger { color: var(--md-sys-color-error); }
.more-split { margin: 8px 16px 4px; font-size: var(--md-label-small); color: var(--md-sys-color-on-surface-variant); }
@keyframes md-menu-in { from { opacity: 0; transform: scaleY(0.85); } }

/* ---- Tabs (administration): primary tabs, 48px, a 3px indicator in the primary colour ---- */
.admin-nav {
  background: var(--md-sys-color-surface); border: 0; border-bottom: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 0; box-shadow: none; padding: 0; gap: 0;
}
.admin-nav a {
  min-height: 48px; padding: 0 16px; border-radius: 0; display: inline-flex; align-items: center;
  font-size: var(--md-title-small); line-height: var(--md-title-small-lh); font-weight: 500; color: var(--md-sys-color-on-surface-variant); background: transparent;
}
.admin-nav a:hover { background: transparent; color: var(--md-sys-color-on-surface); }
.admin-nav a.active { background: transparent; color: var(--md-sys-color-primary); font-weight: 500; box-shadow: inset 0 -3px 0 var(--md-sys-color-primary); }
.act-tabs a[aria-selected="true"], .kind-tabs button[aria-selected="true"], .arrange-switch[aria-pressed="true"] {
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; box-shadow: none;
}

/* ---- Circular progress: 48px, 4px stroke, primary ---- */
.spinner { width: 48px; height: 48px; border: 4px solid color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent); border-top-color: var(--md-sys-color-primary); animation: spin 1s linear infinite; }
.video-state .spinner, .np-stage .spinner { border-color: rgba(255, 255, 255, 0.24); border-top-color: #fff; }

/* ---- Navigation bar: the open place gets the pill-shaped active indicator (secondary-container) behind
   its icon, which grows out from the middle; labels are label-medium, the open one bold ---- */
nav.tabbar {
  --bar-bg: var(--md-sys-color-surface-container);
  --tab-accent: var(--md-sys-color-on-secondary-container);
  background: var(--bar-bg); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: var(--md-elevation-2);
}
html[data-theme="light"] nav.tabbar { --tab-accent: var(--md-sys-color-on-secondary-container); }
nav.tabbar a { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-label-medium); font-weight: 500; gap: 4px; }
nav.tabbar a:hover { color: var(--md-sys-color-on-surface); }
nav.tabbar a::after { display: none; }
nav.tabbar .tab-icon { width: 64px; height: 32px; isolation: isolate; }
nav.tabbar .tab-icon::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--md-shape-full); background: var(--md-sys-color-secondary-container);
  opacity: 0; transform: scaleX(0.32);
  transition: transform var(--md-duration-medium2) var(--md-easing-emphasized-decelerate), opacity var(--md-duration-short3) var(--md-easing-standard);
}
nav.tabbar a:hover .tab-icon::before { opacity: 0.6; transform: scaleX(1); background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
nav.tabbar a.active .tab-icon::before { opacity: 1; transform: scaleX(1); background: var(--md-sys-color-secondary-container); }
nav.tabbar .tab-icon svg { width: 24px; height: 24px; }
nav.tabbar a.active { color: var(--md-sys-color-on-surface); }
nav.tabbar a.active .tab-icon { transform: none; color: var(--md-sys-color-on-secondary-container); }
nav.tabbar a.active .tab-icon svg { fill: none; }
nav.tabbar a.active .tab-label { font-weight: 700; }
nav.tabbar a:active .tab-icon { transform: none; }
nav.tabbar a:focus-visible .tab-icon { box-shadow: none; outline: 3px solid var(--md-sys-color-secondary); outline-offset: 2px; border-radius: var(--md-shape-full); }
/* The song playing in the middle: a FAB in the primary container colour */
nav.tabbar .tab-now {
  background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container);
  box-shadow: 0 0 0 6px var(--bar-bg), var(--md-elevation-3);
}
nav.tabbar .tab-now .tab-icon { width: 100%; height: 100%; }
nav.tabbar .tab-now .tab-icon::before { display: none; }
nav.tabbar .tab-now .tab-icon svg { color: var(--md-sys-color-on-primary-container); }
@media (max-width: 900px) { nav.tabbar a { font-size: var(--md-label-small); } nav.tabbar .tab-icon { width: 56px; } }
@media (max-width: 380px) { nav.tabbar .tab-icon { width: 48px; } }

/* ---- Navigation drawer: surface-container-low, rounded on its open side, pill indicator ---- */
.sheet {
  background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface-variant); box-shadow: var(--md-elevation-1);
  border-start-end-radius: var(--md-shape-large); border-end-end-radius: var(--md-shape-large); padding-inline: 12px;
  transition: transform var(--md-duration-medium4) var(--md-easing-emphasized-decelerate), visibility 0s linear var(--md-duration-medium4);
}
.sheet .brand, .sheet .brand strong, .sheet-who strong { color: var(--md-sys-color-on-surface); }
.sheet-who { background: var(--md-sys-color-surface-container-high); border-radius: var(--md-shape-large); }
.sheet-who small { color: var(--md-sys-color-on-surface-variant); }
.sheet .side-label { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-title-small); font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 1; }
.sheet a:not(.brand):not(.sheet-who), .sheet-row {
  min-height: 56px; padding: 0 16px 0 24px; border-radius: var(--md-shape-full); color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-label-large); font-weight: 500;
}
.sheet a:not(.brand):not(.sheet-who) svg, .sheet-row svg { width: 24px; height: 24px; opacity: 1; }
.sheet a:not(.brand):not(.sheet-who):hover, .sheet-row:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.sheet a:not(.brand):not(.sheet-who):active, .sheet-row:active { background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); transform: none; }
.sheet a.active { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font-weight: 600; }
.sheet a.active svg { color: var(--md-sys-color-on-secondary-container); }
.sheet a.active::before { display: none; }
.sheet-foot { border-top: 1px solid var(--md-sys-color-outline-variant); }
.side-fold { color: var(--md-sys-color-on-surface-variant); background: transparent; border: 0; border-radius: var(--md-shape-full); }
.sheet-scrim { background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent); }

/* ---- FAB (back to the top): 56px, 16px corners, primary-container ---- */
.flair-top {
  width: 56px !important; height: 56px !important; border-radius: var(--md-shape-large) !important; border: 0 !important;
  background: var(--md-sys-color-primary-container) !important; color: var(--md-sys-color-on-primary-container) !important; box-shadow: var(--md-elevation-3) !important;
}
.flair-top:hover { box-shadow: var(--md-elevation-4) !important; }

/* ---- Music: buttons follow the same roles ---- */
.music-pill {
  height: 40px; padding: 0 24px 0 16px; border: 0; border-radius: var(--md-shape-full);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container);
  font-size: var(--md-label-large); font-weight: 500;
  transition: box-shadow var(--md-duration-short4) var(--md-easing-standard);
}
.music-pill:hover { border-color: transparent; transform: none; box-shadow: var(--md-elevation-1); }
.music-pill:active { transform: none; }
.music-pill.is-main { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); box-shadow: none; }
.music-pill.is-main:hover { background: var(--md-sys-color-primary); box-shadow: var(--md-elevation-1); }
.music-ball {
  width: 48px; height: 48px; border: 0; background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant);
  transition: box-shadow var(--md-duration-short4) var(--md-easing-standard);
}
.music-ball:hover { border-color: transparent; transform: none; }
.music-ball:active { transform: none; }
.music-ball.is-main { width: 56px; height: 56px; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); box-shadow: none; }
.music-ball.is-main:hover { background: var(--md-sys-color-primary); transform: none; box-shadow: var(--md-elevation-1); }
.music-ball.is-on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border-color: transparent; }
.booklet-btn-go, .suggest-song-play { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }

/* Things that sat in the brand green with white on them now take the on-primary colour. */
.cal-now, .shot-fav.on, .like-btn.on, .bulk-card.is-on .bulk-check, .dl-tile.is-on .dl-tile-check, .note-badge,
.where-tile.is-picked .where-check, .pick-done-mark, .link-pick-mark, .role-chip.is-on { color: var(--md-sys-color-on-primary); }
.role-chip.is-on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }

/* ---- Pages fade through (M3): the new page fades in and grows slightly, decelerating ---- */
#view > * { animation: md-fade-through var(--md-duration-medium2) var(--md-easing-emphasized-decelerate) both; }
@keyframes md-fade-through { from { opacity: 0; transform: scale(0.985); } }

/* ---- Reduced motion: no movement, only quick cross-fades ---- */
@media (prefers-reduced-motion: reduce) {
  #view > *, .toast, .more-menu, .modal, .lyrics-editor-card, .chat-people-card { animation-duration: 1ms !important; }
  .md-ripple { display: none; }
  nav.tabbar .tab-icon::before, .sheet { transition-duration: 1ms !important; }
}

/* ---- More of the same: the music search bar, the back and ⋮ buttons, info cards ---- */
.music-search {
  height: 56px; padding: 0 8px 0 16px; border: 0; border-radius: var(--md-shape-full);
  background: var(--md-sys-color-surface-container-high); box-shadow: none;
  transition: background-color var(--md-duration-short4) var(--md-easing-standard), box-shadow var(--md-duration-short4) var(--md-easing-standard);
}
.music-search:focus-within { border-color: transparent; background: var(--md-sys-color-surface-container-highest); box-shadow: var(--md-elevation-1); }
.music-search input { font-size: var(--md-body-large); }
.music-search .ms-icon { color: var(--md-sys-color-on-surface); }
.ms-drop { border-radius: 0 0 var(--md-shape-extra-large) var(--md-shape-extra-large); background: var(--md-sys-color-surface-container-high); border: 0; box-shadow: var(--md-elevation-3); }
/* Icon buttons over the page (back, ⋮ at the top): filled tonal, 40px (48px to touch), no outline;
   ⋮ in lists and cards: standard icon buttons, no container */
.music-back, .music-top-bar .more-btn {
  width: 40px; height: 40px; border: 0; border-radius: var(--md-shape-full); position: relative;
  background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant);
  transition: background-color var(--md-duration-short4) var(--md-easing-standard);
}
.music-back svg, .music-top-bar .more-btn svg { width: 24px; height: 24px; }
.music-back:hover, .music-top-bar .more-btn:hover { transform: none; border-color: transparent; background: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, var(--md-sys-color-surface-container-highest)); }
.more-btn { position: relative; width: 40px; height: 40px; border: 0; color: var(--md-sys-color-on-surface-variant); transition: background-color var(--md-duration-short4) var(--md-easing-standard); }
.more-btn svg { width: 20px; height: 20px; }
.more-btn:hover, .more-btn:focus-visible { transform: none; border-color: transparent; background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.music-back::after, .more-btn::after { content: ""; position: absolute; inset: -4px; }
.install-strip { border: 0; border-radius: var(--md-shape-medium); background: var(--md-sys-color-surface-container); }
.install-strip img { border-radius: var(--md-shape-medium); box-shadow: none; }
.install-strip-x { width: 40px; height: 40px; top: 4px; inset-inline-end: 4px; }
.upload-btn .upload-mark { border: 0 !important; width: auto !important; height: auto !important; }
/* Notifications: filled cards, no outline */
.note-row { border: 0; border-radius: var(--md-shape-medium); background: var(--md-sys-color-surface-container-low); box-shadow: none; }
.note-row.is-unread { background: var(--md-sys-color-surface-container-high); }

/* ---- A singer's "About" card (as Spotify shows it) and its full view ---- */
.singer-about .about-card {
  display: block; width: 100%; max-width: 720px; padding: 0; border: 0; text-align: start; cursor: pointer; overflow: hidden; position: relative;
  border-radius: var(--md-shape-large); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface);
  transition: box-shadow var(--md-duration-short4) var(--md-easing-standard);
}
.singer-about .about-card:hover { box-shadow: var(--md-elevation-1); }
.about-pic { display: block; aspect-ratio: 16 / 9; max-height: 320px; width: 100%; overflow: hidden; background: var(--md-sys-color-surface-container-highest); }
.about-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--md-duration-long2) var(--md-easing-emphasized-decelerate); }
.singer-about .about-card:hover .about-pic img { transform: scale(1.03); }
.about-body { display: grid; gap: 6px; padding: 16px 20px 18px; }
.about-body strong { font-size: var(--md-title-medium); line-height: var(--md-title-medium-lh); font-weight: 600; }
.about-text { font-size: var(--md-body-medium); line-height: 1.55; color: var(--md-sys-color-on-surface-variant); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.about-more { font-size: var(--md-label-large); font-weight: 600; color: var(--md-sys-color-primary); }
.about-sheet { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--md-sys-color-scrim) 40%, transparent); animation: palette-fade var(--md-duration-short4) var(--md-easing-standard); }
.about-sheet-card {
  position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--md-shape-extra-large); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-elevation-3); animation: md-dialog-in var(--md-duration-medium4) var(--md-easing-emphasized-decelerate);
}
.about-sheet-pic { aspect-ratio: 16 / 10; overflow: hidden; }
.about-sheet-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-close { position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(0, 0, 0, 0.45); color: #fff; }
.about-sheet-body { padding: 20px 24px 28px; }
.about-sheet-body h2 { margin: 0 0 10px; font-size: var(--md-headline-small); line-height: var(--md-headline-small-lh); font-weight: 600; }
.about-sheet-body p { margin: 0; font-size: var(--md-body-large); line-height: 1.7; color: var(--md-sys-color-on-surface-variant); }
@media (max-width: 599px) {
  .about-sheet { padding: 0; align-items: end; }
  .about-sheet-card { width: 100%; max-height: 92dvh; border-radius: var(--md-shape-extra-large) var(--md-shape-extra-large) 0 0; animation-name: md-sheet-up; }
}
@keyframes md-sheet-up { from { transform: translateY(40px); opacity: 0; } }
/* Sorting a singer's "see all": a line of filter chips */
.sort-chips { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 2px 0; }
.sort-chips .chip { text-decoration: none; flex: none; height: 32px; }
.sort-chips .chip svg { width: 18px; height: 18px; }

/* ---- An album's songs: the track number in place of the cover; dragging them into order ---- */
.grid-num { flex: none; width: 40px; height: 40px; display: grid; place-items: center; position: relative; font-size: var(--md-title-medium); font-weight: 600; color: var(--md-sys-color-on-surface-variant); font-variant-numeric: tabular-nums; }
.grid-num-eq { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.grid-num-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--md-sys-color-primary); animation: wave-sm 0.9s ease-in-out infinite; }
.grid-num-eq i:nth-child(2) { animation-delay: 0.15s; } .grid-num-eq i:nth-child(3) { animation-delay: 0.3s; }
.grid-song-main.is-on .grid-num b { display: none; }
.grid-song-main.is-on .grid-num-eq { display: flex; }
.grid-song-main.is-on .grid-names strong { color: var(--md-sys-color-primary); }
.track-order-btn { margin: 0 0 8px; }
.track-handle { display: none; flex: none; width: 40px; height: 40px; place-items: center; border-radius: var(--md-shape-full); color: var(--md-sys-color-on-surface-variant); cursor: grab; touch-action: none; }
.track-handle svg { width: 22px; height: 22px; }
.is-arranging-tracks .track-handle { display: grid; }
.is-arranging-tracks .grid-song { background: var(--md-sys-color-surface-container-low); border-radius: var(--md-shape-medium); }
.grid-song.is-dragging { position: relative; z-index: 3; box-shadow: var(--md-elevation-3); background: var(--md-sys-color-surface-container-high) !important; cursor: grabbing; }
.is-arranging-tracks { user-select: none; -webkit-user-select: none; }
@media (prefers-reduced-motion: reduce) { .grid-num-eq i { animation: none; height: 8px; } }

/* ---- Auto Play: a Material switch in the now-playing menu ---- */
.np-more [data-np="autoplay"] span { display: grid; gap: 2px; text-align: start; flex: 1; min-width: 0; }
.np-more [data-np="autoplay"] small { font-size: var(--md-body-small); line-height: var(--md-body-small-lh); opacity: 0.75; font-weight: 400; }
.np-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: var(--md-shape-full); border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.08); transition: background-color var(--md-duration-short4) var(--md-easing-standard), border-color var(--md-duration-short4) var(--md-easing-standard); }
.np-switch::after { content: ""; position: absolute; top: 50%; inset-inline-start: 6px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); transition: inset-inline-start var(--md-duration-medium1) var(--md-easing-emphasized), width var(--md-duration-short4), height var(--md-duration-short4), margin var(--md-duration-short4); }
[data-np="autoplay"].is-on .np-switch { background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); }
[data-np="autoplay"].is-on .np-switch::after { inset-inline-start: 22px; width: 24px; height: 24px; margin-top: -12px; background: var(--md-sys-color-on-primary); }

/* ---- The song playing, folded down: a bar right on top of the menu bar (as in the owner's picture):
   the cover, the name in bold, singer • album under it, pause and ✕, and a thin line for how far it is ---- */
html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) {
  display: grid !important; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  position: fixed; z-index: 45; left: 50%; right: auto; transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px)); height: 76px;
  bottom: calc(var(--tab-gap, 12px) + var(--tabbar-h, 54px) + env(safe-area-inset-bottom));
  padding: 10px 12px 12px 14px; margin: 0; border: 0; border-radius: var(--md-shape-large) var(--md-shape-large) 0 0;
  background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); box-shadow: none; overflow: hidden;
  text-align: start; cursor: pointer; animation: md-snack-in var(--md-duration-medium2) var(--md-easing-emphasized-decelerate);
}
@media (max-width: 900px) {
  html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) { width: auto; left: 12px; right: 12px; transform: none; }
}
html:has(#now-playing:not([hidden])) nav.tabbar { border-radius: 0 0 var(--md-shape-extra-large) var(--md-shape-extra-large); box-shadow: var(--md-elevation-2); }
/* The round button in the menu bar stays inside the bar while the song bar is shown, so they never overlap. */
html:has(#now-playing:not([hidden])) nav.tabbar .tab-now { margin-top: 0; box-shadow: none; }
#now-playing .player-disc-wrap { width: 56px !important; height: 56px !important; }
#now-playing .player-disc { width: 56px !important; height: 56px !important; border-radius: var(--md-shape-small) !important; animation: none !important; border: 0 !important; background-size: cover; background-position: center; }
#now-playing .player-info { display: flex !important; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; text-align: start; }
#now-playing .player-info strong { font-size: var(--md-title-medium); line-height: 1.3; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--md-sys-color-on-surface); }
#now-playing .player-info [data-artist] { font-size: var(--md-body-medium); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--md-sys-color-on-surface-variant); }
#now-playing .soundwave, #now-playing .mini-seek, #now-playing [data-act="prev"], #now-playing [data-act="next"],
#now-playing [data-act="shuffle"], #now-playing [data-dl], #now-playing [data-act="hide"] { display: none !important; }
#now-playing .player-controls { display: flex !important; position: relative; z-index: 2; width: auto; }
#now-playing .player-play { width: 48px; height: 48px; min-height: 48px; padding: 0; border: 0; border-radius: var(--md-shape-full); background: transparent !important; color: var(--md-sys-color-on-surface) !important; box-shadow: none !important; }
#now-playing .player-play svg { width: 30px; height: 30px; }
#now-playing .mini-tools { display: flex !important; position: relative !important; inset: auto !important; z-index: 2; }
#now-playing .mini-tools [data-act="close"] { width: 48px; height: 48px; border: 0; border-radius: var(--md-shape-full); background: transparent; color: var(--md-sys-color-on-surface-variant); display: grid; place-items: center; }
#now-playing .mini-tools [data-act="close"] svg { width: 26px; height: 26px; }
#now-playing .mini-open { display: block !important; position: absolute; inset: 0; z-index: 1; background: transparent; border: 0; }
#now-playing .mini-progress { display: block !important; position: absolute; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; height: 3px !important; border-radius: 0; background: color-mix(in srgb, var(--md-sys-color-on-surface) 18%, transparent); }
#now-playing .mini-progress span { display: block; height: 100%; border-radius: 0 2px 2px 0; background: var(--md-sys-color-on-surface); }
[dir="rtl"] #now-playing .mini-progress span { margin-inline-start: 0; }
/* Room at the bottom of the page for the song bar */
html:has(#now-playing:not([hidden])) .main { padding-bottom: calc(var(--tabbar-h, 54px) + var(--tab-gap, 12px) + 110px); }
html:has(#now-playing:not([hidden])) .toasts { bottom: calc(var(--tabbar-h, 54px) + var(--tab-gap, 12px) + 96px + env(safe-area-inset-bottom)); }
html.np-open #now-playing, html.sheet-open #now-playing { opacity: 0; pointer-events: none; }

/* ---- Statistics page (administrators): large numbers first, then each Jewish day / week / month / year ---- */
a.stat-card { text-decoration: none; color: inherit; cursor: pointer; transition: transform var(--md-duration-short4) var(--md-easing-standard); }
a.stat-card:hover { transform: translateY(-2px); }
.stat-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: var(--md-label-medium); font-weight: 600; opacity: 0.9; }
.stat-more svg { width: 16px !important; height: 16px !important; max-width: none !important; }
.stats-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 20px; }
.stats-pic { flex: none; width: 72px; height: 72px; border-radius: var(--md-shape-medium); object-fit: cover; background: var(--md-sys-color-surface-container-high); }
.stats-pic.is-round { border-radius: 50%; }
.stats-pic-icon { display: grid; place-items: center; color: var(--md-sys-color-primary); }
.stats-pic-icon svg { width: 34px; height: 34px; }
.stats-head .page-title { margin: 0; overflow-wrap: anywhere; }
.stats-head .eyebrow { margin: 0 0 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--md-shape-large); background: var(--md-sys-color-surface-container); min-width: 0; }
.kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--md-shape-full); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); margin-bottom: 6px; }
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-value { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; white-space: nowrap; }
[dir="rtl"] .kpi-value { text-align: right; }
.kpi-label { font-size: var(--md-label-large); font-weight: 500; color: var(--md-sys-color-on-surface-variant); }
.kpi-sub { font-size: var(--md-body-small); color: var(--md-sys-color-on-surface-variant); }
.stat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.stat-tabs .chip { flex: none; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stat-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(80px, 2fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--md-shape-medium); }
.stat-row:nth-child(odd) { background: var(--md-sys-color-surface-container-low); }
.stat-row.is-now { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.stat-row-label { font-weight: 600; font-size: var(--md-body-medium); display: grid; gap: 1px; }
.stat-row-label i { font-style: normal; font-size: var(--md-label-small); font-weight: 600; opacity: 0.8; }
.stat-row-bar { height: 10px; border-radius: var(--md-shape-full); background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); overflow: hidden; }
.stat-row-bar i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--md-sys-color-primary); }
.stat-row-nums { font-size: var(--md-body-small); white-space: nowrap; color: inherit; opacity: 0.9; font-variant-numeric: tabular-nums; }
.stat-row-nums b { font-size: var(--md-title-small); }
.stat-row-nums span { margin: 0 6px; opacity: 0.5; }
@media (max-width: 599px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .stat-row-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- The cards at the top of the music page (style 1: the cover blurred behind, the cover beside the words) ---- */
.top-cards { position: relative; margin: 6px 0 18px; }
.tcards-view { overflow: hidden; border-radius: 22px; }
.tcards-track { display: flex; gap: 12px; transition: transform .55s cubic-bezier(.2, .8, .2, 1); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tcard {
  position: relative; flex: 0 0 100%; height: 210px; border-radius: 22px; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 18px; padding: 18px; box-sizing: border-box; color: #fff;
  background: linear-gradient(135deg, var(--md-sys-color-primary, #5b2a86), #15141c);
  transition: opacity .4s ease;
}
.tcard-bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; z-index: -2; filter: blur(30px) saturate(1.3) brightness(.7); transform: scale(1.1); pointer-events: none; }
.tcard-picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; pointer-events: none; }
.tcard-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, transparent 30%, rgba(0, 0, 0, .5)); pointer-events: none; }
[dir="ltr"] .tcard-shade { background: linear-gradient(to right, transparent 30%, rgba(0, 0, 0, .5)); }
.tcard.has-picture { align-items: flex-end; }
.tcard.has-picture .tcard-shade { background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .1) 65%); }
.tcard-cover { flex: 0 0 auto; width: 150px; height: 150px; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); background: rgba(255, 255, 255, .08); }
.tcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard.is-round .tcard-cover { border-radius: 50%; }
.tcard.is-wide .tcard-cover { width: 200px; height: 112px; }
.tcard-text { flex: 1; min-width: 0; }
.tcard-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tcard-tag svg { width: 13px; height: 13px; }
.tcard h3 { margin: 8px 0 4px; font-size: 1.5rem; line-height: 1.15; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.tcard h3 a { color: inherit; text-decoration: none; }
.tcard-who { margin: 0 0 12px; font-size: .92rem; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tcard-play, .tcard-open { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.tcard-play { border: 0; background: #fff; color: #15141c; }
.tcard-play svg { width: 18px; height: 18px; }
.tcard-open { border: 1.5px solid rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.tcard-play:focus-visible, .tcard-open:focus-visible, .tcard-more:focus-visible, .tcards-bar:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tcard-more { position: absolute; top: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .38); color: #fff; cursor: pointer; }
.tcard-more svg { width: 20px; height: 20px; }
.tcards-bars { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.tcards-bar { position: relative; flex: 0 1 28px; height: 18px; padding: 0; border: 0; cursor: pointer; background: linear-gradient(color-mix(in srgb, var(--md-sys-color-on-surface, #222) 18%, transparent), color-mix(in srgb, var(--md-sys-color-on-surface, #222) 18%, transparent)) center / 100% 4px no-repeat; border-radius: 2px; }
.tcards-bar.is-long { flex-basis: 40px; }
.tcards-bar i { position: absolute; inset-inline-start: 0; top: 7px; height: 4px; width: 0; border-radius: 2px; background: var(--md-sys-color-primary, #5b2a86); }
.tcards-manage { display: flex; align-items: center; gap: 6px; width: fit-content; margin: 4px 0 0; margin-inline-start: auto; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--md-sys-color-surface-container-high, #eee); color: var(--md-sys-color-on-surface, #222); font: inherit; font-size: .84rem; cursor: pointer; }
.tcards-manage svg { width: 16px; height: 16px; }
.tcards-empty { margin: 0 0 4px; }
@media (max-width: 419px) {
  .tcard { height: 190px; gap: 14px; padding: 14px; }
  .tcard-cover { width: 116px; height: 116px; }
  .tcard.is-wide .tcard-cover { width: 120px; height: 68px; }
  .tcard h3 { font-size: 1.22rem; }
  .tcard-who { margin-bottom: 10px; font-size: .84rem; }
  .tcard-play, .tcard-open { min-height: 36px; padding: 0 14px; font-size: .86rem; }
}
@media (min-width: 600px) {
  .tcard { height: 250px; padding: 22px; gap: 22px; }
  .tcard-cover { width: 190px; height: 190px; }
  .tcard.is-wide .tcard-cover { width: 300px; height: 169px; }
  .tcard h3 { font-size: 2rem; }
}
@media (min-width: 900px) {
  .tcards-view { border-radius: 0; overflow: visible; }
  .top-cards { overflow: hidden; }
  .tcard { flex-basis: calc(100% - 120px); height: 300px; padding: 30px; gap: 30px; }
  .tcard:not(.is-on) { opacity: .5; cursor: pointer; }
  .tcard-cover { width: 240px; height: 240px; }
  .tcard.is-wide .tcard-cover { width: 380px; height: 214px; }
  .tcard h3 { font-size: 2.6rem; }
  .tcard-who { font-size: 1.05rem; margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { .tcards-track, .tcard { transition: none; } }

/* Arranging the cards (music administrators) */
.card-picture-pick { border: 0; padding: 0; margin: 4px 0; }
.card-picture-pick legend { font-weight: 600; margin-bottom: 4px; }
.card-picture-pick .check, .list-editor-card > .check { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.card-days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-order { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.card-order-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--md-sys-color-surface-container, #f3f3f3); position: relative; }
.card-order-row.is-off { opacity: .6; }
.card-order-row.is-dragging { z-index: 2; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.card-grip { cursor: grab; touch-action: none; font-size: 1.2rem; padding: 6px; user-select: none; }
.card-order-name { flex: 1; min-width: 0; display: grid; }
.card-order-name b, .card-order-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-order-name small { opacity: .7; }
.card-order-row .icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1.05rem; cursor: pointer; }
.card-order-row .icon-btn:disabled { opacity: .3; cursor: default; }
.card-hidden-title { margin: 14px 0 4px; }
.card-hidden { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.card-hidden li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* The cards in the place of the covers' wheel: the progress lines inside the card, and between the two
   boxes (music administrators) at their height. */
.tcards-view { position: relative; }
.tcard { padding-bottom: 30px; }
.tcards-bars { position: absolute; left: 0; right: 0; bottom: 6px; margin: 0; z-index: 3; pointer-events: none; }
.tcards-bar { pointer-events: auto; background: linear-gradient(rgba(255, 255, 255, .32), rgba(255, 255, 255, .32)) center / 100% 4px no-repeat; }
.tcards-bar i { background: #fff; }
.music-top.has-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "cards cards" "streams songs"; gap: 12px; margin: 4px 0 26px; }
.music-top.has-stats > .top-cards { grid-area: cards; margin: 0; min-width: 0; }
.music-top.has-stats > .stat-streams { grid-area: streams; }
.music-top.has-stats > .stat-songs { grid-area: songs; }
.music-top .top-cards.is-empty { display: none; }
@media (min-width: 1000px) {
  .music-top.has-stats { grid-template-columns: 230px minmax(0, 1fr) 230px; grid-template-areas: "streams cards songs"; align-items: stretch; column-gap: 24px; }
  .music-top.has-stats > .stat-card { height: 300px; box-sizing: border-box; padding: 18px 14px; }
  .music-top.has-stats .top-cards { overflow: hidden; border-radius: 22px; }
  .music-top.has-stats .tcards-view { overflow: hidden; border-radius: 22px; }
  .music-top.has-stats .tcard { flex-basis: 100%; height: 300px; padding: 26px 26px 34px; gap: 24px; }
  .music-top.has-stats .tcard:not(.is-on) { opacity: 1; }
  .music-top.has-stats .tcard-cover { width: 210px; height: 210px; }
  .music-top.has-stats .tcard h3 { font-size: 2.2rem; }
  .music-top.has-stats .top-cards.is-empty { display: block; }
}

/* ---- The song bar, simple and in Google's look (sample C): always one line. Thin on a phone (the cover,
   the name, play, next, fold and ✕); on a tablet also mix, back, again and the list; on a laptop longer,
   with the time line in the same row. ---- */
html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) {
  grid-template-columns: 40px minmax(0, 1fr) auto auto; grid-template-areas: "art info ctl tools";
  height: 60px; gap: 8px; padding: 8px 6px 8px 10px;
}
html #now-playing .player-disc-wrap { grid-area: art; width: 40px !important; height: 40px !important; }
html #now-playing .player-disc { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
html #now-playing .player-info { grid-area: info; }
html #now-playing .player-info strong { font-size: var(--md-title-small, .95rem); }
html #now-playing .player-info [data-artist] { font-size: var(--md-body-small, .8rem); }
html #now-playing .player-controls { grid-area: ctl; align-items: center; gap: 2px; flex-wrap: nowrap; }
html #now-playing .mini-tools { grid-area: tools; align-items: center; gap: 0; }
html #now-playing.mini-player .player-btn, html #now-playing .mini-tools button {
  position: relative; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: var(--md-shape-full, 999px);
  display: grid; place-items: center; background: transparent; color: var(--md-sys-color-on-surface-variant); box-shadow: none;
  transition: background-color var(--md-duration-short4, .2s) var(--md-easing-standard, ease);
}
html #now-playing.mini-player .player-btn svg, html #now-playing .mini-tools button svg { width: 22px; height: 22px; }
html #now-playing.mini-player .player-btn:hover, html #now-playing .mini-tools button:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
html #now-playing.mini-player .player-btn.is-on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
html #now-playing.mini-player .player-play { width: 40px; height: 40px; min-height: 40px; border-radius: 14px; background: var(--md-sys-color-primary) !important; color: var(--md-sys-color-on-primary) !important; }
html #now-playing.mini-player .player-play svg { width: 22px; height: 22px; }
html #now-playing .mini-one { display: none; position: absolute; top: 5px; inset-inline-end: 5px; font-style: normal; font-size: 9px; font-weight: 800; line-height: 1; }
html #now-playing .player-repeat[data-repeat="one"] .mini-one { display: block; }
/* What a phone has room for */
html #now-playing.mini-player .player-controls [data-act="next"] { display: grid !important; }
html #now-playing.mini-player .player-controls [data-act="shuffle"], html #now-playing.mini-player .player-controls [data-act="prev"],
html #now-playing.mini-player .player-controls [data-act="repeat"], html #now-playing.mini-player .player-controls [data-act="list"],
html #now-playing.mini-player [data-dl], html #now-playing.mini-player [data-act="hide"] { display: none !important; }
@media (min-width: 600px) {
  html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) { height: 64px; gap: 12px; }
  html #now-playing.mini-player .player-controls [data-act="shuffle"], html #now-playing.mini-player .player-controls [data-act="prev"],
  html #now-playing.mini-player .player-controls [data-act="repeat"], html #now-playing.mini-player .player-controls [data-act="list"] { display: grid !important; }
}
/* A laptop: longer, floating above the menu bar, with the time line in the row */
@media (min-width: 1000px) {
  html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) {
    width: min(1180px, calc(100vw - 48px)); height: 68px; gap: 16px; padding: 10px 14px;
    grid-template-columns: 48px minmax(150px, 1fr) auto minmax(220px, 1.4fr) auto; grid-template-areas: "art info ctl seek tools";
    border-radius: var(--md-shape-extra-large, 28px); box-shadow: var(--md-elevation-2);
    bottom: calc(var(--tab-gap, 12px) + var(--tabbar-h, 54px) + 10px + env(safe-area-inset-bottom));
  }
  html #now-playing .player-disc-wrap, html #now-playing .player-disc { width: 48px !important; height: 48px !important; }
  html:has(#now-playing:not([hidden])) nav.tabbar { border-radius: var(--md-shape-extra-large, 28px); }
  html #now-playing.mini-player .mini-seek { grid-area: seek; display: flex !important; align-items: center; gap: 10px; position: relative; z-index: 2; inset: auto; font-size: var(--md-label-small, .72rem); color: var(--md-sys-color-on-surface-variant); font-variant-numeric: tabular-nums; }
  html #now-playing.mini-player .mini-seek input { flex: 1; min-width: 0; accent-color: var(--md-sys-color-primary); }
  html #now-playing.mini-player .mini-progress { display: none !important; }
}
html #now-playing .mini-progress span { background: var(--md-sys-color-primary); }

/* ---- Folded away: a round button at the top (the cover, with pause or play on it) and ⌄ to bring the bar back ---- */
.np-fold { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top) + 76px); inset-inline-end: 12px; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--md-shape-full, 999px); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); box-shadow: var(--md-elevation-3, 0 8px 20px rgba(0,0,0,.25)); animation: md-snack-in var(--md-duration-medium2, .3s) var(--md-easing-emphasized-decelerate, ease-out); }
.np-fold[hidden] { display: none; }
.np-fold button { border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; font: inherit; }
.np-fold-play { position: relative; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--md-sys-color-primary); }
.np-fold-disc { position: absolute; inset: 0; background-size: cover; background-position: center; }
.np-fold-icon { position: relative; width: 100%; height: 100%; display: grid; place-items: center; background: rgba(0, 0, 0, .38); color: #fff; }
.np-fold-icon svg { width: 24px; height: 24px; }
.np-fold.is-playing .np-fold-play { box-shadow: 0 0 0 3px var(--md-sys-color-primary); }
.np-fold-back { width: 36px; height: 36px; border-radius: 50%; background: transparent; color: var(--md-sys-color-on-surface-variant); }
.np-fold-back:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.np-fold-back svg { width: 22px; height: 22px; }
html.np-open .np-fold { display: none; }
@media (min-width: 1000px) { .np-fold { top: calc(env(safe-area-inset-top) + 88px); } }

/* A singer's name leads to the singer: inside an album always, and everywhere on a laptop. */
html.on-album .singer-link { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) {
  .singer-link { cursor: pointer; }
  .singer-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
}

/* "See all" is always on the left (the end of the line), on the same line as the name of the row. */
.section-head > h2 { order: 1; min-width: 0; }
.section-head > .column-search { order: 2; margin-inline-start: auto; min-width: 110px; }
.section-head > .arrange-switch { order: 3; }
.section-head > .see-all { order: 4; margin-inline-start: 0; }
.section-head:not(:has(.column-search)) > .arrange-switch { margin-inline-start: auto; }
.section-head:not(:has(.column-search, .arrange-switch)) > .see-all { margin-inline-start: auto; }
@media (min-width: 700px) { .section-head:has(.see-all) { flex-wrap: nowrap; } }
@media (max-width: 699px) {
  .section-head > .column-search { order: 5; flex: 1 1 100%; margin-inline-start: 0; }
  .section-head:has(.column-search):not(:has(.arrange-switch)) > .see-all { margin-inline-start: auto; }
  .section-head:has(.column-search) > .arrange-switch { margin-inline-start: auto; }
}

/* The song bar in the colour of the play button (the site's main colour); the play button turns light on it. */
html #now-playing.mini-player:not([hidden]), html #now-playing.mini-player.is-tucked:not([hidden]) { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
html #now-playing .player-info strong, html #now-playing .player-info [data-artist] { color: var(--md-sys-color-on-primary); }
html #now-playing .player-info [data-artist] { opacity: 0.82; }
html #now-playing.mini-player .player-btn, html #now-playing .mini-tools button, html #now-playing .mini-tools [data-act="close"] { color: var(--md-sys-color-on-primary); }
html #now-playing.mini-player .player-btn:hover, html #now-playing .mini-tools button:hover { background: color-mix(in srgb, var(--md-sys-color-on-primary) 14%, transparent); }
html #now-playing.mini-player .player-btn.is-on { background: color-mix(in srgb, var(--md-sys-color-on-primary) 22%, transparent); color: var(--md-sys-color-on-primary); }
html #now-playing.mini-player .player-play { background: var(--md-sys-color-on-primary) !important; color: var(--md-sys-color-primary) !important; }
html #now-playing .mini-progress { background: color-mix(in srgb, var(--md-sys-color-on-primary) 25%, transparent) !important; }
html #now-playing .mini-progress span { background: var(--md-sys-color-on-primary); }
html #now-playing.mini-player .mini-seek { color: var(--md-sys-color-on-primary) !important; }
html #now-playing.mini-player .mini-seek input { accent-color: var(--md-sys-color-on-primary); }

/* "Shuffle all the music", in the middle under the cards */
.shuffle-all-row { display: flex; justify-content: center; margin: 4px 0 18px; }
.shuffle-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--md-shape-full, 999px); background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font: inherit; font-weight: 700; font-size: var(--md-label-large, .95rem); cursor: pointer; box-shadow: var(--md-elevation-1); }
.shuffle-all svg { width: 20px; height: 20px; }
.shuffle-all:hover { box-shadow: var(--md-elevation-2); }
.shuffle-all:disabled { opacity: .6; cursor: progress; }

/* A singer's categories, small under the name; and choosing them (music administrators) */
.singer-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.singer-cats span { padding: 2px 10px; border-radius: var(--md-shape-full, 999px); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); font-size: var(--md-label-medium, .78rem); font-weight: 600; }
.cat-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; margin: 6px 0; }
.cat-row { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 12px; }
.cat-row:nth-child(odd) { background: var(--md-sys-color-surface-container-low); }
.cat-row .check { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 0; }
.cat-row .check small { margin-inline-start: auto; opacity: .6; }
.cat-row .icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.cat-row .icon-btn svg { width: 18px; height: 18px; }
.cat-new { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.cat-new input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--md-sys-color-outline-variant, #ccc); background: var(--md-sys-color-surface); color: inherit; font: inherit; }
.cat-new .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cat-new .btn svg { width: 18px; height: 18px; }
.list-editor-card > * { min-width: 0; }
.cat-list { overflow-x: hidden; }
.cat-row { min-width: 0; }
.cat-row .check { margin: 0; }
.cat-row .check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-new { flex-wrap: wrap; }
.cat-new input { flex: 1 1 160px; width: auto; }

/* ---- The cards at the top as wide banners (the owner's pictures): 16:9, the cover on the left, the site's
   mark and the name in large letters on the right, the cover blurred behind, "ב״ה" at the top. Sizes go by
   the card's own width (cqw), so a phone and a laptop show the same banner, larger or smaller. ---- */
.tcard, .music-top.has-stats .tcard { height: auto !important; aspect-ratio: 16 / 9; padding: 0 !important; display: block; container-type: inline-size; gap: 0; }
.tcard-bg { filter: blur(28px) saturate(1.25) brightness(.55); }
.tcard-shade, [dir="ltr"] .tcard-shade { background: radial-gradient(120% 90% at 70% 50%, rgba(0, 0, 0, .1), rgba(0, 0, 0, .45)); }
.tcard-inner { position: absolute; inset: 0; display: flex; align-items: center; gap: 4cqw; padding: 5.5cqw 5cqw 7.5cqw 4.5cqw; box-sizing: border-box; }
.tcard .tcard-cover { position: relative; flex: none; height: 100%; width: auto; aspect-ratio: 1; border-radius: 1.4cqw; overflow: hidden; box-shadow: 0 2cqw 5cqw rgba(0, 0, 0, .45); }
.tcard.is-wide .tcard-cover { height: auto; width: 50%; aspect-ratio: 16 / 9; }
.tcard.is-round .tcard-cover { border-radius: 50%; }
.tcard-cover .tcard-tag { position: absolute; top: 2cqw; left: 2cqw; right: auto; }
.tcard.is-round .tcard-cover .tcard-tag { top: auto; bottom: 8%; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.tcard .tcard-tag { font-size: clamp(.58rem, 1.5cqw, .82rem); padding: .3cqw 1.2cqw; background: rgba(0, 0, 0, .45); color: #fff; }
.tcard .tcard-text { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.3cqw; }
.tcard-logo { height: 15cqw; max-height: 32%; width: auto; flex: none; filter: drop-shadow(0 .6cqw 1.6cqw rgba(0, 0, 0, .35)); }
.tcard h3, .music-top.has-stats .tcard h3 { margin: 0; width: 100%; line-height: 1.04; font-weight: 900; display: block; overflow: hidden; text-wrap: balance; overflow-wrap: break-word; letter-spacing: -0.01em; text-shadow: 0 .4cqw 2cqw rgba(0, 0, 0, .35); }
.tcard-who, .music-top.has-stats .tcard-who { margin: 0; max-width: 100%; font-size: clamp(.7rem, 2cqw, 1.15rem); }
.tcard-actions { justify-content: center; gap: 1.2cqw; }
.tcard .tcard-play, .tcard .tcard-open { min-height: clamp(30px, 5cqw, 44px); padding: 0 clamp(10px, 2.2cqw, 20px); font-size: clamp(.72rem, 1.7cqw, .95rem); }
.tcard .tcard-play svg { width: clamp(14px, 2cqw, 18px); height: clamp(14px, 2cqw, 18px); }
.tcard-bh { position: absolute; z-index: 2; top: 1.8cqw; right: 2.4cqw; font-size: clamp(.6rem, 1.4cqw, .9rem); font-weight: 600; color: rgba(255, 255, 255, .85); pointer-events: none; }
.tcard .tcard-more { top: auto; bottom: 1.6cqw; inset-inline-end: auto; inset-inline-start: 1.6cqw; width: clamp(30px, 4.6cqw, 38px); height: clamp(30px, 4.6cqw, 38px); z-index: 3; }
/* A card with a picture of its own: the picture over the whole card, the words small at the bottom right */
.tcard.has-picture .tcard-inner { align-items: flex-end; justify-content: flex-end; }
.tcard.has-picture .tcard-text { flex: 0 1 58%; height: auto; align-items: flex-end; text-align: right; }
.tcard.has-picture .tcard-actions { justify-content: flex-end; }
.tcard.has-picture .tcard-shade { background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 60%); }
.tcards-bar { height: 14px; }
.tcards-bar i { top: 5px; }
@media (max-width: 599px) { .tcard .tcard-open { display: none; } }
@media (min-width: 900px) {
  .top-cards:not(.music-top .top-cards) .tcard { flex-basis: min(calc(100% - 120px), 900px); }
}
.music-top.has-stats .tcard { flex-basis: 100%; }
/* The two boxes beside the banner are as tall as it is */
@media (min-width: 1000px) { .music-top.has-stats > .stat-card { height: auto; } }
.music-top.has-stats .tcard .tcard-cover { width: auto; height: 100%; }
.music-top.has-stats .tcard.is-wide .tcard-cover { width: 50%; height: auto; }
.tcard .tcard-tag { font-size: clamp(11px, 1.5cqw, .82rem); padding: max(2px, .3cqw) max(8px, 1.2cqw); }
.tcard-bh { font-size: clamp(11px, 1.4cqw, .9rem); }
.tcard-who, .music-top.has-stats .tcard-who { font-size: clamp(11px, 2cqw, 1.15rem); }

/* Folded away, the song's round button stands in the bar at the top, beside the search and "download" */
.np-fold.in-top { position: static; z-index: auto; top: auto; inset-inline-end: auto; padding: 2px; gap: 2px; box-shadow: none; background: var(--md-sys-color-surface-container-high); }
.np-fold.in-top .np-fold-play { width: 40px; height: 40px; }
.np-fold.in-top .np-fold-icon svg { width: 20px; height: 20px; }
.np-fold.in-top .np-fold-back { width: 32px; height: 32px; }
.np-fold.in-top .np-fold-back svg { width: 18px; height: 18px; }
.np-fold.in-top.is-playing .np-fold-play { box-shadow: 0 0 0 2px var(--md-sys-color-primary); }
@media (max-width: 599px) {
  .np-fold.in-top .np-fold-play { width: 36px; height: 36px; }
  .np-fold.in-top .np-fold-back { width: 28px; height: 28px; }
}

/* The luach: the same month in other years, on both sides of the title */
.luach-bar .luach-title { flex: 1; min-width: 0; }
.luach-years { display: flex; gap: 6px; flex: none; }
.luach-yr { min-height: 36px; padding: 0 14px; border-radius: var(--md-shape-full, 999px); border: 1px solid var(--md-sys-color-outline-variant, #d8d2cc); background: var(--md-sys-color-surface-container-low, transparent); color: var(--md-sys-color-on-surface); font: inherit; font-weight: 700; font-size: var(--md-label-large, .9rem); cursor: pointer; }
.luach-yr:hover { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
@media (max-width: 699px) {
  .luach-bar { flex-wrap: wrap; row-gap: 8px; }
  .luach-bar .luach-title { order: 1; flex: 1 1 calc(100% - 120px); }
  .luach-bar .luach-step:first-of-type { order: 0; }
  .luach-bar .luach-step:last-of-type { order: 2; }
  .luach-years { order: 3; flex: 1 1 40%; }
  .luach-years.is-after { justify-content: flex-end; }
  .luach-yr { min-height: 32px; padding: 0 12px; }
}
@media (min-width: 700px) {
  .luach-bar .luach-title { flex: 0 1 auto; }
  .luach-years { flex: 1 1 0; }
  .luach-years.is-before { justify-content: flex-start; }
  .luach-years.is-after { justify-content: flex-end; }
}
/* The other years as one small group (like a switch), quiet beside the arrows */
.luach-years:empty { visibility: hidden; }
.luach-years:not(:empty) > .luach-yr:first-child { margin-inline-start: 0; }
.luach-years { gap: 0; align-items: center; }
.luach-years:not(:empty) { flex-grow: 0; padding: 3px; border-radius: var(--md-shape-full, 999px); background: var(--md-sys-color-surface-container, #efeae4); }
.luach-yr { min-height: 32px; padding: 0 12px; border: 0; background: transparent; color: var(--md-sys-color-on-surface-variant); font-weight: 700; font-size: .85rem; border-radius: var(--md-shape-full, 999px); transition: background-color .2s, color .2s; }
.luach-yr:hover, .luach-yr:focus-visible { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); outline: none; }
@media (min-width: 700px) {
  .luach-bar { display: grid; grid-template-columns: auto 1fr auto 1fr auto; }
  .luach-years.is-before { justify-self: start; }
  .luach-years.is-after { justify-self: end; }
  .luach-bar .luach-title { grid-column: 3; }
}
@media (max-width: 699px) {
  .luach-years:not(:empty) { flex: 0 0 auto; }
  .luach-years.is-after:not(:empty) { margin-inline-start: auto; }
}

/* ---- The cards at the top, sample A: small (250 high on a laptop, 170 on a phone), coming from one side
   like the covers' wheel, beside the "total songs" box ---- */
.top-cards .tcards-view { position: relative; height: 170px; overflow: hidden; perspective: 1200px; border-radius: 0; }
@media (min-width: 600px) { .top-cards .tcards-view { height: 220px; } }
@media (min-width: 1000px) { .top-cards .tcards-view { height: 250px; } }
.top-cards .tcards-track { position: absolute; inset: 0; display: block; transform: none !important; transform-style: preserve-3d; transition: none; }
.top-cards .tcards-view .tcard { position: absolute; top: 0; inset-inline-start: 0; height: 100% !important; width: auto !important; aspect-ratio: 16 / 9; flex: none; border-radius: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s ease, filter .45s ease; will-change: transform; }
.top-cards .tcards-view .tcard:not(.is-on) { cursor: pointer; }
.top-cards .tcards-view .tcard:not(.is-on) .tcard-more, .top-cards .tcards-view .tcard:not(.is-on) .tcard-actions { visibility: hidden; }
.top-cards .tcards-bars { position: static; justify-content: flex-start; margin-top: 6px; pointer-events: auto; }
.top-cards .tcards-bar { background: linear-gradient(color-mix(in srgb, var(--md-sys-color-on-surface, #222) 18%, transparent), color-mix(in srgb, var(--md-sys-color-on-surface, #222) 18%, transparent)) center / 100% 4px no-repeat; }
.top-cards .tcards-bar i { background: var(--md-sys-color-primary, #2e6b35); }
/* Beside the boxes: "total streams", "total songs", then the cards */
.music-top.has-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "cards cards" "streams songs"; }
.music-top.has-stats > .stat-card { height: 130px; }
@media (min-width: 1000px) {
  .music-top.has-stats { grid-template-columns: 190px 190px minmax(0, 1fr); grid-template-areas: "streams songs cards"; align-items: start; column-gap: 18px; }
  .music-top.has-stats > .stat-card { height: 250px; }
  .music-top.has-stats .top-cards, .music-top.has-stats .tcards-view { overflow: hidden; border-radius: 0; }
  .music-top.has-stats .top-cards { overflow: visible; }
}
@media (min-width: 600px) and (max-width: 999px) { .music-top.has-stats > .stat-card { height: 150px; } }
@media (max-width: 999px) { .music-top.has-stats > .stat-card { height: auto; } }

/* ======================= "My taste" (music-taste.js): a short, lively setup ======================= */
.music-head { align-items: center; }
.taste-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(135deg, var(--md-sys-color-primary, #2e6b35), #6a3fb5); color: #fff; box-shadow: 0 6px 16px -6px rgba(74, 26, 107, .55);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.taste-icon svg { width: 24px; height: 24px; animation: taste-twinkle 3.2s ease-in-out infinite; }
.taste-icon:hover { transform: rotate(-8deg) scale(1.08); }
.taste-icon:active { transform: scale(.92); }
@keyframes taste-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(12deg); } }

/* The box on the music page */
.taste-box { position: relative; display: flex; align-items: center; gap: 16px; margin: 0 0 20px; padding: 16px 18px; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #2b0445, #2e6b35 60%, #3d8a45); color: #fff; box-shadow: 0 14px 30px -18px rgba(43, 4, 69, .8);
  animation: taste-in .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.taste-box::before { content: ''; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .14), transparent 30%); animation: taste-spin 7s linear infinite; }
.taste-box.is-going { animation: taste-out .4s ease forwards; }
.taste-box-art { position: relative; flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); }
.taste-box-art svg { width: 30px; height: 30px; animation: taste-twinkle 2.6s ease-in-out infinite; }
.taste-box-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.taste-box-text strong { font-size: 1.1rem; }
.taste-box-text span { opacity: .86; font-size: .9rem; }
.taste-box-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 599px) { .taste-box { flex-wrap: wrap; } .taste-box-actions { width: 100%; } .taste-box-actions .taste-btn { flex: 1; } }
@keyframes taste-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes taste-out { to { opacity: 0; transform: scale(.94); height: 0; padding: 0; margin: 0; } }
@keyframes taste-spin { to { transform: rotate(360deg); } }
.taste-note { position: absolute; font-style: normal; font-weight: 800; color: #fff; opacity: 0; animation: taste-float 3.6s ease-in-out infinite; pointer-events: none; }
.taste-note.n1 { top: -4px; right: -6px; animation-delay: .2s; } .taste-note.n2 { bottom: -2px; left: -8px; animation-delay: 1.4s; } .taste-note.n3 { top: 40%; left: -12px; animation-delay: 2.4s; } .taste-note.n4 { top: 10%; left: 20%; animation-delay: 3s; }
@keyframes taste-float { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 25% { opacity: .95; } 70% { opacity: .6; } 100% { opacity: 0; transform: translateY(-26px) scale(1.1) rotate(-12deg); } }

/* Buttons */
.taste-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background-color .2s; }
.taste-btn svg { width: 20px; height: 20px; }
.taste-btn.is-main { background: #fff; color: #1f3d22; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5); }
.taste-btn.is-quiet { background: rgba(255, 255, 255, .16); color: inherit; }
.taste-btn:hover { transform: translateY(-2px); }
.taste-btn:active { transform: scale(.95); }
.taste-btn.is-big { min-height: 54px; padding: 0 32px; font-size: 1.08rem; }
.taste-btn:disabled { opacity: .6; cursor: progress; }

/* The setup: over the whole screen, colour moving slowly behind */
html.taste-open { overflow: hidden; }
.taste { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; color: #fff; animation: taste-open .45s cubic-bezier(.2, .9, .3, 1.1) both; }
.taste.is-closing { animation: taste-close .3s ease forwards; }
@keyframes taste-open { from { opacity: 0; transform: scale(1.04); } }
@keyframes taste-close { to { opacity: 0; transform: scale(.98); } }
.taste-bg { position: absolute; inset: 0; overflow: hidden; background: #160626; }
.taste-bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); opacity: .55; animation: taste-blob 18s ease-in-out infinite alternate; }
.taste-bg i:nth-child(1) { background: #2e7d32; top: -20vmax; right: -15vmax; }
.taste-bg i:nth-child(2) { background: #6a1fb0; bottom: -25vmax; left: -15vmax; animation-delay: -6s; }
.taste-bg i:nth-child(3) { background: #c2185b; top: 30%; left: 30%; width: 40vmax; height: 40vmax; opacity: .3; animation-delay: -12s; }
@keyframes taste-blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, -4vmax) scale(1.15); } 100% { transform: translate(-5vmax, 5vmax) scale(.95); } }
.taste-card { position: relative; width: min(980px, 100%); height: min(760px, 100%); display: grid; grid-template-rows: auto 1fr auto; border-radius: 28px; overflow: hidden;
  background: rgba(255, 255, 255, .07); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
@media (max-width: 599px) { .taste { padding: 0; } .taste-card { border-radius: 0; height: 100%; border: 0; } }
.taste-top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.taste-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.taste-x svg { width: 20px; height: 20px; }
.taste-steps { flex: 1; display: flex; gap: 6px; }
.taste[data-step="intro"] .taste-steps, .taste[data-step="done"] .taste-steps { visibility: hidden; }
.taste-steps i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.taste-steps i b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8be28f, #fff); transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.taste-steps i.is-on b { width: 100%; }
.taste-step-n { font-weight: 700; font-size: .85rem; opacity: .8; min-width: 32px; text-align: center; }
.taste-stage { position: relative; overflow-y: auto; overflow-x: hidden; padding: 4px 20px 20px; overscroll-behavior: contain; }
.taste-page { animation: taste-page-in .42s cubic-bezier(.2, .9, .3, 1) both; }
.taste-page.is-leaving { position: absolute; inset: 4px 20px auto; animation: taste-page-out .26s ease forwards; pointer-events: none; }
@keyframes taste-page-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * -40px)); } }
@keyframes taste-page-out { to { opacity: 0; transform: translateX(calc(var(--dir, 1) * 40px)); } }
.taste-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .14); }
.taste-foot[hidden] { display: none; }
.taste-count { flex: 1; text-align: center; font-weight: 700; font-size: .92rem; opacity: .9; }
.taste-count.is-bump { animation: taste-bump .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes taste-bump { 40% { transform: scale(1.12); } }
.taste-head { text-align: center; margin: 6px 0 14px; }
.taste-head h2, .taste-intro h2, .taste-done h2 { margin: 0 0 6px; font-family: var(--display, serif); font-size: clamp(1.4rem, 3.2vw, 2rem); }
.taste-head p { margin: 0; opacity: .82; }

/* Intro */
.taste-intro { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 16px 0; }
.taste-intro p { margin: 0; opacity: .85; max-width: 420px; }
.taste-hero { position: relative; width: 130px; height: 130px; display: grid; place-items: center; margin: 8px 0 6px; }
.th-core { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3d9a46, #7b3fd0); box-shadow: 0 10px 40px rgba(123, 63, 208, .55); animation: taste-beat 2.4s ease-in-out infinite; }
.th-core svg { width: 44px; height: 44px; color: #fff; }
.th-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); animation: taste-ring 2.4s ease-out infinite; }
.th-ring.r2 { animation-delay: 1.2s; }
@keyframes taste-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 30% { transform: scale(.98); } 45% { transform: scale(1.05); } }
@keyframes taste-ring { from { transform: scale(.65); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.taste-plan { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 8px; text-align: start; }
.taste-plan li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); animation: taste-in .5s calc(var(--n, 0) * 80ms + .2s) both; }
.taste-plan li:nth-child(1) { --n: 1; } .taste-plan li:nth-child(2) { --n: 2; } .taste-plan li:nth-child(3) { --n: 3; } .taste-plan li:nth-child(4) { --n: 4; }
.taste-plan li span { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #2b0445; font-weight: 800; }

/* Singers */
.taste-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0; font-size: .85rem; }
.taste-legend span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.taste-legend i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; color: #fff; }
.lg-more i { background: #2e9e4f; } .lg-less i { background: #e0a100; } .lg-never i { background: #d9473f; }
.taste-search { display: flex; align-items: center; gap: 8px; max-width: 360px; margin: 0 auto; padding: 0 14px; height: 42px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.taste-search svg { width: 18px; height: 18px; opacity: .8; }
.taste-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; outline: none; }
.taste-search input::placeholder { color: rgba(255, 255, 255, .6); }
.taste-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; padding: 8px 4px 8px; }
@media (max-width: 420px) { .taste-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tb { display: grid; justify-items: center; gap: 6px; padding: 6px 2px; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  animation: taste-pop-in .45s calc(var(--i, 0) * 22ms) cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes taste-pop-in { from { opacity: 0; transform: scale(.6) translateY(10px); } }
.tb-pic { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s, filter .3s, opacity .3s; }
.tb-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tb-letter { font-size: 2rem; font-weight: 800; }
.tb b { font-size: .86rem; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
.tb small { font-size: .74rem; font-weight: 700; min-height: 1em; opacity: .9; }
.tb-badge { position: absolute; bottom: -2px; right: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; font-weight: 900; color: #fff;
  transform: scale(0); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1); border: 2px solid #1a0b2b; }
.tb:hover .tb-pic { transform: scale(1.05); }
.tb.is-more .tb-pic { transform: scale(1.12); box-shadow: 0 0 0 4px #3dbb5e, 0 0 24px 2px rgba(61, 187, 94, .6); }
.tb.is-more .tb-badge { transform: scale(1); background: #2e9e4f; } .tb.is-more .tb-badge::after { content: '♥'; }
.tb.is-more small { color: #9cf0ad; }
.tb.is-less .tb-pic { transform: scale(.98); box-shadow: 0 0 0 4px #e0a100; }
.tb.is-less .tb-badge { transform: scale(1); background: #e0a100; } .tb.is-less .tb-badge::after { content: '✓'; }
.tb.is-less small { color: #ffd77a; }
.tb.is-never .tb-pic { transform: scale(.86); filter: grayscale(1); opacity: .55; box-shadow: 0 0 0 3px #d9473f; }
.tb.is-never .tb-badge { transform: scale(1); background: #d9473f; } .tb.is-never .tb-badge::after { content: '✕'; }
.tb.is-never small { color: #ffaaa4; }
.tb.is-changed { animation: none; }
.tb.is-changed.is-more .tb-pic { animation: taste-love .55s cubic-bezier(.3, 1.6, .5, 1); }
.tb.is-changed.is-never .tb-pic { animation: taste-shake .45s ease; }
@keyframes taste-love { 0% { transform: scale(1); } 40% { transform: scale(1.26); } 100% { transform: scale(1.12); } }
@keyframes taste-shake { 0%, 100% { transform: scale(.86) translateX(0); } 25% { transform: scale(.86) translateX(-6px); } 50% { transform: scale(.86) translateX(6px); } 75% { transform: scale(.86) translateX(-3px); } }
.taste-empty { grid-column: 1 / -1; text-align: center; opacity: .8; }
/* hearts and marks flying up */
.taste-bit { position: absolute; left: 50%; top: 40%; font-style: normal; font-weight: 900; font-size: 1rem; pointer-events: none; animation: taste-fly .9s ease-out forwards; z-index: 2; }
.taste-bit.is-more { color: #ff6b8b; } .taste-bit.is-less { color: #ffd77a; } .taste-bit.is-never { color: #ff8a80; }
@keyframes taste-fly { from { opacity: 1; transform: translate(-50%, 0) scale(.6); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(1.3) rotate(var(--r)); } }

/* Moods */
.taste-moods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-width: 820px; margin: 0 auto; }
.tm { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 10px; min-height: 140px; align-content: center; border-radius: 22px; border: 0; color: #fff; font: inherit; cursor: pointer; overflow: hidden;
  background: linear-gradient(140deg, var(--m1), var(--m2)); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s, filter .3s;
  animation: taste-pop-in .45s calc(var(--i, 0) * 60ms) cubic-bezier(.3, 1.5, .5, 1) both; }
.tm-icon svg { width: 40px; height: 40px; }
.tm b { font-size: 1.05rem; } .tm small { font-weight: 700; opacity: .9; }
.tm.is-more { transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 14px 30px -10px var(--m1); }
.tm.is-more::after { content: '♥'; position: absolute; top: 10px; left: 12px; font-weight: 900; }
.tm.is-less { filter: saturate(.35) brightness(.8); transform: scale(.96); }
.tm.is-changed { animation: taste-love .5s cubic-bezier(.3, 1.6, .5, 1); }
.tm:active { transform: scale(.95); }

/* Kinds */
.taste-kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 0 auto; }
.tk { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  transition: background-color .25s, border-color .25s, transform .25s cubic-bezier(.3, 1.6, .5, 1); animation: taste-pop-in .4s calc(var(--i, 0) * 40ms) both; }
.tk i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); transform: scale(.7); opacity: .4; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1), opacity .2s, background-color .2s; font-style: normal; }
.tk i svg { width: 14px; height: 14px; }
.tk.is-on { background: #2e9e4f; border-color: #2e9e4f; }
.tk.is-on i { transform: scale(1); opacity: 1; background: #fff; color: #2e9e4f; }
.tk.is-changed { animation: taste-love .4s cubic-bezier(.3, 1.6, .5, 1); position: relative; }

/* Two more things */
.taste-more { display: grid; gap: 22px; max-width: 560px; margin: 10px auto 0; }
.taste-q { display: grid; gap: 4px; text-align: center; }
.taste-q b { font-size: 1.1rem; } .taste-q small { opacity: .8; margin-bottom: 8px; }
.ts { position: relative; display: grid; grid-template-columns: repeat(var(--of), 1fr); padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.ts-pill { position: absolute; top: 5px; bottom: 5px; width: calc((100% - 10px) / var(--of)); inset-inline-start: calc(5px + (100% - 10px) / var(--of) * var(--at)); border-radius: 999px; background: #fff;
  transition: inset-inline-start .45s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
.ts button { position: relative; z-index: 1; min-height: 46px; border: 0; background: none; color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: color .3s; }
.ts button[aria-checked="true"] { color: #2b0445; }

/* Done */
.taste-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.taste-done { position: relative; display: grid; justify-items: center; text-align: center; gap: 12px; padding: 24px 0; }
.taste-done p { margin: 0; max-width: 440px; opacity: .88; }
.taste-check { width: 96px; height: 96px; }
.taste-check circle { fill: none; stroke: #8be28f; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: taste-draw .7s .1s ease forwards; }
.taste-check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: taste-draw .45s .7s ease forwards; }
@keyframes taste-draw { to { stroke-dashoffset: 0; } }
.taste-faces { display: flex; justify-content: center; }
.taste-faces span { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #3d9a46; border: 3px solid #1a0b2b; margin-inline-start: -12px; font-weight: 800;
  animation: taste-pop-in .5s calc(.9s + var(--i, 0) * 90ms) cubic-bezier(.3, 1.6, .5, 1) both; }
.taste-faces span:first-child { margin-inline-start: 0; }
.taste-faces img { width: 100%; height: 100%; object-fit: cover; }
.taste-done-actions { display: grid; gap: 10px; justify-items: center; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .taste, .taste *, .taste-box, .taste-box *, .taste-icon svg { animation: none !important; transition: none !important; }
  .taste-check circle, .taste-check path { stroke-dashoffset: 0; }
}

/* "My taste", round two: each singer with three buttons of its own; moods with two; more singers on asking */
.taste-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; }
@media (max-width: 420px) { .taste-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tb { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 20px; background: rgba(255, 255, 255, .05); cursor: default;
  transition: background-color .3s; content-visibility: auto; contain-intrinsic-size: 170px 190px; }
.tb.is-more { background: rgba(61, 187, 94, .14); } .tb.is-less { background: rgba(224, 161, 0, .12); } .tb.is-never { background: rgba(217, 71, 63, .1); }
.tb .tb-pic { border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.tb-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; }
.tbc { display: grid; justify-items: center; gap: 1px; padding: 5px 0 4px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; cursor: pointer;
  transition: background-color .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); -webkit-tap-highlight-color: transparent; }
.tbc i { font-style: normal; font-weight: 900; font-size: .95rem; line-height: 1; }
.tbc span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tbc:active { transform: scale(.92); }
.tbc.is-more[aria-pressed="true"] { background: #2e9e4f; }
.tbc.is-less[aria-pressed="true"] { background: #c98f00; }
.tbc.is-never[aria-pressed="true"] { background: #c93c34; }
.tbc[aria-pressed="true"] { animation: taste-love .35s cubic-bezier(.3, 1.6, .5, 1); }
.tb.is-changed { animation: none; }
.taste-more-row { display: flex; justify-content: center; padding: 6px 0 4px; }
.taste-more-singers { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 2px dashed rgba(255, 255, 255, .45); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background-color .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.taste-more-singers:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.taste-more-singers svg { width: 18px; height: 18px; }
.tm { cursor: default; padding: 16px 10px 12px; }
.tm-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin-top: 4px; }
.tm-choices button { min-height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; transition: background-color .2s, color .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tm-choices button:active { transform: scale(.94); }
.tm-choices button[aria-pressed="true"] { background: #fff; color: #2b0445; }
.tm.is-less .tm-choices button[aria-pressed="true"] { background: rgba(0, 0, 0, .45); color: #fff; }
.tm.is-changed { animation: taste-love .45s cubic-bezier(.3, 1.6, .5, 1); }
/* While the choices come (only on a slow line): dots that move */
.taste-wait { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 520px; margin: 40px auto; }
.taste-wait span { aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .12); animation: taste-shimmer 1.1s calc(var(--i) * 90ms) ease-in-out infinite alternate; }
@keyframes taste-shimmer { from { opacity: .35; transform: scale(.92); } to { opacity: .85; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .taste-wait span { animation: none; } }
