/* =====================================================================
   Casset — Graphite × Cassette component layer (UI v2, ADR-033)
   Loaded after app.css. Everything here is token-driven: no raw hex, no
   theme-specific overrides. Adding a rule here is how a template stops
   needing style="..." attributes.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Typography scale
   ------------------------------------------------------------------ */
.t-xs{ font-size: var(--fs-xs); }
.t-sm{ font-size: var(--fs-sm); }
.t-base{ font-size: var(--fs-base); }
.t-md{ font-size: var(--fs-md); }
.t-lg{ font-size: var(--fs-lg); }

.t-2xl{ font-size: var(--fs-2xl); }



.w-400{ font-weight: 400; }

.w-700{ font-weight: 700; }
.w-800{ font-weight: 800; }
.w-900{ font-weight: 900; }

.lh-tight{ line-height: 1.35; }
.lh-body{ line-height: 1.9; }

/* Statistics must line up column-to-column; proportional digits do not. */
.num,
.stat-card__value,
.ledger__delta,
.price__amount,
.playerbar__time,
.table td.num{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.text-good{ color: var(--good); }
.text-bad{ color: var(--bad); }

.text-accent{ color: var(--accent-text); }

.text-center{ text-align: center; }
.truncate{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bidi isolation (D7 / REV-1). User-supplied names — track/album titles,
   display names, genre tags — may be Latin ("AC/DC"), Persian, or mixed.
   `unicode-bidi: plaintext` makes the browser pick direction per line from
   its first strong character, so a Latin title never drags Persian
   punctuation to the wrong side. Applied to the display classes below and
   available as a standalone `.bidi` utility / the `{{ x|bidi }}` filter for
   a name sitting inside a Persian sentence. */
.bidi,
.tcard__title,
.track-line__title,
.pl-card__title,
.sell-row__title{ unicode-bidi: plaintext; }
.clamp-2{
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------------------------------------------------------------
   2. Layout utilities — the replacements for inline style= in templates
   ------------------------------------------------------------------ */
.flow > * + *{ margin-top: var(--sp-3); }
.flow-lg > * + *{ margin-top: var(--sp-5); }

.cluster{ display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.cluster--between{ justify-content: space-between; }
.cluster--start{ justify-content: flex-start; }
.cluster--end{ justify-content: flex-end; }
.cluster--top{ align-items: flex-start; }
.cluster--gap-3{ gap: var(--sp-3); }
.cluster--gap-4{ gap: var(--sp-4); }
.cluster--nowrap{ flex-wrap: nowrap; }

.mt-1{ margin-top: var(--sp-1); } .mt-2{ margin-top: var(--sp-2); }
.mt-3{ margin-top: var(--sp-3); } .mt-4{ margin-top: var(--sp-4); }
.mt-5{ margin-top: var(--sp-5); } .mt-6{ margin-top: var(--sp-6); }
.mb-1{ margin-bottom: var(--sp-1); } .mb-2{ margin-bottom: var(--sp-2); }
.mb-3{ margin-bottom: var(--sp-3); } .mb-4{ margin-bottom: var(--sp-4); }
.mb-5{ margin-bottom: var(--sp-5); } .mb-0{ margin-bottom: 0; }
/* A very long unbroken name (user data) must wrap instead of widening the page. */
.track-hero__by, .creator-box, .notif__text, .notif-menu__text, .profile-name, .track-line__title, .comment__author{
  overflow-wrap: anywhere; min-width: 0;
}
.my-1{ margin-block: 4px; } .my-2{ margin-block: var(--sp-2); }
.cluster--gap-2{ gap: var(--sp-2); }
.d-inline{ display: inline; }
.flex-260{ flex: 1 1 260px; min-width: 0; }
.ad-thumb{ max-height: 80px; border-radius: var(--radius-1); margin-top: 6px; }
.ad-thumb--120{ max-height: 120px; margin-block: 6px; }
.mis-auto{ margin-inline-start: auto; }
.w-full{ width: 100%; }
.flex-1{ flex: 1; min-width: 0; }
.hidden{ display: none !important; }

.measure{ max-width: 62ch; }
.center-col{ max-width: 560px; margin-inline: auto; }

/* minmax(0, 1fr), never a bare 1fr.
   `1fr` is shorthand for `minmax(auto, 1fr)`, and that `auto` minimum
   resolves to the item's MIN-CONTENT width — so one wide child (a data
   table, a long unbroken string) silently widens the whole track and
   pushes the page sideways, even when the child has its own
   overflow:auto scroller. Pinning the minimum to 0 is what actually lets
   a grid column be narrower than its contents. */

.grid-2{ display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
.grid-3{ display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 740px){
  .grid-2{ grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); }
  .grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px){
  .appshell, .topbar__inner{ max-width: calc(var(--container-wide) + 56px); }
}

.divider-line{ height: 1px; background: var(--line); border: 0; margin: var(--sp-4) 0; }

/* ---------------------------------------------------------------------
   3. Section headers
   ------------------------------------------------------------------ */
.section-head{
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-3);
}
.section-head:first-child{ margin-top: 0; }
/* Pages like discover/search stack several bare <section> blocks (no
   .card box of their own) back to back — "سازنده‌ها", "پرطرفدار این
   هفته", etc. `.section-head:first-child` only zeroes the FIRST one's
   top margin as intended when a section-head is a direct child of the
   page itself; each of these blocks wraps its own <section>, so every
   one of them is *also* a first-child (of its own wrapper) and the rule
   above zeroed every section's top spacing — they read as one glued-
   together list with no line between them. This targets only a
   section-head belonging to a <section> that is itself preceded by
   another bare <section> sibling, i.e. every such block except the
   page's actual first one, and gives it back its top spacing plus a
   divider line. Cards (.card sections, e.g. creator studio) already
   draw their own border and are explicitly excluded — they don't need
   a second divider stacked on top of it. */
section:not(.card) + section:not(.card) > .section-head:first-child{
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.section-head h2, .section-head h1{ font-size: var(--fs-lg); font-weight: 800; margin: 0; }
.section-head__link{ color: var(--accent-text); font-size: var(--fs-sm); font-weight: 700; }
.page-head{ margin-bottom: var(--sp-4); }
.page-head h1{ font-size: var(--fs-2xl); font-weight: 900; margin: 0 0 var(--sp-1); }
.page-head p{ color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---------------------------------------------------------------------
   4. Pills / chips / badges / status
   ------------------------------------------------------------------ */
.pill{
  display: inline-flex; align-items: center; gap: var(--sp-1);
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 999px; min-height: 32px; padding: 0 14px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
  cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pill:hover{ color: var(--text); background: var(--surface-2); }
.pill--active{
  background: var(--tint-accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.status{
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 700; border: 1px solid transparent;
}
.status--good{ background: var(--tint-good); color: var(--good); border-color: rgb(var(--good-rgb) / .30); }
.status--bad{ background: var(--tint-bad);  color: var(--bad);  border-color: rgb(var(--bad-rgb) / .30); }
.status--warn{ background: var(--tint-gold); color: var(--gold); border-color: rgb(var(--gold-rgb) / .30); }
.status--info{ background: var(--tint-purple); color: var(--purple-text); border-color: rgb(var(--purple-rgb) / .30); }

.status--muted{ background: var(--surface-2); color: var(--muted); border-color: var(--line); }

.kindtag{
  position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
  background: rgb(var(--bg-rgb) / .55); backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
html[data-theme="light"] .kindtag{ background: rgb(var(--panel-rgb) / .82); }

/* ADR-011 UI-4 — "علاقه ندارم" overlay button on personalized tcards, the
   opposite corner from .kindtag so the two never collide. */
.tcard__notinterested{
  position: absolute; inset-block-start: 8px; inset-inline-start: 8px;
  background: rgb(var(--bg-rgb) / .55); backdrop-filter: blur(4px);
  width: 26px; height: 26px; padding: 0;
}
html[data-theme="light"] .tcard__notinterested{ background: rgb(var(--panel-rgb) / .82); }

/* ---------------------------------------------------------------------
   5. Buttons — additions on top of app.css .btn
   ------------------------------------------------------------------ */
/* The purple key: "following / selected" state. */
.btn--purple{ background: var(--purple); color: var(--on-purple); border-color: transparent; }
.btn--purple:hover{ background: var(--purple2); }
.btn--danger{ color: var(--bad); border-color: rgb(var(--bad-rgb) / .40); background: var(--tint-bad); }
.btn--danger:hover{ background: rgb(var(--bad-rgb) / .18); }
.btn--gold{ background: var(--gold); color: var(--on-gold); border-color: transparent; }
.btn--block{ width: 100%; }
.btn--sm{ height: 36px; padding: 0 12px; font-size: var(--fs-xs); }
.btn--lg{ height: 52px; padding: 0 24px; font-size: var(--fs-md); }
.btn[disabled], .btn:disabled{ opacity: .45; cursor: not-allowed; transform: none !important; }

.iconbtn--danger{ color: var(--bad); border-color: rgb(var(--bad-rgb) / .35); }

/* Kebab / overflow menu */
.menu{ position: relative; }
.menu__panel{
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0;
  min-width: 190px;
  /* While open, casset-ui.js::openMenuPanel moves this element to <body>
     and switches it to position:fixed with an inline top/right computed
     from the toggle button — see the comment there for why (a .card's
     backdrop-filter traps a z-index that never leaves it). This z-index
     only matters for that portalled, fixed-position state: above every
     overlay except the toast, which must always win. */
  z-index: 145;
  background: var(--panel2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-2); box-shadow: var(--shadow-2);
  padding: 6px; display: none;
}
.menu__panel.open{ display: block; }

/* Notification bell dropdown — reuses .menu/.menu__panel plumbing and the
   .notif__icon verb-colour classes from the full inbox page (§22 below),
   just narrower rows with no per-item actions. */
.menu__panel--notif{ width: 392px; min-width: 320px; max-width: 92vw; padding: 0; overflow: hidden; box-shadow: var(--shadow-1); }

/* "آپلود اثر جدید" popover on «آثار من» — one primary button, its own "+"
   opens the same 4 content-type choices the full-page picker (/upload/)
   offers, without leaving the page. */
.upload-plus{
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-inline-start: 2px; border-radius: 999px;
  background: rgb(255 255 255 / .22); font-size: 12px; font-weight: 900; line-height: 1;
}
.menu__panel--upload-types{ min-width: 260px; max-width: min(92vw, 300px); }
.menu__panel--upload-types .menu__item{ align-items: flex-start; }
.menu__item-emoji{ display: inline-flex; color: var(--accent-text); }
.menu__item-emoji .icon{ width: 20px; height: 20px; }
.menu__item-title{ display: block; font-weight: 800; }
.menu__item-blurb{ display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); white-space: normal; }
.notif-menu__head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight:700;
}
.notif-menu__readall{
  border: 0; background: transparent; cursor: pointer; min-height: 44px; padding: 0 4px;
  font-family: var(--font); font-size: var(--fs-xs); font-weight: 700; color: var(--accent-text);
}
.notif-menu__filters{
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.notif-menu__list{ max-height: 380px; overflow-y:auto; padding: 6px; }
.notif-menu__group{
  padding: 10px 8px 4px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
}
.notif-menu__row{
  display:flex; align-items:center; gap:8px;
  padding:6px 8px; border-radius: var(--radius-1);
}
.notif-menu__link{ display:flex; align-items:center; gap:12px; flex:1; min-width:0; padding:4px 0; }
.notif-menu__act{ flex: none; height: 36px; font-size: var(--fs-xs); }
.notif-menu__row:hover{ background: var(--surface-2); }
.notif-menu__row--unread{ background: var(--surface-2); }
.notif-menu__row .notif__icon{ width:36px; height:36px; border-radius:var(--radius-1); }
.notif-menu__body{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-menu__text{
  font-size: var(--fs-sm); font-weight:500; line-height:1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-menu__time{ font-size: var(--fs-xs); color: var(--muted); }
.notif-menu__dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notif-menu__foot{ border-top: 1px solid var(--line); text-align: center; }
.notif-menu__foot a{
  display: block; padding: 13px; font-size: var(--fs-xs); font-weight: 700; color: var(--accent-text);
}
.notif-menu__empty{ padding: 22px 12px; text-align:center; }
.menu__item{
  position: relative; /* anchor for state badges, e.g. .iconbtn--repeat-one reused here */
  display: flex; align-items: center; gap: var(--sp-2); width: 100%;
  padding: 10px 10px; min-height: 40px; border-radius: var(--radius-1); border: 0; background: transparent;
  color: var(--text); font-family: var(--font); font-size: var(--fs-sm);
  font-weight: 600; cursor: pointer; text-align: start;
}
.menu__item:hover{ background: var(--surface-2); }
.menu__item .icon{ width: 16px; height: 16px; color: var(--muted); }
.menu__item--danger{ color: var(--bad); }
.menu__item--danger .icon{ color: var(--bad); }
/* Active-state (shuffle on / repeat all|one) — app.js toggles this same
   "primary" class on #pbShuffle/#pbRepeat (now menu__item rows inside the
   "بیشتر" popover) and their #npShuffle/#npRepeat counterparts (still
   plain .iconbtn in #npView); neither had a color rule to actually show
   it before now. */
.menu__item.primary, .menu__item.primary .icon{ color: var(--accent); }
.menu__item.primary{ background: rgb(var(--accent-rgb) / .08); }

/* Track/album detail page — secondary actions (queue, favorite, repost,
   embed, boost, download, radio, report) as an always-visible grid
   instead of a "..." dropdown. A popup hid up to 8 items behind one
   click and rendered them as one long vertical list; a small grid on
   the page itself shows what's available at a glance. */
.action-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-2); width: 100%; margin-top: var(--sp-1);
}
.action-chip{
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-2);
  border: 1px solid var(--line-strong); background: transparent; min-height: 44px;
  color: var(--text); font-family: var(--font); font-size: var(--fs-sm); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.action-chip:hover{ background: rgb(var(--text-rgb) / .05); border-color: var(--accent); }
.action-chip .icon{ width: 16px; height: 16px; color: var(--accent); flex: none; }
.action-chip--danger, .action-chip--danger .icon{ color: var(--bad); }
.action-chip__badge{
  margin-inline-start: auto; flex: none; font-size: 10px; font-weight: 900;
  padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
}
/* The report chip is a <form> (select + submit) instead of a single
   click target — spans the full grid row so the select has room. */
.action-chip--form{
  grid-column: 1 / -1; flex-wrap: wrap; cursor: default; justify-content: space-between;
}
.action-chip--form select{ flex: 1; min-width: 140px; }
.action-chip__submit{
  display: flex; align-items: center; gap: 6px; flex: none;
  border: 0; background: transparent; font-family: var(--font);
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.action-chip__submit .icon{ width: 16px; height: 16px; }

/* ---------------------------------------------------------------------
   6. Forms
   ------------------------------------------------------------------ */
.form-field{ display: block; margin-bottom: var(--sp-3); text-align: start; }
.form-field > label,
.form-field__label{
  display: block; font-size: var(--fs-xs); font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
}
.form-field__hint{ font-size: var(--fs-xs); color: var(--muted); margin-top: 5px; }
.form-field__error{ font-size: var(--fs-xs); color: var(--bad); margin-top: 5px; font-weight: 600; }
.form-field__error ul{ margin: 0; padding-inline-start: 16px; }
.form-field--invalid input,
.form-field--invalid select,
.form-field--invalid textarea{ border-color: rgb(var(--bad-rgb) / .55); }
.form-field input, .form-field select, .form-field textarea{ background: var(--field-bg); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus{ border-color: var(--accent); }

.input-wrap{ position: relative; display: block; }
.input-wrap__btn{
  position: absolute; inset-inline-start: 8px; inset-block-start: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px;
}
.input-wrap__btn:hover{ color: var(--text); background: var(--surface-2); }
.input-wrap__btn .icon{ width: 18px; height: 18px; }
.input-wrap input{ padding-inline-start: 44px; }

.checkline{
  display: flex; align-items: flex-start; gap: var(--sp-2);
  font-size: var(--fs-sm); color: var(--muted); font-weight: 500;
  cursor: pointer; margin-bottom: var(--sp-3);
}
.checkline input[type="checkbox"]{
  width: 18px; height: 18px; flex: none; margin-top: 1px;
  accent-color: var(--accent); cursor: pointer;
}
.checkline a{ color: var(--accent-text); font-weight: 700; }

/* Tip amount presets (M3) — radio group rendered as selectable pills. */
.tip-presets{ display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tip-preset{ position: relative; cursor: pointer; }
.tip-preset input{ position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tip-preset span{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 96px; height: 42px; padding: 0 var(--sp-3);
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--field-bg); font-weight: 700; font-size: var(--fs-sm);
  transition: border-color var(--dur), background var(--dur);
}
.tip-preset input:checked + span{
  border-color: var(--accent); background: rgb(var(--accent-rgb) / .12); color: var(--accent-text);
}
.tip-preset input:focus-visible + span{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* Password strength meter */
.strength{ display: flex; gap: 4px; margin-top: 8px; }
.strength span{ height: 4px; flex: 1; border-radius: 999px; background: var(--line); transition: background var(--dur); }
.strength[data-level="1"] span:nth-child(1){ background: var(--bad); }
.strength[data-level="2"] span:nth-child(-n+2){ background: var(--gold); }
.strength[data-level="3"] span{ background: var(--good); }
.strength__label{ font-size: var(--fs-xs); margin-top: 5px; color: var(--muted); font-weight: 600; }

/* Toggle switch */
.switch{
  position: relative; flex: none;
  width: 44px; height: 25px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--line-strong);
  cursor: pointer; transition: background var(--dur) var(--ease);
}
.switch input{ position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__knob{
  position: absolute; inset-block-start: 2px; inset-inline-start: 2px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--text); opacity: .75;
  transition: transform var(--dur) var(--ease), background var(--dur), opacity var(--dur);
  pointer-events: none;
}
.switch:has(input:checked){ background: var(--accent); border-color: transparent; }
.switch:has(input:checked) .switch__knob{ transform: translateX(19px); background: var(--on-accent); opacity: 1; }
html[dir="rtl"] .switch:has(input:checked) .switch__knob{ transform: translateX(-19px); }
.switch:has(input:focus-visible){ outline: 3px solid var(--focus); outline-offset: 2px; }

/* Settings rows */
.setting-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-3) var(--sp-1);
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child{ border-bottom: 0; }
.setting-row__text{ min-width: 0; }
.setting-row__text b{ display: block; font-size: var(--fs-base); font-weight: 700; }
.setting-row__text span{ font-size: var(--fs-xs); color: var(--muted); }

/* A .setting-row that expands a field below it when its switch is
   checked (js: initToggleSections in casset-ui.js) — the row itself
   looks identical to a plain on/off row (e.g. "اجازه نظر دادن"); the
   wrapper, not the row, owns the group's bottom border so opening the
   body doesn't add a second border between the row and its own field. */
.setting-toggle{ border-bottom: 1px solid var(--line); }
.setting-toggle:last-child{ border-bottom: 0; }
.setting-toggle .setting-row{ border-bottom: 0; padding-bottom: var(--sp-2); }
.setting-toggle__body{ padding: 0 var(--sp-1) var(--sp-4); }

.card--danger{ border-color: rgb(var(--bad-rgb) / .35); background: var(--tint-bad); }
.card--danger .card__title{ color: var(--bad); }
.card__title{ font-weight: 800; font-size: var(--fs-base); margin-bottom: var(--sp-2); }
.card__sub{ font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--sp-3); }

/* ---------------------------------------------------------------------
   Pay-per-title (M5) — the paywall card on a track/album page, and the
   price editor rows in the creator sales dashboard.
   ------------------------------------------------------------------ */
.paywall{
  border: 1px solid rgb(var(--accent-rgb) / .35);
  background: var(--tint-accent);
  border-radius: var(--radius-2);
  padding: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.paywall__price{ font-size: var(--fs-xl); font-weight: 900; }
.paywall__row{
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2);
}
.sell-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-2) var(--sp-3); align-items: center;
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.sell-row:last-child{ border-bottom: 0; }
.sell-row__title{ min-width: 0; font-weight: 700; }
.sell-row__meta{ font-size: var(--fs-xs); color: var(--muted); }
.sell-row__form{ display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.sell-row__form input[type="number"]{ width: 8.5rem; }

/* ---------------------------------------------------------------------
   7. Auth pages
   ------------------------------------------------------------------ */
.auth{
  display: flex; align-items: center; justify-content: center;
  min-height: 72vh; padding: var(--sp-5) 0;
}
.auth__card{
  width: 420px; max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-3);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
}
.auth__card--wide{ width: 560px; }
.auth__brand{
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 900; font-size: var(--fs-xl); margin-bottom: var(--sp-2);
}
.auth__mark{
  width: 34px; height: 34px; border-radius: var(--radius-2);
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.auth__mark .icon{ width: 18px; height: 18px; color: var(--on-accent); }
.auth__title{ font-size: var(--fs-xl); font-weight: 800; margin: 0 0 var(--sp-1); }
.auth__sub{ font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--sp-5); }
.auth__form{ text-align: start; }
.auth__foot{ margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--muted); }
.auth__foot a{ color: var(--accent-text); font-weight: 700; }
.auth__legal{ margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--muted); line-height: 1.9; }

.divider-or{
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-4) 0; color: var(--muted); font-size: var(--fs-xs);
}
.divider-or::before, .divider-or::after{ content: ""; flex: 1; height: 1px; background: var(--line); }

.social-row{ display: flex; gap: var(--sp-2); }
.social-btn{
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 11px 10px; min-height: 44px; border-radius: var(--radius-2);
  border: 1px solid var(--line-strong); background: transparent;
  font-size: var(--fs-sm); font-weight: 700; color: var(--text);
  font-family: var(--font); cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.social-btn:hover{ background: var(--surface-2); }
.social-btn .icon{ width: 18px; height: 18px; }

.otp-input{
  letter-spacing: .55em; text-align: center;
  font-size: var(--fs-xl); font-weight: 800;
  font-variant-numeric: tabular-nums; direction: ltr;
}
.resend{ display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--muted); }
.resend button{
  border: 0; background: transparent; color: var(--accent-text);
  font-family: var(--font); font-weight: 700; font-size: var(--fs-sm); cursor: pointer;
}
.resend button:disabled{ color: var(--muted); cursor: default; }

/* ---------------------------------------------------------------------
   8. Onboarding stepper + choice cards
   ------------------------------------------------------------------ */
.stepper{ display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.stepper__step{ display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.stepper__dot{
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 800;
  border: 1px solid var(--line); background: var(--surface-1); color: var(--muted);
}
.stepper__dot .icon{ width: 14px; height: 14px; }
.stepper__label{ font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.stepper__bar{ flex: 1; height: 2px; background: var(--line); border-radius: 999px; }
.stepper__step--done .stepper__dot{ background: var(--good); border-color: transparent; color: var(--on-accent); }
.stepper__step--active .stepper__dot{ background: var(--accent); border-color: transparent; color: var(--on-accent); }
.stepper__step--active .stepper__label,
.stepper__step--done .stepper__label{ color: var(--text); }
@media (max-width: 560px){ .stepper__label{ display: none; } }

.choice-grid{ display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 640px){ .choice-grid{ grid-template-columns: 1fr 1fr; } }
.choice{
  position: relative; display: block; text-align: start; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-2);
  background: var(--panel2); padding: var(--sp-4);
  font-family: var(--font); color: var(--text);
  transition: border-color var(--dur) var(--ease);
}
.choice:hover{ border-color: var(--accent); }
.choice__icon{
  width: 44px; height: 44px; border-radius: var(--radius-2); margin-bottom: var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-accent);
}
.choice__icon .icon{ width: 22px; height: 22px; color: var(--accent); }
.choice--purple .choice__icon{ background: var(--tint-purple); }
.choice--purple .choice__icon .icon{ color: var(--purple); }
.choice__title{ font-weight: 800; font-size: var(--fs-md); margin-bottom: 4px; }
.choice__desc{ font-size: var(--fs-xs); color: var(--muted); line-height: 1.8; }

.interest-grid{ display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.interest{
  position: relative; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-1);
  font-size: var(--fs-sm); font-weight: 600;
  transition: background var(--dur), border-color var(--dur);
}
.interest input{ position: absolute; opacity: 0; pointer-events: none; }
.interest:has(input:checked){ background: var(--tint-accent); border-color: var(--accent); color: var(--accent-text); }
.interest:has(input:disabled){ opacity: .45; cursor: not-allowed; }
.interest .icon{ width: 16px; height: 16px; }

/* ---------------------------------------------------------------------
   9. Stat / metric cards + wallet
   ------------------------------------------------------------------ */
.stat-grid{ display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--sp-4); }
@media (min-width: 900px){ .stat-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-grid--3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px){ .stat-grid--3{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.stat-card{
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-2); padding: var(--sp-4);
}
.stat-card__top{ display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.stat-card__icon{
  width: 32px; height: 32px; border-radius: var(--radius-2);
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-accent);
}
.stat-card__icon .icon{ width: 16px; height: 16px; color: var(--accent); }
.stat-card--purple .stat-card__icon{ background: var(--tint-purple); }
.stat-card--purple .stat-card__icon .icon{ color: var(--purple); }
.stat-card--gold .stat-card__icon{ background: var(--tint-gold); }
.stat-card--gold .stat-card__icon .icon{ color: var(--gold); }
.stat-card--good .stat-card__icon{ background: var(--tint-good); }
.stat-card--good .stat-card__icon .icon{ color: var(--good); }
.stat-card__delta{ font-size: var(--fs-xs); font-weight: 800; }
.stat-card__delta--up{ color: var(--good); }
.stat-card__delta--down{ color: var(--bad); }
.stat-card__delta--flat{ color: var(--muted); }
.stat-card__value{ display: block; font-size: var(--fs-2xl); font-weight: 900; line-height: 1.2; }
.stat-card__label{ font-size: var(--fs-xs); color: var(--muted); }

.wallet-card{
  background: var(--tint-gold);
  border: 1px solid rgb(var(--gold-rgb) / .35);
  border-radius: var(--radius-2); padding: var(--sp-4);
}
.wallet-card__amount{ font-size: var(--fs-2xl); font-weight: 900; color: var(--gold); display: block; }
.wallet-card__sub{ font-size: var(--fs-xs); color: var(--muted); }

.chart-card{ padding: var(--sp-4); }
.chart-card canvas{ max-width: 100%; margin-top: var(--sp-2); }
.chart-wrap{ position: relative; height: 240px; }
.chart-wrap--sm{ height: 180px; }

/* ---------------------------------------------------------------------
   10. Track cards grid (discover / trending / profile)
   ------------------------------------------------------------------ */
.tcard-grid{
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 740px){ .tcard-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px){ .tcard-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tcard{
  background: transparent; border: 0; padding: 0;
  position: relative;
}
.tcard__repost-flag{
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 700; color: var(--accent-text);
  margin-bottom: var(--sp-1);
}
.tcard__repost-flag .icon{ width: 13px; height: 13px; }

/* The card itself, reshaped from a square into a compact-cassette-shell
   landscape strip (a real cassette is roughly 4:2.5) — the cover art fills
   it edge-to-edge, a bottom gradient keeps the title/creator label legible
   over any artwork, and two small reel circles up top are the one visual
   cue that reads as "cassette" without needing the full player-view
   cassette illustration on every card in a grid of dozens. */
.tcard__art{
  aspect-ratio: 1 / 1; border-radius: var(--radius-1);
  margin-bottom: var(--sp-2); position: relative; overflow: hidden;
  background-color: var(--panel2);
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
}
.tcard:hover .tcard__art{ border-color: var(--line-strong); }

.tcard__play{
  position: absolute; inset-block-end: 8px; inset-inline-start: 8px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  cursor: pointer;
  z-index: 2;
}
.tcard:hover .tcard__play,
.tcard:focus-within .tcard__play{ opacity: 1; transform: none; }
.tcard__play .icon{ width: 14px; height: 14px; }
@media (hover: none){ .tcard__play{ opacity: 1; transform: none; } }

/* The "paper label" — a cassette's stuck-on title label, reimagined as an
   inset strip along the bottom of the art instead of plain text below it. */
.tcard__label{
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.tcard__title{ display:block; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.tcard__title:hover{ color: var(--accent-text); }
.tcard__by{ display:block; font-size: var(--fs-xs); color: var(--muted); }
.tcard__actions{ display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.tcard__likecount{ font-size: var(--fs-xs); }

/* Creator avatar strip */
.creator-strip{ display: flex; gap: var(--sp-4); overflow-x: auto; padding-bottom: var(--sp-1); scrollbar-width: thin; }
.creator-chip{ flex: none; width: 78px; text-align: center; }
.creator-chip__av{
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 6px;
  background-color: var(--panel2);
  background-size: cover; background-position: center;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: var(--on-accent);
}
.creator-chip__name{ display: block; max-width: 100%; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creator-chip{ overflow: hidden; }

/* Casset Pro spotlight strip (M6) — a separate labelled row, not a ranking boost */
.pro-spotlight .section-head h2{ display: inline-flex; align-items: center; gap: 6px; }
.creator-chip--pro .creator-chip__av{ border-color: rgb(var(--purple-rgb) / .55); }
.creator-chip__pro{ margin: 4px auto 0; height: 18px; padding: 0 6px; font-size: 10px; }

/* Rank medals (trending) */
.rank{
  width: 30px; height: 30px; flex: none; border-radius: var(--radius-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: var(--fs-sm);
  background: var(--surface-2); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rank--1{ background: var(--accent); color: var(--on-accent); }
.rank--2, .rank--3{ background: var(--surface-3); color: var(--text); }

/* ---------------------------------------------------------------------
   11. Empty states + skeletons
   ------------------------------------------------------------------ */
.empty{
  text-align: center; padding: var(--sp-6) var(--sp-4);
  border: 1px dashed var(--line); border-radius: var(--radius-2);
  background: var(--surface-1);
}
.empty__icon{
  width: 56px; height: 56px; border-radius: var(--radius-2); margin: 0 auto var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-accent);
}
.empty__icon .icon{ width: 26px; height: 26px; color: var(--accent); }
.empty__title{ font-size: var(--fs-md); font-weight: 800; margin-bottom: 6px; }
.empty__text{ font-size: var(--fs-sm); color: var(--muted); max-width: 44ch; margin: 0 auto var(--sp-4); line-height: 1.9; }

.skeleton{
  border-radius: var(--radius-1);
  background: var(--surface-2);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }



/* ---------------------------------------------------------------------
   12. Tables (staff consoles, ledgers)
   ------------------------------------------------------------------ */
.table-wrap{ overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-2); }
.table{ width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th{
  background: var(--surface-2); color: var(--muted);
  font-weight: 700; text-align: start; padding: 11px 12px; white-space: nowrap;
}
.table td{ padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover{ background: var(--surface-1); }
.table a{ color: var(--accent-text); font-weight: 600; }




/* ---------------------------------------------------------------------
   13. Tabs
   ------------------------------------------------------------------ */
/* overflow-x: auto with overflow-y left unset doesn't mean "vertical
   overflow is fine" — per the CSS Overflow spec, a non-visible x forces
   an unset/visible y to compute as auto too. So the moment this row's
   content is even a hair taller than the box (rounding on a particular
   zoom/DPI), the browser gives it its own vertical scrollbar, complete
   with the classic up/down arrow buttons, sitting right next to the tab
   labels. overflow-y: hidden turns that stray scrollbar off without
   touching the horizontal one narrow viewports still need. */
.tabs{ display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-4); overflow-x: auto; overflow-y: hidden; }
.tabs__tab{
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: var(--fs-base); font-weight: 500;
  color: var(--muted); padding: 13px 2px; min-height: 44px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs__tab:hover{ color: var(--text); }
.tabs__tab--active{ color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
/* tabs used as a link row (e.g. the shared staff nav) */
a.tabs__tab{ text-decoration: none; }


/* ---------------------------------------------------------------------
   14. Pricing (VIP)
   ------------------------------------------------------------------ */
.price-grid{ display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 780px){ .price-grid{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.price{
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line-strong); border-radius: var(--radius-3);
  background: var(--panel); padding: var(--sp-5);
}
.price--featured{
  border-color: var(--accent);
  background: var(--tint-accent);
}
.price__flag{
  position: absolute; inset-block-start: -11px; inset-inline-start: var(--sp-5);
  background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-xs); font-weight: 800; padding: 4px 12px; border-radius: 999px;
}
.price__name{ font-size: var(--fs-md); font-weight: 800; margin-bottom: var(--sp-2); }
.price__amount{ font-size: var(--fs-3xl); font-weight: 900; line-height: 1.1; }
.price__unit{ font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.price__period{ font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--sp-4); }
.price__features{ list-style: none; padding: 0; margin: 0 0 var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.price__features li{ display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }
.price__features .icon{ width: 16px; height: 16px; color: var(--good); flex: none; margin-top: 2px; }
.price__features li.is-off{ opacity: .5; }
.price__features li.is-off .icon{ color: var(--muted); }
.price__cta{ margin-top: auto; }

.notice{
  display: flex; gap: var(--sp-3); align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius-2);
  background: var(--surface-1); padding: var(--sp-4);
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.9;
}
.notice .icon{ width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.notice--warn{ border-color: rgb(var(--gold-rgb) / .35); background: var(--tint-gold); }
.notice--warn .icon{ color: var(--gold); }
.notice--bad{ border-color: rgb(var(--bad-rgb) / .35); background: var(--tint-bad); }
.notice--bad .icon{ color: var(--bad); }
.notice--good{ border-color: rgb(var(--good-rgb) / .35); background: var(--tint-good); }
.notice--good .icon{ color: var(--good); }
.notice b{ color: var(--text); }

/* ---------------------------------------------------------------------
   15. Social links (SVG icon buttons, replacing raw emoji)
   ------------------------------------------------------------------ */
.profile-toolbar{ margin: 14px 2px 0; }
.social-links{ display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.social-links a{
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-2);
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: background var(--dur) var(--ease), color var(--dur);
}
.social-links a:hover{ background: var(--surface-3); color: var(--text); }
.social-links .icon{ width: 17px; height: 17px; }

/* ---------------------------------------------------------------------
   16. Modal confirm (destructive actions)
   ------------------------------------------------------------------ */
.confirm__title{ font-size: var(--fs-lg); font-weight: 800; margin-bottom: var(--sp-2); }
.confirm__text{ font-size: var(--fs-sm); color: var(--muted); line-height: 1.9; margin-bottom: var(--sp-4); }
.overlay-panel__inner.confirm{ max-width: 400px; }

/* Drag handle for reorderable lists */
.drag-handle{
  cursor: grab; color: var(--muted); flex: none;
  display: flex; align-items: center; padding: 4px;
  border: 0; background: transparent;
}
.drag-handle:active{ cursor: grabbing; }
.drag-handle .icon{ width: 16px; height: 16px; }
.is-dragging{ opacity: .45; }
.drop-target{ border-color: var(--accent) !important; }
.reorder-arrows{ display: flex; flex-direction: column; gap: 2px; }

/* ---------------------------------------------------------------------
   17. Motion preferences — decorative motion off, functional motion kept
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
   18. App shell — the pieces that used to live in a <style> block inside
   base.html. Same rules, now themeable and cacheable.
   ------------------------------------------------------------------ */
.sr-only{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.brand__mark{
  width: 30px; height: 30px; border-radius: var(--radius-2); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
}
.brand__mark .icon{ width: 15px; height: 15px; color: var(--on-accent); }

.chip__avatar{
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--panel2);
  background-size: cover; background-position: center;
}
.chip__avatar .icon{ width: 14px; height: 14px; color: var(--muted); }
.chip__text{ max-width: 110px; }
.chip__caret{ width: 14px; height: 14px; opacity: .6; }
@media (max-width: 860px){ .chip__text, .chip__caret{ display: none; } }

.topbar__bell{ position: relative; }
.notif-badge{
  position: absolute; inset-block-start: 1px; inset-inline-end: 1px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; line-height: 18px;
  text-align: center; pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.sidenav__link--active{
  background: var(--tint-purple);
  color: var(--text);
  border-color: rgb(var(--purple-rgb) / .35);
}
.sidenav__link--active .icon{ color: var(--accent); }

.sidebar__cta{
  margin-top: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-2); padding: var(--sp-4);
  font-size: var(--fs-xs); color: var(--muted);
}
.sidebar__cta b{ display: block; color: var(--text); font-size: var(--fs-sm); margin-bottom: 4px; }
.sidebar{ display: none; flex-direction: column; }
@media (min-width: 980px){ .sidebar{ display: flex; } }

.bottomnav{ display: none; }
@media (max-width: 979px){ .bottomnav{ display: flex; } }
.bottomnav__link--active{ color: var(--text); }
.bottomnav__link--active .icon{ opacity: 1; }

/* Code / embed snippet box */
.code-box{
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  direction: ltr; text-align: left; font-size: var(--fs-xs);
}

/* File inputs */
input[type="file"]{
  width: 100%; padding: 12px;
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-2);
  color: var(--text);
  outline: none;
}
input[type="file"]::file-selector-button{
  border: 0; border-radius: var(--radius-2); padding: 9px 12px; margin-inline-end: 10px;
  background: var(--accent);
  color: var(--on-accent); font-weight: 700; font-family: var(--font); cursor: pointer;
}
input[type="file"]::file-selector-button:hover{ background: var(--accent2); }

/* Install prompt */
.install-banner{
  position: fixed; z-index: 125;
  inset-inline: 12px; inset-block-end: 84px;
  max-width: 480px; margin-inline: auto;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-2);
  border: 1px solid var(--line-strong);
  background: var(--panel2);
  box-shadow: var(--shadow-2);
}
.install-banner__mark{
  width: 36px; height: 36px; border-radius: var(--radius-2); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
}
.install-banner__mark .icon{ width: 17px; height: 17px; color: var(--on-accent); }

/* Verified badge — sized to sit inline with a name */
.verified-badge{
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-inline-start: 4px;
  background: none; border-radius: 0;
  color: var(--purple);
  vertical-align: middle;
}
.verified-badge .icon{ width: 18px; height: 18px; }

/* Legal / long-form prose pages */
.prose{ max-width: 68ch; line-height: 2; font-size: var(--fs-md); color: var(--muted); }
.prose h2{ font-size: var(--fs-lg); font-weight: 800; color: var(--text); margin: var(--sp-5) 0 var(--sp-2); }
.prose h3{ font-size: var(--fs-md); font-weight: 700; color: var(--text); margin: var(--sp-4) 0 var(--sp-2); }
.prose p, .prose li{ margin: 0 0 var(--sp-3); }
.prose ul, .prose ol{ padding-inline-start: 22px; }
.prose a{ color: var(--accent-text); font-weight: 600; }

/* Hero (logged-out landing) */
.hero{
  border-radius: var(--radius-3);
  padding: var(--sp-7) var(--sp-6);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--line-strong);
  background: var(--panel);
}
.hero h1{
  font-size: clamp(24px, 4.4vw, 34px); font-weight: 900;
  line-height: 1.45; max-width: 18ch; margin: 0 0 var(--sp-3);
}
.hero h1 em{
  font-style: normal;
  color: var(--accent-text);
}
.hero p{ color: var(--muted); max-width: 52ch; margin: 0 0 var(--sp-5); font-size: var(--fs-md); line-height: 1.9; }
.hero__actions{ display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Checklist (publisher requirements) */
.checklist{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.checklist li{
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line); border-radius: var(--radius-2);
  background: var(--surface-1);
}
.checklist__mark{
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--muted);
}
.checklist__mark .icon{ width: 14px; height: 14px; }
.checklist li.is-done{ border-color: rgb(var(--good-rgb) / .35); background: var(--tint-good); }
.checklist li.is-done .checklist__mark{ background: var(--good); color: var(--on-accent); }
.checklist__body{ flex: 1; min-width: 0; }
.checklist__body b{ display: block; font-size: var(--fs-sm); font-weight: 700; }
.checklist__body span{ font-size: var(--fs-xs); color: var(--muted); }

/* Standalone icon-tint modifiers — usable outside a .stat-card wrapper. */
.stat-card__icon--purple{ background: var(--tint-purple); }
.stat-card__icon--purple .icon{ color: var(--purple); }
.stat-card__icon--gold{ background: var(--tint-gold); }
.stat-card__icon--gold .icon{ color: var(--gold); }
.stat-card__icon--good{ background: var(--tint-good); }
.stat-card__icon--good .icon{ color: var(--good); }

/* ---------------------------------------------------------------------
   19. Track list row (partials/_track_row.html)
   ------------------------------------------------------------------ */
.track-line{
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-1);
  border-bottom: 1px solid var(--line);
}
.track-line:last-child{ border-bottom: 0; }
.track-line:hover{ background: var(--surface-1); }
.track-line__meta{ flex: 1; min-width: 0; }
.side-no{
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-radius: 4px;
  font-size: 11px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
}
.track-line__wave{ display: block; width: 100%; max-width: 420px; height: 28px; margin-top: 8px; fill: var(--wave-off); }
.track-line__actions .iconbtn--primary{ width: 48px; height: 48px; border-radius: 50%; padding: 0; background: var(--accent); color: var(--on-accent); border-color: transparent; }
.row-cover{ width: 96px; height: 96px; }
@media (max-width: 640px){ .row-cover{ width: 72px; height: 72px; } .track-line__wave{ height: 22px; } }
/* A row inside a narrow card (profile sidebar, playlist side panels) sheds
   its extras instead of squeezing the title: sizing follows the card, not the viewport. */
.card{ container-type: inline-size; }
@container (max-width: 560px){
  .track-line .row-cover{ width: 56px; height: 56px; }
  .track-line__wave, .track-line__stats{ display: none; }
  .track-line__actions .iconbtn:not(.iconbtn--primary){ display: none; }
  .track-line__actions .iconbtn--primary{ width: 44px; height: 44px; }
  .track-line--pro .row-cover{ width: 64px; height: 64px; }
  .track-line--pro .track-line__tool-label, .track-line--pro .track-line__stats-label{ display: none; }
  /* Narrow card / phone: the play key sits on the cover's corner so the title keeps the full width. */
  .track-line--pro{ position: relative; }
  .track-line--pro .row-cover{ width: 72px; height: 72px; }
  .track-line--pro .track-line__playbtn{
    position: absolute; z-index: 1; width: 44px; height: 44px;
    inset-inline-start: 8px; inset-block-end: calc(var(--sp-4) - 6px);
    box-shadow: 0 0 0 3px var(--panel);
  }
  .track-line--pro .track-line__head{ min-height: 0; }
}
.track-line__title{ display: block; font-size: var(--fs-md); font-weight: 600; }
.track-line__title:hover{ color: var(--accent-text); }
.track-line__sub{ font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 5px; align-items: center; }
.track-line__sub a:hover{ color: var(--text); }
.track-line__stats{ flex: none; white-space: nowrap; }
.track-line__actions{ display: flex; gap: 4px; flex: none; }
.track-line__actions .iconbtn{ height: 44px; min-width: 44px; padding: 0 8px; border-color: transparent; }
.track-line__actions .icon{ width: 16px; height: 16px; }
@media (max-width: 640px){
  .track-line__stats{ display: none; }
  .track-line__actions .iconbtn:not(.iconbtn--primary){ display: none; }
}

/* The .list container should not add its own borders on top of these. */
.card.list{ gap: 0; margin-top: 0; }

/* ---------------------------------------------------------------------
   20. Track detail
   ------------------------------------------------------------------ */
.track-hero{ display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; }
.track-hero__art{
  width: 190px; aspect-ratio: 1/1; flex: none;
  border-radius: var(--radius-2);
  background-size: cover; background-position: center;
  background-color: var(--panel2);
  border: 1px solid var(--line);
}
.track-hero__meta{ flex: 1; min-width: 240px; }
/* Creator identity under the title — was a plain 13px muted text link
   with no avatar (half the title's size, grouped visually with the
   play-count/duration metadata instead of standing on its own). */
.track-hero__by{ display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.track-hero__by:hover .w-700{ color: var(--accent-text); }
@media (max-width: 560px){
  .track-hero{ gap: var(--sp-4); }
  .track-hero__art{ width: 120px; }
}

/* Track detail's own cassette — a scaled-down version of the full "Now
   Playing" shell (static/css/cassette.css), sized to sit beside the
   meta column instead of filling the screen. */
.track-hero__cassette{ width: 190px; margin: 0; border-radius: var(--radius-3); }
.track-hero__cassette::before{ inset: 10px; border-radius: var(--radius-2); }
.track-hero__cassette .reel--big{ width: 40px; height: 40px; margin-block-start: -20px; }
.track-hero__cassette .reel--big.reel--a{ inset-inline-end: 12px; }
.track-hero__cassette .reel--big.reel--b{ inset-inline-start: 12px; }
.track-hero__cassette .reel--big .reel__hub{ width: 8px; height: 8px; }
@media (max-width: 560px){ .track-hero__cassette{ width: 130px; border-radius: var(--radius-2); } }

/* Coffee-tip nudge — a small in-context bubble, not a toast/modal, so a
   first tap never feels like it committed to anything. */
.coffee-nudge{ position: relative; display: inline-flex; }
.coffee-nudge__bubble{
  position: absolute; bottom: calc(100% + 10px); inset-inline-end: -8px;
  min-width: 190px; padding: 8px 12px; border-radius: var(--radius-2);
  background: var(--panel2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; z-index: 20;
}
.coffee-nudge__bubble::after{
  content: ""; position: absolute; top: 100%; inset-inline-end: 14px;
  border: 6px solid transparent; border-top-color: var(--panel2);
}
/* Peek on hover (pointer devices only — a tap has no hover state, so
   touch keeps the existing two-click reveal/navigate behaviour
   unchanged). .hidden is `!important` (a shared utility class the JS
   click-toggle still uses for the persistent, keyboard/touch-reachable
   state), so overriding it here needs the same weight — scoped tightly
   to this one bubble so it can't leak into any other .hidden element. */
@media (hover: hover){
  .coffee-nudge:hover .coffee-nudge__bubble.hidden{ display: block !important; }
}

/* Lyrics — leans on the same "hand-written label" motif as the cassette
   player (static/css/cassette.css's .label-sticker) instead of a plain
   paragraph, so it reads as a deliberate feature, not leftover text. */
.lyrics-card{
  position: relative; overflow: hidden;
}
.lyrics-card::before{
  content: "”"; position: absolute; top: -0.35em; inset-inline-end: 0.2em;
  font-size: 5rem; font-weight: 900; line-height: 1;
  color: rgb(var(--accent-rgb) / .12); pointer-events: none;
}
.lyrics-card__title{
  display: flex; align-items: center; gap: 8px;
  font-weight: 900; font-size: var(--fs-md); margin-bottom: var(--sp-3);
  color: var(--accent-text);
}
.lyrics-card__body{
  position: relative; margin: 0; white-space: pre-line;
  font-size: var(--fs-md); line-height: 2; font-weight: 600;
  text-align: center; max-width: 46em;
}

.creator-box{ display: flex; align-items: center; gap: var(--sp-3); }
.creator-box__av{
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background-color: var(--panel2);
  background-size: cover; background-position: center;
}

/* Comments */
.comment{ display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) 0; }
.comment + .comment{ border-top: 1px solid var(--line); }
.comment__avatar{
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background-color: var(--panel2);
  background-size: cover; background-position: center;
}
.comment__body{ flex: 1; min-width: 0; }
.comment__author{ font-size: var(--fs-sm); font-weight: 700; }
.comment__author:hover{ color: var(--accent-text); }
.comment__text{ font-size: var(--fs-sm); color: var(--muted); line-height: 1.85; margin: 3px 0 6px; word-break: break-word; }
.comment__actions{ display: flex; gap: 4px; }
.comment__actions .iconbtn{ height: 30px; min-width: 30px; padding: 0 8px; font-size: var(--fs-xs); }
.comment__actions .icon{ width: 14px; height: 14px; }
.mt-0{ margin-top: 0 !important; }

/* Image previews (settings, upload) */
.avatar-preview{
  width: 96px; height: 96px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--panel2);
  border: 1px solid var(--line-strong);
  margin-bottom: var(--sp-2);
}
.cover-preview--wide{
  width: 100%; height: 96px; border-radius: var(--radius-1);
  background-size: cover; background-position: center;
  background-color: var(--panel2);
  border: 1px solid var(--line);
  margin-bottom: var(--sp-2);
}
.cluster--center{ justify-content: center; }

/* Settings avatar/cover: the preview box IS the upload control (a <label
   for="…"> wrapping the real, sr-only file input — see accounts/settings.html
   + accounts/forms.py::ProfileSettingsForm), with a small camera badge as
   the only affordance needed to communicate "click to change". */
.img-upload{
  /* No overflow:hidden — border-radius alone already clips the background
     image to the box's shape (circle for the avatar, rounded rect for the
     cover); leaving overflow visible lets the camera badge sit half-on/
     half-off the circular avatar's edge instead of being sliced by it. */
  position: relative;
  display: block;
  cursor: pointer;
  transition: filter var(--dur);
}
.img-upload:hover{ filter: brightness(0.85); }
.img-upload__badge{
  position: absolute; inset-block-end: 6px; inset-inline-end: 6px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgb(var(--bg-rgb) / .70);
  backdrop-filter: blur(4px);
  border: 1px solid rgb(255 255 255 / .25);
  color: #fff;
}
.img-upload__badge .icon{ width: 14px; height: 14px; }

/* Caps how wide a settings form gets on a big desktop viewport — an
   `<input>` stretching the full content column (well past 900px) made
   every field in "تنظیمات حساب" look absurdly long for what it holds. */
.settings-panel{ max-width: 640px; }

/* Search page form */
.search-form__row{ display: flex; align-items: center; gap: var(--sp-3); }
.search-form__row > .icon{ width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-form__input{
  flex: 1; height: 46px; border: 0; outline: 0; background: transparent;
  color: var(--text); font-family: var(--font); font-size: var(--fs-md);
  padding: 0; width: auto;
}
.search-form__input::placeholder{ color: var(--muted); }
.search-form__facets{ flex-wrap: wrap; gap: var(--sp-2); }
.search-form__facets .input--sm{
  height: 38px; padding: 0 10px; border-radius: var(--radius-2);
  font-size: var(--fs-sm); max-width: 100%;
}
.empty--full{ grid-column: 1 / -1; }

/* Playlist cards (library) */
.pl-card{ display: block; }
.pl-card__cover{
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1/1; border-radius: var(--radius-1); margin-bottom: var(--sp-2);
  background-size: cover; background-position: center;
  background-color: var(--panel2);
  border: 1px solid var(--line);
}
.pl-card__cover .icon{ width: 34px; height: 34px; color: var(--text); opacity: .55; }
.pl-card:hover .pl-card__cover{ border-color: var(--line-strong); }
.pl-card__title{ display: block; font-weight: 800; font-size: var(--fs-sm); margin-bottom: 4px; }
.pl-card__title:hover{ color: var(--accent-text); }

/* Ledger rows (creator studio, payouts) */
.ledger{ display: flex; flex-direction: column; }
.ledger__row{
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.ledger__row + .ledger__row{ border-top: 1px solid var(--line); }
.ledger__delta{ font-weight: 900; font-size: var(--fs-sm); flex: none; }
.icon--xs{ width: 13px !important; height: 13px !important; }

/* ---------------------------------------------------------------------
   21. Playlist detail
   ------------------------------------------------------------------ */
.playlist-hero{ display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; }
.playlist-hero__cover{
  width: 190px; aspect-ratio: 1/1; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-1);
  background-size: cover; background-position: center;
  background-color: var(--panel2);
  border: 1px solid var(--line);
}
.playlist-hero__cover .icon{ width: 44px; height: 44px; color: var(--text); opacity: .5; }
.playlist-hero__meta{ flex: 1; min-width: 240px; }
.playlist-hero__name{
  font-size: var(--fs-xl); font-weight: 900;
  background: transparent; border: 1px solid transparent;
  padding: 4px 8px; border-radius: var(--radius-1); width: auto; max-width: 340px;
}
.playlist-hero__name:hover, .playlist-hero__name:focus{ border-color: var(--line); background: var(--field-bg); }
@media (max-width: 560px){ .playlist-hero__cover{ width: 120px; } }

/* Reorder affordances: drag on a pointer device, arrows everywhere else. */
@media (hover: none){ .drag-handle{ display: none; } }
@media (hover: hover){ .reorder-arrows{ display: none; } }
.reorder-arrows .iconbtn{ height: 22px; min-width: 26px; padding: 0; }

/* Numbered how-it-works list */
.steps-list{ color: var(--muted); line-height: 1.9; padding-inline-start: 18px; margin: 0 0 var(--sp-4); }
.steps-list li{ margin-bottom: var(--sp-2); }

/* Progress bar */
.progress{
  height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--surface-3);
}
.progress__bar{
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width var(--dur) var(--ease);
}

/* ---------------------------------------------------------------------
   22. Notifications
   ------------------------------------------------------------------ */
.notif{
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--radius-1);
}
.notif + .notif{ border-top: 1px solid var(--line); }
.notif--unread{ background: var(--surface-2); }
.notif__icon{
  width: 34px; height: 34px; border-radius: var(--radius-2); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted);
}
.notif__icon .icon{ width: 17px; height: 17px; }
.notif__icon--track_liked, .notif__icon--comment_liked{ background: var(--tint-bad); color: var(--bad); }
.notif__icon--new_follower{ background: var(--tint-purple); color: var(--purple-text); }
.notif__icon--track_approved{ background: var(--tint-good); color: var(--good); }
.notif__icon--track_rejected{ background: var(--tint-bad); color: var(--bad); }
.notif__icon--milestone_plays{ background: var(--tint-gold); color: var(--gold); }
.notif__body{ flex: 1; min-width: 0; }
.notif__text{ font-size: var(--fs-sm); font-weight: 600; line-height: 1.75; margin-bottom: 2px; }
.notif__actions{ display: flex; gap: 6px; flex: none; align-items: center; }
@media (max-width: 560px){
  .notif__actions .btn--ghost{ display: none; }
}
.creator-box__av--sm{ width: 32px; height: 32px; }
.profile-stat .stat{ font-size: var(--fs-xl); font-weight: 900; display: block; }
.suggest-row{ display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; }
.suggest-row + .suggest-row{ border-top: 1px solid var(--line); }
.suggest-row .cluster{ min-width: 0; }

/* ---------------------------------------------------------------------
   23. Upload flow + my tracks
   ------------------------------------------------------------------ */
.upload-step__head{ display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.upload-step__num{
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: var(--fs-xs);
}

.mytrack{ display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) 0; }
.mytrack + .mytrack{ border-top: 1px solid var(--line); }
.mytrack:first-child{ padding-top: 0; }
.mytrack__meta{ flex: 1; min-width: 0; }
.mytrack__actions{ display: flex; gap: var(--sp-2); flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px){
  .mytrack{ flex-wrap: wrap; }
  .mytrack__actions{ width: 100%; justify-content: flex-start; }
}

/* Album/show cards */
.album-card .mini-card__cover{
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.album-card .mini-card__cover .icon{ width: 34px; height: 34px; color: var(--text); opacity: .5; }
.mini-card__cover--playlist{ display: flex; align-items: center; justify-content: center; }
.mini-card__cover--playlist .icon{ width: 32px; height: 32px; color: var(--text); opacity: .5; }

/* ---------------------------------------------------------------------
   24. Moderation queues
   ------------------------------------------------------------------ */
.review-row{ display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) 0; }
.review-row + .review-row{ border-top: 1px solid var(--line); }
.review-row:first-child{ padding-top: 0; }
.review-row__meta{ flex: 1; min-width: 0; }
.review-row__actions{ display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.review-row__reason{ min-width: 200px; height: 34px; font-size: var(--fs-xs); }
@media (max-width: 860px){
  .review-row{ flex-wrap: wrap; }
  .review-row__actions{ width: 100%; justify-content: flex-start; }
}

.report-card__target{ display: flex; flex-direction: column; gap: var(--sp-2); }
.report-card__target .icon{ width: 16px; height: 16px; color: var(--muted); flex: none; }
.report-card__quote{
  margin: 0; padding: var(--sp-2) var(--sp-3);
  border-inline-start: 3px solid var(--line);
  background: var(--surface-1); border-radius: var(--radius-1);
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.8;
}

/* Pagination */
.pagination{
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap;
}
.pagination [aria-disabled="true"]{ opacity: .4; pointer-events: none; }

/* Staff dashboard tweaks */
.queue-card{ display: block; transition: border-color var(--dur) var(--ease); }
.queue-card:hover{ border-color: var(--accent); }
.chart-grid{ grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px){ .chart-grid{ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.aside-stats{ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* The inline <symbol> sprite is markup, not content: take it out of flow
   entirely rather than relying on an inline style attribute. */
.icon-sprite{ position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============================================================
   Advertising (M8) — banner slots + audio pre-roll overlay
   ============================================================ */
.ad-slot{
  position: relative; margin: var(--sp-4) 0; padding: var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--radius-2);
  background: var(--panel); overflow: hidden;
}
.ad-slot__label{
  position: absolute; top: 6px; inset-inline-end: 10px;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--panel2);
  padding: 2px 6px; border-radius: 6px;
}
.ad-slot__link{ display: flex; gap: var(--sp-3); align-items: center; color: inherit; text-decoration: none; }
.ad-slot__link img{ max-height: 90px; border-radius: var(--radius-1); object-fit: cover; }
.ad-slot__text{ display: flex; flex-direction: column; gap: 2px; }
.ad-slot__text strong{ font-size: var(--fs-md); }
.ad-slot__text span{ font-size: var(--fs-sm); color: var(--muted); }
.ad-slot__cta{
  margin-top: 4px; align-self: flex-start; font-style: normal;
  font-size: var(--fs-xs); color: var(--on-accent); background: var(--accent);
  padding: 3px 10px; border-radius: 999px;
}

.ad-preroll{
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,3,8,.72); backdrop-filter: blur(4px);
}
.ad-preroll__box{
  width: min(92vw, 420px); padding: var(--sp-5);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-3); box-shadow: var(--shadow-1); text-align: center;
}
.ad-preroll__badge{
  display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.ad-preroll__title{ margin-top: var(--sp-3); font-size: var(--fs-lg); font-weight: 700; }
.ad-preroll__count{ margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.ad-preroll__actions{ margin-top: var(--sp-4); display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.ad-preroll__cta{
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm);
}
.ad-preroll__skip{
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: var(--fs-sm); cursor: pointer;
}
.ad-preroll__skip:disabled{ opacity: .5; cursor: default; }

/* Ad dashboard KPI grid (reuses .aside-stats grid rules) */
.ad-kpi-grid{ display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 720px){ .ad-kpi-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
.ad-kpi{ padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-1); background: var(--panel); }
.ad-kpi__v{ font-size: var(--fs-xl); font-weight: 700; }
.ad-kpi__k{ font-size: var(--fs-xs); color: var(--muted); }
.pace-over{ color: var(--bad); } .pace-under{ color: var(--accent-text); } .pace-on_track{ color: var(--good); }

/* ---- Content boost (ADR-009) ---- */
/* Pre-roll overlay — mirrors .ad-preroll so the two read as one system. */
.boost-preroll{
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,3,8,.72); backdrop-filter: blur(4px);
}
.boost-preroll__box{
  width: min(92vw, 420px); padding: var(--sp-5);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-3); box-shadow: var(--shadow-1); text-align: center;
}
.boost-preroll__badge{
  display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.boost-preroll__title{ margin-top: var(--sp-3); font-size: var(--fs-lg); font-weight: 700; }
.boost-preroll__count{ margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }
.boost-preroll__actions{ margin-top: var(--sp-4); display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.boost-preroll__cta{
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-sm);
}
.boost-preroll__skip{
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font-size: var(--fs-sm); cursor: pointer;
}
.boost-preroll__skip:disabled{ opacity: .5; cursor: default; }

/* Discover "پیشنهادی" strip — same shape as the Pro spotlight row. */
.boost-spotlight{ margin: var(--sp-5) 0; }

/* /boost/ purchase page */
.boost-buy{ display: grid; gap: var(--sp-5); max-width: 720px; }
.boost-buy__section{ border: 1px solid var(--line); border-radius: var(--radius-2); padding: var(--sp-4); }
.boost-buy__section legend{ font-weight: 700; padding: 0 var(--sp-2); }
.boost-buy__note{ color: var(--muted); font-size: var(--fs-xs); }
.boost-track-picker{ display: grid; gap: var(--sp-2); max-height: 320px; overflow-y: auto; }
.boost-track-picker__item{
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-1); cursor: pointer;
}
.boost-track-picker__item:has(input:checked){ border-color: var(--accent); background: var(--panel2); }
.boost-track-picker__meta{ color: var(--muted); font-size: var(--fs-xs); }
.boost-format{
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-3); align-items: start;
  padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-1); margin-bottom: var(--sp-2); cursor: pointer;
}
.boost-format:has(input:checked){ border-color: var(--accent); background: var(--panel2); }
.boost-format__name{ font-weight: 700; }
.boost-format__desc{ grid-column: 2; color: var(--muted); font-size: var(--fs-xs); }
.boost-hours{ display: flex; align-items: center; gap: var(--sp-3); }
.boost-hours input[type=range]{ flex: 1 1 0; min-width: 0; }
.boost-schedule{ display: grid; gap: var(--sp-1); margin-top: var(--sp-3); font-size: var(--fs-sm); }
.boost-quote{ border: 1px solid var(--line); border-radius: var(--radius-2); padding: var(--sp-4); background: var(--panel); }
.boost-quote__row{ display: flex; justify-content: space-between; padding: var(--sp-1) 0; }
.boost-quote__row--muted{ color: var(--muted); font-size: var(--fs-sm); }
.boost-quote__warn{ margin-top: var(--sp-2); color: var(--bad); font-size: var(--fs-sm); }

/* =======================================================================
   Upload redesign (S-U2..S-U6, ADR-005/006)
   ===================================================================== */

/* Content-type picker */
.type-grid{
  display: grid; gap: var(--sp-4); margin-top: var(--sp-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px){ .type-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type-card{
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--sp-5); text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-3); transition: border-color var(--dur), transform var(--dur);
}
.type-card:hover{ border-color: var(--accent); transform: translateY(-2px); }
.type-card__emoji{ display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: var(--radius-2); background: var(--tint-accent); color: var(--accent-text); }
.type-card__emoji .icon{ width: 26px; height: 26px; }
.type-card__label{ font-size: var(--fs-lg); font-weight: 800; }
.type-card__blurb{ font-size: var(--fs-sm); color: var(--muted); }

/* "آیا این پادکست ادامه دارد؟" fork after a standalone episode upload */
.continue-choice{ display: flex; flex-direction: column; gap: var(--sp-2); }
.continue-choice__option{
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-2);
  cursor: pointer; transition: border-color var(--dur);
}
.continue-choice__option:has(input:checked){ border-color: var(--accent); background: rgb(var(--accent-rgb) / .06); }
.continue-choice__option input{ margin-top: 3px; }

/* Resumable uploader control */
.mu-uploader{ margin-top: var(--sp-2); }
.mu-drop{
  display: block; position: relative; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--radius-2);
  padding: 16px; text-align: center;
  transition: border-color var(--dur), background var(--dur);
  background: rgb(var(--text-rgb) / .015);
}
.mu-drop--over{ border-color: var(--accent); background: rgb(var(--accent-rgb) / .06); }
.mu-drop__idle{ display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--fs-sm); }
.mu-drop__has{ color: var(--accent-text); font-weight: 700; font-size: var(--fs-xs); }
.mu-drop__active{ display: block; }
.mu-drop__active .upload-progress-track{ display: block; }
.mu-drop__active .upload-progress-bar{ display: block; }
.mu-name{ font-weight: 700; font-size: var(--fs-sm); word-break: break-all; }
.mu-actions{ display: flex; gap: var(--sp-2); margin-top: 6px; }
.mu-uploader--busy .mu-drop{ border-color: var(--accent); }

/* Credits rows */
.credits-list{ display: flex; flex-direction: column; gap: var(--sp-2); }
.credit-row{ display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) auto; gap: var(--sp-2); align-items: center; }
.form-field--check label{ display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }

/* Album editor track list */
.album-tracks{ display: flex; flex-direction: column; gap: 4px; margin-top: var(--sp-3); }
.album-track{
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-1);
  background: var(--panel);
  transition: opacity .35s ease, max-height .35s ease, margin .35s ease, padding .35s ease;
}
/* RM-08: "all tracks" member-download tick above the list */
.album-bulk{
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  margin-top: var(--sp-2); padding: 8px; border: 1px dashed var(--line);
  border-radius: var(--radius-1); min-width: 0;
}
.album-bulk[hidden]{ display: none; }
.album-bulk__label{ display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-sm); min-width: 0; }
.album-bulk__status{ min-width: 0; overflow-wrap: anywhere; }
.album-track--pending{ opacity: .8; }
.album-track--error{
  border-color: var(--bad, #dc2626);
  background: rgba(220, 38, 38, 0.06);
}
.album-track--dismissing{
  opacity: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border: none !important;
}
.album-track__actions{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}
.album-track__dismiss{
  background: transparent;
  border: 1px solid var(--line, #e2e8f0);
  color: var(--muted, #64748b);
  border-radius: var(--radius-1, 4px);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  transition: all .15s ease;
}
.album-track__dismiss:hover{
  background: var(--surface-3, #f1f5f9);
  color: var(--text, #0f172a);
  border-color: var(--text, #0f172a);
}
.album-track__retry{
  cursor: pointer;
}
.album-track__seq{ min-width: 1.6em; text-align: center; font-weight: 700; color: var(--muted); }
.album-track__title-input, .album-track input[name="title"]{
  flex: 1 1 160px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-1); padding: 6px 8px; color: var(--text);
}
.album-track .upload-progress-track{ flex: 1 1 120px; display: block; }

/* Aggregate progress across a whole batch of album-track uploads —
   "X از Y ترک آماده شد" instead of only ever seeing N separate
   per-file bars with no sense of overall completion. */
.bulk-summary{ margin-top: var(--sp-2); }
.bulk-summary .upload-progress-track, .bulk-summary .upload-progress-bar{ display: block; }
.row-cover--mic{ background-color: var(--surface-3); }
.row-cover--book{ aspect-ratio: 3 / 4; border-radius: var(--radius-1); }

/* Audiobook full-text reader (P4) — page-by-page pdf.js canvas, never a
   downloadable file. The page itself gets a paper-like card so it reads
   as a book, not a raw embed. */
.pdf-reader__toolbar{
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.pdf-reader__page{ min-width: 6em; text-align: center; }
.pdf-reader__status{ text-align: center; padding: var(--sp-4) 0; }
.pdf-reader__canvas-wrap{
  display: flex; justify-content: center; overflow-x: auto; padding-bottom: var(--sp-2);
}
.pdf-reader__canvas-wrap canvas{
  max-width: 100%; height: auto; border-radius: var(--radius-1);
  background: #fff; box-shadow: var(--shadow-2);
}

/* Support inbox (P5) — a submitted message/reply is free text with real
   line breaks, not HTML; preserve them without turning to |linebreaksbr
   (staff needs the raw text, incl. in the reply <textarea> pre-fill). */
.support-msg__body{ white-space: pre-line; }

/* ------------------------------------------------------------------
   REV-02 (WP-80): touch targets >= 44px on touch screens.
   Small icon buttons (34px card play, 32px player tools, .btn--sm icon
   buttons) keep their drawn size — enlarging them would push the player
   bar past 375px — and get an invisible hit area instead. The pseudo
   element belongs to the button, so a tap on it is a tap on the button.
   ------------------------------------------------------------------ */
@media (pointer: coarse){
  .iconbtn::before,
  .tcard__play::before{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
  .pill,
  .btn--sm { min-height: 40px; }
}

/* WP-80 continue shelf: listening progress on a track card. */
.tcard__progress{
  position: absolute; inset-inline: 8px; inset-block-end: 6px;
  height: 4px; border-radius: 999px;
  background: rgb(var(--text-rgb) / .18);
  overflow: hidden;
}
.tcard__progress-bar{ display: block; height: 100%; background: var(--accent); }


/* ---- Data-saver mode (`data_saver_mode` switch) -------------------------
   Covers/avatars are inline background images; an image whose computed
   background is `none` is never fetched, so this saves the bytes (not just
   the paint). The player bar and the full-screen player keep their art. */
body[data-saver] [style*="background-image"]:not(#playerbar *):not(#npView *){
  background-image: none !important;
  background-color: var(--surface-2, rgba(127, 127, 127, 0.18));
}

/* A visually-hidden file input must stay 1px: the generic file-input rule
   above (width:100% + padding) otherwise out-ranks .sr-only and the 375px
   invisible box pushed the settings page sideways in RTL. */
input[type="file"].sr-only{ width: 1px; height: 1px; padding: 0; border: 0; }

/* R1-L3: upload storage meter (native <progress>, no inline style) */
.storage-meter{ display: grid; gap: 4px; min-width: 0; }
.storage-meter__bar{ width: 100%; height: 8px; accent-color: var(--accent); }

.repost-flag{ display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--purple-text); }
.repost-flag .icon{ width: 13px; height: 13px; }

/* Row waveform: played bars take --wave-on; the playing row's bars breathe. */
.track-line__wave rect{ transition: fill .25s; }
.track-line__wave rect.on{ fill: var(--wave-on); }
.track-line.is-live .track-line__wave rect{
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: row-wave 1.1s ease-in-out infinite;
}
.track-line.is-live .track-line__wave rect:nth-child(2n){ animation-delay: -.7s; }
.track-line.is-live .track-line__wave rect:nth-child(3n){ animation-delay: -.4s; }
.track-line.is-live .track-line__wave rect:nth-child(5n){ animation-delay: -.95s; }
@keyframes row-wave{ 0%, 100%{ transform: scaleY(.7); } 50%{ transform: scaleY(1); } }
.track-line__stats{ margin-inline-start: 4px; }

/* Profile: monthly growth badge and mutual-followers line (UI v2). */
.growth-badge{
  display: inline-flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 11px; font-weight: 700; color: var(--good);
}
.growth-badge .icon{ width: 13px; height: 13px; }
.profile-mutual{ display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.profile-mutual__avatars{ display: inline-flex; }
.profile-mutual__avatars .creator-box__av{ width: 24px; height: 24px; border: 2px solid var(--bg); margin-inline-end: -8px; }

/* ---- Pro track row (partials/_track_row.html): cover | play + titles / wave / tools ---- */
.track-line--pro{ align-items: flex-start; gap: var(--sp-4); padding-block: var(--sp-4); }
.track-line--pro .row-cover{ width: 112px; height: 112px; }
.track-line__head{ display: flex; align-items: center; gap: 14px; min-width: 0; }
.track-line__titles{ min-width: 0; flex: 1; }
.track-line__playbtn{
  flex: none; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); border-color: transparent;
}
.track-line__playbtn:hover{ background: var(--accent2); }
.track-line__playbtn .icon{ width: 20px; height: 20px; }
.track-line--pro .track-line__wave{ max-width: none; height: 32px; margin-top: 12px; }
.track-line__tools{ display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.track-line__tool{
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius-2); background: transparent;
  color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer;
}
.track-line__tool:hover{ border-color: var(--line-strong); background: var(--surface-1); }
.track-line__tool .icon{ width: 18px; height: 18px; color: var(--accent-text); }
.track-line--pro .track-line__stats{
  display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.track-line--pro .track-line__stats .icon{ width: 15px; height: 15px; }
.track-line--pro .track-line__stats .num{ color: var(--text); font-weight: 700; }
@media (max-width: 640px){
  .track-line--pro .row-cover{ width: 76px; height: 76px; }
  .track-line__playbtn{ width: 48px; height: 48px; }
  .track-line__tool{ padding: 0 12px; }
  .track-line--pro .track-line__wave{ height: 24px; margin-top: 8px; }
}

/* Deck keys: legible icons, and the menu's share item only exists on phones. */
.deck-keys .icon{ width: 18px; height: 18px; color: var(--accent-text); }
.deck-keys > .btn--primary .icon{ color: var(--on-accent); }
.menu .menu__item--share{ display: none; }
@media (max-width: 640px){ .menu .menu__item--share{ display: flex; } }

/* =====================================================================
   Cassette card (partials/_cassette_card.html) — a compact cassette at the real
   100.4 x 63.8 mm proportion. Same width as the old square card, ~60% of the height.
   Colours come from core/cassette.py via --cass-shell / --cass-label / --cass-ink.
   ===================================================================== */
.cass-card{ position: relative; min-width: 0; }
.cass{
  position: relative; aspect-ratio: 100 / 64; border-radius: 9px;
  background: var(--cass-shell, #c2410c); color: var(--cass-ink, #1b1208);
  border: 1px solid rgb(0 0 0 / .28); overflow: hidden; container-type: inline-size;
}
/* four corner screws */
.cass::before, .cass::after{
  content: ""; position: absolute; width: 3.2cqw; height: 3.2cqw; border-radius: 50%;
  background: rgb(0 0 0 / .28); inset-block-start: 3.2cqw;
}
.cass::before{ inset-inline-start: 3.2cqw; }
.cass::after{ inset-inline-end: 3.2cqw; }
.cass__tag{
  position: absolute; z-index: 2; inset-block-start: 1.6cqw; inset-inline-end: 9cqw;
  font-size: max(9px, 3.6cqw); font-weight: 800; letter-spacing: .02em;
  color: var(--cass-shell-ink, #fff8ec); opacity: .9;
}
/* the handwritten label: title + artist on ruled paper, like the notes people wrote on old tapes */
.cass__label{
  position: absolute; inset-inline: 7cqw; inset-block-start: 9.5cqw; height: 37%;
  background-color: var(--cass-label, #f3ead8); color: var(--cass-ink, #1b1208);
  border-radius: 2.2cqw; padding: 2.4cqw 4cqw; display: flex; flex-direction: column; gap: .6cqw;
  background-image: repeating-linear-gradient(to bottom, transparent 0 7.6cqw, rgb(0 0 0 / .1) 7.6cqw calc(7.6cqw + 1px));
  background-position: 0 3.6cqw; transform: rotate(-.5deg);
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / .12);
}
.cass__title{
  font-size: max(11px, 5.4cqw); font-weight: 800; line-height: 1.35; color: inherit;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; unicode-bidi: plaintext;
}
.cass__title:hover{ text-decoration: underline; text-decoration-thickness: 1px; }
.cass__by{
  font-size: max(10px, 4.1cqw); font-weight: 600; color: inherit; opacity: .78;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%;
}
.cass__by .verified-badge{ width: 3.6cqw; height: 3.6cqw; color: inherit; }
.cass__side{
  position: absolute; inset-inline-start: 3.4cqw; inset-block-end: 1.8cqw;
  font-size: max(9px, 3.4cqw); font-weight: 700; font-variant-numeric: tabular-nums; opacity: .7;
}
/* the tape window with its two reels */
.cass__window{
  position: absolute; inset-inline: 21cqw; inset-block-start: 53%; height: 25%;
  background: var(--deck-window, #08080a); border-radius: 2.4cqw; border: 1px solid rgb(0 0 0 / .45);
  display: flex; align-items: center; justify-content: space-between; padding-inline: 3.2cqw;
}
.cass__reel{
  position: relative; height: 82%; aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset 0 0 0 1.2px rgb(255 255 255 / .22);
}
.cass__reel::before{            /* the tape wound on the reel; radius follows playback (--prog) */
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--tape, #5a4030);
  transform: scale(var(--tape-s, .72)); transition: transform .5s linear;
}
.cass__reel--a{ --tape-s: calc(1 - var(--prog, 0) * .42); }
.cass__reel--b{ --tape-s: calc(.58 + var(--prog, 0) * .42); }
.cass__reel::after{             /* hub with spokes */
  content: ""; position: absolute; inset: 24%; border-radius: 50%;
  border: 1.6px dashed rgb(255 255 255 / .55); background: var(--deck-window, #08080a);
}
.cass.is-live .cass__reel::after, .cass-card:hover .cass__reel::after{ animation: reel-spin 2.8s linear infinite; }
.cass.is-live .cass__reel::after{ animation-duration: 2s; }
/* play key sits on the cassette, centred between the reels */
.cass__play{
  position: absolute; z-index: 3; inset-inline-start: 50%; inset-block-start: 65.5%;
  width: 11.5cqw; height: 11.5cqw; min-width: 36px; min-height: 36px; transform: translate(50%, -50%);
  display: flex; align-items: center; justify-content: center; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--cass-label, #f3ead8); color: var(--cass-ink, #1b1208);
  border: 2px solid var(--cass-shell, #c2410c); box-shadow: 0 0 0 2px rgb(0 0 0 / .25);
  transition: transform var(--dur) var(--ease);
}
html[dir="rtl"] .cass__play{ transform: translate(50%, -50%); }
.cass__play:hover{ transform: translate(50%, -50%) scale(1.08); }
.cass__play .icon{ width: 45%; height: 45%; }
/* bottom trapezoid of the shell with its two guide holes */
.cass__foot{
  position: absolute; inset-inline: 17cqw; inset-block-end: 0; height: 15%;
  background: rgb(0 0 0 / .24); clip-path: polygon(0 100%, 7% 0, 93% 0, 100% 100%);
  display: flex; justify-content: space-between; align-items: center; padding-inline: 14% ; padding-block-start: 1cqw;
}
.cass__foot i{ width: 3.2cqw; height: 3.2cqw; border-radius: 50%; background: rgb(0 0 0 / .45); }
.cass .tcard__progress{ inset-block-end: 0; z-index: 2; }
.cass-card__tools{ display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.cass-card__plays{ margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.cass-card__plays .icon{ width: 14px; height: 14px; }
.cass-card .tcard__repost-flag{ margin-bottom: 4px; }

/* staff preview swatches (templates/staff/cassettes.html) */
.cass-preview{ display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.cass-mini{ aspect-ratio: 100 / 64; border-radius: 5px; background: var(--cass-shell); position: relative; border: 1px solid rgb(0 0 0 / .3); }
.cass-mini__label{ position: absolute; inset-inline: 12%; inset-block-start: 14%; height: 38%; border-radius: 2px; background: var(--cass-label); }
.cass-card__tools .iconbtn{ padding-inline: 8px; gap: 4px; min-width: 44px; }

/* =====================================================================
   Track page (UI v2): stage player, toolbar, share menu, comments
   ===================================================================== */
/* finer line icons on this page */
.track-hero .icon, .comments .icon, .share-menu__panel .icon{ stroke-width: 1.45; }

.track-stage{ display: flex; align-items: center; gap: 18px; margin: 4px 0 14px; }
.track-stage__play{
  flex: none; width: 68px; height: 68px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); border: 0;
  transition: transform var(--dur) var(--ease), background var(--dur);
}
.track-stage__play:hover{ background: var(--accent2); transform: scale(1.04); }
.track-stage__play .icon{ width: 28px; height: 28px; stroke-width: 0; }
.track-stage__main{ flex: 1; min-width: 0; }
.track-stage__wave-wrap{ position: relative; height: 72px; cursor: pointer; border-radius: var(--radius-1); }
.track-stage__wave-wrap:focus-visible{ outline: 3px solid var(--focus); outline-offset: 3px; }
.track-stage__wave{ display: block; width: 100%; height: 100%; fill: var(--wave-off); }
.track-stage__wave rect{ transition: fill .2s; }
.track-stage__wave rect.on{ fill: var(--wave-on); }
.track-stage.is-live .track-stage__wave rect{ transform-box: fill-box; transform-origin: 50% 100%; animation: row-wave 1.2s ease-in-out infinite; }
.track-stage.is-live .track-stage__wave rect:nth-child(2n){ animation-delay: -.6s; }
.track-stage.is-live .track-stage__wave rect:nth-child(3n){ animation-delay: -.3s; }
.track-stage__times{ display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
/* comment moments: dots riding on the waveform */
.track-stage__moment{
  position: absolute; inset-block-start: -6px; width: 12px; height: 12px; padding: 0; border-radius: 50%;
  background: var(--purple); border: 2px solid var(--bg); cursor: pointer; transform: translateX(50%);
}
.track-stage__moment::before{ content: ""; position: absolute; inset: -16px -10px; }
.track-stage__moment:hover{ background: var(--purple2); }

.track-toolbar{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.track-tool{
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text);
  font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: border-color var(--dur), background var(--dur);
}
.track-tool:hover{ border-color: var(--line-strong); background: var(--surface-1); }
.track-tool .icon{ width: 18px; height: 18px; color: var(--accent-text); }
.track-tool.is-on, .track-tool[aria-pressed="true"]{ border-color: var(--accent); background: var(--tint-accent); }

/* thinner secondary chips under the toolbar */
/* Secondary actions: one compact row (wraps only when the screen is too narrow);
   the report chip is small and sits last with a caret that opens its dropdown. */
.track-hero .action-grid{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.track-hero .action-chip{ border-radius: var(--radius-2); font-weight: 500; border-color: var(--line); min-height: 40px; padding: 8px 10px; font-size: 13px; }
.track-hero .action-chip .icon{ width: 16px; height: 16px; color: var(--accent-text); }
.track-hero .action-chip--sm{ min-height: 32px; padding: 4px 8px; font-size: 12px; gap: 4px; margin-inline-start: auto; }
.track-hero .action-chip--danger .icon{ color: var(--bad); }
.track-hero .action-chip--sm .icon{ width: 14px; height: 14px; }
.action-report__caret{ opacity: .7; }
.action-report__form{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-report__form select{ flex: 1; min-width: 150px; }
/* Big play button sits at the physical left of the stage, beside the cover art. */
.track-stage{ flex-direction: row-reverse; }

/* share menu */
.share-menu__panel{ width: 340px; max-width: 92vw; padding: 14px; }
.share-menu__head{ display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 14px; }
.share-menu__link{ display: flex; gap: 8px; align-items: center; }
.share-menu__url{
  flex: 1; min-width: 0; height: 44px; padding: 0 10px; font-size: 12px; direction: ltr; text-align: left;
  background: var(--field-bg); border: 1px solid var(--line); border-radius: var(--radius-2); color: var(--muted);
}
.share-menu__at{ display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.share-menu__at input{ width: 18px; height: 18px; accent-color: var(--accent); }
.share-menu__targets{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-menu__target{
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 8px 4px;
  border: 1px solid var(--line); border-radius: var(--radius-2); background: transparent; color: var(--text);
  font-family: var(--font); font-size: 12px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.share-menu__target[hidden]{ display: none; }
.share-menu__target:hover{ border-color: var(--line-strong); background: var(--surface-1); }
.share-menu__target .icon{ width: 20px; height: 20px; color: var(--accent-text); }
.share-menu__hint{ margin: 10px 0 0; font-size: 11px; color: var(--muted); line-height: 1.8; }

/* comments */
.comments{ padding: 20px; }
.comments__head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.comments__title{ margin: 0; font-size: 17px; font-weight: 700; }
.comments__count{ color: var(--muted); font-weight: 400; font-size: 13px; }
.comments__sort{ display: flex; gap: 4px; }
.comments__sort-link{ padding: 8px 12px; border-radius: 999px; font-size: 12px; color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; }
.comments__sort-link.is-active{ color: var(--text); background: var(--surface-2); font-weight: 700; }
.composer{ display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.composer__box{ flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-2); background: var(--field-bg); padding: 8px 10px; }
.composer__box:focus-within{ border-color: var(--accent); }
.composer__input{
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.9; min-height: 56px; padding: 4px 2px;
}
.composer__bar{ display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.composer__count{ margin-inline-end: auto; font-size: 11px; color: var(--muted); }
.composer__time{
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--font); font-size: 12px; cursor: pointer;
}
.composer__time[aria-pressed="true"]{ border-color: var(--purple); color: var(--purple-text); background: var(--tint-purple); }
.composer__time .icon{ width: 16px; height: 16px; }
.comment-list{ display: flex; flex-direction: column; }
.comment-list > .comment{ padding: 16px 0; border-top: 1px solid var(--line); }
.comment-list > .comment:first-child{ border-top: 0; }
.comment__meta{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment__badge{ font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tint-accent); color: var(--accent-text); }
.comment__moment{
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; min-height: 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: var(--tint-purple); color: var(--purple-text); font-family: var(--font); font-size: 11px; font-weight: 700;
}
.comment__moment .icon{ width: 12px; height: 12px; }
.comment__time{ margin-inline-start: auto; }
.comment__text{ margin: 6px 0 8px; font-size: 14px; line-height: 1.95; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.comment__actions{ display: flex; align-items: center; gap: 4px; margin-inline-start: -8px; }
.comment__act{
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px; border: 0; border-radius: var(--radius-2);
  background: transparent; color: var(--muted); font-family: var(--font); font-size: 12px; cursor: pointer;
}
.comment__act:hover{ color: var(--text); background: var(--surface-1); }
.comment__act .icon{ width: 16px; height: 16px; }
.comment__act.primary, .comment__act.primary .icon{ color: var(--accent-text); }
.comment__act--danger:hover{ color: var(--bad); }
.comment__replies{ margin-top: 8px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line); display: flex; flex-direction: column; }
.comment--reply{ padding: 10px 0; }
.comment--reply .comment__avatar{ width: 28px; height: 28px; }
.reply-form{ margin-top: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-2); background: var(--field-bg); padding: 8px 10px; }
@media (max-width: 640px){
  .track-stage{ gap: 12px; }
  .track-stage__play{ width: 56px; height: 56px; }
  .track-stage__wave-wrap{ height: 56px; }
  .track-tool__label{ display: none; }
  .share-menu__targets{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.comment__author{ min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== DISCOVER-V2: deck header, type switch, three-column home, cassette deck. Spec: .casset/design/discover-v2/01-discover-v2-spec.md. Size: ~19.4KB raw / ~4.3KB gzip (spec asked 14KB; near floor, see DISCOVER-V2.md). ===== */
.keys{display:flex;border:1px solid var(--line-strong);border-radius:8px;overflow:hidden;background:var(--bg)}
.key{height:44px;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;border:0;border-inline-start:1px solid var(--line-strong);background:none;color:var(--muted);font:600 13px var(--font);white-space:nowrap;cursor:pointer}
.key:first-child{border-inline-start:0}
.key .icon{width:18px;height:18px}
.key:hover{color:var(--text)}
.key--on{background:var(--panel2);color:var(--text);font-weight:700;box-shadow:inset 0 -3px 0 var(--accent)}
.key:focus-visible,.cont__item:focus-visible,.siderow:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
html.creator-mode .key--studio{background:var(--label-paper);color:var(--label-ink)}
/* two-line text block, one line each */
.tl{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.5}
.tl>*{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.tl>b,.tl>a{font-size:13px;font-weight:600}
.tl>span{font-size:12px;color:var(--muted)}
.rl{flex:none;width:var(--d,24px);height:var(--d,24px);border-radius:50%;background:radial-gradient(circle,var(--reel-hub) 0 var(--h,4px),var(--tape) calc(var(--h,4px) + .5px))}
/* header */
.deckbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;min-height:64px;padding:10px 24px}
.deckbar__brand{display:flex;align-items:center;gap:10px;margin-inline-end:4px;font-size:19px;font-weight:900}
.deckbar__brand .brand__mark{width:30px;height:30px;border-radius:6px}
.deckbar__brand .icon{width:16px;height:16px}
.deckbar__search{flex:1 1 220px;height:44px;padding:0 14px;border-radius:8px;border-color:var(--line-strong);background:var(--bg)}
.deckbar .search__input{flex:1;min-width:0;height:100%;min-height:0;padding:0;border:0;background:none;box-shadow:none}
/* a11y (ENG-06, WCAG 2.4.7): the bare input has no ring of its own, so the field shows it */
.deckbar__search:focus-within{outline:3px solid var(--focus);outline-offset:2px}
.deckbar__go{position:relative;display:flex;padding:0;border:0;background:none;color:var(--muted);cursor:pointer}
.deckbar__go::after,.rec__x::after{content:"";position:absolute;inset:-12px}
.deckbar__go .icon{width:18px;height:18px}
.deckbar__creator{display:none;gap:8px}
html.creator-mode .deckbar__creator{display:flex}
.deckbar__creator .btn{height:44px;border-radius:8px}
.deckbar__actions{gap:8px}
.deckbar .topbar__bell,.deckbar .chip{height:44px;border:1px solid var(--line-strong);border-radius:8px}
.deckbar .topbar__bell{width:44px}
.menu__vip{display:grid;gap:6px;margin-top:8px;padding:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
@media (min-width:980px){.appshell--deck{display:block}}
.appshell--wide{max-width:1440px;padding:24px 32px 120px}
.bottomnav--deck .bottomnav__link--active{color:var(--text);box-shadow:inset 0 3px 0 var(--accent)}
/* type switch */
.typebar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:8px 24px;border-bottom:1px solid var(--line);background:var(--bg)}
.typebar .key{height:40px;padding:0 16px}
.typebar .key .icon{width:15px;height:15px}
.typehint{display:flex;align-items:center;gap:10px;min-height:40px;padding-inline:14px 4px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel2);font-size:13px}
.typehint span{color:var(--muted)}
.typehint a{display:grid;place-items:center;width:32px;height:32px;margin-inline-start:auto;color:var(--muted)}
.typehint .icon{width:14px;height:14px}
.kindtag.kindtag--v2{inset-block-start:5px;inset-inline:5px auto;display:flex;align-items:center;gap:4px;height:22px;padding:0 6px;border-radius:3px;background:var(--bg);backdrop-filter:none;font-size:11px;font-weight:600;line-height:1;white-space:nowrap}
.kindtag--v2 .icon,.kindicon{flex:none;width:11px;height:11px}
.kindicon{display:inline-block;margin-inline-end:4px;vertical-align:-1px}
/* frame */
.dv,.dv__side,.dv__main,.dv__shelves{display:flex;flex-direction:column;gap:32px;min-width:0}
.dv{gap:28px}
.dv__main,.dv__shelves{gap:36px}
.dv section{margin:0;min-width:0}
.dv__cols{display:grid;grid-template-columns:minmax(0,1fr);gap:36px 32px;align-items:start}
.dv__main{order:1}
.dv__side--l{order:2}
.dv__side--r{order:3}
.dv__shelves:empty{display:none}
.dv__shelves>section{content-visibility:auto;contain-intrinsic-size:auto 320px}
@media (min-width:740px){.dv__cols{grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:auto 1fr}
.dv__main{grid-area:1/1/3/2}
.dv__side--r{grid-area:1/2}
.dv__side--l{grid-area:2/2}}
@media (min-width:1200px){.dv__cols{grid-template-columns:280px minmax(0,1fr) 320px;grid-template-rows:auto}
.dv__side--r{grid-area:1/1}
.dv__main{grid-area:1/2}
.dv__side--l{grid-area:1/3}
.dv__shelves .tcard-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.dvh{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin-bottom:10px}
.dvh h2{margin:0;font-size:16px;font-weight:700;letter-spacing:0}
.dvh--main h2{font-size:18px}
.dvh>a,.dvh>span{font-size:12px;color:var(--muted)}
.dv a:hover{color:var(--accent-text)}
.newpill{margin-inline-end:auto;padding:2px 8px;border-radius:999px;background:var(--tint-accent);color:var(--accent-text);font-size:12px;font-weight:700}
.dvrow{display:flex;align-items:center;gap:12px;min-width:0;height:52px;border-top:1px solid var(--line)}
.dvrow>span:last-child{flex:none;font-size:12px;color:var(--muted)}
.dvrow__art,.av{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:4px;background:var(--panel2);font-size:14px;font-weight:800;overflow:hidden}
.dvrow__art .icon{width:16px;height:16px;color:var(--accent-text)}
.av{width:28px;height:28px;border-radius:50%;font-size:12px}
.av--lg{width:40px;height:40px;font-size:16px}
.dv img{width:100%;height:100%;object-fit:cover}
/* continue strip */
.cont{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.cont .tl{flex:none}
.cont h2{margin:0;font-size:13px;font-weight:700;letter-spacing:0}
.cont .tl>span{font-size:11px}
.cont__grid{flex:1 1 600px;min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:10px}
.cont__item{position:relative;overflow:hidden;height:44px;display:flex;align-items:center;gap:10px;min-width:0;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:none;color:var(--text);font-family:var(--font);text-align:start;cursor:pointer}
.cont__item .tl{flex:1;line-height:1.4}
.cont__item b{font-size:12.5px}
.cont__item>.icon{flex:none;width:12px;height:12px;color:var(--muted)}
.cont__item:first-child>.icon{color:var(--accent)}
.cont__pg,.siderow__pg{position:absolute;inset-block-end:0;inset-inline-start:0;height:2px;background:var(--accent)}
.mw{flex:none;display:flex;align-items:center;justify-content:space-around;width:34px;height:20px;border:1px solid var(--line-strong);border-radius:3px;background:var(--deck-window);--d:10px;--h:2px}
.mw[data-p="0"] .rl:first-child,.mw[data-p="3"] .rl:last-child{--d:13px}
.mw[data-p="0"] .rl:last-child,.mw[data-p="3"] .rl:first-child{--d:7px}
.mw[data-p="1"] .rl:first-child{--d:11px}
.mw[data-p="2"] .rl:last-child{--d:11px}
/* right column */
.pts{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px;border:1px solid var(--line);border-radius:6px;background:var(--panel);font-size:12px;color:var(--muted)}
.pts .dvh{align-self:stretch;margin:0}
.pts h2{font-size:13px;font-weight:600;color:var(--muted)}
.pts b{font-size:28px;font-weight:800;line-height:1.3;color:var(--text);font-variant-numeric:tabular-nums}
.moods{display:flex;flex-wrap:wrap;gap:8px}
.moods a{display:flex;align-items:center;height:40px;padding:0 14px;border:1px solid var(--line-strong);border-radius:999px;font-size:13px;white-space:nowrap}
/* cassette deck: daily cassette + album */
.tape{display:flex;flex-wrap:wrap;align-items:center;gap:18px;padding:14px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel)}
.tape__shell{flex:0 0 176px;padding:8px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel2)}
.paper,.spine__paper{background:var(--label-paper);color:var(--label-ink)}
.paper{display:flex;flex-direction:column;gap:4px;padding:10px 12px 12px;border-radius:4px}
.paper__top{display:flex;align-items:center;gap:8px;min-width:0}
.paper__dot{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--label-ink);color:var(--label-paper);font-size:13px;font-weight:900}
.paper img{flex:none;width:48px;height:48px;border-radius:3px}
.paper .tl,.spine .tl{line-height:1.4}
.paper b,.spine b{font-size:14px;font-weight:800}
.paper .tl>span,.spine .tl>span{font-size:11px;color:var(--label-ink2)}
.paper__bar{height:3px;margin-top:4px;border-radius:1px;background:var(--accent)}
.paper__win{display:flex;align-items:center;justify-content:space-between;height:34px;margin-top:6px;padding:0 8px;border-radius:999px;background:var(--deck-window)}
.paper__win>i:nth-child(2){flex:1;height:12px;margin:0 8px;border:1px solid var(--line-strong);border-radius:2px;background:var(--tape-window)}
.rl--s{--d:14px}
.tape__body{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:8px}
.tape__head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
.tape__head .tl{flex:1 1 220px}
.tape__head h2,.tape__head h3{margin:0;font-size:18px;font-weight:800;letter-spacing:0}
.tape__btns{display:flex;flex-wrap:wrap;gap:8px}
.tape__btns .btn{height:44px}
.sides{display:grid;grid-template-columns:minmax(0,1fr);column-gap:24px}
.sides--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.sides--flow .side,.lf{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));column-gap:24px}
.side{min-width:0}
.side__head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--line-strong);font-size:12px;color:var(--muted)}
.siderow{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;height:34px;padding:0;border:0;border-top:1px solid var(--line);background:none;color:var(--muted);font:12px var(--font);text-align:start;cursor:pointer}
.siderow>:first-child{min-width:24px;font-size:11px;font-weight:800;color:var(--accent-text)}
.siderow>:nth-child(2){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.siderow__t{direction:ltr;text-align:left}
.siderow__d{direction:ltr;font-variant-numeric:tabular-nums;font-size:11px}
.siderow b{font-size:13px;font-weight:600;color:var(--text)}
.siderow:hover b,.siderow.is-on b{color:var(--accent-text)}
.siderow .icon{width:14px;height:14px}
.album-mod-card{padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-2)}
.album-mod-tracklist{background:var(--surface-1);border-radius:var(--radius-1);padding:10px 14px;border:1px solid var(--line)}
.album-mod-track-row{padding:6px 0;border-bottom:1px solid var(--line)}
.album-mod-track-row:last-child{border-bottom:0}
.album-mod-track-row--pending{background:rgba(255,193,7,0.08);border-radius:4px;padding-inline:6px}
.tape__more{display:none;align-items:center;gap:6px;min-height:44px;font-size:13px;font-weight:700;color:var(--accent-text);cursor:pointer}
.tape__more .icon{width:14px;height:14px}
.tape__all:focus-visible~.tape__more{outline:2px solid var(--focus)}
.tape--long .tape__more{display:flex}
.tape--long .x8,.tape .tape__all:checked~.tape__more{display:none}
.tape--long .tape__all:checked~.sides .x8{display:grid}
.tape--lg{align-items:flex-start;gap:20px;padding:16px}
.tape--lg .tape__shell{flex-basis:216px}
.tape--lg .paper__win{height:44px;--d:32px}
.tape--lg .rl--s{--d:20px}
.tape--lg .tape__body{flex-basis:420px;gap:12px}
.tape--lg h3{font-size:20px}
.tape--lg .siderow{height:36px;border-top:0;border-bottom:1px solid var(--line)}
.tape>img{flex:0 0 120px;width:120px;height:160px;border-radius:4px;object-fit:cover}
.tapes{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}
.tapes summary{height:54px;border-radius:6px;cursor:pointer;list-style:none}
.tapes summary::-webkit-details-marker{display:none}
.tapes .spine__end{flex-direction:row;width:auto;gap:8px;padding-inline:8px 12px;font-size:12px;letter-spacing:0}
.tapes [open]>summary{margin-bottom:12px}
/* long-form hero, stream */
.lf{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))}
.lf .dvrow{height:62px}
.lf .tl>span{font-size:11px}
.lf .dvrow__art{width:44px;height:44px}
.lf--book .dvrow__art{width:33px}
.lf__pg{height:2px;margin-top:3px;background:var(--line)}
.lf__pg i{display:block;height:2px;background:var(--accent)}
.st{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-top:1px solid var(--line)}
.st__who{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.st__who>span:nth-child(2){flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.st__who a,.st__who b{color:var(--text);font-weight:600}
.st__who time,.st__top>span:last-child{flex:none;font-size:12px;color:var(--muted)}
.st__body,.st__top{display:flex;gap:14px}
.st__top{align-items:center;gap:12px}
.st__art,.rec__art{position:relative;flex:none;display:flex;align-items:flex-end;justify-content:center;width:96px;height:96px;border-radius:4px;background:var(--panel2);overflow:hidden}
.st__art[style],.rec__art[style]{background:var(--cass-shell)}
.st__art>b,.rec__art>b{width:100%;padding:8px;font-size:20px;font-weight:900;line-height:1.1;color:var(--cass-label,var(--label-paper));overflow:hidden}
.st__art--book{border:1px solid var(--line);background:var(--panel)}
.st__art--book>img,.st__art--book>b{width:66px;height:86px;border-radius:3px 3px 0 0;background:var(--panel2);font-size:14px}
.st__main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:4px}
.st .tl>a{font-size:15px}
.st .kindicon{display:none}
.wv{display:block;width:100%;height:36px;fill:none;stroke:var(--wave-off);stroke-width:2}
.wv path{vector-effect:non-scaling-stroke}
.roundplay{flex:none;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line-strong);border-radius:50%;background:none;color:var(--text);cursor:pointer}
.roundplay .icon{width:16px;height:16px}
.roundplay:hover,.roundplay--on{border-color:var(--accent);background:var(--accent);color:var(--on-accent)}
.roundplay--sm{width:36px;height:36px}
.st__acts{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--muted)}
.st__acts button{display:flex;align-items:center;gap:6px;height:36px;padding:0 10px;border:0;border-radius:6px;background:none;color:inherit;font:12px var(--font);cursor:pointer}
.st__acts button:hover{color:var(--text)}
.st__acts [aria-pressed="true"]{color:var(--accent-text)}
.st__acts .icon{width:16px;height:16px}
.st__acts>span{margin-inline-start:auto}
/* recommendations, left column */
.recs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:16px;align-items:end}
.rec{min-width:0}
.rec__art{width:100%;height:auto;aspect-ratio:1;margin-bottom:8px}
.rec__art--book{width:75%;aspect-ratio:3/4}
.rec__art .kindtag{inset-block-start:8px;inset-inline-start:8px}
.rec__art>b{font-size:24px}
.rec__art button{position:absolute;inset-block-end:8px;inset-inline-end:8px;opacity:0}
.rec__x{position:absolute;inset-block:8px auto!important;display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:50%;background:var(--bg);color:var(--muted);cursor:pointer}
.rec__x .icon{width:12px;height:12px}
.rec:hover button,.rec :focus-visible{opacity:1}
.rec .tl>a:first-child{font-size:14px}
.rec .tl>span{font-size:11px;color:var(--accent-text)}
.rec .rec__by{font-size:12px;font-weight:400;color:var(--muted)}
.dvrow--c{height:60px}
.dvrow--c b{font-weight:700}
.crow__follow{flex:none;display:flex;align-items:center;height:36px;padding:0 12px;border:1px solid var(--line-strong);border-radius:6px;background:none;color:var(--text);font:700 12px var(--font);white-space:nowrap;cursor:pointer}
.crow__follow:hover,.crow__follow[aria-pressed="true"]{border-color:var(--accent);color:var(--accent-text)}
.spines{display:flex;flex-direction:column;gap:6px}
.spine{display:flex;height:46px;border:1px solid var(--line-strong);border-radius:4px;background:var(--panel2);color:var(--text);overflow:hidden}
.spine__paper{flex:1;min-width:0;display:flex;align-items:center;padding:0 12px;border-inline-end:3px solid var(--accent)}
.spine b{font-size:13px}
.spine__end{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:96px;font-size:9px;letter-spacing:1.5px;color:var(--muted)}
.spine__win{display:flex;align-items:center;justify-content:space-between;width:56px;height:14px;padding:0 3px;border:1px solid var(--line-strong);border-radius:7px;background:var(--deck-window);--d:8px;--h:0px}
.trow__n{flex:none;width:22px;font-size:14px;font-weight:800;text-align:center}
.dvh+.trow>.trow__n{color:var(--accent-text)}
.trow .tl>span{font-size:11px}
/* phone and tablet: their own layout, not a squeezed desktop */
@media (max-width:979px){.deckbar{flex-wrap:nowrap;gap:8px;min-height:56px;padding:6px 12px}
.deckbar__nav,html .deckbar__creator,html.creator-mode .deckbar__creator,.deckbar__brand>span:last-child,.deckbar .chip__text,.deckbar .chip__caret,.deckbar__signup{display:none}
.deckbar .search{display:flex;flex:1;height:40px;min-height:40px}
.deckbar .search__input{font-size:16px}
.deckbar .chip{padding:0 8px}
.typebar{position:sticky;top:56px;z-index:80;padding:8px 16px}
.typebar .keys,.typehint{flex:1 1 100%}
.typebar .key{flex:1;height:44px;padding:0 4px}
.appshell--wide{padding:16px 16px 150px}
.hscroll,.cont__grid,.moods{display:flex;flex-wrap:nowrap;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-inline:-16px;padding-inline:16px;scroll-padding-inline:16px}
.hscroll::-webkit-scrollbar,.cont__grid::-webkit-scrollbar,.moods::-webkit-scrollbar{display:none}
.hscroll>*{flex:0 0 min(42vw,180px);scroll-snap-align:start}
.rec__art button{opacity:1}
.crows>.dvrow{flex:0 0 140px;flex-direction:column;justify-content:center;gap:8px;height:auto;padding:12px 8px;border:1px solid var(--line);border-radius:6px;text-align:center}
.crows .av{width:56px;height:56px}
.crows .tl{flex:none;max-width:100%}
.crow__follow,.st__acts button,.moods a{height:44px}
.deckbar__brand{justify-content:center;min-width:44px;min-height:44px;margin:0}
.typehint a{width:44px;height:44px}
.dvh>a{display:inline-flex;align-items:center;min-height:44px;margin-block:-13px}
.spine{height:48px}
.st__acts{justify-content:space-between}
.st__acts>span{margin:0}
.cont{display:block}
.cont>.tl{flex-direction:row;align-items:baseline;gap:8px;margin-bottom:8px}
.cont__item{flex:0 0 min(78vw,300px);scroll-snap-align:start}}
@media (max-width:739px){.tape,.tape--lg{display:block;padding:12px}
.tape .tape__shell{padding:0;border:0;margin-bottom:12px}
.paper{flex-direction:row;align-items:center;gap:10px;padding:10px 12px;border-bottom:3px solid var(--accent)}
.paper__top{flex:1}
.paper__bar,.paper__win>i:nth-child(2){display:none}
.tape .paper__win{flex:none;width:64px;height:28px;margin:0;padding:0 5px;--d:18px}
.tape .rl--s{--d:12px}
.tape__btns,.tape__btns .btn{width:100%}
.sides--2,.sides--flow .side{grid-template-columns:minmax(0,1fr)}
.sides--2 .side+.side{margin-top:12px}
.tape .siderow{height:44px}
.tape--mlong .tape__more{display:flex}
.tape--mlong .x3,.tape--mlong .x8{display:none}
.tape--mlong .tape__all:checked~.sides .siderow{display:grid}
.tape>img{display:block;margin:0 auto 12px}
.st__art{width:72px;height:72px}
.st__art--book>img,.st__art--book>b{width:50px;height:66px}
.st__art .kindtag{display:none}
.st .kindicon{display:inline-block}
.wv{height:28px}}
@media (max-width:359px){.typebar .key .icon{display:none}}
.tapes__item[open]>summary .roundplay{display:none}
@media (max-width: 420px){ .cass-card__plays{ display: none; } .cass-card__tools{ flex-wrap: wrap; } }
