/* =====================================================================
   components.css — component styles. References tokens.css only.
   Logical properties throughout, so dir="rtl" / dir="ltr" mirror for free.
   Static-state classes (.is-hover, .is-pressed, .is-focus…) exist so the
   gallery can show states; production uses the real pseudo-classes too.
   ===================================================================== */

/* ---------- Materials ---------- */
.mat-thin    { background: var(--material-thin-bg);    -webkit-backdrop-filter: var(--material-thin-filter);    backdrop-filter: var(--material-thin-filter);    box-shadow: inset 0 0.5px 0 var(--material-highlight), 0 0 0 0.5px var(--material-edge); }
.mat-regular { background: var(--material-regular-bg); -webkit-backdrop-filter: var(--material-regular-filter); backdrop-filter: var(--material-regular-filter); box-shadow: inset 0 0.5px 0 var(--material-highlight), 0 0 0 0.5px var(--material-edge); }
.mat-thick   { background: var(--material-thick-bg);   -webkit-backdrop-filter: var(--material-thick-filter);   backdrop-filter: var(--material-thick-filter);   box-shadow: inset 0 0.5px 0 var(--material-highlight), 0 0 0 0.5px var(--material-edge); }
.mat-glass   { background: var(--material-glass-bg);   -webkit-backdrop-filter: var(--material-glass-filter);   backdrop-filter: var(--material-glass-filter);   box-shadow: inset 0 0.5px 0 var(--material-glass-highlight), 0 0 0 0.5px rgba(0,0,0,0.20); color: var(--on-media); }
/* Opaque fallbacks: no backdrop-filter, reduced transparency, high contrast */
.mat-thin.is-opaque    { background: var(--material-thin-fallback);    backdrop-filter: none; -webkit-backdrop-filter: none; }
.mat-regular.is-opaque { background: var(--material-regular-fallback); backdrop-filter: none; -webkit-backdrop-filter: none; }
.mat-thick.is-opaque   { background: var(--material-thick-fallback);   backdrop-filter: none; -webkit-backdrop-filter: none; }
.mat-glass.is-opaque   { background: var(--material-glass-fallback);   backdrop-filter: none; -webkit-backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mat-thin { background: var(--material-thin-fallback); } .mat-regular { background: var(--material-regular-fallback); }
  .mat-thick { background: var(--material-thick-fallback); } .mat-glass { background: var(--material-glass-fallback); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .mat-thin, .mat-regular, .mat-thick, .mat-glass { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mat-thin { background: var(--material-thin-fallback); } .mat-regular { background: var(--material-regular-fallback); }
  .mat-thick { background: var(--material-thick-fallback); } .mat-glass { background: var(--material-glass-fallback); }
}

.elev-card    { box-shadow: var(--shadow-card), 0 0 0 1px var(--elevation-border); }
.elev-popover { box-shadow: var(--shadow-popover), 0 0 0 1px var(--elevation-border); }
.elev-sheet   { box-shadow: var(--shadow-sheet), 0 0 0 1px var(--elevation-border); }

.ico { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-bold { stroke-width: 2.25; }

/* ---------- Button ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding-inline: var(--space-5); border: 0; border-radius: var(--radius-full);
  font-family: var(--font-sans); font-size: 17px; font-weight: 600; line-height: 22px; white-space: nowrap;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--duration-press) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast);
}
.btn:active, .btn.is-pressed { transform: scale(var(--press-scale)); }
.btn:focus-visible, .btn.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn-sm { min-height: 32px; padding-inline: 14px; font-size: 15px; line-height: 20px; }
.btn-sm::after { content: ""; position: absolute; inset: -6px 0; }            /* 44px hit area */
.btn-md { min-height: 44px; }
.btn-lg { min-height: 52px; padding-inline: 28px; }
.btn-block { width: 100%; }
.btn-filled { background: var(--tint); color: var(--on-tint); }
.btn-filled:hover, .btn-filled.is-hover { background: var(--tint-hover); }
.btn-filled:active, .btn-filled.is-pressed { background: var(--tint-pressed); }
.btn-tinted { background: var(--tint-subtle); color: var(--tint-text); }
.btn-tinted:hover, .btn-tinted.is-hover { background: color-mix(in srgb, var(--tint) 18%, transparent); }
.btn-gray { background: var(--fill-tertiary); color: var(--label-primary); }
.btn-gray:hover, .btn-gray.is-hover { background: var(--fill-secondary); }
.btn-gray:active, .btn-gray.is-pressed { background: var(--fill-primary); }
.btn-plain { background: transparent; color: var(--tint-text); padding-inline: var(--space-3); }
.btn-plain:hover, .btn-plain.is-hover { background: var(--fill-quaternary); }
.btn-destructive { background: var(--danger-subtle); color: var(--danger); }
.btn-destructive:hover, .btn-destructive.is-hover { background: color-mix(in srgb, var(--danger) 18%, transparent); }
.btn-destructive-filled { background: var(--danger); color: var(--on-danger); }
.btn[disabled], .btn.is-disabled { background: var(--fill-quaternary); color: var(--label-tertiary); cursor: default; transform: none; }
.btn-plain[disabled], .btn-plain.is-disabled { background: transparent; }
.btn-icon { padding: 0; width: 44px; min-height: 44px; }
.btn-icon.btn-sm { width: 32px; min-height: 32px; }
.btn-icon.btn-sm::after { inset: -6px; }
.btn-icon.btn-lg { width: 52px; min-height: 52px; }
.btn.is-loading { color: transparent; }
.btn.is-loading .spinner { position: absolute; inset: 0; margin: auto; }
.btn-filled.is-loading .spinner { color: var(--on-tint); }
.btn-gray.is-loading .spinner, .btn-tinted.is-loading .spinner { color: var(--label-secondary); }

/* ---------- Outline button + third-party provider (Sign in with Google) ---------- */
.btn-outline { background: var(--bg-primary); color: var(--label-primary); box-shadow: inset 0 0 0 1px var(--separator-opaque); gap: 12px; }
.btn-outline:hover, .btn-outline.is-hover { background: var(--fill-quaternary); }
.btn-outline.is-disabled { box-shadow: none; }
/* Slot for the provider's official mark, supplied by the provider's brand kit / SDK. Never redraw it. */
.provider-slot { width: 20px; height: 20px; flex: none; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1.5px var(--label-tertiary); background: var(--fill-quaternary); }

/* ---------- Activity indicator (spokes) ---------- */
.spinner { display: block; width: 20px; height: 20px; color: var(--label-secondary); animation: ds-spin 0.9s steps(8) infinite; }
.spinner-lg { width: 36px; height: 36px; }
.spinner-media { color: var(--on-media); }

/* ---------- Text field ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--label-secondary); }
.field-label:lang(ar) { line-height: 22px; }
.input-wrap {
  display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding-inline: var(--space-4) var(--space-1);
  background: var(--fill-tertiary); border: 1.5px solid transparent; border-radius: var(--radius-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input-wrap.is-focus { border-color: var(--tint); box-shadow: 0 0 0 4px var(--tint-subtle); background: var(--bg-primary); }
.input-wrap.is-error { border-color: var(--danger); background: var(--danger-subtle); }
.input-wrap.is-disabled { opacity: 1; background: var(--fill-quaternary); }
.input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none; padding: 0;
  font-family: var(--font-sans); font-size: 17px; color: var(--label-primary);
}
.input::placeholder { color: var(--label-secondary); opacity: 1; }
.input-wrap.is-disabled .input { color: var(--label-tertiary); }
.input-ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .input-ltr { text-align: right; }
.input-ltr:placeholder-shown { direction: inherit; }
.field-help { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--label-secondary); }
.field-help:lang(ar) { line-height: 22px; }
.field-help.is-error { color: var(--danger); }
.input-clear { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--label-tertiary); border-radius: var(--radius-full); cursor: pointer; }
.input-clear-dot { width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--label-tertiary); color: var(--bg-primary); display: grid; place-items: center; }

/* ---------- One-time code ---------- */
.otp { display: flex; gap: var(--space-2); direction: ltr; unicode-bidi: isolate; justify-content: center; }
.otp-gap { width: var(--space-2); flex: none; }
.otp-cell {
  position: relative; width: 48px; height: 60px; flex: none; display: grid; place-items: center;
  border-radius: var(--radius-md); background: var(--fill-tertiary); border: 1.5px solid transparent;
  font-family: var(--font-sans); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label-primary);
  transition: border-color var(--duration-fast), background-color var(--duration-fast);
}
.otp-cell.is-focus { border-color: var(--tint); background: var(--bg-primary); box-shadow: 0 0 0 4px var(--tint-subtle); }
.otp-cell.is-focus::after { content: ""; width: 2px; height: 28px; border-radius: 1px; background: var(--tint); animation: ds-caret 1s steps(1) infinite; }
.otp-cell.is-error { border-color: var(--danger); background: var(--danger-subtle); }
.otp-cell.is-success { border-color: var(--success); background: var(--success-subtle); }
.otp-cell.is-disabled { color: var(--label-tertiary); background: var(--fill-quaternary); }
.otp.is-shaking { animation: ds-shake 420ms var(--ease-standard); }

/* ---------- Segmented control ---------- */
.seg { position: relative; display: inline-flex; padding: 2px; gap: 2px; border-radius: 10px; background: var(--fill-tertiary); }
.seg-item {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding-inline: 14px; border: 0; border-radius: 8px; background: transparent;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--label-primary); cursor: pointer;
}
.seg-item::after { content: ""; position: absolute; inset: -6px 0; }
.seg-item.is-selected { background: var(--control-thumb); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.10), 0 0 0 0.5px rgba(0,0,0,0.04); }
.seg-item:focus-visible, .seg-item.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* ---------- Switch & checkbox ---------- */
.switch { position: relative; width: 51px; height: 31px; flex: none; border: 0; padding: 0; border-radius: var(--radius-full); background: var(--fill-primary); cursor: pointer; transition: background-color var(--duration-base) var(--ease-standard); }
.switch::after { content: ""; position: absolute; inset: -7px -2px; }
.switch-thumb { position: absolute; top: 2px; inset-inline-start: 2px; width: 27px; height: 27px; border-radius: var(--radius-full); background: var(--switch-thumb); box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.16); transition: inset-inline-start var(--duration-base) var(--ease-emphasized); }
.switch.is-on { background: var(--tint); }
.switch.is-on .switch-thumb { inset-inline-start: 22px; }
.switch.is-disabled { opacity: 0.4; }
.switch:focus-visible, .switch.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.check { position: relative; width: 22px; height: 22px; flex: none; display: grid; place-items: center; padding: 0; border-radius: var(--radius-xs); border: 1.5px solid var(--label-tertiary); background: transparent; color: var(--on-tint); cursor: pointer; }
.check::after { content: ""; position: absolute; inset: -11px; }
.check.is-on { background: var(--tint); border-color: var(--tint); }
.check.is-mixed { background: var(--tint); border-color: var(--tint); }
.check.is-disabled { opacity: 0.4; }
.check:focus-visible, .check.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Search ---------- */
.search { display: flex; align-items: center; gap: var(--space-2); }
.search-box { flex: 1; display: flex; align-items: center; gap: 6px; min-height: 40px; padding-inline: 10px 4px; border-radius: var(--radius-sm); background: var(--fill-tertiary); color: var(--label-secondary); border: 1.5px solid transparent; }
.search-box.is-focus { border-color: var(--tint); box-shadow: 0 0 0 4px var(--tint-subtle); }
.search-box .input { height: 38px; font-size: 17px; }

/* ---------- Menu / popover ---------- */
.menu { min-width: 240px; padding: 6px; border-radius: var(--radius-md); display: flex; flex-direction: column; }
.menu-title { padding: 6px 12px 4px; font-size: 13px; font-weight: 500; color: var(--label-secondary); }
.menu-item { display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding-inline: 10px 12px; border: 0; border-radius: 8px; background: transparent; font-family: var(--font-sans); font-size: 17px; color: var(--label-primary); text-align: start; cursor: pointer; width: 100%; }
.menu-item:hover, .menu-item.is-hover { background: var(--fill-tertiary); }
.menu-item.is-danger { color: var(--danger); }
.menu-item .menu-check { width: 20px; flex: none; color: var(--tint-text); }
.menu-item .menu-label { flex: 1; }
.menu-item .menu-meta { color: var(--label-secondary); font-size: 15px; }
.menu-sep { height: 0.5px; margin: 5px 10px; background: var(--separator); }

/* ---------- Sheet & dialog ---------- */
.sheet { display: flex; flex-direction: column; background: var(--bg-sheet); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 8px var(--space-4) var(--space-8); }
.grabber { width: 36px; height: 5px; border-radius: var(--radius-full); background: var(--fill-primary); margin: 0 auto var(--space-3); }
.dialog { display: flex; flex-direction: column; background: var(--bg-sheet); border-radius: var(--radius-xl); padding: var(--space-6); }
.backdrop { background: var(--scrim); }

/* ---------- Alert ---------- */
.alert { width: 300px; padding: var(--space-5) var(--space-4) var(--space-4); border-radius: var(--radius-lg); background: var(--bg-tertiary); display: flex; flex-direction: column; gap: var(--space-4); text-align: center; }
.alert-actions { display: flex; gap: var(--space-2); }
.alert-actions > * { flex: 1; }
.alert-actions.is-stacked { flex-direction: column; }

/* ---------- Toast / banner ---------- */
.toast { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-inline: 14px 18px; border-radius: var(--radius-full); background: var(--bg-tertiary); color: var(--label-primary); font-size: 15px; font-weight: 500; }
.toast .ico { color: var(--tint-text); }

/* ---------- Badge & tag ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding-inline: 8px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.badge:lang(ar) { line-height: 20px; }
.badge-new { background: var(--tint); color: var(--on-tint); }
.badge-watched { background: var(--success-subtle); color: var(--success); }
.badge-soon { background: var(--fill-tertiary); color: var(--label-secondary); }
.badge-active { background: var(--success-subtle); color: var(--success); }
.badge-paused { background: var(--warning-subtle); color: var(--warning); }
.badge-flagged { background: var(--danger-subtle); color: var(--danger); }
.badge-neutral { background: var(--fill-tertiary); color: var(--label-primary); }
.badge-media { background: var(--scrim-strong); color: var(--on-media); font-variant-numeric: tabular-nums; }
.badge-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }

/* ---------- Avatar ---------- */
.avatar { width: 36px; height: 36px; flex: none; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--tint-subtle); color: var(--tint-text); font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; direction: ltr; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; padding: 0; background: transparent; border-radius: var(--radius-full); cursor: pointer; }

/* ---------- Progress ---------- */
.bar { position: relative; height: 4px; border-radius: var(--radius-full); background: var(--fill-secondary); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--radius-full); background: var(--tint); }
.ring { display: block; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--fill-secondary); }
.ring-fill { fill: none; stroke: var(--tint); stroke-linecap: round; }
.skeleton { background: var(--fill-tertiary); border-radius: var(--radius-xs); animation: ds-pulse 1.8s var(--ease-standard) infinite; }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); max-width: 340px; margin-inline: auto; }
.empty-glyph { width: 64px; height: 64px; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--fill-quaternary); color: var(--label-secondary); margin-block-end: var(--space-2); }

/* ---------- Tooltip ---------- */
.tooltip { max-width: 300px; padding: 6px 10px; border-radius: 8px; background: var(--tooltip-bg); color: var(--tooltip-label); font-size: 13px; line-height: 18px; }
.tooltip:lang(ar) { line-height: 22px; }

/* ---------- Navigation bar ---------- */
.navbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding-inline: var(--margin-compact); }
.navbar.is-scrolled { box-shadow: inset 0 -0.5px 0 var(--separator); }
.navbar-inline-title { position: absolute; inset-inline: 0; text-align: center; font-size: 17px; font-weight: 600; pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--label-primary); text-decoration: none; min-height: 44px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; border: 1.5px dashed var(--label-tertiary); display: grid; place-items: center; color: var(--label-secondary); }
.brand-word { font-size: 15px; font-weight: 600; color: var(--label-secondary); }

/* ---------- Inset grouped list ---------- */
.group-label { padding-inline: var(--space-4); padding-block-end: 6px; font-size: 13px; color: var(--label-secondary); }
.group { background: var(--bg-grouped-secondary); border-radius: var(--radius-lg); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: 10px var(--space-4); color: var(--label-primary); text-decoration: none; }
.row + .row::before { content: ""; position: absolute; top: 0; inset-inline-start: var(--row-inset, 16px); inset-inline-end: 0; height: 0.5px; background: var(--separator); }
.row-icon { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--tint-subtle); color: var(--tint-text); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-accessory { flex: none; color: var(--label-tertiary); display: flex; align-items: center; gap: 6px; }
.row.is-hover { background: var(--fill-quaternary); }

/* ---------- Library: thumbnails & cards ---------- */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--thumb-1); color: var(--on-media); isolation: isolate; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--thumb-hairline); pointer-events: none; }
.thumb.tone-2 { background: var(--thumb-2); } .thumb.tone-3 { background: var(--thumb-3); }
.thumb.tone-4 { background: var(--thumb-4); } .thumb.tone-5 { background: var(--thumb-5); }
.thumb-ring { position: absolute; width: 70%; aspect-ratio: 1; border-radius: var(--radius-full); inset-inline-start: -18%; bottom: -62%; box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 0 28px rgba(255,255,255,0.03), 0 0 0 29px rgba(255,255,255,0.08); }
.thumb-kicker { position: absolute; top: 12px; inset-inline-start: 14px; max-width: 55%; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--on-media-secondary); }
.thumb-kicker:lang(ar) { line-height: 20px; }
.thumb-num { position: absolute; inset-inline-end: 14px; bottom: 4px; font-family: "Inter", sans-serif; font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--on-media); opacity: 0.92; font-variant-numeric: tabular-nums; direction: ltr; }
.thumb-badge { position: absolute; top: 8px; inset-inline-end: 8px; }
.thumb-dur { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.thumb-progress { position: absolute; inset-inline: 10px; bottom: 10px; height: 4px; border-radius: var(--radius-full); background: var(--media-track); overflow: hidden; }
.thumb-progress-fill { height: 100%; background: var(--on-media); border-radius: var(--radius-full); }
.thumb-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: var(--radius-full); display: grid; place-items: center; }
.thumb.is-dim > *:not(.thumb-badge) { opacity: 0.5; }
.thumb.is-soon { filter: saturate(0.2); }

.lcard { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; border-radius: var(--radius-md); transition: transform var(--duration-press) var(--ease-standard); }
.lcard:active, .lcard.is-pressed { transform: scale(var(--press-scale)); }
.lcard:focus-visible, .lcard.is-focus { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
.lcard-body { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; }
.lcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.shelf { display: grid; grid-auto-flow: column; gap: var(--space-4); overflow: hidden; scroll-snap-type: x mandatory; }
.shelf > * { scroll-snap-align: start; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.shelf-fade { position: absolute; inset-block: 0; inset-inline-end: 0; width: 48px; pointer-events: none; background: linear-gradient(to var(--fade-dir, left), var(--bg-primary), transparent); }
[dir="rtl"] .shelf-fade { --fade-dir: right; }
[dir="ltr"] .shelf-fade { --fade-dir: left; }

.chapter-head { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; }
.chapter-head .chev { transition: transform var(--duration-base) var(--ease-standard); }
.chapter-head.is-collapsed .chev { transform: rotate(90deg); }
[dir="rtl"] .chapter-head.is-collapsed .chev { transform: rotate(-90deg); }

.lrow { position: relative; display: flex; align-items: center; gap: var(--space-3); padding: 10px; border-radius: var(--radius-md); color: inherit; text-decoration: none; }
.lrow:hover, .lrow.is-hover { background: var(--fill-quaternary); }
.lrow.is-now { background: var(--tint-subtle); }
.lrow-thumb { width: 112px; flex: none; border-radius: var(--radius-xs); }
.lrow-thumb .thumb-num { font-size: 28px; inset-inline-end: 8px; bottom: 2px; }
.lrow-thumb .thumb-kicker, .lrow-thumb .thumb-ring { display: none; }
.lrow-thumb .thumb-progress { inset-inline: 6px; bottom: 6px; height: 3px; }
.lrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; color: var(--tint-text); }
.eq i { display: block; width: 3px; border-radius: 1px; background: currentColor; }

/* ---------- Player ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: var(--player-bg); border-radius: var(--radius-lg); overflow: hidden; color: var(--on-media); isolation: isolate; font-family: var(--font-sans); }
.player.is-full { border-radius: 0; }
.frame { position: absolute; inset: 0; }
.p-top { position: absolute; inset-inline: 0; top: 0; display: flex; align-items: center; gap: var(--space-2); padding: 12px 16px 40px; background: var(--scrim-top); }
.p-title { font-size: 15px; font-weight: 600; line-height: 20px; color: var(--on-media); }
.p-title:lang(ar) { line-height: 26px; }
.p-bar { position: absolute; inset-inline: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 6px; border-radius: var(--radius-lg); }
.p-row { display: flex; align-items: center; gap: 2px; }
.p-spacer { flex: 1; }
.pbtn { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; padding: 0; border-radius: var(--radius-full); background: transparent; color: var(--on-media); cursor: pointer; font-family: var(--font-sans); }
.pbtn:hover, .pbtn.is-hover { background: var(--media-fill-hover); }
.pbtn:focus-visible, .pbtn.is-focus { outline: 2px solid var(--on-media); outline-offset: 0; }
.pbtn-text { width: auto; min-width: 44px; padding-inline: 10px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pbtn-lg { width: 52px; height: 52px; }
.tc { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--on-media); direction: ltr; unicode-bidi: isolate; min-width: 48px; text-align: center; }
.scrub { position: relative; flex: 1; height: 44px; display: flex; align-items: center; cursor: pointer; }
.scrub-track { position: relative; width: 100%; height: 4px; border-radius: var(--radius-full); background: var(--media-track); transition: height var(--duration-fast) var(--ease-standard); }
.scrub.is-active .scrub-track { height: 8px; }
.scrub-buffer, .scrub-played { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--radius-full); }
.scrub-buffer { background: var(--media-buffer); }
.scrub-played { background: var(--on-media); }
.scrub-thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; margin-inline-start: -8px; border-radius: var(--radius-full); background: var(--on-media); box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.scrub-bubble { position: absolute; bottom: 34px; width: 64px; margin-inline-start: -32px; padding: 4px 0; border-radius: 8px; text-align: center; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; }
.center-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: var(--radius-full); display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; }
.hud { position: absolute; top: 18%; inset-inline: 0; margin-inline: auto; width: max-content; display: flex; align-items: center; gap: var(--space-2); padding: 10px 18px; border-radius: var(--radius-full); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; animation: ds-hud-pop var(--duration-base) var(--ease-emphasized); }
.p-pill { position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: var(--radius-full); font-size: 14px; font-weight: 500; }
.p-block { position: absolute; inset: 0; display: grid; place-items: center; background: var(--scrim-strong); padding: var(--space-4); }
.p-card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-8) var(--space-6) var(--space-6); border-radius: var(--radius-xl); background: var(--player-surface); text-align: center; color: var(--on-media); }
.p-card-glyph { width: 56px; height: 56px; border-radius: var(--radius-full); display: grid; place-items: center; background: rgba(255,255,255,0.10); color: var(--on-media); margin-block-end: var(--space-1); }
.p-card .c-media2 { color: var(--on-media-secondary); }
.upnext { position: absolute; inset-inline-end: 24px; bottom: 96px; width: 340px; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--player-surface); box-shadow: 0 20px 48px rgba(0,0,0,0.5); }

/* ---------- Watermark ---------- */
.wm { position: absolute; z-index: 20; pointer-events: none; user-select: none; -webkit-user-select: none; white-space: nowrap; direction: ltr; unicode-bidi: isolate; font-family: "Inter", sans-serif; font-size: 14px; font-weight: 500; color: var(--watermark); text-shadow: 0 0 1px var(--watermark-outline), 0 1px 2px var(--watermark-outline); }
.wm-pattern { position: absolute; z-index: 19; inset: -40%; pointer-events: none; user-select: none; transform: rotate(-24deg); display: flex; flex-wrap: wrap; align-content: center; gap: 36px 56px; direction: ltr; font-family: "Inter", sans-serif; font-size: 13px; font-weight: 500; color: var(--watermark-pattern); }
.wm.is-drifting { animation: ds-wm 30s linear infinite; }

/* ---------- Motion ---------- */
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-shake { 0%, 100% { translate: 0; } 20% { translate: -8px; } 40% { translate: 7px; } 60% { translate: -5px; } 80% { translate: 3px; } }
@keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes ds-caret { 50% { opacity: 0; } }
@keyframes ds-hud-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes ds-wm {
  0%   { left: 6%;  top: 10%; opacity: 0; }   3% { opacity: 1; }  30% { left: 9%;  top: 12%; opacity: 1; }  33% { opacity: 0; left: 9%; top: 12%; }
  34%  { left: 64%; top: 16%; opacity: 0; }  37% { opacity: 1; }  63% { left: 61%; top: 18%; opacity: 1; }  66% { opacity: 0; left: 61%; top: 18%; }
  67%  { left: 8%;  top: 70%; opacity: 0; }  70% { opacity: 1; }  97% { left: 11%; top: 68%; opacity: 1; } 100% { opacity: 0; left: 11%; top: 68%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .btn.is-pressed, .lcard:active, .lcard.is-pressed { transform: none; }
  .otp.is-shaking { animation: none; }
  .skeleton { animation: none; }
  .hud { animation: none; }
  .wm.is-drifting { animation-timing-function: steps(1, end); }
  .switch-thumb, .scrub-track { transition: none; }
}
