.console--create {
  padding-top: clamp(0.8rem, 3vw, 1.4rem);
}

.creator-topbar {
  padding: 0.1rem 0.15rem clamp(0.8rem, 3vw, 1.15rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.creator-topbar h1 {
  margin: 0;
  line-height: 1;
}

.creator-brand {
  color: #333247;
  font: italic 900 clamp(1.55rem, 7vw, 2.4rem)/0.85 var(--font-display);
  letter-spacing: -0.08em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  transform: skew(-5deg);
}

.creator-brand-gly,
.creator-brand sup {
  color: var(--berry);
}

.creator-brand sup {
  position: relative;
  top: -0.85em;
  left: 0.12rem;
  margin-left: 0.2rem;
  font: 700 0.28em/1 var(--font-mono);
}

.mode-chip {
  padding: 0.36rem 0.55rem;
  border: 1px solid rgba(31, 42, 36, 0.56);
  border-radius: 0.26rem;
  background: #9ba88d;
  color: #1b291f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 4px rgba(24, 27, 26, 0.34) inset;
  font-size: clamp(0.52rem, 2vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-bezel {
  padding: clamp(0.72rem, 3vw, 1.2rem);
}

.editor-glass {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(129, 175, 156, 0.38);
  border-radius: 7% / 5%;
  background: var(--screen-bg);
  box-shadow:
    0 0 0 0.24rem #13171a,
    0 0 0 0.34rem rgba(255, 255, 255, 0.12),
    0 0.8rem 1.8rem rgba(0, 0, 0, 0.58) inset,
    0 -0.4rem 1.4rem rgba(65, 138, 111, 0.12) inset;
  transform: translateZ(0);
}

#pixelCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  clip-path: inset(0 round 7% / 5%);
  cursor: crosshair;
  image-rendering: pixelated;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#pixelCanvas:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -7px;
}

.canvas-instructions {
  margin: clamp(0.85rem, 3vw, 1.15rem) auto;
  color: var(--blue);
  font-size: clamp(0.58rem, 2.2vw, 0.7rem);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.editor-deck {
  display: grid;
  gap: 0.7rem;
}

.editor-panel,
.editor-actions {
  min-width: 0;
  padding: clamp(0.78rem, 3vw, 1rem);
  border: 1px solid rgba(55, 53, 63, 0.16);
  border-radius: 0.8rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(123, 119, 127, 0.09));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62) inset, 0 0.2rem 0.45rem rgba(66, 61, 73, 0.06);
}

.panel-heading {
  margin-bottom: 0.85rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.65rem;
}

.panel-heading--compact {
  align-items: center;
  margin-bottom: 0.72rem;
}

.panel-kicker {
  margin: 0 0 0.2rem;
  color: var(--berry);
  font-size: clamp(0.48rem, 1.8vw, 0.58rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-heading h1,
.panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font: 900 clamp(0.78rem, 3vw, 0.95rem)/1 var(--font-mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.panel-heading output {
  min-width: 0;
  max-width: 58%;
  padding: 0.28rem 0.42rem;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 36, 0.56);
  border-radius: 0.22rem;
  background: #9ba88d;
  color: #1b291f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 4px rgba(24, 27, 26, 0.34) inset;
  font-size: clamp(0.49rem, 1.8vw, 0.6rem);
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-items: center;
  gap: clamp(0.42rem, 2.2vw, 0.7rem);
}

.color-button {
  position: relative;
  width: clamp(2.35rem, 11vw, 3.15rem);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(32, 30, 37, 0.48);
  border-radius: 50%;
  background: var(--swatch);
  color: var(--swatch-ink);
  box-shadow:
    0 0.18rem 0.18rem rgba(0, 0, 0, 0.3),
    0 0.14rem 0 rgba(255, 255, 255, 0.34) inset,
    0 -0.18rem 0 rgba(0, 0, 0, 0.12) inset;
  cursor: pointer;
  font-size: clamp(0.47rem, 1.8vw, 0.58rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.color-button:active {
  transform: translateY(2px);
}

.color-button.is-selected {
  box-shadow:
    0 0 0 3px var(--shell-light),
    0 0 0 6px var(--berry),
    0 0.32rem 0.45rem rgba(0, 0, 0, 0.3),
    0 0.14rem 0 rgba(255, 255, 255, 0.34) inset;
  transform: scale(1.04);
}

.editor-control-row {
  display: grid;
  gap: 0.7rem;
}

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

.tool-button {
  min-width: 0;
  min-height: 4.4rem;
  padding: 0.58rem 0.25rem;
  display: grid;
  place-items: center;
  gap: 0.28rem;
  border: 1px solid rgba(45, 43, 53, 0.55);
  border-radius: 0.68rem;
  background: linear-gradient(145deg, #66626d, #34323d);
  color: #f4f0e8;
  box-shadow: 0 3px 0 #201e27, 0 1px 1px rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  font-size: clamp(0.52rem, 2vw, 0.64rem);
  font-weight: 900;
  text-transform: uppercase;
}

.tool-button svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tool-button.is-selected {
  border-color: #661f3a;
  background: linear-gradient(145deg, var(--berry-light), var(--berry));
  box-shadow: 0 3px 0 #5d1e36, 0 1px 1px rgba(255, 255, 255, 0.28) inset;
}

.tool-button.is-toggled {
  border-color: #294b45;
  background: linear-gradient(145deg, #6b8f7d, #385b52);
  box-shadow: 0 3px 0 #203b36, 0 1px 1px rgba(255, 255, 255, 0.3) inset;
}

.tool-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #201e27, 0 1px 2px rgba(0, 0, 0, 0.35) inset;
}

.tool-button:focus-visible,
.edit-action-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.edit-action-grid {
  margin-top: 0.58rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.edit-action-button {
  min-width: 0;
  min-height: 3rem;
  padding: 0.48rem 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  border: 1px solid rgba(45, 43, 53, 0.44);
  border-radius: 0.52rem;
  background: linear-gradient(145deg, #e5e1d8, #aaa6a5);
  color: #34313c;
  box-shadow: 0 2px 0 #747077, 0 1px 1px rgba(255, 255, 255, 0.7) inset;
  cursor: pointer;
  font-size: clamp(0.48rem, 1.8vw, 0.58rem);
  font-weight: 900;
  text-transform: uppercase;
}

.edit-action-button svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.edit-action-button--clear {
  color: #72233f;
}

.edit-action-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #747077, 0 1px 2px rgba(0, 0, 0, 0.24) inset;
}

.edit-action-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.38;
}

.symmetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.symmetry-toggle {
  position: relative;
  min-width: 0;
  min-height: 4.4rem;
  padding: 0.72rem 0.62rem;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(55, 53, 63, 0.18);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.symmetry-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border: 1px solid rgba(40, 38, 47, 0.62);
  border-radius: 999px;
  background: #77737a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) inset;
  transition: background 140ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 0.88rem;
  height: 0.88rem;
  border: 1px solid #393641;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffdf7, #aaa7ad);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
  transition: transform 140ms ease;
}

.symmetry-toggle input:checked + .switch-track {
  background: var(--berry);
}

.symmetry-toggle input:checked + .switch-track::after {
  transform: translateX(0.96rem);
}

.symmetry-toggle:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.toggle-copy {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.toggle-copy strong,
.toggle-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-copy strong {
  color: var(--ink);
  font-size: clamp(0.56rem, 2vw, 0.67rem);
  text-transform: uppercase;
}

.toggle-copy small {
  color: var(--ink-soft);
  font-size: clamp(0.48rem, 1.75vw, 0.58rem);
  font-weight: 700;
}

.editor-actions {
  display: grid;
  gap: 0.6rem;
}

.export-button {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid rgba(45, 43, 53, 0.64);
  border-radius: 999px;
  background: linear-gradient(145deg, #56535d, #282731);
  color: #f4f0e8;
  box-shadow: 0 3px 0 #15141a, 0 1px 1px rgba(255, 255, 255, 0.22) inset;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.export-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.export-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #15141a, 0 1px 2px rgba(0, 0, 0, 0.4) inset;
}

.export-button:disabled {
  cursor: wait;
  filter: grayscale(0.6);
  opacity: 0.7;
}

.editor-actions p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.5rem, 1.8vw, 0.6rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.creator-footer {
  margin-top: clamp(1.3rem, 4vw, 1.8rem);
  padding: 1rem 0.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid rgba(61, 57, 70, 0.16);
  color: var(--ink-soft);
  font-size: clamp(0.52rem, 1.9vw, 0.64rem);
  font-weight: 800;
  text-transform: uppercase;
}

.creator-footer a {
  color: var(--berry);
}

.creator-footer span a {
  color: var(--blue);
}

@media (min-width: 38rem) {
  .editor-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 23rem) {
  .palette-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .color-button {
    width: 2.75rem;
  }

  .symmetry-toggle {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.42rem;
    text-align: center;
  }
}

@media (forced-colors: active) {
  .editor-glass,
  .editor-panel,
  .tool-button,
  .edit-action-button,
  .symmetry-toggle,
  .export-button {
    forced-color-adjust: none;
  }
}
