:root {
  --bg: #0c1020;
  --panel: #141a2e;
  --panel-2: #1a2238;
  --line: #2c3858;
  --text: #eef4ff;
  --muted: #8fa0c1;
  --accent: #4da3ff;
  --accent-2: #8cc8ff;
  --warn: #ffbf47;
  --danger: #ff5a74;
  --copper: #d6873a;
  --nav-bg: #0e1426;
  --nav-surface: #10182b;
  --nav-text: #eef4ff;
  --nav-muted: #8fa0c1;
  --nav-accent: #4da3ff;
  --nav-accent-dark: #8cc8ff;
  --nav-row: #141a2e;
  --nav-border: #2c3858;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #10182b;
  cursor: pointer;
}

button:hover,
button.active {
  border-color: var(--accent);
  color: #06150f;
  background: var(--accent);
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(77, 163, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(140, 200, 255, 0.08) 1px, transparent 1px),
    #080c18;
  background-size: 28px 28px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.chip-logo {
  position: relative;
  width: min(520px, 84vw);
  padding: 54px 28px;
  border: 2px solid var(--accent);
  text-align: center;
  box-shadow: 0 0 38px rgba(77, 163, 255, 0.24), inset 0 0 32px rgba(140, 200, 255, 0.12);
}

.chip-logo img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 14px rgba(77, 163, 255, 0.55));
  animation: logoScan 1.6s ease-in-out infinite;
}

.chip-logo h1,
.brand strong {
  margin: 0;
  letter-spacing: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.chip-logo h1 {
  font-size: clamp(42px, 10vw, 86px);
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  text-shadow: 0 0 18px rgba(77, 163, 255, 0.5);
}

.pin-row {
  position: absolute;
  left: 7%;
  right: 7%;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 18px, transparent 18px 34px);
}

.pin-row.top {
  top: -6px;
}

.pin-row.bottom {
  bottom: -6px;
}

.loader-trace {
  position: absolute;
  width: min(480px, 78vw);
  height: 3px;
  transform: translateY(92px);
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  animation: pulse 1.15s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.25;
    transform: translateY(92px) scaleX(0.35);
  }

  50% {
    opacity: 1;
    transform: translateY(92px) scaleX(1);
  }

  100% {
    opacity: 0.25;
    transform: translateY(92px) scaleX(0.35);
  }
}

@keyframes logoScan {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.86;
  }

  50% {
    transform: translateY(-4px) scale(1.04);
    opacity: 1;
  }
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 70px 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 34px;
  border-bottom: 1px solid var(--nav-border);
  color: var(--nav-text);
  background: var(--nav-bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: var(--accent);
  box-shadow: inset 0 0 12px rgba(77, 163, 255, 0.15);
  transform: none;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: none;
}

.brand strong {
  color: var(--text);
  font-size: inherit;
  line-height: inherit;
}

.brand span,
.muted {
  display: block;
  color: var(--nav-muted);
  font-size: 12px;
}

.tabs,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu {
  position: relative;
}

.menu>button {
  min-width: 72px;
  min-height: 70px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  color: var(--nav-text);
  background: transparent;
  font-size: 17px;
}

.menu>button:hover,
.menu:focus-within>button {
  color: var(--nav-accent);
  background: transparent;
}

.menu-pop {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 15;
  display: none;
  min-width: 360px;
  padding: 24px 38px 28px 22px;
  border: 1px solid var(--nav-border);
  border-top: 0;
  border-radius: 0;
  background: var(--nav-bg);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.14);
}

.menu:hover .menu-pop,
.menu:focus-within .menu-pop {
  display: grid;
  gap: 7px;
}

.menu-pop button {
  position: relative;
  width: 100%;
  min-height: 40px;
  padding: 9px 44px 9px 50px;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: var(--nav-text);
  background: transparent;
  text-align: left;
  font-size: 16px;
}

.menu-pop button::before {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 24px;
  transform: translateY(-50%);
  color: var(--nav-muted);
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.menu-pop button::after {
  position: absolute;
  right: 24px;
  top: 50%;
  content: "→";
  transform: translateY(-52%);
  color: var(--nav-accent);
  font-size: 22px;
}

.menu-pop button:hover,
.menu-pop button:focus,
.menu-pop button.active {
  color: #041710;
  background: var(--nav-accent);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.menu-pop button:hover::before,
.menu-pop button:focus::before,
.menu-pop button.active::before,
.menu-pop button:hover::after,
.menu-pop button:focus::after,
.menu-pop button.active::after {
  color: #041710;
}

.menu-pop button:nth-child(1)::before {
  content: "☰";
}

.menu-pop button:nth-child(2)::before {
  content: "⌁";
}

.menu-pop button:nth-child(3)::before {
  content: "◇";
}

.menu-pop button:nth-child(4)::before {
  content: "⇣";
}

.menu-pop button:nth-child(5)::before {
  content: "⌘";
}

.menu-pop button:nth-child(6)::before {
  content: "▣";
}

.tabs {
  flex: 1;
  justify-content: center;
  align-self: stretch;
  gap: 0;
}

.tab,
.actions button,
.tool,
.part {
  min-height: 34px;
  border-radius: 6px;
  padding: 7px 10px;
}

.tab {
  position: relative;
  min-height: 70px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  color: var(--nav-text);
  background: transparent;
  font-size: 17px;
  font-weight: 500;
}

.tab::after {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 5px;
  content: "";
  background: transparent;
}

.tab:hover,
.tab.active {
  color: var(--nav-accent-dark);
  background: transparent;
}

.tab.active {
  font-weight: 700;
}

.tab.active::after {
  background: var(--nav-accent);
}

.tab-locked::before {
  content: "LOCK";
  display: inline-block;
  margin-right: 8px;
  color: #ffb703;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: 2px;
}

.actions button.primary {
  border-color: var(--accent);
  color: #041710;
  background: var(--accent);
}

.actions button.aoi-primary {
  border-color: #ffd166;
  color: #1b1300;
  background: linear-gradient(180deg, #ffe18a, #ffb703);
  box-shadow: 0 0 18px rgba(255, 183, 3, 0.28);
}

.session-action {
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--nav-text);
  text-decoration: none;
  background: #10182b;
}

.session-action:hover {
  border-color: var(--accent);
  color: #06150f;
  background: var(--accent);
}

.menu-pop button.aoi-primary {
  border: 0;
  color: var(--nav-text);
  background: transparent;
  box-shadow: none;
}

.menu-pop button.aoi-primary:hover,
.menu-pop button.aoi-primary:focus {
  color: #041710;
  background: var(--nav-accent);
}

.optical-panel {
  border-color: #ffd166;
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.16), 0 0 18px rgba(255, 209, 102, 0.08);
}

.optical-panel h2 {
  color: #ffd166;
}

.optical-panel.focused {
  animation: opticalFocus 0.9s ease;
}

@keyframes opticalFocus {

  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.16), 0 0 18px rgba(255, 209, 102, 0.08);
  }

  45% {
    box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.55), 0 0 34px rgba(255, 209, 102, 0.34);
  }
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 230px 1fr 300px;
  position: relative;
}

.workspace.library-hidden {
  grid-template-columns: 0 1fr 300px;
}

.workspace.inspector-hidden {
  grid-template-columns: 230px 1fr 0;
}

.workspace.library-hidden.inspector-hidden {
  grid-template-columns: 0 1fr 0;
}

.workspace.industrial-active,
.workspace.schematic-active,
.workspace.full-panel-active {
  grid-template-columns: 1fr;
}

.workspace.library-hidden .library,
.workspace.inspector-hidden .inspector {
  padding: 0;
  overflow: hidden;
  border: 0;
}

.workspace.industrial-active .library,
.workspace.industrial-active .inspector,
.workspace.industrial-active .rail-toggle,
.workspace.schematic-active .library,
.workspace.schematic-active .inspector,
.workspace.schematic-active .rail-toggle,
.workspace.full-panel-active .library,
.workspace.full-panel-active .inspector,
.workspace.full-panel-active .rail-toggle {
  display: none;
}

.workspace.industrial-active .industrial-pcb-view,
.workspace.schematic-active .schematic-pro-view,
.workspace.full-panel-active .simulation-view,
.workspace.full-panel-active .aoi-view,
.workspace.full-panel-active .outputs {
  grid-column: 1;
}

.rail-toggle {
  position: absolute;
  top: 12px;
  z-index: 8;
  min-height: 32px;
  border-radius: 0 6px 6px 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.rail-toggle.left {
  left: 0;
}

.rail-toggle.right {
  right: 0;
  border-radius: 6px 0 0 6px;
}

.library,
.inspector {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: var(--panel);
}

.library {
  border-right: 1px solid var(--line);
}

.inspector {
  border-left: 1px solid var(--line);
}

h2 {
  margin: 8px 0 10px;
  font-size: 13px;
  color: #dce8ff;
  text-transform: uppercase;
}

.tool,
.part {
  width: 100%;
  position: relative;
  min-height: 40px;
  margin-bottom: 6px;
  padding: 9px 38px 9px 44px;
  border: 0;
  border-radius: 0;
  color: #dce8ff;
  background: transparent;
  text-align: left;
}

.tool::before,
.part::before {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 22px;
  content: "□";
  transform: translateY(-50%);
  color: #8fb6c8;
  text-align: center;
}

.tool::after,
.part::after {
  position: absolute;
  right: 14px;
  top: 50%;
  content: "›";
  transform: translateY(-52%);
  color: #38e8c6;
  font-size: 24px;
}

.tool:hover,
.tool.active,
.part:hover,
.part.active {
  color: #fff;
  background: var(--nav-accent);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.tool:hover::before,
.tool.active::before,
.part:hover::before,
.part.active::before,
.tool:hover::after,
.tool.active::after,
.part:hover::after,
.part.active::after {
  color: #fff;
}

.tool[data-tool="select"]::before {
  content: "↖";
}

.tool[data-tool="wire"]::before,
.tool[data-tool="track"]::before {
  content: "⌁";
}

.tool[data-tool="hierarchy"]::before {
  content: "▦";
}

.tool[data-tool="footprint"]::before {
  content: "▣";
}

.tool[data-tool="via"]::before {
  content: "○";
}

.parts {
  margin: 14px 0 22px;
}

.part {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.part span {
  color: var(--accent);
  font-size: 12px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #10182b;
}

.editor-panel {
  display: none;
  min-width: 0;
  min-height: 0;
}

.editor-panel.active {
  display: grid;
  grid-template-rows: 1fr 30px;
}

.schematic-pro-view.active {
  display: block;
}

.schematic-pro-view {
  min-width: 0;
  min-height: 0;
  background: #080d12;
}

.schematic-pro-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 230px 48px 292px minmax(0, 1fr) 360px;
  grid-template-rows: 52px minmax(0, 1fr);
  color: #e7f1ff;
  background: #0b1016;
}

.schematic-project-panel {
  grid-row: 1 / -1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  border-right: 1px solid #263342;
  background: #0d141c;
}

.schematic-project-panel section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #263342;
}

.schematic-suite-mark {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #2d3c4d;
  border-radius: 6px;
  background: #121d27;
}

.schematic-suite-mark strong {
  color: #e9f6ff;
  font-size: 14px;
}

.schematic-suite-mark a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 4px;
  border: 1px solid rgba(56, 232, 198, 0.46);
  border-radius: 6px;
  color: #061217;
  background: #38e8c6;
  font-size: 12px;
  font-weight: 800;
}

.schematic-suite-mark span,
.schematic-project-tree span,
.schematic-readiness-panel span,
.schematic-constraint-list span {
  color: #9fb2c9;
  font-size: 11px;
}

.schematic-slide-section {
  display: grid;
  gap: 0;
}

.schematic-slide-toggle {
  position: relative;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #263342;
  border-radius: 0;
  padding: 8px 28px 8px 0;
  color: #dce8ff;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.schematic-slide-toggle::after {
  position: absolute;
  right: 4px;
  top: 50%;
  content: ">";
  color: #38e8c6;
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.22s ease;
}

.ai-assistant-lock-toggle::before {
  content: "LOCK";
  display: inline-block;
  margin-right: 8px;
  color: #ffb703;
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
}

.schematic-slide-section:not(.open) .schematic-slide-toggle::after {
  transform: translateY(-50%) rotate(0deg);
}

.schematic-slide-content {
  max-height: 1200px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.22s ease, padding 0.22s ease;
}

.schematic-slide-section:not(.open) .schematic-slide-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
}

.schematic-top-toolbar {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #263342;
  background: #111923;
}

.schematic-top-toolbar button,
.schematic-top-toolbar select,
.schematic-top-toolbar input {
  min-height: 30px;
  border-radius: 6px;
  font-size: 12px;
}

.schematic-top-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9fb2c9;
  font-size: 12px;
}

.schematic-toggle {
  white-space: nowrap;
}

#schematicAutosaveState {
  margin-left: auto;
  color: #9fb2c9;
  font-size: 12px;
  white-space: nowrap;
}

.schematic-tool-rail,
.schematic-library-panel,
.schematic-properties-panel {
  min-height: 0;
  border-right: 1px solid #263342;
  background: #111820;
}

.schematic-tool-rail {
  grid-column: 2;
  padding: 8px 6px;
}

.schematic-library-panel {
  grid-column: 3;
}

.schematic-canvas-stage {
  grid-column: 4;
}

.schematic-properties-panel {
  grid-column: 5;
}

.schematic-tool {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 6px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.schematic-library-panel,
.schematic-properties-panel {
  overflow: auto;
  padding: 10px;
}

.schematic-properties-panel {
  border-right: 0;
  border-left: 1px solid #263342;
}

.schematic-search {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #263342;
  border-radius: 6px;
  color: #e7f1ff;
  background: #0b1118;
}

.schematic-library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 8px;
}

.schematic-library-controls select,
.schematic-library-controls button {
  min-width: 0;
  min-height: 32px;
  border: 1px solid #263342;
  border-radius: 6px;
  padding: 5px 7px;
  color: #e7f1ff;
  background: #0b1118;
  font-size: 11px;
}

.schematic-library-controls button {
  color: #061217;
  background: #38e8c6;
  font-weight: 700;
}

.schematic-library-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.schematic-library-dashboard div {
  min-width: 0;
  border: 1px solid #263342;
  border-radius: 6px;
  padding: 6px;
  background: #0b141d;
  color: #9fb2c9;
  font-size: 10px;
}

.schematic-library-dashboard strong {
  display: block;
  color: #e7f1ff;
  font-size: 12px;
}

.schematic-category-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 10px 0;
}

.schematic-category-tabs button {
  min-height: 30px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 4px 10px;
  color: #dce8ff;
  background: transparent;
  font-size: 11px;
}

.schematic-category-tabs button:hover,
.schematic-category-tabs button.active {
  border-bottom-color: var(--nav-accent);
  color: #38e8c6;
  background: transparent;
}

.schematic-symbol-list {
  display: grid;
  gap: 7px;
}

.schematic-library-count {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 8px;
  border: 1px solid #263342;
  border-radius: 6px;
  color: #9fe7ff;
  background: #0b141d;
  font-size: 11px;
}

.schematic-symbol {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  border-radius: 6px;
  text-align: left;
}

.schematic-symbol strong {
  font-size: 12px;
}

.schematic-symbol span,
.schematic-preview,
.schematic-field span {
  color: #9fb2c9;
  font-size: 11px;
}

.schematic-preview {
  margin-top: 10px;
  border: 1px solid #263342;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1118;
}

.schematic-preview canvas {
  display: block;
  width: 100%;
  height: 150px;
}

#schematicPreviewMeta {
  padding: 8px;
  border-top: 1px solid #263342;
}

.schematic-canvas-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.schematic-pro-shell.light-cad .schematic-canvas-stage {
  background: #f8fafc;
}

.schematic-sheet-tabs {
  height: 28px;
  display: flex;
  align-items: end;
  gap: 0;
  padding: 3px 8px 0;
  border-bottom: 1px solid #263342;
  background: #f8fafc;
}

.schematic-canvas-hud {
  position: absolute;
  top: 38px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 250px);
  pointer-events: none;
}

.schematic-canvas-hud span {
  padding: 4px 7px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 5px;
  color: #0f172a;
  background: rgba(248, 250, 252, 0.86);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  font-size: 11px;
}

.schematic-sheet-tab {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-bottom: 3px solid transparent;
}

.schematic-sheet-tabs button {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 4px 10px;
  color: #334155;
  background: transparent;
  font-size: 12px;
}

.schematic-sheet-tab.active {
  border-bottom-color: var(--nav-accent);
}

.schematic-sheet-tab.active > button:first-child {
  color: #0369a1;
  background: transparent;
}

.schematic-sheet-close {
  width: 20px;
  min-width: 20px;
  padding: 0;
  color: #64748b;
  font-weight: 700;
}

.schematic-sheet-close:hover {
  color: #dc2626;
}

#industrialSchematicCanvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}

.schematic-minimap {
  position: absolute;
  right: 12px;
  bottom: 42px;
  z-index: 3;
  width: 210px;
  height: 136px;
  border: 1px solid rgba(38, 51, 66, 0.8);
  border-radius: 6px;
  background: rgba(8, 13, 18, 0.86);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.schematic-overlay {
  position: absolute;
  inset: 28px 0 28px;
  pointer-events: none;
}

.schematic-statusbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-top: 1px solid #263342;
  color: #9fb2c9;
  background: #10171f;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schematic-panel {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #263342;
  border-radius: 8px;
  background: #151d25;
}

.schematic-project-tree,
.schematic-constraint-list,
.schematic-readiness-panel,
.schematic-monitor-grid,
.schematic-assistant-panel,
.schematic-simulation-panel {
  display: grid;
  gap: 7px;
}

.schematic-tree-row,
.schematic-constraint-row,
.schematic-readiness-row,
.schematic-monitor-tile,
.schematic-assistant-item,
.schematic-sim-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #263342;
  border-radius: 6px;
  background: #0c151f;
  font-size: 12px;
}

.schematic-tree-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.schematic-tree-row strong,
.schematic-monitor-tile strong,
.schematic-sim-row strong,
.schematic-readiness-row strong {
  color: #e7f1ff;
}

.schematic-constraint-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.schematic-constraint-row b,
.schematic-readiness-row b {
  color: #38e8c6;
  font-size: 11px;
  font-weight: 800;
}

.schematic-monitor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.schematic-monitor-tile {
  min-height: 58px;
}

.schematic-monitor-tile strong {
  font-size: 18px;
}

.schematic-monitor-tile span,
.schematic-assistant-item span,
.schematic-sim-row span {
  color: #9fb2c9;
  font-size: 11px;
  line-height: 1.4;
}

.schematic-assistant-item.warn {
  border-color: rgba(255, 209, 102, 0.36);
}

.schematic-assistant-item.ok {
  border-color: rgba(56, 232, 166, 0.34);
}

.schematic-sim-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.schematic-sim-row em {
  color: #ffd166;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.schematic-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.schematic-field input {
  min-width: 0;
  min-height: 28px;
  padding: 5px 7px;
  border: 1px solid #263342;
  border-radius: 5px;
  color: #e7f1ff;
  background: #0b1118;
}

.schematic-erc-list {
  display: grid;
  gap: 7px;
}

.schematic-erc-item,
.schematic-erc-pass {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
}

.schematic-erc-item strong,
.schematic-erc-item span {
  display: block;
}

.schematic-erc-item.error {
  border-color: rgba(255, 90, 116, 0.55);
  background: rgba(127, 29, 29, 0.26);
}

.schematic-erc-item.warning {
  border-color: rgba(255, 191, 71, 0.55);
  background: rgba(113, 63, 18, 0.24);
}

.schematic-erc-pass {
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #a7f3d0;
  background: rgba(20, 83, 45, 0.22);
}

.industrial-pcb-view.active {
  display: block;
}

.industrial-pcb-view {
  background: #0a0e12;
}

.legacy-schematic-runtime,
.legacy-pcb-runtime {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.industrial-pcb-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 48px 270px minmax(0, 1fr) 320px;
  color: #eaf2ff;
  background: #0a0e12;
}

.industrial-tool-rail,
.industrial-left-panel,
.industrial-right-panel {
  min-height: 0;
  border-right: 1px solid #273241;
  background: #11171d;
}

.industrial-right-panel {
  border-right: 0;
  border-left: 1px solid #273241;
  overflow: auto;
}

.industrial-tool-rail {
  padding: 8px 6px;
}

.industrial-tool {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.industrial-left-panel {
  overflow: auto;
  padding: 10px;
}

.industrial-panel {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #273241;
  border-radius: 8px;
  background: #151c23;
}

.industrial-panel h2 {
  margin: 0 0 10px;
  color: #9fb2c9;
  font-size: 12px;
  text-transform: uppercase;
}

.industrial-layer {
  display: grid;
  grid-template-columns: 18px 14px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  margin-bottom: 4px;
  border-radius: 5px;
  background: #0f151b;
  font-size: 12px;
}

.industrial-layer.active {
  outline: 1px solid #4da3ff;
  background: #172331;
}

.industrial-layer button {
  overflow: hidden;
  padding: 0;
  border: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d9e8f8;
  background: transparent;
}

.industrial-layer span:last-child {
  color: #77889b;
  text-align: right;
}

.industrial-layer-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.industrial-net-class,
.industrial-net-item,
.industrial-footprint,
.industrial-drc-item,
.industrial-export-list div,
.industrial-failed-routes {
  display: block;
  width: 100%;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid #273241;
  border-radius: 6px;
  color: #dce8f8;
  background: #0f151b;
  font-size: 12px;
  text-align: left;
}

.industrial-net-class.active {
  border-color: #4da3ff;
}

.industrial-net-item {
  display: grid;
  gap: 2px;
}

.industrial-net-item.active {
  border-color: #38bdf8;
  background: #12304a;
}

.industrial-net-item strong,
.industrial-net-item span {
  display: block;
}

.industrial-net-item span {
  color: #8ea5ba;
  font-size: 11px;
}

.industrial-rule-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: #9fb2c9;
  font-size: 12px;
}

.industrial-rule-field input {
  min-width: 0;
  padding: 6px;
  border: 1px solid #273241;
  border-radius: 5px;
  color: #eaf2ff;
  background: #0f151b;
}

.industrial-canvas-area {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #020617;
}

.industrial-toolbar {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #273241;
  background: #11171d;
}

.industrial-toolbar button,
.industrial-toolbar select {
  min-height: 30px;
  border-radius: 6px;
}

.industrial-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9fb2c9;
  font-size: 12px;
}

#industrialActiveReadout {
  margin-left: auto;
  color: #9fb2c9;
  font-size: 12px;
}

#industrialPcbCanvas {
  display: block;
  width: 100%;
  cursor: crosshair;
}

.industrial-statusbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  padding: 6px 10px;
  border-top: 1px solid #273241;
  color: #9fb2c9;
  background: #11171d;
  font-size: 12px;
}

.industrial-properties label {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.industrial-properties span {
  color: #9fb2c9;
}

.industrial-properties input {
  min-width: 0;
  padding: 6px;
  border: 1px solid #273241;
  border-radius: 5px;
  color: #eaf2ff;
  background: #0f151b;
}

.industrial-properties select {
  min-width: 0;
  padding: 6px;
  border: 1px solid #273241;
  border-radius: 5px;
  color: #eaf2ff;
  background: #0f151b;
}

.industrial-selected-type {
  margin-bottom: 8px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.industrial-empty-state {
  color: #9fb2c9;
  font-size: 12px;
}

.industrial-drc-item {
  cursor: pointer;
}

.industrial-drc-item.active {
  border-color: #ff5a74;
  box-shadow: 0 0 0 1px rgba(255, 90, 116, 0.28);
}

.industrial-drc-item strong {
  display: block;
  margin-bottom: 4px;
  color: #ff9aa8;
}

.industrial-drc-item span,
.industrial-export-list span {
  display: block;
  color: #9fb2c9;
}

.industrial-drc-pass {
  padding: 10px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  border-radius: 6px;
  color: #a7f3d0;
  background: rgba(20, 83, 45, 0.22);
  font-size: 12px;
}

.industrial-autorouter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.industrial-autorouter-actions button {
  min-height: 30px;
  border-radius: 6px;
  font-size: 12px;
}

.industrial-route-meter {
  height: 8px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #0b1117;
}

.industrial-route-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4da3ff, #38e8a5);
  transition: width 0.24s ease;
}

.industrial-route-progress {
  color: #9fb2c9;
  font-size: 12px;
  line-height: 1.4;
}

.industrial-route-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.industrial-route-settings label {
  display: grid;
  gap: 4px;
  color: #9fb2c9;
  font-size: 11px;
}

.industrial-route-settings input,
.industrial-route-settings select {
  min-width: 0;
  min-height: 28px;
  border-radius: 5px;
}

.industrial-failed-routes {
  margin-top: 10px;
  color: #9fb2c9;
  line-height: 1.4;
}

.industrial-failed-routes strong {
  display: block;
  color: #ffcc66;
}

.canvas-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: #f7fafc;
}

.canvas-wrap canvas {
  display: block;
  width: 1600px;
  height: 1000px;
}

.pcb-bg {
  background: #103326;
}

.statusbar {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  border-top: 1px solid #c8d2de;
  color: #263448;
  background: #edf3f8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pcb .statusbar {
  border-top-color: rgba(255, 255, 255, 0.18);
  color: #d9f7e9;
  background: #0d281e;
}

.panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.mini-list {
  display: grid;
  gap: 8px;
  color: #dbe7ff;
  font-size: 12px;
}

.mini-item {
  padding: 8px;
  border-left: 3px solid var(--accent-2);
  background: rgba(255, 255, 255, 0.04);
}

.mini-item.warn {
  border-left-color: var(--warn);
}

.mini-item.danger {
  border-left-color: var(--danger);
}

.mini-item.ok {
  border-left-color: var(--accent);
}

.selection-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.selection-actions button,
.wide-btn {
  min-height: 32px;
  border-radius: 6px;
}

.canvas-context-menu {
  position: fixed;
  z-index: 50;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1426;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.canvas-context-menu[hidden] {
  display: none !important;
}

.canvas-context-menu button {
  width: 100%;
  text-align: left;
  border-radius: 6px;
}

.wide-btn {
  width: 100%;
  margin: 8px 0;
}

.property-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.property-editor label,
.file-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.property-editor input,
.property-editor select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #10182b;
}

.file-field input {
  width: 100%;
  color: var(--muted);
}

.outputs {
  position: absolute;
  inset: 0 300px 0 230px;
  z-index: 5;
  padding: 18px;
  overflow: auto;
  background: #0f1628;
}

.aoi-view {
  background: #0f1628;
}

.aoi-workbench {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.aoi-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.12), rgba(77, 163, 255, 0.08));
}

.aoi-hero img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 209, 102, 0.38));
}

.aoi-hero h2 {
  margin: 0 0 6px;
  color: #ffd166;
  font-size: 20px;
}

.aoi-hero p {
  margin: 0;
  color: var(--muted);
}

.simulation-view {
  background: #0f1628;
}

.simulation-workbench {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.simulation-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 16px;
  align-items: start;
}

.simulation-controls,
.simulation-results {
  display: grid;
  gap: 12px;
}

.simulation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.engine-capabilities {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #243554;
  border-radius: 8px;
  background: #08101f;
}

.engine-capabilities h3 {
  margin: 0;
  color: #dbe7ff;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.capability-list {
  display: grid;
  gap: 7px;
}

.capability-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.capability-row strong {
  color: #dbe7ff;
  font-weight: 700;
  text-align: right;
}

.capability-row strong.ok {
  color: #38e8a5;
}

.capability-row strong.warn {
  color: #ffd166;
}

.capability-row strong.danger {
  color: #ff6b6b;
}

.capability-error {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.capability-error p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #dbe7ff;
}

.simulation-chart {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08101f;
}

.simulation-terminal {
  min-height: 160px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #243554;
  border-radius: 8px;
  color: #dbe7ff;
  background: #050912;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.simulation-pro-workbench {
  height: 100%;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  background: #071017;
}

.simulation-review-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 12px;
  border-bottom: 1px solid #254154;
  background: #0c1822;
}

.simulation-review-strip strong {
  color: #e7f6ff;
  font-size: 13px;
  letter-spacing: 0;
}

.simulation-review-strip span {
  padding: 4px 8px;
  border: 1px solid rgba(100, 210, 255, 0.45);
  border-radius: 999px;
  color: #9fe7ff;
  background: rgba(13, 148, 190, 0.14);
  font-size: 12px;
  text-transform: uppercase;
}

.simulation-review-strip button,
.waveform-toolbar button,
.simulation-tabs button {
  min-height: 28px;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
}

.simulation-review-strip button:first-of-type {
  margin-left: auto;
}

.simulation-pro-layout {
  min-height: 0;
  grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.simulation-setup-panel,
.simulation-waveform-panel {
  border: 0;
  border-radius: 0;
  background: #101923;
}

.simulation-setup-panel {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #254154;
}

.simulation-waveform-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto minmax(110px, 170px) auto;
  overflow: hidden;
}

.simulation-setup-panel h2,
.simulation-waveform-panel h2 {
  color: #9fe7ff;
}

.waveform-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 8px;
  color: #9fb2c9;
  font-size: 12px;
}

.waveform-toolbar span {
  margin-left: auto;
}

#simulationChart {
  width: 100%;
  min-height: 280px;
  border: 1px solid #254154;
  border-radius: 8px;
  background: #071017;
}

.simulation-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 10px;
}

.simulation-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #dce8ff;
  background: transparent;
}

.simulation-tabs button.active {
  border-bottom-color: var(--nav-accent);
  color: #38e8c6;
  background: transparent;
}

.simulation-mini-panel {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #254154;
  border-radius: 8px;
  background: #0b141d;
}

.simulation-mini-panel.active {
  display: grid;
  gap: 8px;
}

.simulation-plot-gallery {
  display: flex;
  gap: 8px;
  min-height: 34px;
  overflow-x: auto;
  color: #9fb2c9;
  font-size: 12px;
}

.simulation-diagnostics {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #254154;
  border-radius: 8px;
  color: #ffd166;
  background: #0b141d;
  font: 12px/1.45 Consolas, "Courier New", monospace;
}

@media (max-width: 1120px) {
  .simulation-layout {
    grid-template-columns: 1fr;
  }
}

.aoi-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 16px;
  margin-top: 16px;
}

.aoi-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.filter-output {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.filter-output img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080d18;
}

@media (max-width: 1120px) {
  .aoi-images {
    grid-template-columns: 1fr;
  }
}

.aoi-images img {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080d18;
}

.score-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 209, 102, 0.5);
  border-radius: 8px;
  color: #1b1300;
  background: #ffd166;
  font-size: 22px;
  font-weight: 700;
}

.terminal-panel {
  margin-top: 16px;
}

#visionTerminal {
  min-height: 170px;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #243554;
  border-radius: 8px;
  color: #8ef0c0;
  background: #050912;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.watermark {
  position: fixed;
  right: 12px;
  bottom: 8px;
  z-index: 30;
  pointer-events: none;
  color: rgba(238, 244, 255, 0.34);
  font-size: 11px;
}

.aoi-coming-soon {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  background: rgba(5, 9, 18, 0);
  opacity: 0;
  transition: opacity 0.26s ease, background 0.26s ease;
}

.aoi-coming-soon[hidden] {
  display: none;
}

.aoi-coming-soon.show {
  background: rgba(5, 9, 18, 0.56);
  opacity: 1;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 9, 18, 0);
  opacity: 0;
  transition: opacity 0.24s ease, background 0.24s ease;
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal.show {
  background: rgba(5, 9, 18, 0.68);
  opacity: 1;
}

.feedback-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 420px);
  gap: 20px;
  align-items: center;
  max-width: min(760px, 100%);
  padding: 22px;
  border: 1px solid rgba(77, 163, 255, 0.42);
  border-radius: 8px;
  background: #101827;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.feedback-card img {
  width: 180px;
  max-width: 100%;
  object-fit: contain;
}

.feedback-copy {
  display: grid;
  gap: 10px;
}

.feedback-kicker {
  margin: 0;
  color: #38e8c6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-copy h2,
.feedback-copy p {
  margin: 0;
}

.feedback-copy h2 {
  color: #eef4ff;
  font-size: 24px;
}

.feedback-copy p:not(.feedback-kicker) {
  color: #9fb2c9;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-copy textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid #263342;
  border-radius: 6px;
  padding: 10px;
  color: #eef4ff;
  background: #08111a;
  font: 13px/1.45 Inter, "Segoe UI", sans-serif;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-actions button {
  min-height: 38px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
}

#feedbackSubmit {
  border-color: #38e8c6;
  color: #061217;
  background: #38e8c6;
}

@media (max-width: 720px) {
  .feedback-card {
    grid-template-columns: 1fr;
  }

  .feedback-card img {
    width: 130px;
    margin: 0 auto;
  }
}

.aoi-coming-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 209, 102, 0.56);
  border-radius: 8px;
  color: #eef4ff;
  background: linear-gradient(145deg, rgba(20, 26, 46, 0.98), rgba(8, 16, 31, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), 0 0 42px rgba(255, 209, 102, 0.18);
  text-align: center;
  transform: translateY(18px) scale(0.94);
  animation: none;
}

.aoi-coming-soon.show .aoi-coming-card {
  animation: aoiComingPop 0.62s cubic-bezier(0.2, 1.2, 0.22, 1) both;
}

.aoi-lock-mark {
  position: relative;
  width: 64px;
  height: 52px;
  border: 3px solid #ffd166;
  border-radius: 8px;
  box-shadow: inset 0 0 18px rgba(255, 209, 102, 0.22), 0 0 22px rgba(255, 209, 102, 0.24);
}

.aoi-lock-mark::before {
  position: absolute;
  left: 13px;
  top: -30px;
  width: 32px;
  height: 36px;
  content: "";
  border: 3px solid #ffd166;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.aoi-lock-mark::after {
  position: absolute;
  left: 50%;
  top: 17px;
  width: 8px;
  height: 18px;
  content: "";
  border-radius: 10px;
  background: #38e8a5;
  transform: translateX(-50%);
  animation: aoiLockBlink 1s ease-in-out infinite;
}

.aoi-coming-card p {
  margin: 0;
  color: #ffd166;
  font-size: 30px;
  font-weight: 900;
}

.aoi-coming-card small {
  max-width: 310px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@keyframes aoiComingPop {
  0% {
    transform: translateY(18px) scale(0.94);
    opacity: 0;
  }

  62% {
    transform: translateY(-4px) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes aoiLockBlink {
  0%,
  100% {
    opacity: 0.44;
    transform: translateX(-50%) scaleY(0.78);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
}

.aoi-panel {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.aoi-run {
  border-color: #ffd166;
  color: #1b1300;
  background: #ffd166;
}

.output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 100%;
}

textarea {
  width: 100%;
  height: calc(100% - 36px);
  min-height: 420px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: #c9f7e2;
  background: #080d18;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    padding: 8px 12px 0;
  }

  .app-shell {
    grid-template-rows: auto 1fr;
  }

  .brand {
    min-width: 100%;
    padding-bottom: 8px;
  }

  .tabs {
    order: 3;
    min-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .tab {
    min-height: 48px;
    white-space: nowrap;
  }

  .actions {
    margin-left: auto;
  }

  .menu>button {
    min-height: 42px;
    font-size: 14px;
  }

  .menu-pop {
    right: auto;
    left: 0;
    min-width: min(360px, calc(100vw - 24px));
    padding: 14px 18px;
  }

  .workspace {
    grid-template-columns: 176px 1fr;
  }

  .inspector {
    display: none;
  }

  .outputs {
    inset: 0 0 0 176px;
  }

  .output-grid {
    grid-template-columns: 1fr;
  }
}
