:root {
  --bg: #0b0b0b;
  --panel: #101010;
  --panel-2: #151515;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.62);
  --muted-2: rgba(255, 255, 255, 0.45);
  --accent: #8fb7ff;
  --accent-2: #f6c66e;
  --good: #6ed39f;
  --danger: #ef7d7d;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --radius-sm: 6px;
  --topbar-h: 60px;
  --page-pad: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="light"] {
  --bg: #efefef;
  --panel: #f7f7f7;
  --panel-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.14);
  --text: rgba(0, 0, 0, 0.92);
  --muted: rgba(0, 0, 0, 0.58);
  --muted-2: rgba(0, 0, 0, 0.42);
  --accent: #2867f6;
  --accent-2: #b36b00;
  --good: #0e8d5f;
  --danger: #cc4c4c;
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0) 0 0 / 12px 12px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    var(--bg);
  letter-spacing: 0;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.08) 1px, transparent 0) 0 0 / 12px 12px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="light"] .topbar {
  background: rgba(247, 247, 247, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 14px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: auto hidden;
  white-space: nowrap;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.topnav a.active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
}

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

.icon-link,
.ghost-button,
.segment-button,
.primary-button,
.secondary-button,
.chip-button,
.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.icon-link:hover,
.ghost-button:hover,
.segment-button:hover,
.primary-button:hover,
.secondary-button:hover,
.chip-button:hover,
.toggle-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-link {
  width: 32px;
  height: 32px;
  padding: 0;
}

.icon-link svg,
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.page-host {
  min-height: calc(100vh - var(--topbar-h));
}

.page {
  width: 100%;
  min-height: calc(100vh - var(--topbar-h));
}

.home-page {
  display: grid;
  grid-template-rows: minmax(74vh, auto) auto;
}

.hero {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 72px 24px 84px;
  text-align: center;
}

.hero-inner {
  width: min(960px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 108px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 900px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.hero strong {
  color: var(--text);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.primary-button {
  background: linear-gradient(180deg, rgba(143, 183, 255, 0.22), rgba(143, 183, 255, 0.12));
  border-color: rgba(143, 183, 255, 0.3);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.03);
}

.home-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 18px 18px;
}

.band-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.band-card h2,
.simple-page h1 {
  margin: 0;
  font-size: 22px;
}

.band-card p,
.simple-page p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.simple-page {
  padding: 24px 18px 30px;
}

.simple-page .panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-h));
}

.sidebar {
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.main-panel {
  padding: 18px 18px 28px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.section-kicker {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.history-count {
  color: var(--muted);
  font-size: 13px;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-button,
.ghost-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.02);
}

.ghost-button:disabled,
.chip-button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.segment-button:disabled,
.toggle-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.history-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.history-item.selected {
  border-color: rgba(143, 183, 255, 0.45);
  background: rgba(143, 183, 255, 0.08);
}

.history-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.history-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}

.history-item-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.workspace {
  display: grid;
  gap: 18px;
}

.tool-section {
  display: grid;
  gap: 10px;
  padding: 0;
}

.tool-section + .tool-section {
  margin-top: 18px;
}

.tool-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tool-label strong {
  color: var(--text);
  font-weight: 600;
}

.tool-help {
  color: var(--muted-2);
  font-size: 12px;
}

.prompt-box {
  width: 100%;
  min-height: 114px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  resize: vertical;
  outline: none;
  line-height: 1.6;
}

.prompt-box:focus,
.field-input:focus,
.field-select:focus {
  border-color: rgba(143, 183, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(143, 183, 255, 0.09);
}

.field-row {
  display: grid;
  gap: 10px;
}

.reference-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.reference-zone {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.reference-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.02);
}

.reference-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reference-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.field-input,
.field-select,
.number-input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  outline: none;
}

.field-select {
  appearance: none;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
  flex: 0 0 auto;
}

.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch[aria-checked="true"] {
  background: rgba(143, 183, 255, 0.18);
  border-color: rgba(143, 183, 255, 0.38);
}

.switch[aria-checked="true"]::after {
  transform: translateX(18px);
  background: var(--accent);
}

.inline-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.ratio-row,
.quality-row,
.count-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segment-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.segment-button.active {
  background: rgba(143, 183, 255, 0.18);
  border-color: rgba(143, 183, 255, 0.35);
}

.generate-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.generate-button {
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(143, 183, 255, 0.22), rgba(143, 183, 255, 0.12));
  border: 1px solid rgba(143, 183, 255, 0.28);
}

.result-section {
  margin-top: 10px;
}

.result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.result-card figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.02);
}

.result-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-card .meta {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
}

.result-card .meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state .empty-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  color: var(--muted-2);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  padding: 16px;
  border-left: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: auto;
  z-index: 40;
}

:root[data-theme="light"] .drawer {
  background: rgba(255, 255, 255, 0.96);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.drawer-head h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-form {
  display: grid;
  gap: 14px;
}

.fieldset {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 60;
}

.toast {
  min-width: 220px;
  max-width: min(92vw, 360px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.94);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
}

:root[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.94);
}

.toast small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.canvas-editor-active .topbar {
  display: none;
}

.canvas-library-page {
  padding: 44px 18px 40px;
}

.canvas-library-inner {
  width: min(1104px, 100%);
  margin: 0 auto;
}

.canvas-library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.canvas-library-head h1 {
  margin: 6px 0 0;
  font-size: 32px;
  line-height: 1.15;
}

.canvas-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 260px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.canvas-empty h2 {
  margin: 0;
  font-size: 22px;
}

.canvas-empty p {
  margin: 0;
  color: var(--muted);
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.canvas-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  overflow: hidden;
}

.canvas-card:hover {
  border-color: var(--line-strong);
}

.canvas-card-preview {
  position: relative;
  height: 160px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.02);
}

.canvas-card-preview.dot,
.canvas-stage.dot {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.12) 1px, transparent 0);
  background-size: 14px 14px;
}

.canvas-card-preview.line,
.canvas-stage.line {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

:root[data-theme="light"] .canvas-card-preview.dot,
:root[data-theme="light"] .canvas-stage.dot {
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.12) 1px, transparent 0);
}

:root[data-theme="light"] .canvas-card-preview.line,
:root[data-theme="light"] .canvas-stage.line {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px);
}

.canvas-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 13px;
}

.preview-node {
  position: absolute;
  width: 34px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(143, 183, 255, 0.38);
  background: rgba(143, 183, 255, 0.16);
}

.preview-node.image {
  background: rgba(246, 198, 110, 0.16);
  border-color: rgba(246, 198, 110, 0.42);
}

.canvas-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.canvas-card-body h2 {
  margin: 0;
  font-size: 15px;
}

.canvas-card-body p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.canvas-editor-page {
  min-height: 100vh;
  background: var(--bg);
}

.canvas-editor-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(12px);
}

:root[data-theme="light"] .canvas-editor-topbar {
  background: rgba(247, 247, 247, 0.92);
}

.canvas-title-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
}

.canvas-top-spacer {
  flex: 1;
}

.canvas-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background-color: var(--bg);
}

.canvas-workspace {
  position: absolute;
  inset: 54px 0 0;
}

.canvas-plane {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2200px;
  height: 1400px;
  transform-origin: center;
}

.canvas-node {
  position: absolute;
  min-width: 140px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(20, 20, 20, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  user-select: none;
}

:root[data-theme="light"] .canvas-node {
  background: rgba(255, 255, 255, 0.96);
}

.canvas-node.selected {
  border-color: rgba(143, 183, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(143, 183, 255, 0.14), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.canvas-node-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.canvas-node:hover .canvas-node-actions,
.canvas-node.selected .canvas-node-actions {
  opacity: 1;
}

.canvas-node-actions button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  font-size: 12px;
}

.canvas-node-actions svg {
  width: 12px;
  height: 12px;
}

.canvas-node-text {
  min-height: 112px;
  padding: 34px 14px 14px;
  outline: none;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  user-select: text;
}

.canvas-node img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.canvas-node-placeholder {
  display: grid;
  place-items: center;
  min-height: 138px;
  color: var(--muted);
}

.canvas-quickbar {
  position: fixed;
  left: 50%;
  top: 72px;
  z-index: 22;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.canvas-selection-panel,
.canvas-side-panel {
  position: fixed;
  z-index: 24;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 15, 15, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

:root[data-theme="light"] .canvas-selection-panel,
:root[data-theme="light"] .canvas-side-panel {
  background: rgba(255, 255, 255, 0.94);
}

.canvas-selection-panel {
  left: 50%;
  top: 124px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 13px;
}

.canvas-side-panel {
  right: 24px;
  top: 86px;
  width: min(300px, calc(100vw - 48px));
  padding: 16px;
  display: grid;
  gap: 12px;
}

.canvas-side-panel h2 {
  margin: 0;
  font-size: 16px;
}

.canvas-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 12, 12, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  overflow-x: auto;
}

:root[data-theme="light"] .canvas-toolbar {
  background: rgba(255, 255, 255, 0.92);
}

.canvas-tool {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.canvas-tool svg {
  width: 16px;
  height: 16px;
}

.canvas-tool.active {
  border-color: rgba(143, 183, 255, 0.55);
  background: rgba(143, 183, 255, 0.16);
}

.canvas-tool.danger {
  color: var(--danger);
}

.canvas-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 178px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.canvas-zoom input {
  width: 110px;
}

@media (max-width: 1024px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .topbar {
    gap: 10px;
    padding: 0 12px;
  }

  .topnav {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .home-band {
    grid-template-columns: 1fr;
  }

  .main-panel,
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .drawer {
    width: 100vw;
  }

  .canvas-library-head {
    align-items: start;
    flex-direction: column;
  }

  .canvas-quickbar {
    top: 64px;
  }

  .canvas-toolbar {
    left: 12px;
    right: 12px;
    transform: none;
  }
}
