:root {
  --bg: #070a0f;
  --panel: #0d121a;
  --panel-2: #111823;
  --panel-3: #16202d;
  --line: #1c2635;
  --line-soft: #151d29;
  --text: #dde5ef;
  --text-dim: #9fb0c4;
  --muted: #6f8098;
  --accent: #3b82f6;
  --accent-hi: #60a5fa;
  --accent-dim: rgba(59, 130, 246, .13);
  --warn: #f0a63c;
  --danger: #ef5f5f;
  --ok: #3fb98a;
  --radius: 8px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --shadow: 0 18px 48px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.1px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2937; border-radius: 6px; border: 3px solid var(--panel); }
::-webkit-scrollbar-thumb:hover { background: #2b3a4d; }

.topbar {
  flex: 0 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg, #0e141d, #0b1017);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, .5), transparent);
}

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

.brand-mark {
  width: 30px; height: 30px;
  fill: var(--accent);
  flex: 0 0 auto;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, .45));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 14px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; }
.brand-text span { font-size: 11px; color: var(--muted); white-space: nowrap; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-divider { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

.profile-box {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px;
}

.profile-box .form-select {
  min-width: 170px;
  background-color: transparent;
  border: 0;
  color: var(--text);
  font-size: 12.5px;
  box-shadow: none;
  padding: 3px 24px 3px 8px;
}

.btn {
  --bs-btn-focus-box-shadow: none;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .13s, border-color .13s, color .13s;
}

.btn svg { width: 14px; height: 14px; fill: currentColor; }

.btn-icon {
  width: 30px; height: 28px;
  padding: 0;
  justify-content: center;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
}
.btn-icon:hover { background: var(--panel-3); color: var(--text); }
.btn-icon:disabled { opacity: .3; }

.btn-ghost {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 5px 11px;
}
.btn-ghost:hover { background: var(--panel-3); border-color: #263449; color: var(--text); }

.btn-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 5px 13px;
  box-shadow: 0 2px 12px rgba(59, 130, 246, .28);
}
.btn-accent:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }

.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-tail { align-self: flex-end; margin-bottom: 1px; }

.lang-switch {
  display: flex;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  padding: 6px 9px;
  cursor: pointer;
}
.lang-switch button.active { background: var(--accent-dim); color: var(--accent-hi); }

.dropdown-menu {
  --bs-dropdown-bg: var(--panel-2);
  --bs-dropdown-border-color: var(--line);
  --bs-dropdown-link-color: var(--text-dim);
  --bs-dropdown-link-hover-bg: var(--panel-3);
  --bs-dropdown-link-hover-color: var(--text);
  --bs-dropdown-header-color: var(--muted);
  --bs-dropdown-font-size: 12.5px;
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 6px;
}
.dropdown-menu .dropdown-item { border-radius: 6px; padding: 6px 10px; }
.dropdown-header { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; padding: 8px 10px 4px; }

.tag-vec {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent-hi);
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 5px;
}

.workspace {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 376px minmax(0, 1fr);
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  min-height: 0;
}

.side-tabs {
  flex: 0 0 auto;
  height: 46px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.side-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 0 4px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.side-tabs button:hover { color: var(--text-dim); }
.side-tabs button.active { color: var(--accent-hi); }
.side-tabs button.active::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.side-body { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.pane { display: none; padding: 4px 0 32px; }
.pane.active { display: block; }

.group { padding: 15px 16px 17px; border-bottom: 1px solid var(--line-soft); }
.group:last-child { border-bottom: 0; }

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.group-head h3 {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--text-dim);
}
.group-note { font-size: 10.5px; color: var(--muted); }
.accent-text { color: var(--accent-hi); text-transform: none; letter-spacing: 0; }

.field { margin-bottom: 11px; display: flex; flex-direction: column; min-width: 0; flex: 1 1 0; }
.field:last-child { margin-bottom: 0; }
.field-narrow { flex: 0 0 88px; }

.field label {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.field label output { margin-left: auto; color: var(--accent-hi); font-size: 11px; }

.opt {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  background: var(--panel-3);
  padding: 1px 5px;
  border-radius: 4px;
}

.field-row { display: flex; gap: 9px; margin-bottom: 11px; align-items: flex-start; }
.field-row .field { margin-bottom: 0; }
.field-colors { margin-top: 12px; }

.form-control, .form-select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12.5px;
  transition: border-color .13s, box-shadow .13s;
}
.form-control:focus, .form-select:focus {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-control::placeholder { color: #4c5a6d; }
.form-control.is-bad { border-color: var(--danger); }

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236f8098' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 10px;
  padding-right: 26px;
}

.form-control-color { width: 100%; height: 32px; padding: 3px; cursor: pointer; }
.form-control-color::-webkit-color-swatch { border-radius: 4px; border: 0; }

.form-range { height: 20px; padding: 0; }
.form-range::-webkit-slider-runnable-track { height: 4px; background: var(--panel-3); border-radius: 3px; }
.form-range::-webkit-slider-thumb {
  width: 14px; height: 14px;
  margin-top: -5px;
  background: var(--accent);
  border: 2px solid #0d121a;
  box-shadow: 0 0 0 1px var(--accent);
}
.form-range::-moz-range-track { height: 4px; background: var(--panel-3); border-radius: 3px; }
.form-range::-moz-range-thumb { width: 12px; height: 12px; background: var(--accent); border: 2px solid #0d121a; }

.hint { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 6px; }
.hint strong { color: var(--text-dim); font-weight: 500; }
.hint .mono { font-size: 11px; }

.switch {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 5px 0;
  user-select: none;
}
.switch input { appearance: none; margin: 0; width: 30px; height: 17px; flex: 0 0 auto; background: var(--panel-3); border: 1px solid var(--line); border-radius: 10px; position: relative; cursor: pointer; transition: background .15s, border-color .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #5b6b80; transition: transform .15s, background .15s; }
.switch input:checked { background: var(--accent-dim); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(13px); background: var(--accent-hi); }
.switch-bare { padding: 0; }

.segmented {
  display: flex;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.segmented button {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  padding: 5px 4px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.segmented button:hover { color: var(--text-dim); }
.segmented button.active { background: var(--accent-dim); color: var(--accent-hi); font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .12s;
}
.chip:hover { border-color: #2b3a4d; color: var(--text-dim); }
.chip.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent-hi); }
.chip .mono { font-size: 10.5px; opacity: .75; margin-left: 4px; }

.notice {
  display: flex;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 8px;
  margin-top: 11px;
  font-size: 11.5px;
  line-height: 1.5;
  border: 1px solid;
}
.notice svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.notice p { margin: 3px 0 0; }
.notice strong { font-weight: 600; }
.notice-warn { background: rgba(240, 166, 60, .07); border-color: rgba(240, 166, 60, .26); color: #d9ab6c; }
.notice-warn svg { fill: var(--warn); }
.notice-warn strong { color: #f0bd77; }
.notice-info { background: var(--accent-dim); border-color: rgba(59, 130, 246, .24); color: #8fb4e8; }
.notice-info svg { fill: var(--accent); }

.type-list { display: flex; flex-direction: column; gap: 6px; }

.type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.type-item:hover { border-color: #2b3a4d; }
.type-item.active { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-dim), transparent 70%); }
.type-item .ti-body { flex: 1 1 auto; min-width: 0; }
.type-item .ti-name { font-size: 12.5px; color: var(--text); display: block; }
.type-item.active .ti-name { color: var(--accent-hi); font-weight: 500; }
.type-item .ti-meta { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.type-item .ti-req { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--warn); background: rgba(240, 166, 60, .12); padding: 1px 5px; border-radius: 4px; }
.type-item .switch { padding: 0; }

.block-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

.block-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}
.block-item.off { opacity: .45; }
.block-item.dragging { opacity: .55; border-color: var(--accent); background: var(--panel-3); }
.block-list.dragging-active .block-item { transition: none; }
.block-list.dragging-active .bi-grip { cursor: grabbing; }
.block-item .bi-grip { flex: 0 0 auto; display: flex; align-items: center; cursor: grab; color: #46586e; }
.block-item .bi-grip:hover { color: var(--accent-hi); }
.block-item .bi-grip svg { width: 8px; height: 14px; fill: currentColor; }
.block-item .bi-name { flex: 1 1 auto; font-size: 12px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-item .bi-val { font-size: 10.5px; color: var(--muted); font-family: var(--mono); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-item .bi-move { display: flex; gap: 1px; }
.block-item .bi-move button {
  width: 19px; height: 19px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  line-height: 1;
}
.block-item .bi-move button:hover:not(:disabled) { background: var(--panel-3); color: var(--accent-hi); }
.block-item .bi-move button:disabled { opacity: .22; cursor: default; }
.block-item .bi-move svg { width: 9px; height: 9px; fill: currentColor; }
.block-item .switch { padding: 0; }
.block-item .switch input { width: 26px; height: 15px; }
.block-item .switch input::after { width: 9px; height: 9px; }
.block-item .switch input:checked::after { transform: translateX(11px); }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }

.theme-swatch {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  transition: border-color .13s, transform .13s;
}
.theme-swatch:hover { border-color: #2b3a4d; }
.theme-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.theme-swatch .sw-face {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}
.theme-swatch .sw-name { display: block; font-size: 10px; color: var(--muted); padding: 4px 2px; background: var(--panel-2); }

.contrast-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.contrast-bar .cb-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.contrast-bar .cb-val { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.contrast-bar.ok { border-color: rgba(63, 185, 138, .35); color: #7fd0ac; }
.contrast-bar.ok .cb-dot { background: var(--ok); }
.contrast-bar.warn { border-color: rgba(240, 166, 60, .35); color: #ddb175; }
.contrast-bar.warn .cb-dot { background: var(--warn); }
.contrast-bar.bad { border-color: rgba(239, 95, 95, .38); color: #eb9494; }
.contrast-bar.bad .cb-dot { background: var(--danger); }

.dropzone {
  border: 1px dashed #263449;
  border-radius: 8px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--panel-2);
  transition: border-color .13s, background .13s;
  overflow: hidden;
  padding: 6px;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-dim); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.dz-empty svg { width: 16px; height: 16px; fill: currentColor; }
.dropzone img { max-height: 62px; max-width: 100%; object-fit: contain; }
.dz-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dz-actions .form-range { flex: 1 1 auto; }

.basket { display: flex; flex-direction: column; gap: 5px; margin-bottom: 9px; }
.basket:empty::after {
  content: attr(data-empty);
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
  padding: 14px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.basket.flash:empty::after { animation: basketPulse 2s ease-out; }

@keyframes basketPulse {
  0%, 55% {
    border-color: var(--danger);
    border-style: solid;
    background: rgba(239, 95, 95, .12);
    color: #f0a8a8;
  }
  100% {
    border-color: var(--line);
    background: transparent;
    color: var(--muted);
  }
}
.basket-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}
.basket-item .bk-sw { width: 16px; height: 11px; border-radius: 2px; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .12); }
.basket-item .bk-name { flex: 1 1 auto; font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket-item .bk-dim { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.basket-item input { width: 52px; }
.basket-item .btn-icon { width: 22px; height: 22px; }
.basket-item .btn-icon svg { width: 10px; height: 10px; }
.basket-add { display: flex; gap: 6px; margin-bottom: 8px; }
.basket-add select { flex: 1 1 auto; min-width: 0; }
.basket-add input { width: 62px; flex: 0 0 auto; }

.tips { margin: 0; padding-left: 16px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.tips li { margin-bottom: 5px; }
.tips strong { color: var(--text-dim); }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }

.stage-bar {
  flex: 0 0 auto;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.stage-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.stage-tabs button:hover { color: var(--text-dim); background: var(--panel-2); }
.stage-tabs button.active { background: var(--panel-3); border-color: var(--line); color: var(--text); }

.stage-tools { display: flex; align-items: center; gap: 10px; }
.zoom { display: flex; align-items: center; gap: 6px; }
.zoom input[type=range] { width: 108px; }

.stage-canvas {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background-color: #05070b;
  background-image:
    linear-gradient(rgba(59, 130, 246, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}

.preview-holder { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: auto; }

.preview-wrap {
  display: inline-block;
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .62), 0 0 0 1px rgba(255, 255, 255, .06);
  transition: box-shadow .2s;
}
.preview-wrap svg { display: block; border-radius: inherit; }

.preview-meta {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.preview-meta span strong { color: var(--text-dim); font-weight: 500; }

.stage-foot {
  flex: 0 0 auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.warnings { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.warn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.warn-pill svg { width: 11px; height: 11px; fill: currentColor; flex: 0 0 auto; }
.warn-pill.err { color: #eb9494; border-color: rgba(239, 95, 95, .32); background: rgba(239, 95, 95, .07); }
.warn-pill.warn { color: #ddb175; border-color: rgba(240, 166, 60, .3); background: rgba(240, 166, 60, .06); }
.warn-pill.ok { color: #7fd0ac; border-color: rgba(63, 185, 138, .3); background: rgba(63, 185, 138, .06); }

.credit {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 5px;
  transition: color .13s, background .13s;
}
.credit:hover { color: var(--accent-hi); background: var(--accent-dim); }

.toast-stack {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}
.toast-msg {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: toastIn .22s ease;
}
.toast-msg.bad { border-left-color: var(--danger); }
.toast-msg.good { border-left-color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#printRoot { display: none; }

.print-sheet { position: relative; background: #fff; overflow: hidden; }
.print-cell { position: absolute; }
.print-cell svg { display: block; }
.cut-mark { position: absolute; background: #9aa4b0; }
.cut-outline { position: absolute; border: .1mm dashed #b9c0c8; pointer-events: none; }

@media (max-width: 1100px) {
  html, body { overflow: auto; height: auto; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .side-body { max-height: none; overflow: visible; }
  .stage-canvas { padding: 24px 12px; min-height: 360px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; }
  .profile-box .form-select { min-width: 120px; }
  .brand-text span { display: none; }
}

@media print {
  html, body { overflow: visible; height: auto; background: #fff; }
  .topbar, .workspace, .toast-stack { display: none !important; }
  #printRoot { display: block !important; }
  .print-sheet { page-break-after: always; break-after: page; }
  .print-sheet:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

@page { margin: 0; }
