:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-3: #ffffff;
  --line: #e1e6ed;
  --line-strong: #c8d1dd;
  --text: #182234;
  --muted: #697487;
  --quiet: #9099a8;
  --accent: #2f7ff0;
  --accent-2: #1769d2;
  --accent-soft: #eaf2ff;
  --danger: #d73a49;
  --radius: 10px;
  --shadow: 0 22px 70px rgba(32, 49, 76, 0.18);
  font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

body {
  user-select: none;
  font-size: 13px;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.38;
  cursor: default;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
}

.titlebar {
  height: 58px;
  display: flex;
  align-items: center;
  padding-left: 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  -webkit-app-region: drag;
}

.brand-block,
.title-actions,
.window-controls {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  flex: 1;
  gap: 11px;
}

.brand-mark {
  width: 31px;
  height: 31px;
  color: var(--accent);
}

.brand-mark svg,
.brand-mark img {
  width: 31px;
  height: 31px;
  display: block;
  object-fit: contain;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.02em;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--text);
  font-family: "Arial Black", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 1;
}

.brand-wordmark__mint {
  color: #a8e5b9;
}

.brand-name .brand-suffix {
  color: #8b95a5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.title-divider {
  width: 1px;
  height: 23px;
  margin: 0 4px;
  background: var(--line);
}

.document-title {
  min-width: 0;
  max-width: 360px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-actions {
  gap: 7px;
  margin: 0 14px;
  -webkit-app-region: no-drag;
}

.icon-action,
.text-action,
.window-controls button,
.tool-button,
.square-button,
.quiet-button,
.wide-button,
.reset-link,
.ratio-grid button,
.transform-grid button,
.filter-tile,
.segmented button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #657082;
}

.icon-action:hover:not(:disabled) {
  color: var(--text);
  background: #f0f3f7;
}

.text-action {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 8px;
  color: #4e5a6d;
}

.text-action svg {
  width: 17px;
  height: 17px;
}

.text-action:hover:not(:disabled) {
  background: #f0f3f7;
}

.text-action.default-action {
  border: 1px solid #dce2ea;
  background: #ffffff;
  color: #596578;
}

.text-action.default-action:hover:not(:disabled) {
  border-color: #a9c8ef;
  color: var(--accent-2);
}

.text-action.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 15px rgba(47, 127, 240, 0.2);
}

.text-action.primary:hover:not(:disabled) {
  background: #1f70df;
}

.window-controls {
  height: 100%;
  align-self: stretch;
  -webkit-app-region: no-drag;
}

.window-controls button {
  position: relative;
  width: 48px;
  height: 100%;
  color: #566174;
}

.window-controls button:hover {
  background: #eef1f5;
}

.window-controls button.close:hover {
  background: #c42b1c;
  color: white;
}

.window-controls span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.window-controls [data-window="maximize"] span {
  width: 10px;
  height: 10px;
  background: transparent;
  border: 1px solid currentColor;
}

.window-controls button.maximized [data-window="maximize"] span,
.window-controls #maximizeBtn.maximized span {
  box-shadow: 2px -2px 0 -1px #ffffff, 2px -2px 0 0 currentColor;
}

.window-controls .close span,
.window-controls .close span::after {
  width: 12px;
  height: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.window-controls .close span::after {
  content: "";
  display: block;
  background: currentColor;
  transform: rotate(90deg);
}

.app-shell {
  height: calc(100% - 58px);
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr) 320px;
}

.tool-sidebar {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #d5dbe4 transparent;
}

.tool-sidebar::-webkit-scrollbar { width: 6px; }
.tool-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #d5dbe4; }

.tool-mode-switch {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 14px 12px 5px;
  padding: 4px;
  border: 1px solid #e1e6ed;
  border-radius: 12px;
  background: #ffffff;
}

.tool-mode-switch button {
  min-width: 0;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #536176;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.tool-mode-switch button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tool-mode-switch button:hover {
  color: #27364d;
  border-color: #d7e2ef;
}

.tool-mode-switch button.is-active {
  border-color: #2f7ff0;
  background: linear-gradient(135deg, #2f7ff0, #1769d2);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(47, 127, 240, .28);
}

.tool-mode-pane {
  flex: 0 0 auto;
  min-height: 0;
}

.format-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 13px 14px;
}

.format-nav__summary {
  margin: 0 2px 3px;
  color: #7b8798;
  font-size: 9px;
  line-height: 1.55;
}

.format-nav__item {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #ffffff;
  color: #657184;
  text-align: left;
}

.format-nav__item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.format-nav__item strong,
.format-nav__item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-nav__item strong { font-size: 10px; }
.format-nav__item small { margin-top: 2px; color: #929baa; font-size: 8px; }

.format-workspace {
  grid-column: 2 / -1;
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  background: #ffffff;
}

.tool-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3b475a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.tool-section-head {
  padding: 3px 3px 10px;
}

.tool-section-head small {
  margin-left: auto;
  color: #a2aab7;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
}

.tool-rail {
  flex: 0 0 auto;
  padding: 14px 13px 12px;
  background: #ffffff;
}

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

.tool-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 2px 7px;
  padding-top: 11px;
  border-top: 1px solid #e4e9f0;
  color: #46546a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
}

.tool-group-head small {
  margin-left: auto;
  color: #9aa5b4;
  font-size: 7px;
  letter-spacing: .12em;
}

.tool-group-head--ai {
  color: #285d94;
}

.tool-button--ai {
  border-color: #dce9f8;
  background: #f3f8ff;
  color: #426b99;
}

.tool-button--ai:hover:not(:disabled) {
  border-color: #b9d5f5;
  background: #eaf4ff;
  color: #1f5e9e;
}

.tool-button {
  min-width: 0;
  min-height: 58px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #657184;
  transition: background 120ms ease, color 120ms ease;
}

.tool-button svg {
  width: 21px;
  height: 21px;
}

.tool-button span {
  font-size: 10px;
  letter-spacing: 0.01em;
}

.tool-button:hover:not(:disabled) {
  background: #f4f6f9;
  color: var(--text);
}

.tool-button.active {
  border-color: #c8ddfb;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.tool-button--export {
  grid-column: 1 / -1;
  min-height: 42px;
  flex-direction: row;
  gap: 8px;
  border-color: #dce3ec;
  background: #ffffff;
}

.workspace {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0,1fr) 27px;
  background: #ffffff;
}

.workspace-icon {
  width: 30px;
  height: 30px;
}

.workspace-export {
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.workspace-export svg {
  width: 16px;
  height: 16px;
}

.quiet-button,
.square-button,
.zoom-label {
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #667286;
}

.quiet-button {
  padding: 0 9px;
  font-size: 11px;
  white-space: nowrap;
}

.canvas-replace {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.canvas-replace svg {
  width: 14px;
  height: 14px;
}

.quiet-button:hover:not(:disabled),
.square-button:hover:not(:disabled),
.zoom-label:hover {
  background: #eef2f7;
  color: var(--text);
}

.square-button {
  width: 30px;
  font-size: 17px;
}

.zoom-label {
  min-width: 52px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.canvas-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-color: #edf3f9;
  background-image: radial-gradient(circle, #c9d5e4 1px, transparent 1.2px);
  background-size: 20px 20px;
}

.is-restoring .drop-card,
.is-restoring .canvas-scroll,
.is-restoring .canvas-actions,
.is-restoring .assistant-dock,
.is-restoring .busy-overlay {
  visibility: hidden !important;
  opacity: 0 !important;
}

.canvas-actions {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 12;
  box-sizing: border-box;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  border: 1px solid rgba(209, 219, 232, 0.96);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(43, 61, 87, 0.14);
  backdrop-filter: blur(14px);
}

.canvas-action-divider {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: var(--line);
}

.assistant-dock {
  position: absolute;
  left: 50%;
  bottom: 35px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(620px, calc(100% - 28px));
  height: 151px;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  height: 92px;
  max-height: 92px;
  overflow-y: auto;
  padding: 1px 2px;
  scrollbar-width: thin;
  pointer-events: none;
}

.assistant-message {
  max-width: min(88%, 520px);
  padding: 7px 10px;
  border: 1px solid #dce5ef;
  border-radius: 10px 10px 10px 3px;
  background: rgba(255, 255, 255, .97);
  color: #58677b;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 5px 16px rgba(43, 61, 87, .08);
  pointer-events: auto;
}

.assistant-message--user {
  align-self: flex-end;
  border-color: #cadcf5;
  border-radius: 10px 10px 3px 10px;
  background: #edf5ff;
  color: #245b9e;
}

.assistant-compose {
  height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  width: 100%;
  padding: 7px;
  border: 1px solid #d7e0eb;
  border-radius: 15px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 34px rgba(37, 56, 83, .16);
  pointer-events: auto;
}

.assistant-upload,
.assistant-send {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid #dbe4ef;
  border-radius: 11px;
  background: #ffffff;
  color: #52647b;
  cursor: pointer;
}

.assistant-upload:hover {
  border-color: #bcd2ee;
  color: var(--accent-2);
}

.assistant-send {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.assistant-send:disabled {
  cursor: wait;
  opacity: .55;
}

.assistant-message--link,
.assistant-message--action {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 9px;
  background: #245b9e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.assistant-message--action {
  border: 1px solid #245b9e;
  cursor: pointer;
}

.text-result-input {
  width: 100%;
  min-height: 220px;
  margin-bottom: 10px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #dce4ed;
  border-radius: 9px;
  outline: none;
  background: #f8fafc;
  color: #29384c;
  font: 12px/1.65 "Segoe UI", "Microsoft YaHei UI", sans-serif;
  user-select: text;
}

.text-result-input--large {
  min-height: clamp(300px, 42vh, 520px);
}

.text-result-input:focus {
  border-color: #8db9ef;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, .12);
}

.assistant-upload svg,
.assistant-send svg {
  width: 18px;
  height: 18px;
}

.assistant-compose textarea {
  height: 38px;
  max-height: 88px;
  resize: none;
  padding: 9px 7px 7px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.assistant-compose textarea::placeholder {
  color: #98a2b1;
}

.assistant-dock[hidden] {
  display: none;
}

.canvas-remove[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .assistant-dock {
    width: calc(100% - 16px);
    height: 115px;
    bottom: 32px;
    margin: 0;
  }

  .assistant-messages {
    height: 62px;
    max-height: 62px;
  }

  .assistant-message {
    max-width: 94%;
    padding: 6px 9px;
    font-size: 10px;
  }

  .text-result-input {
    min-height: 150px;
  }

  .text-result-input--large {
    min-height: 260px;
  }

  .assistant-compose {
    height: 46px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 5px;
    border-radius: 13px;
  }

  .assistant-upload,
  .assistant-send {
    width: 36px;
    height: 36px;
  }

  .assistant-compose textarea {
    height: 36px;
    padding: 8px 5px 6px;
    font-size: 12px;
  }
}

.drop-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(450px, calc(100% - 80px));
  padding: 46px 38px 36px;
  border: 1px solid #dce3ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 65px rgba(48, 63, 86, 0.14);
  text-align: center;
  transform: translate(-50%, -50%);
}

.drop-glow {
  display: none;
}

.drop-icon {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid #cfdff5;
  border-radius: 18px;
  background: #eef5ff;
  color: var(--accent);
}

.drop-icon svg {
  width: 33px;
  height: 33px;
}

.drop-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.drop-card p {
  max-width: 330px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.65;
}

.large-button,
.wide-button {
  min-height: 36px;
  border-radius: 8px;
  cursor: pointer;
}

.large-button {
  min-width: 132px;
  display: inline-flex;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  color: white;
  background: var(--accent);
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(47,140,255,0.25);
}

.large-button:hover {
  background: #489aff;
}

.pw-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .001;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  z-index: 2;
}

.format-line {
  display: block;
  margin-top: 20px;
  color: #8a95a7;
  font-size: 10px;
  letter-spacing: 0.055em;
}

.default-link {
  display: block;
  margin: 12px auto 0;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  cursor: pointer;
  font-size: 11px;
}

.default-link:hover { color: #0f5fbe; }

.canvas-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 0;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
}

.canvas-scroll.is-panning {
  cursor: grabbing;
}

.canvas-scroll.is-moving-document,
.canvas-scroll.is-moving-document #previewCanvas {
  cursor: grabbing;
}

.canvas-scroll.tool-mosaic #previewCanvas,
.canvas-scroll.tool-annotate #previewCanvas {
  cursor: crosshair;
}

.canvas-mat {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
}

#previewCanvas {
  max-width: none;
  display: block;
  flex: none;
  touch-action: none;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

.drop-overlay {
  position: absolute;
  inset: 14px;
  z-index: 10;
  display: none;
  place-items: center;
  border: 2px dashed #4f97ff;
  border-radius: 16px;
  background: rgba(238, 245, 255, 0.94);
  color: #145ba8;
  font-size: 20px;
  font-weight: 650;
}

.drop-overlay.visible { display: grid; }

.busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(244, 247, 251, 0.82);
  backdrop-filter: blur(4px);
}

.busy-overlay[hidden],
.modal-backdrop[hidden],
.canvas-scroll[hidden] {
  display: none;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d7dee8;
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.statusbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 15px;
  color: #7a8597;
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.status-spacer { flex: 1; }

.inspector {
  position: relative;
  min-width: 0;
  overflow-y: auto;
  padding: 20px 18px 24px;
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #8d97a7;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.inspector h2,
.crop-dialog h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.reset-link {
  margin-top: 14px;
  padding: 3px 0;
  color: var(--accent-2);
  font-size: 11px;
}

.reset-link:hover:not(:disabled) { color: #0f5fbe; }

.tool-panel {
  display: none;
  animation: panel-in 140ms ease-out;
}

.tool-panel.active { display: block; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.panel-copy {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.62;
  font-size: 11px;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  margin: 0 0 17px;
}

.slider-row label {
  color: #c9cfd9;
  font-size: 11px;
}

.slider-row output {
  color: #8791a2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.slider-row input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 14px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: #333b49;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5px;
  appearance: none;
  border: 2px solid #dceaff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

.field-label {
  display: block;
  margin: 17px 0 8px;
  color: #aeb6c4;
  font-size: 10px;
}

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

.collage-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 18px;
}

.collage-layout-grid > button {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #fff;
  color: #647084;
  cursor: pointer;
}

.collage-layout-grid > button:hover {
  border-color: #b7c5d6;
}

.collage-layout-grid > button.selected {
  border-color: #8db9ef;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.collage-layout-grid strong {
  font-size: 9px;
  font-weight: 600;
}

.collage-preview {
  display: grid;
  width: 48px;
  height: 38px;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid #b9c8da;
  border-radius: 5px;
  background: #eef3f9;
}

.collage-preview i {
  min-width: 0;
  min-height: 0;
  border-radius: 2px;
  background: #5d93cf;
}

.ratio-grid button,
.segmented button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1b2029;
  color: #8e98a9;
  font-size: 10px;
}

.ratio-grid button:hover,
.segmented button:hover {
  border-color: var(--line-strong);
  color: #d2d8e1;
}

.ratio-grid button.selected,
.segmented button.selected {
  border-color: #3776c8;
  background: var(--accent-soft);
  color: #8abbff;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}

.metric-grid > div {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191e26;
}

.metric-grid span {
  display: block;
  margin-bottom: 4px;
  color: #6d7788;
  font-size: 9px;
}

.metric-grid strong {
  color: #dfe4ec;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wide-button {
  width: 100%;
  padding: 0 14px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 580;
}

.wide-button + .wide-button { margin-top: 8px; }

.wide-button.primary {
  background: var(--accent);
  color: white;
}

.wide-button.primary:hover:not(:disabled) { background: #4598ff; }

.wide-button.subtle {
  border-color: var(--line);
  background: #1a1f27;
  color: #b4bdcb;
}

.wide-button.subtle:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #202632;
}

.wide-button.large {
  min-height: 42px;
  margin-top: 18px;
  font-size: 12px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 1fr 15px 1fr;
  align-items: end;
  gap: 7px;
}

.dimension-row > span {
  padding-bottom: 11px;
  color: #626d7f;
  text-align: center;
}

.dimension-row label,
.inline-field,
.crop-values label {
  color: #7e8899;
  font-size: 9px;
}

.dimension-row input,
.inline-field input,
.crop-values input,
.crop-toolbar select {
  width: 100%;
  height: 35px;
  margin-top: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11151b;
  color: #e6eaf1;
  font-variant-numeric: tabular-nums;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px;
}

.inline-field input { margin-top: 0; }

.inline-field span {
  padding-right: 10px;
  color: #727d8f;
}

.check-row {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  color: #a7b0be;
  font-size: 11px;
}

.check-row input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.transform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.transform-grid button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #191e26;
  color: #aeb7c5;
  font-size: 10px;
}

.transform-grid button span {
  display: block;
  margin-bottom: 5px;
  color: #e4e9f0;
  font-size: 22px;
  line-height: 1;
}

.transform-grid button:hover {
  border-color: var(--line-strong);
  background: #202632;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.filter-ai-hint {
  margin: -7px 0 14px;
  padding: 8px 10px;
  border: 1px solid #d8e7fb;
  border-radius: 8px;
  background: #eef6ff;
  color: #49698f;
  font-size: 9px;
  line-height: 1.45;
}

.ai-tier-row {
  display: grid;
  gap: 7px;
  margin: 3px 0 13px;
}

.ai-tier-row > span {
  color: #637085;
  font-size: 9px;
  font-weight: 700;
}

.ai-tier-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 3px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #f1f5fa;
}

.ai-tier-switch button {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #657184;
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
}

.ai-tier-switch button.selected {
  border-color: #a8c9ef;
  background: #ffffff;
  color: #245d9e;
  box-shadow: 0 1px 5px rgba(44, 82, 133, .12);
}

.filter-group-title {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 2px 1px 1px;
  color: #41506a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.filter-group-title:first-child {
  margin-top: 0;
}

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

.annotation-mode-grid button {
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #191e26;
  color: #909aaa;
  cursor: pointer;
  font-size: 10px;
}

.annotation-mode-grid button:hover {
  border-color: var(--line-strong);
  color: #d7dde6;
}

.annotation-mode-grid button.selected {
  border-color: #3776c8;
  background: var(--accent-soft);
  color: #9cc7ff;
}

.text-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #11151b;
  color: #e7ebf2;
  user-select: text;
}

.text-input:focus {
  border-color: #397ccc;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, 0.14);
}

.color-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.color-row button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #303746;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}

.color-row button.selected {
  border-color: #8fc1ff;
  box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.2);
}

.panel-select {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11151b;
  color: #e6eaf1;
}

.target-field {
  margin-bottom: 9px;
}

.compression-presets {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
}

.compression-presets button:nth-child(4),
.compression-presets button:nth-child(5) {
  grid-column: span 1;
}

.watermark-options {
  display: grid;
  grid-template-columns: 1fr 66px;
  gap: 10px;
  margin: 14px 0 18px;
  color: #7e8899;
  font-size: 9px;
}

.watermark-options select {
  width: 100%;
  height: 35px;
  margin-top: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11151b;
  color: #e6eaf1;
}

.watermark-options input[type="color"] {
  width: 100%;
  height: 35px;
  margin-top: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #11151b;
}

.filter-tile {
  position: relative;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #191e26;
  color: #9da7b6;
  text-align: left;
  font-size: 10px;
}

.filter-tile.selected {
  border-color: #397ccc;
  color: #a9ceff;
  box-shadow: inset 0 0 0 1px rgba(47,140,255,0.25);
}

.swatch {
  display: block;
  height: 53px;
  margin-bottom: 7px;
  border-radius: 6px;
  background-color: #b79a73;
  background-image: url("filter-preview-cat.jpg");
  background-position: center 43%;
  background-size: cover;
}

.swatch.has-rendered-preview {
  filter: none !important;
}

.filter-ai-mark {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: rgba(20, 31, 47, .78);
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.25;
  backdrop-filter: blur(4px);
}

.filter-tile.is-processing {
  border-color: #397ccc;
  box-shadow: 0 0 0 2px rgba(47, 140, 255, .18);
  opacity: .72;
}

.filter-tile:disabled {
  cursor: wait;
}

.swatch.vivid { filter: saturate(1.7) contrast(1.12); }
.swatch.warm { filter: sepia(.25) saturate(1.45) brightness(1.08); }
.swatch.cool { filter: hue-rotate(15deg) saturate(.82) brightness(1.03); }
.swatch.mono { filter: grayscale(1) contrast(1.15); }
.swatch.fade { filter: saturate(.6) brightness(1.13) contrast(.82); }
.swatch.dramatic { filter: contrast(1.5) saturate(.86) brightness(.78); }
.swatch.film { filter: sepia(.25) saturate(.86) contrast(1.14) brightness(1.03); }
.swatch.natural { filter: saturate(1.12) contrast(1.06); }
.swatch.sepia { filter: sepia(.72) saturate(.8) contrast(1.05); }
.swatch.texture { filter: contrast(1.25) saturate(.92) grayscale(.08); }
.swatch.ins-white { filter: brightness(1.18) saturate(.74) contrast(.9); }
.swatch.clay { filter: saturate(1.28) brightness(1.12) contrast(.92) sepia(.12); }
.swatch.watercolor { filter: brightness(1.12) saturate(.72) contrast(.78) blur(.6px); }
.swatch.anime { filter: saturate(1.52) contrast(1.34) brightness(1.06); }
.swatch.flat-illustration { filter: saturate(1.36) contrast(1.18) brightness(1.04); }
.swatch.picture-book { filter: sepia(.2) saturate(1.15) brightness(1.14) contrast(.88); }
.swatch.paper-fold { filter: sepia(.28) saturate(.8) contrast(1.22); }
.swatch.pencil-sketch { filter: grayscale(1) contrast(1.7) brightness(1.18); }
.swatch.colorful-oil { filter: saturate(1.62) contrast(1.28) brightness(1.02); }
.swatch.ink-wash { filter: grayscale(.92) sepia(.18) contrast(1.55) brightness(1.12); }
.swatch.cyberpunk { filter: hue-rotate(310deg) saturate(1.8) contrast(1.35) brightness(.92); }
.swatch.color-sketch { filter: saturate(1.25) contrast(1.42) brightness(1.1); }
.swatch.picasso { filter: hue-rotate(125deg) saturate(1.65) contrast(1.28); }
.swatch.pastel { filter: brightness(1.24) saturate(.78) contrast(.78) sepia(.12); }
.swatch.starry { filter: hue-rotate(195deg) saturate(1.55) contrast(1.42) brightness(.8); }
.swatch.fairy-tale { filter: hue-rotate(320deg) saturate(1.25) brightness(1.14) contrast(.88); }
.swatch.portrait-bright { filter: brightness(1.18) saturate(1.08) contrast(.95); }
.swatch.portrait-sweet { filter: sepia(.18) saturate(1.18) brightness(1.16) contrast(.9); }
.swatch.portrait-japanese { filter: brightness(1.17) saturate(.78) contrast(.82) hue-rotate(8deg); }
.swatch.portrait-hongkong { filter: sepia(.2) saturate(1.28) contrast(1.32) brightness(.88); }
.swatch.sea { filter: hue-rotate(165deg) saturate(1.45) contrast(1.18); }
.swatch.sunlight { filter: sepia(.25) saturate(1.38) brightness(1.2) contrast(1.04); }
.swatch.autumn { filter: sepia(.45) hue-rotate(330deg) saturate(1.45) contrast(1.12); }
.swatch.wonderland { filter: hue-rotate(320deg) saturate(1.5) brightness(1.12) contrast(1.04); }
.swatch.landscape { filter: saturate(1.32) contrast(1.15) brightness(1.04); }
.swatch.portrait { filter: sepia(.12) saturate(.9) brightness(1.1) contrast(.92); }
.swatch.night { filter: hue-rotate(165deg) saturate(.9) contrast(1.38) brightness(.72); }
.swatch.food { filter: sepia(.16) saturate(1.5) brightness(1.08) contrast(1.08); }
.swatch.forest { filter: hue-rotate(-12deg) saturate(1.28) contrast(1.12) brightness(.94); }
.swatch.vintage { filter: sepia(.52) saturate(.72) contrast(.88) brightness(1.06); }

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

.export-metrics { margin-bottom: 8px; }

.inspector-empty {
  padding: 34px 12px;
  text-align: center;
}

.inspector-empty[hidden] { display: none; }

.empty-mini-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 11px;
  background: #19202a;
  color: #7198cb;
}

.inspector-empty h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.inspector-empty p {
  margin: 0;
  color: #6f798a;
  line-height: 1.65;
  font-size: 10px;
}

/* ---------------------------------------------------------- light controls */

.panel-copy {
  color: #6f7a8c;
}

.slider-row label { color: #445064; }
.slider-row output { color: #7a8597; }

.slider-row input[type="range"]::-webkit-slider-runnable-track {
  background: #d9e0e9;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  border-color: #ffffff;
  background: var(--accent);
  box-shadow: 0 1px 6px rgba(34, 73, 123, 0.26);
}

.field-label { color: #637085; }

.ratio-grid button,
.segmented button,
.transform-grid button,
.annotation-mode-grid button,
.filter-tile {
  border-color: #dce3ec;
  background: #ffffff;
  color: #5f6b7e;
}

.ratio-grid button:hover,
.segmented button:hover,
.transform-grid button:hover,
.annotation-mode-grid button:hover {
  border-color: #b7c5d6;
  background: #ffffff;
  color: #263348;
}

.ratio-grid button.selected,
.segmented button.selected,
.annotation-mode-grid button.selected,
.filter-tile.selected {
  border-color: #8db9ef;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.metric-grid > div {
  border-color: #e0e6ee;
  background: #ffffff;
}

.metric-grid span { color: #818c9d; }
.metric-grid strong { color: #263349; }

.wide-button.subtle {
  border-color: #dbe2eb;
  background: #ffffff;
  color: #536074;
}

.wide-button.subtle:hover:not(:disabled) {
  border-color: #b7c5d6;
  background: #eef2f7;
}

.wide-button.primary:hover:not(:disabled) { background: #1f70df; }

.dimension-row > span,
.dimension-row label,
.inline-field,
.crop-values label,
.watermark-options {
  color: #7f8a9b;
}

.dimension-row input,
.inline-field input,
.crop-values input,
.crop-toolbar select,
.text-input,
.panel-select,
.watermark-options select,
.watermark-options input[type="color"] {
  border-color: #dce3ec;
  background: #ffffff;
  color: #263349;
}

.text-input::placeholder { color: #a6afbc; }

.text-input:focus {
  border-color: #72a7e8;
  box-shadow: 0 0 0 3px rgba(47, 127, 240, 0.11);
}

.inline-field span { color: #8792a3; }
.check-row { color: #5b677a; }

.transform-grid button span { color: #263349; }

.color-row button {
  border-color: #d3dbe5;
}

.color-row button.selected {
  border-color: #6fa5e8;
  box-shadow: 0 0 0 3px rgba(47, 127, 240, 0.14);
}

.filter-tile { color: #657184; }

.inspector-empty {
  border: 1px dashed #dbe2eb;
  border-radius: 12px;
  background: #ffffff;
}

.empty-mini-icon {
  background: #edf4ff;
  color: var(--accent);
}

.inspector-empty p { color: #7c8798; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(26, 38, 55, 0.34);
  backdrop-filter: blur(8px);
}

.crop-dialog {
  width: min(1120px, 94vw);
  height: min(820px, 90vh);
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
  overflow: hidden;
  border: 1px solid #dbe2eb;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.default-dialog {
  width: min(520px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #dbe2eb;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.default-dialog-body {
  padding: 20px 22px 17px;
}

.default-dialog-body p {
  margin: 0 0 14px;
  color: #687487;
  line-height: 1.65;
  font-size: 11px;
}

.default-dialog-body .default-hint {
  margin: 17px 0 0;
  padding: 11px 13px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  background: #ffffff;
  color: #6f7b8d;
}

.default-hint strong { color: #263349; }

.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.format-pills span {
  padding: 4px 8px;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #ffffff;
  color: #536074;
  font-size: 9px;
  font-weight: 650;
}

.default-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.default-dialog-actions .wide-button {
  width: auto;
  min-width: 116px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 21px 13px;
  border-bottom: 1px solid var(--line);
}

.dialog-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #748094;
  cursor: pointer;
  font-size: 22px;
}

.dialog-close:hover { background: #eef2f7; color: var(--text); }

.crop-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  color: #748094;
  font-size: 9px;
}

.crop-toolbar select { width: 134px; }

.crop-values {
  display: grid;
  grid-template-columns: repeat(4, 78px);
  gap: 7px;
}

.crop-values input {
  height: 31px;
  margin-top: 4px;
}

.crop-workspace {
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  background-image: none;
}

#cropCanvas {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform: translate(-50%, -50%);
}

.crop-shade {
  position: absolute;
  pointer-events: none;
}

.crop-box {
  position: absolute;
  border: 1px solid rgba(255,255,255,.94);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.56);
  pointer-events: auto;
  cursor: move;
}

.crop-grid-line {
  position: absolute;
  background: rgba(255,255,255,.22);
  pointer-events: none;
}

.crop-grid-line.v1 { top: 0; bottom: 0; left: 33.333%; width: 1px; }
.crop-grid-line.v2 { top: 0; bottom: 0; left: 66.666%; width: 1px; }
.crop-grid-line.h1 { left: 0; right: 0; top: 33.333%; height: 1px; }
.crop-grid-line.h2 { left: 0; right: 0; top: 66.666%; height: 1px; }

.crop-handle {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 3px;
  background: var(--accent);
}

.crop-handle.nw { left: -7px; top: -7px; cursor: nwse-resize; }
.crop-handle.ne { right: -7px; top: -7px; cursor: nesw-resize; }
.crop-handle.sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.crop-handle.se { right: -7px; bottom: -7px; cursor: nwse-resize; }

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 19px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.dialog-actions .wide-button { width: auto; min-width: 102px; }
.dialog-spacer { flex: 1; }

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 42px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 370px;
  padding: 10px 14px;
  border: 1px solid #d9e1eb;
  border-radius: 9px;
  background: #ffffff;
  color: #344156;
  box-shadow: 0 12px 30px rgba(48, 63, 86, 0.18);
  animation: toast-in 160ms ease-out;
}

.toast.error { border-color: #efc8cd; color: #b42335; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@media (max-height: 760px) {
  .tool-rail { padding: 10px; }
  .tool-section-head { padding-bottom: 7px; }
  .tool-grid { gap: 5px; }
  .tool-button { min-height: 49px; gap: 3px; padding: 4px; }
  .tool-button svg { width: 19px; height: 19px; }
  .tool-button span { font-size: 9px; }
  .tool-button--export { min-height: 36px; }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 196px minmax(0, 1fr) 288px; }
  .tool-rail { padding-left: 11px; padding-right: 11px; }
  .document-title { max-width: 210px; }
  .canvas-scroll { padding: 0; }
  .workspace-icon { width: 28px; height: 28px; }
  .workspace-export { padding: 0 8px; }
  .quiet-button { padding: 0 6px; font-size: 10px; }
  .zoom-label { min-width: 42px; }
}

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 178px minmax(0, 1fr) 250px; }
  .title-actions .text-action:not(.primary) { display: none; }
  .brand-name .brand-suffix, .title-divider { display: none; }
  .tool-button { min-height: 54px; }
  .tool-button span { font-size: 9px; }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(230px, 1fr) auto minmax(0, 34vh);
    overflow: hidden;
  }

  .workspace {
    grid-column: 1;
    grid-row: 1;
  }

  .tool-sidebar {
    grid-column: 1;
    grid-row: 2;
    overflow: visible;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .web-editor .tool-sidebar {
    padding-top: 0;
  }

  .web-editor .tool-mode-pane[data-work-pane="editor"] {
    display: block !important;
  }

  .tool-rail {
    padding: 7px 8px 6px;
    overflow: hidden;
  }

  .tool-section-head {
    display: flex;
    padding: 0 2px 4px;
  }

  .tool-section-head small {
    display: none;
  }

  .tool-group-head {
    margin: 5px 2px 3px;
    padding-top: 5px;
    font-size: 8px;
  }

  .tool-group-head small {
    display: none;
  }

  .tool-grid {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 3px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .tool-button {
    min-width: 54px;
    min-height: 50px;
    flex: 0 0 54px;
    padding: 4px 3px;
    scroll-snap-align: start;
  }

  .tool-button--export {
    min-width: 68px;
    flex-basis: 68px;
    flex-direction: column;
  }

  .inspector {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    padding: 12px 15px 15px;
    border-top: 1px solid var(--line);
    border-left: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .inspector-head {
    margin-bottom: 10px;
  }

  .canvas-actions {
    top: 8px;
    left: 50%;
    right: auto;
    height: 40px;
    max-width: calc(100% - 16px);
    gap: 2px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    transform: translateX(-50%);
  }

  .canvas-actions .canvas-replace,
  .canvas-actions .canvas-remove {
    width: 32px;
    min-width: 32px;
    padding: 0;
  }

  .canvas-actions .canvas-replace span,
  .canvas-actions .canvas-remove span,
  .canvas-actions #compareBtn {
    display: none;
  }

  .canvas-actions .workspace-export {
    padding: 0 9px;
    font-size: 10px;
  }

  .drop-card {
    top: 12px;
    left: 50%;
    width: calc(100% - 28px);
    max-height: calc(100% - 24px);
    padding: 18px 16px;
    overflow-y: auto;
    transform: translateX(-50%);
  }

  .drop-card .drop-glow {
    inset: -35px 20px auto;
    height: 100px;
  }

  .drop-card .drop-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .drop-card .drop-icon svg {
    width: 26px;
    height: 26px;
  }

  .drop-card h1 {
    margin-bottom: 6px;
    font-size: 20px;
    line-height: 1.2;
  }

  .drop-card p {
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.45;
  }

  .drop-card .large-button {
    min-height: 38px;
    padding: 0 16px;
  }

  .drop-card .format-line {
    margin-top: 10px;
    font-size: 10px;
  }

  .canvas-scroll {
    padding: 0;
  }

  .drop-card {
    width: calc(100% - 32px);
    max-height: calc(100% - 80px);
    overflow-y: auto;
    padding: 28px 20px 24px;
  }
}

@media (max-width: 760px) and (max-height: 600px) {
  .drop-card {
    padding: 14px 16px;
  }

  .drop-card .drop-icon {
    display: none;
  }

  .drop-card p {
    margin-bottom: 10px;
  }
}
