/* ================= Afoli design system ================= */
/* Inter 4 variable font (wght 100–900), self-hosted in assets/vendor/fonts — SIL OFL 1.1 (Inter-OFL.txt), © The Inter Project Authors.
   From @fontsource-variable/inter 5.3.0 (npm, integrity checked). Split by script with unicode-range, so a page downloads only
   the subsets it shows; the latin file is preloaded in index.html. Scripts Inter lacks (Arabic, CJK…) use the --font fallbacks.
   Each face is cut to its range and latin-ext is split (latin-ext-a: Ə ə + Latin Extended-A, 15 KB) by scripts/fonts_subset.py. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-greek-ext-wght-normal.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-greek-wght-normal.woff2) format('woff2'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-vietnamese-wght-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-a-wght-normal.woff2) format('woff2'); unicode-range: U+0100-017F,U+018F,U+0259; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0180-018E,U+0190-0258,U+025A-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-cyrillic-ext-wght-italic.woff2) format('woff2'); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-cyrillic-wght-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-greek-ext-wght-italic.woff2) format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-greek-wght-italic.woff2) format('woff2'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-vietnamese-wght-italic.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-a-wght-italic.woff2) format('woff2'); unicode-range: U+0100-017F,U+018F,U+0259; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-ext-wght-italic.woff2) format('woff2'); unicode-range: U+0180-018E,U+0190-0258,U+025A-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../vendor/fonts/inter-latin-wght-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --bg: #070816;
  --bg2: #0d1030;
  --glass: rgba(20, 22, 52, 0.55);
  --glass-2: rgba(30, 33, 72, 0.6);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef0ff;
  --muted: #9aa0c7;
  --dim: #6b7099;
  --accent: #7c5cff;
  --accent-2: #3ad1ff;
  --pink: #ff5c8a;
  --ok: #4fe3a1;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --r: 18px;
  --r-sm: 12px;
  --rail: 78px;
  --player: 0px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --blur: blur(22px) saturate(160%);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --field: rgba(0, 0, 0, 0.25);      /* input / inset backgrounds */
  --soft: rgba(255, 255, 255, 0.045); /* subtle surfaces */
  --soft-2: rgba(255, 255, 255, 0.07);
  --soft-3: rgba(255, 255, 255, 0.12);
  --strong: #fff;                     /* emphasised text on tinted surfaces */
  --panel: rgba(16, 18, 44, 0.78);    /* opaque floating panels (player, palette, toasts) */
  --panel-2: rgba(18, 20, 48, 0.94);
  --t-ok: #8ff0c4; --t-err: #ff9aac; --t-warn: #ffe3a3; --t-gold: #ffd166; --t-lav: #cfd2ff; --t-peach: #ffd9a0; --t-mint: #b8ffd9; --t-rose: #ffc0d0; --t-sky: #7cc4ff;
  color-scheme: dark;
}
/* ---------- day (light) theme ---------- */
:root[data-theme="light"] {
  --bg: #eef1f8;
  --bg2: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.88);
  --line: rgba(20, 30, 80, 0.1);
  --line-2: rgba(20, 30, 80, 0.18);
  --text: #141838;
  --muted: #4a5078;
  --dim: #7a80a6;
  --accent: #6a46ff;
  --accent-2: #0a9fd6;
  --ok: #12a46a;
  --pink: #e0336b;
  --shadow: 0 18px 48px -26px rgba(30, 40, 100, 0.35);
  --field: rgba(25, 35, 90, 0.055);
  --soft: rgba(25, 35, 90, 0.035);
  --soft-2: rgba(25, 35, 90, 0.06);
  --soft-3: rgba(25, 35, 90, 0.1);
  --strong: #10133a;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: rgba(255, 255, 255, 0.97);
  --t-ok: #0b8a55; --t-err: #c21f4f; --t-warn: #8a5a00; --t-gold: #a87000; --t-lav: #4b3fb0; --t-peach: #9a5a00; --t-mint: #0b6b43; --t-rose: #a3123d; --t-sky: #0a72b8;
  color-scheme: light;
}
:root[data-theme="light"] body { background: radial-gradient(1200px 800px at 80% -10%, #dcd6ff 0%, transparent 60%), var(--bg); }
:root[data-theme="light"] .aurora i { opacity: .16; }
:root[data-theme="light"] .aurora i:nth-child(2) { opacity: .12; } :root[data-theme="light"] .aurora i:nth-child(3) { opacity: .08; }
:root[data-theme="light"] ::selection { background: rgba(106, 70, 255, .25); }
/* elements on solid accent colours keep white text in both themes */
:root[data-theme="light"] :is(.brand-mark, .play-btn, .fo-main, .spd-go, .ck-btn.primary, .clk-btn.primary, .nt-new, .wx-hero, .wx-unit, .cv-swap, .rn-go, .cx-key.equals, .pill.live) { color: #fff; }
:root[data-theme="light"] .wx-unit { color: var(--text); }
:root[data-theme="light"] .hero-title em { background-image: linear-gradient(90deg, #6a46ff, #0a9fd6, #e0336b, #6a46ff); }
:root[data-theme="light"] :is(.ck-big, .dts-big b) { background-image: linear-gradient(180deg, #1b1f4d, #6a46ff); }
:root[data-theme="light"] .ck-big small { -webkit-text-fill-color: var(--c); }
:root[data-theme="light"] .feature-art .ico, :root[data-theme="light"] .feature-art { color: #fff; }
:root[data-theme="light"] .r-globe, :root[data-theme="light"] .tv-globe { background: radial-gradient(circle at 50% 45%, #f4f8fd, #dfe9f5 75%); } /* day: light sky behind the light globe (globe.js) */
:root[data-theme="light"] .pal-backdrop { background: rgba(40, 50, 100, .25); }
:root[data-theme="light"] .ip-map { filter: none; }
:root[data-theme="light"] .md blockquote { color: var(--text); }
:root[data-theme="light"] .txt-stat, :root[data-theme="light"] .txt-stats { background: var(--glass-2); }
html { transition: background-color .3s; }
:root[data-theme="light"] .cx-display { background: var(--field); }
:root[data-theme="light"] .cx-key.fn { background: rgba(106,70,255,.07); }
:root[data-theme="light"] .spd-gauge circle.bg { stroke: var(--soft-3); }
:root[data-theme="light"] .spd-gauge .needle { stroke: var(--text); filter: none; }
:root[data-theme="light"] .spd-gauge .hub { fill: var(--text); }
:root[data-theme="light"] .ck-analog .face { fill: rgba(255,255,255,.7); stroke: var(--line-2); }
:root[data-theme="light"] .ck-analog .ticks line { stroke: var(--dim); }
:root[data-theme="light"] .ck-analog:not(.night) :is(.hh, .mm) { stroke: var(--text); }
:root[data-theme="light"] .dv-ok { background: rgba(18,164,106,.1); }
:root[data-theme="light"] .dv-err { background: rgba(224,51,107,.08); }
:root[data-theme="light"] .hol-days i.hol { color: #2a1d00; }
body.has-player { --player: 76px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 800px at 80% -10%, #1a1250 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
kbd { font: 600 11px/1 var(--font); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--soft); color: var(--muted); }
.ico { display: inline-flex; flex: none; vertical-align: -0.2em; } /* inline in text: sit on the text line, not above it */
::selection { background: rgba(124, 92, 255, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--soft-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- animated background ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(90px); opacity: .28; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #5b3cff; left: -15vmax; top: -10vmax; }
.aurora i:nth-child(2) { background: #00b3ff; right: -20vmax; top: 20vh; animation-delay: -8s; opacity: .18; }
.aurora i:nth-child(3) { background: #ff3d8b; left: 30vw; bottom: -30vmax; animation-delay: -16s; opacity: .14; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
body[data-route]:not([data-route="home"]) .aurora { opacity: .5; }

/* ---------- nav rail ---------- */
#rail {
  position: fixed; z-index: 40; left: 12px; top: 12px; bottom: 12px; width: var(--rail);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.brand { display: grid; place-items: center; margin-bottom: 8px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; background: var(--grad); color: var(--strong);
  box-shadow: 0 8px 30px -6px rgba(124, 92, 255, .8);
}
.brand-name { display: none; }
.rail-items, .rail-bottom { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rail-items { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 0 12px; margin: 0 -12px; }
.rail-items::-webkit-scrollbar { display: none; }
/* custom labels would be clipped by the scrolling list; items there use the native title tooltip */
.rail-items .rail-label { display: none; }
@media (max-height: 940px) { .rail-item { width: 50px; height: 50px; border-radius: 14px; } .rail-items { gap: 4px; } }
.rail-item {
  --c: var(--accent); position: relative; width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; color: var(--muted); transition: .2s;
}
.rail-item:hover { color: var(--text); background: var(--soft-2); }
.rail-item.active { color: var(--strong); background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.rail-item.active::before { content: ''; position: absolute; left: -13px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.rail-item.lang b { font-size: 13px; letter-spacing: .5px; }
.rail-theme .ico { transition: transform .4s; } .rail-theme:hover .ico { transform: rotate(25deg); }
.rail-label {
  position: absolute; left: calc(100% + 14px); white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); opacity: 0; transform: translateX(-6px); transition: .15s;
}
.rail-item:hover .rail-label { opacity: 1; transform: none; }

/* ---------- main view ---------- */
#view { margin-left: calc(var(--rail) + 24px); min-height: 100vh; }
.page { min-height: 100vh; padding: 28px 32px calc(40px + var(--player)); transition: opacity .35s, transform .35s; }
.page.enter { opacity: 0; transform: translateY(10px); }
.page.tool-page { padding: 0; height: 100vh; min-height: 0; position: relative; overflow: hidden auto; overscroll-behavior: contain; }
/* full-screen modules that are taller than a short or small screen scroll inside the page instead of being cut off */
.page-loading, .page-error { display: grid; place-items: center; gap: 14px; height: 100%; color: var(--muted); align-content: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--accent-2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- home ---------- */
.hero { max-width: 980px; margin: 4vh auto 30px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px;
  font-size: 13px; color: var(--t-lav); background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.35);
}
.hero-title { font-size: clamp(34px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; margin: 22px 0 16px; font-weight: 800; }
.hero-title em {
  font-style: normal; background: linear-gradient(90deg, #a48bff, #3ad1ff, #ff7ab6, #a48bff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: 300% 0; } }
.hero-sub { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 620px; margin: 0 auto 28px; }
.hero-search {
  display: flex; align-items: center; gap: 12px; width: min(560px, 100%); margin: 0 auto; padding: 14px 16px 14px 20px;
  border-radius: 16px; background: var(--glass); border: 1px solid var(--line-2); color: var(--muted);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: .2s; text-align: start;
}
.hero-search > span:not(.ico) { flex: 1; text-align: start; }
@media (max-width: 760px) { .hero-search kbd { display: none; } }
.hero-search:hover { border-color: rgba(124,92,255,.6); box-shadow: 0 0 0 4px rgba(124,92,255,.15); color: var(--text); }
.hero-stats { display: flex; justify-content: center; gap: clamp(16px, 4vw, 48px); margin-top: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 26px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }

.section-title { max-width: 1180px; margin: 44px auto 16px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }

.spot { position: relative; isolation: isolate; overflow: hidden; }
.spot::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--accent)) 22%, transparent), transparent 60%);
}
.spot:hover::after { opacity: 1; }

.feature-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.feature {
  display: flex; flex-direction: column; border-radius: 26px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: transform .3s, border-color .3s, box-shadow .3s;
}
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 50%, transparent); box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--c) 60%, transparent); }
.feature-art { height: 190px; position: relative; display: grid; place-items: center; overflow: hidden; color: var(--strong);
  background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%); }
.feature-art .ico { position: relative; z-index: 2; filter: drop-shadow(0 0 18px var(--c)); }
.feature-art .orb { position: absolute; width: 110px; height: 110px; opacity: .55; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, var(--c) 45%, #0000 72%); filter: blur(2px); }
.feature-art .ring { position: absolute; width: 90px; height: 90px; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: ripple 3.6s ease-out infinite; }
.feature-art .ring.r2 { animation-delay: 1.2s; } .feature-art .ring.r3 { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: scale(.8); opacity: .8; } 100% { transform: scale(3.6); opacity: 0; } }
.feature-art.tv::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 5px); animation: scan 6s linear infinite; }
@keyframes scan { to { background-position: 0 200px; } }
.feature-body { padding: 18px 24px 24px; }
.feature-body h3 { margin: 10px 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.feature-body p { margin: 0 0 16px; color: var(--muted); }
.cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c); }
.feature:hover .cta .ico { transform: translateX(4px); } .cta .ico { transition: .2s; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--soft-2); color: var(--muted); border: 1px solid var(--line); }
.pill.live { color: var(--ok); background: rgba(79,227,161,.1); border-color: rgba(79,227,161,.3); }
.pill.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.tool-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: rgba(20,22,52,.4); border: 1px solid var(--line); transition: .25s;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--c) 40%, transparent); transform: translateY(-2px); }
.tool-card h4 { margin: 0 0 3px; font-size: 15px; }
.tool-card p { margin: 0; font-size: 13px; color: var(--dim); }
.tool-card .pill { margin-left: auto; flex: none; font-size: 9px; }
.tool-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }

.recent-row { max-width: 1180px; margin: 0 auto; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.recent-chip { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); white-space: nowrap; transition: .2s; }
.recent-chip:hover { border-color: var(--line-2); background: var(--glass-2); }
.recent-chip span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.rc-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; background: #fff1; }

.purpose { max-width: 1180px; margin: 54px auto 0; padding: 30px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(124,92,255,.14), rgba(58,209,255,.06)); }
.purpose h2 { margin: 0 0 8px; }
.purpose p { margin: 0; color: var(--muted); max-width: 760px; }
.foot { text-align: center; color: var(--dim); font-size: 13px; margin: 40px 0 0; }

/* ---------- shared bits ---------- */
.logo, .fallback { flex: none; }
span.fallback { display: grid; place-items: center; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #0004; background: linear-gradient(135deg, hsl(var(--h, 230) 62% 58%), hsl(calc(var(--h, 230) + 35) 60% 42%)); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: .15s; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--soft-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.fav, .icon-btn.fav:hover { color: var(--pink); }
.icon-btn.fav svg { fill: currentColor; }
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); }
.globe-tip { padding: 6px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font: 600 13px var(--font); color: var(--text); white-space: nowrap; }

/* ---------- player bar ---------- */
.playerbar {
  position: fixed; z-index: 45; left: calc(var(--rail) + 36px); right: 12px; bottom: 12px; height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 12px;
  border-radius: 20px; background: var(--panel); border: 1px solid var(--line-2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
  transform: translateY(120%); opacity: 0; pointer-events: none; transition: .35s cubic-bezier(.2,.9,.3,1.2);
}
.playerbar.show { transform: none; opacity: 1; pointer-events: auto; }
.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-art { position: relative; flex: none; border-radius: 12px; }
.pb-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: #fff1; display: grid; place-items: center; }
/* "now playing" equaliser: covers the logo with clear white bars (was a tiny dark box in the corner) */
.eq { position: absolute; inset: 0; display: none; gap: 3px; align-items: center; justify-content: center; border-radius: inherit; background: rgba(8, 10, 30, .5); pointer-events: none; }
.pb-art.on .eq { display: flex; }
.eq i { width: 4px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px rgba(255,255,255,.5); animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 4px; } to { height: 18px; } }
.pb-meta { min-width: 0; }
.pb-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-state.playing { color: var(--ok); } .pb-state.error { color: var(--pink); }
.pb-ctrls { display: flex; align-items: center; gap: 6px; }
.play-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--strong); background: var(--grad); box-shadow: 0 8px 24px -6px rgba(124,92,255,.8); transition: transform .15s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn.spin { background: conic-gradient(var(--accent-2), var(--accent), var(--accent-2)); animation: spin 1.4s linear infinite; }
.play-btn.spin .ico { animation: spin 1.4s linear infinite reverse; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.vol { width: 90px; accent-color: var(--accent-2); }

/* ---------- command palette ---------- */
.palette[hidden] { display: none; }
.palette { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 14vh; }
.pal-backdrop { position: absolute; inset: 0; background: rgba(4,5,16,.55); backdrop-filter: blur(6px); opacity: 0; transition: .18s; }
.pal-box { position: relative; width: min(620px, calc(100vw - 24px)); border-radius: 20px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px rgba(0,0,0,.6); transform: translateY(-10px) scale(.98); opacity: 0; transition: .18s; }
.palette.open .pal-backdrop { opacity: 1; } .palette.open .pal-box { transform: none; opacity: 1; }
.pal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input { flex: 1; background: none; border: 0; outline: 0; font-size: 17px; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.pal-item { --c: var(--accent); width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-align: start; color: var(--muted); }
.pal-item .ico { color: var(--c); }
.pal-item span:not(.ico) { flex: 1; color: var(--text); text-align: start; }
.pal-item small { color: var(--dim); }
.pal-item.sel { background: var(--soft-2); }
.pal-empty { padding: 26px; text-align: center; color: var(--dim); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 120; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; opacity: 0; transform: translateY(-8px); transition: .25s; }
.toast.in { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,92,138,.5); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  :root { --rail: 0px; }
  body.has-player { --player: 140px; }
  #rail { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 62px; flex-direction: row; padding: 0 10px; border-radius: 20px; }
  .brand { margin: 0; } .brand-mark { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
  .brand { display: none; }
  .rail-items, .rail-bottom { flex-direction: row; gap: 2px; }
  .rail-items { flex: 1; min-width: 0; justify-content: safe center; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin-bottom: -8px; }
  .rail-items::-webkit-scrollbar { display: none; }
  .rail-item { width: 44px; height: 44px; flex: none; }
  .rail-item.active::before { left: 12px; right: 12px; top: auto; bottom: -6px; width: auto; height: 3px; }
  .rail-label { display: none; }
  #view { margin-left: 0; }
  .page { padding: 18px 16px calc(90px + var(--player)); }
  .page.tool-page { height: calc(100dvh - 78px); }
  .playerbar { left: 8px; right: 8px; bottom: 78px; grid-template-columns: 1fr auto; }
  .pb-right .vol, .pb-ctrls .icon-btn { display: none; }
  .pb-ctrls.q .icon-btn { display: grid; width: 34px; height: 34px; } /* music / podcasts: keep previous / next on phones */
  .playerbar:has(.pb-ctrls.q) .pb-right { display: none; } .playerbar:has(.pb-ctrls.q) .pb-left { padding-right: 0; min-width: 0; }
  .pb-prog { min-width: 0; }
  .pb-right { position: absolute; right: 64px; } .pb-right > :not(:first-child):not(:last-child) { display: none; }
  .pb-left { padding-right: 90px; }
  .hero { margin-top: 2vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* home art: world clock (sweeping hand) */
.feature-art.clock::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 75%, color-mix(in srgb, var(--c) 55%, transparent)); animation: spin 6s linear infinite; }

/* home art: weather (floating cloud over sun) */
.feature-art.weather::before { content: ''; position: absolute; width: 70px; height: 70px; border-radius: 50%; left: calc(50% + 10px); top: 34px;
  background: radial-gradient(circle, #ffd166 55%, transparent 58%); filter: drop-shadow(0 0 18px #ffd166); animation: homesun 4s ease-in-out infinite alternate; }
@keyframes homesun { to { transform: scale(1.12); } }

/* home art: calculator (floating digits) */
.feature-art.calc::before { content: '7 + 3 × 2 = 13'; position: absolute; top: 26px; font: 800 15px var(--font); letter-spacing: .1em; color: color-mix(in srgb, var(--c) 80%, white); opacity: .55; animation: homesun 3s ease-in-out infinite alternate; }

/* home art: converter (currency symbols orbit) */
.feature-art.convert::before { content: '₼  $  €  ₺'; position: absolute; top: 28px; font: 800 18px var(--font); letter-spacing: .3em; color: color-mix(in srgb, var(--c) 80%, white); opacity: .6; animation: homesun 3s ease-in-out infinite alternate; }

/* ---------- rail: groups, favourites ---------- */
.rail-sep { flex: none; width: 26px; height: 1px; margin: 4px 0; background: var(--line-2); }
.rail-item.fav::after { content: '★'; position: absolute; right: 4px; top: 2px; font-size: 9px; color: var(--t-gold); }
.rail-star b { font-size: 20px; color: var(--dim); transition: .15s; }
.rail-star:hover b { color: var(--t-gold); }
.rail-star.on b { color: var(--t-gold); text-shadow: 0 0 12px rgba(255,209,102,.7); }

/* ---------- star button on cards ---------- */
.star { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 10px; font-size: 16px; line-height: 1; color: var(--dim); background: var(--field); opacity: 0; transition: .15s; z-index: 1; }
.star.on { opacity: 1; color: var(--t-gold); text-shadow: 0 0 10px rgba(255,209,102,.6); }
.star:hover { color: var(--t-gold); transform: scale(1.12); }
.tcard:hover .star, .qtile:hover .star, .star:focus-visible { opacity: 1; }
@media (hover: none) { .star { opacity: .7; } }

/* ---------- home: quick tiles ---------- */
.qtiles { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qtile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); transition: .2s; }
.qtile:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); transform: translateY(-2px); }
.qtile > span:not(.ico) { font-weight: 650; font-size: 14px; }
.qtile-ico, .tcard-ico { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.fav-hint { max-width: 1180px; margin: 30px auto 0; padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; }

/* ---------- home: categories ---------- */
.cat-bar { max-width: 1180px; margin: 0 auto 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.cat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 13px; font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--glass); border: 1px solid var(--line); transition: .15s; }
.cat-chip small { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--soft-2); color: var(--muted); }
.cat-chip:hover { color: var(--text); }
.cat-chip.on { color: var(--strong); background: linear-gradient(120deg, rgba(124,92,255,.35), rgba(58,209,255,.2)); border-color: rgba(124,92,255,.6); }
.cat-chip.on small { background: rgba(255,255,255,.18); color: var(--strong); }
.cat-searchbox { display: flex; align-items: center; gap: 8px; min-width: 220px; padding: 0 12px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); }
.cat-searchbox:focus-within { border-color: rgba(124,92,255,.6); }
.cat-search { flex: 1; min-width: 0; padding: 9px 0; background: none; border: 0; outline: 0; }
.cat-groups { max-width: 1180px; margin: 0 auto; }
.cat-group h3 { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 16px; letter-spacing: -0.01em; }
.cat-group h3 .ico { color: var(--accent-2); }
.cat-group h3 small { font-size: 12px; font-weight: 600; color: var(--dim); }
.tcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tcard { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 44px 16px 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 50%, transparent); box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--c) 70%, transparent); }
.tcard-t { min-width: 0; }
.tcard h4 { margin: 2px 0 4px; font-size: 15.5px; }
.tcard p { margin: 0; font-size: 13px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard.soon { opacity: .55; }
.tcard.soon .pill { position: absolute; top: 12px; right: 12px; font-size: 9px; }
@media (max-width: 760px) {
  .cat-searchbox { min-width: 0; width: 100%; }
  .qtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-sep { width: 1px; height: 26px; margin: 0 4px; }
  .rail-star { display: none; }
}

/* account avatar in the rail */
.rail-me .me-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1;
  background: color-mix(in srgb, var(--ac) 25%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac) 55%, transparent); }
.rail-me.in .me-av { box-shadow: inset 0 0 0 2px var(--ac), 0 0 0 2px color-mix(in srgb, var(--ok) 70%, transparent); }

/* ---------- PWA: install card, update banner, waiting screen, install guide ---------- */
.install-card { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(120deg, rgba(124,92,255,.22), rgba(58,209,255,.14)); border: 1px solid rgba(124,92,255,.35); }
.install-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-card > div { flex: 1; display: flex; flex-direction: column; min-width: 0; } .install-card small { color: var(--muted); }
.install-go { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; white-space: nowrap; }
.install-x { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); flex: none; } .install-x:hover { background: var(--soft-2); }
.rail-install { color: var(--accent-2) !important; }
#upd-banner { position: fixed; left: 50%; top: 14px; z-index: 300; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); transform: translate(-50%, -90px); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); font-size: 14px; }
#upd-banner.show { transform: translate(-50%, 0); }
#upd-banner button { padding: 7px 14px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 800; } #upd-banner button.x { padding: 7px 10px; background: var(--soft-2); color: var(--muted); }
#updating { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); opacity: 0; transition: opacity .3s; }
#updating.show { opacity: 1; }
.upd-in { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 340px; padding: 24px; text-align: center; } .upd-in b { font-size: 20px; } .upd-in span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.upd-logo { position: relative; width: 72px; height: 72px; margin-bottom: 6px; }
.upd-logo i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #7c5cff, #3ad1ff, #7c5cff); -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%); mask: radial-gradient(farthest-side, transparent 62%, #000 63%); animation: upd-rot 1.1s linear infinite; }
.upd-logo i + i { inset: 14px; animation-duration: 1.8s; animation-direction: reverse; opacity: .6; }
.upd-bar { width: 220px; height: 5px; border-radius: 9px; background: var(--soft-2); overflow: hidden; margin-top: 6px; } .upd-bar i { display: block; width: 40%; height: 100%; border-radius: 9px; background: var(--grad); animation: upd-slide 1.2s ease-in-out infinite; }
@keyframes upd-rot { to { transform: rotate(360deg); } } @keyframes upd-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.inst-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: end center; padding: 16px; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
@media (min-width: 640px) { .inst-modal { place-items: center; } }
.inst-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 24px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: inst-up .3s ease; }
@keyframes inst-up { from { transform: translateY(30px); opacity: 0; } }
.inst-head { display: flex; align-items: center; gap: 12px; } .inst-head img { width: 56px; height: 56px; border-radius: 14px; } .inst-head div { display: flex; flex-direction: column; } .inst-head b { font-size: 18px; } .inst-head small { color: var(--muted); }
.inst-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.45; }
.inst-ico { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--soft-3); font-weight: 800; }
.inst-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.inst-ok { padding: 12px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; }
.retry-btn { margin-left: 10px; padding: 6px 12px; border-radius: 10px; background: var(--soft-2); font-weight: 700; }
/* installed app: respect phone notches / home indicator */
@media (display-mode: standalone) { body { padding-top: env(safe-area-inset-top); } }

/* home: sign in / sign up (shown when accounts are configured and nobody is signed in) */
.hero-auth { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.hero-auth small { flex-basis: 100%; text-align: center; color: var(--dim); font-size: 12.5px; }
.hero-auth-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--text); background: var(--soft-2); border: 1px solid var(--line); text-decoration: none; transition: transform .15s, background .15s; }
.hero-auth-btn:hover { background: var(--soft-3); transform: translateY(-1px); }
.hero-auth-btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 30px -12px rgba(124,92,255,.8); }

/* ================= Dashboard shell (sidebar + dashboard + modules) ================= */
:root { --side: 252px; --rail: var(--side); }
body.side-mini { --side: 76px; --rail: 76px; }
/* sidebar — reuses #rail */
#rail { width: var(--side); align-items: stretch; gap: 8px; padding: 12px 10px; transition: width .2s; }
.sb-top { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
#rail .brand { display: flex; align-items: center; gap: 10px; margin: 0; flex: 1; min-width: 0; }
#rail .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 19px; flex: none; }
#rail .brand-name { display: block; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.sb-collapse, .sb-close { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); background: var(--soft); font-size: 15px; flex: none; }
.sb-collapse:hover { color: var(--text); background: var(--soft-2); } .sb-close { display: none; }
.sb-search { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.sb-search:hover { border-color: var(--line-2); color: var(--text); } .sb-search .sb-label { flex: 1; text-align: start; } .sb-search kbd { font-size: 10px; padding: 3px 5px; }
.sb-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; margin: 0 -4px; padding: 0 4px; }
.sb-item { --c: var(--accent); position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.sb-item:hover { background: var(--soft-2); color: var(--text); }
.sb-item.active { color: var(--strong); background: color-mix(in srgb, var(--c) 18%, transparent); font-weight: 600; }
.sb-item.active::before { content: ''; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--c); }
.sb-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.sb-item.home .sb-ic, .sb-item.apps .sb-ic { color: var(--text); background: var(--soft-2); }
.sb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-hide { opacity: 0; width: 22px; height: 22px; border-radius: 6px; color: var(--dim); font-size: 11px; flex: none; }
.sb-item:hover .sb-hide { opacity: 1; } .sb-hide:hover { background: var(--soft-3); color: var(--text); }
@media (hover: none) { .sb-hide { display: none; } }
.sb-count { color: var(--dim); font-size: 11.5px; }
.sb-group { display: flex; flex-direction: column; margin-top: 6px; }
.sb-gh { display: flex; align-items: center; gap: 7px; padding: 6px 8px 4px; color: var(--dim); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-align: start; border-radius: 8px; }
.sb-gh:hover { color: var(--muted); } .sb-gh > span:not(.ico) { flex: 1; min-width: 0; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sb-gh small { font-weight: 600; letter-spacing: 0; opacity: .7; }
.sb-gh.static b { color: #ffc94d; }
.sb-chev { font-style: normal; transition: transform .2s; transform: rotate(-90deg); } .sb-group.open .sb-chev { transform: none; }
.sb-gitems { display: none; flex-direction: column; gap: 1px; } .sb-group.open .sb-gitems { display: flex; }
.sb-bottom { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sb-me { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; }
.sb-me:hover, .sb-me.active { background: var(--soft-2); }
.sb-me .me-av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-size: 18px; background: color-mix(in srgb, var(--ac) 25%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ac) 55%, transparent); }
.sb-me.in .me-av { box-shadow: inset 0 0 0 2px var(--ac), 0 0 0 2px color-mix(in srgb, var(--ok) 70%, transparent); }
.sb-me .sb-label { display: flex; flex-direction: column; } .sb-me .sb-label b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; } .sb-me .sb-label small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.sb-tools { display: flex; gap: 6px; } .sb-tool { flex: 1; display: grid; place-items: center; height: 34px; border-radius: 10px; background: var(--soft); color: var(--muted); }
.sb-tool:hover { background: var(--soft-2); color: var(--text); } .sb-tool.on { color: #ffc94d; } .sb-tool.lang b { font-size: 12px; }
/* collapsed (icons only) */
body.side-mini #rail { padding: 12px 8px; }
body.side-mini #rail :is(.brand-name, .sb-label, .sb-gh, .sb-hide, .sb-count, .sb-search kbd) { display: none; }
body.side-mini .sb-top { flex-direction: column; } body.side-mini .sb-gitems { display: flex; }
body.side-mini .sb-item, body.side-mini .sb-search, body.side-mini .sb-me { justify-content: center; padding: 6px 0; }
body.side-mini .sb-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
body.side-mini .sb-tools { flex-direction: column; } body.side-mini .sb-tool { flex: none; height: 30px; }
/* sidebar: live module search, recent chips, coloured category accordion */
.sb-search { cursor: text; } .sb-search:focus-within { border-color: var(--accent); color: var(--text); }
.sb-q { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 0; }
.sb-q::placeholder { color: var(--dim); } .sb-q::-webkit-search-cancel-button { cursor: pointer; }
.sb-search kbd { cursor: pointer; } .sb-search:focus-within kbd { display: none; }
.sb-mini-search { display: none; }
.sb-scroll.searching .sb-menu { display: none; }
.sb-menu { display: flex; flex-direction: column; gap: 2px; }
.sb-results { display: flex; flex-direction: column; gap: 2px; }
.sb-rh { display: flex; justify-content: space-between; padding: 8px 8px 4px; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
#rail .sb-results .sb-item .sb-label { display: flex; flex-direction: column; line-height: 1.25; } .sb-results .sb-item .sb-label small { color: var(--dim); font-size: 11.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.sb-results .sb-item.sel { background: var(--soft-3); color: var(--text); }
.sb-results .sb-item.off { opacity: .8; }
.sb-add { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--soft-2); color: var(--text); font-size: 14px; font-weight: 700; }
.sb-add:hover { background: var(--accent); color: #fff; }
.sb-none { display: grid; gap: 10px; justify-items: center; padding: 22px 8px; color: var(--dim); font-size: 13.5px; text-align: center; }
.sb-none button { padding: 6px 12px; border-radius: 9px; background: var(--soft-2); color: var(--text); font-size: 13px; font-weight: 600; }
.sb-recent { padding: 8px 8px 2px; } .sb-recent > small { display: block; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.sb-recent > div { display: flex; gap: 6px; flex-wrap: wrap; }
.sb-chip { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); transition: transform .15s, color .15s; }
.sb-chip:hover { transform: translateY(-2px); color: var(--text); background: var(--soft-2); }
.sb-sec { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 2px; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sb-sec button { color: var(--dim); font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 2px 6px; border-radius: 6px; } .sb-sec button:hover { color: var(--text); background: var(--soft-2); }
:root .sb-group:not(.fav) > .sb-gh { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 8px; margin: 0; }
:root .sb-group:not(.fav) > .sb-gh:hover { background: var(--soft-2); color: var(--text); }
.sb-group.open:not(.fav) > .sb-gh { color: var(--text); }
.sb-gh > span.sb-gic, .sb-gh > span.sb-dots { flex: none; }
.sb-gic { display: grid; place-items: center; width: 20px; height: 20px; flex: none; color: var(--dim); }
.sb-group.open .sb-gic, .sb-gh:hover .sb-gic { color: var(--text); }
.sb-dots { display: none !important; }
.sb-group:not(.fav) .sb-gitems { margin: 2px 0 6px 11px; padding-left: 8px; border-left: 1px solid var(--line); }
.sb-group.open .sb-gitems { animation: sbOpen .18s ease; } @keyframes sbOpen { from { opacity: 0; transform: translateY(-4px); } }
.sb-item.apps .sb-label { font-weight: 600; }
body.side-mini .sb-search, body.side-mini :is(.sb-recent, .sb-sec, .sb-dots) { display: none; }
body.side-mini .sb-mini-search { display: grid; place-items: center; height: 34px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
body.side-mini .sb-group:not(.fav) .sb-gitems { margin: 0; padding: 0; border: 0; }
#tabbar { display: none; }
/* disabled-module banner */
/* Floats at the bottom centre of the content area (never over the module's header / tab bar; toasts stay at the top),
   above the player bar, and above the cookie bar while that is open (--ck-h = cookie bar top to viewport bottom, measured in app.js). It wraps
   to two lines instead of shrinking, and leaves by itself after a while unless the pointer or focus is on it. */
#modbar { --mb-gap: 16px; position: fixed; z-index: 60; top: auto; bottom: calc(var(--player) + var(--mb-gap) + env(safe-area-inset-bottom, 0px)); left: calc(var(--side) + (100vw - var(--side)) / 2); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; box-sizing: border-box; width: max-content; min-width: min(380px, calc(100vw - var(--side) - 32px)); max-width: min(640px, calc(100vw - var(--side) - 32px));
  padding: 8px 8px 8px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .45); font-size: 14px; animation: mb-in .25s ease-out; }
body:has(#cookie-bar) #modbar { bottom: calc(var(--ck-h, 150px) + 12px); }
#modbar > svg, #modbar > .ico { flex: none; color: var(--muted); }
#modbar > span { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
#modbar button { min-height: 32px; padding: 6px 12px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 600; white-space: nowrap; } #modbar button.x { min-width: 32px; background: var(--soft-2); color: var(--muted); padding: 6px 9px; }
#modbar button.x:hover { color: var(--text); background: var(--soft-3); }
@keyframes mb-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { #modbar { animation: none; } }
/* phones: full width between the gutters, above the tab bar (and the player bar when it plays) */
@media (max-width: 760px) { #modbar { left: 12px; right: 12px; transform: none; width: auto; min-width: 0; max-width: none; bottom: calc(max(78px, var(--player) + 8px) + env(safe-area-inset-bottom, 0px)); }
  body:has(#cookie-bar) #modbar { bottom: calc(var(--ck-h, 270px) + 10px); }
  @keyframes mb-in { from { opacity: 0; transform: translateY(10px); } } }
/* very narrow phones (320 px, long az labels): let the button label wrap instead of pushing × off-screen */
@media (max-width: 380px) { #modbar { gap: 8px; padding-left: 10px; } #modbar button:not(.x) { white-space: normal; } }

/* ---------- dashboard ---------- */
.dx-head { max-width: 1280px; margin: 6px auto 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dx-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; } .dx-head p { margin: 4px 0 0; color: var(--muted); }
.dx-head-r { display: flex; gap: 8px; flex-wrap: wrap; }
.dx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.dx-btn:hover { border-color: var(--line-2); background: var(--soft-2); } .dx-btn.on { border-color: var(--accent); color: var(--accent-2); } .dx-btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.dx-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1280px; margin: 0 auto 16px; padding: 14px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-2); color: var(--muted); font-size: 15px; text-align: start; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: .2s; }
.dx-search > span:not(.ico) { flex: 1; text-align: start; } .dx-search:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
@media (max-width: 760px) { .dx-search kbd { display: none; } }
.dx-cta { max-width: 1280px; margin: 0 auto 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: 18px; }
.dx-cta > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; } .dx-cta small { color: var(--muted); }
.dx-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; grid-auto-flow: dense; }
.dx-w { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: 22px; min-width: 0; transition: box-shadow .2s, transform .2s; }
.dx-w.s-s { grid-column: span 4; } .dx-w.s-m { grid-column: span 6; } .dx-w.s-l { grid-column: span 12; }
@media (max-width: 1150px) { .dx-w.s-s { grid-column: span 6; } }
@media (max-width: 700px) { .dx-w.s-s, .dx-w.s-m { grid-column: span 12; } }
.dx-w > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.dx-w > header > b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.dx-w.edit { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); cursor: grab; } .dx-w.drag { opacity: .45; }
.dx-wtools { display: flex; gap: 4px; } .dx-wtools button, .dx-grip { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--soft-2); color: var(--muted); font-size: 13px; }
.dx-wtools button:hover { color: var(--text); background: var(--soft-3); } .dx-grip { cursor: grab; }
.dx-wbody { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dx-loading { color: var(--dim); padding: 14px 0; } .dx-err, .dx-note { color: var(--dim); font-size: 13.5px; margin: 0; }
.dx-more { align-self: flex-start; color: var(--accent-2); font-size: 13px; font-weight: 600; margin-top: auto; }
.dx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.dx-tiles.sm { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.dx-tile { --c: var(--accent); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; line-height: 1.25; transition: transform .15s, border-color .15s, background .15s; }
.dx-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
.dx-tile-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); font-size: 22px; }
.dx-tile.sm { flex-direction: row; justify-content: flex-start; text-align: start; padding: 8px; } .dx-tile.sm .dx-tile-ic { width: 32px; height: 32px; border-radius: 10px; }
.dx-tile.add { border-style: dashed; color: var(--muted); } .dx-tile.add .dx-tile-ic { color: var(--muted); background: var(--soft-2); }
.dx-time { font-size: 40px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dx-wbody > small { color: var(--muted); }
.dx-zones { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; } .dx-zones div { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); } .dx-zones b { color: var(--text); font-variant-numeric: tabular-nums; }
.dx-wx { display: flex; align-items: center; gap: 12px; } .dx-wx-ic { width: 72px; height: 72px; flex: none; } .dx-wx-ic svg { width: 100%; height: 100%; }
.dx-wx > div:last-child { display: flex; flex-direction: column; } .dx-wx small { color: var(--muted); }
.dx-big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; } .dx-big.sm { font-size: 30px; } .dx-big small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.dx-wx-row { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.dx-fx { display: flex; flex-direction: column; gap: 6px; } .dx-fx div { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; background: var(--soft); font-size: 14px; } .dx-fx span { font-variant-numeric: tabular-nums; }
.dx-news { display: flex; flex-direction: column; gap: 8px; } .dx-news a { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.dx-news a:hover span { color: var(--accent-2); } .dx-news img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.dx-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.dx-chats, .dx-notes { display: flex; flex-direction: column; gap: 6px; }
.dx-chats a { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--soft); font-size: 14px; }
.dx-chats i { font-style: normal; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #25d366; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.dx-notes a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--soft); border-left: 3px solid var(--k); }
.dx-notes small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-stations { display: flex; flex-wrap: wrap; gap: 6px; } .dx-stations a { padding: 6px 10px; border-radius: 999px; background: var(--soft-2); font-size: 13px; }
.dx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* home start page: inbox row, Today strip, Continue, pinned modules, suggestions (assets/js/dashboard.js, home/*.js) */
.dx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.dx-top { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.dx-top:empty { display: none; }
.dx-sec { position: relative; min-width: 0; }
.dx-sec.edit { outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 6px; border-radius: var(--r, 12px); }
.dx-sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; min-height: 28px; }
.dx-sec-h h2 { margin: 0; flex: 1; min-width: 0; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.dx-sec-more { flex: none; padding: 4px 8px; border-radius: 6px; color: var(--accent); font-size: 13px; font-weight: 600; background: none; border: 0; min-height: 32px; cursor: pointer; }
.dx-sec-more:hover { background: var(--soft-2); }
.dx-hint { color: var(--muted); font-size: 12.5px; }
.dx-x { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.dx-x:hover { color: var(--text); background: var(--soft-2); }
.dx-x.abs { position: absolute; top: -12px; inset-inline-end: -12px; z-index: 1; }
.dx-hidden-secs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.dx-skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--soft) 0%, var(--soft-3) 50%, var(--soft) 100%); background-size: 200% 100%; animation: dx-sk 1.4s ease-in-out infinite; }
.dx-skel.s { width: 60%; margin-top: 8px; }
@keyframes dx-sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .dx-skel { animation: none; } }
.dx-wbody .dx-skel:first-child { margin-top: 6px; }

/* inbox: Messages · Mail · Notifications */
.dx-ib-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dx-ib { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: var(--r, 12px); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600; min-width: 0; }
.dx-ib:hover { background: var(--soft-2); border-color: var(--line-2); }
.dx-ib > .ico { color: var(--muted); flex: none; }
.dx-ib > span:not(.ico) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-ib .ur-badge.dx-ib-n { position: static; height: 22px; min-width: 22px; padding: 0 7px; border-radius: 11px; font-size: 12px; line-height: 22px; text-align: center; }
.dx-ib-zero { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.dx-ib-zero[hidden] { display: none; }

/* Today */
.dx-td-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; scroll-snap-type: x proximity; }
.dx-td { flex: 1 1 190px; max-width: 380px; min-height: 128px; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r, 12px); background: var(--surface); border: 1px solid var(--line); scroll-snap-align: start; min-width: 0; }
.dx-td.dx-now { flex: 0 0 auto; min-width: 170px; }
.dx-td.dx-now.solo { flex: 1 1 auto; max-width: none; min-height: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; }
.dx-td.dx-now.solo .dx-td-h { grid-column: 1 / -1; }
.dx-td-h { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; min-height: 24px; }
.dx-td-h:hover { color: var(--text); }
.dx-td-h > span:not(.ico) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-now-t { font-size: 34px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dx-td small { color: var(--muted); }
.dx-td-wx { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.dx-td-wxic { width: 46px; height: 46px; flex: none; } .dx-td-wxic svg { width: 100%; height: 100%; }
.dx-td-big { font-size: 30px; font-weight: 650; letter-spacing: -.02em; flex: none; }
.dx-td-col { display: flex; flex-direction: column; min-width: 0; } .dx-td-col > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-td-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.dx-td-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dx-td-list a, .dx-td-list label { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 2px 6px; margin: 0 -6px; border-radius: 6px; font-size: 14px; color: var(--text); cursor: pointer; min-width: 0; }
.dx-td-list a:hover, .dx-td-list label:hover { background: var(--soft-2); }
.dx-td-list time { flex: none; min-width: 44px; color: var(--accent); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dx-td-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-td-list input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.dx-td-list small { flex: none; font-size: 12px; } .dx-td-list small.late { color: var(--danger); font-weight: 600; }
.dx-td-more { font-size: 13px; color: var(--accent); font-weight: 600; }
.dx-td-done { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13.5px; }
.dx-td-habits { display: flex; flex-wrap: wrap; gap: 6px; }
.dx-td-hab { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--soft); color: var(--text); font-size: 13px; cursor: pointer; }
.dx-td-hab > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-td-hab:hover:not(:disabled) { border-color: var(--accent); }
.dx-td-hab.on { border-color: transparent; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--muted); cursor: default; text-decoration: line-through; }

/* Continue where you left off */
.dx-rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.dx-rs { --c: var(--accent); display: flex; align-items: flex-start; gap: 12px; padding: 12px; min-height: 76px; border-radius: var(--r, 12px); background: var(--surface); border: 1px solid var(--line); color: var(--text); min-width: 0; }
.dx-rs:hover { background: var(--soft-2); border-color: var(--line-2); }
.dx-rs .dx-tile-ic { flex: none; }
.dx-rs-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dx-rs-m { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dx-rs-m > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-rs-when { flex: none; font-weight: 500; }
.dx-rs-t, .dx-rs-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-rs-t { font-size: 14.5px; font-weight: 600; } .dx-rs-sub { color: var(--muted); font-size: 12.5px; min-height: 1.3em; }

/* pinned modules: reorder while customizing */
.dx-tiles.edit { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.dx-pin { display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); cursor: grab; min-width: 0; }
.dx-pin.drag { opacity: .45; }
.dx-pin-tools { display: flex; gap: 4px; justify-content: flex-end; }
.dx-pin-tools button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.dx-pin-tools button:hover { color: var(--text); background: var(--soft-2); }
[dir="rtl"] .dx-pin-tools .ico { transform: scaleX(-1); }

/* suggestions for new users */
.dx-sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.dx-sg { --c: var(--accent); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; min-height: 64px; border-radius: var(--r, 12px); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.dx-sg.skel { flex-direction: column; align-items: stretch; justify-content: center; padding: 12px; }
.dx-sg-a { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); padding: 4px 0; }
.dx-sg-b { display: flex; flex-direction: column; min-width: 0; } .dx-sg-b b { font-size: 14px; } .dx-sg-b small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.dx-sg-pin { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: var(--soft); color: var(--text); cursor: pointer; }
.dx-sg-pin:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) {
  .dx-ib { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; font-size: 13px; }
  .dx-ib .ur-badge.dx-ib-n { position: absolute; top: 8px; inset-inline-end: 8px; }
  .dx-ib-zero { display: none; }
  .dx-td-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .dx-td { max-width: none; min-height: 0; padding: 10px 12px; }
  .dx-td.dx-now { min-width: 0; }
  .dx-td-events, .dx-td-tasks, .dx-td-habits, .dx-td.dx-now.solo, .dx-td.dx-now:last-child { grid-column: 1 / -1; }
  .dx-td-weather .dx-td-wxic { width: 34px; height: 34px; } .dx-td-weather .dx-td-big { font-size: 24px; }
  .dx-td-weather .dx-td-col small:last-child { display: none; }
  .dx-now-t { font-size: 26px; }
  .dx-rs:nth-child(n+5) { display: none; }
  .dx-rs-grid, .dx-sg-grid { grid-template-columns: minmax(0, 1fr); }
  .dx-rs { min-height: 68px; padding: 10px; }
  .dx-x.abs { top: -8px; inset-inline-end: -4px; }
}
@media (max-width: 420px) {
  .dx-td-weather .dx-td-wx { flex-wrap: wrap; row-gap: 2px; gap: 6px; }
  .dx-td-weather .dx-td-col { flex-basis: 100%; }
  .dx-td-weather .dx-td-wxic { width: 30px; height: 30px; }
}
/* first-run modal */
.dx-modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 14px; }
.dx-modal { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; padding: 26px; border-radius: 26px; display: flex; flex-direction: column; gap: 12px; text-align: center; background: var(--panel-2); }
.dx-modal h2 { margin: 0; } .dx-modal p { margin: 0; color: var(--muted); line-height: 1.5; }
.dx-ob-ic { font-size: 44px; }
.dx-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 480px) { .dx-presets { grid-template-columns: 1fr; } }
.dx-preset { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line-2); text-align: start; }
.dx-preset:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); } .dx-preset small { color: var(--dim); }
.dx-sep { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12.5px; } .dx-sep::before, .dx-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.dx-catpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dx-cat { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); text-align: start; font-size: 14px; }
.dx-cat span { flex: 1; } .dx-cat.on { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.dx-ob-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* ---------- module catalogue (#/apps) ---------- */
.ap-head { max-width: 1280px; margin: 6px auto 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ap-head h1 { display: flex; align-items: center; margin: 0; font-size: clamp(24px, 3vw, 32px); } .ap-head p { margin: 6px 0 0; color: var(--muted); max-width: 700px; }
.ap-stats { padding: 8px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); } .ap-stats b { color: var(--text); font-size: 18px; }
.ap-bar { position: sticky; top: 0; z-index: 5; max-width: 1280px; margin: 0 auto 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 0; }
.ap-sbox { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-2); color: var(--dim); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.ap-search { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; }
.ap-seg { display: flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); }
.ap-seg button { padding: 6px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; } .ap-seg button.on { background: var(--soft-3); color: var(--text); }
.ap-cat { max-width: 1280px; margin: 0 auto 22px; scroll-margin-top: 80px; }
.ap-chips { max-width: 1280px; margin: -6px auto 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.ap-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface, var(--glass)); color: var(--muted); font-size: 13px; font-weight: 600; }
.ap-chips button:first-child { padding-left: 12px; }
.ap-chips button:hover { color: var(--text); border-color: var(--line-2); } .ap-chips button.on { color: var(--text); border-color: var(--line-2); background: var(--soft-2); }
.ap-chips small { color: var(--dim); font-weight: 500; }
.ap-chic { display: grid; place-items: center; width: 18px; height: 18px; color: var(--dim); } .ap-chic.big { width: 22px; height: 22px; color: var(--muted); }
.ap-cat > header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); }
.ap-cat > header h3 { margin: 0; font-size: 16px; color: var(--text); } .ap-cat > header small { flex: 1; color: var(--dim); }
.ap-bulk { padding: 6px 10px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 12.5px; font-weight: 600; } .ap-bulk:hover { color: var(--text); background: var(--soft-2); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ap-card { --c: var(--accent); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); opacity: .72; transition: opacity .15s, border-color .15s; }
.ap-card.on { opacity: 1; border-color: color-mix(in srgb, var(--c) 40%, transparent); } .ap-card:hover { opacity: 1; }
.ap-ic { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.ap-b { flex: 1; min-width: 0; } .ap-b b { font-size: 15px; } .ap-b p { margin: 2px 0 0; font-size: 12.5px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-switch { position: relative; flex: none; width: 46px; height: 27px; cursor: pointer; }
.ap-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ap-switch i { position: absolute; inset: 0; border-radius: 27px; background: var(--soft-3); transition: background .2s; pointer-events: none; }
.ap-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: transform .2s; }
.ap-switch input:checked + i { background: var(--c); } .ap-switch input:checked + i::after { transform: translateX(19px); }
.ap-switch input:focus-visible + i { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.ap-switch.core { opacity: .55; cursor: default; }
.ap-empty { text-align: center; color: var(--dim); padding: 40px; }

/* ---------- mobile: the sidebar is replaced by the bottom bar + «All» sheet (modern.css «mobile bottom nav») ---------- */
@media (max-width: 760px) {
  :root, body.side-mini { --rail: 0px; --side: 0px; }
  .dx-head { margin-top: 0; } .dx-head-r { width: 100%; } .dx-head-r .dx-btn { flex: 1; }
  .dx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .dx-tile { padding: 12px 4px 10px; font-size: 12px; } .dx-tile-ic { width: 42px; height: 42px; }
  .ap-grid { grid-template-columns: 1fr; }
}

/* ================= calls (global overlay, tools/chat/call.js) ================= */
#omnia-call { position: fixed; z-index: 400; inset: 0; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 30%, #23305e, #070816 70%); color: #fff; }
#omnia-call.min { inset: auto 16px calc(16px + var(--player)) auto; width: 300px; height: auto; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px -10px rgba(0,0,0,.7); }
@media (max-width: 760px) { #omnia-call.min { right: 8px; left: 8px; width: auto; bottom: 80px; } }
.cl-stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; overflow: hidden; }
#omnia-call.min .cl-stage { height: 170px; flex: none; }
#omnia-call.min.audio .cl-stage { height: auto; padding: 14px; }
/* group calls (mesh ≤ 4): tiles */
.cl-grid { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; padding: 22px 12px 12px; align-content: center; }
.cl-tile { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.07); }
.cl-tile video { width: 100%; height: 100%; object-fit: cover; } .cl-tile video.mirror { transform: scaleX(-1); }
.cl-tile .cl-av { width: 72px; height: 72px; font-size: 28px; background: linear-gradient(135deg, #5b8cff, #7c5cff); }
.cl-tile small { position: absolute; left: 10px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.45); font-size: 12px; }
.cl-tile { cursor: pointer; transition: box-shadow .15s; } .cl-tile.speaking { box-shadow: 0 0 0 3px #25d366, 0 0 24px rgba(37, 211, 102, .45); }
#omnia-call.focus .cl-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: min-content; } #omnia-call.focus .cl-tile.big { grid-column: 1 / -1; order: -1; aspect-ratio: 16 / 9; }
.cl-note b { font-weight: 700; } .cl-gtime { font-variant-numeric: tabular-nums; }
.cl-note { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); opacity: .7; font-size: 12px; white-space: nowrap; }
#omnia-call.min .cl-grid { grid-template-columns: repeat(4, 1fr); padding: 18px 6px 6px; } #omnia-call.min .cl-tile .cl-av { width: 36px; height: 36px; font-size: 15px; }
.cl-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#omnia-call.min .cl-remote { object-fit: cover; }
.cl-local { position: absolute; right: 16px; bottom: 16px; width: min(26vw, 220px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 10px 30px rgba(0,0,0,.5); background: #111; }
.cl-local.mirror { transform: scaleX(-1); }
#omnia-call.min .cl-local { width: 70px; right: 8px; bottom: 8px; border-radius: 10px; }
.cl-who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 20px; }
.cl-who b { font-size: 26px; } .cl-who small { font-size: 15px; opacity: .8; } .cl-e2e { font-style: normal; font-size: 12px; opacity: .55; }
#omnia-call.min .cl-who { flex-direction: row; gap: 10px; padding: 0; text-align: start; } #omnia-call.min .cl-who b { font-size: 16px; } #omnia-call.min .cl-e2e { display: none; }
.cl-av { display: grid; place-items: center; border-radius: 50%; object-fit: cover; font-weight: 700; color: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 60px rgba(124,92,255,.5); }
#omnia-call:not(.min) .cl-who .cl-av { animation: cl-pulse 2s ease-in-out infinite; }
@keyframes cl-pulse { 50% { box-shadow: 0 0 0 14px rgba(255,255,255,.04), 0 0 80px rgba(124,92,255,.7); } }
.cl-top { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; padding: 8px 16px; border-radius: 14px; background: rgba(0,0,0,.4); }
.cl-time { font-variant-numeric: tabular-nums; }
.cl-bar { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.45)); }
#omnia-call.min .cl-bar { gap: 6px; padding: 8px; background: #11152e; }
.cl-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; min-width: 64px; }
.cl-btn span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 23px; transition: transform .15s, background .15s; backdrop-filter: blur(10px); }
.cl-btn:hover span { transform: scale(1.06); background: rgba(255,255,255,.24); }
.cl-btn.off span { background: #fff; color: #111; } .cl-btn small { font-size: 12px; opacity: .85; }
.cl-btn.red span { background: #ff3b4e; } .cl-btn.green span { background: #25d366; }
.cl-btn.green span { animation: cl-ring 1.2s ease-in-out infinite; } @keyframes cl-ring { 50% { transform: scale(1.1); } }
#omnia-call.min .cl-btn { min-width: 0; } #omnia-call.min .cl-btn span { width: 40px; height: 40px; font-size: 17px; } #omnia-call.min .cl-btn small { display: none; }

/* ---------------- Language menu + on-device translation offer ---------------- */
#langmenu { position: fixed; z-index: 130; width: min(340px, calc(100vw - 16px)); max-height: min(78vh, 620px); overflow: auto; padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-content: start; }
#langmenu .lm-h { grid-column: 1 / -1; }
#langmenu .lm-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; color: var(--dim); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.lm-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-align: start; }
.lm-item b { flex: 1; font-weight: 600; } .lm-item small { color: var(--dim); font-size: 11px; font-weight: 700; }
.lm-item:hover, .lm-item:focus-visible { background: var(--soft-2); outline: none; }
.lm-item.on { background: color-mix(in srgb, var(--accent) 18%, transparent); } .lm-item.on small { color: var(--accent); }
#i18n-offer { position: fixed; z-index: 110; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); width: max-content; padding: 8px 8px 8px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: var(--shadow); font-size: 13.5px; }
#i18n-offer .btn { flex: none; padding: 8px 12px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; }
#i18n-offer .x { flex: none; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); font-size: 18px; }
@media (max-width: 760px) { #i18n-offer { bottom: 82px; } }

/* inline "Translate" for content in modules (core/translate-ui.js: social posts, mail, news) */
.mt-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: transparent; text-decoration: none; }
.mt-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mt-block { margin: 6px 0; padding: 8px 12px; border-radius: 12px; border-inline-start: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); display: grid; gap: 4px; }
.mt-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.mt-meta { color: var(--muted); font-size: 11.5px; }
.mt-err { border-inline-start-color: #f59e0b; }

/* ---------------- Right-to-left (Arabic) ---------------- */
[dir="rtl"] body { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }
[dir="rtl"] #rail { left: auto; right: 12px; }
[dir="rtl"] #view { margin-left: 0; margin-right: calc(var(--rail) + 24px); }
[dir="rtl"] .playerbar { left: 12px; right: calc(var(--rail) + 36px); }
[dir="rtl"] .sb-item.active::before { left: auto; right: -6px; }
[dir="rtl"] .rail-item.active::before { left: auto; right: -13px; }
[dir="rtl"] .tool-card .pill { margin-left: 0; margin-right: auto; }
[dir="rtl"] .dx-notes a { border-left: 0; border-right: 3px solid var(--k); }
[dir="rtl"] .star, [dir="rtl"] .tcard.soon .pill { right: auto; left: 10px; }
[dir="rtl"] .retry-btn { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .inst-steps { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .ap-switch input:checked + i::after { transform: translateX(-19px); }
[dir="rtl"] .ap-switch i::after { left: auto; right: 3px; }
[dir="rtl"] .feature:hover .cta .ico { transform: translateX(-4px) scaleX(-1); }
[dir="rtl"] :is(.cta, .dx-more) .ico { transform: scaleX(-1); }
@media (min-width: 761px) { [dir="rtl"] #modbar { left: calc((100vw - var(--side)) / 2); } }
@media (max-width: 760px) {
  [dir="rtl"] #view { margin-right: 0; }
  [dir="rtl"] .playerbar { left: 8px; right: 8px; }
  [dir="rtl"] .pb-right { right: auto; left: 64px; } [dir="rtl"] .pb-left { padding-right: 0; padding-left: 90px; }
}
/* sidebar footer links (feedback / about / contact) */
.sb-links { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 2px 8px 6px; font-size: 12px; }
.sb-links a { color: var(--dim); text-decoration: none; } .sb-links a:hover { color: var(--text); }
body.side-mini .sb-links { display: none; }
/* player: seek bar for on-demand tracks */
.pb-ctrls:has(.pb-prog) { flex-wrap: wrap; justify-content: center; row-gap: 0; }
.pb-prog { flex-basis: 100%; display: flex; align-items: center; gap: 8px; min-width: 240px; }
.pb-seek { flex: 1; height: 4px; accent-color: var(--accent); cursor: pointer; }
.pb-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.playerbar:has(.pb-prog) { height: 74px; }
a.pb-art { text-decoration: none; }
@media (max-width: 760px) {
  .pb-prog { position: absolute; left: 14px; right: 14px; top: 2px; min-width: 0; } .pb-time { display: none; }
  .playerbar:has(.pb-prog) { height: 64px; }
}

/* site-wide announcement / maintenance bar (admin panel → site settings), top of the dashboard */
#sitebar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 10px 10px 16px; border-radius: 14px; font-size: 14px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
#sitebar > span { flex: 1; min-width: 0; }
#sitebar.info { border-color: rgba(124,92,255,.5); } #sitebar.ok { border-color: rgba(34,197,94,.55); } #sitebar.warn { border-color: rgba(245,183,0,.65); background: color-mix(in srgb, #f5b700 12%, var(--panel-2)); }
#sitebar a { color: var(--accent, #7c5cff); font-weight: 700; }
#sitebar button { flex: none; padding: 4px 8px; border-radius: 8px; color: var(--muted); background: var(--soft-2); }
.sb-links a.sb-admin { color: #e5484d; font-weight: 700; }
/* 🌍 country rules (Admin → Country access): block page, module «not in your country», admin preview bar */
body.geo-blocked #rail, body.geo-blocked #tabbar, body.geo-blocked #wtabs { display: none !important; }
body.geo-blocked { --side: 0px; }
.geo-block { display: grid; place-items: center; min-height: 70vh; }
.geo-block-box { max-width: 520px; padding: 28px; border-radius: 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.geo-block-box h1 { font-size: 22px; margin: 0; }
.geo-block-box p { margin: 0; color: var(--muted); }
.geo-block-box .geo-msg { color: var(--text); background: var(--soft-2); border-radius: 12px; padding: 10px 14px; }
.geo-ic { font-size: 40px; line-height: 1; }
.site-off .geo-ic { font-size: 32px; }
.site-off b { color: var(--text); }
#geo-preview { position: fixed; z-index: 120; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px; font-size: 13px; border: 1px solid rgba(245,183,0,.65); }
#geo-preview button { padding: 4px 10px; border-radius: 999px; background: var(--soft-2); color: var(--text); font-weight: 600; }
/* Cloudflare Turnstile box (only visible when the check needs an interaction) */
.human-box { position: fixed; z-index: 200; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
.human-box:empty { display: none; }

/* player: compact pill while browsing other pages (tap title = full bar, art = back to the source tool) */
body.player-mini { --player: 64px; }
.playerbar.mini { left: auto; right: 12px; width: min(330px, calc(100vw - var(--rail) - 48px)); height: 56px; padding: 0 6px 0 6px;
  display: flex; gap: 8px; border-radius: 18px; }
.pbm-art { position: relative; flex: none; text-decoration: none; border-radius: 12px; }
.pbm-logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: #fff1; display: grid; place-items: center; }
.pbm-art.on .eq { display: flex; }
.pbm-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: start; padding: 0; background: none; cursor: pointer; }
.pbm-title { max-width: 100%; font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbm-sub { max-width: 100%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbm-sub.error { color: var(--pink); }
.pbm-play { width: 38px; height: 38px; flex: none; }
.playerbar.mini .icon-btn { flex: none; }
[dir="rtl"] .playerbar.mini { right: auto; left: 12px; }
@media (max-width: 760px) {
  body.player-mini { --player: 60px; }
  .playerbar.mini { left: auto; right: 8px; width: min(300px, calc(100vw - 16px)); height: 52px; }
  .playerbar.mini .pbm-logo { width: 38px; height: 38px; }
  [dir="rtl"] .playerbar.mini { right: auto; left: 8px; }
}

/* ---------------- Maps (Leaflet) — shared look for every map module ----------------
   isolation: Leaflet panes use z-index 400–1000; without their own stacking context they would cover the
   site's drawer, menus, palette and dialogs (z 50–400) after a map module is opened. */
.leaflet-container { isolation: isolate; z-index: 0; font-family: var(--font); background: var(--bg2, #e9edf3); }
.leaflet-container .leaflet-control-container { font: 600 13px/1 var(--font); }
.leaflet-container .leaflet-bar { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.14); backdrop-filter: var(--blur); }
.leaflet-container .leaflet-bar a { width: 34px; height: 34px; line-height: 34px; background: var(--panel-2, var(--panel)); color: var(--text); border-bottom: 1px solid var(--line); font-weight: 600; }
.leaflet-container .leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-container .leaflet-bar a:hover { background: var(--soft-2); color: var(--text); }
.leaflet-container .leaflet-bar a.leaflet-disabled { color: var(--dim); background: var(--panel); }
.leaflet-container .leaflet-control-attribution { padding: 2px 8px; border-radius: 8px 0 0 0; background: color-mix(in srgb, var(--panel) 78%, transparent); backdrop-filter: var(--blur); color: var(--dim); font: 400 10.5px/1.4 var(--font); }
.leaflet-container .leaflet-control-attribution a { color: var(--muted); }
.leaflet-container .leaflet-popup-content-wrapper { border-radius: 16px; background: var(--panel-2, var(--panel)); color: var(--text); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.leaflet-container .leaflet-popup-content { margin: 12px 14px; font: 13.5px/1.45 var(--font); }
.leaflet-container .leaflet-popup-tip { background: var(--panel-2, var(--panel)); border: 1px solid var(--line); box-shadow: none; }
.leaflet-container a.leaflet-popup-close-button { top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 8px; color: var(--muted); font: 18px/22px var(--font); }
.leaflet-container a.leaflet-popup-close-button:hover { background: var(--soft-2); color: var(--text); }
.leaflet-container .leaflet-tooltip { border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2, var(--panel)); color: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,.18); font: 600 12px/1.3 var(--font); padding: 5px 9px; }
.leaflet-container .leaflet-tooltip::before { display: none; }

/* ---------------- Cookie consent (core/consent.js) ---------------- */
#cookie-bar { position: fixed; z-index: 450; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: var(--shadow); animation: ck-in .35s cubic-bezier(.2,.9,.3,1.1); }
@keyframes ck-in { from { transform: translate(-50%, 24px); opacity: 0; } }
:is(#cookie-bar, #cookie-dlg) .ck-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; } :is(#cookie-bar, #cookie-dlg) .ck-text b { font-size: 14px; } :is(#cookie-bar, #cookie-dlg) .ck-text p { margin: 3px 0 0; color: var(--muted); } :is(#cookie-bar, #cookie-dlg) .ck-text a { font-weight: 700; }
:is(#cookie-bar, #cookie-dlg) .ck-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
:is(#cookie-bar, #cookie-dlg) .ck-btn { display: inline-flex; align-items: center; justify-content: center; min-width: auto; min-height: var(--btn-h, 36px); padding: 0 var(--btn-px, 14px); border-radius: var(--btn-r, 8px); border: 1px solid var(--line-2); background: var(--soft-2); color: var(--text); font: var(--btn-fw, 600) var(--btn-fs, 13px) var(--font); white-space: nowrap; cursor: pointer; }
:is(#cookie-bar, #cookie-dlg) .ck-btn:hover { border-color: var(--accent); } :is(#cookie-bar, #cookie-dlg) .ck-btn.primary { background: var(--accent-solid, var(--accent)); border-color: transparent; color: #fff; }
#cookie-dlg { position: fixed; inset: 0; z-index: 460; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
:is(#cookie-bar, #cookie-dlg) .ck-box { width: min(560px, 100%); max-height: 88vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
:is(#cookie-bar, #cookie-dlg) .ck-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
:is(#cookie-bar, #cookie-dlg) .ck-x { position: static; opacity: 1; flex: none; width: 32px; height: 32px; border-radius: var(--btn-r, 8px); background: var(--soft); color: var(--muted); }
:is(#cookie-bar, #cookie-dlg) .ck-x:hover { background: var(--soft-2); color: var(--text); }
:is(#cookie-bar, #cookie-dlg) .ck-rows { display: flex; flex-direction: column; gap: 6px; }
:is(#cookie-bar, #cookie-dlg) .ck-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--soft); cursor: pointer; }
:is(#cookie-bar, #cookie-dlg) .ck-row > div { flex: 1; display: flex; flex-direction: column; gap: 3px; } :is(#cookie-bar, #cookie-dlg) .ck-row small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
:is(#cookie-bar, #cookie-dlg) .ck-row.none { cursor: default; opacity: .8; }
:is(#cookie-bar, #cookie-dlg) .ck-tag { padding: 3px 9px; border-radius: 99px; background: var(--soft-2); color: var(--dim); font-size: 11.5px; font-weight: 700; }
:is(#cookie-bar, #cookie-dlg) .ck-switch { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--soft-3, #888); position: relative; cursor: pointer; transition: background .15s; }
:is(#cookie-bar, #cookie-dlg) .ck-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
:is(#cookie-bar, #cookie-dlg) .ck-switch:checked { background: var(--accent-solid, var(--accent)); } :is(#cookie-bar, #cookie-dlg) .ck-switch:checked::after { transform: translateX(18px); } :is(#cookie-bar, #cookie-dlg) .ck-switch:disabled { opacity: .6; cursor: not-allowed; }
:is(#cookie-bar, #cookie-dlg) .ck-fine { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.5; }
@media (max-width: 700px) { #cookie-bar { flex-direction: column; align-items: stretch; bottom: 82px; } :is(#cookie-bar, #cookie-dlg) .ck-btns { justify-content: stretch; } :is(#cookie-bar, #cookie-dlg) .ck-btn { flex: 1; } }

/* 🔒 site gate (assets/js/core/gate.js): hide the app while the access-code prompt is up */
html.gated body > :not(#gate) { visibility: hidden !important; }

/* ---------- search (palette sections, highlights) — core/search.js + tools/search ---------- */
.pal-sec { padding: 10px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pal-item mark, .sb-results mark, .ap-list mark, .sr-page mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 3px; }

/* ---------- mandatory password change (core/pwguard.js): the password was found in breach lists ---------- */
.pwg-dlg { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: var(--r); padding: 22px; color: var(--text); background: var(--panel-2); box-shadow: var(--shadow); }
.pwg-dlg::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); }
.pwg-ic { font-size: 30px; line-height: 1; }
.pwg-dlg h2 { margin: 10px 0 6px; font-size: 20px; }
.pwg-dlg p { margin: 0 0 10px; line-height: 1.5; font-size: 14px; color: var(--muted); }
.pwg-dlg .pwg-fine { font-size: 12.5px; color: var(--dim); }
.pwg-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pwg-in { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: var(--r-sm); background: var(--field); border: 1px solid var(--line); color: var(--text); font: 14px var(--font); outline: 0; }
.pwg-in:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.pwg-err { min-height: 18px; font-size: 13px; color: var(--t-err); }
.pwg-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pwg-btn { padding: 10px 16px; border-radius: var(--r-sm); font-weight: 650; background: var(--soft-2); border: 1px solid var(--line-2); color: var(--text); }
.pwg-btn.primary { background: var(--accent-solid, var(--accent)); color: #fff; border-color: transparent; }
.pwg-btn:disabled { opacity: .55; }
/* 📣 Afoli Ads slots (assets/js/core/adslot.js) — calm, labelled, static: no motion, no overlays, never wider than the column */
.adx-slot { min-height: 1px; }
.adx-slot:empty { height: 1px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.adx { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); color: var(--text); font-size: 13.5px; }
.adx a { color: inherit; text-decoration: none; }
.adx-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.adx-lbl { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.adx-tag { flex: none; padding: 1px 7px; border-radius: 99px; font-weight: 700; font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); }
.adx-by, .adx-host { overflow: hidden; text-overflow: ellipsis; }
.adx-host::before { content: '· '; }
.adx-info { position: relative; flex: none; }
.adx-info > summary { list-style: none; cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--dim); font-size: 13px; }
.adx-info > summary::-webkit-details-marker { display: none; }
.adx-info > summary:hover, .adx-info[open] > summary { background: var(--soft-2); color: var(--text); }
.adx-pop { position: absolute; right: 0; top: 26px; z-index: 5; width: min(300px, 78vw); padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2, var(--panel)); box-shadow: var(--shadow); font-size: 12.5px; }
.adx-pop p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.adx-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.adx-mi { font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); color: var(--text); cursor: pointer; }
.adx-mi:disabled { opacity: .55; cursor: default; }
.adx-gone { margin: 4px 0; color: var(--muted); font-size: 12.5px; }
.adx-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.adx-img { display: block; border-radius: 12px; object-fit: cover; background: var(--soft-2); }
.adx-main .adx-img { width: 96px; height: 72px; flex: none; }
.adx-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adx-h { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.adx-body { margin: 0; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.adx-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.adx-foot small { color: var(--dim); }
.adx-cta { display: inline-flex; padding: 4px 11px; border-radius: 99px; background: var(--soft-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 12.5px; }
.adx a:hover .adx-cta { background: var(--soft-3); }
.adx-title { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.adx-title:hover, .adx-main:hover .adx-h { text-decoration: underline; }
.adx-imglink .adx-img { width: 100%; height: auto; max-height: 260px; }
/* feed card: same footprint as a list card; stacked layout in grid cells */
.adx-feed.adx-f-native .adx-main { flex-direction: column; align-items: stretch; }
.adx-feed.adx-f-native .adx-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.adx-result { margin: 0 0 14px; }
.adx-result.adx-f-native .adx-img { width: 72px; height: 54px; }
.adx-search { padding: 10px 14px; border-radius: 14px; }
.adx-gs { min-height: 90px; }
@media (max-width: 560px) { .adx-main .adx-img { width: 76px; height: 58px; } }

/* core/neterr.js — translated request-error box (works with or without devkit.css) */
.ne-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,79,109,.12); border: 1px solid rgba(255,79,109,.35); color: var(--t-err); font-size: 13.5px; white-space: normal; word-break: break-word; }
:root[data-theme="light"] .ne-box { background: rgba(224,51,107,.08); }
.ne-box .ne-msg { flex: 1 1 220px; }
.ne-box > .ico { flex: none; align-self: flex-start; margin-top: 1px; } .ne-box .ne-retry .ico { vertical-align: -2px; }
.ne-box .ne-retry { min-height: 32px; padding: 6px 14px; border-radius: 10px; background: var(--soft-2); border: 1px solid var(--line-2, rgba(127,127,127,.3)); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.ne-box .ne-retry:disabled { opacity: .6; cursor: progress; }
.ne-box .ne-det { flex: 1 0 100%; font-size: 12px; color: var(--dim); }
.ne-box .ne-det summary { cursor: pointer; min-height: 24px; }
.ne-box .ne-det code { display: block; margin-top: 4px; white-space: pre-wrap; opacity: .85; }
/* banners (standard sizes, scaled down to the column), sponsored listings, the pre-roll sponsor card, "Why this ad?" */
.adx-f-banner { align-items: center; }
.adx-f-banner .adx-top { align-self: stretch; }
.adx-banlink { display: block; width: min(100%, var(--adx-w, 300px)); }
.adx-banlink .adx-img { width: 100%; height: auto; border-radius: 8px; }
.adx-list { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.adx-lthumb { flex: none; width: 88px; }
.adx-lthumb .adx-img { width: 88px; height: 66px; }
.adx-list .adx-txt .adx-body { display: block; }
.adx-list:hover .adx-h { text-decoration: underline; }
.adx-sponsored { border-style: dashed; }
.adx-pre { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 220px; padding: 16px; aspect-ratio: 16 / 9; max-height: 70vh; background: var(--soft); border-radius: 14px; }
.adx-pre .adx { max-width: 560px; width: 100%; margin: 0 auto; background: var(--panel, var(--soft)); }
.adx-pre .adx-imglink .adx-img { max-height: 40vh; }
.adx-prebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 560px; width: 100%; margin: 0 auto; color: var(--muted); font-size: 13px; }
.adx-skip { min-height: 36px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--soft-2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.adx-skip:disabled { opacity: .5; cursor: default; }
.adx-why b { display: block; margin-bottom: 4px; }
.adx-why ul { margin: 0 0 8px; padding-left: 18px; color: var(--muted); line-height: 1.45; }
.adx-pers { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; color: var(--text); font-size: 12px; cursor: pointer; }
.adx-pers input { margin-top: 2px; }
.adx-rep { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.adx-sel { font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--soft); color: var(--text); max-width: 150px; }
.adx-info > summary, .adx-mi, .adx-sel { min-height: 32px; min-width: 32px; }
/* podcasts in the player bar (core/player.js): back 15 s, forward 30 s, speed */
.pb-skip, .pb-rate { width: auto !important; min-width: 34px; padding: 0 6px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
@media (max-width: 760px) { .pb-ctrls.q .pb-rate { display: none; } }
/* offline-capable modules (registry OFFLINE): badge on catalogue cards + the "Works offline" filter may wrap on phones */
.ap-offline { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 2px; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ap-seg { flex-wrap: wrap; } .ap-seg button { min-height: 32px; }
/* CLS budget: the module fills at least the visible page, so the "Related modules" row (app.js) starts below the fold and
   content that arrives later (lists, data) no longer pushes it around on screen */
/* the module root is the first child, or the one right after the breadcrumb (core/crumbs.js) — never the breadcrumb itself.
   Only a module that renders ONE root gets the reserve: many modules fill the page with siblings (tab bar / header + body),
   and stretching their first child (the tab bar, the header) pushed the content below the first screen (travel, markets…). */
.page.tool-page > :is(:first-child, .mod-crumb + *):not(.related):not(.page-loading):not(.mod-crumb):not(:has(~ :not(.related, [hidden], dialog, template, script, style))) { min-height: calc(100% - 40px); }
.page.tool-page > .mod-crumb { min-height: 0; flex: none; }

/* ---------- bottom overlays (core/overlays.js): one banner at a time on phones, toasts above the visible banner ---------- */
:root #modbar.bov-wait { display: none; }
:root[data-bov] .toasts { bottom: calc(var(--bov-top, 0px) + 8px); }
:root .toasts > .toast.bov-hide { display: none; }
:root #modbar { flex-wrap: nowrap; } :root #modbar > span:not(.ico) { flex: 1 1 auto; text-align: start; }
@media (max-width: 760px) {
  /* compact: one row (text · Add · ×), above the bottom nav and the safe area */
  :root #modbar { flex-wrap: nowrap; gap: 8px; padding: 6px 6px 6px 12px; font-size: 13px; bottom: calc(var(--tabbar, 62px) + 8px + var(--player, 0px)); }
  :root #modbar > span:not(.ico) { flex: 1 1 0; line-height: 1.3; text-align: start; }
  :root #modbar button:not(.x) { white-space: normal; padding: 6px 10px; line-height: 1.2; }
  :root #cookie-bar { gap: 8px; padding: 10px 12px; border-radius: 14px; bottom: calc(var(--tabbar, 62px) + 8px); max-height: calc(100dvh - var(--tabbar, 62px) - 24px); overflow: auto; }
  :root #cookie-bar .ck-text { font-size: 12.5px; line-height: 1.4; } :root #cookie-bar .ck-text b { font-size: 13px; }
  :root #cookie-bar .ck-btns { flex-wrap: nowrap; gap: 6px; } :root #cookie-bar .ck-btn { min-height: 34px; padding: 0 8px; font-size: 12.5px; white-space: normal; line-height: 1.15; }
  :root .toasts { gap: 6px; } :root .toast { padding: 8px 12px; }
}
