/*
 * ProHTML · Liquid Glass, a dependency-free web adaptation.
 * Motion/material reference: sdegenaar/liquid_glass_widgets (MIT).
 * See THIRD-PARTY-NOTICES.md. No Flutter runtime or external assets required.
 */
:root {
  --bg: #f0f2f8;
  --ink: #202331;
  --mut: #71768a;
  --line: rgba(83, 96, 136, .12);
  --accent: #5262ce;
  --accent-soft: #e9edff;
  --card: rgba(255, 255, 255, .76);
  --pill-on: rgba(95, 111, 171, .10);
  --dark-btn: #5262ce;
  --dark-btn-ink: #fff;
  --lg-surface: rgba(255, 255, 255, .50);
  --lg-menu: rgba(250, 251, 255, .86);
  --lg-edge: rgba(255, 255, 255, .86);
  --lg-highlight: rgba(255, 255, 255, .92);
  --lg-shade: rgba(89, 105, 153, .13);
  --lg-hover: rgba(104, 122, 195, .10);
  --lg-lens: rgba(255, 255, 255, .76);
  --lg-shadow: 0 8px 24px -14px rgba(51, 62, 103, .27),
    inset 0 1px 0 var(--lg-highlight), inset 0 -1px 0 var(--lg-shade);
  --lg-popup-shadow: 0 22px 70px -20px rgba(35, 43, 84, .28),
    0 4px 14px -7px rgba(35, 43, 84, .16),
    inset 0 1px 0 var(--lg-highlight), inset 0 -1px 0 var(--lg-shade);
  --lg-wallpaper: radial-gradient(ellipse at 91% 5%, rgba(208, 199, 249, .57), transparent 43%),
    radial-gradient(ellipse at 0% 42%, rgba(192, 219, 249, .48), transparent 44%),
    radial-gradient(ellipse at 72% 100%, rgba(245, 220, 214, .31), transparent 48%);
  --lg-spring: cubic-bezier(.2, 1.24, .32, 1);
  --lg-safe-top: env(safe-area-inset-top, 0px);
  --lg-safe-right: env(safe-area-inset-right, 0px);
  --lg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lg-safe-left: env(safe-area-inset-left, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11131c; --ink: #f0f1f8; --mut: #a1a6bb;
    --line: rgba(208, 216, 255, .10); --accent: #b0beff;
    --accent-soft: #2b3355; --card: rgba(32, 36, 51, .82);
    --pill-on: rgba(190, 201, 255, .12); --dark-btn: #a7b7ff; --dark-btn-ink: #171d37;
    --lg-surface: rgba(49, 54, 76, .48); --lg-menu: rgba(32, 36, 53, .91);
    --lg-edge: rgba(228, 235, 255, .17); --lg-highlight: rgba(235, 241, 255, .19);
    --lg-shade: rgba(0, 0, 0, .22); --lg-hover: rgba(192, 205, 255, .11);
    --lg-lens: rgba(158, 177, 239, .15);
    --lg-shadow: 0 10px 30px -14px rgba(0, 0, 0, .40), inset 0 1px 0 var(--lg-highlight), inset 0 -1px 0 var(--lg-shade);
    --lg-popup-shadow: 0 24px 70px -16px rgba(0, 0, 0, .6), 0 4px 18px rgba(0, 0, 0, .14), inset 0 1px 0 var(--lg-highlight);
    --lg-wallpaper: radial-gradient(ellipse at 91% 5%, rgba(91, 67, 150, .24), transparent 43%),
      radial-gradient(ellipse at 0% 42%, rgba(37, 84, 141, .21), transparent 44%),
      radial-gradient(ellipse at 72% 100%, rgba(102, 62, 96, .13), transparent 48%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11131c; --ink: #f0f1f8; --mut: #a1a6bb;
  --line: rgba(208, 216, 255, .10); --accent: #b0beff;
  --accent-soft: #2b3355; --card: rgba(32, 36, 51, .82);
  --pill-on: rgba(190, 201, 255, .12); --dark-btn: #a7b7ff; --dark-btn-ink: #171d37;
  --lg-surface: rgba(49, 54, 76, .48); --lg-menu: rgba(32, 36, 53, .91);
  --lg-edge: rgba(228, 235, 255, .17); --lg-highlight: rgba(235, 241, 255, .19);
  --lg-shade: rgba(0, 0, 0, .22); --lg-hover: rgba(192, 205, 255, .11);
  --lg-lens: rgba(158, 177, 239, .15);
  --lg-shadow: 0 10px 30px -14px rgba(0, 0, 0, .40), inset 0 1px 0 var(--lg-highlight), inset 0 -1px 0 var(--lg-shade);
  --lg-popup-shadow: 0 24px 70px -16px rgba(0, 0, 0, .6), 0 4px 18px rgba(0, 0, 0, .14), inset 0 1px 0 var(--lg-highlight);
  --lg-wallpaper: radial-gradient(ellipse at 91% 5%, rgba(91, 67, 150, .24), transparent 43%),
    radial-gradient(ellipse at 0% 42%, rgba(37, 84, 141, .21), transparent 44%),
    radial-gradient(ellipse at 72% 100%, rgba(102, 62, 96, .13), transparent 48%);
  color-scheme: dark;
}

/* A quiet backdrop gives the glass something to catch. Content stays unmodified. */
body { background: var(--bg); }
#home { background: var(--lg-wallpaper); padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
.wrapin { max-width: 1080px; }
svg.i { stroke-width: 1.7; }
svg.i, svg.i use { pointer-events: none; }
button, .fi { touch-action: manipulation; }
button { -webkit-touch-callout: none; }
[hidden] { display: none !important; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 4px 25px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { position: relative; display: grid; place-items: center; width: 42px; height: 46px; color: var(--accent); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 29px; height: 35px; border: 1px solid var(--lg-edge); border-radius: 10px; background: var(--lg-surface); box-shadow: var(--lg-shadow); }
.brand-mark::before { transform: rotate(-13deg) translate(-3px, 0); }
.brand-mark::after { transform: rotate(8deg) translate(3px, 1px); }
.brand-mark svg { position: relative; width: 25px; height: 25px; z-index: 1; }
.brand-name { display: block; font-size: 19px; letter-spacing: -.04em; font-weight: 760; }
.brand-tag { display: block; font-size: 9px; font-weight: 650; letter-spacing: .17em; color: var(--mut); margin-top: 3px; }
.privacy-note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--mut); }
.privacy-note svg { width: 15px; height: 15px; color: #438d78; }
.nav { gap: 14px; padding: 0; }
.tabs, .addpill, .search, .circ, #rbar, .menu {
  background: var(--lg-surface); border: 1px solid var(--lg-edge); box-shadow: var(--lg-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(155%); backdrop-filter: blur(22px) saturate(155%);
}
.tabs, .search, .addpill, .circ { position: relative; isolation: isolate; }
.tabs::before, .search::before, .addpill::before, .circ::before, .row-more::before, .menu::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: -1;
  background: radial-gradient(ellipse at var(--light-x, 15%) var(--light-y, 0%), var(--lg-highlight), transparent 65%);
  opacity: .30;
}
.tabs { padding: 4px; flex: 0 1 auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 17px; font-size: 14px; font-weight: 550; position: relative; z-index: 1; color: var(--mut); transition: color .2s, background .2s; }
.tabs button svg { width: 18px; height: 18px; }
.tabs button[aria-selected="true"] { color: var(--accent); background: var(--lg-lens); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 3px 9px -4px var(--lg-shade); font-weight: 650; }
.tabs.has-lens button[aria-selected="true"] { background: transparent; box-shadow: none; }
.tab-lens { position: absolute; top: 4px; left: 0; height: 44px; border-radius: 999px; background: var(--lg-lens); border: 1px solid var(--lg-edge); box-shadow: inset 0 1px 0 var(--lg-highlight), 0 3px 10px -4px var(--lg-shade); pointer-events: none; }
.right { gap: 12px; flex: 1 1 290px; }
.addpill { gap: 4px; height: 54px; padding: 4px; }
.addpill .n { background: none; padding: 4px 9px 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--mut); }
.plus { position: relative; width: 42px; height: 42px; background: linear-gradient(145deg, color-mix(in srgb, var(--dark-btn) 85%, white), var(--dark-btn)); color: var(--dark-btn-ink); box-shadow: inset 0 1px 1px rgba(255,255,255,.4), 0 4px 9px -3px rgba(64,78,170,.3); }
.plus svg { width: 22px; height: 22px; stroke-width: 1.8; transition: transform .4s var(--lg-spring); }
.plus.glass-menu-open svg { transform: rotate(45deg); }
.search { max-width: 330px; height: 54px; padding: 0 17px; gap: 9px; transition: box-shadow .2s, border-color .2s; }
.search svg { width: 19px; height: 19px; }
.search input { font-size: 14px; }
.search:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--lg-edge)); box-shadow: var(--lg-shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 43px 5px 28px; }
.eyebrow { margin: 0 0 9px; color: var(--mut); font-size: 10px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; }
h1 { font-size: 42px; font-weight: 750; letter-spacing: -.045em; margin: 0; }
.page-note { color: var(--mut); margin: 9px 0 0; font-size: 14px; line-height: 1.6; }
.library-label { font-size: 11px; font-weight: 550; letter-spacing: .02em; color: var(--mut); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--lg-surface); white-space: nowrap; }
.library-label::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #58a48d; margin: 0 7px 1px 0; }
.card { background: var(--card); border: 1px solid var(--lg-edge); border-radius: 25px; box-shadow: 0 8px 32px -24px rgba(40, 54, 109, .20), inset 0 1px 0 var(--lg-highlight); }
.chips { gap: 8px; margin: 0 3px 18px; }
.chips .chip { height: 34px; padding: 0 14px; border: 1px solid transparent; font-size: 12px; font-weight: 550; box-shadow: none; background: var(--lg-surface); color: var(--mut); transition: background .2s, color .2s; }
.chips .chip[aria-pressed="true"] { background: var(--lg-lens); color: var(--accent); border-color: var(--lg-edge); box-shadow: 0 2px 8px -5px var(--lg-shade); font-weight: 650; }
/* Separate native buttons: no nested buttons, and an obvious touch-friendly action. */
.row { padding: 0 13px 0 0; gap: 4px; min-height: 91px; }
.row:active { background: transparent; }
.row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 17px; padding: 18px 9px 18px 22px; text-align: left; align-self: stretch; border-radius: 18px; }
.row-open:active { background: var(--lg-hover); }
.row + .row::before { left: 91px; right: 22px; }
.fi { position: relative; isolation: isolate; width: 51px; height: 55px; border-radius: 16px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 60%, var(--lg-lens)), var(--accent-soft)); color: var(--accent); border: 1px solid var(--lg-edge); box-shadow: inset 0 1px 1px var(--lg-highlight), 0 4px 8px -5px var(--lg-shade); }
.fi::after { content: ""; position: absolute; inset: 3px; border-radius: 12px; background: linear-gradient(130deg, var(--lg-highlight), transparent 55%); opacity: .35; z-index: -1; }
.fi svg { width: 27px; height: 27px; transition: transform .4s var(--lg-spring); }
.fi.dir { background: linear-gradient(145deg, color-mix(in srgb, #e9b65e 14%, var(--card)), color-mix(in srgb, #e9b65e 25%, var(--card))); color: #b57f29; }
.fi.ok { background: color-mix(in srgb, #34c759 15%, var(--card)); color: #32825a; }
.nm { font-size: 16px; font-weight: 560; letter-spacing: -.015em; }
.sz { font-size: 12px; margin-top: 5px; color: var(--mut); }
.row-more { position: relative; isolation: isolate; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; color: var(--mut); transition: background .2s, color .2s, border-color .2s; }
.row-more svg { width: 21px; height: 21px; }
.row-more.glass-menu-open { background: var(--lg-lens); color: var(--accent); border-color: var(--lg-edge); box-shadow: var(--lg-shadow); }
.row-open .chev { width: 16px; height: 16px; margin-left: 4px; }
.pg { margin-left: 2px; }
.pg b { font-size: 16px; }
.pg small { font-size: 10px; margin-top: 3px; }
svg.i.star { width: 16px; height: 16px; }
.crumb { font-size: 14px; height: 36px; margin-bottom: 12px; }
.empty { padding: 59px 28px 55px; color: var(--mut); font-size: 14px; line-height: 1.7; }
.empty b { font-size: 21px; font-weight: 650; letter-spacing: -.03em; margin-bottom: 7px; }
.empty-orbit { position: relative; isolation: isolate; display: grid; place-items: center; width: 74px; height: 82px; margin: 0 auto 26px; color: var(--accent); }
.empty-orbit::before, .empty-orbit::after { content: ""; position: absolute; width: 59px; height: 70px; border-radius: 19px; border: 1px solid var(--lg-edge); background: var(--accent-soft); box-shadow: var(--lg-shadow); }
.empty-orbit::before { transform: rotate(-14deg) translateX(-6px); opacity: .6; }
.empty-orbit::after { transform: rotate(7deg) translateX(3px); background: linear-gradient(135deg, var(--lg-lens), var(--accent-soft)); }
.empty-orbit svg { z-index: 1; width: 35px; height: 35px; }
.empty .big { margin-top: 25px; height: 46px; font-size: 13px; font-weight: 600; gap: 8px; padding: 0 22px; background: var(--dark-btn); color: var(--dark-btn-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -8px rgba(64,78,170,.55); }
.empty .big svg { width: 18px; height: 18px; }
.tip { font-size: 12px; line-height: 1.7; margin: 18px 8px; }
.library-footer { display: flex; gap: 12px; justify-content: space-between; margin: 24px 7px 4px; color: var(--mut); font-size: 10px; letter-spacing: .025em; }
.sec { margin-bottom: 25px; }
.sec h2 { font-size: 10px; letter-spacing: .12em; margin: 0 0 10px 18px; }
.set { font-size: 14px; gap: 12px; padding: 17px 20px; }
.set .lb small { margin-top: 5px; font-size: 12px; line-height: 1.6; }
.seg { background: var(--pill-on); border-radius: 99px; padding: 3px; }
.seg button { border-radius: 99px; padding: 7px 13px; font-size: 12px; }
.seg button[aria-pressed="true"] { background: var(--lg-lens); color: var(--accent); box-shadow: var(--lg-shadow); }
.sw { width: 48px; height: 29px; }
.sw i { background: var(--pill-on); border: 1px solid var(--line); }
.sw i::after { top: 2px; left: 2px; width: 23px; height: 23px; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 6px rgba(0,0,0,.18); transition: transform .4s var(--lg-spring), width .15s; }
.sw input:checked + i { background: #639d8c; }
.sw input:checked + i::after { transform: translateX(19px); }
.sw input:active + i::after { width: 27px; }
.sw input:checked:active + i::after { transform: translateX(15px); }
select.sel { font-size: 12px; padding: 9px 11px; border-radius: 12px; max-width: 48%; }

/* The reader chrome is glass; the user's imported HTML is never re-skinned. */
#reader { background: var(--bg); }
#rbar { border-radius: 999px; height: 56px; }
#rbar .t { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
#rbar .circ { background: var(--lg-lens); border: 1px solid var(--lg-edge); box-shadow: inset 0 1px 0 var(--lg-highlight); }
.circ { color: var(--ink); }
.circ svg { width: 21px; height: 21px; }
.fl { opacity: .8; }
.fl .circ { width: 44px; height: 44px; }
#grab { width: 100px; height: 32px; }

/* JS computes every menu's fixed coordinates from its actual trigger. */
#layer { cursor: default; animation: none !important; }
#layer.closing { animation: none; pointer-events: none; }
#layer .scrim { background: rgba(26, 31, 56, .065); opacity: 1; transition: opacity .18s; }
#layer.closing .scrim { opacity: 0; }
#layer .menus, #layer.center .menus { position: static; inset: auto; display: contents; }
#layer.center { background: transparent; }
#layer .menu { position: fixed; inset: auto; margin: 0; min-width: 0; width: 296px; max-width: none; padding: 7px; border-radius: 26px; background: var(--lg-menu); box-shadow: var(--lg-popup-shadow); border: 1px solid var(--lg-edge); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; transform-origin: 50% 50%; animation: none; isolation: isolate; touch-action: pan-y; }
#layer .menu::before { z-index: -1; opacity: .24; background: radial-gradient(ellipse at var(--light-x, 15%) var(--light-y, 0%), var(--lg-highlight), transparent 70%); }
#layer .menu > * { position: relative; animation: none; }
#layer .menu button { min-height: 48px; padding: 11px 13px; gap: 12px; border-radius: 18px; font-size: 14px; font-weight: 500; line-height: 1.35; transition: background .15s, color .15s; transform: none; box-shadow: none; }
#layer .menu button > span:not(.tick) { min-width: 0; }
#layer .menu button svg.i:not(.go) { width: 21px; height: 21px; color: var(--accent); transition: transform .36s var(--lg-spring); }
#layer .menu button svg.go { width: 14px; height: 14px; color: var(--mut); }
#layer .menu button.del { color: var(--bad); }
#layer .menu button.del svg.i { color: var(--bad); }
#layer .menu button:active, #layer .menu button.on { background: var(--lg-hover); }
#layer .menu button:active svg.i { transform: scale(.92); }
#layer .menu hr { margin: 5px 11px; border-top-color: var(--line); }
.menu-heading { padding: 13px 13px 10px; }
.menu-heading .eyebrow { margin: 0 0 5px; font-size: 9px; }
.menu-heading b { display: block; font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#layer .menu button.menu-back { font-weight: 650; font-size: 13px; min-height: 43px; }
#layer .menu button.menu-back svg { transform: rotate(180deg); width: 17px; }
#layer .menu button.menu-back:hover svg { transform: rotate(180deg) translateX(2px); }
#layer .menu.drill-behind { visibility: hidden; pointer-events: none; }
#layer .menu .tick { width: 16px; }
#layer .menu .tick svg.i { width: 16px !important; height: 16px !important; }
#layer .menu [data-a="disp"].submenu-active, #layer .menu [data-a="net"].submenu-active, #layer .menu [data-a="font"].submenu-active { background: var(--lg-hover); }
#layer .menu.is-materializing > * { animation: lg-content-in .25s ease both; }
#layer .menu.is-materializing > :nth-child(1) { animation-delay: .035s; }
#layer .menu.is-materializing > :nth-child(2) { animation-delay: .05s; }
#layer .menu.is-materializing > :nth-child(3) { animation-delay: .065s; }
#layer .menu.is-materializing > :nth-child(n+4) { animation-delay: .08s; }
.font-slider { padding: 13px 13px 11px; }
.font-slider .font-label { font-size: 12px; gap: 10px; margin-bottom: 10px; }
.font-slider output { font-size: 18px; color: var(--accent); }
.font-slider input[type="range"] { height: 32px; margin: 0; }
#toast { font-size: 13px; padding: 12px 20px; border-radius: 99px; }
.is-pressed { transform: scale(.95); }
@keyframes lg-content-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (hover: hover) {
  .tabs button:hover { color: var(--accent); }
  .row-open:hover { background: var(--lg-hover); }
  .row-open:hover .fi svg { transform: translateY(-1px) rotate(-3deg); }
  .row-more:hover { background: var(--lg-lens); color: var(--accent); border-color: var(--lg-edge); }
  .circ:hover { transform: none; background: var(--lg-lens); }
  .empty .big:hover, .plus:hover { filter: brightness(1.06); }
  #layer .menu button:hover { background: var(--lg-hover); transform: none; box-shadow: none; }
  #layer .menu button:hover svg.i:not(.go) { transform: scale(1.08) rotate(-3deg); }
  #layer .menu button:hover svg.go { transform: translateX(2px); }
}
@media (max-width: 800px) {
  .nav { flex-wrap: wrap; gap: 13px; }
  .tabs { flex: 1 1 100%; margin: 0; }
  .tabs button { flex: 1 0 auto; }
  .right { flex-basis: 100%; flex-direction: row-reverse; }
  .search { max-width: none; }
  .library-heading { margin-top: 31px; }
}
@media (max-width: 480px) {
  #home { padding: calc(19px + env(safe-area-inset-top, 0px)) max(15px, env(safe-area-inset-right, 0px)) calc(30px + env(safe-area-inset-bottom, 0px)) max(15px, env(safe-area-inset-left, 0px)); }
  .brandbar { padding: 0 1px 22px; }
  .privacy-note { font-size: 10px; gap: 4px; }
  .privacy-note svg { width: 13px; height: 13px; }
  .brand-name { font-size: 18px; }
  .brand-tag { font-size: 8px; }
  .tabs button { padding: 0 12px; gap: 6px; font-size: 12px; }
  .tabs button svg { width: 16px; height: 16px; }
  .tabs button[data-tab="custom"] { padding-inline: 10px; }
  .search, .addpill { height: 50px; }
  .plus { width: 40px; height: 40px; }
  .search input { font-size: 16px; } /* avoid iOS focus zoom */
  .library-heading { margin: 29px 3px 23px; gap: 10px; }
  h1 { font-size: 34px; }
  .page-note { font-size: 12px; margin-top: 8px; }
  .eyebrow { font-size: 9px; }
  .library-label { display: none; }
  .chips { gap: 6px; margin-bottom: 14px; }
  .chips .chip { padding: 0 11px; height: 32px; font-size: 11px; }
  .row { min-height: 85px; padding-right: 7px; gap: 0; }
  .row-open { gap: 12px; padding: 15px 2px 15px 15px; }
  .fi { width: 46px; height: 51px; border-radius: 14px; }
  .fi svg { width: 25px; height: 25px; }
  .nm { font-size: 15px; }
  .sz { font-size: 11px; }
  .row + .row::before { left: 73px; right: 16px; }
  .row-open .chev { display: none; }
  .row-more { width: 44px; }
  .card { border-radius: 23px; }
  .empty { padding: 48px 21px 44px; font-size: 13px; }
  .empty b { font-size: 20px; }
  .empty .big { padding-inline: 18px; font-size: 12px; }
  .library-footer { font-size: 9px; margin-top: 19px; }
  .set { padding: 16px; gap: 9px; }
  .set .lb small { font-size: 11px; }
  .seg button { padding-inline: 10px; }
}
@media (max-width: 360px) {
  .tabs button { padding: 0 10px; font-size: 11px; }
  .tabs button svg { display: none; }
  .privacy-note span { max-width: 100px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabs, .search, .addpill, .circ, #rbar, #layer .menu { background: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .tabs, .search, .addpill, .circ, #rbar, .card, #layer .menu, #toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .tab-lens { background: var(--accent-soft); }
  #toast { color: var(--ink); }
}
@media (prefers-contrast: more) {
  :root { --lg-edge: var(--line); --mut: #525a74; }
  :root[data-theme="dark"] { --mut: #c0c6dc; }
  .card, .tabs, .search, .addpill, .circ, #layer .menu { background: var(--bg); border-color: var(--mut); }
}
@media (forced-colors: active) {
  .tab-lens { border: 2px solid Highlight; }
  .tabs button[aria-selected="true"], .chip[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
  .card, #layer .menu { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .row-open:hover .fi svg, #layer .menu button:hover svg.i, .is-pressed { transform: none; }
}
/* Keep all four destinations discoverable on small screens. */
@media (max-width: 480px) {
  .brand-tag { white-space: nowrap; letter-spacing: .13em; }
  .privacy-note { white-space: nowrap; }
  .tabs { overflow: hidden; }
  .tabs button, .tabs button[data-tab="custom"] { flex: 1 1 0; min-width: 0; padding: 0 3px; height: 55px; flex-direction: column; gap: 4px; font-size: 10px; }
  .tabs button svg { display: block; width: 18px; height: 18px; }
  .tab-lens { height: 55px; }
  .right { flex-direction: row; justify-content: flex-end; }
  .right .search { order: -1; }
}
@media (max-width: 350px) {
  .tabs button, .tabs button[data-tab="custom"] { font-size: 9px; }
  .brand-tag { font-size: 7px; }
  .privacy-note { font-size: 9px; }
}
#layer.closing .menu, #layer.closing .menu > * { animation: none !important; }
/* A 320px viewport must not inherit the search input's intrinsic width. */
.right, .search { min-width: 0; }
.addpill { flex-shrink: 0; }
