/**
 *                          ___                   _       _         _
 *                         / __)                 | |     | |       | |
 *     _ _ _ _ _ _ _ _ _ _| |__ _____  ____ _   _| |  _  | |__   __| |
 *    | | | | | | | | | (_   __|____ |/ ___) | | | |_/ ) |  _ \ / _  |
 *    | | | | | | | | | | | |  / ___ | |   | |_| |  _ ( _| |_) | (_| |
 *     \___/ \___/ \___(_)|_|  \_____|_|   |____/|_| \_|_)____/ \____|
 *
 *
 * 	Author: MD OMAR FARUK
 * 	Author URI: www.faruk.bd
 * 	Author Contact: https://faruk.bd/#contact
 * 	Author Email: info@faruk.bd | farukmr@gmail.com
 * 	Copyright © 2026
 *                          ___                   _       _         _
 *                         / __)                 | |     | |       | |
 *     _ _ _ _ _ _ _ _ _ _| |__ _____  ____ _   _| |  _  | |__   __| |
 *    | | | | | | | | | (_   __|____ |/ ___) | | | |_/ ) |  _ \ / _  |
 *    | | | | | | | | | | | |  / ___ | |   | |_| |  _ ( _| |_) | (_| |
 *     \___/ \___/ \___(_)|_|  \_____|_|   |____/|_| \_|_)____/ \____|
 *
 */
/* AIOMediaTools Studio - tokens, base, the shell (title strip, dock, workspace, queue bar) and the UI kit.
   Look: a cinematic media studio. DARK is the default theme (a neutral, deep workspace so the colours of the media read true);
   the light theme is a full second skin, not an afterthought. Layered glass panels with a luminous 1 px edge, soft coloured glow,
   14-22 px radii on panels, an aurora of the brand colours behind everything, one accent hue per tool.
   Brand colours come ONLY from ../brand.css (--brand, --brand-d, --brand-l, --brand-2 ...): every accent below is mixed or
   hue-rotated from them, so a new brand colour re-tints the whole Studio. Tool screens use these tokens and the kit's surfaces only. */
:root {
    /* neutrals (dark) */
    --page: var(--navy-0); --card: var(--navy-2); --card-2: var(--navy-3); --ink: #f5f7ff; --text: #c9d0e6; --muted: #8e97b5; --line: rgba(255, 255, 255, .085); --edge: rgba(255, 255, 255, .13);
    --solid: var(--navy-4); --on-solid: #ffffff; --field: rgba(255, 255, 255, .05); --hover: rgba(255, 255, 255, .08); --glass: color-mix(in srgb, var(--navy-2) 74%, transparent); --veil: rgba(0, 4, 14, .68);
    --stage: color-mix(in srgb, var(--navy) 14%, #000);
    /* accents: all from the brand variables */
    --a1: var(--brand); --a2: color-mix(in oklab, var(--brand) 55%, var(--brand-2)); --a3: var(--brand-2); --a4: color-mix(in oklab, var(--brand-2) 40%, #fff);
    --tool: var(--brand); --tool-l: .67; --tool-c: .17;
    --grad: linear-gradient(120deg, var(--a1), var(--a2) 52%, var(--a3));
    --grad-soft: linear-gradient(120deg, color-mix(in srgb, var(--a1) 26%, transparent), color-mix(in srgb, var(--a2) 20%, transparent) 52%, color-mix(in srgb, var(--a3) 20%, transparent));
    --brand-ink: color-mix(in oklab, var(--brand) 62%, #fff);
    --brand-wash: color-mix(in srgb, var(--brand) 16%, transparent);
    --g-watermark: color-mix(in srgb, var(--a1) 22%, transparent); --g-video: color-mix(in srgb, var(--a3) 20%, transparent); --g-audio: color-mix(in srgb, var(--a2) 22%, transparent); --g-plain: rgba(255, 255, 255, .06);
    --ok: #4fd69a; --ok-wash: color-mix(in srgb, #4fd69a 14%, transparent);
    --warn: #f5b759; --warn-wash: color-mix(in srgb, #f5b759 14%, transparent);
    --bad: #ff7d7d; --bad-wash: color-mix(in srgb, #ff6b6b 15%, transparent);
    --edge-grad: linear-gradient(140deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 34%, color-mix(in srgb, var(--a1) 55%, transparent) 78%, color-mix(in srgb, var(--a3) 60%, transparent));
    --shadow: 0 18px 50px -18px rgba(0, 0, 0, .75), 0 2px 6px rgba(0, 0, 0, .35);
    --lift: 0 10px 28px -10px color-mix(in srgb, var(--tool) 60%, transparent), 0 2px 8px rgba(0, 0, 0, .4);
    --glow: 0 0 0 1px color-mix(in srgb, var(--tool) 55%, transparent), 0 8px 30px -8px color-mix(in srgb, var(--tool) 65%, transparent);
    --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
    --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --dock: 78px; --strip: 46px; --qbar: 48px; --side: 360px; --r: 10px; --r-lg: 18px; --tabbar: 0px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: dark;
}
@supports (color: oklch(from red l c h)) {
    :root { --a2: oklch(from var(--brand) calc(l + .2) c calc(h + 12)); --a4: oklch(from var(--brand-2) .86 .09 h); --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) h); }
    [data-tk="photo_unmark"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) h); }
    [data-tk="photo_mark"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 22)); }
    [data-tk="video_unmark"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 22)); }
    [data-tk="video_mark"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 44)); }
    [data-tk="compress"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 44)); }
    [data-tk="convert"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 62)); }
    [data-tk="cutjoin"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 62)); }
    [data-tk="metadata"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 80)); }
    [data-tk="image_compress"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 33)); }
    [data-tk="image_overlay"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 33)); }
    [data-tk="photo_bg"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 11)); }
    [data-tk="id_photo"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 11)); }
    [data-tk="audio_denoise"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h + 53)); }
    [data-tk="video_bg"] { --tool: oklch(from var(--brand) var(--tool-l) var(--tool-c) calc(h - 53)); }
}
:root[data-theme="light"] {
    --page: #f6f5fc; --card: #ffffff; --card-2: #f8f7fd; --ink: var(--navy); --text: color-mix(in srgb, var(--navy) 80%, #fff); --muted: color-mix(in srgb, var(--navy) 66%, #fff); --line: rgba(var(--navy-rgb), .1); --edge: rgba(var(--navy-rgb), .15);
    --solid: var(--navy); --on-solid: #ffffff; --field: rgba(var(--navy-rgb), .045); --hover: rgba(var(--navy-rgb), .07); --glass: rgba(255, 255, 255, .74); --veil: rgba(var(--navy-rgb), .4);
    --stage: var(--navy-1);
    --tool-l: .56; --tool-c: .2;
    --brand-ink: color-mix(in oklab, var(--brand) 82%, #000);
    --brand-wash: color-mix(in srgb, var(--brand) 10%, transparent);
    --g-plain: rgba(var(--navy-rgb), .05);
    --ok: #11875a; --warn: #a66300; --bad: #c9303a;
    --edge-grad: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(30, 16, 80, .1) 34%, color-mix(in srgb, var(--a1) 45%, transparent) 78%, color-mix(in srgb, var(--a3) 50%, transparent));
    --shadow: 0 20px 50px -22px rgba(40, 20, 110, .35), 0 2px 6px rgba(40, 20, 110, .08);
    --lift: 0 12px 28px -12px color-mix(in srgb, var(--tool) 55%, transparent), 0 2px 6px rgba(40, 20, 110, .1);
    color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 var(--sans); color: var(--text); background: var(--page); -webkit-font-smoothing: antialiased; overflow: hidden; display: flex; flex-direction: column; position: relative; isolation: isolate; }
/* the aurora: soft colour fields of the brand behind everything */
body:before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: .5;
    background: radial-gradient(38% 34% at 12% 8%, color-mix(in srgb, var(--a1) 55%, transparent), transparent 70%), radial-gradient(34% 30% at 92% 4%, color-mix(in srgb, var(--a3) 38%, transparent), transparent 70%), radial-gradient(40% 36% at 78% 100%, color-mix(in srgb, var(--a2) 42%, transparent), transparent 70%), radial-gradient(26% 24% at 30% 96%, color-mix(in srgb, var(--a4) 16%, transparent), transparent 70%); }
:root[data-theme="light"] body:before { opacity: .42; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -.025em; line-height: 1.12; }
p { margin: 0; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
svg { flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--tool) 80%, #fff); outline-offset: 2px; }
::selection { background: var(--brand); color: #fff; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono-l, .th-g, .sec-h, .fld-l, .tbl-h, .menu-h, .dk-cap { font: 600 10.5px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
/* a surface with the luminous edge - the kit's panel */
.cd, .tbl, .pl, .tl, .cmp, .dlg-box, .acc-pane, .ge, .mz-g, .fr, .k-box { border: 1px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--edge-grad) border-box; }

/* ============================================================ shell */
.tb { flex: none; height: var(--strip); display: flex; align-items: center; gap: 4px; padding: 0 10px 0 0; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); user-select: none; position: relative; z-index: 30; }
body.desktop .tb { -webkit-app-region: drag; padding-right: 0; }
body.desktop .tb button, body.desktop .tb a, body.desktop .tb input, body.desktop .tb .tb-nodrag { -webkit-app-region: no-drag; }
.tb-logo { display: flex; align-items: center; justify-content: center; width: var(--dock); height: 100%; flex: none; border: 0; background: none; padding: 0; transition: transform .2s var(--ease); }
.tb-logo:hover { transform: scale(1.08); }
.tb-logo img { width: 28px; height: 28px; filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--brand) 70%, transparent)); }
.tb-crumb { display: flex; align-items: baseline; gap: 12px; padding: 0 12px 0 6px; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; }
.tb-crumb b { font: 700 14.5px/1 var(--sans); color: var(--ink); letter-spacing: -.01em; }
.tb-crumb span { font: 600 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tb-where { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--field); font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tb-where i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.tb-where.off i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.tb-acts { display: flex; align-items: center; gap: 2px; }
.tb-acts .ibtn { position: relative; }
.tb-dot { position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; background: var(--grad); color: #fff; font: 700 9.5px/15px var(--mono); text-align: center; border-radius: 999px; box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 80%, transparent); }
.tb-user { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; margin-left: 6px; border: 1px solid var(--edge); border-radius: 999px; background: var(--field); font-weight: 650; font-size: 13px; color: var(--ink); max-width: 190px; transition: background .15s, box-shadow .2s; }
.tb-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-user:hover { background: var(--hover); box-shadow: var(--glow); }
.tb-win { display: flex; height: 100%; margin-left: 8px; }
.tb-win button { width: 46px; height: 100%; border: 0; background: none; color: var(--text); display: flex; align-items: center; justify-content: center; }
.tb-win button:hover { background: var(--hover); color: var(--ink); }
.tb-win button.x:hover { background: #e5323b; color: #fff; }

.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--dock) minmax(0, 1fr); }
.dock { background: color-mix(in srgb, var(--card) 62%, transparent); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding-bottom: 6px; scrollbar-width: none; }
.dk-cap { display: block; padding: 9px 0 3px; text-align: center; font-size: 8.5px; opacity: .8; }
.dk-grp { padding-bottom: 4px; }
.dk-grp + .dk-grp:before { content: ""; display: block; height: 1px; margin: 0 16px; background: var(--line); }
.dk-grp:first-child { padding-top: 6px; }
.dk-fill { flex: 1; min-height: 8px; }
.dk-i { position: relative; display: grid; justify-items: center; gap: 2px; width: 100%; padding: 4px 2px; border: 0; background: none; color: var(--muted); font: 600 10px/1.2 var(--sans); text-align: center; text-decoration: none; }
.dk-ic { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; border-radius: 10px; color: var(--tool); background: color-mix(in srgb, var(--tool) 13%, transparent); transition: transform .18s var(--ease), background .18s, box-shadow .25s, color .18s; }
.dk-l { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-i:hover { color: var(--ink); }
.dk-i:hover .dk-ic { transform: translateY(-2px); background: color-mix(in srgb, var(--tool) 24%, transparent); }
.dk-i.on { color: var(--ink); }
.dk-i.on .dk-ic svg, .mz-ic svg, .empty-ic svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.dk-i.on .dk-ic { color: #fff; background: linear-gradient(135deg, var(--tool), color-mix(in oklab, var(--tool) 62%, var(--a3))); box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--tool) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.dk-i.on:before { content: ""; position: absolute; left: 0; top: 7px; width: 3px; height: 24px; border-radius: 0 3px 3px 0; background: var(--tool); box-shadow: 0 0 12px var(--tool); }
.dk-i.soon { opacity: .55; }
.dk-i .dk-n { position: absolute; top: 0; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--grad); color: #fff; font: 700 9.5px/16px var(--mono); border-radius: 999px; box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 80%, transparent); }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.view { flex: 1; min-height: 0; overflow: auto; position: relative; }
.view > .screen { min-height: 100%; }
.view > .tool { height: 100%; }
.notice { display: flex; align-items: center; gap: 10px; padding: 7px 16px; background: var(--grad-soft); border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; }
.notice b { font-weight: 700; }
.notice a { color: inherit; font-weight: 700; }
.notice .ibtn { margin-left: auto; color: inherit; width: 24px; height: 24px; }
.tabbar { display: none; }

/* ============================================================ buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 6px 14px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--field); color: var(--ink); font: 650 13.5px/1.2 var(--sans); text-decoration: none; white-space: nowrap; transition: transform .16s var(--ease), box-shadow .2s, background .15s, border-color .15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--hover); border-color: color-mix(in srgb, var(--tool) 55%, var(--edge)); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.btn.primary { border: 0; color: #fff; background: linear-gradient(120deg, var(--tool), color-mix(in oklab, var(--tool) 55%, var(--a2)) 60%, color-mix(in oklab, var(--tool) 45%, var(--a3))); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--tool) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .32); text-shadow: 0 1px 0 rgba(0, 0, 0, .18); overflow: hidden; }
.btn.primary:after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease); pointer-events: none; }
.btn.primary:hover:not(:disabled) { box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--tool) 95%, transparent), inset 0 1px 0 rgba(255, 255, 255, .4); background: linear-gradient(120deg, var(--tool), color-mix(in oklab, var(--tool) 55%, var(--a2)) 60%, color-mix(in oklab, var(--tool) 45%, var(--a3))); }
.btn.primary:hover:not(:disabled):after { transform: translateX(120%); }
.btn.solid { background: var(--solid); border-color: transparent; color: var(--on-solid); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn.solid:hover:not(:disabled) { background: color-mix(in srgb, var(--solid) 82%, var(--tool)); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover:not(:disabled) { transform: none; background: var(--hover); border-color: transparent; }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); background: var(--bad-wash); }
.btn.danger:hover:not(:disabled) { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.sm { min-height: 28px; padding: 3px 11px; font-size: 12.5px; gap: 6px; border-radius: 8px; }
.btn.lg { min-height: 48px; padding: 10px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: saturate(.5); }
.btn.busy { color: transparent !important; text-shadow: none; }
.btn.busy:before { content: ""; position: absolute; width: 15px; height: 15px; border: 2px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.primary.busy:before, .btn.solid.busy:before { border-color: #fff; border-right-color: transparent; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--text); flex: none; transition: background .15s, color .15s, transform .15s var(--ease); }
.ibtn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.ibtn:active:not(:disabled) { transform: scale(.92); }
.ibtn.on { background: color-mix(in srgb, var(--tool) 26%, transparent); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tool) 60%, transparent); }
.ibtn:disabled { opacity: .4; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--edge); border-radius: 999px; font: 600 9.5px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--text); white-space: nowrap; vertical-align: middle; background: var(--field); }
.badge.plan { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--brand) 80%, transparent); }
.badge.good { background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.badge.warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.badge.bad { background: var(--bad-wash); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.badge.quiet { color: var(--muted); }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 6px; background: var(--field); font: 600 11px/1.4 var(--mono); color: var(--ink); text-align: center; }
.kbd-row { display: inline-flex; gap: 3px; align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ controls */
.seg { display: inline-flex; width: fit-content; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); max-width: 100%; }
.seg.block { display: flex; width: 100%; }
.seg.block button { flex: 1; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 12px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; min-width: 0; transition: background .18s, color .18s, box-shadow .2s; }
.seg button:hover:not(.on):not(:disabled) { background: var(--hover); color: var(--ink); }
.seg button.on { color: #fff; background: linear-gradient(135deg, var(--tool), color-mix(in oklab, var(--tool) 58%, var(--a3))); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--tool) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg-tag { font: 700 8.5px/1 var(--mono); font-style: normal; letter-spacing: .08em; padding: 3px 5px; background: rgba(255, 255, 255, .2); color: inherit; border-radius: 999px; border: 1px solid currentColor; }

.sld { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.sld.off { opacity: .5; }
.sld-track { position: relative; }
.sld-marks { position: relative; height: 16px; margin: 2px 9px 0; }
.sld-marks button { position: absolute; transform: translateX(-50%); border: 0; background: none; padding: 0; font: 600 9px/1.7 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sld-marks button:hover { color: var(--ink); }
.sld-word { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--tool) 0, color-mix(in oklab, var(--tool) 55%, var(--a3)) var(--p), var(--hover) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border: 3px solid #fff; border-radius: 50%; background: var(--tool); box-shadow: 0 2px 10px color-mix(in srgb, var(--tool) 70%, transparent), 0 1px 3px rgba(0, 0, 0, .4); transition: transform .12s var(--ease); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--hover); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--tool); }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: var(--tool); }
.sld-box, .inp, .slc, .stp { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--field); color: var(--ink); transition: border-color .15s, box-shadow .2s; }
.sld-box { padding: 0 9px; }
.sld-box input { width: 44px; border: 0; background: none; padding: 0; text-align: right; font: 600 13px/1 var(--mono); -moz-appearance: textfield; }
.sld-box input::-webkit-inner-spin-button { display: none; }
.unit { font: 600 10px/1 var(--mono); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.inp { padding: 0 11px; }
.inp.block, .slc.block { display: flex; width: 100%; }
.inp input, .inp textarea { flex: 1; min-width: 0; border: 0; background: none; padding: 7px 0; font-size: 14px; }
.inp input::placeholder { color: var(--muted); }
.inp textarea { resize: vertical; min-height: 60px; }
.inp:focus-within, .sld-box:focus-within, .stp:focus-within, .slc:focus-within { border-color: color-mix(in srgb, var(--tool) 75%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool) 22%, transparent); }
.inp input:focus-visible, .inp textarea:focus-visible, .sld-box input:focus-visible, .stp input:focus-visible, .slc select:focus-visible { outline: none; }
.slc { position: relative; padding: 0; }
.slc select { -webkit-appearance: none; appearance: none; border: 0; background: none; padding: 6px 30px 6px 11px; min-width: 0; width: 100%; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.slc select option, .slc select optgroup { background: var(--card-2); color: var(--ink); }
.slc svg { position: absolute; right: 10px; pointer-events: none; color: var(--muted); }
.stp { padding: 0; overflow: hidden; }
.stp button { width: 28px; align-self: stretch; border: 0; background: none; display: flex; align-items: center; justify-content: center; color: var(--text); }
.stp button:hover { background: var(--hover); color: var(--ink); }
.stp input { width: 58px; border: 0; background: none; text-align: center; font: 600 13px/1 var(--mono); padding: 0; }
.stp .unit { padding-right: 4px; }
.stp-time input { width: 104px; }

.sw-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 3px 0; }
.sw-row.off { opacity: .5; cursor: not-allowed; }
.sw { position: relative; flex: none; width: 40px; height: 22px; padding: 0; border: 1px solid var(--edge); border-radius: 999px; background: var(--hover); transition: background .2s, box-shadow .25s; }
.sw i { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: transform .2s var(--ease); }
.sw-row.on .sw { background: linear-gradient(120deg, var(--tool), color-mix(in oklab, var(--tool) 55%, var(--a3))); border-color: transparent; box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--tool) 80%, transparent); }
.sw-row.on .sw i { transform: translateX(18px); }
.sw-t { display: grid; gap: 1px; min-width: 0; }
.sw-l { font-weight: 600; color: var(--ink); font-size: 13.5px; line-height: 22px; }
.sw-h { font-size: 12.5px; color: var(--muted); }
.chk { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk i { display: flex; align-items: center; justify-content: center; width: 19px; height: 19px; border: 1px solid var(--edge); border-radius: 6px; background: var(--field); color: transparent; transition: background .15s, box-shadow .2s; }
.chk input:checked + i { background: var(--tool); border-color: transparent; color: #fff; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--tool) 80%, transparent); }
.chk input:focus-visible + i { outline: 2px solid color-mix(in srgb, var(--tool) 80%, #fff); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 12px; border: 1px solid var(--edge); border-radius: 999px; background: var(--field); color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; transition: transform .15s var(--ease), background .15s, box-shadow .2s, border-color .15s; }
.chip small { font: 600 9.5px/1 var(--mono); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.chip:hover:not(:disabled) { transform: translateY(-1px); border-color: color-mix(in srgb, var(--tool) 60%, transparent); background: var(--hover); }
.chip.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--tool), color-mix(in oklab, var(--tool) 58%, var(--a3))); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--tool) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
.chip.on small { color: rgba(255, 255, 255, .78); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip-add { border-style: dashed; color: var(--muted); background: none; }
.chip-x { display: inline-flex; margin-right: -5px; padding: 3px; border-radius: 50%; }
.chip-x:hover { background: var(--bad); color: #fff; }

.fld { display: grid; gap: 7px; margin-bottom: 15px; min-width: 0; }
.fld:last-child { margin-bottom: 0; }
.fld.inline { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.fld.inline .fld-h { grid-column: 1 / -1; }
.fld-l { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.fld-l > :last-child:not(:first-child):not(.badge) { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.fld-h { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sec { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-h { display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 13px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; }
.sec-h:before { content: ""; width: 14px; height: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--tool), color-mix(in oklab, var(--tool) 50%, var(--a3))); box-shadow: 0 0 10px color-mix(in srgb, var(--tool) 70%, transparent); flex: none; }
.sec-h > span { flex: 1; }
.sec.fold > .sec-h { margin: 0; cursor: pointer; }
.sec.fold > .sec-h svg { transition: transform .2s var(--ease); color: var(--muted); }
.sec.fold.open > .sec-h svg { transform: rotate(180deg); }
.sec.fold > .sec-b { display: none; padding-top: 15px; }
.sec.fold.open > .sec-b { display: block; animation: rise .22s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.tabs-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-bar button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; background: none; font-weight: 650; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: color .15s; }
.tabs-bar button:hover { color: var(--ink); }
.tabs-bar button.on { color: var(--ink); }
.tabs-bar button.on:after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--tool), color-mix(in oklab, var(--tool) 50%, var(--a3))); box-shadow: 0 0 14px var(--tool); }
.tab-n { font: 600 10px/1.6 var(--mono); font-style: normal; padding: 0 6px; background: var(--hover); border-radius: 999px; }
.tabs-pane { padding-top: 16px; }

/* table */
.tbl { border-radius: 14px; overflow: hidden; }
.tbl-h, .tbl-r { display: grid; grid-template-columns: var(--cols); gap: 0 12px; align-items: center; padding: 0 14px; }
.tbl-h { min-height: 32px; border-bottom: 1px solid var(--line); background: var(--field); color: var(--muted); }
.tbl-b { max-height: var(--tbl-max, none); overflow-y: auto; }
.tbl-r { min-height: 40px; border-bottom: 1px solid var(--line); font-size: 13.5px; cursor: default; transition: background .12s; }
.tbl-r:last-child { border-bottom: 0; }
.tbl-r > div, .tbl-h > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-r:hover { background: var(--hover); }
.tbl-r.sel { background: color-mix(in srgb, var(--tool) 16%, transparent); box-shadow: inset 3px 0 0 var(--tool); }
.tbl:focus-visible .tbl-r.cur { outline: 1px solid color-mix(in srgb, var(--tool) 80%, #fff); outline-offset: -1px; }
.tbl .r { text-align: right; justify-self: end; }
.tbl .num { font-family: var(--mono); font-size: 12.5px; }
.tbl-empty { padding: 26px; text-align: center; color: var(--muted); }

/* file row */
.fr { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 9px 10px 9px 9px; border-radius: 14px; transition: transform .16s var(--ease), box-shadow .2s; }
.fr + .fr { margin-top: 8px; }
.fr[role=button], .fr[role=option] { cursor: pointer; }
.fr[role=button]:hover, .fr[role=option]:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.fr.sel { background: linear-gradient(color-mix(in srgb, var(--tool) 12%, var(--card)), color-mix(in srgb, var(--tool) 12%, var(--card))) padding-box, linear-gradient(140deg, var(--tool), color-mix(in srgb, var(--tool) 30%, transparent) 55%, var(--a3)) border-box; box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--tool) 70%, transparent); }
.fr-th { width: 72px; height: 44px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tool) 14%, var(--stage)); border-radius: 9px; overflow: hidden; color: var(--tool); box-shadow: inset 0 0 0 1px var(--line); }
.fr-th img { width: 100%; height: 100%; object-fit: cover; }
.fr-m { min-width: 0; }
.fr-n { font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-f { font: 500 11.5px/1.55 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-sub { grid-column: 1 / -1; margin-top: 4px; min-width: 0; }
.fr-sub:empty { display: none; }
.fr-s { display: flex; align-items: center; gap: 9px; justify-content: flex-end; min-width: 0; }
.fr-st { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px/1.3 var(--mono); letter-spacing: .01em; color: var(--muted); white-space: nowrap; }
.fr-st.ok { color: var(--ok); } .fr-st.bad { color: var(--bad); } .fr-st.warn { color: var(--warn); } .fr-st.run { color: var(--ink); }
.fr-a { display: flex; align-items: center; gap: 2px; }

/* empty state */
.empty { position: relative; display: grid; justify-items: center; gap: 12px; padding: 40px 24px 36px; text-align: center; border: 1.5px dashed color-mix(in srgb, var(--tool) 50%, var(--edge)); border-radius: 22px; background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--tool) 16%, transparent), transparent 70%), var(--field); overflow: hidden; }
.empty > * { position: relative; }
.empty-art { width: min(300px, 76%); height: auto; margin-bottom: 2px; overflow: visible; }
/* decorative motion plays a few rounds and then rests: an idle screen costs nothing */
.empty-art .ea-float { animation: float 5s ease-in-out 4; transform-origin: center; }
.empty-art .ea-float2 { animation: float 6.5s ease-in-out -2s 3; }
.empty-art .ea-bar { animation: eq 1.4s ease-in-out 13 alternate; transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes eq { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.empty-ic { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; color: #fff; border-radius: 18px; background: linear-gradient(135deg, var(--tool), color-mix(in oklab, var(--tool) 55%, var(--a3))); box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--tool) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
.empty-art + .empty-ic { display: none; }
.empty h2 { font-size: 27px; font-weight: 800; }
.empty p { max-width: 540px; color: var(--muted); }
.empty-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0; padding: 0; list-style: none; }
.empty-steps li { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--field); font-size: 12.5px; color: var(--text); }
.empty-steps b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; border-radius: 999px; background: color-mix(in srgb, var(--tool) 24%, transparent); font: 700 10px/1 var(--mono); color: var(--ink); }
.empty-a { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.empty-note { display: inline-flex; align-items: center; gap: 7px; font: 500 11.5px/1.5 var(--mono); color: var(--muted); }
.empty-note svg { color: var(--ok); }

/* progress, meter, spinner */
.pg { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pg-t { position: relative; flex: 1; height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; min-width: 40px; }
.pg-t i { position: relative; display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--tool), color-mix(in oklab, var(--tool) 50%, var(--a3))); box-shadow: 0 0 12px color-mix(in srgb, var(--tool) 80%, transparent); transition: width .25s linear; overflow: hidden; }
.pg-t i:after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .5) 50%, transparent 80%); animation: sheen 1.5s linear infinite; }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pg-l { font: 600 11.5px/1 var(--mono); color: var(--ink); white-space: nowrap; min-width: 34px; text-align: right; }
.pg.sm { width: 92px; } .pg.sm .pg-t { height: 6px; }
.pg.wait .pg-t i { width: 36% !important; animation: slide 1.2s var(--ease) infinite; opacity: .7; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
.mt { display: grid; gap: 5px; }
.mt-h { display: flex; justify-content: space-between; gap: 10px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mt-v { color: var(--ink); font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 12px; }
.mt-t { height: 12px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.mt-t i { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--muted) 70%, transparent); transition: width .3s var(--ease); }
.mt[data-tone=brand] .mt-t i { background: linear-gradient(90deg, var(--tool), color-mix(in oklab, var(--tool) 50%, var(--a3))); box-shadow: 0 0 12px color-mix(in srgb, var(--tool) 70%, transparent); } .mt[data-tone=ok] .mt-t i { background: var(--ok); } .mt[data-tone=warn] .mt-t i { background: var(--warn); } .mt[data-tone=bad] .mt-t i { background: var(--bad); }
.spin { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.spin i { width: 17px; height: 17px; border: 2px solid var(--tool); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* callouts and notes */
.co { display: flex; gap: 11px; padding: 11px 13px; border: 1px solid var(--edge); border-radius: 12px; background: var(--field); font-size: 13px; }
.co > svg { margin-top: 2px; color: var(--muted); }
.co-t { display: grid; gap: 2px; min-width: 0; }
.co-t b { color: var(--ink); }
.co-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.co.good { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-wash); } .co.good > svg { color: var(--ok); }
.co.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-wash); } .co.warn > svg { color: var(--warn); }
.co.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: var(--bad-wash); } .co.bad > svg { color: var(--bad); }
.co.plan { border-color: color-mix(in srgb, var(--brand) 50%, transparent); background: var(--grad-soft); } .co.plan > svg { color: var(--brand-ink); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.notes li { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.notes li svg { margin-top: 2px; color: var(--muted); }
.notes li.good svg { color: var(--ok); } .notes li.warn svg { color: var(--warn); } .notes li.bad svg { color: var(--bad); }
.notes li.warn { color: var(--ink); }

/* toasts, tooltips, menus */
/* bottom left, beside the dock: the bottom right belongs to the Start button of the inspector */
.toasts { position: fixed; left: calc(var(--dock) + 16px); bottom: calc(var(--qbar) + var(--tabbar) + 14px); z-index: 200; display: grid; gap: 8px; justify-items: start; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 10px 10px 10px 13px; border: 1px solid var(--edge); border-radius: 14px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); color: var(--ink); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; animation: pop .24s var(--ease); }
.toast.good > svg { color: var(--ok); } .toast.warn > svg { color: var(--warn); } .toast.bad > svg { color: var(--bad); }
.toast button { border: 0; background: none; font-weight: 700; color: var(--brand-ink); padding: 2px 4px; text-decoration: underline; }
.toast .toast-x { color: var(--muted); display: flex; }
@keyframes pop { from { transform: translateY(10px) scale(.97); opacity: 0; } }
.tip { position: fixed; z-index: 300; display: flex; align-items: center; gap: 8px; max-width: 280px; padding: 6px 9px; background: var(--solid); color: var(--on-solid); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; font-weight: 600; pointer-events: none; animation: pop .14s var(--ease); }
.tip kbd { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: inherit; font-size: 10px; min-width: 16px; padding: 0 5px; border-bottom-width: 1px; }
.menu { position: fixed; z-index: 250; min-width: 200px; max-width: 320px; max-height: 70vh; overflow-y: auto; padding: 5px; border: 1px solid var(--edge); border-radius: 14px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow); animation: pop .16s var(--ease); }
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: none; text-align: left; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.menu button > span:not(.menu-c):not(.badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu button:hover:not(:disabled), .menu button:focus-visible { background: color-mix(in srgb, var(--tool) 24%, transparent); outline: none; }
.menu button:disabled { opacity: .4; cursor: not-allowed; }
.menu button.danger { color: var(--bad); }
.menu button.danger:hover { background: var(--bad-wash); }
.menu kbd { font-size: 10px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu-h { padding: 7px 10px 4px; }
.menu-c { width: 15px; display: inline-flex; flex: none; }

/* dialogs and sheets */
.layer { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--veil); backdrop-filter: blur(6px); animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.dlg-box { width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column; border-radius: 20px; box-shadow: var(--shadow), 0 0 80px -20px color-mix(in srgb, var(--brand) 60%, transparent); animation: pop .22s var(--ease); overflow: hidden; }
.dlg-h, .sht-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.dlg-h h2, .sht-h h2 { font-size: 18px; font-weight: 750; }
.dlg-b { padding: 18px 20px; overflow-y: auto; display: grid; gap: 12px; }
.dlg-b p { color: var(--text); }
.dlg-f { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 20px 14px; border-top: 1px solid var(--line); background: var(--field); }
.layer.sht { padding: 0; justify-content: flex-end; align-items: stretch; }
.layer.sht.side-left { justify-content: flex-start; }
.layer.sht.side-bottom { align-items: flex-end; justify-content: center; }
.sht-box { width: min(420px, 100%); display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--edge); box-shadow: var(--shadow); animation: sht-r .24s var(--ease); }
.side-left .sht-box { border-left: 0; border-right: 1px solid var(--edge); animation-name: sht-l; }
.side-bottom .sht-box { width: min(720px, 100%); max-height: 86%; border: 1px solid var(--edge); border-bottom: 0; border-radius: 22px 22px 0 0; animation-name: sht-b; }
.sht-b { flex: 1; overflow-y: auto; padding: 16px 20px; }
.sht-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes sht-r { from { transform: translateX(40px); opacity: 0; } }
@keyframes sht-l { from { transform: translateX(-40px); opacity: 0; } }
@keyframes sht-b { from { transform: translateY(40px); opacity: 0; } }

/* ============================================================ the workbench of a tool */
.wb { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); height: 100%; min-height: 0; position: relative; }
.wb.no-side { grid-template-columns: minmax(0, 1fr); }
.wb.no-side .wb-side, .wb.no-side .wb-open { display: none; }
.wb-main { min-width: 0; min-height: 0; overflow: auto; padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.wb-main > * { flex: none; }
.wb-side { min-height: 0; display: flex; flex-direction: column; margin: 12px 12px 12px 0; border: 1px solid transparent; border-radius: var(--r-lg); background: linear-gradient(var(--glass), var(--glass)) padding-box, var(--edge-grad) border-box; backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--shadow); overflow: hidden; }
.wb-side-h { display: none; }
.wb-side-in { flex: 1; min-height: 0; overflow-y: auto; }
.wb-go { flex: none; padding: 14px 18px 16px; border-top: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--tool) 10%, transparent), color-mix(in srgb, var(--tool) 4%, transparent)); display: grid; gap: 10px; }
.wb-go:empty { display: none; }
.wb-open, .wb-veil { display: none; }
.th { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.th-t { display: grid; gap: 5px; min-width: 0; }
.th-g { display: inline-flex; align-items: center; gap: 9px; color: var(--tool); }
.th-g:before { content: ""; width: 18px; height: 4px; border-radius: 999px; background: var(--tool); box-shadow: 0 0 12px var(--tool); }
.th h1 { font-size: 32px; font-weight: 800; letter-spacing: -.035em; width: fit-content; background: linear-gradient(100deg, var(--ink) 30%, var(--tool) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.th p { color: var(--muted); font-size: 14px; max-width: 640px; }
.th-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.est { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.est-l { font: 600 10.5px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.est-v { font: 800 24px/1 var(--sans); color: var(--ink); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.est-v small { font: 600 10.5px/1 var(--mono); color: var(--muted); letter-spacing: .06em; margin-right: 6px; text-transform: uppercase; }
.est-s { font: 600 11.5px/1.3 var(--mono); color: var(--ok); }
.est-s.up { color: var(--warn); }

/* ============================================================ compare */
.cmp { display: grid; gap: 0; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.cmp-v { position: relative; background: var(--stage); user-select: none; touch-action: none; cursor: ew-resize; overflow: hidden; min-height: 120px; }
.cmp-l { display: flex; align-items: center; justify-content: center; }
.cmp-a { position: relative; }
.cmp-b { position: absolute; inset: 0; }
.cmp-l > * { display: block; width: 100%; height: 100%; max-height: var(--cmp-max, 62vh); object-fit: contain; pointer-events: none; }
.cmp-k { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, .8), 0 0 0 1px rgba(0, 0, 0, .35); }
.cmp-k i { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: -18px 0 0 -18px; background: var(--grad); color: #fff; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.cmp-t { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); color: #fff; font: 600 10px/1.5 var(--mono); letter-spacing: .09em; text-transform: uppercase; transition: opacity .15s; pointer-events: none; }
.cmp-ta { left: 12px; } .cmp-tb { right: 12px; background: var(--grad); }
.cmp-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line); }
.cmp-bar:empty { display: none; }
.cmp .cmp-scrub { flex: 1; width: auto; }
.cmp-time { font: 600 11.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }

/* ============================================================ player */
.pl { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; min-height: 0; box-shadow: var(--shadow); }
.pl-view { position: relative; flex: 1; min-height: 160px; background: var(--stage); overflow: hidden; }
.pl-view video, .pl-over, .pl-poster { position: absolute; }
.pl-view.zoomed { cursor: grab; }
.pl-over { pointer-events: none; }
.pl-over > * { pointer-events: auto; }
.pl-poster { object-fit: contain; }
.pl-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: rgba(255, 255, 255, .72); text-align: center; font-size: 13px; pointer-events: none; }
.pl-msg:empty { display: none; }
.pl.is-audio .pl-view { min-height: 110px; background: radial-gradient(60% 120% at 50% 100%, color-mix(in srgb, var(--tool) 40%, transparent), transparent), var(--stage); }
.pl.is-audio .pl-msg { color: #fff; }
.pl.is-audio audio { display: none; }
.pl-bar { flex: none; border-top: 1px solid var(--line); padding: 8px 10px 5px; display: grid; gap: 3px; }
.pl-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pl-sp, .tl-sp { flex: 1; }
.pl-scrub { position: relative; flex: 1; height: 16px; cursor: pointer; touch-action: none; }
.pl-scrub:before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 6px; border-radius: 999px; background: var(--hover); }
.pl-scrub i { position: absolute; top: 5px; height: 6px; left: 0; border-radius: 999px; }
.pl-buf { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.pl-fill { background: linear-gradient(90deg, var(--tool), color-mix(in oklab, var(--tool) 50%, var(--a3))); box-shadow: 0 0 10px color-mix(in srgb, var(--tool) 70%, transparent); }
.pl-loop { background: color-mix(in srgb, var(--a4) 55%, transparent); display: none; height: 10px !important; top: 3px !important; border-radius: 3px !important; opacity: .55; }
.pl-knob { top: 1px !important; width: 14px; height: 14px !important; margin-left: -7px; background: #fff; border-radius: 50% !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool) 60%, transparent), 0 2px 8px rgba(0, 0, 0, .5); }
.pl-tc { border: 0; background: none; padding: 3px 7px; font: 700 13px/1 var(--mono); color: var(--ink); border-radius: 6px; font-variant-numeric: tabular-nums; }
.pl-tc:hover { background: var(--hover); }
.pl-dur { font: 600 11.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.pl-rate { border: 1px solid var(--edge); background: var(--field); border-radius: 8px; min-width: 40px; padding: 4px 5px; font: 700 11.5px/1.2 var(--mono); color: var(--ink); }
.pl-rate:hover { border-color: var(--tool); }
.pl .pl-vol { width: 72px; flex: none; }
.pl:fullscreen { border: 0; border-radius: 0; }

/* ============================================================ timeline */
.tl { border-radius: 14px; overflow: hidden; user-select: none; }
.tl:focus-visible { outline-offset: 1px; }
.tl-top { display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px 12px; border-bottom: 1px solid var(--line); min-height: 36px; }
.tl-read { font: 700 12.5px/1 var(--mono); color: var(--ink); white-space: pre; font-variant-numeric: tabular-nums; }
.tl-hint { margin-left: 12px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-body { display: flex; }
.tl-labels { flex: none; width: 96px; border-right: 1px solid var(--line); }
.tl-lab { height: 32px; padding: 0 10px; display: flex; align-items: center; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tl-area { position: relative; flex: 1; min-width: 0; overflow: hidden; cursor: text; touch-action: none; }
.tl-cv { width: 100%; }
.tl-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; pointer-events: none; z-index: 5; will-change: transform; }
.tl-head:before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 10px var(--tool), 0 0 0 1px rgba(0, 0, 0, .3); }
.tl-head i { position: absolute; left: -6px; top: 0; width: 12px; height: 13px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.tl-range { position: absolute; top: 24px; height: var(--tl-range-h, 56px); background: color-mix(in srgb, var(--tool) 20%, transparent); border-top: 2px solid var(--tool); border-bottom: 2px solid var(--tool); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); clip-path: inset(0 -9999px); pointer-events: none; z-index: 2; }
.tl-h { position: absolute; left: 0; top: 24px; width: 14px; height: var(--tl-range-h, 56px); margin-left: -14px; padding: 0; border: 0; border-radius: 7px 0 0 7px; background: var(--tool); cursor: ew-resize; z-index: 4; will-change: transform; touch-action: none; box-shadow: 0 0 14px color-mix(in srgb, var(--tool) 80%, transparent); }
.tl-h:after { content: ""; position: absolute; left: 6px; top: 32%; bottom: 32%; width: 2px; border-radius: 2px; background: #fff; }
.tl-hb { margin-left: 0; border-radius: 0 7px 7px 0; }
.tl-lanes { position: relative; }
.tl-lane { position: relative; height: 32px; border-top: 1px solid var(--line); background: var(--field); }
.tl-it { position: absolute; top: 4px; height: 24px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--a3) 70%, var(--card)), color-mix(in srgb, var(--a3) 40%, var(--card))); color: #fff; font: 600 11px/1 var(--sans); cursor: grab; overflow: hidden; white-space: nowrap; touch-action: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.tl-it span { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tl-it.t-watermark { background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 80%, var(--card)), color-mix(in srgb, var(--a1) 45%, var(--card))); } .tl-it.t-audio { background: linear-gradient(135deg, color-mix(in srgb, var(--a2) 75%, var(--card)), color-mix(in srgb, var(--a2) 40%, var(--card))); } .tl-it.t-brand { background: var(--grad); }
.tl-it.sel { box-shadow: 0 0 0 2px #fff, 0 6px 18px -4px var(--tool); z-index: 3; }
.tl-e { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.tl-ea { left: 0; } .tl-eb { right: 0; }
.tl-it.sel .tl-e { background: rgba(255, 255, 255, .5); }
.tl-scroll { position: relative; height: 12px; border-top: 1px solid var(--line); background: var(--field); cursor: pointer; touch-action: none; }
.tl-scroll i { position: absolute; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--tool) 70%, var(--muted)); border-radius: 999px; cursor: grab; }
.tl-scroll.all i { opacity: .3; }

/* ============================================================ stage */
.stg { position: relative; overflow: hidden; min-height: 200px; height: 100%; border: 1px solid var(--edge); border-radius: 16px; background: var(--stage); touch-action: none; box-shadow: var(--shadow); }
.stg-hold { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 20px 60px rgba(0, 0, 0, .6); }
.stg.checker .stg-hold { background: repeating-conic-gradient(#3a3744 0% 25%, #2a2832 0% 50%) 0 0 / 16px 16px; }
.stg-pic, .stg-node { display: block; width: 100%; height: 100%; max-width: none; }
.stg-hold.px .stg-pic { image-rendering: pixelated; }
.stg-over { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; cursor: crosshair; touch-action: none; }
.stg.pan .stg-over { cursor: grab; } .stg.panning .stg-over { cursor: grabbing; }
.stg-hud { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; padding: 2px; border: 1px solid var(--edge); border-radius: 12px; background: var(--glass); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.stg-hud .ibtn { width: 28px; height: 28px; }
.stg-z { border: 0; background: none; min-width: 50px; padding: 0 4px; border-radius: 8px; font: 700 11.5px/28px var(--mono); color: var(--ink); }
.stg-z:hover { background: var(--hover); }

/* ============================================================ sponsor tile ("spot") */
.amm-spot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); color: var(--text); text-decoration: none; position: relative; transition: border-color .15s, transform .16s var(--ease); }
.amm-spot:hover { border-color: var(--edge); transform: translateY(-1px); }
.amm-spot-l { position: absolute; top: -8px; left: 14px; padding: 0 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font: 600 9px/1.7 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.amm-spot img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.amm-spot-t { display: grid; gap: 1px; min-width: 0; }
.amm-spot-t b { color: var(--ink); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amm-spot-t span { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.amm-spot-go { font: 650 12px/1 var(--sans); color: var(--ink); border: 1px solid var(--edge); border-radius: 999px; padding: 7px 11px; white-space: nowrap; }
.amm-spot.slim img { width: 34px; height: 34px; border-radius: 8px; }
.amm-spot.slim .amm-spot-t span { -webkit-line-clamp: 1; }
.amm-spot.slim { padding: 10px 11px; }
.amm-spot.tall { grid-template-columns: minmax(0, 1fr); }
.amm-spot.tall img { width: 100%; height: 120px; }
.amm-spot.tall .amm-spot-go { justify-self: start; }

/* ============================================================ phone */
@media (max-width: 760px) {
    :root { --dock: 0px; --tabbar: 58px; --qbar: 44px; }
    .shell { grid-template-columns: minmax(0, 1fr); }
    .dock { display: none; }
    .tb-logo { width: 48px; }
    .tb-crumb { padding: 0 6px; }
    .tb-crumb span, .tb-where, .tb-user span { display: none; }
    .tb-user { padding: 0 9px; }
    .tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar); background: var(--glass); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
    .tabbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: none; font: 600 10.5px/1.2 var(--sans); color: var(--muted); }
    .tabbar button.on { color: var(--ink); }
    .tabbar button.on svg { color: var(--brand-ink); filter: drop-shadow(0 0 8px var(--brand)); }
    .tabbar button.on:before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
    .wb { grid-template-columns: minmax(0, 1fr); }
    .wb-main { padding: 14px 14px 80px; }
    .th h1 { font-size: 25px; }
    .wb-side { position: fixed; left: 0; right: 0; bottom: 0; top: 16%; z-index: 120; margin: 0; border-radius: 22px 22px 0 0; transform: translateY(102%); transition: transform .26s var(--ease); visibility: hidden; background: linear-gradient(var(--card), var(--card)) padding-box, var(--edge-grad) border-box; }
    .wb.side-open .wb-side { transform: none; visibility: visible; }
    .wb-side-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); font: 750 16px/1 var(--sans); color: var(--ink); }
    .wb.side-open .wb-veil { display: block; position: fixed; inset: 0; z-index: 110; background: var(--veil); backdrop-filter: blur(4px); }
    .wb-open { display: inline-flex; position: fixed; right: 12px; bottom: calc(var(--qbar) + var(--tabbar) + 12px); z-index: 20; border-radius: 999px; background: var(--grad); color: #fff; box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand) 90%, transparent); }
    .wb.side-open .wb-open { display: none; }
    .fr { grid-template-columns: 56px minmax(0, 1fr) auto; }
    .fr-th { width: 56px; height: 38px; }
    .fr-s { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
    .fr-st { white-space: normal; }
    .fr-s:empty { display: none; }
    .fr-a { grid-row: 1; grid-column: 3; }
    .pl .pl-vol, .tl-hint, .tl-labels { display: none !important; }
    .layer { padding: 10px; }
    .layer.sht { padding: 0; align-items: flex-end; }
    .sht-box, .side-left .sht-box { width: 100%; max-height: 88%; border: 1px solid var(--edge); border-bottom: 0; border-radius: 22px 22px 0 0; animation-name: sht-b; }
    .empty { padding: 26px 14px; }
    .empty h2 { font-size: 21px; }
    .seg { max-width: 100%; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ============================================================ light look (low-end PCs)
   <html class="amm-lite"> = set by the Windows program (Settings > Performance > Light look, or a low-end PC found);
   <html class="amm-calm"> = the system asks for reduced motion (website and program). Same calm skin: no blur behind glass,
   no motion that loops, flatter shadows, no transitions, a quieter aurora. Colours, sizes and layout stay as they are.
   <html class="amm-away"> = the window is hidden / minimised: every animation is paused. */
.amm-away *, .amm-away *:before, .amm-away *:after { animation-play-state: paused !important; }
:root:is(.amm-lite, .amm-calm) {
    --glass: color-mix(in srgb, var(--navy-2) 97%, transparent);
    --shadow: 0 8px 20px -12px rgba(0, 0, 0, .7), 0 1px 3px rgba(0, 0, 0, .3);
    --lift: 0 4px 12px -6px rgba(0, 0, 0, .5);
    --glow: 0 0 0 1px color-mix(in srgb, var(--tool) 60%, transparent);
}
:root[data-theme="light"]:is(.amm-lite, .amm-calm) { --glass: rgba(255, 255, 255, .98); --shadow: 0 8px 20px -14px rgba(40, 20, 110, .3), 0 1px 3px rgba(40, 20, 110, .08); --lift: 0 4px 12px -8px rgba(40, 20, 110, .25); }
:is(.amm-lite, .amm-calm) *, :is(.amm-lite, .amm-calm) *:before, :is(.amm-lite, .amm-calm) *:after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; animation: none !important; transition: none !important; }
/* the two busy signs stay (they turn only while something works), slower */
:is(.amm-lite, .amm-calm) .btn.busy:before, :is(.amm-lite, .amm-calm) .spin i { animation: spin 1.2s linear infinite !important; }
:is(.amm-lite, .amm-calm) .pg.wait .pg-t i { left: 0; width: 100% !important; opacity: .35; }
:is(.amm-lite, .amm-calm) body:before { position: absolute; inset: 0; opacity: .32; background: radial-gradient(45% 40% at 10% 6%, color-mix(in srgb, var(--a1) 50%, transparent), transparent 70%), radial-gradient(40% 36% at 88% 100%, color-mix(in srgb, var(--a2) 36%, transparent), transparent 70%); }
:is(.amm-lite, .amm-calm) .qb-pg { box-shadow: none; }
:is(.amm-lite, .amm-calm) .dlg-box { box-shadow: var(--shadow); }
