:root {
  --bg: #f4eee4;
  --ink: #211713;
  --muted: #6f6258;
  --line: rgba(62, 42, 29, 0.18);
  --panel: rgba(255,250,241,0.86);
  --red: #5a0f14;
  --gold: #b4823d;
  --green: #2f8d5a;
  --blue: #2b648d;
}
* { box-sizing: border-box; border-radius: 0; }
body { margin: 0; color: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(135deg, #fffaf2, var(--bg)); }
button, input { font: inherit; }
.live-shell { width: min(1500px, calc(100vw - 32px)); margin: 0 auto; padding: 28px 0 42px; }
.live-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.live-header p, .label { margin: 0 0 8px; color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 74px); line-height: .95; }
.live-header a { color: var(--red); font-weight: 900; text-decoration: none; border: 1px solid var(--line); padding: 12px 14px; background: var(--panel); }
.header-links { display: flex; gap: 10px; align-items: start; }
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.status-grid article, .panel { border: 1px solid var(--line); background: var(--panel); }
.status-grid article { display: grid; grid-template-columns: 12px 1fr; gap: 8px; align-items: center; padding: 14px; }
.status-grid small { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.status-grid strong { grid-column: 2; font-size: 18px; }
.dot { width: 10px; height: 10px; display: block; }
.dot.ok { background: var(--green); }
.dot.wait { background: var(--gold); }
.dot.bad { background: var(--red); }
.main-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.panel { padding: 16px; min-width: 0; }
.parameters { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
input { width: 100%; padding: 10px; border: 1px solid var(--line); background: #fffaf1; color: var(--ink); font-weight: 800; }
button { border: 1px solid var(--line); background: #fffaf1; color: var(--ink); padding: 10px 12px; cursor: pointer; font-weight: 900; }
button:hover { border-color: var(--red); color: var(--red); }
button.danger { background: var(--red); color: #fff7ed; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.runner-config { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.progress-card, .results-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.progress-card div, .results-grid article { min-height: 82px; padding: 12px; border: 1px solid var(--line); background: rgba(255,250,241,.72); }
.progress-card span, .results-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.4; }
.progress-card strong, .results-grid strong { display: block; margin-top: 8px; color: var(--red); }
.map { grid-column: 3; }
.region-visual { position: relative; display: grid; grid-template-columns: 1fr 46px 1fr; grid-template-rows: 70px 180px 70px; gap: 10px; min-height: 340px; padding: 14px; background: #efe6d8; border: 1px solid var(--line); }
.node, .interface { display: grid; place-items: center; text-align: center; border: 1px solid rgba(33,23,19,.18); font-weight: 900; }
.fluid { grid-column: 1; grid-row: 2; background: rgba(43,100,141,.18); color: var(--blue); font-size: 30px; font-family: Georgia, serif; }
.masonry { grid-column: 3; grid-row: 2; background: rgba(180,130,61,.2); color: #795121; font-size: 30px; font-family: Georgia, serif; }
.interface { grid-column: 2; grid-row: 2; background: rgba(47,141,90,.24); color: var(--green); writing-mode: vertical-rl; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.outlet { grid-column: 3; grid-row: 1; color: var(--blue); background: rgba(43,100,141,.12); }
.inlet { grid-column: 1; grid-row: 3; color: var(--red); background: rgba(90,15,20,.12); }
.log-panel { grid-column: 1 / -1; }
.log-head { display: flex; justify-content: space-between; align-items: center; }
pre { height: 440px; margin: 0; padding: 14px; overflow: auto; background: #17110e; color: #fff7ed; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
@media (max-width: 1100px) {
  .status-grid, .main-grid, .progress-card, .results-grid { grid-template-columns: 1fr 1fr; }
  .map, .log-panel { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .live-shell { width: min(100vw - 20px, 1500px); }
  .live-header { display: block; }
  .live-header a { display: inline-block; margin-top: 12px; }
  .status-grid, .main-grid, .progress-card, .results-grid { grid-template-columns: 1fr; }
  .runner-config { grid-template-columns: 1fr; }
}
