:root {
  --bg: #eef1f4;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #17212b;
  --muted: #5f6b78;
  --line: rgba(18, 28, 38, 0.12);
  --shadow: 0 18px 50px rgba(18, 28, 38, 0.12);
  --accent: #c07d2c;
  --accent-strong: #9f6117;
  --danger: #c84f4f;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(208, 170, 109, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(94, 141, 164, 0.18), transparent 26%),
    linear-gradient(180deg, #f7f8fa 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

.app,
.workspace,
.canvas-panel,
.canvas-shell,
.canvas-frame,
.control-panel,
.dock,
.tool-group,
.param-row,
.dock-color-block,
.palette-panel,
.selected-color-inline,
.palette-select-wrap,
.palette-search,
.layer-strip,
.palette-filters,
.palette-groups,
.palette-grid,
.palette-colors {
  max-width: 100%;
  min-width: 0;
}

.app {
  width: min(1920px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.hero {
  display: grid;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.55;
}

.hero-card {
  justify-self: start;
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-card span {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-card strong {
  font-size: 0.98rem;
}

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

.controls,
.canvas-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.controls {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.control-block {
  display: grid;
  gap: 10px;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1c2732, #101820);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.file-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.file-button input {
  display: none;
}

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

.tool-button,
.secondary-button,
.primary-button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tool-button {
  background: rgba(20, 29, 39, 0.08);
  color: var(--text);
  font-weight: 700;
}

.tool-button.active {
  background: #16202a;
  color: #fff;
  box-shadow: 0 10px 18px rgba(22, 32, 42, 0.18);
}

.field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.field span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}

.field strong {
  color: var(--accent-strong);
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.color-field {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.color-field input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.layer-list {
  display: grid;
  gap: 8px;
}

.layer-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed rgba(18, 28, 38, 0.16);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.layer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.layer-item.editing {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(192, 125, 44, 0.16);
}

.layer-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.layer-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.layer-meta strong {
  font-size: 0.94rem;
}

.layer-meta span {
  font-size: 0.84rem;
  color: var(--muted);
}

.layer-name-input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.layer-name-input:focus {
  outline: 2px solid rgba(192, 125, 44, 0.22);
  outline-offset: 3px;
  border-radius: 6px;
}

.layer-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.layer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  background: rgba(20, 29, 39, 0.07);
  color: var(--text);
  cursor: pointer;
}

.layer-action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layer-delete {
  border: 0;
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  background: rgba(200, 79, 79, 0.12);
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary-button {
  background: rgba(20, 29, 39, 0.08);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(180deg, #d69343, #b96f18);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(185, 111, 24, 0.22);
}

.secondary-button:hover,
.primary-button:hover,
.tool-button:hover {
  transform: translateY(-1px);
}

.tool-button:disabled,
.secondary-button:disabled,
.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.96rem;
}

.canvas-panel {
  overflow: hidden;
  padding: 14px;
}

.canvas-shell {
  position: relative;
  min-height: 320px;
  border-radius: calc(var(--radius-xl) - 10px);
  overflow: auto;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    #eceff3;
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

#paintCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: inherit;
  touch-action: none;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
  padding: 24px;
}

.empty-state[hidden] {
  display: none !important;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.08rem;
}

.status {
  margin: 12px 4px 0;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (min-width: 980px) {
  .workspace {
    grid-template-columns: 360px minmax(0, 1fr);
    align-items: start;
  }

  .controls {
    position: sticky;
    top: 16px;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 14px, 100%);
    padding-top: 10px;
  }

  .hero-card {
    width: 100%;
  }

  .tool-row,
  .control-row {
    grid-template-columns: 1fr;
  }

  .controls {
    padding: 14px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace {
  grid-template-columns: minmax(0, 1fr);
}

.controls {
  display: none;
}

.canvas-panel {
  overflow: hidden;
  padding: 14px;
}

.canvas-shell {
  display: grid;
  gap: 12px;
  background: transparent;
  position: static;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.canvas-frame {
  position: relative;
  min-height: 320px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: calc(var(--radius-xl) - 10px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    #eceff3;
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

#paintCanvas {
  display: block;
  width: 100%;
  max-width: 100%;
  transform-origin: top left;
  will-change: transform;
}

.layer-strip {
  display: grid;
  gap: 6px;
  padding: 0 2px;
}

.layer-strip-head {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.control-panel,
.dock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(18, 28, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(18, 28, 38, 0.08);
}

.dock-color-block {
  min-width: 0;
}

.tool-group,
.param-row,
.selected-color-inline,
.palette-select-wrap,
.palette-search {
  min-width: 0;
}

.tool-group {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.param-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.selected-color-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 120px;
  min-width: 110px;
  height: 42px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(20, 29, 39, 0.04);
}

.icon-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  padding: 0;
}

.mini-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.icon-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(18, 28, 38, 0.08);
}

.icon-button:disabled,
.mini-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-control {
  overflow: hidden;
}

.hidden-file {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}

.mini-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-button.icon-button.active {
  background: #16202a;
  color: #fff;
  border-color: #16202a;
  box-shadow: 0 10px 18px rgba(22, 32, 42, 0.18);
}

.color-button {
  position: relative;
}

.color-button::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  background: var(--swatch, #d9a23a);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.color-button.image-color::before {
  background:
    var(--swatch-image) center / cover no-repeat,
    var(--swatch, #eef1f4);
}

.color-button svg {
  position: relative;
  z-index: 1;
}

.param-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 12px;
  background: rgba(20, 29, 39, 0.04);
  border: 1px solid rgba(18, 28, 38, 0.08);
}

.value-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  font-weight: 800;
  color: var(--text);
}

.layer-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.layer-empty {
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed rgba(18, 28, 38, 0.16);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
  font-size: 0.92rem;
}

.layer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.layer-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.layer-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.layer-meta strong {
  font-size: 0.94rem;
}

.layer-meta span {
  font-size: 0.84rem;
  color: var(--muted);
}

.layer-delete {
  border: 0;
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  background: rgba(200, 79, 79, 0.12);
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 980px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

.sidebar {
  display: grid;
  gap: 16px;
}

.panel-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

.panel-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(20, 29, 39, 0.06);
  border: 1px solid rgba(18, 28, 38, 0.08);
  font-weight: 800;
  color: var(--text);
}

.selected-color-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 120px;
  min-width: 110px;
  height: 42px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(20, 29, 39, 0.04);
  margin-bottom: 0;
}

.selected-swatch {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8ecef, #cfd8df);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.selected-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 1.15;
}

.selected-meta strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.selected-meta strong {
  font-size: 0.94rem;
}

.palette-select-wrap {
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 180px;
  height: 42px;
}

.palette-select {
  width: 100%;
  flex: 1 1 210px;
  min-width: 170px;
  height: 42px;
  min-height: 42px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(45deg, transparent 50%, var(--text) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--text) 50%, transparent 50%) calc(100% - 17px) 50% / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.92);
  color: var(--text);
  appearance: none;
  cursor: pointer;
}

.palette-select:focus {
  outline: 2px solid rgba(192, 125, 44, 0.26);
  outline-offset: 2px;
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 2 1 280px;
  min-width: 220px;
  height: 42px;
}

.palette-search .search-field {
  flex: 1 1 auto;
  min-width: 0;
}

.search-field input {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.palette-search .mini-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.palette-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  max-width: 100%;
}

.palette-filter {
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
}

.palette-filter.active {
  background: #16202a;
  color: #fff;
  border-color: #16202a;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
  max-width: 100%;
}

.palette-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(18, 28, 38, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  width: 100%;
  min-width: 0;
}

.palette-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(18, 28, 38, 0.08);
}

.palette-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(192, 125, 44, 0.16);
}

.palette-card.image-only {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
}

.palette-swatch {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(238, 241, 244, 0.95), rgba(207, 216, 223, 0.9));
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.palette-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.palette-code {
  font-size: 0.8rem;
  color: var(--muted);
}

.palette-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.palette-panel {
  padding: 16px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 1.05rem;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

@media (min-width: 1240px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .sidebar {
    position: static;
    align-self: start;
  }
}

@media (max-width: 1239px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 980px) {
@media (max-width: 768px) {
  .control-panel,
  .dock-color-block,
  .canvas-shell,
  .canvas-frame,
  .palette-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .tool-group,
  .param-row,
  .selected-color-inline,
  .palette-select-wrap,
  .palette-search {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 12px, 100%);
    padding-top: 10px;
  }

  .hero-card {
    width: 100%;
  }

  .canvas-panel,
  .dock,
  .palette-panel {
    padding-left: 10px;
    padding-right: 10px;
  }

  .control-panel,
  .dock-color-block {
    gap: 7px;
    padding: 8px;
  }

  .canvas-shell {
    gap: 10px;
  }

  .canvas-frame {
    width: 100%;
    max-width: 100%;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .mini-button {
    width: 32px;
    height: 32px;
  }

  .palette-search .mini-button {
    width: 38px;
    height: 38px;
  }

  .tool-group {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .param-row {
    flex: 1 1 100%;
  }

  .param-group {
    flex: 0 1 auto;
  }

  .selected-color-inline {
    width: 100%;
  }

  .palette-select-wrap,
  .palette-search {
    flex: 1 1 100%;
    min-width: 0;
  }

  .palette-filters,
  .palette-groups {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .palette-grid,
  .palette-colors {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
    max-width: 100%;
  }

  .status {
    line-height: 1.4;
  }
}
