/* ============================================================
   Inkshelf — "Liquid Glass" theme
   Active when <html data-style="glass">; schemes via data-scheme="light|dark|amoled".
   Everything here is scoped under html[data-style="glass"].

   Layers, back to front:
     1. ambient colour field (fixed, body::before) — gives the glass something to refract
     2. page content (covers stay crisp: never blurred or tinted)
     3. frosted bars / docks / sheets (the only backdrop-filter users)

   Blur: sticky headers, floating docks, sheets, toast/busy, cards and the content panes
   (one blur per list, never per row). Chips, rows, tiles and grid items are translucent fills.
   Chromium also gets real edge refraction (js/liquid-glass.js, section 12).

   Reader (body.reading) keeps its own dark glass; shared components are scoped with
   body:not(.reading) so nothing light leaks into it.
   ============================================================ */

/* ---------- tokens: light (default) ---------- */
html[data-style="glass"] {
  --bg: #f4f0ea;
  --surface: #ffffff;
  --surface-2: #ebe6de;
  --text: #1b1917;
  --text-2: #4a4540;
  --muted: #6f6860;
  --border: #e3ddd3;
  --accent: #d6360f;
  --accent-light: #c42d0e;
  --accent-soft: rgba(214, 54, 15, .12);
  --accent-contrast: #ffffff;
  --pink: #e0568a;

  --glass-bg: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 252, 248, .84);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-edge: rgba(90, 60, 40, .08);
  --glass-shadow: 0 2px 6px rgba(60, 35, 20, .06), 0 14px 36px rgba(60, 35, 20, .13);
  --blur: blur(24px) saturate(180%);

  /* tabs.css liquid card */
  --liquid-hi: rgba(255, 255, 255, .9);
  --liquid-sheen: rgba(255, 255, 255, .5);
  --liquid-tint: rgba(255, 255, 255, .4);
  --blob-a: rgba(255, 122, 92, .36);
  --blob-b: rgba(224, 86, 138, .24);

  /* theme-private */
  --lg-fill: rgba(255, 255, 255, .56);            /* un-blurred translucent surface */
  --lg-fill-press: rgba(255, 255, 255, .86);
  --lg-solid: #fffdfa;                            /* opaque stand-in where translucency is impossible */
  --lg-hi: rgba(255, 255, 255, .95);              /* specular top edge */
  --lg-rim: rgba(255, 255, 255, .75);
  --lg-rim-grad: linear-gradient(140deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, .35) 34%, rgba(255, 255, 255, .1) 62%, rgba(255, 122, 92, .42) 100%);
  --lg-sheen: linear-gradient(180deg, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 58%);
  --lg-hairline: rgba(90, 60, 40, .09);
  --lg-shadow-sm: 0 1px 2px rgba(60, 35, 20, .05), 0 5px 14px rgba(60, 35, 20, .07);
  --lg-shadow: 0 2px 6px rgba(60, 35, 20, .06), 0 14px 36px rgba(60, 35, 20, .14);
  --lg-tint: rgba(214, 54, 15, .16);             /* selected = tinted glass */
  --lg-tint-text: #a82408;
  --lg-tint-border: rgba(214, 54, 15, .42);
  --lg-tint-glow: 0 4px 14px rgba(214, 54, 15, .16);
  --lg-accent-grad: linear-gradient(135deg, #e8491f 0%, #c9205a 100%);
  --lg-accent-shadow: 0 2px 6px rgba(201, 48, 20, .22), 0 10px 24px rgba(201, 48, 20, .30);
  --lg-backdrop: linear-gradient(180deg, rgba(30, 16, 10, .14), rgba(20, 10, 6, .36));
  --lg-ambient:
    radial-gradient(62% 44% at 8% 0%, rgba(255, 122, 92, .34), transparent 72%),
    radial-gradient(56% 40% at 100% 14%, rgba(240, 110, 160, .24), transparent 72%),
    radial-gradient(60% 44% at 0% 72%, rgba(110, 190, 255, .22), transparent 72%),
    radial-gradient(70% 48% at 92% 100%, rgba(120, 130, 255, .26), transparent 72%);
  --lg-dock-gap: 10px;
  --lg-ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: light;
  background: var(--bg);
}

/* ---------- tokens: dark ---------- */
html[data-style="glass"][data-scheme="dark"],
html[data-style="glass"][data-scheme="amoled"] {
  --bg: #0f0e0d;
  --surface: #181614;
  --surface-2: #25221f;
  --text: #f2eee8;
  --text-2: #c9c3ba;
  --muted: #968f86;
  --border: #2b2724;
  --accent: #e0401a;
  --accent-light: #ff7a5c;
  --accent-soft: rgba(240, 80, 42, .18);

  --glass-bg: rgba(24, 22, 20, .58);
  --glass-strong: rgba(28, 26, 24, .78);
  --glass-border: rgba(255, 255, 255, .1);
  --glass-edge: rgba(255, 255, 255, .06);
  --glass-shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);

  --liquid-hi: rgba(255, 255, 255, .18);
  --liquid-sheen: rgba(255, 255, 255, .07);
  --liquid-tint: rgba(44, 40, 36, .46);
  --blob-a: rgba(240, 80, 42, .36);
  --blob-b: rgba(224, 86, 138, .22);

  --lg-fill: rgba(255, 255, 255, .06);
  --lg-fill-press: rgba(255, 255, 255, .12);
  --lg-solid: #1a1816;
  --lg-hi: rgba(255, 255, 255, .16);
  --lg-rim: rgba(255, 255, 255, .09);
  --lg-rim-grad: linear-gradient(140deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 34%, rgba(255, 255, 255, .03) 62%, rgba(255, 150, 120, .42) 100%);
  --lg-sheen: linear-gradient(180deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 58%);
  --lg-hairline: rgba(255, 255, 255, .075);
  --lg-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .28);
  --lg-shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .5);
  --lg-tint: rgba(240, 80, 42, .24);
  --lg-tint-text: #ffc2b0;
  --lg-tint-border: rgba(255, 150, 120, .6);
  --lg-tint-glow: 0 0 18px rgba(240, 80, 42, .26);
  --lg-accent-grad: linear-gradient(135deg, #ec4b22 0%, #c9205a 100%);
  --lg-accent-shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 26px rgba(220, 60, 30, .38);
  --lg-backdrop: linear-gradient(180deg, rgba(6, 4, 2, .4), rgba(6, 4, 2, .66));
  --lg-ambient:
    radial-gradient(62% 44% at 8% 0%, rgba(235, 80, 40, .34), transparent 72%),
    radial-gradient(56% 40% at 100% 14%, rgba(224, 86, 138, .18), transparent 72%),
    radial-gradient(60% 44% at 0% 72%, rgba(60, 130, 240, .16), transparent 72%),
    radial-gradient(70% 48% at 92% 100%, rgba(100, 90, 250, .24), transparent 72%);

  color-scheme: dark;
}

/* ---------- tokens: amoled (true black, glow kept to the corners) ---------- */
html[data-style="glass"][data-scheme="amoled"] {
  --bg: #000000;
  --surface: #0b0b0f;
  --surface-2: #18181e;
  --border: #1f1f27;

  --glass-bg: rgba(9, 8, 8, .62);
  --glass-strong: rgba(13, 12, 11, .84);
  --glass-border: rgba(255, 255, 255, .09);
  --glass-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .7);

  --liquid-tint: rgba(22, 20, 30, .5);
  --blob-a: rgba(240, 80, 42, .3);
  --blob-b: rgba(224, 86, 138, .18);

  --lg-fill: rgba(255, 255, 255, .055);
  --lg-fill-press: rgba(255, 255, 255, .11);
  --lg-solid: #0c0c10;
  --lg-hi: rgba(255, 255, 255, .13);
  --lg-rim: rgba(255, 255, 255, .08);
  --lg-backdrop: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .74));
  --lg-ambient:
    radial-gradient(46% 26% at 0% 0%, rgba(235, 80, 40, .26), transparent 74%),
    radial-gradient(40% 22% at 100% 100%, rgba(100, 90, 250, .2), transparent 74%),
    radial-gradient(30% 16% at 100% 6%, rgba(224, 86, 138, .1), transparent 74%);
}

/* ---------- no backdrop-filter: make the frosted surfaces nearly opaque ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-style="glass"] {
    --glass-bg: rgba(250, 248, 255, .95);
    --glass-strong: rgba(252, 251, 255, .985);
    --liquid-tint: rgba(255, 255, 255, .82);
  }
  html[data-style="glass"][data-scheme="dark"] {
    --glass-bg: rgba(24, 22, 20, .95);
    --glass-strong: rgba(28, 26, 24, .985);
    --liquid-tint: rgba(40, 37, 34, .9);
  }
  html[data-style="glass"][data-scheme="amoled"] {
    --glass-bg: rgba(9, 8, 8, .96);
    --glass-strong: rgba(13, 12, 11, .99);
    --liquid-tint: rgba(20, 18, 28, .94);
  }
  html[data-style="glass"] body.reading {
    --reader-glass: rgba(16, 16, 20, .93);
    --reader-glass-strong: rgba(18, 18, 22, .97);
  }
  html[data-style="glass"] body:not(.reading) .toast { background: rgba(30, 28, 26, .96); }
  html[data-style="glass"] body.reading .reader-pill { background: rgba(10, 10, 13, .9); }
  html[data-style="glass"] body.reading .reader-pull { background: rgba(28, 28, 34, .95); }
}

/* ============================================================
   1. Ambient field
   ============================================================ */
html[data-style="glass"] body:not(.reading) { background: transparent; }
html[data-style="glass"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--lg-ambient);
}
html[data-style="glass"] body.reading::before { display: none; }

/* ============================================================
   2. Sticky headers / top tabs
   ============================================================ */
html[data-style="glass"] body:not(.reading) :is(.app-header, .discover-top, .search-top).glass {
  border-bottom: 1px solid var(--lg-hairline);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -1px 0 var(--lg-rim), 0 10px 28px -14px rgba(60, 35, 20, .28);
  background-image: var(--lg-sheen);
}
html[data-style="glass"] body:not(.reading) .top-tab { transition: color .18s, font-size .18s var(--lg-ease); }
html[data-style="glass"] body:not(.reading) .icon-btn { transition: background-color .18s, transform .18s var(--lg-ease); }
html[data-style="glass"] body:not(.reading) .icon-btn:active {
  background: var(--lg-fill-press); box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm); transform: scale(.94);
}
html[data-style="glass"] body:not(.reading) .search-field {
  background: var(--lg-fill); border: 1px solid var(--lg-rim);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -8px 14px -12px rgba(60, 35, 20, .18);
}

/* underline tabs */
html[data-style="glass"] body:not(.reading) .u-tabs { border-bottom-color: var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .u-tab { transition: color .18s; }
html[data-style="glass"] body:not(.reading) .u-tab.is-active::after {
  background: var(--lg-accent-grad); box-shadow: 0 2px 10px rgba(214, 54, 15, .45);
}

/* ============================================================
   3. Tab bar — floating glass dock
   ============================================================ */
html[data-style="glass"] .tabbar.glass {
  left: 12px; right: 12px; bottom: calc(var(--lg-dock-gap) + var(--safe-b));
  max-width: 520px; margin: 0 auto;
  height: var(--tabbar-h); padding: 0 6px;
  border: 0; border-radius: 30px;
  background-image: var(--lg-sheen);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--glass-shadow);
}
/* gradient rim (shared by the floating surfaces) */
html[data-style="glass"] :is(.tabbar.glass, .dp-bar.glass, .liquid-card, .busy-box)::after,
html[data-style="glass"] body:not(.reading) :is(.filter-box, .settings-card)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--lg-rim-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
html[data-style="glass"] .tab-item { position: relative; z-index: 0; transition: color .2s; }
html[data-style="glass"] .tab-item::before {
  content: ""; position: absolute; z-index: -1; inset: 6px 3px; border-radius: 22px;
  background: var(--lg-sheen), var(--lg-tint);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim);
  opacity: 0; transform: scale(.9);
  transition: opacity .2s, transform .22s var(--lg-ease);
}
html[data-style="glass"] .tab-item.is-active::before { opacity: 1; transform: none; }
html[data-style="glass"] .tab-item .icon { transition: transform .2s var(--lg-ease); }
html[data-style="glass"] .tab-item:active .icon { transform: scale(.9); }
html[data-style="glass"] .tab-item.is-active { color: var(--accent); }
html[data-style="glass"][data-scheme="dark"] .tab-item.is-active,
html[data-style="glass"][data-scheme="amoled"] .tab-item.is-active { color: var(--accent-light); }
html[data-style="glass"] body:not(.reading) .page:not(.no-tabbar) {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--lg-dock-gap) + 28px);
}

/* ============================================================
   4. Buttons
   ============================================================ */
html[data-style="glass"] body:not(.reading) .btn {
  border-radius: 14px;
  background: var(--lg-sheen), var(--lg-fill);
  border: 1px solid var(--lg-rim);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm);
  transition: transform .18s var(--lg-ease), box-shadow .18s, filter .18s, background-color .18s;
}
html[data-style="glass"] body:not(.reading) .btn:active { transform: scale(.975); }
html[data-style="glass"] body:not(.reading) .btn-sm { border-radius: 11px; }
html[data-style="glass"] body:not(.reading) .sheet-footer .btn { border-radius: 17px; }

/* primary: glossy accent with a specular cap */
html[data-style="glass"] .btn-primary,
html[data-style="glass"] body:not(.reading) .btn.btn-primary {
  color: #fff; border: 0; border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 46%, rgba(255, 255, 255, 0) 52%),
    var(--lg-accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(40, 14, 0, .22), var(--lg-accent-shadow);
  text-shadow: 0 1px 1px rgba(60, 20, 0, .25);
  transition: transform .18s var(--lg-ease), box-shadow .18s, filter .18s;
}
html[data-style="glass"] .btn-primary:active { transform: scale(.975); filter: brightness(.95); }
html[data-style="glass"] body:not(.reading) .sheet-footer .btn.btn-primary { border-radius: 17px; }

/* outline: clear glass with an accent rim */
html[data-style="glass"] body:not(.reading) .btn.btn-outline,
html[data-style="glass"] body:not(.reading) .pill-outline {
  color: var(--accent-light);
  background: var(--lg-sheen), var(--lg-fill);
  border: 1px solid var(--lg-tint-border);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm);
}
html[data-style="glass"] body:not(.reading) .pill-outline { transition: transform .18s var(--lg-ease), background-color .18s; }
html[data-style="glass"] body:not(.reading) .pill-outline:active { transform: scale(.96); background: var(--lg-sheen), var(--lg-tint); }
html[data-style="glass"] body:not(.reading) .btn.btn-danger { color: #e03131; }
html[data-style="glass"][data-scheme="dark"] body:not(.reading) .btn.btn-danger,
html[data-style="glass"][data-scheme="amoled"] body:not(.reading) .btn.btn-danger { color: #ff6b6b; }

/* inputs */
html[data-style="glass"] body:not(.reading) .input {
  background: var(--lg-fill); border: 1px solid var(--lg-hairline); border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(60, 35, 20, .08), 0 1px 0 var(--lg-rim);
  transition: border-color .18s, box-shadow .18s;
}
html[data-style="glass"] body:not(.reading) .input:focus {
  border-color: var(--lg-tint-border);
  box-shadow: inset 0 1px 2px rgba(60, 35, 20, .06), 0 0 0 3px var(--accent-soft);
}

/* ============================================================
   5. Chips / tags
   ============================================================ */
html[data-style="glass"] body:not(.reading) .chip {
  border-radius: 12px;
  background: var(--lg-fill); color: var(--text-2);
  border: 1px solid var(--lg-rim);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 1px 2px rgba(60, 35, 20, .05);
  transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s var(--lg-ease);
}
html[data-style="glass"] body:not(.reading) .chip.pill { border-radius: 999px; }
html[data-style="glass"] body:not(.reading) .chip:active { transform: scale(.96); }
html[data-style="glass"] body:not(.reading) .chip.is-active {
  background: var(--lg-sheen), var(--lg-tint);
  color: var(--lg-tint-text); font-weight: 500;
  border-color: var(--lg-tint-border);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-tint-glow);
}
html[data-style="glass"] body:not(.reading) .tag {
  border-radius: 999px; color: var(--text-2);
  background: var(--lg-fill); border: 1px solid var(--lg-rim);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 1px 2px rgba(60, 35, 20, .05);
}

/* ============================================================
   6. Bottom sheets + backdrop
   ============================================================ */
html[data-style="glass"] body:not(.reading) .sheet-backdrop { background: var(--lg-backdrop); }
html[data-style="glass"] body:not(.reading) .sheet {
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--lg-rim);
  background-image: linear-gradient(180deg, var(--liquid-sheen), transparent 96px);
  box-shadow: inset 0 1px 0 var(--lg-hi), 0 -4px 12px rgba(30, 14, 8, .08), 0 -18px 50px rgba(30, 14, 8, .22);
}
html[data-style="glass"] body:not(.reading) .sheet-grabber {
  width: 40px; background: rgba(127, 120, 150, .38); box-shadow: inset 0 1px 0 rgba(0, 0, 0, .08), 0 1px 0 var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) .sheet-title { font-weight: 600; }
html[data-style="glass"] body:not(.reading) .sheet-list-item { border-bottom-color: var(--lg-hairline); border-radius: 12px; transition: background-color .15s; }
html[data-style="glass"] body:not(.reading) .sheet-list-item:active { background: var(--lg-fill-press); }
html[data-style="glass"] body:not(.reading) .quick-head { border-bottom-color: var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .dp-dl-stats > div {
  background: var(--lg-fill); box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) :is(.dp-dl-icon, .offline-help-icon, .settings-icon) {
  background: var(--lg-sheen), var(--lg-tint);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim);
}

/* ============================================================
   7. Discover
   ============================================================ */
html[data-style="glass"] body:not(.reading) .section-title::before { box-shadow: 0 0 10px rgba(214, 54, 15, .45); }

/* cards: covers stay untouched apart from the frame */
html[data-style="glass"] body:not(.reading) .cover {
  border-radius: 10px; background: var(--lg-fill);
  box-shadow: 0 0 0 1px var(--lg-hairline), 0 2px 4px rgba(50, 30, 18, .08), 0 10px 22px rgba(50, 30, 18, .14);
  transition: transform .2s var(--lg-ease), box-shadow .2s;
}
html[data-style="glass"][data-scheme="dark"] body:not(.reading) .cover,
html[data-style="glass"][data-scheme="amoled"] body:not(.reading) .cover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 2px 4px rgba(0, 0, 0, .4), 0 10px 22px rgba(0, 0, 0, .45);
}
html[data-style="glass"] body:not(.reading) .card-title { transition: color .18s; }
html[data-style="glass"] body:not(.reading) .card:active .card-title,
html[data-style="glass"] body:not(.reading) .card.is-pressing .card-title { color: var(--accent-light); }
@media (hover: hover) {
  html[data-style="glass"] body:not(.reading) .card:hover .cover { transform: translateY(-3px); }
  html[data-style="glass"] body:not(.reading) .card:hover .card-title { color: var(--accent-light); }
}

/* filter boxes */
html[data-style="glass"] body:not(.reading) .filter-box {
  position: relative; border-radius: 18px;
  background: var(--lg-sheen), var(--lg-fill);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm);
  transition: transform .18s var(--lg-ease), background-color .18s;
}
html[data-style="glass"] body:not(.reading) .filter-box:active { transform: scale(.97); background: var(--lg-sheen), var(--lg-fill-press); }
html[data-style="glass"][data-scheme="dark"] body:not(.reading) .filter-box-value,
html[data-style="glass"][data-scheme="amoled"] body:not(.reading) .filter-box-value { color: var(--accent-light); }

/* ============================================================
   8. Lists, settings, profile / summary cards
   ============================================================ */
html[data-style="glass"] body:not(.reading) .list-row { border-bottom-color: var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .settings-card {
  position: relative; border: 0; border-radius: 20px;
  background: var(--lg-fill);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm);
}
html[data-style="glass"] body:not(.reading) .account-page .settings-row { transition: background-color .15s; }
html[data-style="glass"] body:not(.reading) .account-page .settings-row:active { background: var(--lg-fill-press); }

html[data-style="glass"] .liquid-card { border: 0; border-radius: 26px; }
html[data-style="glass"] body:not(.reading) :is(.summary-stat, .stat-tile) { border-color: var(--lg-rim); border-radius: 16px; }
html[data-style="glass"] body:not(.reading) .avatar { border-color: var(--lg-rim); }

/* empty state: glass orb */
html[data-style="glass"] body:not(.reading) .empty-state:not(.downloads-empty) .empty-illus {
  background: radial-gradient(circle at 35% 22%, var(--liquid-sheen), transparent 55%), var(--lg-fill);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), inset 0 -14px 24px -14px var(--lg-tint), var(--lg-shadow);
}

/* ============================================================
   9. Series detail
   ============================================================ */
html[data-style="glass"] body:not(.reading) .detail-page { background: transparent; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-hero-cover {
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 4px 10px rgba(0, 0, 0, .25), 0 18px 42px rgba(0, 0, 0, .42);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-author {
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(255, 255, 255, .2), 0 6px 18px rgba(0, 0, 0, .16);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-hero .icon-btn:active,
html[data-style="glass"] body:not(.reading) .detail-page .dp-mini .icon-btn:active {
  background: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-mini.app-header {
  border-bottom: 0; background-image: none;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(255, 255, 255, .12), 0 10px 30px rgba(20, 10, 6, .26);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-tabs {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 10px 24px -16px rgba(60, 35, 20, .3);
}

html[data-style="glass"] body:not(.reading) .detail-page .dp-desc-toggle {
  background: var(--lg-fill); border: 1px solid var(--lg-rim); box-shadow: inset 0 1px 0 var(--lg-hi), var(--lg-shadow-sm);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-desc-toggle[aria-expanded="true"] { background: var(--lg-sheen), var(--lg-tint); color: var(--accent-light); }
html[data-style="glass"] body:not(.reading) .detail-page .dp-stats { gap: 12px; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-stat {
  padding: 12px 0; border-radius: 18px;
  background: var(--lg-sheen), var(--lg-fill);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--lg-shadow-sm);
  transition: transform .18s var(--lg-ease);
}
html[data-style="glass"] body:not(.reading) .detail-page button.dp-stat:active { transform: scale(.97); background: var(--lg-sheen), var(--lg-fill-press); }
html[data-style="glass"] body:not(.reading) .detail-page .dp-divider { background: var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .detail-page :is(.dp-info-row, .dp-ch) { border-bottom-color: var(--lg-hairline); }

/* bottom action bar → floating dock (≥760px detail.css already floats it) */
html[data-style="glass"] body:not(.reading) .detail-page .dp-bar.glass {
  border: 0; overflow: hidden;
  background-image: var(--lg-sheen);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--glass-shadow);
}
@media (max-width: 759.98px) {
  html[data-style="glass"] body:not(.reading) .detail-page .dp-bar.glass {
    left: 12px; right: 12px; bottom: calc(var(--lg-dock-gap) + var(--safe-b));
    padding-bottom: 0; border-radius: 26px;
  }
  html[data-style="glass"] body:not(.reading) .detail-page:not(.detail-missing) {
    padding-bottom: calc(var(--dp-bar-h) + var(--safe-b) + var(--lg-dock-gap) + 30px);
  }
}
@media (min-width: 760px) {
  html[data-style="glass"] body:not(.reading) .detail-page .dp-bar.glass { border-radius: 26px; }
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-read {
  margin: 7px 7px 7px 0; border-radius: 19px; color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 46%, rgba(255, 255, 255, 0) 52%),
    var(--lg-accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(40, 14, 0, .22), 0 6px 16px rgba(201, 48, 20, .3);
  text-shadow: 0 1px 1px rgba(60, 20, 0, .25);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-read.is-disabled {
  background: var(--lg-fill); color: var(--muted); text-shadow: none;
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-fav { transition: flex-basis .28s var(--lg-ease), opacity .15s; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-fav:active { opacity: .7; }

/* ============================================================
   10. Toast / busy
   ============================================================ */
html[data-style="glass"] body:not(.reading) .toast {
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--lg-dock-gap) + 18px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%), rgba(30, 27, 24, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 10px rgba(0, 0, 0, .18), 0 14px 34px rgba(20, 8, 50, .32);
}
html[data-style="glass"] .toast {
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 30px rgba(0, 0, 0, .4);
}
html[data-style="glass"] .busy { background: var(--lg-backdrop); }
html[data-style="glass"] .busy-box {
  position: relative; padding: 18px 24px; border-radius: 22px;
  background-image: var(--lg-sheen);
  box-shadow: inset 0 1px 0 var(--lg-hi), var(--glass-shadow);
}
html[data-style="glass"] .spinner { border-color: var(--lg-tint); border-top-color: var(--accent); }

/* ============================================================
   11. Reader — stays dark glass in every scheme
   ============================================================ */
html[data-style="glass"] body.reading { --reader-edge: rgba(255, 255, 255, .13); --reader-highlight: rgba(255, 255, 255, .2); }
html[data-style="glass"] body.reading .reader-glass {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 55%),
    var(--reader-glass);
  box-shadow: inset 0 1px 0 var(--reader-highlight), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 4px 10px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .5);
}
html[data-style="glass"] body.reading :is(.reader-top, .reader-bottom) { border-radius: 26px; }
html[data-style="glass"] body.reading :is(.reader-top, .reader-bottom) .icon-btn { transition: background-color .18s, transform .18s cubic-bezier(.2, .8, .2, 1); }
html[data-style="glass"] body.reading :is(.reader-top, .reader-bottom) .icon-btn:active:not(:disabled) {
  background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); transform: scale(.94);
}
html[data-style="glass"] body.reading .reader-pill {
  border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 14px rgba(0, 0, 0, .4);
}
html[data-style="glass"] body.reading .reader-pull { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 22px rgba(0, 0, 0, .4); }
html[data-style="glass"] body.reading .reader-end-card { border-radius: 28px; }
html[data-style="glass"] body.reading .reader-btn-ghost {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 60%), rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
html[data-style="glass"] body.reading .sheet.reader-sheet {
  border-radius: 28px 28px 0 0;
  border-top-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 -14px 48px rgba(0, 0, 0, .6);
}
html[data-style="glass"] body.reading .sheet-backdrop { background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .6)); }
html[data-style="glass"] body.reading .reader-sheet .chip {
  border-radius: 12px; border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
html[data-style="glass"] body.reading .reader-sheet .chip.pill { border-radius: 999px; }
html[data-style="glass"] body.reading .reader-sheet .chip.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%), rgba(240, 80, 42, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 18px rgba(240, 80, 42, .28);
}

/* ============================================================
   12. Every surface is glass
   Content panels (lists, info, chapters, search, sheet lists) are frosted glass panes with a
   specular top edge and the gradient rim; small bits (badges, pills, segmented tabs) are
   clear glass. Covers stay crisp — they only get a thin glass frame.
   ============================================================ */
html[data-style="glass"] {
  --lg-pane: var(--lg-sheen), var(--lg-fill);
  --lg-pane-blur: blur(18px) saturate(170%);
  --lg-pane-shadow: inset 0 1px 0 var(--lg-hi), inset 0 -1px 0 var(--lg-hairline), var(--lg-shadow-sm);
}

/* --- the pane --- */
html[data-style="glass"] body:not(.reading) :is(
  .latest-list, .downloads-page .list, .recent-page .list, .search-block,
  .detail-page .dp-desc-wrap, .detail-page .dp-info, .detail-page .dp-ch-list,
  .sheet .sheet-list, .grid-empty, .mb-error
) {
  position: relative; border-radius: 22px; overflow: hidden;
  background: var(--lg-pane);
  -webkit-backdrop-filter: var(--lg-pane-blur); backdrop-filter: var(--lg-pane-blur);
  box-shadow: var(--lg-pane-shadow);
}
html[data-style="glass"] body:not(.reading) :is(
  .latest-list, .downloads-page .list, .recent-page .list, .search-block,
  .detail-page .dp-desc-wrap, .detail-page .dp-info, .detail-page .dp-ch-list,
  .sheet .sheet-list, .grid-empty, .mb-error
)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: var(--lg-rim-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* rows inside panes: inset, hairline separators, glass press state */
html[data-style="glass"] body:not(.reading) :is(.latest-list, .downloads-page .list, .recent-page .list) > .list-row:not(.swipe-row) { padding: 12px 14px; }
html[data-style="glass"] body:not(.reading) :is(.latest-list, .downloads-page .list, .recent-page .list) > .list-row:last-child { border-bottom: 0; }
html[data-style="glass"] body:not(.reading) :is(.latest-list, .downloads-page .list, .recent-page .list) > .list-row { transition: background-color .15s; }
html[data-style="glass"] body:not(.reading) .latest-list > .list-row:active { background: var(--lg-fill-press); }
html[data-style="glass"] body:not(.reading) .latest-list { margin-top: 14px; }
html[data-style="glass"] body:not(.reading) .recent-group .list { margin-top: 8px; }
html[data-style="glass"] body:not(.reading) .downloads-page .tab-section-title + .list { margin-top: 4px; }

/* swipe rows: clear at rest; the face turns solid only while it slides over the action */
html[data-style="glass"] body:not(.reading) .swipe-row { margin: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .swipe-row:last-child { border-bottom: 0; }
html[data-style="glass"] body:not(.reading) .swipe-content { padding: 12px 14px; border-radius: 0; background: transparent; box-shadow: none; }
html[data-style="glass"] body:not(.reading) .swipe-content[style*="translateX"] { background: var(--lg-solid); }
html[data-style="glass"] body:not(.reading) .swipe-action { border-radius: 0; }

/* thumbnails in rows: glass-framed */
html[data-style="glass"] body:not(.reading) .thumb .cover { border-radius: 9px; }

/* search */
html[data-style="glass"] body:not(.reading) .search-block { padding: 14px; }
html[data-style="glass"] body:not(.reading) .grid-empty { padding: 32px 18px; }

/* --- series detail panes --- */
html[data-style="glass"] body:not(.reading) .detail-page .dp-desc-wrap { margin-top: 16px; padding: 14px 16px 16px; overflow: visible; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-desc-toggle { right: 8px; bottom: -11px; z-index: 3; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-info { padding: 2px 16px; margin-top: 4px; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-divider { display: none; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-list { margin-top: 6px; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch { padding: 0 6px 0 16px; border-bottom-color: var(--lg-hairline); }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch:last-child { border-bottom: 0; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-main { padding: 13px 0; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch.is-current { background: linear-gradient(90deg, var(--lg-tint), transparent 70%); }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-check { color: var(--lg-tint-border); opacity: .55; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-check.is-on { color: var(--accent-light); opacity: 1; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-empty { padding: 22px 16px; }
html[data-style="glass"] body:not(.reading) .detail-page .dp-ch-head { padding: 16px 2px 4px; }

/* Description / Chapters → glass segmented control */
html[data-style="glass"] body:not(.reading) .detail-page .dp-tabs { padding: 8px var(--gutter); }
html[data-style="glass"] body:not(.reading) .u-tabs {
  gap: 4px; padding: 4px; border: 0; border-radius: 999px;
  background: var(--lg-fill);
  box-shadow: inset 0 1px 2px rgba(50, 30, 18, .1), inset 0 0 0 1px var(--lg-hairline), 0 1px 0 var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) .u-tab { height: 38px; border-radius: 999px; font-size: 16px; transition: color .18s, background-color .18s, box-shadow .18s; }
html[data-style="glass"] body:not(.reading) .u-tab.is-active {
  color: var(--lg-tint-text);
  background: var(--lg-sheen), var(--lg-fill-press);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--lg-shadow-sm);
}
html[data-style="glass"] body:not(.reading) .u-tab.is-active::after { display: none; }

/* sign-in tabs: same segmented glass */
html[data-style="glass"] body:not(.reading) .auth-tabs {
  border-radius: 999px; background: var(--lg-fill);
  box-shadow: inset 0 1px 2px rgba(50, 30, 18, .1), inset 0 0 0 1px var(--lg-hairline), 0 1px 0 var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) .auth-tab { border-radius: 999px; }
html[data-style="glass"] body:not(.reading) .auth-tab.is-active {
  color: var(--lg-tint-text); background: var(--lg-sheen), var(--lg-fill-press);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--lg-shadow-sm);
}

/* For U / ALL / Latest: active tab sits in a glass capsule */
html[data-style="glass"] body:not(.reading) .top-tabs { gap: 6px; align-items: center; }
html[data-style="glass"] body:not(.reading) .top-tab { padding: 4px 12px; border-radius: 999px; }
html[data-style="glass"] body:not(.reading) .top-tab.is-active {
  font-size: 22px; font-weight: 700;
  background-image: linear-gradient(90deg, var(--accent-light), var(--accent)), var(--lg-sheen), linear-gradient(var(--lg-fill-press), var(--lg-fill-press));
  -webkit-background-clip: text, border-box, border-box; background-clip: text, border-box, border-box;
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--lg-shadow-sm);
}

/* --- sheets: inset grouped glass list --- */
html[data-style="glass"] body:not(.reading) .sheet .sheet-list { margin-top: 4px; }
html[data-style="glass"] body:not(.reading) .sheet .sheet-list-item { border-radius: 0; padding-left: 14px; padding-right: 14px; }
html[data-style="glass"] body:not(.reading) .sheet .sheet-list-item:last-child { border-bottom: 0; }

/* --- glass pills & badges --- */
html[data-style="glass"] body:not(.reading) .badge {
  margin: 6px; border-radius: 999px; padding: 2px 9px; font-weight: 600; font-size: 11.5px;
  color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%), rgba(255, 120, 40, .72);
  -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(255, 255, 255, .25), 0 2px 8px rgba(0, 0, 0, .18);
}
html[data-style="glass"] body:not(.reading) .detail-page .dp-hero-cover .badge { border-bottom-right-radius: 999px; }
html[data-style="glass"] body:not(.reading) :is(.cover .qol-new, .cover .qol-saved) {
  -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 1px rgba(255, 255, 255, .22), 0 2px 8px rgba(0, 0, 0, .2);
}
html[data-style="glass"] body:not(.reading) .new-dot {
  border-radius: 999px; padding: 1px 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 60%), var(--lg-accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 6px rgba(201, 48, 20, .3);
}
html[data-style="glass"] body:not(.reading) .mb-status {
  background: var(--lg-pane); border: 0;
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim);
}
html[data-style="glass"] body:not(.reading) :is(.pc-amount, .pc-row, .pc-wait, .mb-done, .auth-error) {
  border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--lg-shadow-sm);
}

/* covers: thin glass frame + a faint specular sweep (the art itself is never tinted) */
html[data-style="glass"] body:not(.reading) .card .cover::after,
html[data-style="glass"] body:not(.reading) .thumb .cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* --- floating controls: back to top + offline pill as glass droplets --- */
html[data-style="glass"] body:not(.reading) :is(.qol-top, .qol-offline) {
  background: var(--lg-sheen), var(--glass-bg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 0; box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), var(--glass-shadow);
}
html[data-style="glass"] body:not(.reading) .qol-top { bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--lg-dock-gap) + 14px); }
html[data-style="glass"] body:not(.reading) .qol-offline { bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--lg-dock-gap) + 12px); }
html[data-style="glass"] body:not(.reading) .qol-offline-retry {
  background: linear-gradient(180deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, 0) 52%), var(--lg-accent-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 10px rgba(201, 48, 20, .3); color: #fff;
}

/* --- tab bar: liquid lens that slides between tabs (js/app.js moves it) --- */
.tab-lens { display: none; }
html[data-style="glass"] .tabbar.glass .tab-lens {
  display: block; position: absolute; left: 0; top: 6px; z-index: 0;
  height: calc(var(--tabbar-h) - 12px);
  border-radius: 24px; pointer-events: none; transform-origin: center;
  background: var(--lg-sheen), linear-gradient(var(--lg-tint), var(--lg-tint)), color-mix(in srgb, var(--lg-solid) 55%, transparent);
  box-shadow: inset 0 1px 0 var(--lg-hi), inset 0 0 0 1px var(--lg-rim), inset 0 -6px 12px -8px var(--lg-tint-border), 0 4px 14px rgba(201, 48, 20, .18);
  transition: width .3s var(--lg-ease);
}
html[data-style="glass"] .tabbar.glass .tabbar-inner { position: relative; z-index: 1; }
html[data-style="glass"] .tabbar.glass .tab-item::before { display: none; }

/* --- refraction (Chromium; js/liquid-glass.js sets --lg-lens per surface) --- */
html.lg-refract[data-style="glass"] :is(.tabbar.glass, .dp-bar.glass, .qol-top, .qol-offline, .toast)[data-lg-refract] {
  -webkit-backdrop-filter: var(--lg-lens) blur(7px) saturate(190%) brightness(1.04);
  backdrop-filter: var(--lg-lens) blur(7px) saturate(190%) brightness(1.04);
}
html.lg-refract[data-style="glass"] .tabbar.glass .tab-lens[data-lg-refract] {
  -webkit-backdrop-filter: var(--lg-lens) blur(4px) saturate(200%); backdrop-filter: var(--lg-lens) blur(4px) saturate(200%);
}
html.lg-refract[data-style="glass"] body:not(.reading) :is(.app-header, .discover-top, .search-top).glass[data-lg-refract],
html.lg-refract[data-style="glass"] body:not(.reading) .sheet[data-lg-refract],
html.lg-refract[data-style="glass"] .busy-box[data-lg-refract] {
  -webkit-backdrop-filter: var(--lg-lens) blur(20px) saturate(180%);
  backdrop-filter: var(--lg-lens) blur(20px) saturate(180%);
}
html.lg-refract[data-style="glass"] body:not(.reading) .filter-box[data-lg-refract] {
  -webkit-backdrop-filter: var(--lg-lens) blur(10px) saturate(180%);
  backdrop-filter: var(--lg-lens) blur(10px) saturate(180%);
}
html.lg-refract[data-style="glass"] body.reading :is(.reader-top, .reader-bottom, .reader-pill)[data-lg-refract] {
  -webkit-backdrop-filter: var(--lg-lens) blur(14px) saturate(160%);
  backdrop-filter: var(--lg-lens) blur(14px) saturate(160%);
}
/* clearer glass where refraction carries the effect */
html.lg-refract[data-style="glass"] .tabbar.glass { background-color: color-mix(in srgb, var(--glass-bg) 70%, transparent); }
html.lg-refract[data-style="glass"] body:not(.reading) .detail-page .dp-bar.glass { background-color: color-mix(in srgb, var(--glass-bg) 70%, transparent); }

/* ============================================================
   13. Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html[data-style="glass"] :is(.btn, .chip, .icon-btn, .tab-item, .tab-item::before, .tab-item .icon, .cover, .card-title,
    .filter-box, .pill-outline, .input, .sheet-list-item, .settings-row, .dp-stat, .dp-fav, .top-tab, .u-tab, .tab-lens, .auth-tab) { transition: none !important; }
  html[data-style="glass"] .tab-item::before { transition: none !important; transform: none; }
  html[data-style="glass"] :is(.btn, .chip, .icon-btn, .filter-box, .pill-outline, .dp-stat):active { transform: none !important; }
  html[data-style="glass"] .card:hover .cover { transform: none !important; }
}
