@font-face {
  font-family: Inter;
  src: local("Inter");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0a121b;
  --panel: #111d29;
  --panel2: #152432;
  --line: #253440;
  --muted: #8c9eae;
  --text: #e8eef1;
  --mint: #9be5c6;
  --blue: #55aafa;
  --coral: #f58672;
  --gold: #dec58e;
  --nav: 192px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft Yahei",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
}
button {
  color: var(--text);
  border: 1px solid var(--line);
  background: #172635;
  border-radius: 7px;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button:hover {
  background: #223749;
  border-color: #496270;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #11251f;
  font-weight: 650;
}
button.primary:hover {
  background: #b9f1d8;
}
button.quiet {
  background: transparent;
}
button.small {
  font-size: 12px;
  padding: 6px 10px;
}
button.icon-only {
  padding: 9px;
  min-width: 34px;
}
button.danger {
  color: #f1a28e;
}
svg.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
a {
  color: var(--mint);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 610;
  letter-spacing: -0.85px;
  line-height: 1.2;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  color: var(--muted);
}
small {
  font-size: 11px;
  color: var(--muted);
}
.mono,
code,
pre {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}
.mono {
  font-variant-numeric: tabular-nums;
}
strong {
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--mint);
}
.blue {
  color: var(--blue);
}
.coral {
  color: var(--coral);
}
.gold {
  color: var(--gold);
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 600;
  color: var(--mint);
}
.boot {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.boot span {
  color: var(--muted);
}
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 66px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 18, 27, 0.97);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid #4e7b70;
  border-radius: 10px;
  background: #16312f;
  color: var(--mint);
  font-size: 36px;
  line-height: 24px;
  text-align: center;
  padding-top: 2px;
}
.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 1.7px;
}
.brand-name span {
  color: var(--mint);
  font-weight: 450;
}
.brand-sub {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 2px;
}
.top-meta,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px #9be5c638;
  margin-right: 6px;
}
.status-text {
  font-size: 11px;
  color: #acbec7;
}
.version {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--muted);
}
.top-actions button {
  font-size: 11px;
  padding: 6px 10px;
}
.top-actions .lang-active {
  color: var(--mint);
  border-color: #47675f;
}
.mobile-menu {
  display: none;
}
.sidebar {
  width: var(--nav);
  position: fixed;
  left: 0;
  top: 66px;
  bottom: 0;
  z-index: 15;
  background: #0d1722;
  border-right: 1px solid var(--line);
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
}
.nav-section {
  font-size: 9px;
  color: #607584;
  letter-spacing: 1.7px;
  padding: 0 13px 10px;
}
.nav-section:not(:first-child) {
  margin-top: 25px;
}
.nav-item {
  width: 100%;
  border: 0;
  text-align: left;
  justify-content: flex-start;
  gap: 11px;
  border-radius: 6px;
  background: transparent;
  color: #96a7b6;
  font-size: 12px;
  padding: 12px 13px;
  white-space: normal;
  line-height: 1.35;
  margin-bottom: 3px;
}
.nav-item .icon {
  width: 16px;
  height: 16px;
}
.nav-item:hover {
  color: var(--text);
  background: #152331;
}
.nav-item.active {
  color: var(--mint);
  background: #1d3336;
  box-shadow: inset 2px 0 var(--mint);
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 11px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
}
.sidebar-foot .version {
  align-self: flex-start;
}
.workspace {
  margin-left: var(--nav);
  padding: 92px 27px 35px;
  min-height: 100vh;
  max-width: 2100px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.page-title .eyebrow {
  margin-bottom: 8px;
}
.page-title p {
  font-size: 12px;
  margin-top: 8px;
  max-width: 800px;
}
.head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.head-actions button {
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: auto;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.tab.active {
  color: var(--mint);
  border-bottom-color: var(--mint);
  background: linear-gradient(0deg, #9be5c60b, transparent);
}
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 18px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 13px;
}
.panel-head .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
}
.panel-body {
  padding: 17px;
}
.panel-footer {
  padding: 11px 17px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.row.wrap,
.wrap {
  flex-wrap: wrap;
}
.gap {
  gap: 10px;
}
.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sep {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.note {
  font-size: 11px;
  line-height: 1.7;
  border-left: 2px solid #618e82;
  padding: 10px 12px;
  background: #15292d;
  color: #a9c3c5;
  border-radius: 0 5px 5px 0;
}
.note.warn {
  border-color: #b7a06d;
  background: #282921;
  color: #c7bda5;
}
.chip {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  white-space: nowrap;
  color: #aebdca;
}
.chip.live {
  border-color: #385f50;
  color: var(--mint);
  background: #1a302c;
}
.chip.empirical {
  border-color: #5b5140;
  color: var(--gold);
}
.team-picker {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.team-picker button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 8px 12px;
  font-size: 11px;
}
.team-picker button.active {
  background: #263544;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.team-picker .dot {
  margin-right: 2px;
}
.score-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 68px;
  background: #101c28;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.team-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.7px;
  min-width: 120px;
}
.team-name.right {
  justify-content: flex-end;
}
.crest {
  width: 27px;
  height: 32px;
  border: 1px solid currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #ffffff08;
  padding-bottom: 3px;
}
.score {
  font-size: 30px;
  letter-spacing: 5px;
  font-weight: 500;
  line-height: 1;
}
.match-time {
  position: absolute;
  left: 17px;
  font-size: 11px;
  text-align: center;
}
.match-time strong {
  display: block;
  font-size: 14px;
  color: var(--mint);
  letter-spacing: 1px;
}
.match-half {
  position: absolute;
  right: 17px;
  font-size: 10px;
  text-align: right;
  color: var(--muted);
}
.match-frame {
  position: relative;
  background: #13262b;
  overflow: hidden;
  min-width: 0;
}
.pitch-host {
  position: relative;
  height: 500px;
  min-height: 320px;
  overflow: hidden;
}
.pitch-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.pitch-player-label {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 3px 6px;
  background: #071a22db;
  color: #c4f3e2;
  border: 1px solid #a1e3d050;
  border-radius: 3px;
  pointer-events: none;
  font-size: 9px;
  white-space: nowrap;
  font-weight: 600;
}
.pitch-toolbar {
  position: absolute;
  left: 14px;
  top: 13px;
  display: flex;
  gap: 5px;
  z-index: 2;
}
.pitch-toolbar button {
  font-size: 10px;
  padding: 6px 9px;
  background: #0a1a23df;
  border-color: #63766b60;
  backdrop-filter: blur(8px);
}
.pitch-toolbar button.active {
  color: var(--mint);
  border-color: #9be5c694;
}
.pitch-watermark {
  position: absolute;
  right: 14px;
  top: 15px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #e4ecdfb0;
  text-shadow: 0 1px 5px #000;
}
.pitch-bottom {
  position: absolute;
  bottom: 14px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.pitch-bottom > * {
  pointer-events: auto;
}
.mini-map {
  width: 125px;
  height: 82px;
  background: #091a20c9;
  border: 1px solid #63766b60;
  border-radius: 5px;
  padding: 5px;
}
.pitch-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #091a20dc;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 10px;
  color: #c4d8d1;
}
.pitch-zoom input {
  width: 70px;
}
.match-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-top: 1px solid var(--line);
  background: #101c28;
}
.match-controls .primary {
  padding: 8px 18px;
}
.match-controls button,
.match-controls select {
  font-size: 11px;
}
.match-controls .spacer {
  flex: 1;
}
.transport-state {
  font-size: 10px;
  color: var(--muted);
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111d29;
  padding: 14px 16px;
  min-width: 0;
}
.metric-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}
.metric-value {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.metric-value small {
  font-size: 11px;
  letter-spacing: 0;
  margin-left: 4px;
}
.metric-foot {
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.metric .spark {
  height: 28px;
  margin-top: 5px;
  display: block;
  width: 100%;
}
.player-card {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: radial-gradient(ellipse at 15% 0, #284450, #172733 65%);
}
.shirt {
  width: 57px;
  height: 66px;
  flex-shrink: 0;
  background: var(--jersey, #388cdb);
  clip-path: polygon(
    22% 0,
    36% 0,
    43% 10%,
    57% 10%,
    64% 0,
    78% 0,
    100% 19%,
    83% 35%,
    76% 28%,
    76% 100%,
    24% 100%,
    24% 28%,
    17% 35%,
    0 19%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 650;
  padding-top: 5px;
  box-shadow: inset 0 -25px 50px #0003;
}
.player-card h3 {
  font-size: 19px;
  font-weight: 550;
}
.player-card p {
  font-size: 10px;
  margin-top: 3px;
}
.player-card .eyebrow {
  font-size: 8px;
  margin-bottom: 5px;
}
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  padding: 8px 0;
  border-bottom: 1px solid #26344080;
}
.data-row:last-child {
  border: 0;
}
.data-row > span:first-child {
  color: var(--muted);
}
.data-row strong {
  font-size: 12px;
  text-align: right;
}
.subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
}
.layers {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  font-size: 11px;
  color: #b4c2cd;
  cursor: pointer;
}
.switch-row input {
  appearance: none;
  width: 27px;
  height: 15px;
  background: #354450;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}
.switch-row input::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: #95a6b4;
  transition: transform 0.15s;
}
.switch-row input:checked {
  background: #457562;
}
.switch-row input:checked::after {
  transform: translateX(12px);
  background: #c6f4dd;
}
.event-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow: auto;
}
.event {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #26344080;
}
.event-time {
  font-size: 10px;
  color: var(--muted);
  min-width: 42px;
}
.event-symbol {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid #3b4e5d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.event-desc {
  flex: 1;
}
.event-desc small {
  display: block;
  font-size: 9px;
  margin-top: 2px;
}
.event.goal .event-symbol {
  color: var(--mint);
  border-color: #4d8d75;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.full {
  width: 100%;
}
.button-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--mint);
  font-size: 11px;
  justify-content: flex-start;
}
.button-link:hover {
  background: none;
}
.comparison {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  margin: 13px 0;
}
.bar-track {
  height: 5px;
  background: #f586723d;
  border-radius: 4px;
  overflow: hidden;
}
.bar-track span {
  height: 100%;
  display: block;
  background: var(--blue);
}
.comparison-label {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  margin-bottom: 4px;
}
.roster {
  display: grid;
  grid-template-columns: repeat(11, minmax(35px, 1fr));
  gap: 6px;
}
.roster button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 3px;
  font-size: 10px;
  background: #122330;
}
.roster button.active {
  border-color: var(--mint);
  background: #233d3e;
  color: var(--mint);
}
.roster button small {
  font-size: 8px;
}
.roster button strong {
  font-size: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.form-field label,
.field-label {
  font-size: 11px;
  color: #a9bac8;
}
.form-field label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.form-field output {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 11px;
}
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid #344653;
  border-radius: 6px;
  padding: 9px 10px;
  background: #0d1a25;
  color: var(--text);
  font-size: 12px;
}
select {
  min-height: 35px;
}
input[type="range"] {
  accent-color: var(--mint);
  width: 100%;
  height: 4px;
  cursor: pointer;
  margin: 8px 0;
}
input[type="checkbox"] {
  accent-color: var(--mint);
}
input[type="color"] {
  height: 34px;
  width: 50px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px;
  background: transparent;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-pair .form-field {
  margin-bottom: 10px;
}
.select-player {
  font-size: 11px;
  min-height: 32px;
  max-width: 180px;
}
.tactic-field {
  background: radial-gradient(ellipse, #204d41, #15352e);
  padding: 14px;
  position: relative;
  border-radius: 8px;
  aspect-ratio: 1.53;
  min-height: 260px;
}
.field-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.field-svg text {
  font-family: Inter, system-ui, sans-serif;
}
.field-svg .node {
  cursor: pointer;
}
.field-svg .node:hover circle {
  stroke: #fff;
  stroke-width: 1;
}
.field-svg .node:focus {
  outline: none;
}
.field-svg .node:focus circle {
  stroke: #fff;
  stroke-width: 1.2;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}
.legend i {
  width: 15px;
  height: 2px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
  background: var(--mint);
}
.group-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.group-card {
  background: #142431;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
}
.group-card p {
  font-size: 11px;
  margin: 8px 0;
}
.group-members {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.member {
  background: #223746;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9px;
  color: #b9ccd5;
}
.control-map {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 25px 20px 18px;
  background-image: radial-gradient(#35475478 0.65px, transparent 0.65px);
  background-size: 16px 16px;
  background-color: #0d1a24;
  overflow: hidden;
}
.control-chain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 20px;
  margin: 0 0 18px;
  position: relative;
}
.control-node {
  position: relative;
  background: #172b38;
  border: 1px solid #3d5767;
  border-radius: 7px;
  padding: 15px 10px;
  min-height: 94px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}
.control-node strong {
  font-size: 11px;
}
.control-node small {
  font-size: 9px;
  color: #8da8b8;
}
.control-node .port {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #81c5b4;
  border: 1px solid #0a161c;
  border-radius: 50%;
  top: 50%;
}
.control-node .port.in {
  left: -3px;
}
.control-node .port.out {
  right: -3px;
}
.control-node:not(:nth-child(3n))::after {
  content: "→";
  position: absolute;
  right: -17px;
  top: 37%;
  color: #789990;
  font-size: 16px;
}
.control-node.active {
  border-color: var(--mint);
  box-shadow: 0 0 0 1px #9be5c61a;
  background: #203d40;
}
.control-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #769d90;
  border-top: 1px solid #477567;
  padding: 12px 5px 0;
  font-size: 10px;
  gap: 9px;
}
.formula {
  padding: 16px;
  background: #0d1a23;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #afd8d2;
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: normal;
  line-height: 1.9;
}
.signal-contract {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.signal-contract h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}
.signal-item {
  font-family: Consolas, monospace;
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid #26344080;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.chart {
  width: 100%;
  height: 140px;
  display: block;
}
.chart-wrap {
  position: relative;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.chart-title {
  font-size: 10px;
  color: #b6c5cd;
  margin-bottom: 8px;
}
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  color: var(--muted);
  font-size: 12px;
}
.vector-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.vector-table th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.vector-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #26344080;
}
.vector-table td:not(:first-child) {
  font-family: Consolas, monospace;
  text-align: right;
}
.trace-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  margin-bottom: 17px;
}
.trace-step .number {
  height: 25px;
  width: 25px;
  border: 1px solid #426354;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--mint);
}
.trace-step h3 {
  font-size: 12px;
  margin: 2px 0 5px;
}
.trace-step p {
  font-size: 11px;
  line-height: 1.7;
}
.health-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.health-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.health-item h3 {
  font-size: 12px;
}
.health-item p {
  font-size: 11px;
  margin-top: 4px;
}
.health-dot {
  width: 7px;
  height: 7px;
  background: var(--mint);
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.health-dot.warn {
  background: var(--gold);
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
}
.data-table th {
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  background: #14232f;
  font-size: 10px;
  padding: 10px 12px;
}
.data-table td {
  padding: 11px 12px;
  border-top: 1px solid #26344080;
}
.data-table tr:hover td {
  background: #192a35;
}
.data-table td strong {
  color: var(--mint);
}
.data-table button {
  padding: 3px 6px;
  font-size: 10px;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.preset-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111f2a;
  overflow: hidden;
}
.preset-visual {
  height: 155px;
  background: #142a2c;
  padding: 16px 25px;
  position: relative;
}
.preset-visual .chip {
  position: absolute;
  top: 10px;
  left: 12px;
  background: #0c1c22bb;
}
.preset-content {
  padding: 17px;
}
.preset-content h3 {
  font-size: 16px;
  line-height: 1.3;
}
.preset-content p {
  font-size: 10px;
  margin: 6px 0 13px;
}
.preset-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.preset-actions {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.preset-actions button {
  font-size: 10px;
  flex: 1;
  padding: 7px 5px;
}
.empty-state {
  border: 1px dashed #3c515f;
  border-radius: 9px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  text-align: center;
  gap: 12px;
}
.empty-state p {
  font-size: 12px;
  max-width: 360px;
}
.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.workflow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14242e;
  padding: 16px;
  position: relative;
}
.workflow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 40%;
  color: #7c9c91;
  z-index: 2;
}
.workflow-step .num {
  font-size: 10px;
  color: var(--mint);
  margin-bottom: 9px;
  font-family: Consolas, monospace;
}
.workflow-step h3 {
  font-size: 12px;
}
.workflow-step p {
  font-size: 10px;
  margin-top: 5px;
}
.code-editor {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
  line-height: 1.85;
  tab-size: 2;
  min-height: 350px;
  background: #0b1721;
  color: #b4d8d3;
  padding: 17px;
  border-radius: 7px;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}
.compile-status {
  padding: 12px;
  background: #172b2c;
  border: 1px solid #3c6256;
  border-radius: 6px;
  font-size: 11px;
  color: var(--mint);
  margin-top: 13px;
}
.compile-status.error {
  background: #312221;
  border-color: #765047;
  color: #e6a294;
}
.progress {
  height: 5px;
  background: #253845;
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--mint);
  transition: width 0.2s;
}
.benchmark-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.scenario {
  padding: 17px;
  border: 1px solid var(--line);
  background: #14232f;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 7px;
}
.scenario.active {
  border-color: var(--mint);
  background: #1e3537;
}
.scenario .num {
  font-size: 10px;
  color: var(--mint);
}
.scenario h3 {
  font-size: 13px;
}
.scenario p {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.replay-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.replay-bar input {
  flex: 1;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 23px 0 14px;
}
.section-title h2 {
  font-size: 15px;
}
.section-title small {
  font-size: 10px;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.help-grid h3 {
  margin-bottom: 8px;
}
.help-grid p {
  font-size: 12px;
  line-height: 1.8;
}
.help-grid ol {
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.error-banner {
  padding: 20px;
  text-align: center;
  background: #302627;
  color: #eed0bd;
}
.fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
  background: var(--bg) !important;
  display: flex;
  flex-direction: column;
}
.fullscreen .pitch-host {
  height: auto;
  flex: 1;
}
.fullscreen .score-strip {
  flex-shrink: 0;
}
.fullscreen .match-controls {
  flex-shrink: 0;
}
.footer-note {
  font-size: 10px;
  color: #708593;
  margin-top: 18px;
  line-height: 1.8;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%) translateY(30px);
  max-width: 90vw;
  background: #203831;
  color: #d5f3e5;
  border: 1px solid #587e68;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 12px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
dialog {
  border: 1px solid #3d5360;
  border-radius: 12px;
  background: #101f2b;
  color: var(--text);
  max-width: 680px;
  width: calc(100% - 32px);
  padding: 0;
  max-height: 88vh;
}
dialog::backdrop {
  background: #040a10b3;
  backdrop-filter: blur(5px);
}
.dialog-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head h2 {
  font-size: 17px;
}
.dialog-body {
  padding: 22px;
}
.dialog-actions {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.check-option {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scope-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.scope-bar select {
  width: auto;
  font-size: 10px;
  min-height: 29px;
  padding: 4px 8px;
}
.no-data {
  color: var(--muted);
  font-size: 11px;
  padding: 12px 0;
}
.error-inline {
  font-size: 11px;
  color: #f3a494;
  margin-top: 10px;
}
.hidden {
  display: none !important;
}
@media (min-width: 1600px) {
  .pitch-host {
    height: 570px;
  }
  .workspace {
    padding-left: 32px;
    padding-right: 32px;
  }
  .grid-main {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .page-head {
    margin-bottom: 25px;
  }
}
@media (max-width: 1250px) {
  :root {
    --nav: 172px;
  }
  .workspace {
    padding: 88px 20px 30px;
  }
  .topbar {
    padding: 0 18px;
  }
  .top-meta {
    display: none;
  }
  .grid-main {
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 14px;
  }
  .pitch-host {
    height: 430px;
  }
  .team-name {
    min-width: 80px;
    font-size: 10px;
  }
  .score-strip {
    gap: 16px;
  }
  .metric {
    padding: 12px;
  }
  .metric-value {
    font-size: 20px;
  }
  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-body {
    padding: 14px;
  }
  .score-strip .match-half {
    display: none;
  }
  .match-controls {
    flex-wrap: wrap;
  }
  .page-title p {
    max-width: 600px;
  }
  .control-chain {
    gap: 20px 17px;
  }
}
@media (max-width: 1050px) {
  :root {
    --nav: 68px;
  }
  .brand {
    min-width: 0;
  }
  .sidebar {
    padding: 22px 7px;
  }
  .nav-item {
    justify-content: center;
    padding: 13px 8px;
  }
  .nav-item span,
  .nav-section,
  .sidebar-foot {
    display: none;
  }
  .nav-item .icon {
    width: 20px;
    height: 20px;
  }
  .grid-main {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .workspace {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pitch-host {
    height: 390px;
  }
  .match-time {
    left: 10px;
  }
  .score-strip {
    gap: 10px;
  }
  .team-name {
    gap: 6px;
  }
  .crest {
    width: 22px;
    height: 26px;
    font-size: 12px;
  }
  .metric-row {
    gap: 8px;
  }
  .metric-value {
    font-size: 19px;
  }
  .metric-label {
    font-size: 9px;
  }
  .metric {
    padding: 11px;
  }
  .head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .three-cols {
    grid-template-columns: 1fr 1fr;
  }
  .workflow {
    gap: 8px;
  }
  .workflow-step {
    padding: 12px;
  }
  .control-node {
    padding: 11px 8px;
  }
  .control-node small {
    font-size: 8px;
  }
}
@media (max-width: 850px) {
  .grid-main {
    grid-template-columns: 1fr;
  }
  .grid-main > .stack:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .grid-main > .stack:last-child > .panel:first-child {
    grid-row: span 2;
  }
  .pitch-host {
    height: 460px;
  }
  .score-strip {
    gap: 25px;
  }
  .match-time {
    left: 20px;
  }
  .team-name {
    min-width: 100px;
  }
  .score-strip .match-half {
    display: block;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-title p {
    font-size: 11px;
    max-width: 450px;
  }
  .head-actions {
    max-width: 230px;
  }
  .panel-head {
    padding: 13px 15px;
  }
  .control-map {
    padding: 22px 18px;
  }
  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-cols {
    gap: 12px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .benchmark-cards {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .top-actions .support-text {
    display: none;
  }
}
@media (max-width: 600px) {
  :root {
    --nav: 0px;
  }
  .topbar {
    height: 58px;
    padding: 0 13px;
    gap: 7px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 31px;
    line-height: 23px;
  }
  .brand-name {
    font-size: 14px;
    letter-spacing: 1.2px;
  }
  .brand-sub {
    font-size: 6px;
    letter-spacing: 1.1px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions button {
    padding: 6px 7px;
  }
  .top-actions .version {
    display: none;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 210px;
    top: 58px;
    transition: transform 0.2s;
    box-shadow: 20px 0 60px #0008;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar .nav-item {
    justify-content: flex-start;
  }
  .sidebar .nav-item span,
  .sidebar .nav-section {
    display: block;
  }
  .sidebar .sidebar-foot {
    display: flex;
  }
  .workspace {
    padding: 78px 12px 25px;
  }
  .page-head {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 17px;
  }
  .page-title h1 {
    font-size: 24px;
  }
  .page-title .eyebrow {
    font-size: 8px;
    margin-bottom: 6px;
  }
  .page-title p {
    font-size: 11px;
  }
  .head-actions {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }
  .head-actions button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .tabs {
    margin-bottom: 15px;
    gap: 1px;
  }
  .tab {
    padding: 11px 12px;
    font-size: 11px;
  }
  .pitch-host {
    height: 335px;
    min-height: 280px;
  }
  .score-strip {
    height: 63px;
    min-height: 63px;
    gap: 12px;
    padding-top: 2px;
  }
  .team-name {
    min-width: 60px;
    font-size: 9px;
    letter-spacing: 0;
    gap: 5px;
  }
  .team-name .crest {
    width: 20px;
    height: 24px;
    font-size: 10px;
  }
  .score {
    font-size: 25px;
    letter-spacing: 3px;
  }
  .match-time {
    position: static;
    font-size: 8px;
    order: 0;
  }
  .match-time strong {
    font-size: 10px;
  }
  .score-strip .match-half {
    display: none;
  }
  .pitch-toolbar {
    left: 9px;
    top: 9px;
    gap: 4px;
  }
  .pitch-toolbar button {
    font-size: 9px;
    padding: 5px 7px;
  }
  .pitch-watermark {
    display: none;
  }
  .pitch-bottom {
    left: 9px;
    right: 9px;
    bottom: 9px;
  }
  .mini-map {
    width: 90px;
    height: 59px;
  }
  .pitch-zoom {
    padding: 5px 7px;
  }
  .pitch-zoom input {
    width: 50px;
  }
  .match-controls {
    padding: 9px;
    gap: 6px;
  }
  .match-controls button {
    padding: 7px 9px;
  }
  .transport-state {
    display: none;
  }
  .match-controls .primary {
    padding: 7px 15px;
  }
  .metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .metric {
    padding: 12px 14px;
  }
  .metric-value {
    font-size: 22px;
  }
  .metric-label {
    font-size: 10px;
  }
  .grid-main > .stack:last-child {
    display: flex;
  }
  .panel-head {
    padding: 13px 14px;
  }
  .panel-body {
    padding: 14px;
  }
  .two-cols,
  .three-cols,
  .help-grid {
    grid-template-columns: 1fr;
  }
  .roster {
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
  }
  .roster button {
    padding: 7px 2px;
  }
  .roster button strong {
    font-size: 14px;
  }
  .group-list {
    grid-template-columns: 1fr;
  }
  .control-chain {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 18px;
  }
  .control-node:not(:nth-child(3n))::after {
    content: none;
  }
  .control-node:nth-child(odd)::after {
    content: "→";
    right: -16px;
  }
  .control-node {
    min-height: 90px;
  }
  .control-map {
    padding: 18px 15px;
  }
  .signal-contract {
    gap: 10px;
  }
  .formula {
    font-size: 10px;
    padding: 12px;
  }
  .preset-grid {
    grid-template-columns: 1fr;
  }
  .preset-visual {
    height: 170px;
  }
  .workflow {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .workflow-step:nth-child(2)::after {
    display: none;
  }
  .workflow-step h3 {
    font-size: 11px;
  }
  .workflow-step p {
    font-size: 9px;
  }
  .benchmark-cards {
    grid-template-columns: 1fr;
  }
  .scenario {
    padding: 14px;
    gap: 4px;
  }
  .scenario p {
    font-size: 10px;
  }
  .chart {
    height: 130px;
  }
  .tactic-field {
    min-height: 230px;
    padding: 9px;
  }
  .check-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-note {
    font-size: 9px;
  }
  .data-table {
    font-size: 10px;
  }
  .code-editor {
    font-size: 10px;
    min-height: 360px;
  }
  .dialog-body {
    padding: 17px;
  }
  .dialog-head {
    padding: 16px;
  }
  .dialog-actions {
    padding: 13px 17px;
  }
  .scope-bar {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.head-actions .select-player {
  width: 180px;
  flex: 0 0 180px;
}
.team-picker {
  flex-shrink: 0;
}
.control-node:nth-child(3)::before {
  content: "↓";
  position: absolute;
  bottom: -24px;
  right: 50%;
  color: #89b09f;
  font-size: 18px;
}
.control-node:nth-child(4)::after {
  content: none;
}
.control-node:nth-child(5)::after,
.control-node:nth-child(6)::after {
  content: "←";
  position: absolute;
  left: -17px;
  right: auto;
  top: 37%;
  color: #789990;
  font-size: 16px;
}
@media (max-width: 600px) {
  .head-actions .select-player {
    flex: 1;
    min-width: 130px;
  }
  .control-node:nth-child(3)::before {
    content: none;
  }
  .control-node:nth-child(4)::after,
  .control-node:nth-child(6)::after {
    content: none;
  }
  .control-node:nth-child(3)::after,
  .control-node:nth-child(5)::after {
    content: "→";
    left: auto;
    right: -16px;
  }
  .control-node:nth-child(4) {
    order: 6;
  }
  .control-node:nth-child(5) {
    order: 5;
  }
  .control-node:nth-child(6) {
    order: 4;
  }
}
