/*! XUNTU-SOFTWARE-NOTICE
 * 讯图金耳朵 Web 调音系统
 * Copyright © 2026 深圳市迅图电子科技有限公司。保留所有权利。
 * “讯图”“讯图金耳朵”为注册商标。
 * 本公司自有代码及素材适用专有许可；法律允许或另有授权的情形除外。
 * 第三方组件继续适用其原许可。完整声明见用户端 HTML 源码。
 */
:root {
  color-scheme: dark;
  --bg: #020a12;
  --surface: #06131e;
  --surface-2: #0a1925;
  --surface-3: #102332;
  --line: #294353;
  --line-soft: #172c39;
  --text: #f1efe9;
  --muted: #a8a59c;
  --gold: #d6aa49;
  --gold-bright: #f0ca69;
  --gold-dark: #6e5217;
  --green: #42e77b;
  --purple: #a77ae8;
  --blue-grey: #8291ae;
  --danger: #ed6a5e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --button-height: 30px;
  --button-height-small: 26px;
  --icon-size: 9px;
  --left-control-width: 112px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 1180px; width: 100%; height: 100%; min-height: 0; background: var(--bg); color: var(--text); font-size: 14px; }

body { overflow: hidden; }

button, input, select { font: inherit; }
select { text-align: center; text-align-last: center; }
select option { text-align: center; }
button { color: var(--text); cursor: pointer; line-height: 1; white-space: nowrap; }
button:disabled { cursor: wait; opacity: 0.58; }

.app-shell { width: 100%; height: 100vh; height: 100dvh; min-height: 0; display: grid; grid-template-rows: 48px minmax(0, 1fr); overflow: hidden; background: radial-gradient(circle at 58% 16%, rgba(37, 112, 145, 0.10), transparent 34%), var(--bg); }

.titlebar { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid #365567; background: #030b12; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand-mark { display: none; }
.brand div { display: flex; align-items: baseline; gap: 8px; }
.brand strong { font-size: 21px; letter-spacing: -0.5px; }
.brand span { font-size: 14px; color: #cbc8c0; }
.window-caption { display: none; }

.commandbar { display: flex; flex: 1; min-width: 0; align-items: center; gap: 14px; padding: 0; border: 0; background: transparent; }
.command-group { display: flex; align-items: center; gap: 8px; }
.page-tabs { display: flex; align-items: center; justify-content: center; gap: 8px; }
.source-controls { margin-left: 24px; }
.primary-tabs { margin-left: auto; }
.control-label { color: #d9d6cf; font-size: 14px; white-space: nowrap; }
.source-controls .control-label:first-child { width: 49px; }
.noise-gate-controls .control-label:first-child { width: auto; }
.tab-button, .connection-button { width: max-content; min-width: 0; min-height: 30px; padding: 0 8px; background: #071521; border: 1px solid #3a5b6f; }
.source-select { width: 126px; min-width: 126px; height: 30px; padding: 0 24px 0 7px; appearance: none; color: #eaf3f7; background-color: #071521; border: 1px solid #3a5b6f; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%23d8e6ef' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.source-select:focus-visible { outline: 1px solid var(--gold-bright); outline-offset: 1px; border-color: var(--gold); }
.source-select:disabled { color: #70818b; background-color: #07121b; border-color: #263c49; cursor: not-allowed; opacity: .72; }
.source-select.is-writing { color: var(--gold-bright); border-color: var(--gold); cursor: wait; }
.main-source-select { color: #17140d; font-weight: 700; background-color: var(--gold-bright); border-color: #ffe19a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%2317140d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); box-shadow: inset 0 -2px 0 #8b681d, 0 0 8px rgba(240,202,105,.18); }
.main-source-select:disabled { color: #17140d; background-color: var(--gold-bright); border-color: #ffe19a; opacity: .72; }
.device-io-status { flex: 0 1 280px; min-width: 170px; max-width: 280px; margin-left: 10px; display: flex; align-items: center; gap: 8px; color: #b8c4ca; font-size: 14px; white-space: nowrap; }
.device-io-status i { flex: 0 0 auto; width: var(--icon-size); height: var(--icon-size); background: #686e72; }
.device-io-status span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.device-io-status[data-state="working"] { color: #9ceaff; }
.device-io-status[data-state="working"] i { background: #43d9ff; box-shadow: 0 0 10px rgba(67,217,255,.42); animation: configuration-pulse 1s ease-in-out infinite; }
.device-io-status[data-state="warning"] { color: var(--gold-bright); }
.device-io-status[data-state="warning"] i { background: var(--gold); }
.device-io-status[data-state="success"] { color: #81eca5; }
.device-io-status[data-state="success"] i { background: var(--green); box-shadow: 0 0 9px rgba(66,231,123,.42); }
.noise-gate-select { width: 96px; min-width: 96px; }
.tab-button { width: max-content; min-width: 0; padding-inline: 6px; }
.tab-button.is-active { color: var(--gold-bright); background: #3d3114; border-color: var(--gold); }
.connection-button { display: flex; align-items: center; justify-content: center; gap: 7px; margin-left: 4px; border-color: transparent; background: transparent; color: #c3c4c6; }
.status-dot { width: var(--icon-size); height: var(--icon-size); background: #65686e; }
.connection-button.is-connected { color: var(--green); }
.connection-button.is-connected .status-dot { background: #17452a; box-shadow: none; transition: background-color 30ms linear, box-shadow 30ms linear, opacity 30ms linear; opacity: .46; }
.connection-button.is-connected.is-communicating .status-dot { background: var(--green); box-shadow: 0 0 15px rgba(66, 231, 123, 0.52); opacity: 1; }
.connection-button.needs-https { color: var(--gold-bright); }
.connection-button.needs-https .status-dot { background: var(--gold); }

.workspace { min-height: 0; padding: 8px; overflow: hidden; background: #020912; }
.page { display: none; height: 100%; min-height: 0; overflow: auto; }
.page.is-active { display: block; }
.page[data-page="home"] { overflow: hidden; }
.home-grid { display: grid; grid-template-columns: 258px minmax(1050px, 1fr); gap: 8px; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.left-rail { display: grid; grid-template-rows: 248px 174px max-content max-content; align-content: start; gap: 0; overflow-x: hidden; overflow-y: auto; background: #04111c; border: 1px solid var(--line); }
.main-stage { display: grid; grid-template-rows: minmax(176px, 1fr) 288px 206px; gap: 8px; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.panel { background: linear-gradient(145deg, #071521, #04101a); border: 1px solid var(--line); box-shadow: inset 0 1px rgba(255,255,255,0.018); }
.left-rail .panel { border: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
.left-rail .panel:last-child { border-bottom: 0; }
.panel-title { position: relative; padding-left: 11px; font-size: 16px; line-height: 26px; color: #ece9e2; }
.panel-title::before { content: ""; position: absolute; left: 0; top: 3px; width: 3px; height: 21px; background: var(--gold); }

.crossover-panel, .eq-actions-panel, .preset-panel { padding: 10px; }
.crossover-columns { display: grid; grid-template-columns: repeat(2, var(--left-control-width)); gap: 8px; margin-top: 4px; }
.crossover-columns label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
.crossover-columns label > * { grid-column: 1; }
.crossover-columns small { color: var(--muted); font-size: 12px; }
.crossover-columns select, .crossover-columns input, .field-with-unit { min-width: 0; height: 30px; }
.field-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; width: var(--left-control-width); padding: 0 8px; background: #061522; border: 1px solid #38596c; }
.field-with-unit:focus-within { border-color: var(--gold); }
.field-with-unit:has(input[aria-invalid="true"]) { border-color: #ff7076; }
.crossover-frequency-error {
  position: fixed;
  z-index: 10021;
  padding: 7px 10px;
  border: 1px solid #cf555e;
  border-radius: 7px;
  background: #331c28;
  color: #ffe0e2;
  box-shadow: 0 4px 12px #0007;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}
.crossover-frequency-error[hidden] { display: none; }
.crossover-frequency-error::after {
  content: "";
  position: absolute;
  left: calc(var(--crossover-arrow) - 5px);
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-right: 1px solid #cf555e;
  border-bottom: 1px solid #cf555e;
  background: #331c28;
  transform: rotate(45deg);
}
.crossover-frequency-error[data-side="below"]::after { top: -4px; bottom: auto; transform: rotate(225deg); }
.field-with-unit input { width: 100%; height: 28px; color: var(--text); background: transparent; border: 0; outline: 0; padding: 0; appearance: textfield; }
.field-with-unit input::-webkit-inner-spin-button, .field-with-unit input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.crossover-columns select { color: var(--text); background-color: #061522; border: 1px solid #38596c; padding: 0 9px; }
#hpfFrequency, #lpfFrequency { text-align: center; }
.crossover-columns select {
  appearance: none;
  field-sizing: content;
  width: var(--left-control-width);
  max-width: 100%;
  min-width: 0;
  padding-left: 18px;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%23d8e6ef' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 9px 6px;
}
.field-with-unit b { font-size: 12px; color: #bdb9b1; pointer-events: none; user-select: none; }
.slope-select { color: var(--gold-bright) !important; }

.two-column-buttons, .preset-grid { display: grid; grid-template-columns: repeat(2, var(--left-control-width)); gap: 8px; margin-top: 10px; }
.two-column-buttons button { width: var(--left-control-width); min-width: 0; height: var(--button-height); padding: 0 6px; background: #071521; border: 1px solid #38596c; }
.eq-actions-panel [data-action$="-mode"].is-active { color: #17140d; font-weight: 700; background: var(--gold-bright); border-color: #ffe19a; box-shadow: inset 0 -2px 0 #8b681d, 0 0 8px rgba(240,202,105,.24); }
.eq-actions-panel [data-action="bypass-eq"].is-active { color: #17140d; font-weight: 700; background: var(--gold-bright); border-color: #ffe19a; box-shadow: inset 0 -2px 0 #8b681d, 0 0 8px rgba(240,202,105,.24); }
.maintenance-actions button, .maintenance-tools button { width: max-content; min-width: 0; height: var(--button-height); padding: 0 6px; background: #071521; border: 1px solid #38596c; }
.preset-grid button { position: relative; display: flex; align-items: center; justify-content: center; width: var(--left-control-width); min-width: 0; height: 32px; padding: 0 7px; background: #071521; border: 1px solid #38596c; font-size: 14px; text-align: center; }
.preset-grid .preset-label { display: block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset-grid button.is-cached::after, .preset-grid button.is-loading::after { content: ""; position: absolute; right: 6px; top: 6px; width: 5px; height: 5px; border-radius: 50%; }
.preset-grid button.is-cached::after { background: var(--green); box-shadow: 0 0 5px rgba(68,235,139,.7); }
.preset-grid button.is-loading::after { background: var(--gold); animation: preset-cache-pulse 1s ease-in-out infinite; }
@keyframes preset-cache-pulse { 50% { opacity: .35; } }
.preset-grid { gap: 6px 8px; margin-top: 10px; }
.preset-grid button.is-active { color: var(--gold-bright); border-color: var(--gold); background: #392d12; font-weight: 700; }
.preset-grid button.is-active .preset-label { max-width: calc(100% - 14px); }
.preset-grid button.is-active::after { content: "✓"; top: 50%; right: 6px; width: auto; height: auto; transform: translateY(-50%); color: #9df4ba; background: none; border-radius: 0; box-shadow: none; font-size: 14px; font-weight: 700; line-height: 1; animation: none; }
.preset-grid button.is-equivalent { color: #ffe4a0; border-color: #b69351; background: #292617; }
.preset-grid button.is-equivalent .preset-label { max-width: calc(100% - 14px); }
.preset-grid button.is-equivalent::after { content: "≈"; top: 50%; right: 6px; width: auto; height: auto; transform: translateY(-50%); color: #ffe4a0; background: none; border-radius: 0; box-shadow: none; font-size: 14px; font-weight: 700; line-height: 1; animation: none; }
.preset-grid button.is-target { color: #9feeff; border-color: #30cdec; box-shadow: inset 0 0 0 1px rgba(48,205,236,.3), 0 0 8px rgba(48,205,236,.2); }
.preset-grid button.is-active.is-target { color: #fff4c8; border-color: #ffe08b; box-shadow: inset 0 0 0 1px rgba(255,224,139,.32), 0 0 9px rgba(240,202,105,.28); }
.primary-button { color: #17140d !important; background: var(--gold) !important; border-color: #ebc763 !important; }
.preset-panel p { color: #bbb7ae; font-size: 13px; }
.preset-panel { min-height: 0; overflow: visible; }
.preset-panel small { display: block; margin-top: 15px; color: #686b71; line-height: 1.65; }
.preset-panel-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; }
.preset-panel-title > span { flex: 0 0 auto; }
.preset-panel-title > small { min-width: 0; margin: 0; color: #8da2ad; font-size: 14px; font-weight: 400; line-height: 20px; text-align: right; white-space: nowrap; }
.quick-compensation-panel { position: relative; padding: 10px; }
.quick-compensation-panel .preset-panel-title { justify-content: flex-start; gap: 5px; }
.quick-compensation-scope, .quick-compensation-status { color: #a8b8c2; font-size: 12px; line-height: 1.5; margin-top: 7px; }
.quick-compensation-scope:empty, .quick-compensation-status:empty { display: none; }
.quick-compensation-fields { display: grid; grid-template-columns: repeat(2, var(--left-control-width)); justify-content: center; gap: 6px 8px; margin-top: 11px; }
.quick-compensation-fields label { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; font-size: 13px; color: #dce6eb; }
.quick-compensation-fields label span { flex: 0 0 auto; white-space: nowrap; }
.quick-compensation-fields input { flex: 0 0 64px; width: 64px; min-width: 0; height: 30px; box-sizing: border-box; border: 1px solid #426070; border-radius: 5px; background: #071521; color: #f4d16f; font: inherit; font-variant-numeric: tabular-nums; text-align: right; padding: 3px 5px; }
.quick-compensation-fields input:focus { outline: 2px solid #57cde2; outline-offset: 1px; }
.quick-compensation-fields input:disabled { opacity: .55; }
.quick-compensation-bind-dialog { width: min(480px, calc(100vw - 32px)); }

.response-panel { position: relative; padding: 8px 10px 6px; overflow: hidden; background: linear-gradient(180deg, #04131f, #020c14); }
.response-header { height: 34px; display: flex; align-items: flex-start; gap: 18px; border-bottom: 1px solid #1b3544; }
.response-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.response-heading > span { color: #748995; font-size: 12px; white-space: nowrap; }
.response-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.response-tools button { width: max-content; min-width: 0; height: 22px; padding: 0 6px; color: #aebbc1; background: #111d25; border: 1px solid #344d5a; }
.response-tools button.is-active { color: #071018; background: var(--gold-bright); border-color: var(--gold-bright); }
.headroom-status { min-width: 138px; padding: 3px 6px; color: #74d89b; font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; font-size: 12px; font-weight: 400; line-height: 1.4; text-align: center; border: 1px solid #285d42; background: rgba(18,69,43,.28); }
.headroom-status.is-warning { color: #ffd364; border-color: #8d6a1d; background: rgba(106,74,12,.34); }
.headroom-status.is-danger { color: #ff8678; border-color: #a43d33; background: rgba(106,24,18,.38); }
.response-tools { min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
.response-tools > button:not(.communication-status) { flex: 0 0 auto; }
.response-tools .communication-status { flex: 0 1 370px; width: 370px; min-width: 140px; max-width: 460px; display: flex; align-items: center; gap: 6px; padding: 0 7px; text-align: left; font-size: 13px; color: #b2c1ca; }
.communication-status [data-communication-text] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.communication-light { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #70828c; }
.communication-chevron { margin-left: auto; color: #8ca1ad; }
.communication-status[data-tone="working"] { color: #87d9f8; border-color: #386a87; }
.communication-status[data-tone="working"] .communication-light { background: #5dccf7; }
.communication-status[data-tone="waiting"], .communication-status[data-tone="warning"] { color: #f6d77d; border-color: #806c35; }
.communication-status[data-tone="waiting"] .communication-light, .communication-status[data-tone="warning"] .communication-light { background: #ffd364; }
.communication-status[data-tone="success"] { color: #9addb3; border-color: #36664a; }
.communication-status[data-tone="success"] .communication-light { background: #70de9b; }
.communication-status[data-tone="error"] { color: #ffaca2; border-color: #a64e43; }
.communication-status[data-tone="error"] .communication-light { background: #ff7565; }
.communication-dialog { position: fixed; z-index: 90; inset: auto; left: 50%; top: 50%; width: min(1100px, calc(100vw - 24px)); max-width: calc(100vw - 24px); height: min(740px, calc(100vh - 32px)); height: min(740px, calc(100dvh - 32px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); min-width: 0; min-height: 0; margin: 0; padding: 18px; overflow: auto; color: #d8e4eb; background: #071724; border: 1px solid #38596c; border-radius: 10px; box-shadow: 0 20px 70px #0009; transform: translate(-50%, -50%); }
.communication-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.communication-dialog:not([open]), .communication-dialog [hidden] { display: none !important; }
.communication-dialog::backdrop { background: transparent; }
.communication-dialog-header { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; cursor: grab; touch-action: none; user-select: none; }
.communication-dialog-header:active { cursor: grabbing; }
.communication-dialog-heading { flex: 1 1 auto; min-width: 0; }
.communication-dialog-header h2 { margin: 0; font-size: 20px; }
.communication-drag-hint { display: block; margin-top: 5px; color: #829eaf; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.communication-dialog-header p { margin: 6px 0 0; color: #9dafba; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.communication-dialog button, .communication-dialog input, .communication-dialog select { font-size: 14px; }
.communication-dialog-actions { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; max-width: 55%; cursor: default; touch-action: auto; }
.communication-dialog-actions button { min-height: 32px; padding: 6px 10px; color: #d8e4eb; background: #102a3b; border: 1px solid #426174; border-radius: 4px; cursor: pointer; touch-action: manipulation; }
.communication-dialog-actions button:hover { background: #193a50; border-color: #6b96ae; }
.communication-dialog-actions .communication-dialog-close { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; font-size: 24px; }
.communication-toolbar { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.communication-toolbar label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.communication-toolbar select, .communication-toolbar input { min-height: 34px; padding: 5px 8px; color: #dae5ec; background: #0b2130; border: 1px solid #385264; border-radius: 4px; }
.communication-toolbar input { flex: 1 1 230px; min-width: min(150px, 100%); max-width: 100%; }
.communication-toolbar button { min-height: 34px; padding: 5px 10px; }
.communication-log { flex: 1 1 180px; min-height: 70px; min-width: 0; overflow: auto; overscroll-behavior: contain; list-style: none; margin: 0; padding: 0; background: #04111c; border: 1px solid #294354; border-radius: 5px; }
.communication-log-item { padding: 8px 10px; border-bottom: 1px solid #193142; }
.communication-log-heading { display: grid; grid-template-columns: 105px 40px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.6; }
.communication-log-heading time { color: #8fa7b5; font-variant-numeric: tabular-nums; }
.communication-direction { color: #7bc6ec; font-family: Consolas, monospace; }
.communication-entry-summary { overflow-wrap: anywhere; }
.communication-log-item.phase-error, .communication-log-item.phase-timeout { color: #ffaaa0; background: #6f20161f; }
.communication-log-item.phase-retry, .communication-log-item.phase-rollback { color: #f5d381; }
.communication-log-item.phase-verified { color: #96dab1; }
.communication-entry-details { margin: 4px 0 0 153px; color: #92aabb; font-size: 12px; }
.communication-entry-details summary { width: max-content; cursor: pointer; }
.communication-entry-details pre { margin: 6px 0 0; padding: 9px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; max-height: 220px; overflow: auto; color: #bad1de; background: #0a1d2b; }
.communication-log-empty { padding: 28px 15px; color: #93a9b8; text-align: center; font-size: 14px; }
.communication-history-controls { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.communication-history-controls:not(:has(button:not([hidden]))) { display: none; }
.communication-log-more { min-height: 32px; padding: 6px 15px; }
.communication-dialog-footer { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 13px; line-height: 1.5; color: #8ea6b6; overflow-wrap: anywhere; }
.communication-dialog-footer [data-communication-message] { color: #e7c976; }
html.communication-popout, body.communication-popout { width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; overflow: hidden; background: #071724; }
body.communication-popout .communication-dialog, .communication-dialog.is-detached { position: fixed; inset: 0; left: 0; top: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; transform: none; }
body.communication-popout .communication-dialog-header, .communication-dialog.is-detached .communication-dialog-header { cursor: default; touch-action: auto; }
@media (max-width: 1250px) { .response-heading > span { display: none; } }
@media (max-width: 650px) { .communication-dialog { padding: 12px; } .communication-dialog[open] { gap: 10px; } .communication-dialog-header { gap: 8px; } .communication-dialog-header h2 { font-size: 18px; } .communication-dialog-actions { gap: 5px; } .communication-dialog-actions button { padding-inline: 8px; font-size: 12px; } .communication-toolbar { gap: 6px; } .communication-toolbar input { flex-basis: 100%; } .communication-log-heading { grid-template-columns: 94px 30px minmax(0, 1fr); gap: 5px; font-size: 12px; } .communication-entry-details { margin-left: 0; } .communication-dialog-footer { font-size: 12px; } }
@media (max-height: 480px) { .communication-dialog { padding: 10px; } .communication-dialog[open] { gap: 8px; } .communication-dialog-header h2 { font-size: 17px; } .communication-drag-hint { margin-top: 3px; } .communication-dialog-header p { margin-top: 3px; } .communication-toolbar select, .communication-toolbar input, .communication-toolbar button { min-height: 30px; } .communication-dialog-footer { font-size: 12px; } }
.channel-watermark { position: absolute; top: 67px; left: 82px; z-index: 3; color: rgba(214, 170, 73, 0.22); font: 700 28px/1 Consolas, monospace; letter-spacing: .08em; pointer-events: none; }
.response-body { position: absolute; inset: 46px 10px 6px; display: grid; grid-template-columns: 62px minmax(1240px, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #38596c #06131e; }
.response-axis-rail { position: sticky; left: 0; z-index: 7; min-width: 0; height: 100%; align-self: stretch; display: grid; grid-template-columns: 38px 24px; border-right: 1px solid #284554; background: linear-gradient(90deg, rgba(3,14,22,.99), rgba(4,18,28,.96)); box-shadow: 5px 0 12px rgba(0,0,0,.2); }
.response-channel-rail { min-width: 0; padding: 4px 3px 4px 0; display: grid; grid-template-rows: repeat(6, 1fr); gap: 3px; border-right: 1px solid #1d3745; }
.response-db-scale { position: relative; height: 100%; color: #8799a2; font: 11px/1 Consolas, monospace; pointer-events: none; background: rgba(4,18,28,.74); }
.response-db-scale span { position: absolute; right: 2px; transform: translateY(-50%); white-space: nowrap; text-shadow: 0 1px 2px #000; }
.response-db-scale span:nth-child(1) { top: 5.22%; }
.response-db-scale span:nth-child(2) { top: 26.30%; }
.response-db-scale span:nth-child(3) { top: 47.39%; color: #9ca8ad; }
.response-db-scale span:nth-child(4) { top: 68.48%; }
.response-db-scale span:nth-child(5) { top: 89.57%; }
.response-channel-item { --channel-color: #f0ca69; position: relative; display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(15px, 1fr) 13px; align-items: stretch; min-height: 30px; padding: 1px 2px; border: 1px solid transparent; background: transparent; box-shadow: none; transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, opacity .12s ease; }
.response-channel-item:hover:not(.is-active) { background: rgba(255,255,255,.025); }
.response-channel-item.is-active { border-color: var(--channel-color); box-shadow: inset 3px 0 0 #f3f7f8, inset 0 2px 5px rgba(0,0,0,.72), inset 0 0 0 1px var(--channel-color), 0 0 7px color-mix(in srgb, var(--channel-color) 34%, transparent); }
.response-channel-item.is-active::before { content: ""; position: absolute; left: 4px; right: 4px; top: 1px; height: 1px; background: #f3f7f8; box-shadow: 0 0 4px #f3f7f8; }
.response-channel-item.is-dimmed { opacity: .42; }
.response-channel-item.is-warning::after, .response-channel-item.is-danger::after { content: "!"; position: absolute; top: -3px; right: -2px; width: 11px; height: 11px; display: grid; place-items: center; color: #071018; font: 800 9px/1 sans-serif; border-radius: 50%; background: #ffc642; }
.response-channel-item.is-danger::after { color: #fff; background: #ff594c; }
.response-channel-visible, .response-channel-select { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.response-channel-visible { position: relative; grid-row: 2; }
.response-channel-visible::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: 1px solid var(--channel-color); border-radius: 50%; transform: translate(-50%, -50%); background: #061018; box-shadow: 0 0 5px color-mix(in srgb, var(--channel-color) 28%, transparent); }
.response-channel-item.is-visible .response-channel-visible::before { background: var(--channel-color); box-shadow: 0 0 7px var(--channel-color); }
.response-channel-select { grid-row: 1; color: color-mix(in srgb, var(--channel-color) 58%, #829099); font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; font-size: 12px; font-weight: 400; line-height: 1; text-align: center; }
.response-channel-item.is-active .response-channel-select { color: #f4f7f8; }
.response-chart-scroll { position: relative; min-width: 1240px; min-height: 0; overflow: hidden; border: 1px solid #203b4a; }
.response-chart { position: relative; z-index: 1; display: block; width: 100%; min-width: 1240px; height: 100%; overflow: visible; }
.response-frequency-scale { position: absolute; inset: 0; z-index: 2; color: #8799a2; font: 11px/1 Consolas, monospace; pointer-events: none; }
.response-frequency-scale span { position: absolute; bottom: 6px; transform: translateX(-50%); white-space: nowrap; text-shadow: 0 1px 2px #000; }
.response-frequency-scale span:nth-child(1) { left: 1.6129%; }
.response-frequency-scale span:nth-child(2) { left: 11.2903%; }
.response-frequency-scale span:nth-child(3) { left: 20.9677%; }
.response-frequency-scale span:nth-child(4) { left: 30.6452%; }
.response-frequency-scale span:nth-child(5) { left: 40.3226%; }
.response-frequency-scale span:nth-child(6) { left: 50%; }
.response-frequency-scale span:nth-child(7) { left: 59.6774%; }
.response-frequency-scale span:nth-child(8) { left: 69.3548%; }
.response-frequency-scale span:nth-child(9) { left: 79.0323%; }
.response-frequency-scale span:nth-child(10) { left: 88.7097%; }
.response-frequency-scale span:nth-child(11) { left: 98.3871%; }
.response-logo-watermark { position: absolute; z-index: 0; left: 50%; top: 50%; width: 120%; height: 120%; transform: translate(-50%, -50%); background: #f0ca69; -webkit-mask-image: url("../icons/logo.png"); mask-image: url("../icons/logo.png"); -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; opacity: .15; pointer-events: none; }
.grid-line { stroke: #274454; stroke-width: 1; vector-effect: non-scaling-stroke; }
.grid-line.band-grid { stroke: #17303e; }
.grid-line.zero { stroke: #60727d; }
.axis-label { fill: #b4b0a7; font-size: 11px; }
.frequency-label { fill: #91a4ad; font: 10px/1 Consolas, monospace; }
.chart-selected-band { fill: rgba(240,202,105,.10); stroke: var(--gold-bright); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(240,202,105,.24)); pointer-events: none; }
.chart-cutoff-shade { fill: rgba(2,6,9,.43); pointer-events: none; }
.chart-cutoff-line { stroke: rgba(189,205,214,.72); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart-cutoff-label { fill: #e7eef1; font: 11px/1 Consolas, monospace; pointer-events: none; }
.chart-cutoff-handle { cursor: ew-resize; touch-action: none; }
.chart-cutoff-hit { fill: transparent; pointer-events: all; }
.chart-cutoff-handle:hover .chart-cutoff-line { stroke: var(--gold-bright); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(240,202,105,.48)); }
.chart-cutoff-handle:hover .chart-cutoff-label { fill: var(--gold-bright); font-weight: 700; }
.chart-band-hit { fill: transparent; cursor: pointer; pointer-events: all; }
.chart-line { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; }
.total-line { stroke-width: 1.8; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--active-channel-color) 48%, transparent)); }
.total-line.is-warning { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--active-channel-color) 68%, transparent)); }
.total-line.is-danger { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--active-channel-color) 78%, transparent)); }
.channel-overlay-line { stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.channel-overlay-line.is-dimmed { opacity: .13; }
.channel-overlay-line.is-highlighted { stroke-width: 2.2; opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
.reference-line { stroke: rgba(205,218,224,.60); stroke-width: 1.2; stroke-dasharray: 5 4; }
.contribution-line { stroke: #57b8ff; stroke-width: 1.5; stroke-dasharray: 3 3; }
.rta-line { stroke: #d17dff; stroke-width: 1.2; stroke-dasharray: 2 2; opacity: .86; }
.chart-area { pointer-events: none; }
.chart-band-node { --response-node-color: #64f52f; cursor: ns-resize; touch-action: none; }
.chart-band-node.response-warning { --response-node-color: #ffd364; }
.chart-band-node.response-danger { --response-node-color: #ff594c; }
.chart-band-node circle { fill: var(--response-node-color); stroke: var(--response-node-color); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: all; }
.chart-band-node text { fill: #071018; font: 700 9px/1 Consolas, monospace; pointer-events: none; user-select: none; }
.chart-band-node:hover circle { stroke: #d8e3e7; filter: drop-shadow(0 0 4px var(--response-node-color)); }
.chart-band-node.is-selected circle { stroke: #f7fbfc; stroke-width: 2.5; filter: drop-shadow(0 0 5px var(--response-node-color)); }
.chart-band-node.response-warning circle { animation: response-node-flash 1.4s ease-in-out infinite; }
.chart-band-node.response-danger circle { animation: response-node-flash 1s ease-in-out infinite; }
.chart-band-node.is-zero-gain circle { fill: none; filter: none; }
.chart-band-node.is-zero-gain text { fill: var(--response-node-color); }
.chart-band-node.is-zero-gain.response-normal circle { stroke: #708894; }
.chart-band-node.is-zero-gain.response-normal text { fill: #bacbd5; }
.chart-band-node.is-zero-gain:hover circle, .chart-band-node.is-zero-gain.is-selected circle { stroke: #f7fbfc; filter: none; }
@keyframes response-node-flash { 0%, 100% { fill-opacity: 1; stroke-opacity: 1; } 50% { fill-opacity: .32; stroke-opacity: .65; } }
.response-chart.is-dragging-gain { cursor: ns-resize; }
.response-chart.is-dragging-cutoff { cursor: ew-resize; }
.response-chart:focus { outline: 1px solid rgba(240,202,105,.45); outline-offset: -1px; }
.response-tooltip { position: fixed; z-index: 10020; width: 194px; padding: 9px 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px 10px; color: #a9bbc4; font-size: 12px; line-height: 1.25; background: rgba(3,16,25,.96); border: 1px solid #4e7588; box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 12px rgba(100,245,47,.12); pointer-events: none; }
.response-tooltip[hidden] { display: none; }
.response-tooltip strong { grid-column: 1 / -1; padding-bottom: 6px; color: #f0ca69; font-size: 13px; border-bottom: 1px solid #284452; }
.response-tooltip span { display: flex; justify-content: space-between; gap: 5px; white-space: nowrap; }
.response-tooltip span:last-child { grid-column: 1 / -1; }
.response-tooltip b { color: #eef5f7; font: 700 12px/1 Consolas, monospace; }
.response-tooltip .response-tooltip-total, .response-tooltip .response-tooltip-warning { grid-column: 1 / -1; }
.response-tooltip-warning.response-normal b { color: #64f52f; }
.response-tooltip-warning.response-warning b { color: #ffd364; }
.response-tooltip-warning.response-danger b { color: #ff594c; }

.equalizer-panel { position: relative; padding: 8px 10px 6px; overflow: hidden; background: linear-gradient(180deg, #04131f, #020c14); }
.eq-header { height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #1b3544; }
.eq-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.eq-heading > span { color: #748995; font-size: 12px; white-space: nowrap; }
.eq-heading b { color: var(--gold-bright); font-weight: 500; }
.selected-band-readout { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; color: #91a0a8; font-size: 12px; }
.selected-range-summary { flex: 1; min-width: 220px; max-width: 520px; height: 26px; display: flex; align-items: center; justify-content: center; margin-right: 4px; color: #71838d; font-size: 12px; line-height: 1.15; text-align: center; }
.selected-range-summary > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selected-band-label { min-width: 88px; margin-right: 2px; padding: 4px 8px; color: #071018; font-weight: 700; text-align: center; white-space: nowrap; background: var(--gold-bright); box-shadow: 0 0 12px rgba(240,202,105,.24); }
.selected-band-readout label { height: 26px; min-width: 86px; padding: 2px 7px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; background: #13202a; border: 1px solid #80682c; }
.selected-band-readout label > span { color: #71838d; }
.selected-band-readout output { color: #f0ede5; text-align: right; font: 600 12px/1 Consolas, monospace; white-space: nowrap; }
.eq-workbench { height: 238px; display: grid; grid-template-columns: 62px minmax(1240px, 1fr); gap: 0; padding-top: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #38596c #06131e; }
.eq-row-labels { position: sticky; left: 0; z-index: 6; display: grid; grid-template-rows: 24px 26px 26px 26px 110px 20px; height: 234px; color: #b5c1c7; font-size: 12px; border: 1px solid #203b4a; border-right: 0; background: #061621; box-shadow: 5px 0 12px rgba(0,0,0,.2); }
.eq-row-labels > span { display: flex; align-items: center; justify-content: center; padding: 0; text-align: center; border-bottom: 1px solid #17303e; white-space: nowrap; }
.eq-row-labels > span:last-child { border-bottom: 0; }
.eq-row-labels .bulk-editable { cursor: text; user-select: none; }
.eq-row-labels .bulk-editable:hover { color: var(--gold-bright); background: rgba(214,170,73,.08); }
.eq-bulk-input { width: 52px; height: 22px; padding: 0 2px; color: var(--gold-bright); background: #102634; border: 1px solid var(--gold); outline: 0; text-align: center; font: 12px/1 Consolas, monospace; appearance: textfield; }
.eq-bulk-input::-webkit-inner-spin-button, .eq-bulk-input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.eq-row-labels .eq-scale { flex-direction: column; padding: 9px 6px 8px; align-items: center; justify-content: space-between; color: #8799a2; font: 11px/1 Consolas, monospace; }
.eq-scale i { display: block; font-style: normal; }
.eq-scale i:nth-child(2) { color: #9ca8ad; }
.eq-scale i:last-child { align-self: center; }
.eq-bands { position: relative; display: grid; grid-template-columns: repeat(31, minmax(40px, 1fr)); grid-template-rows: 24px 26px 26px 26px 110px 20px; min-width: 1240px; width: 100%; height: 234px; overflow: hidden; border: 1px solid #203b4a; background: repeating-linear-gradient(to right, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent calc(100% / 31)); }
.equalizer-panel.is-graphic-mode .eq-row-labels,
.equalizer-panel.is-graphic-mode .eq-bands { grid-template-rows: 24px 26px 0 26px 136px 20px; }
.equalizer-panel.is-graphic-mode #eqQRowHeader,
.equalizer-panel.is-graphic-mode .eq-q-input { visibility: hidden; height: 0; padding: 0; border: 0; overflow: hidden; }
.equalizer-panel.is-graphic-mode .selected-q-readout { display: none; }
.eq-bands::before { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 157px; height: 1px; background: #38515d; pointer-events: none; }
.eq-frequency-range { grid-row: 1; position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; color: #f0f4f6; font-size: 11px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.22); border-bottom: 1px solid #294353; }
.eq-frequency-range.range-sub { background: #3d2b62; }
.eq-frequency-range.range-bass { background: #24506d; }
.eq-frequency-range.range-low-mid { background: #1b5958; }
.eq-frequency-range.range-mid { background: #28543e; }
.eq-frequency-range.range-high-mid { background: #5a5125; }
.eq-frequency-range.range-high { background: #69431f; }
.eq-frequency-range.range-ultra { background: #5e2b3b; }
.eq-frequency-range.is-active { color: #1b1405; background: var(--gold-bright); border-color: #987327; box-shadow: inset 0 -2px 0 #8b681d, 0 0 12px rgba(240,202,105,.18); }
.eq-band { --range-cell: rgba(4,17,27,.76); --range-slider: rgba(4,17,27,.40); --range-number: rgba(4,17,27,.72); display: contents; color: #b9c2c6; font-size: 12px; }
.eq-band.range-sub { --range-cell: rgba(38,29,61,.78); --range-slider: rgba(47,34,74,.44); --range-number: rgba(35,27,56,.84); }
.eq-band.range-bass { --range-cell: rgba(15,43,61,.82); --range-slider: rgba(19,55,76,.44); --range-number: rgba(13,38,54,.86); }
.eq-band.range-low-mid { --range-cell: rgba(13,55,55,.80); --range-slider: rgba(15,68,66,.42); --range-number: rgba(12,49,49,.86); }
.eq-band.range-mid { --range-cell: rgba(17,50,37,.80); --range-slider: rgba(22,66,48,.40); --range-number: rgba(15,45,33,.86); }
.eq-band.range-high-mid { --range-cell: rgba(56,52,24,.80); --range-slider: rgba(72,66,28,.40); --range-number: rgba(50,46,20,.86); }
.eq-band.range-high { --range-cell: rgba(65,40,18,.80); --range-slider: rgba(82,49,20,.40); --range-number: rgba(58,35,16,.86); }
.eq-band.range-ultra { --range-cell: rgba(57,27,37,.80); --range-slider: rgba(73,33,46,.40); --range-number: rgba(51,24,34,.86); }
.eq-band > * { grid-column: var(--band-column); min-width: 0; position: relative; z-index: 1; }
.eq-band > .eq-frequency-value { grid-row: 2; }
.eq-band > .eq-q-input { grid-row: 3; }
.eq-band > .eq-gain-input { grid-row: 4; }
.eq-band > .slider-wrap { grid-row: 5; }
.eq-band > .eq-band-number { grid-row: 6; display: flex; align-items: center; justify-content: center; color: #c2cdd2; font: 10px/1 Consolas, monospace; border-right: 1px solid #132a37; background: var(--range-number); cursor: pointer; user-select: none; }
.eq-band-number > span { position: relative; z-index: 2; }
.eq-band.has-gain .eq-band-number::before { content: ""; position: absolute; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #07150d, 0 0 8px rgba(66,231,123,.92); }
.eq-band.has-gain .eq-band-number > span { color: #031109; font-weight: 800; text-shadow: 0 1px 0 rgba(255,255,255,.22); }
.eq-cell { width: 100%; height: 26px; padding: 0 1px; color: #dbe3e6; background: var(--range-cell); border: 0; border-right: 1px solid #17303e; border-bottom: 1px solid #17303e; outline: 0; text-align: center; font: 12px/1 Consolas, monospace; appearance: textfield; }
.eq-frequency-value { display: flex; align-items: center; justify-content: center; cursor: default; user-select: none; }
.eq-cell::-webkit-inner-spin-button, .eq-cell::-webkit-outer-spin-button { margin: 0; appearance: none; }
.eq-cell:focus { position: relative; z-index: 4; color: #fff8e6; background: #102634; box-shadow: inset 0 0 0 1px var(--gold); }
.eq-band:nth-of-type(5n + 1) > * { border-left: 1px solid #294353; }
.eq-band.is-range-start > * { border-left: 2px solid #56768a; }
.eq-band.is-selected > * { background-color: rgba(214,170,73,.24); border-left: 2px solid var(--gold-bright); border-right: 2px solid var(--gold-bright); }
.eq-band.is-selected .eq-cell { color: #fff5d3; font-weight: 700; background: #3a2d10; }
.eq-band.is-selected .eq-frequency-value { box-shadow: inset 0 2px 0 var(--gold-bright); }
.eq-band.is-selected .eq-cell:focus { color: #fff; background: #513e13; box-shadow: inset 0 0 0 1px #fff0bd; }
.eq-band.is-selected .eq-band-number { color: var(--gold-bright); font-weight: 800; background: linear-gradient(180deg, rgba(240,202,105,.22), rgba(214,170,73,.28)); box-shadow: inset 0 -2px 0 var(--gold-bright); }
.slider-wrap { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-right: 1px solid #132a37; background: var(--range-slider); }
.slider-wrap::before { content: ""; position: absolute; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: linear-gradient(to bottom, #13222b 0 50%, #9f792f 50% 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
.slider-wrap input { position: relative; z-index: 2; width: 96px; height: 18px; margin: 0; transform: rotate(-90deg); accent-color: var(--gold); cursor: ns-resize; }
.eq-band.is-selected .slider-wrap { background: linear-gradient(180deg, rgba(240,202,105,.22), rgba(214,170,73,.10)); border-bottom: 2px solid var(--gold-bright); box-shadow: inset 0 0 18px rgba(240,202,105,.18), 0 0 22px rgba(240,202,105,.18); }
.eq-band.is-selected .slider-wrap::before { background: linear-gradient(to bottom, #34414a 0 50%, var(--gold-bright) 50% 100%); box-shadow: 0 0 8px rgba(240,202,105,.38); }
.eq-band.is-selected .slider-wrap input { accent-color: #ffd96f; filter: drop-shadow(0 0 4px rgba(255,217,111,.7)); }

.channel-strip { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 6px; height: 206px; min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.channel-card { position: relative; min-width: 0; height: 206px; padding: 0 10px 10px; overflow: hidden; background: linear-gradient(180deg, rgba(10,28,41,.98), rgba(4,16,26,.98)); border: 1px solid #244354; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.channel-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: color-mix(in srgb, var(--strip-color) 46%, transparent); }
.channel-card.is-selected { border-color: var(--strip-color); box-shadow: inset 0 0 20px color-mix(in srgb, var(--strip-color) 10%, transparent), 0 0 10px color-mix(in srgb, var(--strip-color) 18%, transparent); }
.channel-card.is-selected::before { height: 3px; background: var(--strip-color); box-shadow: 0 0 9px var(--strip-color); }
.channel-card-header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #1c3848; }
.channel-title { min-width: 0; flex: 1; height: 41px; display: flex; align-items: baseline; gap: 6px; overflow: hidden; cursor: pointer; }
.channel-select, .channel-name { min-width: 0; height: 30px; padding: 0; border: 0; background: transparent; text-align: left; }
.channel-select { flex: 0 0 auto; }
.channel-select strong { color: var(--strip-color); font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.channel-name { flex: 0 1 auto; width: max-content; max-width: min(78px, calc(100% - 42px)); overflow: hidden; color: #ccd8df; font-size: 12px; text-overflow: ellipsis; }
.channel-name:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.channel-name-input { min-width: 0; flex: 1; width: 100%; height: 26px; padding: 0 5px; color: #fff; font-size: 12px; background: #102532; border: 1px solid var(--strip-color); outline: 0; box-shadow: 0 0 7px color-mix(in srgb, var(--strip-color) 28%, transparent); }
.channel-heading { min-width: 0; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.channel-heading strong { color: var(--strip-color); font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.channel-heading small { min-width: 0; overflow: hidden; color: #ccd8df; font-size: 12px; text-overflow: ellipsis; }
.master-card .channel-heading { flex-direction: column; align-items: flex-start; gap: 0; }
.master-card .channel-heading strong { color: #f4f1e9; }
.master-card .channel-heading small { color: #9aaeba; font-size: 9px; letter-spacing: .16em; }
.channel-header-tools { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.channel-status-dot { flex: 0 0 auto; width: 8px; height: 8px; border: 1px solid color-mix(in srgb, var(--strip-color) 70%, #6b7f8b); border-radius: 50%; background: #07131b; }
.channel-status-dot.is-on { background: var(--strip-color); box-shadow: 0 0 8px var(--strip-color); }
.channel-link-control { position: relative; z-index: 8; }
.channel-link-button { position: relative; width: 25px; height: 25px; padding: 3px; color: #607887; background: #071620; border: 1px solid #294453; }
.channel-link-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channel-link-button b { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 13px; height: 13px; color: #061018; font: 800 9px/1 Consolas, monospace; background: var(--strip-color); border: 1px solid #dffaff; border-radius: 50%; }
.channel-link-button.is-linked { color: var(--strip-color); border-color: var(--strip-color); box-shadow: 0 0 7px color-mix(in srgb, var(--strip-color) 35%, transparent); }
.channel-link-button.is-pending { color: #e6b950; border-color: #806a32; border-style: dashed; }
.channel-link-button.is-leader { background: color-mix(in srgb, var(--strip-color) 13%, #071620); box-shadow: inset 0 0 0 1px var(--strip-color), 0 0 8px color-mix(in srgb, var(--strip-color) 35%, transparent); }
.channel-link-menu { position: absolute; top: 29px; right: -14px; z-index: 20; width: 106px; padding: 5px; background: #071721; border: 1px solid #496879; box-shadow: 0 12px 28px rgba(0,0,0,.65); }
.channel-link-menu[hidden] { display: none; }
.channel-link-menu span { display: block; padding: 3px 5px 6px; color: #88a0ad; font-size: 10px; }
.channel-link-menu button { width: 100%; height: 25px; padding: 0 6px; color: #cedbe1; text-align: left; background: transparent; border: 0; }
.channel-link-menu button:hover, .channel-link-menu button.is-current { color: #fff; background: #173141; }
.channel-link-menu button.is-current::after { content: "✓"; float: right; color: var(--strip-color); }
.channel-body { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding-top: 10px; }
.channel-level-column, .master-level-column { display: grid; grid-template-columns: 20px 10px; gap: 7px; height: 142px; align-items: stretch; }
.channel-gain-slider, .master-volume-slider { width: 20px; height: 142px; margin: 0; writing-mode: vertical-lr; direction: rtl; appearance: slider-vertical; accent-color: var(--strip-color); cursor: ns-resize; }
.channel-card.is-effectively-muted .channel-gain-slider,
.master-card.is-effectively-muted .master-volume-slider { accent-color: #263641; filter: grayscale(1) brightness(.52); opacity: .32; }
.meter { height: 142px; display: flex; flex-direction: column-reverse; justify-content: space-between; align-self: stretch; }
.meter i { display: block; width: 10px; height: 6px; background: #263641; }
.meter i.on { background: var(--green); box-shadow: 0 0 3px rgba(43,240,137,.28); }
.meter i.on.warning { background: var(--gold-bright); box-shadow: 0 0 4px rgba(240,202,105,.45); }
.meter i.on.danger { background: var(--danger); box-shadow: 0 0 5px rgba(237,106,94,.55); }
.channel-fields { min-width: 0; display: grid; grid-template-rows: repeat(3, 28px) 30px; gap: 6px; align-content: start; color: #b9c8d1; font-size: 12px; }
.channel-field-row { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 5px; align-items: center; }
.channel-input-with-unit { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 4px; align-items: center; }
.channel-input-with-unit .unit-spacer { visibility: hidden; }
.channel-fields input { min-width: 0; width: 100%; height: 28px; appearance: textfield; color: #f2f5f7; background: #121d25; border: 1px solid #314a59; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; }
.channel-fields input::-webkit-inner-spin-button, .channel-fields input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.channel-fields small { color: #91a7b4; font-size: 10px; }
.channel-fields button { min-width: 0; width: 100%; height: 28px; padding: 0 4px; background: #18252e; border: 1px solid #314a59; white-space: nowrap; }
.channel-fields button.active { color: #061018; font-weight: 700; background: var(--strip-color); border-color: var(--strip-color); }
.channel-fields .phase-toggle { color: #f2f5f7; text-align: center; font-variant-numeric: tabular-nums; background: #121d25; border-color: #314a59; }
.channel-fields .phase-toggle.is-reversed { color: #fff; font-weight: 700; background: #9f3d36; border-color: #ec6a5e; box-shadow: inset 0 0 10px rgba(255,118,90,.16); }
.channel-actions { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-right: 24px; padding-top: 2px; }
.channel-actions [data-mute].active { color: #fff; font-weight: 700; background: #9f3d36; border-color: #ec6a5e; box-shadow: inset 0 0 10px rgba(255,118,90,.16); }
.channel-actions [data-solo].active { color: #04151b; font-weight: 700; background: #35c9e8; border-color: #7be9ff; box-shadow: 0 0 9px rgba(53,201,232,.34); }
.master-body { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 9px; padding-top: 10px; }
.master-fields { min-width: 0; display: grid; grid-template-rows: repeat(2, 28px) minmax(0, 1fr); gap: 4px; align-content: stretch; color: #b9c8d1; font-size: 12px; }
.master-field-row { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 5px; align-items: center; }
.master-input-with-unit { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 4px; align-items: center; }
.master-input-with-unit .unit-spacer { visibility: hidden; }
.master-input-with-unit input { min-width: 0; width: 100%; height: 28px; padding: 0 5px; color: #f2f5f7; text-align: center; background: #121d25; border: 1px solid #314a59; }
.master-input-with-unit small { color: #91a7b4; font-size: 10px; }
.master-delay-label { height: 28px; display: grid; grid-template-rows: repeat(2, 12px); row-gap: 2px; align-content: center; align-items: center; font-size: 12px; line-height: 12px; white-space: nowrap; }
.master-delay-label > span { display: block; height: 12px; line-height: 12px; }
.master-delay-unit select { min-width: 0; width: 100%; height: 28px; appearance: none; padding: 0 12px 0 1px; color: #f2f5f7; font-size: 12px; text-align: center; text-align-last: center; background-color: #121d25; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='5' viewBox='0 0 7 5'%3E%3Cpath d='M1 1l2.5 2.5L6 1' fill='none' stroke='%23d8e6ef' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; background-size: 7px 5px; border: 1px solid #314a59; }
.master-actions { min-height: 0; height: 61px; align-self: end; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(2, 28px); gap: 5px; margin-right: 24px; margin-bottom: 10px; }
.master-mute, .master-link-tune { width: 100%; min-height: 28px; height: 28px; padding: 0 3px; color: #f2f5f7; background: #18252e; border: 1px solid #314a59; white-space: nowrap; }
.master-mute.active { color: #fff; font-weight: 700; background: #9f3d36; border-color: #ec6a5e; box-shadow: inset 0 0 10px rgba(255,118,90,.16); }
.master-link-tune:hover { color: #fff3c6; border-color: #806a32; }
.master-link-tune.active { color: #211806; font-weight: 700; background: var(--gold-bright); border-color: #ffd878; box-shadow: 0 0 10px rgba(240,202,105,.24); }

.feature-page-panel, .device-card, .maintenance-tools, .protocol-log-panel { padding: 24px; }
.feature-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.feature-heading h1, .device-card h1 { margin: 3px 0 7px; font-size: 24px; font-weight: 500; }
.feature-heading p, .maintenance-tools p { color: var(--muted); }
.eyebrow { color: var(--gold); font-size: 11px; letter-spacing: .18em; }
.mixer-dialog { --mixer-text-size: 14px; width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: none; padding: 0; color: var(--text); background: transparent; border: 0; overflow: visible; }
.mixer-dialog::backdrop { background: rgba(1, 8, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mixer-dialog-card { height: min(690px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr); background: linear-gradient(160deg, #0a1b28, #04101a 72%); border: 1px solid #4b6a7b; box-shadow: 0 28px 90px rgba(0,0,0,.72), 0 0 30px rgba(0,216,255,.07); }
.mixer-dialog-header { min-height: 66px; padding-block: 10px; align-items: center; }
.mixer-dialog-header .eyebrow { display: block; margin-bottom: 2px; font-size: 11px; }
.mixer-dialog-header h2 { display: inline; margin-right: 12px; }
.mixer-dialog-header p { display: inline; font-size: var(--mixer-text-size); }
.mixer-dialog-content { min-height: 0; padding: 10px 12px 7px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.mixer-toolbar { min-height: 34px; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.mixer-toolbar button { height: 30px; padding: 0 12px; color: #dce9f0; background: #12212b; border: 1px solid #365264; }
.mixer-toolbar button:hover:not(:disabled) { color: #fff2ba; border-color: #9b7e32; }
.mixer-toolbar button:disabled { opacity: .45; }
.mixer-toolbar #mixerClearChannel { color: #ffb5aa; border-color: #7e4039; }
.mixer-write-status { min-width: 0; margin-left: auto; color: #8fb2c5; font-size: var(--mixer-text-size); text-align: right; }
.mixer-matrix-frame { min-height: 0; overflow: auto; border: 1px solid #294353; background: #07131b; scrollbar-color: #355365 #08141c; }
.mixer-matrix { min-width: 1030px; display: grid; grid-template-columns: 170px repeat(6, minmax(130px, 1fr)); }
.mixer-matrix > * { min-height: 42px; border-right: 1px solid #29414f; border-bottom: 1px solid #29414f; }
.matrix-corner, .matrix-channel { position: sticky; top: 0; z-index: 5; min-height: 43px; }
.matrix-corner { left: 0; z-index: 7; display: grid; align-content: center; padding: 5px 12px; color: var(--gold-bright); background: #0c1b25; }
.matrix-corner strong { font-size: var(--mixer-text-size); }
.matrix-corner small { color: #6f8998; font-size: var(--mixer-text-size); letter-spacing: .08em; }
.matrix-channel { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; color: var(--matrix-channel-color); background: #0c1b25; border-top: 2px solid transparent; }
.matrix-channel strong { font-size: var(--mixer-text-size); }
.matrix-channel small { min-width: 0; max-width: 120px; overflow: hidden; color: #859eac; font-size: var(--mixer-text-size); text-overflow: ellipsis; white-space: nowrap; }
.matrix-channel.is-current { color: #06131b; background: var(--matrix-channel-color); border-top-color: #fff3bf; box-shadow: 0 0 14px color-mix(in srgb, var(--matrix-channel-color) 32%, transparent); }
.matrix-channel.is-current small { color: #14242e; }
.matrix-source { position: sticky; left: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 8px; padding: 4px 10px; color: #d7e4eb; background: #0a1821; }
.matrix-source small { min-width: 0; overflow: hidden; color: #8aa2af; font-size: var(--mixer-text-size); letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.matrix-source strong { min-width: 0; overflow: hidden; font-size: var(--mixer-text-size); font-weight: 500; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.mixer-crosspoint { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(48px, 1fr) 60px; align-items: center; gap: 3px; padding: 3px 5px 10px; background: #0a171f; transition: background .15s ease, box-shadow .15s ease; }
.mixer-crosspoint.matrix-group-high { background: linear-gradient(90deg, rgba(102,62,142,.22), rgba(25,17,36,.92)); }
.mixer-crosspoint.matrix-group-low { background: linear-gradient(90deg, rgba(36,101,142,.23), rgba(11,30,42,.94)); }
.mixer-crosspoint.matrix-group-bluetooth { background: linear-gradient(90deg, rgba(25,125,88,.23), rgba(8,34,26,.94)); }
.mixer-crosspoint.matrix-group-digital { background: linear-gradient(90deg, rgba(151,94,24,.24), rgba(39,27,11,.94)); }
.matrix-source.matrix-group-high { background: #21162e; box-shadow: inset 4px 0 #9a68c7; }
.matrix-source.matrix-group-low { background: #102b3b; box-shadow: inset 4px 0 #4d9dca; }
.matrix-source.matrix-group-bluetooth { background: #0c3024; box-shadow: inset 4px 0 #45bd8b; }
.matrix-source.matrix-group-digital { background: #362711; box-shadow: inset 4px 0 #d89a42; }
.mixer-crosspoint.is-group-start, .matrix-source.is-group-start { border-top: 2px solid #3b5666; }
.mixer-crosspoint.is-current-column { box-shadow: inset 1px 0 var(--matrix-channel-color), inset -1px 0 var(--matrix-channel-color); }
.mixer-crosspoint.is-routed { outline: 1px solid color-mix(in srgb, var(--matrix-channel-color) 42%, transparent); outline-offset: -1px; }
.mixer-route-toggle { min-width: 0; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 5px; color: #748c99; font-size: var(--mixer-text-size); text-align: left; background: transparent; border: 0; }
.mixer-route-toggle i { flex: 0 0 auto; width: 9px; height: 9px; border: 1px solid #526c7a; border-radius: 50%; background: #101f28; }
.mixer-route-toggle:hover:not(:disabled) { color: #e7f4fa; }
.mixer-crosspoint.is-routed .mixer-route-toggle { color: #eaf8ff; }
.mixer-crosspoint.is-routed .mixer-route-toggle i { background: var(--matrix-channel-color); border-color: #dffaff; box-shadow: 0 0 9px var(--matrix-channel-color); }
.mixer-value { min-width: 0; display: grid; grid-template-columns: minmax(40px, 1fr) 10px; align-items: center; gap: 2px; }
.mixer-value input { min-width: 0; width: 100%; height: 25px; padding: 0 2px; appearance: textfield; color: #dceaf1; font-family: Consolas, monospace; font-size: var(--mixer-text-size); font-variant-numeric: tabular-nums; text-align: center; background: #0c1b24; border: 1px solid #314d5d; }
.mixer-value input::-webkit-inner-spin-button, .mixer-value input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.mixer-value input:focus { color: #fff; border-color: var(--matrix-channel-color); outline: 1px solid var(--matrix-channel-color); }
.mixer-value small { color: #7895a3; font-size: var(--mixer-text-size); }
.mixer-value:has(input:disabled) { opacity: .34; }
.mixer-value input:disabled { color: #4d6572; background: #08141b; border-color: #1c3440; cursor: not-allowed; }
.mixer-value:has(input:disabled) small { color: #425864; }
.mixer-level-slider { position: absolute; left: 5px; right: 5px; bottom: 1px; width: calc(100% - 10px); height: 9px; margin: 0; appearance: none; background: transparent; cursor: ew-resize; }
.mixer-level-slider::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--matrix-channel-color) 0 var(--mix-level), #203845 var(--mix-level) 100%); border-radius: 2px; }
.mixer-level-slider::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: -3.5px; appearance: none; background: var(--matrix-channel-color); border: 1px solid #e8fbff; border-radius: 50%; box-shadow: 0 0 7px var(--matrix-channel-color); }
.mixer-level-slider::-moz-range-track { height: 3px; background: #203845; border: 0; border-radius: 2px; }
.mixer-level-slider::-moz-range-progress { height: 3px; background: var(--matrix-channel-color); border-radius: 2px; }
.mixer-level-slider::-moz-range-thumb { width: 10px; height: 10px; background: var(--matrix-channel-color); border: 1px solid #e8fbff; border-radius: 50%; box-shadow: 0 0 7px var(--matrix-channel-color); }
.mixer-level-slider:focus-visible { outline: 1px solid var(--matrix-channel-color); outline-offset: 1px; }
.mixer-level-slider:disabled { cursor: not-allowed; opacity: .28; }
.mixer-level-slider:disabled::-webkit-slider-thumb { background: #40545f; border-color: #526975; box-shadow: none; }
.mixer-level-slider:disabled::-moz-range-thumb { background: #40545f; border-color: #526975; box-shadow: none; }
.mixer-crosspoint.is-locked { opacity: .58; }
.mixer-crosspoint.is-locked .mixer-value input { color: #ffb4a9; border-color: #70433e; }
.mixer-legend { display: flex; align-items: center; gap: 18px; min-height: 28px; color: #7893a2; font-size: var(--mixer-text-size); }
.mixer-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mixer-legend i { width: 9px; height: 9px; border: 1px solid #526c7a; border-radius: 50%; background: #101f28; }
.mixer-legend i.is-routed { background: var(--gold-bright); border-color: #fff3c6; box-shadow: 0 0 7px rgba(240,202,105,.65); }

dialog.export-import-dialog { --transfer-text-size: 14px; width: min(980px, calc(100vw - 40px)); }
.export-import-card { max-height: min(760px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
.export-import-header { align-items: center; }
.export-import-header .eyebrow { display: block; margin-bottom: 4px; color: var(--gold-bright); font: 700 11px/1.2 Consolas, monospace; letter-spacing: 1.2px; }
.export-import-header h2 { font-size: 18px; }
.export-import-header p { font-size: var(--transfer-text-size); }
.configuration-manager { min-height: 0; padding: 16px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; overflow-y: auto; }
.configuration-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.configuration-scopes button { position: relative; min-height: 76px; padding: 12px 13px 12px 48px; display: grid; align-content: center; justify-items: start; gap: 5px; text-align: left; background: #06141e; border: 1px solid #294858; }
.configuration-scopes button i { position: absolute; left: 13px; top: 13px; color: #4f7080; font: 700 11px/1 Consolas, monospace; font-style: normal; }
.configuration-scopes button span { color: #dbe5e9; font-size: var(--transfer-text-size); font-weight: 700; }
.configuration-scopes button small { color: #718b98; font-size: 12px; }
.configuration-scopes button.is-active { background: linear-gradient(100deg, rgba(240,202,105,.2), rgba(240,202,105,.05)); border-color: var(--gold-bright); box-shadow: inset 0 3px 0 var(--gold-bright), 0 0 14px rgba(240,202,105,.08); }
.configuration-scopes button.is-active i { color: var(--gold-bright); }
.configuration-scopes button.is-active span { color: #fff0b8; }
.configuration-scopes button:disabled { cursor: wait; opacity: .58; }
.configuration-scope-panel { min-width: 0; padding: 17px; display: flex; flex-direction: column; background: #071722; border: 1px solid #294858; }
.configuration-scope-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.configuration-scope-heading > div { display: grid; gap: 5px; }
.configuration-scope-heading span { color: #7693a1; font: 700 11px/1 Consolas, monospace; letter-spacing: .8px; }
.configuration-scope-heading h3 { margin: 0; color: #e8edef; font-size: 18px; }
.configuration-scope-heading > b { padding: 6px 9px; color: #9ddfb8; font-size: 12px; background: rgba(48,136,83,.13); border: 1px solid #2d7550; }
.configuration-scope-panel > p { margin: 14px 0; color: #aebdc4; font-size: var(--transfer-text-size); line-height: 1.55; }
.configuration-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.configuration-summary > span { min-width: 0; padding: 11px; display: grid; gap: 6px; background: #05121c; border: 1px solid #203c4b; }
.configuration-summary small { color: #708b98; font-size: 12px; }
.configuration-summary b { overflow: hidden; color: #e1e8eb; font-size: var(--transfer-text-size); text-overflow: ellipsis; white-space: nowrap; }
.configuration-scope-notice { margin-top: 12px; padding: 11px 13px; color: #91a6b0; font-size: var(--transfer-text-size); line-height: 1.5; background: #06131d; border-left: 3px solid #3f6a7e; }
.configuration-scope-notice.is-device-write { color: #f0c96d; border-left-color: var(--gold-bright); }
.configuration-actions { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.configuration-actions button { min-height: 58px; padding: 9px 12px; display: grid; align-content: center; gap: 4px; font-size: var(--transfer-text-size); background: #0a1c28; border: 1px solid #3a596a; }
.configuration-actions button span { font-size: var(--transfer-text-size); font-weight: 700; }
.configuration-actions button small { color: #76909e; font-size: 12px; font-weight: 400; }
.configuration-actions .primary-button small { color: #56471c; }
.configuration-actions button:not(:disabled):hover { border-color: var(--gold); }
.configuration-actions button:disabled { cursor: not-allowed; opacity: .52; }
.configuration-actions button.is-busy { cursor: wait; opacity: .72; }
.configuration-actions button.is-complete { color: #052014 !important; background: #63dfa0 !important; border-color: #8affbb !important; opacity: 1; }
.configuration-actions button.is-complete small { color: #174c34; }
.configuration-transfer-progress { margin: 0 16px 14px; padding: 12px 14px; background: #06131d; border: 1px solid #294858; }
.configuration-transfer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #dce8ed; font-size: var(--transfer-text-size); }
.configuration-transfer-heading > span { display: inline-flex; align-items: center; gap: 9px; }
.configuration-transfer-heading i { width: 9px; height: 9px; background: #60727d; border-radius: 50%; }
.configuration-transfer-heading b { color: #8fa5b0; font: 700 14px/1 Consolas, monospace; }
.configuration-transfer-progress progress { width: 100%; height: 10px; margin: 9px 0 7px; appearance: none; border: 0; background: #132630; }
.configuration-transfer-progress progress::-webkit-progress-bar { background: #132630; }
.configuration-transfer-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #00a7d2, #2bf089); transition: width .18s ease; }
.configuration-transfer-progress p { min-height: 20px; margin: 0; color: #8199a5; font-size: var(--transfer-text-size); line-height: 1.45; }
.configuration-transfer-progress[data-state="working"] { border-color: #32718a; }
.configuration-transfer-progress[data-state="working"] .configuration-transfer-heading i { background: #50d8ff; box-shadow: 0 0 9px rgba(80,216,255,.55); animation: configuration-pulse 1s ease-in-out infinite; }
.configuration-transfer-progress[data-state="working"] .configuration-transfer-heading b { color: #8fe9ff; }
.configuration-transfer-progress[data-state="success"] { border-color: #2d7550; }
.configuration-transfer-progress[data-state="success"] .configuration-transfer-heading i { background: #67e89d; box-shadow: 0 0 8px rgba(103,232,157,.42); }
.configuration-transfer-progress[data-state="success"] .configuration-transfer-heading b { color: #7feaa1; }
.configuration-transfer-progress[data-state="error"] { border-color: #7b3c38; }
.configuration-transfer-progress[data-state="error"] .configuration-transfer-heading i { background: #ff7a70; }
.configuration-transfer-progress[data-state="error"] .configuration-transfer-heading b { color: #ff9b92; }
.export-import-dialog.is-working .copy-eq-close { visibility: hidden; }
.export-import-status { min-height: 48px; padding: 12px 16px; color: #9fb0b8; font-size: var(--transfer-text-size); line-height: 1.5; background: #06131d; border-top: 1px solid #294858; }
.export-import-status[data-state="working"] { color: #8fe9ff; }
.export-import-status[data-state="success"] { color: #7feaa1; }
.export-import-status[data-state="error"] { color: #ff9b92; }
@keyframes configuration-pulse { 0%, 100% { opacity: .42; } 50% { opacity: 1; } }

dialog.configuration-restore-dialog { --restore-text-size: 14px; width: min(690px, calc(100vw - 40px)); }
.configuration-restore-card { max-height: min(720px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.configuration-restore-card .eyebrow { display: block; margin-bottom: 4px; color: var(--gold-bright); font: 700 11px/1.2 Consolas, monospace; letter-spacing: 1.2px; }
.configuration-restore-card h2 { font-size: 18px; }
.configuration-restore-card header p { font-size: var(--restore-text-size); }
.configuration-restore-body { padding: 16px; overflow-y: auto; }
.configuration-restore-summary { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 8px; }
.configuration-restore-summary span { min-width: 0; padding: 10px 11px; display: grid; gap: 5px; background: #05121c; border: 1px solid #294858; }
.configuration-restore-summary small { color: #708b98; font-size: 12px; }
.configuration-restore-summary b { overflow: hidden; color: #e1e8eb; font-size: var(--restore-text-size); text-overflow: ellipsis; white-space: nowrap; }
.configuration-restore-warning { margin-top: 12px; padding: 12px 13px; color: #e8c373; font-size: var(--restore-text-size); line-height: 1.55; background: rgba(101,72,20,.16); border: 1px solid #665121; }
.configuration-restore-acknowledge { margin-top: 12px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; color: #c8d4d9; font-size: var(--restore-text-size); background: #071722; border: 1px solid #294858; cursor: pointer; }
.configuration-restore-acknowledge input { width: 17px; height: 17px; accent-color: var(--gold-bright); }
.configuration-restore-progress { margin-top: 12px; padding: 12px 13px; background: #06131d; border: 1px solid #294858; }
.configuration-restore-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #dce8ed; font-size: var(--restore-text-size); }
.configuration-restore-progress > div b { color: #8fe9ff; font-family: Consolas, monospace; }
.configuration-restore-progress progress { width: 100%; height: 10px; margin: 9px 0 7px; appearance: none; border: 0; background: #132630; }
.configuration-restore-progress progress::-webkit-progress-bar { background: #132630; }
.configuration-restore-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #00a7d2, #2bf089); }
.configuration-restore-progress p { margin: 0; color: #8da2ad; font-size: var(--restore-text-size); line-height: 1.45; }
.configuration-restore-dialog.is-writing .copy-eq-close,
.configuration-restore-dialog.is-writing #configurationRestoreCancel { visibility: hidden; }

dialog.device-dialog { --device-text-size: 14px; width: min(960px, calc(100vw - 40px)); }
.device-dialog-card { max-height: min(760px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.device-dialog-header { align-items: center; }
.device-dialog-header .eyebrow { display: block; margin-bottom: 4px; color: var(--gold-bright); font: 700 11px/1.2 Consolas, monospace; letter-spacing: 1.2px; }
.device-dialog-header h2 { font-size: 18px; }
.device-dialog-header p { font-size: var(--device-text-size); }
.device-dialog-status { min-height: 76px; padding: 10px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; background: rgba(2,11,18,.78); border-bottom: 1px solid #294353; }
.device-dialog-status > span { position: relative; min-width: 0; padding: 9px 12px; display: grid; align-content: center; gap: 5px; background: #071722; border: 1px solid #294858; }
.device-dialog-status small { color: #76909e; font-size: var(--device-text-size); }
.device-dialog-status b { overflow: hidden; color: #c8d4d9; font-size: var(--device-text-size); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.device-dialog-status .device-status-primary { padding-left: 34px; }
.device-dialog-status .device-status-primary i { position: absolute; left: 13px; top: 50%; width: 10px; height: 10px; background: #65727a; border-radius: 50%; transform: translateY(-50%); }
.device-dialog-status.is-connected .device-status-primary { border-color: #2c7850; }
.device-dialog-status.is-connected .device-status-primary i { background: var(--green); box-shadow: 0 0 9px rgba(66,231,123,.55); }
.device-dialog-status.is-connected .device-status-primary b,
.device-dialog-status.is-synchronized > span:nth-child(2) b { color: #77eca0; }
.device-dialog-content { min-height: 0; padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 12px; overflow-y: auto; }
.device-dialog-section { min-width: 0; padding: 14px; background: #071722; border: 1px solid #294858; }
.device-section-heading { min-height: 45px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.device-section-heading > div { display: grid; gap: 4px; }
.device-section-heading span { color: #7693a1; font: 700 11px/1 Consolas, monospace; letter-spacing: .8px; }
.device-section-heading h3 { margin: 0; color: #eef2f2; font-size: 16px; font-weight: 600; }
.device-section-heading .device-read-only { padding: 5px 8px; color: #87a8b6; font: 400 var(--device-text-size)/1.1 "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; background: #0b2230; border: 1px solid #36596a; letter-spacing: 0; }
.device-info-grid { margin: 7px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.device-info-grid div { min-width: 0; padding: 10px 12px; background: #05121c; border: 1px solid #203c4b; }
.device-info-grid dt { color: #708b98; font-size: var(--device-text-size); }
.device-info-grid dd { margin: 6px 0 0; overflow: hidden; color: #e1e8eb; font-size: var(--device-text-size); text-overflow: ellipsis; white-space: nowrap; }
.device-operation-list { margin-top: 7px; display: grid; gap: 8px; }
.device-operation-list > div { min-height: 64px; padding: 10px 11px; display: grid; grid-template-columns: 142px minmax(0, 1fr); align-items: center; gap: 12px; background: #05121c; border: 1px solid #203c4b; }
.device-operation-list button { width: 142px; min-width: 0; min-height: 36px; padding: 0 10px; font-size: var(--device-text-size); background: #0a1c28; border: 1px solid #3a596a; }
.device-operation-list button:not(:disabled):hover { border-color: var(--gold); }
.device-operation-list button:disabled { cursor: not-allowed; opacity: .55; }
.device-operation-list p { margin: 0; color: #8197a2; font-size: var(--device-text-size); line-height: 1.45; }
.device-log-details { grid-column: 1 / -1; min-width: 0; background: #06131d; border: 1px solid #294858; }
.device-log-details summary { min-height: 46px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #d9e1e4; font-size: var(--device-text-size); cursor: pointer; list-style: none; }
.device-log-details summary::-webkit-details-marker { display: none; }
.device-log-details summary::before { content: "+"; color: var(--gold-bright); font: 700 18px/1 Consolas, monospace; }
.device-log-details[open] summary::before { content: "−"; }
.device-log-details summary span { margin-right: auto; }
.device-log-details summary small { color: #718a96; font-size: var(--device-text-size); }
.protocol-log { max-height: 220px; overflow: auto; margin: 0; padding: 0 13px 10px; list-style: none; font-family: Consolas, monospace; font-size: var(--device-text-size); border-top: 1px solid #213b49; }
.protocol-log li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #282b30; }
.protocol-log time { color: var(--gold); }
.protocol-log span { color: #b7bbc2; }

.toast-region { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; gap: 10px; padding: 24px; pointer-events: none; }
.toast-region::before { content: ""; position: absolute; inset: 0; background: rgba(1, 8, 14, .48); opacity: 0; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); transition: opacity .2s ease; }
.toast-region.is-active::before { opacity: 1; }
.toast { position: relative; z-index: 1; width: max-content; min-width: min(360px, calc(100vw - 48px)); max-width: calc(100vw - 48px); padding: 18px 28px 18px 24px; overflow-x: auto; color: #f4f1e9; font-size: 18px; font-weight: 700; line-height: 1.55; letter-spacing: .4px; text-align: center; background: linear-gradient(180deg, #202a31, #151b20); border: 1px solid #5b6870; border-left-width: 5px; box-shadow: 0 22px 70px rgba(0, 0, 0, .52), 0 0 28px rgba(214, 170, 73, .08); text-shadow: 0 1px 2px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(10px) scale(.98); transition: .2s ease; pointer-events: auto; }
.toast-line { display: block; white-space: nowrap; text-wrap: nowrap; overflow-wrap: normal; word-break: keep-all; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.info { color: #eef9ff; border-color: #72aeca; }
.toast.success { color: #78f0a1; border-color: var(--green); }
.toast.warning { color: var(--gold-bright); border-color: var(--gold); }
.toast.error { color: #ff9b92; border-color: var(--danger); }

.copy-eq-dialog { width: min(560px, calc(100vw - 40px)); max-width: none; padding: 0; color: var(--text); background: transparent; border: 0; overflow: visible; }
.copy-eq-dialog::backdrop { background: rgba(1, 8, 14, .68); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.copy-eq-dialog-card { background: linear-gradient(160deg, #0a1b28, #04101a 72%); border: 1px solid #4b6a7b; box-shadow: 0 28px 90px rgba(0,0,0,.72), 0 0 30px rgba(0,216,255,.07); }
.copy-eq-dialog-header { min-height: 70px; padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.copy-eq-dialog-header h2 { margin: 0; color: #f3efe5; font-size: 17px; font-weight: 600; }
.copy-eq-dialog-header p { margin: 7px 0 0; color: #91a4ae; font-size: 12px; }
.copy-eq-close { width: 28px; height: 28px; padding: 0; color: #aab8bf; font-size: 20px; background: #081722; border: 1px solid #355263; }
.copy-eq-close:hover { color: #fff; border-color: var(--gold); }
.copy-eq-source { margin: 14px 16px 10px; color: #a9b9c1; font-size: 13px; }
.copy-eq-source strong { color: var(--gold-bright); font-weight: 600; }
.copy-eq-targets { margin: 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.copy-eq-target { position: relative; min-height: 58px; padding: 9px 11px 8px; display: grid; grid-template-columns: 1fr auto; align-items: center; color: #dbe4e8; background: #081722; border: 1px solid #294858; cursor: pointer; user-select: none; }
.copy-eq-target input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.copy-eq-target span { font: 700 13px/1 Consolas, monospace; }
.copy-eq-target small { grid-column: 1; margin-top: 6px; color: #8296a1; font-size: 11px; }
.copy-eq-target i { grid-column: 2; grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: #172932; border: 1px solid #49606c; }
.copy-eq-target:hover { border-color: color-mix(in srgb, var(--channel-color) 65%, #425967); }
.copy-eq-target:has(input:focus-visible) { outline: 1px solid #fff; outline-offset: 2px; }
.copy-eq-target:has(input:checked) { color: #fff; background: color-mix(in srgb, var(--channel-color) 18%, #071722); border-color: var(--channel-color); box-shadow: inset 0 -2px 0 var(--channel-color), 0 0 12px color-mix(in srgb, var(--channel-color) 20%, transparent); }
.copy-eq-target:has(input:checked) i { background: var(--channel-color); border-color: #dffaff; box-shadow: 0 0 10px var(--channel-color); }
.copy-eq-target.is-source { opacity: .48; cursor: not-allowed; border-style: dashed; }
.copy-eq-target.is-source i { background: var(--channel-color); border-color: var(--channel-color); opacity: .6; }
.copy-eq-selection-tools { min-height: 38px; margin: 10px 16px 0; display: flex; align-items: center; gap: 7px; }
.copy-eq-selection-tools button, .copy-eq-dialog-actions button { width: max-content; min-width: 0; height: 28px; padding: 0 8px; color: #e2e8eb; background: #0b1d29; border: 1px solid #38596c; }
.copy-eq-selection-tools span { margin-left: auto; color: #91a4ae; font-size: 12px; }
.copy-eq-option { margin: 2px 16px 10px; padding: 10px 12px; display: grid; grid-template-columns: 18px 1fr; column-gap: 9px; align-items: start; color: #dbe4e8; background: #081722; border: 1px solid #294858; cursor: pointer; user-select: none; }
.copy-eq-option input { width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--gold-bright); }
.copy-eq-option span { font-size: 13px; font-weight: 600; }
.copy-eq-option small { grid-column: 2; margin-top: 4px; color: #8296a1; font-size: 11px; line-height: 1.45; }
.copy-eq-option:has(input:checked) { color: #fff5d3; background: rgba(214,170,73,.12); border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold-bright); }
.copy-eq-option:has(input:focus-visible) { outline: 1px solid #fff; outline-offset: 2px; }
.copy-eq-dialog.is-writing .copy-eq-option,
.copy-eq-dialog.is-complete .copy-eq-option { cursor: default; opacity: .68; }
.copy-eq-write-status { min-height: 28px; margin: 0 16px 4px; padding: 6px 8px; color: #91a4ae; font-size: 11px; background: #06131d; border-left: 3px solid #49606c; }
.copy-eq-write-status.is-ready { color: #7feaa1; border-left-color: var(--green); }
.copy-eq-write-status.is-warning { color: var(--gold-bright); border-left-color: var(--gold); }
.copy-eq-write-status.is-error { color: #ff9b92; border-left-color: var(--danger); }
.copy-eq-write-status.is-writing { color: #a8eaff; border-left-color: #00d8ff; }
.copy-eq-write-status.is-success { color: #7feaa1; border-left-color: var(--green); background: rgba(22,93,52,.16); }
.copy-eq-dialog.is-writing .copy-eq-target { cursor: wait; opacity: .62; }
.copy-eq-dialog.is-complete .copy-eq-target { cursor: default; opacity: .62; }
.copy-eq-dialog-actions { padding: 10px 16px 12px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #18303e; }
#authorizedUsbDeviceDialog .copy-eq-dialog-header h2 { font-size: 22px; }
#authorizedUsbDeviceDialog .copy-eq-dialog-header p { font-size: 14px; line-height: 1.6; }
#authorizedUsbDeviceDialog .copy-eq-dialog-body { display: grid; gap: 10px; padding: 16px; }
#authorizedUsbDeviceDialog [data-usb-choice] { width: 100%; height: auto; min-height: 64px; padding: 12px 14px; color: var(--text); background: #122c40; border: 1px solid #60819a; border-radius: 8px; white-space: normal; overflow-wrap: anywhere; text-align: left; line-height: 1.5; }
#authorizedUsbDeviceDialog [data-usb-choice]:hover { border-color: var(--gold-bright); background: #1b394d; }
#authorizedUsbDeviceDialog [data-usb-choice] strong { font-size: 16px; }
#authorizedUsbDeviceDialog [data-usb-choice] span { font-size: 14px; color: #b5c9d8; }
.copy-eq-dialog-actions .primary-button { color: #211806; background: var(--gold-bright); border-color: #ffd878; font-weight: 700; }
.copy-eq-dialog-actions .primary-button:disabled { color: #758087; background: #18242b; border-color: #354650; cursor: not-allowed; opacity: 1; }
.copy-eq-dialog-actions .danger-button { color: #fff4f1; background: #7e2b24; border-color: #ff786d; font-weight: 700; }
.copy-eq-dialog-actions .danger-button:hover { background: #9b332a; }
.copy-eq-dialog-actions .danger-button:disabled { color: #879096; background: #252b2f; border-color: #4b5358; cursor: wait; }
.copy-eq-dialog-actions .completed-button:disabled { color: #73efa0; background: rgba(27, 112, 63, .22); border-color: #2fa766; cursor: default; opacity: 1; }
.quick-compensation-limit-dialog { width: min(600px, calc(100vw - 32px)); }
.quick-compensation-limit-dialog .copy-eq-dialog-card { max-height: min(80vh, 680px); display: flex; flex-direction: column; }
.quick-compensation-limit-issues { padding: 8px 16px 14px; overflow-y: auto; color: #f1dfce; font-size: 14px; line-height: 1.6; }
.quick-compensation-limit-issues p { margin: 8px 0; padding: 10px 12px; border: 1px solid rgba(255, 155, 108, .32); background: rgba(130, 52, 30, .16); }
.copy-eq-scope-notes { padding: 11px 16px 13px; color: #8598a2; font-size: 11px; line-height: 1.5; background: rgba(0,0,0,.2); border-top: 1px solid #294353; }
.copy-eq-scope-notes p { margin: 0; }
.copy-eq-scope-notes p + p { margin-top: 4px; }
.copy-eq-scope-notes strong { color: #bdcbd1; font-weight: 600; }
.copy-eq-scope-notes p:first-child strong { color: #6eea98; }
.copy-eq-scope-notes p:nth-child(2) strong { color: #e9b86c; }

.preset-action-dialog { --preset-action-text-size: 14px; width: min(500px, calc(100vw - 28px)); font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; }
.preset-action-card { max-height: calc(100dvh - 28px); overflow-x: hidden; overflow-y: auto; }
.preset-action-header { min-height: 0; padding: 18px 20px 14px; }
.preset-action-header h2 { font-size: 22px; font-weight: 700; }
.preset-action-header p { font-size: var(--preset-action-text-size); line-height: 1.5; }
.preset-action-options { padding: 18px 20px; display: grid; gap: 12px; }
.preset-action-option { width: 100%; min-height: 76px; padding: 14px 16px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 14px; color: #ecfbff; text-align: left; background: #0b2735; border: 1px solid #4bb9d5; border-left: 4px solid #42d5f7; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.preset-action-option:hover:not(:disabled), .preset-action-option:focus-visible { background: #104055; border-color: #91eaff; box-shadow: 0 0 18px rgba(48,205,236,.18); }
.preset-action-option:focus-visible { outline: 2px solid #d8f8ff; outline-offset: 2px; }
.preset-action-option.is-save { color: #fff2c5; background: #312710; border-color: #b18b30; border-left-color: var(--gold-bright); }
.preset-action-option.is-save:hover:not(:disabled), .preset-action-option.is-save:focus-visible { background: #483610; border-color: #f2cc6a; box-shadow: 0 0 18px rgba(240,202,105,.16); }
.preset-action-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #b9efff; font: 700 25px/1 Consolas, monospace; background: rgba(66,213,247,.12); border: 1px solid #4bb9d5; }
.preset-action-option.is-save .preset-action-icon { color: #ffe29d; background: rgba(240,202,105,.11); border-color: #b18b30; }
.preset-action-option > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.preset-action-option strong { color: inherit; font-size: 18px; font-weight: 700; }
.preset-action-option small { color: #b7d0da; font-size: var(--preset-action-text-size); line-height: 1.4; }
.preset-action-option.is-save small { color: #ebcb8a; }
.preset-action-option:disabled { cursor: not-allowed; opacity: .48; }
.preset-action-dialog.is-writing .preset-action-option { opacity: .42; }
.preset-action-dialog.is-writing .preset-action-option:focus-visible { box-shadow: none; }
.preset-action-progress { margin: 0 16px 12px; padding: 11px 12px; background: #06131d; border: 1px solid #2f5364; }
.preset-action-progress[hidden], .preset-action-dialog #presetActionStatus[hidden] { display: none; }
.preset-action-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #dce8ed; font-size: var(--preset-action-text-size); }
.preset-action-progress > div b { color: #8fe9ff; font-family: inherit; font-size: 15px; }
.preset-action-progress progress { width: 100%; height: 10px; margin: 9px 0 7px; appearance: none; border: 0; background: #132630; }
.preset-action-progress progress::-webkit-progress-bar { background: #132630; }
.preset-action-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #00a7d2, #62e6ff); }
.preset-action-dialog.is-save .preset-action-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #a67413, var(--gold-bright)); }
.preset-action-dialog.is-complete .preset-action-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #1fad58, #6cf29a); }
.preset-action-dialog.is-failed .preset-action-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #a63127, #ff786d); }
.preset-action-progress p { margin: 0; color: #8da2ad; font-size: var(--preset-action-text-size); line-height: 1.45; }
.preset-action-dialog #presetActionStatus { margin: 0 16px 16px; font-size: var(--preset-action-text-size); line-height: 1.5; }
@media (max-width: 620px) {
  .preset-action-header { padding-inline: 16px; }
  .preset-action-options { padding-inline: 16px; }
  .source-volume-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-volume-footer { align-items: stretch; flex-direction: column; }
}
.source-policy-dialog { width: min(740px, calc(100vw - 40px)); }
.source-policy-dialog .copy-eq-dialog-card { max-height: min(88vh, 820px); overflow-y: auto; }
.source-policy-controls { margin: 14px 16px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.source-policy-section { min-width: 0; padding: 12px; background: #071722; border: 1px solid #294858; }
.source-policy-section-heading { min-height: 38px; display: flex; align-items: flex-start; gap: 9px; }
.source-policy-section-heading i, .source-policy-members legend i { width: 21px; height: 21px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #201704; font-size: 12px; font-style: normal; font-weight: 700; background: var(--gold-bright); border-radius: 50%; }
.source-policy-section-heading > span { min-width: 0; display: grid; gap: 3px; }
.source-policy-section-heading b { color: #e9f1f4; font-size: 14px; font-weight: 600; }
.source-policy-section-heading small { color: #8297a2; font-size: 12px; }
.source-policy-field { margin-top: 9px; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; }
.source-policy-field > span { color: #9fb0b9; font-size: 13px; }
.source-policy-field select { width: 100%; height: 34px; padding: 0 30px 0 10px; appearance: none; color: #f0f6f8; font-size: 14px; background-color: #0d2230; border: 1px solid #3c6072; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%23d8e6ef' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.source-policy-field select:focus-visible { outline: 1px solid var(--gold-bright); outline-offset: 1px; border-color: var(--gold); }
.source-policy-members { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 12px; background: #071722; border: 1px solid #294858; }
.source-policy-members legend { padding: 0 6px; color: #e9f1f4; font-size: 14px; font-weight: 600; }
.source-policy-members legend i { margin-right: 7px; vertical-align: middle; }
.source-policy-members > p { margin: 0 0 10px; color: #8297a2; font-size: 12px; }
.source-policy-members > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.source-policy-members label { min-height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 9px; color: #9eafb7; font-size: 14px; background: #0a1c27; border: 1px solid #294858; cursor: pointer; user-select: none; }
.source-policy-members input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold-bright); }
.source-policy-members label:has(input:checked) { color: #fff2c1; background: rgba(214,170,73,.13); border-color: var(--gold); box-shadow: inset 3px 0 var(--gold-bright); }
.source-policy-members label:has(input:focus-visible) { outline: 1px solid #fff; outline-offset: 1px; }
.source-policy-summary { grid-column: 1 / -1; min-height: 48px; padding: 9px 11px; display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: center; gap: 10px; background: rgba(214,170,73,.08); border: 1px solid #6f5925; }
.source-policy-summary span { color: var(--gold-bright); font-size: 12px; }
.source-policy-summary strong { min-width: 0; color: #dce7eb; font-size: 13px; font-weight: 500; line-height: 1.45; }
.source-policy-dialog.has-changes .source-policy-summary { background: rgba(214,170,73,.13); border-color: var(--gold); }
.source-policy-dialog.is-complete .source-policy-summary { background: rgba(41,156,88,.12); border-color: #2f9c58; }
.source-policy-dialog.is-writing .source-policy-controls { opacity: .62; cursor: wait; }
.source-policy-dialog.is-writing .copy-eq-close,
.source-policy-dialog.is-writing #sourcePolicyCancel { visibility: hidden; }
.source-policy-dialog :disabled { cursor: not-allowed; opacity: .48; }
.source-policy-dialog.is-complete #sourcePolicyApply:disabled { color: #75eba0; background: rgba(39,132,75,.22); border-color: #36a967; opacity: 1; }
.source-volume-panel { margin: 0 16px 12px; padding: 12px; background: linear-gradient(145deg, rgba(8,29,41,.96), rgba(5,18,27,.96)); border: 1px solid #355364; }
.source-volume-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-volume-heading h3 { margin: 0; color: #f0ca69; font-size: 15px; font-weight: 600; }
.source-volume-heading p { margin: 5px 0 0; color: #a8bbc4; font-size: 13px; }
.source-volume-heading > span { padding: 4px 8px; color: #e9cd82; font-size: 13px; border: 1px solid #66542b; }
.source-volume-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.source-volume-control { min-width: 0; min-height: 96px; padding: 10px; display: grid; grid-template-rows: auto auto 1fr; gap: 8px; background: #081923; border: 1px solid #294858; }
.source-volume-control > span { min-height: 19px; color: #dce7eb; font-size: 14px; font-weight: 600; white-space: nowrap; }
.source-volume-control > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.source-volume-control input[type="number"] { width: 100%; height: 32px; padding: 0 7px; color: #f4f7f8; text-align: center; background: #06131d; border: 1px solid #38596c; }
.source-volume-control b { color: #9eb1ba; font-size: 13px; font-weight: 500; }
.source-volume-control input[type="range"] { width: 100%; height: 20px; margin: 0; accent-color: var(--gold-bright); cursor: pointer; }
.source-volume-control :disabled { cursor: not-allowed !important; opacity: .48; }
.source-volume-footer { margin-top: 10px; display: flex; gap: 12px; }
.source-volume-footer > span { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; display: flex; align-items: center; color: #c4d2d8; font-size: 14px; font-weight: 600; line-height: 1.5; background: #06131d; border: 1px solid #355364; border-left: 4px solid #617784; }
.source-volume-footer > span[data-state="ready"] { color: #f0d995; background: rgba(126,94,31,.13); border-color: #66542b; border-left-color: var(--gold-bright); }
.source-volume-footer > span[data-state="working"] { color: #a8eaff; background: rgba(20,83,101,.18); border-color: #287387; border-left-color: #00d8ff; }
.source-volume-footer > span[data-state="success"] { color: #92f0ad; background: rgba(24,91,49,.2); border-color: #287a4a; border-left-color: var(--green); }
.source-volume-footer > span[data-state="error"] { color: #ffaaa2; background: rgba(117,36,30,.2); border-color: #8b3934; border-left-color: var(--danger); }
.source-volume-footer > span[data-state="warning"] { color: var(--gold-bright); border-color: #66542b; border-left-color: var(--gold-bright); }
.source-policy-dialog.is-volume-writing .copy-eq-close,
.source-policy-dialog.is-volume-writing #sourcePolicyCancel { visibility: hidden; }
.link-tune-progress-overlay {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: 24px;
  width: min(610px, calc(100vw - 40px));
  overflow: hidden;
  opacity: 0;
  background: rgba(5, 18, 28, .97);
  border: 1px solid #3c697d;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .58), 0 0 18px rgba(0, 216, 255, .12);
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.link-tune-progress-overlay[hidden] { display: none; }
.link-tune-progress-overlay.is-visible { opacity: 1; transform: translate(-50%, 0); }
.link-tune-progress-overlay .link-tune-progress { margin: 0; border: 0; }
.link-tune-dialog { width: min(610px, calc(100vw - 40px)); }
.link-tune-channels { margin: 14px 16px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.link-tune-channel { min-width: 0; min-height: 54px; padding: 8px 9px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 100px; gap: 7px; align-items: center; background: #071722; border: 1px solid #294858; }
.link-tune-channel.is-source { border-color: var(--channel-color); box-shadow: inset 3px 0 0 var(--channel-color); }
.link-tune-channel strong { color: var(--channel-color); font: 700 13px/1 Consolas, monospace; }
.link-tune-channel > span { min-width: 0; overflow: hidden; color: #d7e1e6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.link-tune-channel small { display: block; margin-top: 5px; color: #78909d; font-size: 9px; }
.link-tune-channel select { width: 100%; height: 30px; color: #edf4f7; text-align: center; text-align-last: center; background: #102430; border: 1px solid #3a5969; }
.link-tune-channel.has-group select { color: #fff1bd; border-color: #8f7433; }
.link-tune-summary { margin: 0 16px 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.link-tune-summary span { min-width: 0; padding: 7px; overflow: hidden; color: #718793; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; background: #06131d; border: 1px solid #213947; }
.link-tune-summary b { margin-right: 6px; color: #9bb0ba; }
.link-tune-summary span.is-active { color: #86efaa; border-color: #2a8851; }
.link-tune-summary span.is-pending { color: #e9bc61; border-color: #806a32; border-style: dashed; }
.link-tune-progress { margin: 14px 16px 12px; padding: 10px 11px; background: #06131d; border: 1px solid #294858; }
.link-tune-progress-head { display: flex; justify-content: space-between; gap: 12px; color: #dce8ed; font-size: 12px; }
.link-tune-progress-head span { color: #8fe9ff; font: 700 12px/1 Consolas, monospace; }
.link-tune-progress progress { width: 100%; height: 10px; margin: 8px 0 6px; overflow: hidden; appearance: none; border: 0; background: #132630; }
.link-tune-progress progress::-webkit-progress-bar { background: #132630; }
.link-tune-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #00a7d2, #2bf089); box-shadow: 0 0 8px rgba(43,240,137,.4); }
.link-tune-progress p { min-height: 30px; margin: 0; color: #8da2ad; font-size: 11px; line-height: 1.45; }
.link-tune-progress p.is-writing { color: #a8eaff; }
.link-tune-progress p.is-success, .link-tune-progress p.is-ready { color: #7feaa1; }
.link-tune-progress p.is-warning { color: var(--gold-bright); }
.link-tune-progress p.is-error { color: #ff9b92; }
.link-tune-dialog.is-writing .link-tune-channel { opacity: .66; cursor: wait; }
.factory-reset-dialog { width: min(620px, calc(100vw - 40px)); }
.factory-reset-scope { margin: 14px 16px; padding: 12px 14px; color: #c9d3d8; font-size: 13px; line-height: 1.55; background: #071722; border: 1px solid #294858; }
.factory-reset-scope p { margin: 0; }
.factory-reset-scope p + p { margin-top: 6px; }
.factory-reset-scope strong { color: var(--gold-bright); }
.factory-reset-scope .preserved { margin-top: 12px; padding-top: 10px; color: #8fa3ad; border-top: 1px solid #294353; }
.factory-reset-scope .preserved strong { color: #68e69a; }
.factory-reset-dialog.is-writing .copy-eq-close,
.factory-reset-dialog.is-writing #factoryResetCancel { visibility: hidden; }

.ai-tuning-widget { position: fixed; z-index: 24; left: 16px; bottom: 16px; font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; }
.ai-tuning-toggle { min-width: 116px; height: 38px; padding: 0 15px; color: #17140d; background: linear-gradient(135deg, #ffe08b, var(--gold-bright)); border: 1px solid #ffe6a4; box-shadow: 0 8px 28px rgba(0,0,0,.48), 0 0 18px rgba(240,202,105,.2); font-weight: 700; letter-spacing: .3px; }
.ai-tuning-toggle span { margin-right: 5px; font-size: 16px; }
.ai-floating-symbol { width: 26px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ai-floating-label { pointer-events: none; }
.ai-tuning-toggle[aria-expanded="true"] { border-color: #8beaff; box-shadow: 0 0 0 1px rgba(80,218,255,.25), 0 8px 28px rgba(0,0,0,.48); }
.ai-tuning-panel { position: absolute; left: 0; bottom: 48px; width: min(580px, calc(100vw - 32px)); min-width: 0; height: min(790px, calc(100dvh - 84px)); max-height: calc(100dvh - 84px); padding: 14px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 0; color: var(--text); background: linear-gradient(155deg, #0b1d29, #03101a 78%); border: 1px solid #667a52; box-shadow: 0 22px 70px rgba(0,0,0,.72), 0 0 26px rgba(240,202,105,.1); overflow: hidden; }
.ai-tuning-panel[hidden] { display: none; }
.ai-tuning-panel:not([hidden]) { animation: ai-panel-enter .28s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom left; }
.ai-tuning-panel.is-closing { animation: ai-panel-exit .2s ease-in both; pointer-events: none; }
@keyframes ai-panel-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ai-panel-exit { to { opacity: 0; transform: translateY(8px) scale(.985); } }
.ai-tuning-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #294353; }
.ai-tuning-header-copy { flex: 1; min-width: 0; }
.ai-tuning-heading { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 3px; }
.ai-tuning-panel > header h2 { margin: 0; color: #f5edda; font-size: 17px; font-weight: 650; }
.ai-tuning-close { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: #b6c4ca; background: #102431; border: 1px solid #355262; border-radius: 50%; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.ai-tuning-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ai-tuning-close:active { transform: scale(.94); }
.ai-tuning-close:focus-visible { outline: 2px solid #788be0; outline-offset: 3px; }
.ai-tuning-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 11px 0 9px; }
.ai-tuning-progress span { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 3px; border: 1px solid #294353; border-radius: 7px; color: #81939c; font-size: 11px; line-height: 1.3; white-space: nowrap; }
.ai-tuning-progress i { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.ai-tuning-progress b { font-weight: 650; }
.ai-tuning-content { min-height: 0; padding: 4px 4px 10px; margin-inline: -4px; display: grid; align-content: start; gap: 10px; overflow-y: auto; overscroll-behavior: contain; }
.ai-tuning-footer { min-width: 0; display: grid; gap: 8px; padding-top: 11px; border-top: 1px solid #294353; }
.ai-tuning-intro { margin: 0; color: #afbdc3; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.ai-tuning-styles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.ai-tuning-styles button { position: relative; min-width: 0; min-height: 78px; padding: 7px 3px; display: grid; justify-items: center; align-content: center; gap: 3px; color: #b9c8ce; background: linear-gradient(145deg, #102634, #081923); border: 1px solid #2e4c5d; border-radius: 8px; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.ai-tuning-styles button:hover:not(:disabled) { color: #fff1c8; border-color: #9c854b; transform: translateY(-1px); }
.ai-tuning-styles button:active:not(:disabled) { transform: scale(.975); }
.ai-tuning-styles button[aria-pressed="true"] { color: #fff6dd; background: linear-gradient(145deg, #283947, #162f40); border-color: #f0ca69; box-shadow: inset 0 0 0 1px rgba(240,202,105,.2), 0 5px 18px rgba(0,0,0,.28); }
.ai-tuning-style-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #ffe08b; background: rgba(240,202,105,.1); border: 1px solid rgba(240,202,105,.28); border-radius: 50%; font: 700 10px/1 Consolas, sans-serif; }
.ai-tuning-style-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ai-tuning-styles strong { min-width: 0; font-size: 12px; white-space: nowrap; }
.ai-tuning-styles small { color: #b9c8ce; font-size: 11px; font-weight: 650; line-height: 1.25; white-space: nowrap; }
.ai-galaxy-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; background: linear-gradient(145deg, rgba(22,53,68,.92), rgba(7,25,35,.94)); border: 1px solid #416778; border-radius: 8px; }
.ai-galaxy-picker[hidden], .ai-tuning-controls[hidden] { display: none; }
.ai-galaxy-source { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ai-galaxy-source strong { color: #f1d88d; font-size: 12px; }
.ai-galaxy-source span { color: #88a2ad; font-size: 10px; text-align: right; }
.ai-galaxy-picker label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; color: #d8e3e7; font-size: 12px; font-weight: 650; }
.ai-galaxy-picker select { min-width: 0; width: 100%; height: 36px; padding: 0 30px 0 9px; color: #eaf5f8; background: #06141d; border: 1px solid #466c7d; border-radius: 6px; outline: 0; }
.ai-galaxy-picker select:focus { border-color: #80dff3; box-shadow: 0 0 0 2px rgba(104,213,239,.14); }
.ai-galaxy-details { padding: 7px 8px; color: #a9bbc2; background: rgba(1,10,16,.46); border-left: 3px solid #d9b44f; font-size: 11px; line-height: 1.5; }
.ai-tuning-controls { display: grid; grid-template-columns: minmax(165px, .8fr) minmax(210px, 1.2fr); gap: 9px; align-items: end; }
.ai-tuning-preference[hidden] { display: none; }
.ai-tuning-intensity { min-width: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; }
.ai-tuning-intensity legend { margin-bottom: 5px; padding: 0; color: #e6d7ae; font-size: 12px; font-weight: 650; }
.ai-tuning-intensity button { min-width: 0; height: 35px; color: #a7bbc4; background: #0b1c27; border: 1px solid #355263; }
.ai-tuning-intensity button + button { border-left: 0; }
.ai-tuning-intensity button:first-of-type { border-radius: 6px 0 0 6px; }
.ai-tuning-intensity button:last-of-type { border-radius: 0 6px 6px 0; }
.ai-tuning-intensity button[aria-pressed="true"] { color: #211a08; background: #f0ca69; border-color: #f0ca69; font-weight: 750; }
.ai-tuning-preference { min-width: 0; display: grid; gap: 5px; color: #e6d7ae; font-size: 12px; font-weight: 650; }
.ai-tuning-preference small { color: #81939c; font-weight: 400; }
.ai-tuning-preference input { min-width: 0; width: 100%; height: 35px; padding: 0 9px; color: #d9edf4; background: #020b12; border: 1px solid #38596c; border-radius: 6px; outline: 0; }
.ai-tuning-preference input:focus { border-color: #7bdcf4; box-shadow: 0 0 0 1px rgba(123,220,244,.16); }
.ai-tuning-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.ai-tuning-generate { width: 100%; min-height: 42px; color: #17140d !important; background: linear-gradient(135deg, #ffe08b, var(--gold-bright)) !important; border: 1px solid #ffe19a !important; border-radius: 7px; font-weight: 750; letter-spacing: .2px; }
.ai-tuning-generate[data-state="working"] { background-size: 200% 100% !important; animation: ai-button-working 1.6s ease-in-out infinite alternate; }
@keyframes ai-button-working { to { background-position: 100% 0; } }
.ai-tuning-generate span { margin-right: 4px; }
.ai-tuning-save-row button { min-width: 92px; height: 30px; padding: 0 10px; color: #e8eef0; background: #102431; border: 1px solid #3d5f71; }
.ai-tuning-status { padding: 8px 9px; color: #c1cbd0; background: rgba(5,18,28,.84); border: 1px solid #284353; font-size: 12px; line-height: 1.45; }
.ai-tuning-status[data-state="success"] { color: #8df0ad; border-color: #287a4a; background: rgba(24,91,49,.16); }
.ai-tuning-status[data-state="error"] { color: #ff978e; border-color: #8b3934; background: rgba(117,36,30,.2); }
.ai-tuning-status[data-state="working"] { color: #9ceaff; border-color: #287387; }
.ai-tuning-save-row { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid #294353; }
.ai-tuning-save-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.ai-tuning-save-heading strong { color: #e5d6ac; font-size: 12px; }
.ai-tuning-save-heading span { color: #81939c; font-size: 10px; }
.ai-tuning-mode-buttons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.ai-tuning-mode-buttons button { min-width: 0; height: 34px; padding: 0 3px; color: #9eb0b8; background: #0a1923; border: 1px solid #294453; border-radius: 4px; font-size: 11px; transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease; }
.ai-tuning-mode-buttons button:hover:not(:disabled) { color: #f4e5bb; border-color: #9a8040; transform: translateY(-1px); }
.ai-tuning-mode-buttons button[aria-pressed="true"] { color: #201a0b; background: linear-gradient(135deg, #ffe08b, #d0a637); border-color: #ffe6a4; box-shadow: 0 0 12px rgba(240,202,105,.2); font-weight: 750; }
.ai-tuning-panel button:disabled { cursor: not-allowed; opacity: .48; }
@media (max-width: 500px) {
  .ai-tuning-panel { width: calc(100vw - 32px); padding: 11px; }
  .ai-tuning-styles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .ai-tuning-styles button { min-height: 69px; padding: 5px 1px; gap: 2px; }
  .ai-tuning-style-icon { width: 27px; height: 27px; }
  .ai-tuning-style-icon svg { width: 18px; height: 18px; }
  .ai-tuning-styles strong { font-size: clamp(9px, 2.5vw, 10px); }
  .ai-tuning-styles small { font-size: 11px; }
  .ai-tuning-controls { grid-template-columns: 1fr; }
  .ai-tuning-mode-buttons { gap: 4px; }
  .ai-tuning-mode-buttons button { font-size: 10px; }
}

@media (max-width: 1500px) {
  .titlebar { gap: 8px; padding-inline: 12px; }
  .source-controls { margin-left: 12px; }
  .device-io-status { flex-basis: 220px; min-width: 150px; max-width: 220px; margin-left: 4px; }
  .commandbar { gap: 8px; }
  .source-controls, .page-tabs { gap: 6px; }
  .app-shell { height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: 48px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .ai-tuning-widget { left: 16px; bottom: 16px; }
  .ai-tuning-panel { width: min(580px, calc(100vw - 32px)); bottom: 44px; max-height: calc(100dvh - 84px); }
  .device-dialog-content { grid-template-columns: minmax(0, 1fr); }
  .configuration-scopes { grid-template-columns: minmax(0, 1fr); }
  .configuration-scopes button { min-height: 58px; }
  .configuration-summary,
  .configuration-restore-summary { grid-template-columns: minmax(0, 1fr); }
  .device-dialog-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-operation-list > div { grid-template-columns: minmax(0, 1fr); }
  .device-operation-list button { width: 100%; }
  .device-log-details { grid-column: 1; }
}

body.auth-pending #app,
body.auth-required #app {
  filter: blur(9px);
  transform: scale(1.012);
  pointer-events: none;
  user-select: none;
  transition: filter .35s ease, transform .35s ease;
}

.auth-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: visible;
  color: #edf3f5;
  background: transparent;
  border: 1px solid rgba(198, 173, 111, .55);
  border-radius: 12px;
  box-shadow: 0 28px 100px rgba(0,0,0,.72), 0 0 44px rgba(11,148,188,.09);
}

.auth-dialog::backdrop {
  background: rgba(1, 7, 12, .58);
  -webkit-backdrop-filter: blur(7px) saturate(.72);
  backdrop-filter: blur(7px) saturate(.72);
}

.auth-card {
  padding: 30px 34px 24px;
  background: radial-gradient(ellipse at 100% 0, rgba(41,107,128,.22), transparent 42%), linear-gradient(155deg, #10232d, #07131c 70%);
  border-radius: 11px;
}

.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: #251d0b; font-size: 19px; font-weight: 800; background: linear-gradient(145deg, #ffe49b, #c39229); border-radius: 10px; box-shadow: inset 0 1px rgba(255,255,255,.5), 0 4px 15px rgba(214,170,73,.2); }
.auth-brand > span:last-child { display: grid; gap: 3px; }
.auth-brand strong { color: #f4f2eb; font-size: 15px; letter-spacing: .04em; }
.auth-brand small { color: #8da5af; font-size: 10px; letter-spacing: .09em; }
.auth-eyebrow { margin: 30px 0 8px; color: #d4ae52; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.auth-card h1 { margin: 0; color: #f4f3ed; font-size: 27px; font-weight: 650; letter-spacing: -.025em; }
.auth-description { margin: 8px 0 23px; color: #9db0b8; font-size: 13px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; background: #07121a; border: 1px solid #203846; border-radius: 7px; }
.auth-tabs button { height: 35px; color: #8ea3ad; background: transparent; border: 1px solid transparent; border-radius: 4px; font-size: 13px; transition: color .16s, background .16s, border-color .16s; }
.auth-tabs button:hover { color: #e8eef0; }
.auth-tabs button.is-active { color: #261f0d; font-weight: 700; background: linear-gradient(110deg, #e8c96e, #c89c39); border-color: #f2d98f; box-shadow: 0 2px 8px rgba(210,170,73,.16); }
.auth-field-label { display: block; margin: 0 0 7px; color: #c5d2d6; font-size: 12px; font-weight: 650; }
.auth-dialog input { width: 100%; height: 43px; margin-bottom: 16px; padding: 0 12px; color: #eef5f6; background: #07141d; border: 1px solid #2e4856; border-radius: 5px; outline: none; font-size: 13px; transition: border-color .16s, box-shadow .16s; }
.auth-dialog input::placeholder { color: #667d88; }
.auth-dialog input:focus { border-color: #d3ab4d; box-shadow: 0 0 0 3px rgba(214,170,73,.12); }
.auth-register-fields { display: grid; }
.auth-dialog [hidden] { display: none !important; }
.auth-hint { margin: 0 0 15px; color: #7f969f; font-size: 11px; line-height: 1.65; }
.auth-submit { width: 100%; height: 43px; color: #201909; font-size: 13px; font-weight: 750; background: linear-gradient(110deg, #eed17a, #c89a32); border: 1px solid #f4db94; border-radius: 5px; box-shadow: 0 5px 15px rgba(185,139,43,.15); transition: filter .16s, transform .16s; }
.auth-submit:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.auth-submit:focus-visible { outline: 2px solid #fff0bd; outline-offset: 3px; }
.auth-submit:disabled { cursor: wait; opacity: .7; }
.auth-status { min-height: 19px; margin: 10px 0 0; color: #ff958b; font-size: 11px; line-height: 1.55; }
.auth-foot { display: flex; align-items: center; gap: 7px; margin-top: 14px; padding-top: 14px; color: #718792; font-size: 10px; border-top: 1px solid #1d3542; }
.auth-foot-lock { color: #c7a44d; font-size: 9px; }
.account-button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 8px; color: #dbe8ed; background: #0a1a24; border: 1px solid #345365; border-radius: 4px; font-size: 11px; }
.account-button:hover { color: #fff0bd; border-color: var(--gold); }
.account-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.vehicle-switch-open #app { filter: blur(5px); transform: scale(1.008); pointer-events: none; }
.vehicle-dialog { width: min(760px, calc(100vw - 30px)); max-width: none; max-height: calc(100dvh - 28px); margin: auto; padding: 0; overflow: auto; color: #edf3f5; background: transparent; border: 1px solid rgba(198,173,111,.55); border-radius: 10px; box-shadow: 0 28px 100px rgba(0,0,0,.72); }
.vehicle-dialog::backdrop { background: rgba(1,7,12,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vehicle-card { padding: 22px 26px 22px; background: radial-gradient(ellipse at 100% 0, rgba(41,107,128,.18), transparent 44%), linear-gradient(155deg,#10232d,#07131c 72%); border-radius: 9px; }
.vehicle-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.vehicle-header .auth-eyebrow { margin: 0 0 7px; font-size: 12px; }
.vehicle-header h2 { margin: 0; color: #f4f3ed; font-size: 28px; font-weight: 650; }
.vehicle-header p:last-child { margin: 8px 0 0; color: #b8c6ca; font-size: 16px; line-height: 1.6; }
.vehicle-logout { flex: 0 0 auto; min-height: 40px; padding: 0 14px; color: #cbd5d8; background: #0a1720; border: 1px solid #314955; border-radius: 5px; font-size: 14px; }
.vehicle-logout:hover { color: #ffb0a6; border-color: #9b4c43; }
.vehicle-list { display: grid; gap: 8px; max-height: min(250px, 30dvh); overflow: auto; }
.vehicle-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; color: #dce8eb; text-align: left; background: rgba(7,19,27,.78); border: 1px solid #294451; border-radius: 5px; }
.vehicle-option:hover { border-color: #d0aa50; background: rgba(34,43,39,.9); }
.vehicle-option.is-selected { border-color: #e0be61; box-shadow: inset 3px 0 #e0be61; }
.vehicle-option strong { display: block; font-size: 16px; font-weight: 650; }
.vehicle-option small { display: block; margin-top: 5px; color: #aebdc2; font-size: 14px; }
.vehicle-option em { flex: 0 0 auto; color: #e2c36e; font-size: 14px; font-style: normal; }
.vehicle-empty { padding: 14px 16px; color: #c0cbcf; text-align: left; background: rgba(7,19,27,.58); border: 1px dashed #314a56; border-radius: 5px; font-size: 16px; line-height: 1.55; }
.vehicle-status, .vehicle-catalog-status { min-height: 22px; color: #c0cbcf; font-size: 14px; line-height: 1.55; }
.vehicle-status { margin-top: 5px; }
.vehicle-catalog-status { margin-top: 8px; }
.vehicle-status.is-working, .vehicle-catalog-status.is-working { color: #9ceaff; }
.vehicle-status.is-success, .vehicle-catalog-status.is-success { color: #93d7b6; }
.vehicle-status.is-warning, .vehicle-catalog-status.is-warning { color: #e5c47a; }
.vehicle-status.is-error, .vehicle-catalog-status.is-error { color: #ff9d91; }
.vehicle-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid #203946; }
.vehicle-actions > span { color: #b3c0c4; font-size: 13px; }
.vehicle-action-buttons { display: flex; flex: 0 0 auto; gap: 7px; }
.vehicle-add-toggle { min-height: 40px; padding: 0 15px; color: #f0d47f; background: #18281f; border: 1px solid #74612f; border-radius: 5px; font-size: 14px; font-weight: 650; }
.vehicle-add-toggle:hover:not(:disabled) { color: #fff2c7; border-color: #c8a84f; }
.vehicle-add-toggle:disabled { opacity: .45; cursor: not-allowed; }
.vehicle-catalog-panel { margin-top: 12px; padding: 15px; background: rgba(4,13,19,.72); border: 1px solid #2b4654; border-radius: 6px; }
.vehicle-progress { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 15px; padding: 0; list-style: none; }
.vehicle-progress li { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; color: #aebdc2; font-size: 14px; }
.vehicle-progress li > span:first-child { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid #34505c; border-radius: 50%; color: #b6c3c8; font-size: 13px; }
.vehicle-progress li[data-state="active"] { color: #f1d37f; }
.vehicle-progress li[data-state="active"] > span:first-child { color: #201909; background: #e1bf5f; border-color: #e1bf5f; font-weight: 750; }
.vehicle-progress li[data-state="done"] { color: #a6d9be; }
.vehicle-progress li[data-state="done"] > span:first-child { color: #a6d9be; border-color: #57846f; }
.vehicle-search-form label { display: block; margin-bottom: 9px; color: #e0e8ea; font-size: 16px; font-weight: 650; }
.vehicle-search-form > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.vehicle-catalog-panel input, .vehicle-catalog-panel select { min-width: 0; width: 100%; height: 48px; padding: 0 13px; color: #e9f1f2; background: #07141c; border: 1px solid #2e4957; border-radius: 5px; font-size: 16px; text-align: left; }
.vehicle-search-form small { display: block; margin-top: 8px; color: #aab8bd; font-size: 14px; line-height: 1.55; }
.vehicle-catalog-panel input:focus, .vehicle-catalog-panel select:focus { outline: 1px solid #caa344; border-color: #d2ac4b; }
.vehicle-search-form button { min-width: 118px; padding: 0 16px; color: #221a08; background: linear-gradient(110deg,#e8c96e,#c89c39); border: 1px solid #f2d98f; border-radius: 5px; font-size: 15px; font-weight: 700; }
.vehicle-search-form button:disabled { opacity: .62; cursor: wait; }
.vehicle-select-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; margin-top: 13px; }
.vehicle-select-grid label { min-width: 0; display: grid; gap: 8px; color: #d1dce0; font-size: 15px; font-weight: 600; }
.vehicle-select-grid select { width: 100%; }
.vehicle-save-step { margin-top: 13px; padding-top: 12px; border-top: 1px solid #203946; }
.vehicle-confirm { width: 100%; min-height: 50px; color: #201909; background: linear-gradient(110deg,#eed17a,#c89a32); border: 1px solid #f4db94; border-radius: 5px; font-size: 16px; font-weight: 750; }
.vehicle-confirm:hover:not(:disabled) { filter: brightness(1.06); }
.vehicle-confirm:disabled { cursor: not-allowed; opacity: .44; }
.vehicle-search-note { margin: 12px 0 0; color: #aab8bd; font-size: 14px; line-height: 1.55; }
.vehicle-dialog [hidden] { display: none !important; }

@media (max-width: 500px) {
  .auth-card { padding: 25px 22px 18px; }
  .auth-eyebrow { margin-top: 23px; }
  .vehicle-card { padding: 20px 16px; }
  .vehicle-progress { gap: 4px; }
  .vehicle-progress li { gap: 6px; font-size: 13px; }
  .vehicle-progress li > span:first-child { flex-basis: 24px; width: 24px; height: 24px; }
  .vehicle-search-form > div { grid-template-columns: minmax(0,1fr); }
  .vehicle-search-form button { height: 38px; }
  .vehicle-header h2 { font-size: 24px; }
  .vehicle-header p:last-child { font-size: 14px; }
  .vehicle-search-form label { font-size: 15px; }
  .vehicle-catalog-panel input, .vehicle-catalog-panel select { font-size: 16px; }
  .vehicle-search-form small, .vehicle-search-note { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-pending #app,
  body.auth-required #app { transition: none; }
  .chart-band-node.response-warning circle,
  .chart-band-node.response-danger circle { animation: none; }
}
/* Login dialog only: keep the audio workspace theme unchanged. */
.auth-dialog {
  color: #263653;
  background: #eeedf8;
  border-color: #c8c9e2;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(4,12,27,.42), 0 0 24px rgba(114,121,204,.12);
}
.auth-dialog::backdrop {
  background: rgba(20,31,49,.62);
  -webkit-backdrop-filter: blur(7px) saturate(1.05);
  backdrop-filter: blur(7px) saturate(1.05);
}
.auth-card {
  background: radial-gradient(ellipse at 100% 0, rgba(142,145,215,.12), transparent 48%), linear-gradient(155deg,#f7f6ff,#ececf7 80%);
  border-radius: inherit;
}
.auth-brand-mark {
  color: #fff;
  background: linear-gradient(145deg,#7883d5,#5867b8);
  box-shadow: 0 4px 11px rgba(81,94,167,.18);
}
.auth-brand strong, .auth-card h1 { color: #202f4a; }
.auth-brand small, .auth-description, .auth-hint, .auth-foot { color: #65738d; }
.auth-eyebrow { color: #6572bd; }
.auth-tabs { background: rgba(226,226,242,.74); border-color: #d2d3e8; }
.auth-tabs button { color: #69758f; }
.auth-tabs button:hover { color: #4f5fa9; }
.auth-tabs button.is-active {
  color: #fff;
  background: #5968b8;
  border-color: #5968b8;
  box-shadow: 0 2px 7px rgba(75,87,153,.17);
}
.auth-field-label { color: #455570; }
.auth-dialog input {
  color: #263653;
  background: rgba(255,255,255,.77);
  border-color: #cdd1e4;
  border-radius: 7px;
}
.auth-dialog input::placeholder { color: #8b96aa; }
.auth-dialog input:focus {
  border-color: #7c88cf;
  box-shadow: 0 0 0 3px rgba(113,125,202,.14);
}
.auth-submit {
  color: #fff;
  background: #5968b8;
  border-color: #5968b8;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(75,87,153,.18);
}
.auth-submit:hover:not(:disabled) { background: #6574c5; border-color: #6574c5; }
.auth-submit:focus-visible { outline-color: #5968b8; }
.auth-foot { border-top-color: #d8d9e9; }
.auth-foot-lock { color: #6572bd; }
/* Compact, centered account entry without changing the login and registration flow. */
.auth-dialog { width: min(404px, calc(100vw - 28px)); }
.auth-card { padding: 28px 28px 23px; text-align: center; }
.auth-brand { justify-content: center; align-items: center; text-align: left; }
.auth-dialog .auth-brand-mark { width: 46px; height: 46px; font-size: 21px; }
.auth-dialog .auth-brand > span:last-child { display: flex; align-items: baseline; gap: 8px; padding-top: 0; white-space: nowrap; }
.auth-dialog .auth-brand strong { font-size: 16px; line-height: 22px; letter-spacing: 0; }
.auth-dialog .auth-brand small { font-size: 16px; line-height: 22px; letter-spacing: 0; }
.auth-card > h1 { margin-top: 25px; }
.auth-description { max-width: 300px; margin: 7px auto 20px; font-size: 14px; }
.auth-tabs { width: min(100%, 272px); margin: 0 auto 19px; }
.auth-dialog .auth-tabs button { font-size: 16px; }
#authForm { width: min(100%, 304px); margin: 0 auto; text-align: left; }
#authIdentifierField, #authRegisterFields { width: min(100%, 176px); margin-inline: auto; }
.auth-dialog .auth-field-label { font-size: 14px; line-height: 1.4; }
.auth-dialog input { width: 100%; font-size: 16px; }
.auth-dialog .auth-hint { font-size: 14px; line-height: 1.5; }
.auth-dialog input.is-phone-invalid,
.auth-dialog input.is-phone-invalid:focus {
  background: rgba(220, 53, 69, .2);
  border-color: #cc6875;
}
.auth-dialog .auth-hint.is-phone-error { color: #a53544; }
.auth-hint, .auth-status { text-align: center; }
.auth-dialog .auth-status { font-size: 16px; }
.auth-dialog .auth-submit { display: block; width: min(100%, 176px); height: 40px; margin: 2px auto 0; font-size: 16px; }
@media (max-width: 420px) {
  .auth-card { padding-inline: 15px; }
  .auth-dialog .auth-brand > span:last-child { gap: 6px; }
}
@media (max-width: 380px) {
  .auth-dialog { width: calc(100vw - 16px); }
  .auth-card { padding: 25px 15px 21px; }
  .auth-brand { gap: 7px; }
  .auth-dialog .auth-brand-mark { width: 42px; height: 42px; flex: 0 0 42px; }
  .auth-dialog .auth-brand > span:last-child { gap: 6px; }
}
@media (max-width: 340px) {
  .auth-card { padding-inline: 12px; }
  .auth-dialog .auth-brand strong { font-size: 15px; }
  .auth-dialog .auth-brand small { font-size: 12px; }
}
/* Account and vehicle pages only; audio tuning and device tools retain their own UI. */
#accountButton {
  color: #dfe3ff;
  background: #262d49;
  border-color: #596398;
}
#accountButton:hover { color: #fff; border-color: #9ba5e3; }
#accountButton svg { stroke: currentColor; }
.vehicle-dialog {
  color: #263653;
  background: #eeedf8;
  border: 1px solid #c8c9e2;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(4,12,27,.42), 0 0 24px rgba(114,121,204,.12);
}
.vehicle-dialog::backdrop {
  background: rgba(20,31,49,.62);
  -webkit-backdrop-filter: blur(7px) saturate(1.05);
  backdrop-filter: blur(7px) saturate(1.05);
}
.vehicle-card {
  background: radial-gradient(ellipse at 100% 0,rgba(142,145,215,.12),transparent 48%),linear-gradient(155deg,#f7f6ff,#ececf7 80%);
  border-radius: inherit;
}
.vehicle-header h2 { color: #202f4a; }
.vehicle-header p:last-child,
.vehicle-status, .vehicle-catalog-status, .vehicle-actions > span,
.vehicle-search-note, .vehicle-search-form small { color: #65738d; }
.vehicle-header .auth-eyebrow { color: #6572bd; }
.vehicle-logout { color: #4e5da8; background: #efeff9; border-color: #cdd0e4; border-radius: 7px; }
.vehicle-logout:hover { color: #4a568f; border-color: #929bd0; }
.vehicle-option, .vehicle-empty, .vehicle-catalog-panel {
  color: #40536f;
  background: rgba(255,255,255,.58);
  border-color: #d3d4e6;
  border-radius: 8px;
}
.vehicle-option strong, .vehicle-select-grid label,
.vehicle-search-form label { color: #2e405d; }
.vehicle-option small { color: #6d7b93; }
.vehicle-option em { color: #5968b8; }
.vehicle-option:hover, .vehicle-option.is-selected { background: #e8e9f7; border-color: #949ed1; }
.vehicle-option.is-selected { box-shadow: inset 3px 0 #6572bd; }
.vehicle-progress li { color: #6d7b93; }
.vehicle-progress li > span:first-child { color: #69758f; border-color: #cdd1e4; }
.vehicle-progress li[data-state="active"] { color: #4e5da8; }
.vehicle-progress li[data-state="active"] > span:first-child { color: #fff; background: #5968b8; border-color: #5968b8; }
.vehicle-progress li[data-state="done"] { color: #24745b; }
.vehicle-progress li[data-state="done"] > span:first-child { color: #24745b; border-color: #a7d4bf; }
.vehicle-catalog-panel input, .vehicle-catalog-panel select {
  color: #263653;
  background: rgba(255,255,255,.77);
  border-color: #cdd1e4;
  border-radius: 7px;
}
.vehicle-catalog-panel input:focus, .vehicle-catalog-panel select:focus { outline: 0; border-color: #7c88cf; box-shadow: 0 0 0 3px rgba(113,125,202,.12); }
.vehicle-search-form button, .vehicle-confirm {
  color: #fff;
  background: #5968b8;
  border-color: #5968b8;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(75,87,153,.18);
}
.vehicle-search-form button:hover:not(:disabled), .vehicle-confirm:hover:not(:disabled) { background: #6574c5; border-color: #6574c5; }
.vehicle-add-toggle { color: #4e5da8; background: #efeff9; border-color: #cdd0e4; border-radius: 7px; }
.vehicle-add-toggle:hover:not(:disabled) { color: #46569f; border-color: #8993cf; }
.vehicle-actions, .vehicle-save-step { border-color: #d8d9e9; }

/* Vehicle picker layout: compact vehicle cards above a quieter add flow. */
.vehicle-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 12px;
  max-height: min(236px, 28dvh);
  padding: 2px;
}
.vehicle-option {
  min-height: 104px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: initial;
  gap: 5px 12px;
  text-align: left;
  border-radius: 11px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.vehicle-option::before,
.vehicle-empty::before {
  content: "";
  width: 40px;
  height: 40px;
  display: block;
  grid-column: 1;
  grid-row: 1 / 3;
  border: 1px solid #d4d7eb;
  border-radius: 12px;
  background: #e8e9f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%235968b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 11 1.6-4.1A2 2 0 0 1 8.5 5.5h7a2 2 0 0 1 1.9 1.4L19 11'/%3E%3Cpath d='M3.5 11h17v6.5a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1V11Z'/%3E%3Cpath d='M6 18.5v1M18 18.5v1M6 14.5h.01M18 14.5h.01'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
.vehicle-option > span { min-width: 0; grid-column: 2; grid-row: 1; display: grid; gap: 4px; }
.vehicle-option strong { overflow: hidden; color: #2e405d; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-option small { overflow: hidden; margin-top: 0; color: #728099; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-option em {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  padding: 4px 9px;
  color: #5968b8;
  font-size: 12px;
  font-weight: 650;
  background: #f0effa;
  border: 1px solid #dcdeef;
  border-radius: 999px;
}
.vehicle-option:hover { transform: translateY(-1px); background: #f0effa; border-color: #aeb5dc; box-shadow: 0 6px 16px rgba(66,75,129,.08); }
.vehicle-option.is-selected { background: #e9e9f7; border-color: #858fc9; box-shadow: inset 3px 0 #6572bd, 0 4px 12px rgba(66,75,129,.08); }
.vehicle-option.is-selected em { color: #fff; background: #5968b8; border-color: #5968b8; }
.vehicle-empty {
  grid-column: 1 / -1;
  width: min(100%, 540px);
  min-height: 72px;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  color: #65738d;
  background: #f3f2fa;
  border: 1px dashed #c9cbe1;
  border-radius: 11px;
}
.vehicle-empty::before { flex: 0 0 40px; grid-column: auto; grid-row: auto; }
.vehicle-catalog-panel {
  width: min(100%, 560px);
  margin: 14px auto 0;
  padding: 17px 19px;
  background: #f3f2fa;
  border-color: #d5d6e8;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(50,61,107,.045);
}
.vehicle-progress { gap: 6px; margin-bottom: 13px; }
.vehicle-progress li { gap: 7px; font-size: 13px; }
.vehicle-progress li > span:first-child { flex-basis: 25px; width: 25px; height: 25px; font-size: 12px; }
.vehicle-search-form label { margin-bottom: 7px; font-size: 15px; }
.vehicle-search-form > div { grid-template-columns: minmax(0,1fr) 108px; gap: 8px; }
.vehicle-catalog-panel input, .vehicle-catalog-panel select { height: 43px; font-size: 15px; }
.vehicle-search-form button { min-width: 0; padding: 0 12px; font-size: 14px; }
.vehicle-search-form small { font-size: 13px; }
.vehicle-select-grid { gap: 9px; margin-top: 11px; }
.vehicle-select-grid label { gap: 6px; font-size: 14px; }
.vehicle-save-step { margin-top: 11px; padding-top: 10px; }
.vehicle-confirm { min-height: 44px; font-size: 15px; }
.vehicle-search-note { margin-top: 10px; font-size: 12px; }
@media (max-width: 600px) {
  .vehicle-list { grid-template-columns: minmax(0,1fr); max-height: min(220px, 26dvh); }
  .vehicle-catalog-panel { padding: 14px; }
  .vehicle-progress { grid-template-columns: 1fr; gap: 7px; }
  .vehicle-search-form > div { grid-template-columns: minmax(0,1fr); }
  .vehicle-search-form button { min-height: 40px; }
}

/* Guided first-use vehicle flow */
#vehicleAddToggle { display: none !important; }
.vehicle-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.vehicle-option.vehicle-add-card {
  border-style: dashed;
  border-color: #b9bedc;
  background: rgba(240,239,250,.58);
}
.vehicle-option.vehicle-add-card::before {
  content: "+";
  display: grid;
  place-items: center;
  color: #5968b8;
  font: 400 28px/1 system-ui, sans-serif;
  background: #e8e9f7;
  border: 1px solid #d4d7eb;
}
.vehicle-option.vehicle-add-card strong { color: #4e5da8; }
.vehicle-option.vehicle-add-card em { color: #5968b8; background: #f0effa; }
.vehicle-option.vehicle-add-card:hover { background: #f0effa; border-color: #8993cf; }
.vehicle-catalog-panel { width: min(100%, 480px); padding: 17px 18px; }
.vehicle-search-form label { margin-bottom: 9px; font-size: 16px; }
.vehicle-search-form > div { grid-template-columns: minmax(0,1fr) 96px; gap: 7px; }
.vehicle-catalog-panel input[type="search"] { height: 42px; padding-inline: 11px; font-size: 14px; }
.vehicle-search-form button { padding-inline: 8px; font-size: 13px; }
.vehicle-search-form small { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.vehicle-catalog-status:empty { display: none; }
.vehicle-search-actions { margin-top: 10px; }
.vehicle-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #d8d9e9;
}
.vehicle-wizard-actions[hidden] { display: none !important; }
.vehicle-wizard-actions > span { color: #76829a; font-size: 12px; }
.vehicle-wizard-actions button {
  min-width: 104px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
}
.vehicle-wizard-primary { color: #fff; background: #5968b8; border: 1px solid #5968b8; }
.vehicle-wizard-primary:hover:not(:disabled) { background: #6574c5; border-color: #6574c5; }
.vehicle-wizard-primary:disabled { color: #8d96b4; background: #e5e6f1; border-color: #d7d9e7; opacity: 1; }
.vehicle-wizard-secondary { color: #586784; background: transparent; border: 1px solid #cdd0e4; }
.vehicle-wizard-secondary:hover:not(:disabled) { color: #46569f; background: #efeff9; border-color: #a9afd4; }
.vehicle-confirm-summary {
  margin: 0 0 14px;
  padding: 12px 13px;
  display: grid;
  gap: 5px;
  background: #e8e9f7;
  border: 1px solid #d0d2e8;
  border-radius: 9px;
}
.vehicle-confirm-summary small { color: #6d7b93; font-size: 12px; }
.vehicle-confirm-summary strong { color: #35446e; font-size: 15px; }
.vehicle-search-note { margin-bottom: 0; }
.vehicle-progress { grid-template-columns: repeat(5,minmax(0,1fr)); }
.vehicle-choice-step { margin-top: 14px; }
.vehicle-choice-step[hidden] { display: none !important; }
.vehicle-choice-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vehicle-choice-heading h3 { margin: 4px 0 0; color: #273657; font-size: 18px; }
.vehicle-choice-heading > span { flex: none; color: #7b86a0; font-size: 12px; }
.vehicle-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.vehicle-choice-card {
  min-height: 54px;
  padding: 11px 14px;
  color: #344365;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  background: #fff;
  border: 1px solid #d7daec;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.vehicle-choice-card::after { content: "›"; float: right; color: #8792c6; font-size: 20px; line-height: 18px; }
.vehicle-choice-card:hover { color: #4658a8; background: #f7f7ff; border-color: #8994d1; box-shadow: 0 4px 12px rgba(73,86,157,.1); transform: translateY(-1px); }
.vehicle-choice-card:focus-visible { outline: 3px solid rgba(111,124,202,.25); border-color: #6978c2; }
.vehicle-choice-grid:empty::after { content: "没有可选项，请返回上一步重新选择。"; grid-column: 1 / -1; padding: 18px; color: #7a8499; text-align: center; background: #f8f8fc; border: 1px dashed #d2d6e8; border-radius: 8px; }
@media (max-width: 600px) {
  .vehicle-list { grid-template-columns: minmax(0,1fr); }
  .vehicle-catalog-panel { width: 100%; padding: 14px; }
  .vehicle-search-form > div { grid-template-columns: minmax(0,1fr) 92px; }
  .vehicle-wizard-actions button { min-width: 0; }
  .vehicle-progress { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; }
  .vehicle-progress li { display: grid; justify-items: center; gap: 3px; font-size: 10px; text-align: center; }
  .vehicle-progress li > span:first-child { width: 23px; height: 23px; flex-basis: 23px; }
  .vehicle-choice-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* Vehicle onboarding: keep the add-vehicle card and search wizard side by side. */
.vehicle-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.vehicle-layout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.vehicle-layout-row.is-search-open {
  grid-template-columns: minmax(230px, .82fr) minmax(320px, 1.18fr);
}
.vehicle-layout-row .vehicle-list {
  grid-template-columns: minmax(0, 1fr);
  max-height: min(360px, 48dvh);
  padding: 0;
}
.vehicle-layout-row .vehicle-catalog-panel {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.vehicle-status:empty { display: none; }
.vehicle-header-actions #vehicleReload { min-height: 40px; }
@media (max-width: 680px) {
  .vehicle-layout-row.is-search-open { grid-template-columns: minmax(0, 1fr); }
  .vehicle-layout-row .vehicle-list { max-height: min(220px, 28dvh); }
  .vehicle-header-actions { gap: 6px; }
  .vehicle-header-actions #vehicleReload,
  .vehicle-header-actions .vehicle-logout { min-height: 36px; padding-inline: 10px; }
}

/* Keep the background readable and present each catalog choice as a guided page. */
body.auth-pending #app,
body.auth-required #app { filter: blur(2px); transform: scale(1.004); }
.auth-dialog::backdrop,
.vehicle-dialog::backdrop {
  background: rgba(20,31,49,.36);
  -webkit-backdrop-filter: blur(2px) saturate(1.03);
  backdrop-filter: blur(2px) saturate(1.03);
}
.vehicle-switch-open #app { filter: blur(2px); transform: scale(1.004); }
.vehicle-card { position: relative; }
.vehicle-card.is-wizard {
  min-height: 430px;
  padding-left: 64px;
  padding-right: 64px;
}
.vehicle-card.is-wizard #vehicleList { display: none; }
.vehicle-card.is-wizard .vehicle-layout-row { grid-template-columns: minmax(0, 1fr); }
.vehicle-card.is-wizard .vehicle-catalog-panel {
  width: 100%;
  padding: 18px 20px;
  background: rgba(255,255,255,.78);
}
.vehicle-wizard-arrows {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.vehicle-wizard-arrows[hidden] { display: none !important; }
.vehicle-wizard-arrows button {
  display: grid;
  width: 42px;
  height: 52px;
  place-items: center;
  padding: 0;
  color: #5968b8;
  font: 400 38px/1 system-ui, sans-serif;
  background: rgba(255,255,255,.9);
  border: 1px solid #cfd3ea;
  border-radius: 13px;
  box-shadow: 0 4px 14px rgba(54,65,119,.12);
  cursor: pointer;
  pointer-events: auto;
  transition: background .15s ease, color .15s ease, opacity .15s ease, transform .15s ease;
}
.vehicle-wizard-arrows button:hover:not(:disabled) { color: #fff; background: #5968b8; transform: scale(1.04); }
.vehicle-wizard-arrows button:disabled { opacity: .35; cursor: not-allowed; }
.vehicle-choice-card.is-selected { color: #4052a4; background: #eaecfb; border-color: #6978c2; box-shadow: inset 0 0 0 1px #6978c2, 0 4px 12px rgba(73,86,157,.1); }
.vehicle-choice-card.is-selected::after { content: "✓"; color: #5968b8; }
.vehicle-choice-grid[data-step="brand"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 190px));
  justify-content: center;
}
.vehicle-choice-grid[data-step="year"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#vehicleSelectionActions { justify-content: center; }
.vehicle-brand-click-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  color: #68749a;
  font-size: 14px;
}
.vehicle-brand-click-icon {
  display: inline-block;
  font-size: 22px;
  transform-origin: 60% 75%;
  animation: vehicle-cursor-tap 1.25s ease-in-out infinite;
}
@keyframes vehicle-cursor-tap {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  45% { transform: translateY(5px) rotate(-8deg) scale(.88); }
  60% { transform: translateY(1px) rotate(-8deg) scale(1.02); }
}
.vehicle-card.is-wizard #vehicleSaveStep { max-width: 520px; margin-inline: auto; }
@media (max-width: 600px) {
  .vehicle-card.is-wizard { min-height: 400px; padding: 18px 52px; }
  .vehicle-card.is-wizard .vehicle-catalog-panel { padding: 15px 12px; }
  .vehicle-wizard-arrows { right: 5px; left: 5px; }
  .vehicle-wizard-arrows button { width: 36px; height: 46px; font-size: 32px; }
  .vehicle-choice-grid[data-step="year"] { gap: 6px; }
  .vehicle-choice-grid[data-step="year"] .vehicle-choice-card { min-height: 46px; padding: 8px 5px; font-size: 12px; text-align: center; }
}

/* Brand results are the primary decision on this wizard page. */
.vehicle-choice-heading { align-items: center; margin-bottom: 18px; }
.vehicle-choice-grid[data-step="brand"] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 610px;
  margin-inline: auto;
  justify-content: center;
  gap: 10px;
  max-height: min(54dvh, 450px);
  overflow-y: auto;
  align-content: start;
  padding: 3px 4px 6px;
  scrollbar-gutter: stable;
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 58px;
  place-items: center;
  padding: 9px 22px 9px 7px;
  color: #29385d;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  background: linear-gradient(145deg, #fff, #f7f8ff);
  border: 1px solid #ccd2ef;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(65,78,145,.08);
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card::after {
  position: absolute;
  top: 50%;
  right: 6px;
  float: none;
  color: #8793cb;
  font-size: 17px;
  font-weight: 500;
  transform: translateY(-50%);
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card:hover {
  color: #3f50a0;
  background: linear-gradient(145deg, #fff, #eef0ff);
  border-color: #8793d1;
  box-shadow: 0 9px 22px rgba(65,78,145,.15);
  transform: translateY(-2px);
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card.is-selected {
  color: #384b9e;
  background: linear-gradient(145deg, #f1f3ff, #e5e9ff);
  border-color: #6978c2;
  box-shadow: inset 0 0 0 1px #6978c2, 0 7px 18px rgba(73,86,157,.14);
}
.vehicle-choice-grid[data-step="series"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: min(52dvh, 430px);
  overflow-y: auto;
  align-content: start;
  padding: 4px 5px 6px;
  scrollbar-gutter: stable;
}
.vehicle-choice-grid[data-step="series"] .vehicle-choice-card {
  position: relative;
  min-height: 58px;
  padding: 9px 22px 9px 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}
.vehicle-choice-grid[data-step="series"] .vehicle-choice-card::after {
  position: absolute;
  top: 50%;
  right: 7px;
  float: none;
  transform: translateY(-50%);
  font-size: 17px;
}
.vehicle-choice-heading h3 { font-size: 22px; }
.vehicle-choice-step[data-step="brand"] .vehicle-choice-heading { display: none; }
.vehicle-progress li[data-state="active"] {
  color: #3f50a0;
  font-size: 22px;
  font-weight: 750;
}
.vehicle-progress li[data-state="active"] > span:first-child {
  flex-basis: 34px;
  width: 34px;
  height: 34px;
  font-size: 16px;
}
.vehicle-choice-heading > span {
  padding: 6px 11px;
  color: #5664ad;
  font-size: 13px;
  font-weight: 650;
  background: #eef0ff;
  border: 1px solid #dce0f8;
  border-radius: 999px;
}
.vehicle-brand-click-hint {
  margin-top: 6px;
  padding-top: 16px;
  color: #68749a;
  border-top: 1px solid #e0e2f0;
}
.vehicle-series-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 42px;
  margin: 8px 4px 0;
}
.vehicle-series-pagination[hidden] { display: none !important; }
.vehicle-series-pagination > span { color: #6d7896; font-size: 13px; }
.vehicle-series-pagination button {
  min-width: 88px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
@media (max-width: 600px) {
  .vehicle-choice-grid[data-step="brand"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vehicle-choice-grid[data-step="brand"] .vehicle-choice-card {
    min-width: 0;
    min-height: 54px;
    padding: 8px 20px 8px 6px;
    font-size: 15px;
  }
  .vehicle-choice-grid[data-step="brand"] .vehicle-choice-card::after { right: 8px; font-size: 18px; }
  .vehicle-choice-heading h3 { font-size: 19px; }
  .vehicle-progress li[data-state="active"] { font-size: 14px; }
  .vehicle-progress li[data-state="active"] > span:first-child { flex-basis: 28px; width: 28px; height: 28px; font-size: 13px; }
  .vehicle-choice-grid[data-step="series"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 48dvh; gap: 8px; }
  .vehicle-choice-grid[data-step="series"] .vehicle-choice-card { min-height: 54px; padding-inline: 7px 20px; font-size: 13px; }
  .vehicle-series-pagination { gap: 6px; margin-top: 6px; }
  .vehicle-series-pagination button { min-width: 76px; min-height: 36px; padding-inline: 9px; font-size: 13px; }
}

/* Keep vehicle lookup compact and centered in both the add card and wizard. */
.vehicle-search-form {
  width: min(100%, 540px);
  margin-inline: auto;
}
.vehicle-search-form > div {
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}
.vehicle-search-form button { min-width: 0; }
@media (max-width: 600px) {
  .vehicle-search-form { width: 100%; }
  .vehicle-search-form > div { grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
}

/* Match the add-vehicle card to the search panel in the initial vehicle view. */
.vehicle-layout-row.is-search-open {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.vehicle-layout-row.is-search-open .vehicle-catalog-panel {
  width: 100%;
  max-width: none;
}
.vehicle-layout-row.is-search-open .vehicle-list {
  align-content: stretch;
  max-height: none;
}
.vehicle-option.vehicle-add-card {
  min-height: 128px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.vehicle-option.vehicle-add-card::before {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 25px;
}
.vehicle-option.vehicle-add-card > span { flex: 0 0 auto; }
.vehicle-option.vehicle-add-card::before {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  color: #5968b8;
  font-size: 22px;
  font-weight: 500;
  background: transparent;
  border: 0;
}
.vehicle-option.vehicle-add-card strong { font-size: 16px; }
@media (max-width: 680px) {
  .vehicle-layout-row.is-search-open { grid-template-columns: minmax(0, 1fr); }
  .vehicle-layout-row.is-search-open .vehicle-list { min-height: 128px; }
}

/* The brand page grows with its 1–20 cards; the pager occupies the row below them. */
.vehicle-dialog { height: fit-content; }
.vehicle-choice-grid[data-step="brand"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
  gap: 8px;
  padding: 0;
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card { min-height: 50px; }
.vehicle-card.is-wizard {
  height: auto;
  min-height: 0;
}
@media (max-width: 600px) {
  .vehicle-card.is-wizard { min-height: 0; }
  .vehicle-choice-grid[data-step="brand"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vehicle-choice-grid[data-step="brand"] .vehicle-choice-card { min-height: 50px; font-size: 12px; }
}
#vehicleChoiceStep[data-step="brand"] #vehicleSeriesPagination {
  width: min(100%, 610px);
  justify-content: flex-end;
  margin: 8px auto 0;
}
#vehicleChoiceStep[data-step="brand"] #vehicleSeriesNextPage {
  min-width: 148px;
}

/* Choice cards and pagination must stay inside the guided panel at every width. */
.vehicle-choice-step,
.vehicle-choice-grid,
.vehicle-series-pagination { min-width: 0; max-width: 100%; }
.vehicle-choice-grid[data-step="series"] {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
  padding: 0;
}
.vehicle-choice-grid[data-step="series"] .vehicle-choice-card {
  min-width: 0;
  height: auto;
  min-height: 58px;
  padding: 8px 20px 8px 7px;
  overflow: hidden;
}
.vehicle-choice-card-label {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.vehicle-series-pagination {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  height: auto;
  margin: 10px 0 0;
}
.vehicle-series-pagination > span {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  text-align: right;
}
.vehicle-series-pagination button,
#vehicleChoiceStep[data-step="brand"] #vehicleSeriesNextPage {
  flex: 0 0 auto;
  width: auto;
  min-width: 96px;
  max-width: 100%;
  min-height: 38px;
  padding: 6px 16px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .vehicle-choice-grid[data-step="series"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-choice-grid[data-step="series"] .vehicle-choice-card { min-height: 54px; padding-right: 20px; }
  .vehicle-series-pagination button,
  #vehicleChoiceStep[data-step="brand"] #vehicleSeriesNextPage { min-width: 82px; padding-inline: 10px; }
}

.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card {
  padding-inline: 22px;
  justify-items: center;
  align-items: center;
  text-align: center;
}
.vehicle-choice-grid[data-step="brand"] .vehicle-choice-card-label {
  width: 100%;
  text-align: center;
}

/* Keep all six wizard steps on one content-sized row. */
.vehicle-progress {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  gap: clamp(8px, 2vw, 20px);
  margin-inline: auto;
  overflow-x: auto;
}
.vehicle-progress li {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .vehicle-card.is-wizard { padding-inline: 34px; }
  .vehicle-progress { gap: 3px; }
  .vehicle-progress li { display: flex; gap: 2px; font-size: 10px; }
  .vehicle-progress li > span:first-child {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .vehicle-progress li[data-state="active"] { font-size: 12px; }
  .vehicle-progress li[data-state="active"] > span:first-child {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

/* Searching is a single panel; vehicle cards belong to the initial picker. */
.vehicle-dialog:has(.vehicle-layout-row.is-search-open) {
  width: min(720px, calc(100vw - 30px));
}
.vehicle-layout-row.is-search-open {
  grid-template-columns: minmax(0, 1fr);
}
.vehicle-layout-row.is-search-open .vehicle-list { display: none; }
.vehicle-layout-row.is-search-open .vehicle-catalog-panel { min-width: 0; }
.vehicle-layout-row.is-search-open .vehicle-progress {
  gap: clamp(6px, 1vw, 14px);
  overflow-x: visible;
}
@media (max-width: 780px) {
  .vehicle-layout-row.is-search-open { grid-template-columns: minmax(0, 1fr); }
  .vehicle-layout-row.is-search-open .vehicle-progress { overflow-x: auto; }
}

/* Center each row of vehicle search results, including incomplete last rows. */
.vehicle-choice-grid[data-step="brand"],
.vehicle-choice-grid[data-step="series"],
.vehicle-choice-grid[data-step="year"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.vehicle-choice-grid .vehicle-choice-card {
  flex: 0 0 calc((100% - 24px) / 4);
  min-width: 0;
}
.vehicle-choice-grid:empty::after { flex: 1 1 100%; }
@media (max-width: 600px) {
  .vehicle-choice-grid[data-step="series"] .vehicle-choice-card {
    flex-basis: calc((100% - 8px) / 2);
  }
  .vehicle-choice-grid[data-step="year"] {
    gap: 6px;
  }
  .vehicle-choice-grid[data-step="year"] .vehicle-choice-card {
    flex-basis: calc((100% - 18px) / 4);
  }
}

/* A selected year opens its own configuration and guide-price page. */
.vehicle-configuration-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 168px);
  gap: 16px;
  padding: 0 34px 9px 18px;
  color: #6c7896;
  font-size: 12px;
  font-weight: 700;
}
.vehicle-configuration-columns[hidden] { display: none !important; }
.vehicle-configuration-columns span:last-child { text-align: right; }
.vehicle-choice-grid[data-step="configuration"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-height: min(56dvh, 490px);
  overflow-y: auto;
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: #b8c3e5 transparent;
  scrollbar-gutter: stable;
  align-content: start;
  gap: 8px;
  padding: 2px 8px 2px 2px;
}
.vehicle-choice-grid[data-step="configuration"]::-webkit-scrollbar { width: 8px; }
.vehicle-choice-grid[data-step="configuration"]::-webkit-scrollbar-track { background: transparent; }
.vehicle-choice-grid[data-step="configuration"]::-webkit-scrollbar-thumb {
  background: #b8c3e5;
  border: 2px solid #f3f2fa;
  border-radius: 999px;
}
.vehicle-choice-grid[data-step="configuration"]::-webkit-scrollbar-thumb:hover { background: #8f9dcd; }
.vehicle-choice-grid[data-step="configuration"] .vehicle-choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 168px);
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 62px;
  padding: 12px 16px;
  text-align: left;
}
.vehicle-choice-grid[data-step="configuration"] .vehicle-choice-card::after { content: none; }
.vehicle-choice-grid[data-step="configuration"] .vehicle-choice-card-label {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.vehicle-choice-grid[data-step="configuration"] .is-unknown-configuration .vehicle-choice-card-label {
  color: #c03548;
  font-weight: 750;
}
.vehicle-catalog-panel[data-step="series"] .vehicle-catalog-status:empty {
  display: block;
  min-height: 22px;
}
.vehicle-choice-price {
  color: #5061ae;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.vehicle-confirm-configuration {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #d0d2e8;
  font-size: 14px;
}
.vehicle-confirm-configuration > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.vehicle-confirm-configuration > span:last-child { color: #6d7b93; white-space: nowrap; }
.vehicle-confirm-configuration b { color: #5061ae; }
@media (max-width: 600px) {
  .vehicle-configuration-columns,
  .vehicle-choice-grid[data-step="configuration"] .vehicle-choice-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
  }
  .vehicle-configuration-columns { padding-left: 12px; padding-right: 28px; }
  .vehicle-choice-grid[data-step="configuration"] .vehicle-choice-card { padding: 10px 11px; font-size: 13px; }
  .vehicle-choice-price { font-size: 12px; }
}

/* Personal workspace opened from the account control. */
.vehicle-dismiss {
  width: 40px;
  min-height: 40px;
  padding: 0;
  color: #5968b8;
  background: #efeff9;
  border: 1px solid #cdd0e4;
  border-radius: 8px;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}
.vehicle-dismiss:hover { color: #384a9d; background: #e4e7f8; }
body.auth-required .vehicle-dismiss { display: none; }
.user-center-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #263653;
  color-scheme: light;
  background: #f1f1fa;
  border: 1px solid #cbd0e8;
  border-radius: 17px;
  box-shadow: 0 30px 90px rgba(7, 17, 39, .42);
}
.user-center-dialog::backdrop {
  background: rgba(12, 22, 43, .52);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.user-center-shell { min-width: 0; background: linear-gradient(150deg, #fbfbff, #eceefa); }
.user-center-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 21px;
  border-bottom: 1px solid #d9dcef;
}
.user-center-header p { margin: 0 0 4px; color: #6372bf; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.user-center-header h2 { margin: 0 0 5px; color: #263658; font-size: 25px; }
.user-center-header span { color: #697893; font-size: 13px; }
.user-center-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #5968aa;
  background: #fff;
  border: 1px solid #cbd0e8;
  border-radius: 10px;
  font: 400 28px/1 system-ui, sans-serif;
  cursor: pointer;
}
.user-center-close:hover { color: #33458f; background: #e9ecfb; }
.user-center-close:focus-visible,
.user-center-nav button:focus-visible,
.user-center-action:focus-visible { outline: 3px solid rgba(89, 104, 184, .27); outline-offset: 2px; }
.user-center-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 420px; }
.user-center-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 12px;
  background: #e9ebf7;
  border-right: 1px solid #d9dcef;
}
.user-center-nav button {
  min-height: 43px;
  padding: 9px 14px;
  color: #586885;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.user-center-nav button:hover { color: #4356a1; background: #f7f8ff; }
.user-center-nav button.is-active { color: #4052a4; background: #fff; border-color: #d4d9f0; box-shadow: 0 3px 10px rgba(76, 89, 150, .08); }
.user-center-content {
  min-width: 0;
  max-height: min(610px, calc(100dvh - 145px));
  overflow: auto;
  padding: 25px 28px 30px;
  scrollbar-width: thin;
  scrollbar-color: #bcc5e7 transparent;
}
.user-center-content::-webkit-scrollbar { width: 9px; }
.user-center-content::-webkit-scrollbar-track { background: transparent; }
.user-center-content::-webkit-scrollbar-thumb { background: #bcc5e7; border: 2px solid #f5f6fc; border-radius: 999px; }
.user-center-content::-webkit-scrollbar-thumb:hover { background: #929fd5; }
.user-center-section-heading { margin-bottom: 20px; }
.user-center-section-heading h3 { margin: 0 0 5px; color: #263658; font-size: 21px; }
.user-center-section-heading p { margin: 0; color: #7886a0; font-size: 14px; line-height: 1.5; }
.user-center-overview-hero { padding: 20px 22px; margin-bottom: 13px; background: linear-gradient(120deg, #fff 10%, #e9edff); border: 1px solid #bbc7ed; border-radius: 14px; }
.user-center-overview-hero h3 { margin: 7px 0 5px; color: #273b6c; font-size: clamp(19px, 2vw, 25px); line-height: 1.35; }
.user-center-overview-hero p { margin: 0; color: #596b91; font-size: 14px; line-height: 1.5; }
.user-center-overview-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.user-center-overview-facts span { padding: 5px 9px; color: #4960a3; background: #fff; border: 1px solid #d9e1fa; border-radius: 999px; font-size: 12px; }
.user-center-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.user-center-overview-grid .user-center-panel { min-width: 0; }
.user-center-overview-grid .user-center-panel h3 { overflow-wrap: anywhere; }
.user-center-overview-grid .user-center-effect-facts { font-size: 13px; }
.user-center-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 14px; }
.user-center-metric,
.user-center-panel,
.user-center-row,
.user-center-mode { background: #fff; border: 1px solid #d8ddef; border-radius: 12px; }
.user-center-metric { display: grid; gap: 7px; min-height: 84px; padding: 14px; }
.user-center-metric span { color: #7a86a0; font-size: 12px; }
.user-center-metric strong { min-width: 0; overflow-wrap: anywhere; color: #394a8f; font-size: 18px; }
.user-center-panel { padding: 18px 19px; }
.user-center-kicker { color: #7280b9; font-size: 12px; font-weight: 700; }
.user-center-panel h3 { margin: 7px 0; color: #2d3d64; font-size: 18px; }
.user-center-panel p { margin: 7px 0; line-height: 1.55; }
.user-center-muted { color: #7a86a0; font-size: 13px; }
.user-center-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.user-center-list { display: grid; gap: 9px; margin-bottom: 14px; }
.user-center-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.user-center-row-main { display: grid; min-width: 0; gap: 4px; }
.user-center-row-main strong { color: #304168; font-size: 15px; }
.user-center-row-main span { color: #5f6f8e; font-size: 13px; overflow-wrap: anywhere; }
.user-center-row-main small { color: #8a95a9; font-size: 12px; }
.user-center-badge { flex: 0 0 auto; padding: 6px 9px; color: #3b55a5; background: #eef0ff; border-radius: 999px; font-size: 12px; }
.user-center-action {
  min-height: 36px;
  padding: 7px 13px;
  color: #4d60ad;
  background: #f6f7ff;
  border: 1px solid #cbd2ef;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.user-center-action:hover:not(:disabled) { color: #fff; background: #5968b8; border-color: #5968b8; }
.user-center-action:disabled { opacity: .55; cursor: wait; }
.user-center-primary { color: #fff; background: #5968b8; border-color: #5968b8; }
.user-center-primary:hover:not(:disabled) { background: #4354a9; }
.user-center-empty { margin: 0 0 13px; padding: 17px; color: #71809c; background: #fff; border: 1px dashed #c9d0e8; border-radius: 10px; font-size: 14px; }
.user-center-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 11px; margin: 14px 0; }
.user-center-mode { display: grid; gap: 6px; padding: 13px 15px; }
.user-center-mode strong { color: #354877; font-size: 14px; }
.user-center-mode h4 { margin: 0; color: #354877; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.user-center-mode span { color: #667693; font-size: 13px; }
.user-center-mode small { color: #8995aa; font-size: 12px; }
.user-center-effect-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 22px; }
.user-center-effect-device { display: grid; gap: 6px; min-width: 0; padding: 16px 18px; text-align: left; font: inherit; color: #34476b; background: #fff; border: 1px solid #d8ddef; border-radius: 12px; cursor: pointer; }
.user-center-effect-device:hover, .user-center-effect-device.is-selected { border-color: #8595d1; background: #f4f6ff; }
.user-center-effect-device.is-selected { box-shadow: inset 3px 0 #6374c1; }
.user-center-effect-device small { color: #6072b5; font-size: 11px; font-weight: 750; }
.user-center-effect-device strong { font-size: 17px; overflow-wrap: anywhere; }
.user-center-effect-device span, .user-center-effect-device em { color: #71809c; font-size: 13px; font-style: normal; overflow-wrap: anywhere; }
.user-center-effect-detail { display: grid; gap: 12px; }
.user-center-effect-detail > .user-center-section-heading { margin: 1px 0 0; }
.user-center-effect-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 5px; background: #e9ecf9; border: 1px solid #d7dff3; border-radius: 11px; }
.user-center-effect-tab { flex: 1 1 150px; min-height: 40px; padding: 8px 10px; color: #5c6c92; background: transparent; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.user-center-effect-tab:hover { color: #4258a2; background: #f8f9ff; }
.user-center-effect-tab.is-active { color: #354b9d; background: #fff; border-color: #d0d8f0; box-shadow: 0 2px 8px rgba(70, 83, 140, .09); }
.user-center-effect-tab:focus-visible { outline: 3px solid rgba(89, 104, 184, .27); outline-offset: 2px; }
.user-center-effect-tab-panel { display: grid; align-content: start; gap: 12px; min-width: 0; }
.user-center-effect-tab-panel[hidden] { display: none; }
.user-center-backup-list { display: grid; gap: 10px; }
.user-center-backup-card { min-width: 0; padding: 16px; background: #fff; border: 1px solid #d8ddef; border-radius: 11px; }
.user-center-backup-head { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #304572; font-size: 15px; }
.user-center-backup-card .user-center-effect-facts { margin-top: 12px; }
.user-center-source { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 4px 8px; color: #5e6d91; background: #eff1f8; border-radius: 999px; font-size: 11px; font-weight: 750; }
.user-center-source.is-live { color: #217457; background: #e7f6ef; }
.user-center-source.is-cloud { color: #4d62aa; background: #eef1ff; }
.user-center-effect-config { display: grid; gap: 9px; }
.user-center-effect-section { min-width: 0; padding: 11px 13px 2px; background: #f8f9ff; border: 1px solid #e2e6f4; border-radius: 9px; }
.user-center-effect-section h4 { margin: 0 0 9px; color: #41558d; font-size: 13px; }
.user-center-effect-section .user-center-effect-facts { margin-bottom: 10px; }
.user-center-system-record { padding-bottom: 10px; }
.user-center-system-record > .user-center-effect-raw { margin: 0 0 1px; padding-top: 9px; border-top: 1px solid #e2e6f4; }
.user-center-system-record > .user-center-effect-raw > .user-center-effect-facts { margin-bottom: 0; }
.user-center-effect-section.is-current { background: #eef2ff; border-color: #8b9cda; box-shadow: inset 3px 0 #6374c1; }
.user-center-effect-section .is-current-channel { color: #334eaa; font-weight: 750; }
.user-center-compensation-note { margin: 10px 0; padding: 10px 12px; color: #405580; background: #eef2ff; border: 1px solid #dbe2f7; border-radius: 8px; font-size: 13px; line-height: 1.55; }
.user-center-compensation-note.is-mismatch { color: #8f3d35; background: #fff1ef; border-color: #efc8c1; }
.user-center-effect-subheading { margin: 7px 0 2px; color: #34476d; font-size: 15px; }
.user-center-effect-facts { display: grid; grid-template-columns: minmax(94px, 150px) minmax(0, 1fr); gap: 8px 12px; margin: 4px 0 10px; font-size: 13px; }
.user-center-effect-facts dt { color: #8290a8; }
.user-center-effect-facts dd { min-width: 0; margin: 0; color: #3e5071; overflow-wrap: anywhere; }
.user-center-effect-mode { min-width: 0; align-content: start; }
.user-center-effect-mode summary, .user-center-profile-card summary, .user-center-effect-raw summary { color: #354877; font-weight: 750; cursor: pointer; }
.user-center-effect-mode > .user-center-profile-grid { margin-top: 10px; }
.user-center-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.user-center-profile-card { min-width: 0; padding: 9px 10px; background: #f8f9ff; border: 1px solid #e0e5f2; border-radius: 8px; }
.user-center-profile-card[open] { grid-column: 1 / -1; }
.user-center-profile-card .user-center-effect-facts { margin-top: 12px; }
.user-center-effect-raw { min-width: 0; margin-top: 8px; color: #667693; font-size: 12px; }
.user-center-effect-raw > .user-center-effect-facts { margin-top: 10px; padding: 10px 12px; background: #f5f7fc; border-radius: 8px; }
.user-center-effect-raw pre { max-height: 280px; overflow: auto; margin: 8px 0 0; padding: 12px; background: #f5f7fc; border-radius: 8px; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-center-eq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; margin-top: 9px; }
.user-center-form { display: grid; gap: 9px; margin-top: 18px; }
.user-center-form label { color: #455677; font-size: 13px; font-weight: 700; }
.user-center-form input { width: min(100%, 330px); height: 42px; padding: 0 11px; color: #263653; background: #fff; border: 1px solid #cbd2e8; border-radius: 7px; font: inherit; }
.user-center-form .user-center-action { justify-self: start; }
.user-center-form-status { min-height: 19px; margin: 0; color: #5165ac; font-size: 12px; }
.user-center-logout { margin-top: 16px; color: #aa4f50; background: #fff7f7; border-color: #e7cccc; }
.user-center-logout:hover:not(:disabled) { background: #aa4f50; border-color: #aa4f50; }
.user-center-board-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 12px; margin: 23px 0 12px; }
.user-center-board-heading h4 { margin: 0; color: #2e406a; font-size: 18px; }
.user-center-board-heading span { color: #8490a6; font-size: 12px; }
.user-center-vehicle-grid,
.user-center-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.user-center-vehicle-grid > .user-center-empty,
.user-center-device-grid > .user-center-empty { grid-column: 1 / -1; margin: 0; }
.user-center-vehicle-card,
.user-center-vehicle-add { min-width: 0; background: #fff; border: 1px solid #d8ddef; border-radius: 13px; }
.user-center-vehicle-card { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 18px; }
.user-center-vehicle-card.is-current { background: linear-gradient(155deg, #fff, #f2f4ff); border-color: #aeb9e7; box-shadow: inset 3px 0 #6374c1; }
.user-center-vehicle-top { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.user-center-vehicle-year,
.user-center-vehicle-current { padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 750; }
.user-center-vehicle-year { color: #5367ad; background: #eef1ff; }
.user-center-vehicle-current { color: #fff; background: #6374c1; }
.user-center-vehicle-card h4 { margin: 0; color: #2e3f67; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.user-center-vehicle-configuration { margin: 0; color: #5d6e8d; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.user-center-vehicle-alias { margin: 0; color: #8793a8; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.user-center-vehicle-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.user-center-vehicle-meta span { padding: 5px 8px; color: #697993; background: #f3f5fb; border: 1px solid #e4e8f2; border-radius: 6px; font-size: 11px; }
.user-center-vehicle-card > .user-center-action { margin-top: 3px; }
.user-center-vehicle-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 18px;
  color: #5366b1;
  background: #f5f6ff;
  border-style: dashed;
  border-color: #bbc4e9;
  text-align: center;
  font: inherit;
  cursor: pointer;
}
.user-center-vehicle-add:hover { background: #ecefff; border-color: #7184ce; }
.user-center-vehicle-add-mark { display: grid; width: 36px; height: 36px; place-items: center; background: #e6eaff; border-radius: 10px; font-size: 25px; line-height: 1; }
.user-center-vehicle-add strong { font-size: 15px; }
.user-center-vehicle-add small { color: #8692ad; font-size: 12px; }
.user-center-vehicle-add:focus-visible { outline: 3px solid rgba(89, 104, 184, .27); outline-offset: 2px; }
.user-center-device-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid #d8ddef;
  border-radius: 13px;
}
.user-center-device-card.is-current { background: linear-gradient(155deg, #fff, #f2f4ff); border-color: #aeb9e7; box-shadow: inset 3px 0 #6374c1; }
.user-center-device-top { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; }
.user-center-device-mark { display: grid; width: 42px; height: 36px; place-items: center; color: #5367ad; background: #edf0ff; border-radius: 9px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.user-center-device-card h4 { margin: 0; color: #2e3f67; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.user-center-device-model { margin: -4px 0 2px; color: #76849f; font-size: 12px; overflow-wrap: anywhere; }
.user-center-device-details { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 10px; width: 100%; margin: 1px 0 0; padding-top: 13px; border-top: 1px solid #e6e9f2; }
.user-center-device-details dt { color: #8995aa; font-size: 13px; }
.user-center-device-details dd { min-width: 0; margin: 0; color: #445575; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.user-center-device-card > .user-center-action { margin-top: auto; }
.user-center-usb-serial-status { margin: 0; color: #596b8d; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.user-center-device-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding-top: 8px; }
.user-center-device-confirm[hidden] { display: none; }
.user-center-device-confirm p:first-child { flex-basis: 100%; margin: 0; color: #865454; font-size: 14px; line-height: 1.5; }
.user-center-device-confirm .user-center-form-status { flex-basis: 100%; }
@media (max-width: 700px) {
  .user-center-header { padding: 18px 18px 16px; }
  .user-center-layout { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 145px); }
  .user-center-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding: 9px 12px; border-right: 0; border-bottom: 1px solid #d9dcef; }
  .user-center-nav button { min-width: 0; min-height: 37px; padding: 7px 8px; text-align: center; white-space: normal; font-size: 13px; }
  .user-center-content { flex: 1 1 auto; min-height: 0; max-height: none; padding: 18px; }
  .user-center-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-center-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .user-center-row { flex-wrap: wrap; }
  .user-center-mode-grid, .user-center-profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .user-center-vehicle-grid,
  .user-center-device-grid,
  .user-center-effect-device-grid,
  .user-center-eq-list { grid-template-columns: minmax(0, 1fr); }
}

/* Vehicle cards show full model details in at most two content-sized columns. */
.vehicle-dialog:not(:has(.vehicle-layout-row.is-search-open)):not(:has(.vehicle-card.is-wizard)) {
  width: min(var(--vehicle-dialog-width, 826px), calc(100vw - 30px));
}
.vehicle-layout-row:not(.is-search-open) .vehicle-list {
  grid-template-columns: repeat(var(--vehicle-list-columns, 2), minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  max-height: none;
  overflow: visible;
}
.vehicle-tile { position: relative; min-width: 0; }
.vehicle-tile > .vehicle-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: start;
  align-items: start;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding: 18px;
}
.vehicle-tile > .vehicle-option::before { grid-column: 1; grid-row: 1; width: 42px; height: 42px; }
.vehicle-tile > .vehicle-option > .vehicle-option-main {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 6px;
  padding-right: 46px;
}
.vehicle-tile .vehicle-option-main strong {
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}
.vehicle-tile .vehicle-option-main small {
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: clip;
  white-space: normal;
}
.vehicle-tile .vehicle-option-main .vehicle-option-alias { color: #8591a8; font-size: 12px; }
.vehicle-tile > .vehicle-option > .vehicle-option-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vehicle-option-meta > span {
  padding: 4px 8px;
  color: #62718f;
  background: #f2f3fa;
  border: 1px solid #e0e3f0;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.35;
}
.vehicle-option-meta > .vehicle-option-current { color: #4960aa; background: #e9edff; border-color: #cbd4f5; }
.vehicle-tile > .vehicle-option > em {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 2px;
  padding: 5px 10px;
  font-size: 12px;
}
.vehicle-tile-delete {
  position: absolute;
  z-index: 1;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 28px;
  padding: 0 7px;
  color: #8a6670;
  background: #f8f8fe;
  border: 1px solid #d6daeb;
  border-radius: 7px;
  font: 600 11px/1 system-ui, sans-serif;
  cursor: pointer;
}
.vehicle-tile-delete:hover { color: #b1464d; background: #fff2f2; border-color: #e3afb4; }
.user-center-vehicle-head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.user-center-vehicle-head-actions .vehicle-tile-delete { position: static; z-index: auto; flex: none; }
.vehicle-tile.is-existing-match > .vehicle-option {
  background: #e5eafb;
  border-color: #5968b8;
  box-shadow: 0 0 0 3px rgba(89, 104, 184, .2);
}
.vehicle-tile-delete:focus-visible,
.vehicle-option:focus-visible { outline: 3px solid rgba(89, 104, 184, .3); outline-offset: 2px; }
.vehicle-option.vehicle-add-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 24px 18px;
  text-align: center;
}
.vehicle-option.vehicle-add-card::before {
  display: none;
}
.vehicle-option.vehicle-add-card > .vehicle-add-content {
  display: grid;
  flex: 0 1 auto;
  justify-items: center;
  gap: 13px;
  min-width: 0;
  text-align: center;
}
.vehicle-option.vehicle-add-card .vehicle-add-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.vehicle-option.vehicle-add-card .vehicle-add-heading::before {
  content: "+";
  color: #5968b8;
  font: 500 25px/1 system-ui, sans-serif;
}
.vehicle-option.vehicle-add-card .vehicle-add-content strong,
.vehicle-option.vehicle-add-card .vehicle-add-content small { overflow: visible; text-overflow: clip; white-space: normal; }
.vehicle-option.vehicle-add-card .vehicle-add-content small { margin: 0; color: #818ca7; font-size: 14px; line-height: 1.5; }
@media (max-width: 700px) {
  .vehicle-layout-row:not(.is-search-open) .vehicle-list { grid-template-columns: minmax(0, 1fr); }
}
.vehicle-delete-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  color: #263653;
  color-scheme: light;
  background: #f6f6fd;
  border: 1px solid #cdd1e7;
  border-radius: 15px;
  box-shadow: 0 24px 70px rgba(9, 18, 42, .4);
}
.vehicle-delete-dialog::backdrop { background: rgba(13, 23, 44, .54); }
.vehicle-delete-card { position: relative; padding: 25px; }
.vehicle-delete-card .auth-eyebrow { margin: 0 0 8px; color: #6472ba; }
.vehicle-delete-card h2 { margin: 0 34px 12px 0; font-size: 24px; }
.vehicle-delete-card p { line-height: 1.6; }
.vehicle-delete-warning { padding: 11px 13px; color: #934b50; background: #fff1f1; border: 1px solid #efd0d1; border-radius: 8px; font-size: 13px; }
.vehicle-delete-status { min-height: 20px; color: #a73e46; font-size: 13px; }
.vehicle-delete-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #65729c;
  background: #fff;
  border: 1px solid #d0d5e9;
  border-radius: 8px;
  font: 400 25px/1 system-ui, sans-serif;
  cursor: pointer;
}
.vehicle-delete-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.vehicle-delete-actions button { min-height: 39px; padding: 0 15px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
#vehicleDeleteCancel { color: #536289; background: #fff; border: 1px solid #cbd0e5; }
#vehicleDeleteConfirm { color: #fff; background: #bd5158; border: 1px solid #bd5158; }
#vehicleDeleteConfirm:hover:not(:disabled) { background: #a94047; }
.vehicle-delete-actions button:disabled,
.vehicle-delete-close:disabled { opacity: .55; cursor: wait; }

/* 固件库与升级进度：沿用设备维护面板的调音台配色。 */
.device-operation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.device-operation-list > div { min-height: 112px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; align-items: stretch; gap: 8px; }
.device-operation-list button { width: 100%; }
.firmware-panel[hidden], .firmware-panel [hidden] { display: none !important; }
.firmware-panel { grid-column: 1 / -1; margin-top: 0; font-size: 14px; }
.firmware-panel label { display: block; margin-bottom: 9px; color: var(--text); font-size: 15px; }
.firmware-current { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; color: var(--muted); }
.firmware-current strong { color: var(--gold); font-size: 15px; }
.firmware-layout { display: grid; grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1.15fr); gap: 18px; }
.firmware-selection, .firmware-release-notes { min-width: 0; padding: 16px; border: 1px solid #294352; background: #06131c; border-radius: 6px; }
.firmware-selection select { width: 100%; max-width: 100%; min-height: 42px; font-size: 14px; }
.firmware-metadata { display: grid; gap: 10px; margin: 16px 0; }
.firmware-metadata > div { display: flex; justify-content: space-between; gap: 10px; }
.firmware-metadata dt { color: var(--muted); white-space: nowrap; }
.firmware-metadata dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.firmware-hash { color: var(--muted); font-size: 12px; }
.firmware-hash code { display: block; padding-top: 8px; overflow-wrap: anywhere; }
.firmware-release-notes h4 { margin: 0 0 12px; font-size: 17px; color: var(--gold); }
.firmware-release-notes ul { padding-left: 20px; margin: 0; line-height: 1.8; }
.firmware-release-notes li + li { margin-top: 9px; }
.firmware-progress { display: grid; gap: 8px; margin-top: 18px; }
.firmware-progress-heading, .firmware-progress-detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.firmware-progress-heading strong { font-size: 14px; font-weight: 650; }
.firmware-progress-heading span { font-size: 14px; font-weight: 700; }
.firmware-progress progress { width: 100%; min-width: 60px; height: 12px; accent-color: #ddbd61; }
.firmware-progress-detail span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.firmware-progress-detail span:last-child { text-align: right; }
.firmware-readiness { margin: 16px 0 0; padding: 10px 12px; border: 1px solid #355365; border-radius: 6px; background: #0b202c; color: #a8c8d8; line-height: 1.6; overflow-wrap: anywhere; }
.firmware-readiness[data-state="ready"] { color: #92dfb3; border-color: #2c6850; }
.firmware-readiness[data-state="warning"], .firmware-readiness[data-state="working"] { color: #ead18d; border-color: #6c603a; }
.firmware-status { line-height: 1.6; color: var(--muted); }
.firmware-status[data-state="error"] { color: #ff8278; }
.firmware-status[data-state="success"] { color: #62dda4; }
.firmware-status[data-state="working"] { color: #e6c86e; }
.firmware-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 10px; }
.firmware-actions a { margin-right: auto; color: #80d7f0; }
.firmware-actions button { min-height: 38px; padding: 8px 15px; font-size: 14px; }

@media (max-width: 760px) { .device-operation-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .firmware-layout { grid-template-columns: minmax(0,1fr); } .firmware-progress-detail { align-items: flex-start; flex-direction: column; gap: 3px; } .firmware-progress-detail span:last-child { text-align: left; } }

.firmware-version-notice { width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.firmware-version-notice-card { padding: 24px; font-size: 15px; }
.firmware-version-notice-eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 11px; letter-spacing: .14em; }
.firmware-version-notice h2 { margin: 0; font-size: 23px; }
.firmware-version-notice-versions { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 14px; margin: 22px 0; }
.firmware-version-notice-versions > div { display: grid; gap: 8px; min-width: 0; }
.firmware-version-notice-versions span { color: var(--muted); font-size: 13px; }
.firmware-version-notice-versions strong { overflow-wrap: anywhere; font-size: 15px; }
.firmware-version-notice-versions > div:last-child strong { color: var(--gold); }
.firmware-version-notice-changes { padding: 15px; border: 1px solid #294352; border-radius: 8px; background: #06131c; }
.firmware-version-notice h3 { margin: 0 0 10px; font-size: 16px; }
.firmware-version-notice ul { padding-left: 19px; margin: 0; line-height: 1.8; }
.firmware-version-notice li + li { margin-top: 7px; }
.firmware-version-notice-status { margin: 16px 0; color: var(--muted); line-height: 1.6; }
.firmware-version-notice[data-state="error"] .firmware-version-notice-status,
.firmware-version-notice[data-state="unknown"] .firmware-version-notice-status { color: #e6c86e; }
.firmware-version-notice [hidden] { display: none !important; }
@media (max-width: 480px) { .firmware-version-notice-card { padding: 19px; } .firmware-version-notice-versions { gap: 8px; } }

/* Small desktop windows must scroll instead of clipping the lower workbench. */
@media (max-width: 1332px), (max-height: 750px) {
  :root { --left-control-width: 96px; }
  html, body { min-width: 0; }
  body { overflow: auto; }
  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
  }
  .titlebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
    min-height: 48px;
    padding-block: 8px;
  }
  .commandbar { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 7px 10px; }
  .source-controls, .primary-tabs { margin-left: 0; }
  .device-io-status { flex: 1 1 170px; margin-left: 0; }
  .workspace { overflow: visible; }
  .page[data-page="home"] { height: auto; overflow: visible; }
  .home-grid {
    grid-template-columns: 230px minmax(0, 1fr);
    height: auto;
    min-height: 686px;
    overflow: visible;
  }
  .left-rail { min-width: 0; overflow-y: visible; }
  .main-stage { height: auto; min-height: 686px; overflow: visible; }
  .ai-tuning-widget { left: 16px; bottom: 16px; }
  .auth-dialog { overflow-y: auto; }
}

@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .left-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; }
}

@media (max-width: 1332px) {
  .left-rail { grid-template-rows: repeat(4, max-content); }
  .crossover-columns select { padding-left: 4px; padding-right: 15px; font-size: 12px; }
  .preset-panel-title { flex-wrap: wrap; align-items: flex-start; }
  .preset-panel-title > small { white-space: normal; text-align: left; }
  .response-header { gap: 8px; }
  .response-heading .panel-title, .eq-heading .panel-title { white-space: nowrap; }
  .response-heading > span, .eq-heading > span, .selected-range-summary { display: none; }
  .response-tools .communication-status, .headroom-status { min-width: 100px; }
}

@media (max-width: 900px) {
  .left-rail { grid-template-rows: repeat(2, max-content); }
}

@media (max-width: 1100px) {
  .response-heading [data-selected-channel-name] { display: none; }
}

