/* SPDX-License-Identifier: MIT */
/* Voicefish – layout and look (platform colours: #111317 background, #181b20 panels, accent #FF5707). */

:root {
    --bg: #111317;
    --panel: #181b20;
    --panel2: #1e2228;
    --line: #2a2f37;
    --line2: #353b45;
    --text: #e7eaef;
    --muted: #98a1ad;
    --dim: #6b7380;
    --accent: #FF5707;
    --accent-ink: #140800;
    --accent-soft: rgba(255, 87, 7, 0.14);
    --blue: #79b8f0;
    --warn: #ffb347;
    --bad: #ff5c5c;
    --ok: #5fd38d;
    --r: 8px;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg);
    -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #ffa066; }
[hidden] { display: none !important; }
kbd {
    display: inline-block; min-width: 1.6em; padding: 1px 6px; margin: 0 2px 2px 0;
    border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px;
    background: var(--panel2); font: 12px/1.5 Consolas, "Cascadia Mono", monospace; color: var(--text); text-align: center;
}
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn); }
.mono { font-family: Consolas, "Cascadia Mono", monospace; }

/* ---- icons and buttons ---------------------------------------------------------------------------------- */
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.ico.big { width: 34px; height: 34px; }
.btn {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
    border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel2); cursor: pointer;
    white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: #262b33; border-color: #48505c; }
.btn:focus-visible, .icon-btn:focus-visible, .tool:focus-visible, .tab:focus-visible, .seg button:focus-visible,
.dropzone:focus-visible, .session-open:focus-visible, .chip:focus-visible, .preset:focus-visible, .shape-card:focus-visible,
.menu-item:focus-visible, .exit:focus-visible, .brand:focus-visible, .session-name:focus-visible, .linklike:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #ff7130; border-color: #ff7130; }
.btn.danger.primary { background: #d9363e; border-color: #d9363e; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--panel2); border-color: var(--line2); }
.btn.small { height: 29px; padding: 0 10px; font-size: 13px; gap: 5px; }
.btn.small .ico { width: 15px; height: 15px; }
.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
    border: 1px solid transparent; border-radius: var(--r); background: transparent; cursor: pointer; color: var(--text);
}
.icon-btn:hover:not(:disabled) { background: var(--panel2); border-color: var(--line2); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small .ico { width: 15px; height: 15px; }
.linklike { border: 0; background: none; padding: 0; color: #ffa066; text-decoration: underline; cursor: pointer; }

/* ---- header ------------------------------------------------------------------------------------------------ */
.top {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-width: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.logo-mark { display: inline-flex; width: 34px; height: 24px; }
.logo-mark svg { width: 100%; height: 100%; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.session-name {
    max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-left: 6px; padding: 5px 10px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); cursor: text;
}
.session-name:hover { border-color: var(--line2); color: var(--text); }
.spacer { flex: 1; }
.exit {
    display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 6px 10px 6px 6px;
    border-radius: var(--r); color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 13px;
}
.exit:hover { color: var(--text); background: var(--panel2); }

/* ---- toolbar ----------------------------------------------------------------------------------------------- */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 6px 10px;
    background: #15181d; border-bottom: 1px solid var(--line);
}
.tool-group { display: flex; gap: 2px; padding-right: 10px; border-right: 1px solid var(--line); }
.tool-group:last-child { border-right: 0; }
.tool {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-width: 54px; height: 48px; padding: 4px 6px; border: 1px solid transparent; border-radius: var(--r);
    background: transparent; cursor: pointer; color: var(--text); font-size: 11.5px;
}
.tool .ico { width: 20px; height: 20px; }
.tool:hover:not(:disabled) { background: var(--panel2); border-color: var(--line2); }
.tool:disabled { opacity: .35; cursor: default; }
body.no-session .toolbar { visibility: hidden; height: 0; padding: 0; border: 0; overflow: hidden; }

/* ---- workspace --------------------------------------------------------------------------------------------- */
.workspace { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.overview { display: block; width: 100%; height: 38px; border-bottom: 1px solid var(--line); cursor: pointer; touch-action: none; }
.wave-wrap { position: relative; flex: 1; min-height: 150px; }
#wave { position: absolute; inset: 0; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.side { min-height: 0; overflow: auto; background: var(--panel); border-left: 1px solid var(--line); }

.tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; padding: 8px 10px 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.tab {
    padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
    cursor: pointer; font-weight: 600;
}
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { padding: 12px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.panel-h { margin: 18px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel-h:first-child { margin-top: 2px; }

.chapter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chapter {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center;
    padding: 7px 6px 7px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel2); cursor: pointer;
}
.chapter.on { border-color: var(--accent); background: #251a14; }
.ch-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; }
.ch-fields { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ch-row { display: flex; gap: 6px; align-items: center; }
.ch-time { width: 92px; height: 26px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
.ch-len { color: var(--dim); font-size: 12px; }
.ch-title { height: 28px; }
.ch-btns { display: flex; flex-direction: column; gap: 2px; }

/* ---- forms ----------------------------------------------------------------------------------------------- */
.input {
    width: 100%; height: 32px; padding: 4px 9px; border: 1px solid var(--line2); border-radius: 6px;
    background: #0f1115; color: var(--text); min-width: 0;
}
textarea.input { height: auto; resize: vertical; line-height: 1.45; padding: 7px 9px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
select.input { padding-right: 6px; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
.field > span { font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; cursor: pointer; line-height: 1.35; }
.check input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; max-width: 100%; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; background: #0f1115; }
.seg button { padding: 7px 12px; border: 0; border-right: 1px solid var(--line2); background: none; cursor: pointer; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.slider-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 108px; align-items: center; gap: 4px 12px; margin: 12px 0; }
.slider-label { color: var(--muted); font-size: 13px; }
.slider-num { display: flex; align-items: center; gap: 5px; }
.slider-num .input { width: 72px; height: 30px; text-align: right; }
.unit { color: var(--dim); font-size: 12px; }
.slider-row .hint { grid-column: 2 / 4; color: var(--dim); font-size: 12px; margin-top: -2px; }
.range { width: 100%; accent-color: var(--accent); }
.chip {
    padding: 5px 10px; border: 1px solid var(--line2); border-radius: 999px; background: var(--panel2); cursor: pointer; font-size: 12.5px;
}
.chip:hover { border-color: var(--accent); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.preset {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 11px; min-width: 150px; flex: 1;
    border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel2); cursor: pointer; text-align: left;
}
.preset span { font-size: 11.5px; color: var(--muted); }
.preset:hover:not(:disabled) { border-color: var(--accent); }
.preset:disabled { opacity: .4; cursor: not-allowed; }
.plan { padding: 9px 11px; border-radius: var(--r); background: #15191f; border: 1px solid var(--line); line-height: 1.45; min-height: 1em; }
.plan:empty { display: none; }
.profile-status { padding: 8px 10px; border-left: 3px solid var(--line2); background: #15191f; border-radius: 4px; }
.profile-status.set { border-left-color: var(--ok); }
.name-row { display: flex; align-items: center; gap: 6px; }
.ext { color: var(--muted); }
.info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: 13px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.cover { display: flex; gap: 12px; align-items: flex-start; }
.cover-box { position: relative; width: 96px; height: 96px; flex: none; border: 1px dashed var(--line2); border-radius: var(--r); display: grid; place-items: center; overflow: hidden; background: #0f1115; }
.cover-box img { display: none; width: 100%; height: 100%; object-fit: cover; }
.cover-box.has img { display: block; }
.cover-box.has .cover-empty { display: none; }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); font-size: 12px; }
.cover-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ---- transport and status ---------------------------------------------------------------------------------- */
.transport {
    display: flex; align-items: center; gap: 10px; padding: 6px 12px; flex-wrap: wrap;
    background: var(--panel); border-top: 1px solid var(--line);
}
.tgroup { display: flex; align-items: center; gap: 2px; }
.icon-btn.play { width: 44px; height: 40px; background: var(--accent); color: var(--accent-ink); }
.icon-btn.play:hover:not(:disabled) { background: #ff7130; border-color: transparent; }
.icon-btn.play.on { background: #ffe1d1; }
.times { flex-direction: column; align-items: flex-start; gap: 0; margin-left: 6px; }
.time { font: 600 21px/1.1 Consolas, "Cascadia Mono", monospace; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.selinfo { font: 12px Consolas, "Cascadia Mono", monospace; color: var(--muted); white-space: pre; }
.hoverinfo { font: 12px Consolas, "Cascadia Mono", monospace; color: var(--dim); min-width: 92px; }
.volgroup { gap: 8px; color: var(--muted); }
.vol { width: 90px; }
.meter { position: relative; width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2f9e62 0%, #5fd38d 70%, #ffc94d 88%, #ff5c5c 100%); overflow: hidden; border: 1px solid var(--line); }
.meter-fill { position: absolute; top: 0; bottom: 0; right: 0; left: 0; background: #0c0e11; }
.meter.hot { border-color: var(--bad); }
.statusbar {
    display: flex; gap: 14px; align-items: center; padding: 4px 12px; font-size: 12px; color: var(--muted);
    background: #0e1013; border-top: 1px solid var(--line); min-height: 26px;
}
.status-left { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-mid { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.status-mid.warn { color: var(--warn); }
.legal { display: flex; gap: 12px; }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--text); text-decoration: underline; }

/* ---- welcome ----------------------------------------------------------------------------------------------- */
.welcome { position: absolute; inset: 0; z-index: 5; overflow: auto; background: radial-gradient(1200px 500px at 20% -10%, #24180f 0%, var(--bg) 55%); }
.welcome-inner { max-width: 860px; margin: 0 auto; padding: 36px 24px 40px; }
.welcome-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.welcome-head .logo-mark { width: 74px; height: 52px; }
.welcome-head h1 { margin: 0; font-size: 34px; letter-spacing: .01em; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.welcome-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.dropzone {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 22px; min-height: 140px;
    border: 1.5px dashed #4a515c; border-radius: 14px; background: rgba(24, 27, 32, .75); cursor: pointer; text-align: left;
}
.dropzone strong { font-size: 18px; }
.dropzone span { color: var(--muted); }
.dropzone .ico { color: var(--accent); margin-bottom: 4px; }
.dropzone:hover { border-color: var(--accent); background: rgba(40, 26, 18, .8); }
.dropzone.rec { border-style: solid; border-color: var(--line2); }
.dropzone.rec .ico { color: #ff5c5c; }
.features { margin: 22px 0 6px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; color: #c9cfd8; }
.features li { position: relative; padding-left: 18px; line-height: 1.4; }
.features li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.sessions-title { margin: 30px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sessions { display: flex; flex-direction: column; gap: 6px; }
.session-row { display: flex; gap: 6px; align-items: center; }
.session-open {
    flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; min-width: 0;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; text-align: left;
}
.session-open:hover { border-color: var(--accent); }
.session-open strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-open span { color: var(--muted); font-size: 12.5px; }
.privacy-note { margin-top: 26px; padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--muted); line-height: 1.5; font-size: 13px; }

/* ---- dialogs ----------------------------------------------------------------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 8, .62); }
.dialog {
    width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.dialog.wide { width: min(700px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 8px 18px; }
.dialog-head h2 { margin: 0; font-size: 17px; }
.dialog-body { padding: 4px 18px 10px; overflow: auto; line-height: 1.45; }
.dialog-body p { margin: 6px 0 10px; }
.dialog-body h3 { margin: 18px 0 6px; font-size: 14px; }
.dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.dialog-foot .btn:first-child:not(.primary) { margin-right: auto; }
.keys { border-collapse: collapse; width: 100%; font-size: 13px; }
.keys td { padding: 4px 8px 4px 0; vertical-align: top; border-bottom: 1px solid #23272e; }
.keys td:first-child { white-space: nowrap; width: 1%; }
.legal-line, .legal { color: var(--muted); }
.shape-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px; text-align: left;
    border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel2); cursor: pointer;
}
.shape-card canvas { width: 100%; height: auto; background: #0f1115; border-radius: 5px; }
.shape-card span { font-size: 11.5px; color: var(--muted); }
.shape-card.on { border-color: var(--accent); background: #251a14; }
.export-done { display: flex; gap: 14px; align-items: flex-start; }
.export-done .ico { color: var(--ok); }
.export-done strong { word-break: break-all; }

.menu { position: fixed; z-index: 60; min-width: 230px; padding: 5px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.menu-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; }
.menu-item:hover:not(:disabled) { background: var(--panel2); }
.menu-item:disabled { opacity: .4; cursor: default; }
.menu-item kbd { font-size: 11px; }

/* record */
.rec-top { display: flex; align-items: center; gap: 16px; margin: 4px 0 12px; }
.rec-btn { height: 46px; padding: 0 22px; font-size: 16px; font-weight: 600; }
.rec-btn .ico { color: #ff4d4d; width: 22px; height: 22px; }
.rec-btn.on { background: #3a1414; border-color: #ff4d4d; }
.rec-btn.on .ico { color: #fff; }
.rec-time { font: 600 28px/1 Consolas, "Cascadia Mono", monospace; font-variant-numeric: tabular-nums; }
.rec-clip { margin-left: auto; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; color: var(--dim); border: 1px solid var(--line2); }
.rec-clip.on { color: #fff; background: #d9363e; border-color: #d9363e; }
.rec-meter { position: relative; height: 16px; margin-bottom: 18px; border-radius: 4px; background: linear-gradient(90deg, #2f9e62, #5fd38d 75%, #ffc94d 90%, #ff5c5c); border: 1px solid var(--line); }
.rec-meter-fill { position: absolute; top: 0; bottom: 0; right: 0; left: 0; background: #0c0e11; border-radius: 0 3px 3px 0; }
.rec-meter-hold { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; left: 0; }
.rec-meter-scale { position: absolute; left: 0; right: 0; top: 17px; height: 14px; font-size: 10px; color: var(--dim); }
.rec-meter-scale span { position: absolute; transform: translateX(-50%); }
.rec-scope { display: block; width: 100%; height: 90px; border-radius: 6px; background: #12151a; }
.rec-status { color: var(--muted); }

/* busy, toasts, drop */
.busy { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(5, 6, 8, .55); }
.busy-box { width: min(420px, 92vw); padding: 18px 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 10px; }
.busy-title { font-weight: 600; }
.progress { height: 8px; border-radius: 4px; background: #0c0e11; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.busy-text { color: var(--muted); font-size: 13px; min-height: 1em; }
.busy-box .btn { align-self: flex-end; }
.toasts { position: fixed; left: 50%; bottom: 84px; z-index: 90; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(640px, 92vw); }
.toast { padding: 9px 14px; border-radius: 10px; background: #2a2f37; border: 1px solid #3a414b; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); line-height: 1.4; transition: opacity .3s, transform .3s; }
.toast.ok { border-color: #2f7d51; }
.toast.warn { border-color: #9a6a1f; }
.toast.error { border-color: #a33; background: #2d1818; }
.toast.out { opacity: 0; transform: translateY(6px); }
.dropmark { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(255, 87, 7, .1); border: 3px dashed var(--accent); pointer-events: none; font-size: 22px; font-weight: 600; }
.dropmark div { padding: 18px 26px; border-radius: 14px; background: var(--panel); }
.noscript { padding: 20px; }

/* ---- narrow screens ----------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .tool .lbl { display: none; }
    .tool { min-width: 38px; height: 38px; }
    .workspace { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 860px) {
    .top .btn .lbl, .exit span { display: none; }
    .top .btn { padding: 0 10px; }
    .hoverinfo { display: none; }
    .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 38%); }
    .side { border-left: 0; border-top: 1px solid var(--line); }
    .welcome-actions, .features { grid-template-columns: 1fr; }
    .slider-row { grid-template-columns: 1fr 96px; }
    .slider-row .slider-label { grid-column: 1 / 3; }
    .slider-row .hint { grid-column: 1 / 3; }
    .shape-cards { grid-template-columns: 1fr 1fr; }
    .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .toolbar { flex-wrap: nowrap; overflow-x: auto; gap: 6px; min-width: 0; scrollbar-width: thin; }
    .top { gap: 4px; padding: 6px 8px; }
    .top .btn { padding: 0 9px; }
    .exit { padding: 6px 4px; margin-left: 0; }
    .transport { gap: 6px; padding: 6px 8px; }
    .times { margin-left: 2px; }
    .tool-group { padding-right: 6px; }
    .session-name { display: none; }
    .brand-name { display: none; }
    .volgroup { display: none; }
    .statusbar .status-left { display: none; }
    .statusbar { gap: 10px; padding: 4px 8px; }
    .status-mid { flex: 1; }
    .legal { gap: 9px; flex: none; }
    .time { font-size: 18px; }
    .welcome-inner { padding: 22px 16px; }
    .welcome-head h1 { font-size: 27px; }
}
