/* File: src/styles.css | Purpose: Responsive application design, diagram editor, dialogs, and a soft light theme. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../assets/fonts/PlusJakartaSans-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}
/* One soft daylight palette, with warm surfaces and muted botanical accents. */
:root {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
  --bg: #d5dfd6;
  --panel: #e3e9dd;
  --panel2: #d9e3d4;
  --text: #233d33;
  --muted: #425c50;
  --border: #b5c5b0;
  --accent: #386453;
  --accent2: #357c81;
  --danger: #a44845;
  --shadow: 0 6px 24px #334c3810;
  --mono: 'JetBrains Mono', Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--panel2);
  padding: 8px 11px;
  border-radius: 8px;
}
button:hover {
  border-color: var(--accent);
  background: #dfe5d9;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
  font-weight: 700;
}
.danger {
  color: var(--danger);
}
input,
select,
textarea {
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px;
  border-radius: 8px;
  min-width: 0;
}
input[type='checkbox'] {
  accent-color: var(--accent);
}
.top {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 19px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand img {
  width: 42px;
  height: 42px;
}
.brand strong {
  font-size: 19px;
  letter-spacing: -0.6px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.toolbar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.workspace {
  display: grid;
  grid-template-columns: 255px minmax(300px, 1fr) 335px;
  height: calc(100dvh - 111px);
  min-height: 570px;
}
.sidebar,
.inspector {
  background: var(--panel);
  padding: 16px;
  overflow: auto;
}
.sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inspector {
  border-left: 1px solid var(--border);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 700;
}
.sidebar > input {
  width: 100%;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.sectionhead h2,
.inspector h2 {
  font-size: 14px;
  margin: 0;
}
.sectionhead h2 span {
  font-weight: 400;
  color: var(--muted);
}
.table-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: auto;
}
.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
}
.table-row.selected {
  background: #dce6d7;
  border-color: var(--accent);
}
.table-row span {
  color: var(--muted);
  font-size: 11px;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}
.stat {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.stat strong {
  color: var(--text);
}
.wide {
  width: 100%;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.canvas-toolbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
}
.tabs,
.canvas-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tabs button {
  background: transparent;
  border-color: transparent;
}
.tabs button.active {
  background: var(--panel2);
  border-color: var(--border);
  color: var(--accent2);
}
.canvas-actions select {
  max-width: 130px;
}
.canvas-actions span {
  min-width: 43px;
  text-align: center;
  color: var(--muted);
}
.diagram-panel {
  position: relative;
  flex: 1;
  overflow: auto;
  background-color: var(--bg);
  background-image: radial-gradient(var(--border) 0.8px, transparent 0.8px);
  background-size: 20px 20px;
}
.diagram-hint {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 2;
  background: var(--panel);
  color: var(--muted);
  width: max-content;
  max-width: 95%;
  padding: 9px 13px;
  border-radius: 0 0 10px 0;
  box-shadow: var(--shadow);
  font-size: 11px;
}
.canvas-footnote {
  position: sticky;
  bottom: 10px;
  left: 12px;
  z-index: 2;
  background: var(--panel);
  color: var(--muted);
  width: max-content;
  max-width: 90%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 10px;
}
#diagramViewport {
  position: relative;
  min-width: 1400px;
  min-height: 950px;
  transform-origin: top left;
}
#edges {
  position: absolute;
  inset: 0;
  width: 1400px;
  height: 950px;
  pointer-events: none;
  overflow: visible;
}
#nodes {
  position: absolute;
  inset: 0;
}
.node {
  position: absolute;
  width: 232px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
}
.node.selected {
  border: 2px solid var(--accent);
}
.node-title {
  padding: 11px 13px;
  background: var(--panel2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  font-weight: 750;
}
.node-title:active {
  cursor: grabbing;
}
.node-title small {
  font-size: 10px;
  color: var(--muted);
}
.node-col {
  padding: 7px 11px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-top: 1px solid var(--border);
  font-size: 11px;
}
.node-col .type {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.node-col .pk {
  color: #956620;
}
.node-col .fk {
  color: var(--accent2);
}
.node-empty {
  padding: 12px;
  color: var(--muted);
}
.inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
#selectedBadge {
  color: var(--muted);
  font-size: 11px;
}
.inspector-body {
  padding-top: 16px;
}
.empty {
  color: var(--muted);
  line-height: 1.7;
  padding: 30px 10px;
  text-align: center;
}
.field {
  display: grid;
  gap: 5px;
  margin-bottom: 13px;
}
.field label {
  color: var(--muted);
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
}
.inspector-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 16px;
}
.inspector-section h3 {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.col-editor {
  border: 1px solid var(--border);
  padding: 11px;
  border-radius: 9px;
  margin-bottom: 9px;
  background: var(--panel2);
}
.col-editor .col-top {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.col-editor .col-top input {
  flex: 1;
  width: 0;
}
.col-editor .col-top select {
  width: 112px;
}
.col-flags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.col-flags label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.col-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.col-actions input {
  width: 70%;
  font-size: 11px;
}
.relation-item,
.index-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  margin: 8px 0;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}
.relation-item small {
  color: var(--muted);
}
.code-panel {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 15px;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.code-panel pre {
  white-space: pre;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-height: 75%;
  line-height: 1.7;
  color: var(--text);
  font-size: 12px;
}
.hidden {
  display: none !important;
}
footer {
  height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
footer a {
  color: var(--accent2);
  text-decoration: none;
}
.modal {
  position: fixed;
  inset: 0;
  background: #273d3659;
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  z-index: 10;
  padding: 15px;
}
.modal-card {
  width: min(600px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-top h2 {
  font-size: 18px;
}
.modal-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.modal-options button {
  text-align: left;
  padding: 14px;
}
.modal-options button strong {
  display: block;
}
.modal-options button small {
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--accent);
  color: white;
  border-radius: 9px;
  padding: 10px 18px;
  display: none;
  max-width: 90vw;
}
.validation {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 7px 0;
}
.validation.error {
  border-color: var(--danger);
}
.validation.good {
  border-color: #38b59b;
}
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 220px minmax(250px, 1fr) 290px;
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 200px minmax(300px, 1fr);
    height: auto;
    min-height: calc(100dvh - 111px);
  }
  .inspector {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--border);
    max-height: none;
  }
  .main {
    min-height: 600px;
  }
  .sidebar {
    min-height: 600px;
  }
}
@media (max-width: 650px) {
  .top {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    min-height: 0;
    max-height: 300px;
  }
  .main {
    min-height: 550px;
  }
  .canvas-toolbar {
    flex-wrap: wrap;
  }
  .canvas-actions {
    flex-wrap: wrap;
  }
  .inspector {
    max-height: none;
  }
  footer {
    height: auto;
    min-height: 39px;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .diagram-panel {
    min-height: 450px;
  }
}
/* Surface hierarchy, colorful line icons, and comfortable editing controls. */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  font-weight: 600;
  transition:
    background 0.16s,
    border-color 0.16s,
    box-shadow 0.16s;
  white-space: nowrap;
}
button:active {
  box-shadow: inset 0 2px 4px #334c3818;
}
button.primary:hover {
  background: #2e5545;
  border-color: #2e5545;
}
input,
select,
textarea {
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
  background: #ebeee6;
}
input:hover,
select:hover {
  border-color: #98ae9e;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #38645312;
}
.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  vertical-align: middle;
  pointer-events: none;
}
.icon-sage {
  color: #386453;
}
.icon-violet {
  color: #7862a1;
}
.icon-blue {
  color: #397996;
}
.icon-clay {
  color: #ad673e;
}
.icon-slate {
  color: #5b6d72;
}
.icon-gold {
  color: #986718;
}
.icon-inherit {
  color: inherit;
}
.top {
  background: #eceee5;
  box-shadow: 0 1px 0 #ffffff40;
  position: relative;
  z-index: 3;
}
.brand strong {
  font-size: 21px;
  letter-spacing: -0.8px;
  font-weight: 750;
}
.brand small {
  font-size: 11px;
  letter-spacing: 0.1px;
}
.brand img {
  border-radius: 13px;
  box-shadow: 0 3px 9px #38645314;
}
.toolbar #exportBtn {
  background: #dbe6d6;
  border-color: #b8cab2;
  color: #315b44;
}
.toolbar #undoBtn,
.toolbar #redoBtn {
  width: 36px;
  padding: 8px;
}
.sidebar,
.inspector {
  scrollbar-width: thin;
  scrollbar-color: #b6c3b2 transparent;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #63796b;
}
#projectName {
  font-weight: 650;
  background: #e5eade;
}
.sectionhead h2,
.inspector h2 {
  font-size: 14px;
  letter-spacing: -0.2px;
}
.sectionhead h2 span {
  display: inline-block;
  background: #dde5d7;
  color: #426347;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 11px;
}
.table-row {
  min-height: 44px;
  background: transparent;
  border-color: transparent;
  border-radius: 9px;
  gap: 8px;
}
.table-row b {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.table-row.selected {
  border-color: #b2c5a9;
  box-shadow: inset 3px 0 #5c8056;
}
.table-row > span {
  font-size: 10px;
  white-space: nowrap;
  background: #e5eade;
  padding: 2px 5px;
  border-radius: 5px;
}
.side-bottom {
  gap: 12px;
}
.stat strong {
  font-variant-numeric: tabular-nums;
  background: #e1e7da;
  border-radius: 5px;
  padding: 0 7px;
}
.canvas-toolbar {
  background: #eceee6;
  flex-wrap: wrap;
  min-height: 62px;
}
.tabs {
  gap: 3px;
  background: #e2e7dc;
  border: 1px solid #d3dbce;
  border-radius: 10px;
  padding: 3px;
}
.tabs button {
  font-size: 12px;
  padding: 7px 9px;
  min-height: 32px;
  gap: 6px;
}
.tabs button.active {
  background: #f0f2ea;
  color: #315b44;
  border-color: #c6d2bf;
  box-shadow: 0 2px 5px #334c3810;
}
.canvas-actions {
  font-size: 11px;
}
.canvas-actions button {
  min-height: 32px;
  padding: 6px 8px;
}
.canvas-actions select {
  padding: 7px;
  font-size: 11px;
}
.canvas-actions #zoomLabel {
  font-variant-numeric: tabular-nums;
}
.diagram-panel {
  background-color: #e1e6dc;
  background-image: radial-gradient(#b7c3b3 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}
.diagram-hint {
  background: #edf0e6e8;
  box-shadow: 0 2px 8px #334c3808;
  border-right: 1px solid #ccd5c5;
  border-bottom: 1px solid #ccd5c5;
  line-height: 1.6;
}
.canvas-footnote {
  background: #edf0e7f2;
  border: 1px solid #ccd5c5;
  line-height: 1.5;
}
.node {
  background: #f0f1e9;
  border-color: #bfcdb8;
  box-shadow: 0 5px 18px #3c533519;
  border-radius: 12px;
}
.node.selected {
  border: 1px solid #5d8054;
  box-shadow:
    0 0 0 3px #5d80541c,
    0 8px 24px #3c53351c;
}
.node-title {
  background: #dfe8d8;
  padding: 11px 12px;
  min-height: 44px;
  touch-action: none;
  gap: 5px;
  border-bottom: 1px solid #c3d0bb;
}
.node-title > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.node-title small {
  white-space: nowrap;
  font-size: 9px;
}
.node-title .icon {
  width: 16px;
  height: 16px;
}
.node:nth-child(3n + 2) .node-title {
  background: #dde8e8;
  border-color: #c2d4d3;
}
.node:nth-child(3n + 2) .node-title .icon {
  color: #387d86;
}
.node:nth-child(3n + 3) .node-title {
  background: #e8e1ed;
  border-color: #d3c6dd;
}
.node:nth-child(3n + 3) .node-title .icon {
  color: #7e669c;
}
.node-col {
  min-height: 30px;
  border-color: #d7dfd1;
  gap: 7px;
  padding: 6px 10px;
  font-size: 11px;
}
.node-col > span:first-child {
  display: inline-flex;
  align-items: center;
  flex: 0 0 14px;
}
.node-col .icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}
.node-col > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-col .type {
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}
.inspector-head {
  gap: 8px;
}
#selectedBadge {
  font-size: 10px;
  background: #dfe7d7;
  color: #436540;
  border: 1px solid #c4d1bb;
  border-radius: 20px;
  padding: 3px 7px;
  white-space: nowrap;
}
.field label {
  font-size: 11px;
  font-weight: 600;
}
.field input {
  font-size: 12px;
}
.col-editor {
  background: #e6eadf;
  border-color: #cbd5c3;
  border-radius: 11px;
  padding: 12px;
}
.col-editor input,
.col-editor select {
  background: #f0f1e9;
  font-size: 11px;
}
.col-editor .col-top select {
  width: 105px;
}
.col-flags {
  gap: 9px;
  font-size: 10px;
}
.col-flags label {
  gap: 2px;
}
.col-flags input {
  width: 13px;
  height: 13px;
}
.col-actions button {
  font-size: 10px;
  padding: 6px;
  min-height: 30px;
}
.col-actions input {
  font-family: var(--mono);
  font-size: 10px;
}
.inspector-section h3 {
  font-size: 12px;
}
.inspector-section h3 button {
  font-size: 10px;
  min-height: 29px;
  padding: 5px 8px;
}
.danger {
  background: #eee2dc;
  border-color: #d9c5bc;
}
.danger:hover {
  background: #e8d5cc;
  border-color: #bc8e7d;
}
.index-item,
.relation-item {
  background: #e8ece2;
  font-size: 11px;
}
.index-item .danger,
.relation-item .danger {
  min-height: 28px;
  padding: 4px 6px;
}
.code-panel {
  background: #e5e9df;
}
.code-head {
  font-size: 12px;
  gap: 8px;
}
.code-head > span {
  margin-right: auto;
  font-weight: 700;
  color: #486647;
}
.code-panel pre {
  background: #edf0e6;
  font-family: var(--mono);
  border-color: #c7d2bf;
  box-shadow: var(--shadow);
  color: #334f45;
  font-size: 12px;
  line-height: 1.9;
}
.code-panel code {
  font-family: inherit;
}
.modal-card {
  background: #eef0e6;
  border-color: #bdcbb5;
  box-shadow: 0 24px 80px #263b3430;
  padding: 24px;
  border-radius: 18px;
}
.modal-top h2 {
  color: #304e40;
  letter-spacing: -0.4px;
}
.modal-options button {
  display: block;
  white-space: normal;
  background: #e3e9dc;
  line-height: 1.7;
}
.modal-options button:hover {
  background: #dbe5d1;
}
.modal-options small {
  font-weight: 400;
}
#toast {
  background: #e2ebd9;
  border: 1px solid #a8bfa0;
  color: #2f5039;
  box-shadow: 0 8px 28px #334c3824;
  font-weight: 600;
  font-size: 12px;
  padding: 12px 20px;
}
.validation {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #e6ecde;
  line-height: 1.7;
}
.validation.error {
  background: #efe3dc;
}
.validation .icon {
  margin-top: 3px;
}
footer {
  background: #e7ebe0;
  font-size: 10px;
  letter-spacing: 0.1px;
}
footer a {
  font-weight: 650;
  color: #3f6e59;
}
@media (max-width: 650px) {
  .brand strong {
    font-size: 20px;
  }
  .toolbar {
    gap: 5px;
  }
  .toolbar button {
    font-size: 11px;
    padding: 7px 8px;
  }
  .tabs button {
    font-size: 11px;
  }
  .canvas-toolbar {
    gap: 10px;
  }
  .diagram-hint {
    font-size: 10px;
  }
  .modal-card {
    padding: 18px;
  }
  .table-row b {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* Edge controls stay visible while panel contents scroll independently. */
[hidden] {
  display: none !important;
}
.workspace {
  --project-width: 255px;
  --inspector-width: 335px;
  grid-template-columns: var(--project-width) minmax(300px, 1fr) var(--inspector-width);
}
.workspace.project-collapsed {
  --project-width: 52px;
}
.workspace.inspector-collapsed {
  --inspector-width: 52px;
}
.sidebar,
.inspector {
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.sidebar {
  padding-right: 27px;
}
.inspector {
  padding-left: 27px;
  display: flex;
  flex-direction: column;
}
.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b6c3b2 transparent;
}
.sidebar-content > input {
  width: 100%;
}
.inspector-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b6c3b2 transparent;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  flex-shrink: 0;
}
.inspector-head {
  flex-shrink: 0;
}
.inspector-head h2 {
  margin-right: auto;
}
.inspector-head #selectedBadge {
  font-size: 9px;
  padding: 3px 5px;
}
.panel-toggle {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 24px;
  min-height: 48px;
  height: 48px;
  padding: 3px;
  z-index: 4;
  background: #dce5d4;
  border: 1px solid #b7c8ac;
  box-shadow: 0 2px 6px #334c3812;
}
.sidebar .panel-toggle {
  right: 0;
  border-right: 0;
  border-radius: 9px 0 0 9px;
}
.inspector .panel-toggle {
  left: 0;
  border-left: 0;
  border-radius: 0 9px 9px 0;
}
.panel-toggle:hover {
  background: #cddfc2;
  border-color: #8fa883;
}
.panel-rail-label {
  display: none;
  position: absolute;
  top: calc(50% + 42px);
  left: 50%;
  translate: -50% 0;
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #486647;
  white-space: nowrap;
  pointer-events: none;
}
.inspector .panel-rail-label {
  color: #7862a1;
}
.project-collapsed .sidebar,
.inspector-collapsed .inspector {
  padding: 0;
}
.project-collapsed .sidebar-head,
.inspector-collapsed .inspector-head {
  padding: 0;
  border: 0;
  min-height: 0;
}
.project-collapsed .sidebar-head label,
.inspector-collapsed .inspector-head h2,
.inspector-collapsed #selectedBadge {
  display: none;
}
.project-collapsed .sidebar .panel-rail-label,
.inspector-collapsed .inspector .panel-rail-label {
  display: block;
}
@media (max-width: 1200px) {
  .workspace {
    --project-width: 220px;
    --inspector-width: 290px;
    grid-template-columns: var(--project-width) minmax(250px, 1fr) var(--inspector-width);
  }
}
@media (max-width: 950px) {
  .workspace {
    grid-template-columns: var(--project-width) minmax(300px, 1fr);
  }
  .inspector,
  .inspector-collapsed .inspector {
    padding: 12px 44px 12px 16px;
    overflow: visible;
  }
  .inspector-collapsed .inspector-head h2 {
    display: block;
  }
  .inspector .panel-toggle {
    left: auto;
    right: 0;
    top: 12px;
    translate: none;
    width: 30px;
    min-height: 30px;
    height: 30px;
    border-left: 1px solid #b7c8ac;
    border-right: 0;
    border-radius: 9px 0 0 9px;
  }
  .inspector .panel-toggle .icon {
    rotate: 90deg;
  }
  .inspector-collapsed .inspector .panel-rail-label {
    display: none;
  }
  .inspector-body {
    flex: none;
    overflow: visible;
  }
}
@media (max-width: 650px) {
  .sidebar-content {
    flex: none;
    min-height: auto;
    max-height: 255px;
  }
  .sidebar {
    max-height: 340px;
  }
  .sidebar,
  .project-collapsed .sidebar {
    padding: 12px 44px 12px 16px;
  }
  .project-collapsed .sidebar-head {
    min-height: 30px;
  }
  .project-collapsed .sidebar-head label {
    display: block;
  }
  .sidebar .panel-toggle {
    right: 0;
    top: 12px;
    translate: none;
    width: 30px;
    min-height: 30px;
    height: 30px;
  }
  .sidebar .panel-toggle .icon {
    rotate: 90deg;
  }
  .project-collapsed .sidebar .panel-rail-label {
    display: none;
  }
  .inspector-head #selectedBadge {
    font-size: 10px;
  }
}
/* Richer light surfaces and stronger type contrast for long editing sessions. */
.top {
  background: #dce6d5;
  border-color: #b2c6a9;
}
.canvas-toolbar {
  background: #d8e3de;
  border-color: #b6c9bf;
}
.sidebar {
  background: #dce6d3;
}
.inspector {
  background: #e0dfe9;
}
.inspector-head {
  border-color: #bfb8ce;
}
.inspector-head h2 {
  color: #51416e;
}
.sidebar-head .eyebrow {
  color: #31523b;
}
.sidebar-head .eyebrow,
.inspector-head h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.panel-rail-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2c513b;
}
.inspector .panel-rail-label {
  color: #584174;
}
.sidebar .panel-toggle {
  background: #bdd2b0;
  border-color: #91ad80;
  color: #264a32;
}
.inspector .panel-toggle {
  background: #ccc0df;
  border-color: #a390bc;
  color: #51386f;
}
.sidebar .panel-toggle:hover {
  background: #abc79b;
}
.inspector .panel-toggle:hover {
  background: #bdacd5;
}
.diagram-panel {
  background-color: #d0ddd3;
  background-image: radial-gradient(#9ab19d 0.8px, transparent 0.8px);
}
.diagram-hint,
.canvas-footnote {
  background: #dbe6d5;
  color: #3e5747;
  border-color: #b0c5a6;
  font-size: 12px;
}
.canvas-footnote {
  font-size: 11px;
}
.brand small,
.field label,
.stat,
.col-flags,
.empty,
.modal-options button small {
  color: #40564b;
}
.table-row > span {
  font-size: 11px;
  color: #3b5645;
  background: #cfdec5;
}
.table-row.selected {
  background: #c3d8b6;
  border-color: #8eae7e;
}
.tabs {
  background: #c9d9cf;
  border-color: #a9c0b2;
}
.tabs button {
  color: #304b3e;
}
.tabs button.active {
  background: #e2ecdb;
  color: #274f36;
  border-color: #98b48e;
}
#projectName {
  background: #d0dfc6;
  color: #28472f;
}
input,
select,
textarea {
  background: #e4eadc;
  color: #263e32;
}
input::placeholder {
  color: #546557;
  opacity: 1;
}
.sectionhead h2 span,
.stat strong {
  background: #c7d9bd;
  color: #2d4a32;
}
.node {
  background: #e3ebdc;
  border-color: #9cb38f;
}
.node-title {
  background: #bdd3aa;
  border-color: #9bb98b;
  color: #25442c;
}
.node:nth-child(3n + 2) .node-title {
  background: #b9d3d4;
  border-color: #92b7b9;
  color: #244e52;
}
.node:nth-child(3n + 3) .node-title {
  background: #cec0df;
  border-color: #af99c5;
  color: #4d3868;
}
.node-title > span {
  display: block;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  font-size: 13px;
}
.node-title > span .icon {
  margin-right: 5px;
  vertical-align: -3px;
}
.node-title small {
  font-size: 10px;
  color: #3d5144;
  flex-shrink: 0;
}
.node-col {
  font-size: 12px;
  min-height: 32px;
  border-color: #c4d2bb;
}
.node-col .type {
  color: #3b5848;
  font-size: 10px;
}
.node-col > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.col-editor {
  background: #d4d4e1;
  border-color: #b7b2c8;
}
.col-editor input,
.col-editor select {
  background: #e7e6ed;
  color: #302d42;
  font-size: 12px;
}
.col-editor .col-top select {
  width: 100px;
}
.col-flags {
  font-size: 11px;
  color: #454055;
}
.col-actions input {
  font-size: 11px;
}
.col-actions button {
  font-size: 11px;
}
.inspector-section h3 {
  font-size: 13px;
  color: #413653;
}
.inspector-section h3 button {
  font-size: 11px;
}
.inspector .field label {
  color: #4e435e;
  font-size: 12px;
}
.inspector .field input {
  background: #e7e5ed;
  color: #332d43;
  font-size: 13px;
}
.inspector-head #selectedBadge {
  font-size: 10px;
  background: #cdc3dd;
  color: #483360;
  border-color: #ad99c4;
}
.index-item,
.relation-item {
  background: #d5cfdf;
  color: #3b314e;
  font-size: 12px;
  border-color: #bcb0cd;
}
.relation-item small {
  color: #51435f;
}
.code-panel {
  background: #d4e1da;
}
.code-panel pre {
  background: #dfe9dc;
  color: #294838;
  border-color: #a9c1a4;
  font-size: 13px;
}
.modal-card {
  background: #dfe8d8;
}
.modal-options button {
  background: #cddfc2;
}
.modal-options button:hover {
  background: #bed3af;
}
footer {
  background: #cddcc4;
  border-color: #a9bf9e;
  color: #38503c;
  font-size: 12px;
}
footer a {
  color: #275d40;
}
@media (max-width: 650px) {
  .sidebar-head .eyebrow,
  .inspector-head h2 {
    font-size: 15px;
  }
  .diagram-hint {
    font-size: 11px;
  }
  .col-editor .col-top input {
    font-size: 12px;
  }
  .toolbar button,
  .tabs button {
    font-size: 12px;
  }
}
/* Product typography scale; font assets are local for privacy and offline use. */
body {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font-family: inherit;
}
button,
.toolbar button,
.tabs button,
.canvas-actions button,
.col-actions button,
.inspector-section h3 button {
  font-size: 12px;
  font-weight: 600;
}
label,
.field label,
.inspector .field label,
.col-flags,
.eyebrow,
footer {
  font-size: 12px;
  font-weight: 600;
}
.brand strong {
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand small {
  font-size: 11.5px;
  font-weight: 500;
}
h1,
.hero-heading {
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero-description {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}
h2,
h3,
.sectionhead h2,
.sidebar-head .eyebrow,
.inspector-head h2,
.inspector-section h3,
.modal-top h2 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.6px;
}
.sidebar-head .eyebrow,
.inspector-head h2 {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.panel-rail-label {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.sidebar-head {
  min-height: 40px;
}
.inspector-head {
  min-height: 40px;
  flex-wrap: wrap;
  row-gap: 8px;
}
.inspector-head #selectedBadge {
  font-size: 11.5px;
  font-weight: 600;
}
.inspector-section h3 {
  flex-wrap: wrap;
  gap: 8px;
}
.sectionhead {
  gap: 8px;
  flex-wrap: wrap;
}
.node-title > span {
  font-size: 13.5px;
  font-weight: 700;
}
.node-title {
  gap: 8px;
}
.node-title small,
.table-row > span,
.modal-options button small,
.relation-item small {
  font-size: 11.5px;
  font-weight: 500;
}
.table-row b,
#tableSearch,
.table-row {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
}
.node-col {
  font-size: 12px;
  font-weight: 500;
}
.node-col .type {
  font-size: 11.5px;
  font-weight: 500;
}
input,
select,
textarea,
.field input,
.inspector .field input,
.col-editor input,
.col-editor select,
.col-actions input,
.canvas-actions select,
.code-panel pre,
.code-panel code {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
}
.col-editor .col-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.col-editor .col-top input,
.col-editor .col-top select {
  width: 100%;
  min-width: 0;
}
.col-flags {
  gap: 8px;
  line-height: 1.6;
}
.col-actions {
  flex-wrap: wrap;
}
.col-actions input {
  flex: 1 1 150px;
  width: auto;
  min-width: 0;
}
.col-actions button {
  flex: 0 0 auto;
}
.canvas-actions select {
  max-width: 155px;
}
.tabs {
  flex-wrap: wrap;
}
.canvas-toolbar {
  gap: 10px;
}
.canvas-actions {
  flex-wrap: wrap;
}
.modal-options button strong {
  font-size: 13.5px;
  font-weight: 700;
}
.modal-options button small {
  font-size: 11.5px;
}
.stat,
.empty,
.diagram-hint,
.canvas-footnote,
.code-head,
#toast {
  font-weight: 500;
}
footer {
  font-size: 12px;
  font-weight: 500;
}
footer a {
  font-weight: 700;
}
@media (max-width: 650px) {
  .sidebar-head .eyebrow,
  .inspector-head h2 {
    font-size: 23px;
  }
  .toolbar button,
  .tabs button {
    font-size: 12px;
  }
  .col-editor .col-top input {
    font-size: 12.5px;
  }
  .brand strong {
    font-size: 20px;
  }
  .inspector-head #selectedBadge {
    font-size: 11.5px;
  }
  .top {
    height: auto;
    min-height: 72px;
  }
}
/* Schema tools, recovery dialogs, and a canvas that scales without layout overflow. */
.top {
  height: auto;
  min-height: 72px;
  flex-wrap: wrap;
}
.toolbar {
  gap: 6px;
}
.workspace {
  height: calc(100dvh - 111px);
}
.main {
  overflow: hidden;
  min-height: 0;
}
.diagram-panel {
  overflow: hidden;
  min-height: 360px;
}
#canvasScroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  touch-action: none;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: #9eb599 #d0ddd3;
}
#canvasScroll.panning {
  cursor: grabbing;
}
#canvasSpace {
  position: relative;
  width: 1400px;
  height: 950px;
  overflow: hidden;
}
#diagramViewport {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 0;
  min-height: 0;
}
#nodes {
  pointer-events: none;
}
.node {
  pointer-events: auto;
}
.node-title {
  touch-action: none;
  background: var(--table-color, #bdd3aa) !important;
  border-color: #91a98b !important;
}
.node-title small {
  font-size: 10px;
}
.node-title > span {
  font-size: 13.5px;
}
.node-col {
  min-height: 36px;
}
.node-col .type {
  font-size: 10px;
}
.node-group {
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #344e3b;
  background: #ffffff30;
  border-bottom: 1px solid #bacbb1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted-node {
  opacity: 0.4;
}
.node.invalid {
  border: 2px solid #a44845;
  box-shadow: 0 0 0 2px #a448451c;
}
.table-row.invalid {
  border-color: #a44845;
}
.node-col.invalid-field {
  background: #eed8d0;
}
.col-editor.invalid-field {
  outline: 2px solid #a44845;
  outline-offset: -2px;
}
.diagram-hint {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
  max-width: 100%;
  font-size: 11px;
}
.canvas-footnote {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
  max-width: calc(100% - 215px);
  font-size: 11px;
}
.canvas-overview {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 180px;
  background: #e0e9d9eb;
  border: 1px solid #9eb293;
  border-radius: 10px;
  padding: 8px;
  z-index: 3;
  box-shadow: var(--shadow);
}
.canvas-overview > span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38523c;
  margin-bottom: 4px;
}
#minimap {
  display: block;
  width: 100%;
  height: 100px;
  cursor: crosshair;
  border-radius: 5px;
  background: #c9d8c7;
  touch-action: none;
}
#groupFilter {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  width: 100%;
}
#saveStatus {
  font-size: 11.5px;
  line-height: 1.5;
  color: #35573b;
  overflow-wrap: anywhere;
}
#issueCount {
  background: #c9dcbf;
  color: #2d4f31;
}
.has-issues,
#issueCount.has-issues {
  background: #eed8ca;
  color: #71392f;
  border-color: #b77f69;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.position-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.position-fields input {
  width: 100%;
}
.field > span {
  font-size: 12px;
  font-weight: 600;
  color: #4e435e;
}
.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 58px;
  font-size: 12.5px;
}
.col-editor .field {
  margin-top: 10px;
  margin-bottom: 10px;
}
.col-editor .field > span {
  font-size: 11.5px;
}
.col-flags {
  flex-wrap: wrap;
}
.inspector-section h3 {
  font-size: 23px;
}
.item-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.item-actions button {
  padding: 5px 7px;
  min-height: 28px;
  font-size: 11px;
}
.index-item,
.relation-item {
  flex-wrap: wrap;
  gap: 8px;
}
.index-item > span,
.relation-item > span {
  overflow-wrap: anywhere;
  flex: 1 1 120px;
}
.index-item small {
  font-size: 11.5px;
}
.inline-issues {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.issue-list {
  display: grid;
  gap: 8px;
}
.issue-link {
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  background: #efdbce;
  border-color: #c39880;
  color: #653829;
  line-height: 1.6;
  font-size: 12px;
}
.issue-link .icon {
  align-self: flex-start;
  margin-top: 3px;
}
.error-text {
  color: #80372b;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.7;
}
.modal-card {
  width: min(800px, 100%);
}
.modal-card p {
  font-size: 12px;
  line-height: 1.8;
  color: #3b5444;
}
.modal-card h3 {
  font-size: 20px;
}
.project-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.project-entry {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px;
  background: #cedfc1;
  border: 1px solid #afc49f;
  border-radius: 10px;
}
.project-entry > div:first-child {
  min-width: 0;
  flex: 1 1 160px;
  overflow-wrap: anywhere;
}
.project-entry small {
  display: block;
  font-size: 11.5px;
  color: #3b5540;
  margin-top: 4px;
}
.project-entry strong {
  font-size: 13.5px;
  font-weight: 700;
}
.migration-preview {
  max-height: 350px;
  overflow: auto;
  white-space: pre;
  background: #d4e1d0;
  border: 1px solid #a5bc9c;
  padding: 14px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
}
.migration-preview code {
  font: inherit;
}
.migration-ack {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  line-height: 1.7;
}
.migration-ack input {
  margin-top: 5px;
}
.modal-card .migration-warning {
  background: #e8d8bb;
  border-left: 3px solid #9a7338;
  padding: 10px;
  color: #604725;
}
#compareResult {
  margin-top: 18px;
}
#compareResult ul {
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.9;
}
@media (max-width: 1200px) {
  .canvas-toolbar {
    padding: 8px;
  }
  .canvas-actions {
    gap: 4px;
  }
  .toolbar button {
    padding: 7px 9px;
  }
}
@media (max-width: 950px) {
  .workspace {
    height: auto;
  }
  .main {
    min-height: 620px;
  }
  .diagram-panel {
    min-height: 530px;
  }
  .sidebar {
    min-height: 620px;
  }
  .inspector-body {
    overflow: visible;
  }
  .inspector {
    overflow: visible;
  }
  .canvas-footnote {
    max-width: calc(100% - 180px);
  }
  .canvas-overview {
    width: 155px;
  }
}
@media (max-width: 650px) {
  .toolbar {
    flex-wrap: wrap;
    overflow: visible;
  }
  .sidebar {
    min-height: 0;
  }
  .main {
    min-height: 620px;
  }
  .diagram-panel {
    min-height: 500px;
  }
  .canvas-overview {
    width: 130px;
    right: 8px;
    bottom: 8px;
  }
  #minimap {
    height: 75px;
  }
  .canvas-footnote {
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 155px);
    font-size: 10px;
  }
  .diagram-hint {
    font-size: 10px;
  }
  .modal-top h2 {
    font-size: 23px;
  }
  .sidebar-content {
    max-height: 340px;
  }
}
.table-row b {
  flex: 1;
  min-width: 0;
}
.table-row b .table-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  color: inherit;
  background: none;
  padding: 0;
}
/* High-contrast brand mark, aligned wordmark, and distinctly spaced canvas instructions. */
.brand {
  display: grid;
  grid-template-columns: 48px auto;
  column-gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  box-shadow: 0 3px 10px #193f3924;
}
.brand-copy {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
  align-content: center;
  justify-items: start;
}
.brand strong {
  display: block;
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.7px;
  color: #213f35;
}
.brand small {
  display: block;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  letter-spacing: 0;
  color: #3c574a;
}
.diagram-hint,
.canvas-footnote {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0;
  row-gap: 8px;
  line-height: 1.7;
  padding: 11px 15px;
}
.diagram-hint > span,
.canvas-footnote > span {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  white-space: normal;
}
.diagram-hint > span + span::before,
.canvas-footnote > span + span::before {
  content: '';
  display: block;
  width: 3px;
  height: 3px;
  flex: 0 0 3px;
  border-radius: 50%;
  background: #718a70;
  margin-left: 16px;
}
.diagram-hint {
  max-width: calc(100% - 16px);
  font-size: 11.5px;
}
.canvas-footnote {
  font-size: 11px;
  max-width: calc(100% - 220px);
}
#canvasSpace {
  background-color: #d0ddd3;
  background-image: radial-gradient(#9ab19d 0.8px, transparent 0.8px);
  background-size: 22px 22px;
}
.diagram-panel {
  background-image: none;
}
#canvasScroll.dragging-table,
#canvasScroll.dragging-table .node-title {
  cursor: grabbing;
}
#canvasScroll.space-pan,
#canvasScroll.space-pan .node-title {
  cursor: grab;
}
#canvasScroll.panning,
#canvasScroll.panning .node-title {
  cursor: grabbing;
}
@media (max-width: 950px) {
  .canvas-footnote {
    max-width: calc(100% - 185px);
  }
}
@media (max-width: 650px) {
  .brand {
    grid-template-columns: 44px auto;
    column-gap: 11px;
  }
  .brand img {
    width: 44px;
    height: 44px;
  }
  .brand-copy {
    row-gap: 5px;
  }
  .diagram-hint,
  .canvas-footnote {
    padding: 8px 10px;
    row-gap: 5px;
  }
  .diagram-hint > span,
  .canvas-footnote > span {
    gap: 10px;
  }
  .diagram-hint > span + span::before,
  .canvas-footnote > span + span::before {
    margin-left: 10px;
  }
  .diagram-hint {
    font-size: 10.5px;
  }
  .canvas-footnote {
    max-width: calc(100% - 155px);
    font-size: 10px;
  }
}
/* Overview interaction feedback stays visible at low zoom without changing schema geometry. */
.overview-mode .node.selected,
.overview-mode .node.overview-hover {
  outline: var(--overview-outline) solid #285940;
  outline-offset: var(--overview-outline);
}
.overview-mode .node.overview-hover {
  outline-color: #8b4e21;
}
.overview-mode .node {
  cursor: grab;
}
.overview-hover-label {
  position: absolute;
  z-index: 5;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid #183f2c;
  background: #28513e;
  color: #f0f5e9;
  box-shadow: 0 4px 14px #183f2c26;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  overflow-wrap: anywhere;
}
.top {
  z-index: 12;
}
/* Progressive disclosure: retain frequent actions and group secondary tools by purpose. */
.action-menu {
  position: relative;
  flex-shrink: 0;
}
.action-menu > summary,
.next-step-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel2);
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  color: var(--text);
}
.action-menu > summary::-webkit-details-marker,
.next-step-disclosure > summary::-webkit-details-marker {
  display: none;
}
.action-menu > summary::after,
.next-step-disclosure > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid #486647;
  border-bottom: 2px solid #486647;
  transform: rotate(45deg);
  margin-top: -3px;
}
.action-menu[open] > summary {
  background: #c5d9bc;
  border-color: #8eaa80;
}
.action-menu > summary:focus-visible,
.next-step-disclosure > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.action-menu-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  max-height: min(70vh, 600px);
  overflow: auto;
  padding: 8px;
  border: 1px solid #a7ba9b;
  border-radius: 12px;
  background: #e4ecdd;
  box-shadow: 0 12px 32px #233d3329;
  z-index: 30;
}
.action-menu-section {
  display: grid;
  gap: 4px;
  padding: 5px;
}
.action-menu-section + .action-menu-section {
  border-top: 1px solid #bccbb3;
  margin-top: 5px;
  padding-top: 10px;
}
.action-menu-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: #4c6552;
  padding: 3px 8px;
}
.action-menu-section button {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  white-space: normal;
  background: transparent;
  border-color: transparent;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}
.action-menu-section button:hover {
  background: #d0dfc5;
  border-color: #b1c4a3;
}
.action-menu-section button[aria-pressed='true'] {
  background: #355f50;
  color: #fff;
}
.canvas-toolbar {
  overflow: visible;
  position: relative;
  z-index: 6;
}
.main {
  overflow: visible;
  min-width: 0;
}
.code-panel {
  min-width: 0;
}
.toolbar {
  overflow: visible;
}
.next-step-disclosure {
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid #bccaa8;
  background: #e4e9da;
  padding: 5px 12px;
}
.next-step-disclosure > summary {
  display: inline-flex;
  min-height: 28px;
  padding: 3px 9px;
  font-size: 11px;
  border-color: transparent;
  background: transparent;
}
.next-step-disclosure .learning-next {
  border: 0;
  padding: 8px 2px;
  margin: 0;
}
@media (max-width: 650px) {
  .action-menu-body {
    position: fixed;
    top: 145px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 60vh;
  }
  .canvas-actions .action-menu-body {
    top: 220px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .next-step-disclosure {
    padding: 3px 8px;
  }
}
/* #End of File | #styles.css | #Signed: PandaDev LLC */
