:root {
  color-scheme: dark;
  --bg: #10111b;
  --surface: #191b29;
  --surface-deep: #11131f;
  --line: #303247;
  --text: #f3f2ff;
  --muted: #b0b2cb;
  --soft: #9093af;
  --accent: #c7b8ff;
  --accent-strong: #9e82ff;
  --danger: #ff9eac;
  --online: #7fe0ba;
  --offline: #aeb1c8;
  --gradient: linear-gradient(110deg, #c4adff 0%, #ab92ff 54%, #9a81fc 100%);
  --font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-padding-top: 24px; }
body {
  min-height: 100svh;
  margin: 0;
  background: radial-gradient(ellipse 650px 440px at 50% 0%, #211b38 0%, transparent 85%), var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { touch-action: manipulation; }
button, a { transition: color .16s, background-color .16s, border-color .16s, box-shadow .16s; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.frame { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.brand { display: inline-flex; width: fit-content; gap: 11px; align-items: center; color: var(--text); font-size: 23px; font-weight: 680; letter-spacing: -.75px; white-space: nowrap; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; color: #211745; background: var(--gradient); box-shadow: inset 0 1px 0 #ffffff55, 0 4px 16px #9d7bf52c; }
.brand-mark svg { width: 25px; height: 25px; stroke-width: 2.2; }

.primary, .ghost, .danger-btn, .nav-btn, .icon-btn, .text-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 600; line-height: 1.35; text-align: center;
}
.primary { color: #1e1539; background: var(--gradient); box-shadow: inset 0 1px 0 #fff4; }
.primary:hover:not(:disabled) { box-shadow: inset 0 0 0 100px #ffffff20, 0 4px 16px #ab91ff35; }
.primary:disabled { background: #302b46; color: #a19ab6; box-shadow: none; }
.ghost { color: #e1ddf7; background: #232539; border-color: #3b3e56; }
.ghost:hover:not(:disabled), .icon-btn:hover { color: #fff; background: #2e3048; border-color: #656080; }
.ghost:disabled, .danger-btn:disabled, select:disabled, input:disabled { opacity: .60; }
.danger-btn { color: var(--danger); border-color: #583544; background: #322333; }
.danger-btn:hover:not(:disabled) { background: #442a3c; border-color: #884f65; }
.text-btn { padding-inline: 4px; border: 0; color: var(--accent); background: transparent; }
.text-btn:hover { color: #e6deff; }
.icon-btn { width: 44px; padding: 0; background: #222437; border-color: var(--line); color: var(--muted); flex-shrink: 0; }
.primary svg, .ghost svg, .text-btn svg, .nav-btn svg { width: 17px; height: 17px; }

label { display: block; margin-bottom: 7px; color: #d0cee5; font-size: 13px; font-weight: 550; }
input:not([type=range]), select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px;
  color: var(--text); background: var(--surface-deep); border: 1px solid #3b3d56; border-radius: 11px;
}
input:not([type=range]):focus, select:focus, textarea:focus { border-color: var(--accent-strong); outline: 2px solid #ae93ff44; outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #9396b4; opacity: 1; }
input[readonly] { color: var(--accent); }
.field-result { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.field-result:empty, .form-error:empty { display: none; }

.login { display: none; min-height: 100svh; align-items: center; justify-content: center; padding: 40px 28px; }
.login.show { display: flex; }
.auth-layout {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  width: min(980px, 100%); min-height: 548px; overflow: hidden;
  background: #191b29; border: 1px solid #393951; border-radius: 28px;
  box-shadow: 0 32px 85px #08081099, 0 0 0 6px #c6b5ff08;
}
.auth-feature {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0;
  padding: 37px 40px 28px;
  background: radial-gradient(ellipse at 48% 66%, #504386 0%, #292544 52%, #201e33 86%);
  border-right: 1px solid #413858;
}
.feature-copy { position: relative; z-index: 1; margin-top: 52px; }
.feature-copy h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.18; letter-spacing: -.04em; }
.feature-copy p { max-width: 250px; margin-top: 13px; color: #d3c8f1; font-size: 15px; }
.signal-art { position: relative; display: grid; align-self: center; place-items: center; width: min(100%, 370px); aspect-ratio: 1.36; margin-block: auto 0; }
.signal-grid { position: absolute; inset: -22% -14% -12%; background-image: linear-gradient(#ded2ff15 1px, transparent 1px), linear-gradient(90deg, #ded2ff15 1px, transparent 1px); background-size: 25px 25px; mask-image: radial-gradient(ellipse, #000 8%, transparent 69%); }
.signal-orbit { position: absolute; width: 95%; aspect-ratio: 1; border: 1px solid #c7b9ff47; border-radius: 50%; transform: rotateX(53deg) rotate(-19deg); }
.orbit-mid { width: 76%; border-color: #c7b9ff70; box-shadow: 0 0 28px #8a70ff35, inset 0 0 18px #9d7cff38; }
.orbit-inner { width: 55%; border-color: #ece0ff80; }
.signal-core {
  position: relative; display: grid; place-items: center; width: 106px; height: 106px; border-radius: 31px;
  color: #f6f1ff; background: linear-gradient(150deg, #c1a8ff 0%, #8d72ee 48%, #6552bb 100%);
  border: 1px solid #e3ceffac; transform: rotate(-12deg); box-shadow: inset 0 2px 2px #ffffff80, 0 11px 0 -4px #46367f, 0 23px 37px #20113d9c, 0 0 56px #b389ff80;
}
.signal-core svg { width: 61px; height: 61px; transform: rotate(12deg); stroke-width: 1.9; }
.signal-node { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #b59ced75; border-radius: 16px; background: linear-gradient(150deg, #625394, #352d5a); color: #decfff; box-shadow: 0 8px 24px #21173877, inset 0 1px 0 #ffffff33; }
.node-device { left: 9%; top: 40%; transform: rotate(-9deg); }
.node-clock { right: 9%; top: 61%; transform: rotate(12deg); }
.signal-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #e7daff; box-shadow: 0 0 12px 3px #bd9bff80; }
.dot-one { left: 33%; top: 30%; }
.dot-two { right: 16%; top: 31%; }
.dot-three { bottom: 20%; left: 30%; }

.auth-panel { display: flex; flex-direction: column; justify-content: center; align-self: stretch; padding: 43px clamp(30px, 4.8vw, 63px); }
.auth-heading { margin-bottom: 27px; }
.auth-heading h1 { margin-top: 14px; font-size: clamp(25px, 2.8vw, 33px); line-height: 1.2; letter-spacing: -.04em; }
.section-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; color: var(--accent); background: #2c2545; border: 1px solid #4a3b66; border-radius: 11px; }
.section-icon svg { width: 18px; height: 18px; }
.auth-heading .section-icon { width: 42px; height: 42px; }
.auth-panel form { display: grid; gap: 16px; }
.auth-panel input { min-height: 49px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 50px; }
.password-wrap input::-ms-reveal { display: none; }
.password-toggle { position: absolute; inset: 3px 3px 3px auto; display: grid; width: 43px; place-items: center; padding: 0; background: transparent; color: var(--muted); border: 0; border-radius: 8px; }
.password-toggle:hover { color: var(--accent); background: #211d34; }
.form-error { font-size: 13px; color: var(--danger); background: #352332; border: 1px solid #613950; border-radius: 10px; padding: 8px 11px; }
.login-btn { min-height: 49px; margin-top: 4px; }
.login-btn svg { width: 19px; height: 19px; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.auth-switch .text-btn { min-height: 44px; }

.app { display: none; }
.app.show { display: block; }
.topbar { background: #151623e8; border-bottom: 1px solid #2a2b3e; }
.topbar-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-nav { display: flex; gap: 7px; align-items: center; }
.nav-btn { color: var(--muted); background: transparent; padding-inline: 12px; font-size: 13px; }
.nav-btn:hover { color: var(--text); background: #27283d; border-color: #3a3c55; }
.nav-btn svg { color: var(--accent); }
.workspace { padding-block: 36px 56px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.workspace-heading h1 { font-size: clamp(25px, 3.8vw, 35px); line-height: 1.2; letter-spacing: -.045em; }
.setup-jump { color: var(--muted); font-size: 13px; white-space: nowrap; }
.chevron { width: 14px; height: 14px; color: var(--soft); transition: transform .17s; }
.dashboard {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
  grid-template-areas: "control status" "control setup" "cloud details"; align-items: start; gap: 16px;
}
.surface { min-width: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: inset 0 1px 0 #ffffff06; }
.section-heading { display: flex; align-items: center; gap: 11px; min-width: 0; font-weight: 620; }
.section-heading h2 { font-size: 16px; line-height: 1.3; font-weight: 640; }
.control-card {
  grid-area: control; align-self: stretch; display: flex; flex-direction: column;
  padding: 25px 27px;
  background: radial-gradient(ellipse at 4% 0%, #302746 0%, transparent 66%), var(--surface);
  border-color: #413755;
}
.duration-heading { display: grid; margin-top: 24px; gap: 4px; color: var(--muted); font-size: 13px; }
.duration { display: flex; align-items: baseline; gap: 9px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.03; }
.duration span { font-size: clamp(51px, 6vw, 70px); letter-spacing: -.07em; font-weight: 650; }
.duration small { color: var(--accent); font-size: 17px; font-weight: 550; }
.slider-shell { position: relative; height: 64px; margin-top: 10px; --fill: 28px; }
.slider-track { position: absolute; inset: 11px 0; height: 42px; border-radius: 24px; overflow: hidden; background: #34364c; box-shadow: inset 0 0 0 1px #fff1; }
.track-stops { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; pointer-events: none; }
.track-stops i { width: 5px; height: 5px; border-radius: 50%; background: #fff6; }
.slider-fill { position: absolute; inset: 0 auto 0 0; width: var(--fill); overflow: hidden; border-radius: inherit; background: #487ff3; }
.slider-fill::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(103deg, #6470f4 0%, #ab87ff 47%, #9964ee 100%); opacity: 0; transition: opacity .2s ease; }
.slider-shell[data-stage=gradient] .slider-fill::before, .slider-shell[data-stage=particles] .slider-fill::before { opacity: 1; }
.slider-shell[data-stage=particles] .track-stops { opacity: 0; }
.slider-shell:not([data-stage=particles]) :is(#particleCanvas, .slider-sheen) { visibility: hidden; }
#particleCanvas { position: absolute; inset: 0 auto auto 0; height: 42px; pointer-events: none; }
.slider-sheen { position: absolute; inset: -60% auto -60% -40%; width: 28%; transform: rotate(22deg); background: linear-gradient(90deg, transparent, #fff2, transparent); animation: sheen 3.8s linear infinite; animation-play-state: paused; }
.slider-shell[data-stage=particles] .slider-sheen { animation-play-state: running; }
input[type=range] { position: absolute; inset: 0; width: 100%; height: 64px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 32px; }
input[type=range]::-webkit-slider-runnable-track { height: 42px; background: transparent; border: 0; }
input[type=range]::-moz-range-track { height: 42px; background: transparent; border: 0; }
input[type=range]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 56px; height: 56px; margin-top: -7px; background: #fbfaff; border: 1px solid #fff; border-radius: 50%; box-shadow: 0 4px 12px #20143e5c; }
input[type=range]::-moz-range-thumb { width: 56px; height: 56px; background: #fbfaff; border: 0; border-radius: 50%; box-shadow: 0 4px 12px #20143e5c; }
input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 5px #d6c9ff39, 0 4px 13px #20143e5c; }
.slider-labels { display: flex; justify-content: space-between; color: var(--soft); font-size: 12px; }
.presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin-top: 16px; }
.preset { min-height: 42px; padding: 6px 1px; border: 1px solid #37394e; border-radius: 10px; color: var(--muted); background: #232538; font-size: 13px; white-space: nowrap; }
.preset:hover { color: var(--text); border-color: #766695; }
.preset.active { color: #e1d4ff; border-color: #8669bd; background: #453561; }
.actions { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 9px; margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.actions button { min-height: 48px; }
.command-feedback { grid-column: 1 / -1; color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.command-feedback:empty { display: none; }
.control-note { display: flex; gap: 7px; align-items: center; padding-top: 14px; color: var(--soft); font-size: 12px; }
.control-note svg { width: 15px; height: 15px; color: var(--accent); }
.limit-warning { color: #f2bf7e; }
.v3-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.v3-actions button { min-height: 44px; border: 1px solid #504160; border-radius: 10px; background: #312742; }
.v3-actions button:first-child { grid-column: 1 / -1; color: var(--accent); }
.v3-actions button:disabled { opacity: .55; }

.status { grid-area: status; padding: 21px; }
.status-row { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-top: 17px; }
.device-identity { min-width: 0; overflow-wrap: anywhere; }
.device-identity strong { display: block; font-size: 15px; font-weight: 625; }
.device-identity small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.device-identity small:empty { display: none; }
.status-indicator { display: flex; flex-shrink: 0; align-items: center; gap: 7px; max-width: 51%; padding: 5px 9px; border-radius: 18px; color: var(--offline); background: #2a2d40; font-size: 12px; font-weight: 600; }
.dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status[data-tone=online] .status-indicator { color: var(--online); background: #17372f; }
.status[data-tone=error] .status-indicator { color: var(--danger); background: #402738; }
.status[data-tone=pending] .status-indicator { color: var(--accent); background: #35294e; }
.status[data-tone=pending] .dot { animation: pulse 1.5s ease-in-out infinite; }
.status-detail, .status-foot, .status-next { margin-top: 10px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.status-detail:empty, .status-next:empty, #operationMeta:empty { display: none; }
.status-foot { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; color: var(--soft); font-variant-numeric: tabular-nums; }
.status-next { border-radius: 9px; border: 1px solid #51436e; background: #302741; padding: 7px 10px; color: var(--accent); }
.countdown { display: none; margin-top: 13px; }
.countdown.show { display: block; }
.countdown-head { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; color: var(--muted); font-size: 12px; }
.countdown-num { color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.bar { height: 6px; margin-top: 6px; overflow: hidden; border-radius: 9px; background: #323449; }
.bar-fill { width: 0; height: 100%; border-radius: inherit; background: var(--gradient); transition: width .24s linear; }

.setup-card { grid-area: setup; padding: 21px; }
.setup-hint { margin: 11px 0 13px; color: var(--muted); font-size: 13px; }
.setup-download { width: 100%; justify-content: space-between; text-align: left; color: var(--accent); }
.setup-bind { margin-top: 14px; }
.input-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.input-actions .primary { padding-inline: 11px; white-space: nowrap; }
.input-actions input { font-size: 13px; padding-inline: 10px; }
.setup-bind .field-result { margin-top: 8px; }

#cloudPanel { grid-area: cloud; }
.detail-stack { grid-area: details; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 60px; text-align: left; background: transparent; border: 0; border-radius: inherit; padding: 12px 16px; }
.panel-head:hover { background: #ffffff08; }
.panel-head .section-icon { width: 32px; height: 32px; flex-basis: 32px; }
.panel.open .chevron { transform: rotate(90deg); }
.panel-body { display: none; padding: 3px 17px 17px; }
.panel.open .panel-body { display: block; }
.cloud-summary { margin-bottom: 13px; color: var(--accent); font-size: 13px; }
.cloud-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.cloud-hint { margin-top: 10px; color: var(--muted); font-size: 12px; }
.cloud-hint.limit-warning { color: #f2bf7e; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button-row > button { flex: 1 1 auto; }
.panel-body .button-row { margin-top: 12px; }
.kv { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); padding-top: 5px; gap: 7px 12px; font-size: 12px; overflow-wrap: anywhere; }
.kv .k, .dim, .empty { color: var(--soft); }
.log { max-height: 280px; overflow: auto; background: var(--surface-deep); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--muted); font: 12px/1.65 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .warn { color: #efbf7c; }
.log .err { color: var(--danger); }

.modal { position: fixed; z-index: 10; inset: 0; display: none; align-items: center; justify-content: center; padding: 22px; background: #090a14b8; backdrop-filter: blur(7px); }
.modal.show { display: flex; animation: appear .17s ease-out; }
body:has(.modal.show) { overflow: hidden; }
.card { width: min(100%, 480px); max-height: calc(100dvh - 44px); overflow: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid #41435c; border-radius: 20px; box-shadow: 0 25px 60px #060610a8; }
.modal-heading { padding: 15px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-heading h2 { font-size: 18px; line-height: 1.3; font-weight: 660; }
.modal-content { display: grid; gap: 13px; padding: 17px 20px 20px; }
.modal-divider { height: 1px; background: var(--line); }
.device-list { display: grid; max-height: 206px; overflow: auto; gap: 6px; }
.device-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 9px 11px; background: #232537; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-align: left; font-size: 13px; overflow-wrap: anywhere; }
.device-item:not(.empty):hover, .device-item.active { border-color: #8e71c5; background: #3c3055; }
.device-item.empty { color: var(--muted); }
.device-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.device-item .dim { flex: 0 0 auto; }
.logout { justify-self: start; color: var(--danger); }
.account-summary { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #222436; overflow-wrap: anywhere; }
.account-summary p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.form-stack { display: grid; gap: 11px; }
#codeOutput { font-family: Consolas, monospace; }

.support-card { width: min(100%, 594px); }
#supportMessages {
  display: flex; flex-direction: column; gap: 10px; min-height: min(190px, 27dvh); max-height: 38dvh; overflow: auto; overscroll-behavior: contain;
  padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-deep); scrollbar-width: thin; scrollbar-color: #4e4468 transparent;
}
.support-empty { margin: auto; color: var(--soft); font-size: 13px; text-align: center; }
#supportMessages article { align-self: start; max-width: min(88%, 39ch); border: 1px solid #3a3d55; border-radius: 11px 11px 11px 3px; background: #25273b; padding: 8px 10px; }
#supportMessages article.mine { align-self: end; border-color: #5b4c82; border-radius: 11px 11px 3px 11px; background: #3a2d59; }
#supportMessages article small { display: block; color: #d0c3f2; font-size: 11px; }
#supportMessages article p { margin-top: 3px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
#supportMessage { resize: vertical; min-height: 68px; max-height: 28dvh; }
.compose-actions { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 9px; }
.compose-actions .primary { margin-left: auto; flex-shrink: 0; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 28px); padding: 10px 16px; border: 1px solid #6b568b; border-radius: 12px; background: #302541; color: var(--text); box-shadow: 0 8px 25px #0006; text-align: center; opacity: 0; transform: translate(-50%, 7px); pointer-events: none; transition: transform .2s, opacity .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheen { to { left: 130%; } }
@keyframes pulse { 50% { opacity: .4; } }
@media (max-width: 850px) {
  .frame { width: calc(100% - 40px); }
  .auth-feature { padding-inline: 27px; }
  .dashboard { grid-template-columns: minmax(0, 1fr) minmax(284px, .86fr); }
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .frame { width: calc(100% - 28px); }
  .login { padding: 18px 14px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); width: min(440px, 100%); min-height: 0; border-radius: 23px; }
  .auth-feature { padding: 20px 22px 17px; min-height: 106px; border-right: 0; border-bottom: 1px solid #443c5c; }
  .feature-copy { margin-top: 9px; }
  .feature-copy h2 { color: #dcd1f8; font-size: 14px; letter-spacing: 0; font-weight: 550; }
  .feature-copy p { display: none; }
  .signal-art { position: absolute; inset: 4px -3px auto auto; width: 145px; margin: 0; pointer-events: none; }
  .signal-core { width: 50px; height: 50px; border-radius: 14px; }
  .signal-core svg { width: 30px; height: 30px; stroke-width: 2.15; }
  .signal-node { display: none; }
  .signal-dot { width: 3px; height: 3px; }
  .auth-panel { padding: 24px 22px 14px; }
  .auth-heading { margin-bottom: 20px; }
  .auth-heading .section-icon { display: none; }
  .auth-heading h1 { margin: 0; }
  .auth-panel form { gap: 13px; }
  .auth-switch { margin-top: 16px; padding-top: 7px; }
  input:not([type=range]), select, textarea, .input-actions input { font-size: 16px; }
  .topbar-inner { flex-wrap: wrap; gap: 2px; padding-top: 9px; }
  .topbar .brand { font-size: 21px; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .topbar .brand-mark svg { width: 22px; height: 22px; }
  .top-nav { flex-basis: 100%; justify-content: space-between; gap: 3px; padding-block: 4px; }
  .nav-btn { padding-inline: 8px; gap: 5px; }
  .nav-btn svg { width: 15px; height: 15px; }
  .workspace { padding-block: 21px 30px; }
  .workspace-heading { margin-bottom: 13px; }
  .workspace-heading .setup-jump { gap: 5px; }
  .dashboard { grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "control" "setup" "cloud" "details"; gap: 11px; }
  .control-card, .status, .setup-card { padding: 16px; border-radius: 17px; }
  .duration-heading { margin-top: 16px; }
  .presets { margin-top: 11px; }
  .actions { margin-top: 14px; padding-top: 13px; }
  .control-note { padding-top: 10px; }
  .modal { align-items: flex-end; padding: 9px 9px max(9px, env(safe-area-inset-bottom)); }
  .card { max-height: calc(100dvh - 18px); border-radius: 18px; }
  .modal-heading { padding: 11px 14px; }
  .modal-content { padding: 13px 14px 16px; }
}
@media (max-width: 360px) {
  .input-actions { grid-template-columns: minmax(0, 1fr); }
  .nav-btn { font-size: 12px; }
  .workspace-heading .setup-jump .chevron { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
