:root {
  color-scheme: dark;
  --bg: #080c12;
  --surface: #0e151e;
  --surface-2: #111b26;
  --line: rgba(160, 187, 210, .13);
  --line-strong: rgba(160, 187, 210, .24);
  --text: #ecf5f5;
  --muted: #71818e;
  --cyan: #66f5e3;
  --cyan-dim: #2fb3aa;
  --red: #ff5b61;
  --yellow: #ffd24d;
  --blue: #5b8dff;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 48% -15%, #18303a 0, transparent 31%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }

.topbar { height: 82px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(8, 12, 18, .78); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 16px; letter-spacing: .22em; }
.brand small, .connection small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: .22em; }
.brand-mark { width: 38px; height: 38px; position: relative; display: grid; place-items: center; transform: rotate(30deg); }
.brand-mark i { position: absolute; width: 11px; height: 28px; border: 2px solid var(--cyan); border-radius: 60%; }
.brand-mark i:nth-child(2) { transform: rotate(60deg); }
.brand-mark i:nth-child(3) { transform: rotate(120deg); }
.connection { display: flex; gap: 10px; align-items: center; text-align: right; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.tools-trigger { padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(102,245,227,.045); color: #8aa19f; font: 700 8px monospace; letter-spacing: .1em; cursor: pointer; }
.tools-trigger span { margin-right: 5px; color: var(--cyan); }.tools-trigger b { color: var(--text); }
.connection strong { font-size: 12px; font-weight: 600; color: var(--cyan); }
.signal { display: flex; align-items: flex-end; gap: 2px; height: 15px; }
.signal i { width: 3px; height: 5px; background: var(--cyan); border-radius: 2px; animation: signal 1.2s infinite alternate; }
.signal i:nth-child(2) { height: 9px; animation-delay: .2s; }.signal i:nth-child(3) { height: 14px; animation-delay: .4s; }
@keyframes signal { to { opacity: .3; } }

main { padding: 40px clamp(20px, 4vw, 64px) 60px; max-width: 1800px; margin: auto; }
.hero { display: flex; justify-content: space-between; align-items: end; margin: 0 0 28px; }
.eyebrow, .map-kicker, .panel-heading > span, .panel-heading > div > span { margin: 0 0 10px; color: var(--cyan-dim); font: 700 9px/1 monospace; letter-spacing: .24em; }
.hero h1 { margin: 0; font-size: clamp(32px, 4vw, 55px); font-weight: 300; letter-spacing: -.04em; }
.hero h1 em { color: var(--cyan); font-style: normal; font-weight: 600; }
.hero-copy { color: #8b9aa5; margin: 10px 0 0; font-size: 13px; letter-spacing: .04em; }
.live-chip { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--cyan); font: 700 9px monospace; letter-spacing: .14em; }
.live-chip span { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.live-chip b { margin-left: 9px; color: var(--muted); font-weight: 500; }

.workspace { display: grid; grid-template-columns: 270px minmax(500px, 1fr) 270px; gap: 16px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17, 27, 38, .95), rgba(10, 16, 24, .95)); box-shadow: 0 25px 80px rgba(0,0,0,.16); }
.controls-panel { padding: 25px; }
.panel-heading { margin-bottom: 26px; }
.panel-heading h2, .map-toolbar h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.panel-heading.row { display: flex; justify-content: space-between; align-items: center; }
.field-group { margin: 0 0 25px; }
.field-group > label, .label-row label { color: #8998a3; font-size: 11px; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.label-row output { color: var(--cyan); font-size: 11px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.segmented button { padding: 10px 4px; border: 1px solid var(--line); background: #0a1119; border-radius: 7px; color: #71808c; font-size: 10px; cursor: pointer; transition: .2s ease; }
.segmented button.active { color: var(--text); border-color: rgba(102,245,227,.4); background: rgba(102,245,227,.08); }
.segmented i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; }
.red-dot { background: var(--red); box-shadow: 0 0 7px var(--red); }.yellow-dot { background: var(--yellow); box-shadow: 0 0 7px var(--yellow); }.blue-dot { background: var(--blue); box-shadow: 0 0 7px var(--blue); }.mix-dot { background: linear-gradient(90deg,var(--red) 50%,var(--blue) 50%); }
.default-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.default-duration { width: 100%; margin: 0 0 10px; padding: 9px 11px; border: 1px solid rgba(102,245,227,.25); border-radius: 8px; outline: none; background: #0a1119; color: #b8cacd; font-size: 10px; }
.default-plans > button { min-height: 47px; padding: 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #0a1119; text-align: left; cursor: pointer; }
.default-plans > button:hover, .default-plans > button.active { border-color: rgba(102,245,227,.4); background: rgba(102,245,227,.07); }
.default-plans > button > i { width: 9px; height: 24px; border-radius: 6px; background: var(--plan-color, var(--cyan)); box-shadow: 0 0 9px var(--plan-color, var(--cyan)); }
.default-plans [data-mode="RED"] { --plan-color: var(--red); }.default-plans [data-mode="YELLOW"] { --plan-color: var(--yellow); }.default-plans [data-mode="BLUE"] { --plan-color: var(--blue); }
.default-plans [data-mode="RED_BLUE"] > i { background: linear-gradient(var(--blue) 0 50%, var(--red) 50%); box-shadow: 0 -3px 8px rgba(91,141,255,.65), 0 3px 8px rgba(255,91,97,.65); }
.default-plans b, .default-plans small { display: block; }.default-plans b { color: #bac8cd; font-size: 9px; }.default-plans small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.inline-refresh { border: 0; background: transparent; color: var(--cyan); font-size: 8px; cursor: pointer; }
.saved-plans { display: grid; gap: 6px; }
.saved-plans > span { padding: 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 8px; text-align: center; }
.saved-plans button { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #0a1119; cursor: pointer; text-align: left; }
.saved-plans button:hover { border-color: rgba(102,245,227,.4); background: rgba(102,245,227,.07); }
.saved-plans b,.saved-plans small { display: block; }.saved-plans b { max-width: 165px; overflow: hidden; color: #bac8cd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.saved-plans small { margin-top: 3px; color: var(--muted); font-size: 7px; }.saved-plans i { color: var(--cyan); font-size: 8px; font-style: normal; }
input[type="range"] { width: 100%; height: 3px; appearance: none; border-radius: 2px; outline: none; background: linear-gradient(90deg, var(--cyan) var(--fill,50%), #27323b var(--fill,50%)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; border: 3px solid var(--surface); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 12px rgba(102,245,227,.5); cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #4f5d68; font-size: 8px; }
.selection-mode { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.selection-mode button { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 1fr 1fr; text-align: left; column-gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #0a1119; cursor: pointer; }
.selection-mode button.active { border-color: rgba(102,245,227,.4); background: rgba(102,245,227,.07); }
.selection-mode span { grid-row: 1/3; align-self: center; width: 17px; height: 17px; }
.selection-mode b { font-size: 10px; font-weight: 600; }.selection-mode small { color: var(--muted); font-size: 7px; }
.point-icon { border: 1px solid var(--cyan); border-radius: 50%; box-shadow: inset 0 0 0 5px #0a1119; background: var(--cyan); }.region-icon { border: 1px dashed var(--cyan); transform: rotate(15deg); }.zone-icon { border: 1px solid var(--cyan); border-radius: 55% 55% 45% 45%; position: relative; }.zone-icon::after { content: ''; position: absolute; inset: 5px 3px; border-top: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); }
.zone-picker select { width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(102,245,227,.25); border-radius: 8px; outline: none; background: #0a1119; color: #b8cacd; font-size: 10px; }
.selection-summary { min-height: 72px; padding: 13px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.13); }
.selection-summary span, .selection-summary small { display: block; color: var(--muted); font-size: 8px; }.selection-summary strong { display: block; margin: 7px 0 4px; color: var(--cyan); font: 600 13px monospace; }
.primary-action { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border: 0; border-radius: 8px; background: var(--cyan); color: #071311; font-size: 11px; font-weight: 700; cursor: pointer; transition: .2s; }
.primary-action:disabled { background: #26333a; color: #617078; cursor: not-allowed; }.primary-action:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(102,245,227,.18); }
.clear-action { width: 100%; padding: 9px; border: 0; color: #657681; background: transparent; font-size: 9px; cursor: pointer; }

.map-panel { min-height: 690px; display: flex; flex-direction: column; overflow: hidden; }
.map-toolbar { padding: 22px 24px 15px; display: flex; align-items: center; justify-content: space-between; }
.map-kicker { display: block; margin-bottom: 8px; }
.map-tools, .legend { display: flex; align-items: center; gap: 14px; }
.legend { color: var(--muted); font-size: 8px; }.legend i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; }.legend .left { background: #4fbfb3; }.legend .right { background: #567c9d; }.legend .selected { background: var(--red); box-shadow: 0 0 7px var(--red); }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #0c141d; color: #85939d; cursor: pointer; }
.map-stage { flex: 1; min-height: 560px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 48%, rgba(63, 130, 130, .09), transparent 58%), repeating-linear-gradient(0deg, transparent 0 39px, rgba(102,245,227,.025) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(102,245,227,.025) 39px 40px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#ledMap { width: 100%; height: 100%; display: block; touch-action: none; }
.face-outline { fill: rgba(72, 134, 136, .025); stroke: rgba(102,245,227,.11); stroke-width: 3; stroke-dasharray: 4 9; }
.face-detail { fill: none; stroke: rgba(102,245,227,.08); stroke-width: 2; }
.axis { stroke: rgba(102,245,227,.13); stroke-width: 1; stroke-dasharray: 5 14; }
.led-node { cursor: pointer; transition: filter .2s; }.led-node .halo { fill: transparent; stroke: transparent; stroke-width: 12; }.led-node .core { fill: #386e6c; stroke: #77c8bf; stroke-width: 2; vector-effect: non-scaling-stroke; }.led-node.side-R .core { fill: #344e66; stroke: #6e95b7; }.led-node:hover .core { fill: var(--cyan); stroke: white; filter: drop-shadow(0 0 8px var(--cyan)); }.led-node.selected .core { fill: var(--red); stroke: #ffb2b5; filter: drop-shadow(0 0 10px var(--red)); }.led-node.preview .core { fill: #efbd5c; stroke: #ffe2a4; filter: drop-shadow(0 0 8px #efbd5c); }
.led-node.active-light .core { fill: var(--led-color); stroke: #fff; filter: drop-shadow(0 0 var(--led-glow, 12px) var(--led-color)); animation: led-pulse 1.35s ease-in-out infinite alternate; }
.led-node.active-light .halo { fill: var(--led-color); opacity: .12; stroke: var(--led-color); stroke-width: 4; }
.led-node.active-light.intensity-LOW { --led-glow: 7px; opacity: .72; }.led-node.active-light.intensity-MEDIUM { --led-glow: 12px; }.led-node.active-light.intensity-HIGH { --led-glow: 18px; }
.led-node.paused-light .core { fill: #7a858c; stroke: #a7b0b5; filter: none; animation: none; }.led-node.paused-light .halo { opacity: 0; }
@keyframes led-pulse { from { opacity: .72; } to { opacity: 1; } }
.region-path { fill: rgba(102,245,227,.08); stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; pointer-events: none; }
.region-point { fill: var(--cyan); stroke: #081113; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6,11,17,.75); color: #7b8c97; font-size: 9px; pointer-events: none; backdrop-filter: blur(10px); }
.map-hint span { color: var(--cyan); margin-right: 5px; }
.tooltip { display: none; position: fixed; z-index: 50; padding: 9px 11px; border: 1px solid rgba(102,245,227,.25); border-radius: 7px; background: rgba(7,13,19,.95); box-shadow: 0 12px 35px rgba(0,0,0,.35); pointer-events: none; }
.tooltip.visible { display: block; }.tooltip b { display: block; color: var(--cyan); font: 600 10px monospace; }.tooltip small { color: #71818e; font: 8px monospace; }
.map-footer { height: 40px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; color: #566671; font: 7px monospace; letter-spacing: .12em; }.map-footer b { color: #91a3ad; }

.side-stack { display: flex; flex-direction: column; gap: 16px; }
.status-panel, .chat-panel, .voice-panel, .activity-panel { padding: 22px; }
.status-orb { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }.status-orb.online { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.metrics { margin: 0; }.metrics div { min-height: 48px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }.metrics dt { color: #71818c; font-size: 9px; }.metrics dd { margin: 0; font-size: 10px; color: #b7c5cb; }.metrics dd b { color: var(--text); font: 500 20px monospace; }.metrics dd small { color: var(--muted); font-size: 8px; margin-left: 2px; }
.progress-wrap { margin-top: 14px; }.progress-wrap > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 8px; }.progress-wrap b { color: var(--cyan); }.progress { height: 3px; background: #253038; border-radius: 4px; overflow: hidden; }.progress i { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transition: width .5s; }
.time-row { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 8px; }.time-row b { color: #aebdc3; font: 500 8px monospace; }
.active-plan-view { margin-top: 12px; border: 1px solid var(--line); border-radius: 7px; background: #080f16; }.active-plan-view summary { padding: 9px 10px; color: var(--cyan); font-size: 8px; cursor: pointer; }.active-plan-view pre { max-height: 240px; margin: 0; padding: 10px; overflow: auto; border-top: 1px solid var(--line); color: #8db7b2; font: 8px/1.5 monospace; white-space: pre-wrap; }
.flow-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }.flow-actions button { padding: 8px 4px; border: 1px solid var(--line); border-radius: 7px; background: #0a1119; color: #97a7af; font-size: 8px; cursor: pointer; }.flow-actions button:disabled { opacity: .35; cursor: not-allowed; }.flow-actions button:last-child { border-color: rgba(255,91,97,.22); color: #e68488; }
.chat-panel .panel-heading { margin-bottom: 14px; }.chat-heading-actions { display: flex; align-items: center; gap: 8px; }.agent-status { max-width: 105px; overflow-wrap: anywhere; color: var(--yellow); font: 7px/1.4 monospace; text-align: right; }.chat-heading-actions button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #71818c; font-size: 8px; cursor: pointer; }.chat-heading-actions button:hover { border-color: rgba(255,91,97,.28); color: #ef8589; }
.chat-messages { height: 210px; padding: 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #080f16; scrollbar-width: thin; }.chat-empty { margin: 78px 0 0; color: #52616b; font-size: 8px; text-align: center; }
.chat-message { width: fit-content; max-width: 88%; margin: 0 0 8px; padding: 8px 9px; border-radius: 7px; background: #15232d; color: #b8c8cc; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }.chat-message.user { margin-left: auto; background: rgba(102,245,227,.12); color: #c9f1ec; }.chat-message.auto::before { content: 'AUTO'; display: block; margin-bottom: 3px; color: var(--yellow); font: 6px monospace; }
.chat-panel > label { display: block; margin: 12px 0 7px; color: #8998a3; font-size: 9px; }.chat-input-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 66px; gap: 6px; align-items: stretch; }.chat-panel textarea { width: 100%; min-height: 64px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #080f16; color: #c2d0d3; font: 10px/1.55 sans-serif; }.chat-panel textarea:focus { border-color: rgba(102,245,227,.32); }.chat-input-wrap > button { min-height: 64px; padding: 7px; border: 1px solid rgba(102,245,227,.24); border-radius: 7px; background: rgba(102,245,227,.06); color: #8fc7c1; font-size: 8px; cursor: pointer; }.chat-input-wrap > button.recording { border-color: rgba(255,91,97,.45); background: rgba(255,91,97,.09); color: #ff8589; animation: voice-pulse .7s ease-in-out infinite alternate; }.chat-input-wrap > button:disabled { opacity: .5; cursor: wait; }
.chat-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }.chat-actions button { min-height: 34px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 7px; background: #0a1119; color: #94a4ab; font-size: 8px; cursor: pointer; }.chat-actions .chat-send { border-color: transparent; background: var(--cyan); color: #071311; font-weight: 700; }.chat-actions button.active { border-color: rgba(247,210,92,.4); background: rgba(247,210,92,.08); color: var(--yellow); }.chat-actions button:disabled { opacity: .4; cursor: wait; }
.voice-panel .panel-heading { margin-bottom: 15px; }.voice-orb { width: 9px; height: 9px; border-radius: 50%; background: #4a5861; }.voice-orb.speaking { background: var(--yellow); box-shadow: 0 0 12px var(--yellow); animation: voice-pulse .7s ease-in-out infinite alternate; }
.voice-panel > label { display: block; margin-bottom: 7px; color: #8998a3; font-size: 9px; }.voice-panel textarea { width: 100%; min-height: 82px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #080f16; color: #c2d0d3; font: 10px/1.55 sans-serif; }.voice-panel textarea:focus { border-color: rgba(102,245,227,.32); }
.voice-settings { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 10px; }.voice-settings label { color: #71818c; font-size: 8px; }.voice-settings select { width: 100%; margin-top: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; outline: none; background: #080f16; color: #b8c6ca; font-size: 9px; }.voice-settings output { float: right; color: var(--cyan); }.voice-settings input { margin-top: 11px; }
.voice-auto { width: 100%; margin-top: 11px; padding: 8px; border: 1px solid rgba(247,210,92,.25); border-radius: 7px; background: rgba(247,210,92,.06); color: #d7bd68; font-size: 8px; cursor: pointer; }.voice-auto.active { border-color: rgba(102,245,227,.3); background: rgba(102,245,227,.08); color: var(--cyan); }
.voice-status { margin-top: 11px; color: #6f818b; font: 8px/1.45 monospace; }.voice-actions { display: grid; grid-template-columns: 1fr 54px; gap: 6px; margin-top: 9px; }.voice-actions button { padding: 9px 7px; border: 1px solid var(--line); border-radius: 7px; background: #0a1119; color: #94a4ab; font-size: 8px; cursor: pointer; }.voice-actions .voice-play { border: 0; background: var(--cyan); color: #071311; font-weight: 700; }.voice-actions button:disabled { opacity: .4; cursor: not-allowed; }.voice-note { display: block; margin-top: 9px; color: #53636c; font-size: 7px; line-height: 1.5; }
@keyframes voice-pulse { to { opacity: .35; transform: scale(.76); } }
.activity-panel { flex: 1; min-height: 260px; overflow: hidden; }.activity-panel .panel-heading button { border: 0; background: transparent; color: #61717c; font-size: 8px; cursor: pointer; }
.event-log { height: 195px; margin: 0; padding: 0; overflow: auto; list-style: none; scrollbar-width: thin; }.event-log li { display: grid; grid-template-columns: 50px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); color: #9aaaae; font-size: 8px; line-height: 1.5; }.event-log time { color: #4f626d; font: 8px monospace; }.event-log li.success span::before { content: ''; display: inline-block; width: 4px; height: 4px; margin-right: 6px; border-radius: 50%; background: var(--cyan); }.event-log li.error span { color: #ef777b; }
.emergency { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid rgba(255,91,97,.26); border-radius: 12px; background: rgba(255,91,97,.06); cursor: pointer; text-align: left; }.emergency > i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--red); border-radius: 50%; color: var(--red); font-style: normal; }.emergency b,.emergency small { display: block; }.emergency b { color: #ff8589; font-size: 10px; }.emergency small { margin-top: 3px; color: #774f54; font-size: 7px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 30px); padding: 11px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #111c25; color: var(--text); font-size: 10px; opacity: 0; pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%,0); }.toast.error { border-color: rgba(255,91,97,.35); color: #ff999c; }

.tool-dialog { width: min(1040px, calc(100vw - 36px)); height: min(720px, calc(100vh - 48px)); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: #0b121a; color: var(--text); box-shadow: 0 35px 120px rgba(0,0,0,.65); }
.tool-dialog::backdrop { background: rgba(2,6,10,.78); backdrop-filter: blur(8px); }
.dialog-head { height: 76px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head span { color: var(--cyan-dim); font: 700 8px monospace; letter-spacing: .2em; }.dialog-head h2 { margin: 5px 0 0; font-size: 18px; }.dialog-head > button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.tool-console { display: grid; grid-template-columns: 300px 1fr; height: calc(100% - 76px); }
.tool-list { padding: 14px; overflow-y: auto; border-right: 1px solid var(--line); background: #080e15; }
.tool-list button { width: 100%; padding: 11px 12px; display: block; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.tool-list button:hover { background: rgba(255,255,255,.025); }.tool-list button.active { border-color: rgba(102,245,227,.22); background: rgba(102,245,227,.055); }
.tool-list b { display: block; overflow: hidden; color: #aebdc3; font: 600 10px monospace; text-overflow: ellipsis; white-space: nowrap; }.tool-list small { display: block; margin-top: 4px; overflow: hidden; color: #596974; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tool-workbench { padding: 24px; overflow-y: auto; }
.tool-title > span, .tool-result-head > span { color: var(--cyan-dim); font: 700 8px monospace; letter-spacing: .2em; }.tool-title h3 { margin: 7px 0; color: var(--cyan); font: 600 17px monospace; }.tool-title p { min-height: 18px; margin: 0 0 20px; color: #788993; font-size: 10px; }
.tool-workbench > label { display: block; margin: 0 0 8px; color: #82929d; font-size: 9px; }.tool-workbench textarea { width: 100%; height: 132px; resize: vertical; padding: 13px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #060b11; color: #b9d4d1; font: 10px/1.65 monospace; }.tool-workbench textarea:focus { border-color: rgba(102,245,227,.3); }
.tool-workbench details { margin: 9px 0 14px; border: 1px solid var(--line); border-radius: 7px; }.tool-workbench summary { padding: 9px 11px; color: #71818c; font-size: 8px; cursor: pointer; }.tool-workbench details pre { max-height: 155px; margin: 0; padding: 11px; overflow: auto; border-top: 1px solid var(--line); color: #758f92; background: #070c12; font: 8px/1.5 monospace; }
.tool-workbench .primary-action { max-width: 220px; }
.tool-result-head { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; }.tool-result-head button { border: 0; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }.tool-result { min-height: 95px; max-height: 190px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #060b11; color: #8db7b2; font: 9px/1.55 monospace; white-space: pre-wrap; }

@media (max-width: 1180px) { .workspace { grid-template-columns: 250px 1fr; }.side-stack { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.map-panel { min-height: 650px; }.activity-panel { min-height: 0; } }
@media (max-width: 800px) { .topbar { height: 68px; }.connection small { display:none; } main { padding-top: 26px; }.hero { align-items: start; }.hero-copy { max-width: 250px; }.workspace { grid-template-columns: 1fr; }.controls-panel { order: 2; }.map-panel { order: 1; min-height: 620px; }.side-stack { order: 3; grid-column: auto; grid-template-columns: 1fr; }.map-stage { min-height: 500px; }.legend { display: none; } }
@media (max-width: 650px) { .tools-trigger { font-size: 0; }.tools-trigger span,.tools-trigger b { font-size: 9px; }.top-actions { gap: 10px; }.tool-console { grid-template-columns: 1fr; }.tool-list { height: 150px; border-right: 0; border-bottom: 1px solid var(--line); }.tool-workbench { padding: 17px; }.tool-dialog { height: calc(100vh - 24px); }.dialog-head { height: 66px; }.tool-console { height: calc(100% - 66px); } }
@media (max-width: 500px) { .brand small, .live-chip b { display: none; }.hero h1 { font-size: 34px; }.hero-copy { font-size: 11px; }.map-toolbar, .map-footer { padding-left: 16px; padding-right: 16px; }.map-footer span:nth-child(3) { display:none; }.map-panel { min-height: 570px; }.map-stage { min-height: 450px; } }
