:root {
  color-scheme: dark;
  --bg: #111513;
  --surface: #181d1a;
  --surface-2: #202620;
  --surface-3: #292f29;
  --text: #f2f4ef;
  --muted: #a5afa7;
  --line: #343c35;
  --accent: #48c6a3;
  --accent-strong: #1c8f73;
  --blue: #69a9e8;
  --ok: #67cf83;
  --warn: #e2b85f;
  --danger: #ef7770;
  --danger-bg: #3b2020;
  --radius: 7px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, monospace; }

.app-shell { width: min(1180px, 100%); max-width: 100%; min-height: 100vh; margin: 0 auto; overflow-x: clip; }
.topbar { min-height: 64px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand span, .login-brand span { font-size: 20px; font-weight: 800; }
.brand small, .login-brand small { color: var(--muted); font-size: 12px; }
.primary-nav { min-height: 50px; display: flex; gap: 4px; align-items: stretch; padding: 0 18px; border-bottom: 1px solid var(--line); }
.primary-nav a { min-width: 92px; padding: 15px 14px 11px; color: var(--muted); text-align: center; border-bottom: 3px solid transparent; }
.primary-nav a:hover, .primary-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.primary-nav .nav-icon { display: none; }
.nav-icon { width: 22px !important; height: 22px !important; max-width: 22px; max-height: 22px; flex: 0 0 22px; overflow: visible; }
.bottom-nav { display: none; }
main { width: 100%; max-width: 100%; min-width: 0; padding: 26px 22px 56px; }
main > * { max-width: 100%; min-width: 0; }
main { transition: opacity .14s ease; }
body.is-navigating main { opacity: .58; pointer-events: none; }
.navigation-progress { position: fixed; z-index: 40; top: 0; right: 100%; left: 0; height: 3px; background: var(--accent); opacity: 0; transition: right .18s ease, opacity .12s ease; }
body.is-navigating .navigation-progress { right: 22%; opacity: 1; animation: navigation-pulse 1s ease-in-out infinite alternate; }
.navigation-error { position: fixed; z-index: 45; top: 12px; left: 50%; width: min(520px, calc(100% - 24px)); padding: 9px 10px 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #82413d; border-radius: var(--radius); background: #3a1d1b; box-shadow: 0 10px 28px #0008; transform: translateX(-50%); }
.navigation-error span { overflow-wrap: anywhere; }
@keyframes navigation-pulse { from { filter: brightness(.8); } to { filter: brightness(1.35); } }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 26px; line-height: 1.2; }
h2 { margin-bottom: 4px; font-size: 17px; line-height: 1.3; }
p { color: var(--muted); }

.page-header { max-width: 100%; display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.page-header > div:first-child { min-width: 0; }
.page-header h1 { overflow-wrap: anywhere; }
.page-header p { margin: 0; }
.header-actions { min-width: 0; max-width: 50%; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.header-actions > * { max-width: 100%; }
.button { min-height: 42px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface-2); cursor: pointer; font-weight: 650; }
.button:hover { border-color: var(--accent); }
.button.primary { color: #07120e; border-color: var(--accent); background: var(--accent); }
.button.secondary { border-color: #43665b; background: #1f332c; }
.button.warning { color: #171105; border-color: var(--warn); background: var(--warn); }
.button.danger { border-color: #9d4a46; background: #742e2b; }
.button.ghost { background: transparent; }
.button.compact { min-height: 36px; padding: 7px 10px; font-size: 13px; }
.icon-button { width: 42px; height: 42px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 28px; cursor: pointer; }
form { margin: 0; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #0d110f; outline: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #48c6a32b; }

.notice { margin-bottom: 18px; padding: 12px 14px; display: flex; gap: 10px; align-items: baseline; border-left: 3px solid; background: var(--surface); }
.notice strong { flex: 0 0 auto; }
.notice.success { border-color: var(--ok); }
.notice.error { border-color: var(--danger); }
.notice span { overflow-wrap: anywhere; }
.inline-error { margin: 12px 0 0; color: var(--danger); }

.health-strip, .monitor-strip, .summary-band { min-height: 52px; margin-bottom: 16px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.health-strip > div, .monitor-strip > div { display: flex; align-items: center; gap: 10px; }
.health-strip > span, .monitor-strip small { color: var(--muted); }
.health-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px #ef777022; }
.health-strip.healthy .health-dot { background: var(--ok); box-shadow: 0 0 0 4px #67cf8322; }

.metric-grid { width: 100%; min-width: 0; margin-bottom: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.metric { min-width: 0; min-height: 88px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { max-width: 100%; overflow-wrap: anywhere; font-size: 19px; line-height: 1.15; }
.metric.ok strong { color: var(--ok); }
.metric.warn strong { color: var(--warn); }
.metric.bad strong { color: var(--danger); }
.compact-grid .metric { min-height: 76px; }

.split-layout { margin-bottom: 22px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 18px; }
.section-block, .list-section, .result-block, .confirm-panel { width: 100%; min-width: 0; margin-bottom: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.section-block { padding: 16px; }
.section-title { min-height: 44px; margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title p { margin: 0; font-size: 13px; }
.section-title > a { color: var(--accent); font-size: 13px; }
.location-list { display: grid; }
.location, .switch-row { min-height: 62px; padding: 10px 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.location:first-child, .switch-row:first-of-type { border-top: 0; }
.location > div, .switch-row > div { min-width: 0; display: grid; gap: 2px; }
.location span, .switch-row span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.badge { min-height: 26px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); border-color: #315e3c; }
.badge.warn { color: var(--warn); border-color: #6b5830; }
.badge.bad { color: var(--danger); border-color: #6c3734; }
.facts { margin: 0; display: grid; }
.facts > div { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 9px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 600; }
td code { color: #b8d6f2; }

.toolbar { margin-bottom: 12px; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.tabs, .chip-group { width: 100%; max-width: 100%; min-width: 0; margin-bottom: 14px; display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs a, .chip { min-height: 38px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface); white-space: nowrap; }
.tabs a.active, .chip.active { color: var(--text); border-color: var(--accent-strong); background: #1b352d; }
.tabs span { min-width: 20px; padding: 1px 5px; border-radius: 10px; text-align: center; color: var(--text); background: var(--surface-3); font-size: 11px; }
.list-header { min-height: 42px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.list-header b { color: inherit; }
.user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-user-swipe] { touch-action: pan-y; overscroll-behavior-x: contain; }
.list-section.swipe-next { animation: swipe-next .18s ease-out; }
.list-section.swipe-previous { animation: swipe-previous .18s ease-out; }
@keyframes swipe-next { from { opacity: .55; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes swipe-previous { from { opacity: .55; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }
.user-row { min-height: 72px; padding: 12px 14px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.user-row:nth-child(odd) { border-right: 1px solid var(--line); }
.user-row:hover { background: var(--surface-2); }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #416457; border-radius: 50%; color: var(--accent); background: #1c2a25; font-size: 12px; font-weight: 800; }
.user-main { min-width: 0; display: grid; gap: 2px; }
.user-main strong { overflow: hidden; text-overflow: ellipsis; }
.user-main span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.empty { margin: 0; padding: 24px 14px; color: var(--muted); text-align: center; }
.user-list > .empty { grid-column: 1 / -1; }
.empty.good { color: var(--ok); }

dialog { width: min(440px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--surface); }
dialog::backdrop { background: #050705d6; }
.dialog-form { padding: 18px; display: grid; gap: 15px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; }

.traffic-lines { min-height: 82px; margin: 0 0 14px; padding: 12px 14px; list-style: none; border: 1px solid var(--line); background: #101411; }
.traffic-lines li { margin-bottom: 5px; }
.action-stack, .stack-form { display: grid; gap: 10px; }
.inline-form { max-width: 100%; min-width: 0; display: flex; gap: 8px; align-items: flex-end; }
.inline-form label { flex: 1; }
.copy-row { min-height: 70px; padding: 11px 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.copy-row:first-of-type { border-top: 0; }
.copy-row > div { min-width: 0; display: grid; gap: 4px; }
.copy-row code { display: block; max-width: 720px; overflow: hidden; color: #b8d6f2; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.hint { margin: 0 0 8px; font-size: 13px; }
.toggle { width: 48px; height: 28px; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-3); cursor: pointer; }
.toggle span { width: 20px; height: 20px; display: block; border-radius: 50%; background: var(--muted); transition: transform .16s ease, background .16s ease; }
.toggle.on { border-color: var(--accent-strong); background: #183e32; }
.toggle.on span { transform: translateX(18px); background: var(--accent); }

.summary-band { flex-wrap: wrap; justify-content: flex-start; color: var(--muted); }
.summary-band span { margin-right: 12px; }
.traffic-list { display: grid; }
.traffic-row { min-height: 84px; padding: 12px 14px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); }
.traffic-row:hover { background: var(--surface-2); }
.rank { color: var(--muted); font-weight: 700; }
.traffic-main { display: grid; gap: 6px; }
.traffic-main > div { display: flex; justify-content: space-between; gap: 12px; }
.traffic-main small { color: var(--muted); }
.bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.bar i { height: 100%; display: block; background: var(--accent); }
.bar i.w0 { width: 0; }
.bar i.w10 { width: 10%; }
.bar i.w20 { width: 20%; }
.bar i.w30 { width: 30%; }
.bar i.w40 { width: 40%; }
.bar i.w50 { width: 50%; }
.bar i.w60 { width: 60%; }
.bar i.w70 { width: 70%; }
.bar i.w80 { width: 80%; }
.bar i.w90 { width: 90%; }
.bar i.w100 { width: 100%; }

.connection-list { display: grid; gap: 8px; }
.connection-row { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.connection-row summary { min-height: 64px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.connection-row summary::-webkit-details-marker { display: none; }
.connection-row summary > div { display: grid; gap: 2px; }
.connection-row summary span { color: var(--muted); font-size: 12px; }
.connection-details { padding: 0 13px 13px; display: grid; border-top: 1px solid var(--line); }
.connection-details > div { min-height: 46px; padding: 7px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.connection-details > div:last-child { border-bottom: 0; }
.connection-details > div > span { color: var(--muted); }
.ip-list { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.ip-list code { padding: 3px 6px; border-radius: 4px; background: var(--surface-3); }

.funnel-row { padding: 10px 0; border-top: 1px solid var(--line); }
.funnel-row > div:first-child, .revenue-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.funnel-row small { color: var(--muted); }
.revenue-list > div { min-height: 46px; border-top: 1px solid var(--line); }
.revenue-list span { color: var(--muted); }

.diagnostic-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.diagnostic-action { min-height: 118px; padding: 15px; display: flex; gap: 15px; align-items: flex-end; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.diagnostic-action > div { display: grid; gap: 5px; }
.diagnostic-action span { color: var(--muted); font-size: 13px; }
.diagnostic-progress { margin-bottom: 18px; padding: 15px; border: 1px solid #43665b; border-radius: var(--radius); background: var(--surface); }
.diagnostic-progress.failed { border-color: #82413d; }
.diagnostic-progress.failed .progress-spinner { animation: none; border-color: var(--danger); }
.diagnostic-progress.failed .progress-track i { animation: none; width: 100%; transform: none; background: var(--danger); }
.diagnostic-progress-head { display: flex; align-items: center; gap: 12px; }
.diagnostic-progress-head > div { min-width: 0; display: grid; gap: 2px; }
.diagnostic-progress-head span { color: var(--muted); font-size: 12px; }
.progress-spinner { width: 24px; height: 24px; flex: 0 0 24px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: progress-spin .8s linear infinite; }
.progress-track { height: 4px; margin: 13px 0 10px; overflow: hidden; border-radius: 2px; background: var(--surface-3); }
.progress-track i { width: 36%; height: 100%; display: block; background: var(--accent); animation: progress-slide 1.35s ease-in-out infinite; }
.diagnostic-progress p { margin: 0; font-size: 13px; }
.bot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bot-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bot-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bot-card-head h2, .bot-card-head p { margin: 0; }
.bot-card-head p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.bot-health-grid { margin: 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.bot-health-grid > div { min-width: 0; min-height: 92px; padding: 11px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bot-health-grid span, .bot-health-grid small, .bot-job span { color: var(--muted); font-size: 11px; }
.bot-health-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.bot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bot-actions form { flex: 1 1 150px; }
.bot-actions .button { width: 100%; }
.bot-job { margin-top: 13px; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-left: 3px solid var(--warn); background: var(--surface-2); }
.bot-job.success { border-color: var(--ok); }
.bot-job.failed { border-color: var(--danger); }
.bot-job > div { min-width: 0; display: grid; gap: 3px; }
@keyframes progress-spin { to { transform: rotate(360deg); } }
@keyframes progress-slide { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
.result-head { min-height: 64px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-head p { margin: 0; font-size: 13px; }
pre { max-height: 62vh; margin: 0; padding: 15px; overflow: auto; border-top: 1px solid var(--line); color: #d8e3da; background: #0b0e0c; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.danger-zone { border-color: #633734; }
.button-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.button-grid form { flex: 1 1 190px; }
.button-grid button { width: 100%; }
.predeploy-form { max-width: 620px; }
.predeploy-result { margin-top: 14px; padding: 14px; display: grid; gap: 10px; border-left: 3px solid; background: var(--surface-2); }
.predeploy-result.success { border-color: var(--ok); }
.predeploy-result.error { border-color: var(--danger); }
.predeploy-result span { color: var(--muted); }
.confirm-panel { min-height: 280px; padding: 24px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; align-content: center; }
.confirm-mark { width: 52px; height: 52px; display: grid; place-items: center; border: 2px solid var(--danger); border-radius: 50%; color: var(--danger); font-size: 27px; font-weight: 800; }
.confirm-panel p { margin-bottom: 0; }
.confirm-actions { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.message-preview { max-height: 160px; margin: 14px 0 0; padding: 12px; overflow: auto; border-left: 3px solid var(--line); color: var(--text); background: #101411; white-space: pre-wrap; }

.login-page { display: grid; place-items: center; padding: 20px; }
.login-shell { width: min(390px, 100%); padding: 24px; border-top: 3px solid var(--accent); background: var(--surface); }
.login-brand { margin-bottom: 24px; display: flex; align-items: baseline; gap: 8px; }
.login-form { display: grid; gap: 15px; }

.clipboard-fallback { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

[hidden] { display: none !important; }
button[disabled] { opacity: .6; cursor: wait; }

@media (max-width: 760px) {
  .app-shell { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 56px; padding: 0 14px; }
  .primary-nav { display: none; }
  .bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; width: 100%; max-width: 100vw; height: calc(62px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border-top: 1px solid var(--line); background: #151a17f5; backdrop-filter: blur(12px); }
  .bottom-nav a { min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; border-top: 3px solid transparent; }
  .bottom-nav a.active { color: var(--text); border-top-color: var(--accent); }
  .bottom-nav .nav-icon { width: 21px; height: 21px; }
  .bottom-nav .nav-label { max-width: 100%; overflow: hidden; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: 18px 12px 26px; }
  h1 { font-size: 22px; }
  .page-header { align-items: center; }
  .page-header p { font-size: 13px; }
  .health-strip { align-items: flex-start; }
  .health-strip > span { font-size: 11px; white-space: nowrap; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 78px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n + 2) { border-bottom: 0; }
  .metric strong { font-size: 17px; }
  .split-layout { grid-template-columns: 1fr; gap: 0; }
  .user-list { grid-template-columns: 1fr; }
  .user-row:nth-child(odd) { border-right: 0; }
  .user-row { min-height: 68px; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .avatar { width: 38px; height: 38px; }
  .diagnostic-grid { grid-template-columns: 1fr; }
  .bot-grid { grid-template-columns: 1fr; }
  .diagnostic-action { min-height: 104px; }
  .copy-row { align-items: flex-start; }
  .copy-row code { max-width: calc(100vw - 150px); }
  .inline-form { align-items: stretch; flex-direction: column; }
  .predeploy-form { max-width: none; }
}

@media (max-width: 430px) {
  .page-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: flex-start; gap: 10px; }
  .header-actions { max-width: 42vw; }
  .header-actions .button { min-height: 38px; padding: 7px 9px; font-size: 12px; }
  .search { grid-template-columns: 1fr; }
  .search .button { width: 100%; }
  .chip-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .chip-group .chip { min-width: 0; justify-content: center; text-align: center; white-space: normal; }
  .user-row .badge { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
  .diagnostic-action { align-items: stretch; flex-direction: column; }
  .diagnostic-action .button { width: 100%; }
  .confirm-panel { padding: 20px 15px; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  .confirm-mark { width: 42px; height: 42px; }
  .confirm-actions { grid-column: 1 / -1; }
  .confirm-actions > *, .confirm-actions .button { flex: 1; }
  .monitor-strip { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-spinner, .progress-track i, .list-section.swipe-next, .list-section.swipe-previous { animation: none; }
}

.speed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.speed-card { padding: 24px; border: 1px solid var(--line, #344039); border-radius: 20px; }
.speed-card p { line-height: 1.6; }
.speed-result { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 20px; line-height: 1.8; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .speed-grid { grid-template-columns: 1fr; } .speed-card { padding: 20px; } }

.speed-options { display: grid; gap: 12px; margin: 16px 0; }
.speed-options label { display: grid; gap: 6px; }
