:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  color: #26312e;
  background: #f7f8f4;
  font-synthesis: none;
  --paper: #f7f8f4;
  --line: #daddd5;
  --ink: #26312e;
  --muted: #69726b;
  --gold: #efbb60;
  --mono:
    ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --side: 240px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ac7e2f;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: not-allowed;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.ico {
  flex: none;
  vertical-align: middle;
}
.muted,
.form-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.eyebrow,
.side-label,
.brand small,
.model-tag,
.legend b,
.port-col small,
.column-label {
  font: 600 10px/1.3 var(--mono);
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #65716a;
}
.eyebrow i {
  font-style: normal;
  color: #adbaaf;
}
.amber-line {
  height: 3px;
  width: 19px;
  background: #c49344;
}
.btn,
.ib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  min-height: 36px;
  padding: 0 12px;
}
.ib {
  width: 35px;
  height: 35px;
  min-height: 0;
  padding: 0;
  color: #657068;
}
.btn:hover,
.ib:hover {
  background: #f0f2ec;
  border-color: #b4bcb2;
}
.btn.primary {
  background: var(--gold);
  border-color: #cfa353;
  color: #2b2d24;
  box-shadow: 0 1px 2px #14221a0b;
}
.btn.primary:hover {
  background: #f6c875;
  border-color: #ba8c42;
}
.btn.subtle {
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}
.btn.subtle:hover {
  background: #f1f2ed;
}
.btn.danger {
  background: #af4541;
  color: #fff;
  border-color: #963c38;
}
.delete {
  margin-right: auto;
  color: #a5443f;
}
.delete:hover {
  background: #fff1ec;
  border-color: #d9afa4;
}
#root {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: #202a29;
  color: #d7ded9;
  border-right: 1px solid #17201e;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px;
  padding: 26px 2px 28px;
  border-bottom: 1px solid #3b4641;
}
.brand img {
  border-radius: 8px;
}
.brand strong {
  font-size: 23px;
  letter-spacing: -0.9px;
  color: #fbfcf7;
}
.brand small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 2.15px;
  color: #acb7ad;
}
.side-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 26px 13px;
}
.side-label {
  color: #a0ada3;
  margin: 0 11px 11px;
  font-size: 10px;
  letter-spacing: 1.6px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
  text-align: left;
  border-radius: 5px;
  color: #cbd4ce;
}
.nav + .nav {
  margin-top: 3px;
}
.nav .ico {
  color: #a6b4aa;
}
.nav span {
  margin-left: auto;
  font: 11px var(--mono);
  color: #9eaba1;
}
.nav:hover,
.index-item:hover,
.guide:hover {
  background: #2b3733;
  color: white;
}
.nav.on {
  background: #37413a;
  color: #f4d399;
}
.nav.on .ico {
  color: #f2c471;
}
.nav.on span {
  border-radius: 4px;
  padding: 3px 6px;
  background: #495045;
  color: #efcc8e;
}
.side-rule {
  height: 1px;
  background: #3a4540;
  margin: 24px 8px 19px;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.label-row .ib {
  width: 24px;
  height: 24px;
  border-color: #48544c;
  background: transparent;
  color: #c1cbbf;
}
.label-row .ib:hover {
  background: #445045;
}
.index-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  text-align: left;
  border-radius: 5px;
  color: #cbd4ce;
  font-size: 13px;
  font-weight: 550;
}
.index-item > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.index-item.current {
  background: #2c3832;
  color: #fafbf5;
}
.index-item.current:before {
  position: absolute;
  content: "";
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.index-item small,
.local-space small {
  display: block;
  color: #9aa99e;
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
}
.index-icon {
  width: 30px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid #4d5b50;
  background: #354136;
  color: #c0cdae;
  border-radius: 5px;
}
.index-icon.physical {
  color: #e6c58b;
  background: #433f32;
  border-color: #5c5441;
}
.index-icon.conceptual {
  color: #bdcbdc;
  background: #323f45;
  border-color: #46555b;
}
.index-icon.flow {
  color: #c1d5c5;
  background: #304139;
  border-color: #46594c;
}
.side-bottom {
  padding: 0 16px 19px;
}
.guide {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #adb9b0;
  border-radius: 4px;
  padding: 9px 6px;
}
.local-space {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #3c4841;
  padding: 18px 3px 0;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}
.local-space > span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #56635a;
  border-radius: 7px;
  background: #344139;
  color: #d1dbcb;
}
.local-space small {
  font-size: 10px;
}
.local-space i,
.saved b {
  height: 6px;
  width: 6px;
  background: #91ba94;
  border-radius: 50%;
  margin-left: auto;
}
.shade {
  display: none;
}
.workspace {
  min-width: 0;
}
.top {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 30px;
  font-size: 12px;
  color: #757d75;
}
.top i {
  color: #b8beb6;
  font-style: normal;
}
.top button:not(.ib) {
  padding: 0;
  font-size: 12px;
  color: inherit;
}
.top button:hover {
  color: var(--ink);
}
.top code {
  font: 11px var(--mono);
  color: #3f4c42;
}
.saved {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #526453;
  font-size: 11px;
  font-weight: 550;
}
.saved b {
  background: #6f9675;
}
.saved.warn {
  color: #99534b;
}
.menu-toggle {
  display: none;
}
.editor,
.library {
  padding: 0 clamp(18px, 2.35vw, 40px);
}
.editor {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 56px);
  min-height: 575px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0 23px;
  flex: none;
}
.hero > div:first-child {
  min-width: 0;
}
.hero h1 {
  font-size: clamp(28px, 2.5vw, 40px);
  font-weight: 650;
  letter-spacing: -1.4px;
  line-height: 1.2;
  margin: 8px 0 5px;
  overflow-wrap: anywhere;
}
.hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.board {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #cfd5ca;
  border-radius: 9px;
  background: white;
  box-shadow: 0 2px 5px #23312008;
}
.board-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  height: 47px;
}
.tabs {
  display: flex;
  height: 100%;
  gap: 20px;
}
.tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  padding: 0 2px;
  color: #748076;
  font-size: 12px;
  font-weight: 600;
}
.tabs button:hover,
.tabs button.active {
  color: #27392d;
}
.tabs button.active:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: #d8a247;
}
.tabs button span {
  font: 10px var(--mono);
  border-radius: 4px;
  background: #eff2ec;
  color: #6a756b;
  padding: 1px 5px;
}
.model-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: #586351;
  background: #f2f4ed;
  border: 1px solid #dce0d5;
  border-radius: 4px;
  padding: 4px 7px;
}
.model-tag i,
.port-key {
  height: 9px;
  width: 10px;
  border: 1px solid #76816e;
  display: inline-block;
}
.model-tag .conceptual {
  border-style: dashed;
}
.model-tag .flow {
  border-radius: 3px;
}
.surface,
.preview {
  background-color: #f8f9f4;
  background-image: radial-gradient(#bec6b7 0.9px, transparent 1px);
  background-size: 16px 16px;
}
.surface {
  position: relative;
  flex: 1;
  min-height: 0;
  isolation: isolate;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.edges {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}
.edge {
  stroke: #85938a;
  stroke-width: 1.6;
  fill: none;
}
.anchor {
  fill: #fff;
  stroke: #78877c;
  stroke-width: 1.6;
}
.edge-label {
  paint-order: stroke;
  stroke: #f8f9f4;
  stroke-width: 7px;
  stroke-linejoin: round;
  fill: #5b695f;
  text-anchor: middle;
  font: 11px var(--mono);
}
.node {
  position: absolute;
  width: 222px;
  border: 1.5px solid color-mix(in srgb, var(--tint) 75%, #465146);
  background: #fff;
  box-shadow: 2px 4px 0 #263d2a10;
  cursor: grab;
  transition: box-shadow 0.12s;
}
.node.conceptual {
  border-style: dashed;
  border-width: 2px;
}
.node.app {
  border-radius: 12px;
  overflow: hidden;
}
.node:hover,
.node:focus-visible,
.node.grab {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--tint) 36%, transparent),
    2px 5px 0 #263d2a12;
  z-index: 1;
}
.node.grab,
.surface.pan:active,
.surface.pan:active .node {
  cursor: grabbing;
}
.surface.pan,
.surface.pan .node {
  cursor: grab;
}
.node-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--tint) 54%, white);
  background: color-mix(in srgb, var(--tint) 25%, #fff);
  color: color-mix(in srgb, var(--tint) 28%, #1a2620);
}
.node-head strong {
  font: 600 15px/1.3 var(--mono);
  overflow-wrap: anywhere;
  min-width: 0;
}
.node-head .ico {
  color: color-mix(in srgb, var(--tint) 60%, #1c3122);
}
.fields {
  padding: 5px 11px 6px;
}
.field {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  font: 12px/1.4 var(--mono);
}
.field-icon {
  width: 13px;
  flex: none;
  text-align: center;
  color: #a4b0a2;
  font-weight: bold;
}
.field-icon.pk,
.legend span .ico {
  color: #a97e35;
}
.field-icon.fk,
.legend span:last-child .ico {
  color: #758b94;
}
.field-name,
.field-type {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.field-name {
  flex: 1;
}
.field-type {
  font-size: 10px;
  color: #7c867e;
  max-width: 44%;
}
.ports {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 0 15px;
}
.port-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 48%;
  align-items: flex-start;
}
.port-col:last-child {
  align-items: flex-end;
}
.port-col small {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-inline: 7px;
}
.port-col .muted {
  margin-inline: 7px;
}
.port {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #aebbae;
  background: #f6f8f4;
  padding: 4px 6px;
  font: 11px var(--mono);
}
.canvas-tools {
  position: absolute;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid #cfd6cb;
  border-radius: 6px;
  box-shadow: 0 2px 4px #2030220b;
  padding: 3px;
}
.canvas-tools .ib {
  width: 29px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 3px;
}
.canvas-tools .ib:hover {
  background: #edf1e9;
}
.canvas-tools .ib.active {
  background: #e6ece0;
  color: #344a34;
}
.canvas-tools i,
.board-foot i {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 3px;
}
.tools-left {
  left: 14px;
}
.tools-right {
  right: 14px;
}
.tools-right span {
  min-width: 37px;
  text-align: center;
  font: 11px var(--mono);
}
.board-foot,
.underboard,
.legend,
.legend span,
.board-foot span,
.canvas-hint,
.board-foot button {
  display: flex;
  align-items: center;
}
.board-foot {
  flex: none;
  height: 37px;
  padding: 0 15px;
  border-top: 1px solid var(--line);
  gap: 10px;
  font: 11px var(--mono);
  color: #69776a;
}
.board-foot span,
.board-foot button {
  gap: 6px;
}
.board-foot i {
  height: 11px;
}
.board-foot button {
  margin-left: auto;
  color: #526450;
  font:
    600 11px/1.1 Arial,
    sans-serif;
  padding: 5px 7px;
  border-radius: 4px;
}
.board-foot button:hover {
  background: #edf2e9;
}
.underboard {
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  color: #6c766d;
  font-size: 11px;
}
.legend,
.legend span,
.canvas-hint {
  gap: 6px;
}
.legend {
  gap: 14px;
}
.legend b {
  font-size: 9px;
  padding-right: 12px;
  border-right: 1px solid #ccd3c8;
  letter-spacing: 1px;
}
.canvas-hint {
  font-size: 11px;
  color: #798278;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: #748072;
}
.empty h3 {
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.4px;
}
.empty p {
  font-size: 13px;
  line-height: 1.5;
}
.empty-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f1f4ec;
}
.empty .btn {
  margin-top: 6px;
}
.surface > .empty {
  position: absolute;
  inset: 0 0 40px;
  pointer-events: none;
}
.surface > .empty button {
  pointer-events: auto;
}
.edge-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #fbfcf9;
}
.edge-panel .section-title {
  margin-top: 0;
}
.edge-panel > .muted {
  margin-bottom: 18px;
}
.library {
  padding-bottom: 36px;
}
.lib-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: #778276;
  width: 300px;
  max-width: 70%;
}
.search input {
  border: 0;
  padding: 9px 0;
  width: 100%;
  background: transparent;
  font-size: 13px;
}
.lib-bar select,
dialog select,
dialog textarea,
dialog input:not([type="checkbox"], [type="color"]) {
  width: 100%;
  border: 1px solid #cfd6cc;
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  padding: 9px 10px;
  min-width: 0;
}
.lib-bar select {
  width: auto;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 17px;
}
.diagram-card,
.lib-item,
.obj-link {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  text-align: left;
}
.diagram-card {
  padding: 0;
}
.diagram-card:hover,
.lib-item:hover,
.obj-link:hover {
  border-color: #a7b3a2;
  background: #fafbf7;
}
.diagram-card > div:last-child {
  padding: 15px 16px;
}
.preview {
  height: 145px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.preview svg {
  height: 85%;
  width: 88%;
}
.diagram-card h3 {
  font-size: 18px;
  letter-spacing: -0.4px;
  margin: 7px 0;
}
.diagram-card small,
.obj-link small,
.lib-item small,
.rel-row small,
.check-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.lib-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.lib-item,
.obj-link,
.rel-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
}
.lib-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.lib-item:last-child {
  border: 0;
}
.lib-item > span:nth-child(2),
.obj-link > span:nth-child(2),
.rel-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.obj-link > .ico:last-child,
.lib-item > .ico:last-child,
.rel-row > .ib {
  margin-left: auto;
  color: #7c897b;
}
.obj-link + .obj-link {
  margin-top: 6px;
}
.tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--tint);
  background: color-mix(in srgb, var(--tint) 20%, white);
  color: color-mix(in srgb, var(--tint) 55%, #182c21);
}
.tile.conceptual {
  border-style: dashed;
}
.tile.app {
  border-radius: 8px;
}
.tile.large {
  width: 45px;
  height: 45px;
}
.table-scroll {
  overflow-x: auto;
}
.rel-row {
  border-bottom: 1px solid var(--line);
  padding-left: 1px;
}
.rel-row b {
  font-size: 13px;
}
.rel-row b i {
  font-weight: 400;
  color: #727b71;
  margin: 0 4px;
}
.rel-ico {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: #edf1e8;
  border-radius: 6px;
  color: #6c7c63;
}
.rel-row > .ib {
  width: 29px;
  height: 29px;
}
.rel-row small {
  font-size: 12px;
}
.guide-text h3 {
  margin: 20px 0 6px;
}
.guide-text h3:first-child {
  margin-top: 0;
}
.guide-text p,
.lede,
.detail-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.lede {
  margin-bottom: 16px;
}
.inline-empty {
  padding: 18px;
  border: 1px dashed #c6cfc0;
  background: #f7f9f3;
  border-radius: 5px;
  font-size: 13px;
  color: var(--muted);
}
dialog {
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100dvh - 34px);
  margin: auto;
  padding: 0;
  border: 1px solid #bac5b7;
  border-radius: 12px;
  box-shadow: 0 18px 90px #1320194d;
  color: var(--ink);
  background: #fff;
  overflow: hidden;
}
dialog::backdrop {
  background: #17211d60;
  backdrop-filter: blur(2px);
}
dialog form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
}
.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  flex: none;
}
.modal-head {
  justify-content: space-between;
  align-items: flex-start;
  background: #fbfcf8;
}
.modal-head h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.modal-head .ib {
  width: 29px;
  height: 29px;
  flex: none;
}
.modal-body {
  padding: 20px 23px;
  overflow-y: auto;
  min-height: 0;
}
.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
  padding: 13px 23px;
  background: #fafbf7;
}
.control {
  display: block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 600;
}
.control > input,
.control > textarea,
.control > select {
  display: block;
  margin-top: 6px;
  font-weight: 400;
}
.control textarea {
  resize: vertical;
}
.control small {
  font-size: 11px;
  color: #7b8679;
  font-weight: 400;
  margin-left: 5px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 21px 0 9px;
}
.section-title h3,
.guide-text h3 {
  font-size: 14px;
  letter-spacing: -0.15px;
}
.section-title .btn {
  min-height: 28px;
}
.detail-intro {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-intro p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
table {
  width: 100%;
  border: 1px solid var(--line);
  border-spacing: 0;
  border-radius: 5px;
  overflow: hidden;
  text-align: left;
  font: 12px var(--mono);
}
th {
  font:
    600 11px Arial,
    sans-serif;
  color: #677364;
  background: #f3f5ef;
}
th,
td {
  padding: 8px 9px;
}
td {
  border-top: 1px solid #e6eae2;
  overflow-wrap: anywhere;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chips .btn {
  font-size: 12px;
  min-height: 30px;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.swatch {
  border: 2px solid #fff;
  background: var(--swatch);
  width: 21px;
  height: 21px;
  border-radius: 50%;
  outline: 1px solid transparent;
}
.swatch.picked {
  outline-color: #596756;
}
.color-row input {
  height: 24px;
  width: 35px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid var(--line);
  padding: 1px;
  background: #fff;
}
.field-edits {
  margin-bottom: 18px;
}
.field-edit {
  display: grid;
  align-items: center;
  gap: 7px;
  grid-template-columns: minmax(65px, 1.4fr) minmax(55px, 1fr) 28px 22px;
  margin-bottom: 6px;
}
.field-edits.physical .field-edit {
  grid-template-columns: minmax(65px, 1.4fr) minmax(55px, 1fr) 28px 25px 22px;
}
.field-edit .ib {
  width: 22px;
  height: 26px;
  font-size: 19px;
}
.tick,
.column-label span:nth-child(n + 3) {
  text-align: center;
}
.column-label {
  color: #798576;
  font-size: 9px;
  letter-spacing: 0.6px;
}
.field-edit input {
  accent-color: #607557;
}
.field-edit input:not([type="checkbox"]) {
  padding: 8px;
  font: 12px var(--mono);
}
.port-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.port-edit fieldset {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.port-edit legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 4px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.check-row input {
  accent-color: #607557;
}
.check-row small {
  margin-top: 2px;
  font-size: 10px;
}
.form-note {
  font-size: 12px;
}
.modal-body > .control:last-child,
.modal-body > .lede:last-child {
  margin-bottom: 0;
}
#notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 8px);
  z-index: 6;
  background: #2e3b31;
  color: #fff;
  font-size: 12px;
  padding: 10px 15px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: 0.16s ease;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1550px) {
  :root {
    --side: 250px;
  }
  .hero {
    padding-top: 35px;
    padding-bottom: 28px;
  }
}
@media (max-width: 1050px) {
  :root {
    --side: 202px;
  }
  .brand {
    margin: 0 15px;
  }
  .side-scroll {
    padding-left: 9px;
    padding-right: 9px;
  }
  .hero {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .editor,
  .library {
    padding-left: 20px;
    padding-right: 20px;
  }
  .top {
    padding: 0 20px;
  }
}
@media (max-width: 760px) {
  #root {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    width: 236px;
    transform: translateX(-101%);
    transition: transform 0.18s;
  }
  .nav-open .sidebar {
    transform: translateX(0);
  }
  .nav-open .shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2;
    background: #1e2d245c;
  }
  .menu-toggle {
    display: inline-flex;
    width: 29px;
    height: 29px;
  }
  .crumb-icon {
    display: none;
  }
  .top {
    height: 48px;
    gap: 10px;
    padding: 0 14px;
  }
  .editor {
    height: calc(100dvh - 48px);
    min-height: 520px;
  }
  .editor,
  .library {
    padding: 0 14px;
  }
  .library {
    padding-bottom: 24px;
  }
  .hero {
    padding: 20px 0 16px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 12px;
  }
  .canvas-hint {
    display: none;
  }
  .underboard {
    min-height: 36px;
  }
  .board-head {
    padding: 0 10px;
  }
  .tabs {
    gap: 12px;
  }
  .side-scroll {
    padding-left: 13px;
    padding-right: 13px;
  }
  .surface {
    background-size: 13px 13px;
  }
}
@media (max-width: 520px) {
  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }
  .hero .actions {
    flex-direction: row-reverse;
  }
  .hero h1 {
    font-size: 27px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .top {
    font-size: 11px;
    gap: 8px;
  }
  .btn {
    min-height: 32px;
    font-size: 12px;
  }
  .actions .ib {
    height: 32px;
  }
  .board-head {
    height: 42px;
  }
  .model-tag {
    font-size: 8px;
    letter-spacing: 0.2px;
  }
  .tools-right {
    right: 9px;
  }
  .tools-left {
    left: 9px;
  }
  .board-foot {
    gap: 5px;
    padding: 0 8px;
    font-size: 10px;
  }
  .board-foot button {
    font-size: 10px;
    padding: 4px;
  }
  .modal-head,
  .modal-body {
    padding: 16px;
  }
  .modal-foot {
    padding: 11px 16px;
    gap: 6px;
  }
  .field-edit {
    gap: 4px;
  }
  .port-edit {
    gap: 6px;
  }
  .top > code {
    font-size: 10px;
  }
  .legend {
    gap: 10px;
  }
  .underboard {
    font-size: 10px;
  }
}
