:root {
  color-scheme: light;
  --page-bg: #f3f5f9;
  --page-blue: rgba(136, 171, 255, 0.22);
  --page-cream: rgba(255, 229, 188, 0.2);
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(244, 247, 252, 0.92);
  --line: rgba(255, 255, 255, 0.78);
  --line-strong: rgba(106, 113, 218, 0.26);
  --text: #1f2024;
  --muted: #666b75;
  --accent-blue: #4b7df0;
  --accent-violet: #6a71da;
  --accent-pink: #cf5f73;
  --success: #177245;
  --error: #c44b3f;
  --focus: rgba(106, 113, 218, 0.14);
  --menu-surface: rgba(255, 255, 255, 0.94);
  --menu-hover: rgba(106, 113, 218, 0.06);
  --menu-selected: rgba(106, 113, 218, 0.1);
  --menu-shadow: 0 24px 48px rgba(72, 84, 130, 0.14);
  --card-shadow: 0 26px 60px rgba(142, 154, 179, 0.16);
  --button-shadow: 0 22px 42px rgba(106, 113, 218, 0.24);
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page-bg: #10131a;
    --page-blue: rgba(91, 127, 214, 0.22);
    --page-cream: rgba(190, 160, 111, 0.12);
    --surface: rgba(23, 28, 38, 0.82);
    --surface-strong: rgba(28, 34, 46, 0.92);
    --surface-soft: rgba(18, 23, 32, 0.92);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(129, 139, 237, 0.3);
    --text: #eef2f7;
    --muted: #a4acb9;
    --accent-blue: #4b7df0;
    --accent-violet: #818bed;
    --accent-pink: #cf5f73;
    --success: #8dd6a1;
    --error: #ff998f;
    --focus: rgba(129, 139, 237, 0.14);
    --menu-surface: rgba(20, 25, 35, 0.98);
    --menu-hover: rgba(129, 139, 237, 0.14);
    --menu-selected: rgba(129, 139, 237, 0.22);
    --menu-shadow: 0 28px 52px rgba(0, 0, 0, 0.42);
    --card-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
    --button-shadow: 0 22px 42px rgba(129, 139, 237, 0.3);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -8rem;
  left: -10rem;
  background: radial-gradient(circle, var(--page-blue) 0%, rgba(136, 171, 255, 0) 68%);
}

body::after {
  top: 2rem;
  right: -12rem;
  background: radial-gradient(circle, var(--page-cream) 0%, rgba(255, 229, 188, 0) 72%);
}

.shell {
  width: min(1320px, calc(100% - 44px));
  margin: 0 auto;
  padding: 76px 0 40px;
  position: relative;
  z-index: 1;
}

.hero,
.mainAction,
.workspace,
.actionDock,
.infoGrid,
.footer {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero {
  padding-bottom: 26px;
}

.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.hero__identity {
  min-width: 0;
}

.hero__aside {
  min-width: min(214px, 100%);
  display: grid;
  justify-items: end;
  align-content: end;
  gap: 12px;
}

.heroLanguage {
  width: min(214px, 100%);
  display: grid;
  gap: 8px;
}

.heroLanguage .panel__eyebrow {
  color: var(--muted);
}

.eyebrow,
.panel__eyebrow,
.control__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f636b;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  display: inline-block;
  width: fit-content;
  max-width: none;
  color: transparent;
  background: linear-gradient(90deg, #4b7df0 0%, #5b7ae4 20%, #706fd5 40%, #8969bf 60%, #a8619d 78%, #cf5f73 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Google Sans", "Product Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: clamp(3.5rem, 6.2vw, 5.9rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

h2 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero__text {
  max-width: 760px;
  margin-top: 4px;
  font-size: clamp(0.7rem, 0.9vw, 0.82rem);
  line-height: 1.35;
  color: var(--muted);
}

.heroKofi {
  width: min(214px, 100%);
  min-height: 94px;
  padding: 2px 0 0;
  display: grid;
  gap: 10px;
  align-self: end;
  justify-items: stretch;
  border: 0;
  border-radius: 26px;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.heroKofi:hover {
  transform: translateY(-2px);
}

.heroKofi:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

.heroKofi__brand {
  display: block;
}

.heroKofi__logo {
  width: 100%;
  max-width: 178px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.heroKofi__cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(160px, 100%);
  justify-self: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f95ee, #6a71da);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: var(--button-shadow);
}

.statusRow {
  margin-top: 28px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.statusRow.is-hidden {
  display: none;
}

.status {
  font-size: 0.9rem;
  color: var(--muted);
}

.statusRow__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.statusProgress {
  position: relative;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.12);
}

.statusProgress.is-hidden {
  display: none;
}

.statusProgress__bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(106, 113, 218, 0.92), rgba(208, 218, 198, 0.95));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transition: width 180ms ease;
}

.status[data-tone="success"] {
  color: var(--success);
}

.status[data-tone="error"] {
  color: var(--error);
}

.mainAction {
  padding-bottom: 36px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px 32px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel__top {
  display: grid;
  grid-template-columns: minmax(160px, 176px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 82px;
}

.panel__top--source {
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 0;
}

.panel__top--output,
.panel__top--workspace {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.panel__heading {
  flex: 0 0 176px;
  min-width: 176px;
}

.panel__heading .panel__eyebrow + h2 {
  margin-top: 8px;
}

.panel__heading h2 {
  line-height: 1.2;
}

.panel__heading--output,
.panel__heading--workspace {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.panel__top--output .panel__heading,
.panel__top--workspace .panel__heading {
  min-width: 0;
  flex-basis: auto;
}

.panel__top--output .badgeGroup,
.panel__top--workspace .badgeGroup {
  justify-self: end;
  flex-wrap: wrap;
}

.panel--sidebar {
  display: flex;
  flex-direction: column;
}

.panel--workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.workspaceTopActions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 16px;
  min-width: 0;
}

.workspaceViewTabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(106, 113, 218, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.workspaceViewTab {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.84rem;
}

.workspaceContentView.is-hidden {
  display: none;
}

.panelTopActions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.panel__top--source .panel__heading {
  min-width: 0;
  flex-basis: auto;
}

.panel__top--source .panelTopActions {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.sourceModeTabs {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(106, 113, 218, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.modeTab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 42px;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.modeTab.is-active {
  background: rgba(106, 113, 218, 0.12);
  color: var(--accent-violet);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.modelPicker {
  margin-top: 16px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(106, 113, 218, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modelPicker.is-hidden,
.panelUploadButton.is-hidden {
  display: none;
}

.panelUploadButton {
  width: 100%;
  margin-top: 16px;
}

.modelPicker__copy {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.modelTurnControls {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}

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

.modelTurnButton {
  min-height: 44px;
}

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

.modelCard {
  min-height: 116px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(106, 113, 218, 0.16);
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.modelCard:hover,
.modelCard:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(106, 113, 218, 0.3);
  box-shadow: 0 0 0 4px var(--focus);
}

.modelCard__thumb {
  min-height: 72px;
  width: 100%;
  display: block;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(106, 113, 218, 0.06), rgba(106, 113, 218, 0.02));
}

.modelCard__label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel__controls {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-height: 0;
  align-items: start;
}

.panelUploadButton {
  margin-bottom: 12px;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.control--brush {
  grid-column: 1 / -1;
}

.control--color,
.control--alpha,
.control--size {
  grid-column: 1 / -1;
}

.brushSelector {
  position: relative;
}

.brushSelectNative {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.brushSelector__button {
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.brushSelector__button:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.brushSelector__content {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: center;
}

.brushSelector__label {
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
}

.brushSelector__preview {
  display: block;
  width: 100%;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(31, 32, 36, 0.05), rgba(31, 32, 36, 0.02));
  box-shadow: inset 0 0 0 1px rgba(31, 32, 36, 0.04);
}

.brushSelector__chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.brushSelector.is-open .brushSelector__button {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.brushSelector.is-open .brushSelector__chevron {
  transform: rotate(225deg);
}

.brushSelector__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 25;
  display: none;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(106, 113, 218, 0.16);
  border-radius: 24px;
  background: var(--menu-surface);
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brushSelector.is-open .brushSelector__menu {
  display: block;
}

.brushSelector__group + .brushSelector__group {
  margin-top: 12px;
}

.brushSelector__groupLabel {
  margin: 0 0 8px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.brushOption {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.brushOption:hover {
  background: var(--menu-hover);
}

.brushOption:focus {
  outline: none;
  background: var(--menu-hover);
}

.brushOption.is-selected {
  background: var(--menu-selected);
}

.brushOption__name {
  font-size: 0.94rem;
  font-weight: 600;
}

.brushOption__preview {
  display: block;
  width: 100%;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(31, 32, 36, 0.05), rgba(31, 32, 36, 0.02));
  box-shadow: inset 0 0 0 1px rgba(31, 32, 36, 0.04);
}

@media (prefers-color-scheme: dark) {
  .brushSelector__preview,
  .brushOption__preview {
    background: linear-gradient(180deg, rgba(238, 242, 247, 0.18), rgba(238, 242, 247, 0.08));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

.control--color,
.control--alpha,
.control--size {
  max-width: none;
}

.control--facets {
  grid-column: 1 / -1;
}

.controlToggle {
  justify-content: flex-start;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
}

.controlToggle__swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.controlToggle__swatch--facets {
  background: #6a71da;
}

.controlToggle--facets.is-active {
  border-color: rgba(106, 113, 218, 0.3);
  background: var(--menu-selected);
  color: var(--accent-violet);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 12px 22px rgba(106, 113, 218, 0.12);
}

.panelToggle {
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.panelToggle.button--ghost {
  width: auto;
}

.control__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.colorHex {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.1);
  color: var(--accent-violet);
  font-size: 0.95rem;
  font-weight: 700;
}

.panel__meta {
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.composeControls {
  margin-top: 14px;
}

.composeControls.is-hidden {
  display: none;
}

.composeLayerMeta {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}

.composeToolbar {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.composeToolbar__sliders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.composeToolbar__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.composeToolbar__actions > .composeTool {
  grid-column: auto !important;
}

#composeDeleteLayer {
  grid-column: 2 / span 2 !important;
}

.composeSizeControl,
.composeOpacityControl {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(106, 113, 218, 0.18);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.composeSizeControl__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.composeSizeControl__value {
  min-width: 44px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-violet);
}

.composeScaleRange,
.composeOpacityRange {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  margin: 0;
  background: transparent;
  touch-action: pan-x;
  -webkit-tap-highlight-color: transparent;
}

.composeScaleRange:focus,
.composeOpacityRange:focus {
  outline: none;
}

.composeScaleRange::-webkit-slider-runnable-track,
.composeOpacityRange::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.18);
}

.composeScaleRange::-webkit-slider-thumb,
.composeOpacityRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #6a71da;
  box-shadow: 0 4px 12px rgba(106, 113, 218, 0.22);
}

.composeScaleRange::-moz-range-track,
.composeOpacityRange::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.18);
}

.composeScaleRange::-moz-range-thumb,
.composeOpacityRange::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #6a71da;
  box-shadow: 0 4px 12px rgba(106, 113, 218, 0.22);
}

.composeTool {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0;
  border: 1px solid rgba(106, 113, 218, 0.18);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
}

.composeTool:hover:not(:disabled) {
  border-color: rgba(106, 113, 218, 0.28);
  background: var(--surface-soft);
}

.composeTool:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.composeTool svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composeTool__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composeTool.is-active {
  border-color: var(--line-strong);
  background: var(--menu-selected);
  color: var(--accent-violet);
}

.composeTool:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.composeScaleRange:disabled,
.composeOpacityRange:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.composeTool--danger {
  border-color: rgba(196, 75, 63, 0.18);
  color: var(--error);
}

.composeTool--danger:hover:not(:disabled) {
  border-color: rgba(196, 75, 63, 0.28);
  background: rgba(196, 75, 63, 0.08);
}

select,
button,
input[type="color"] {
  font: inherit;
}

select,
.button,
.colorInput {
  width: 100%;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  padding: 0 18px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size: 7px 7px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

option {
  color: var(--text);
  background: var(--surface-strong);
}

.colorInput {
  padding: 8px;
  border-color: rgba(106, 113, 218, 0.18);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

select:focus,
.button:focus,
.colorInput:focus,
.canvasStage--drop:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button--zipProgress {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.zipProgressButton__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--zip-button-progress, 0) * 100%);
  background:
    linear-gradient(90deg, rgba(106, 113, 218, 0.3), rgba(143, 149, 238, 0.52)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  opacity: 0;
  pointer-events: none;
  transition: width 180ms ease, opacity 140ms ease;
  z-index: 0;
}

.zipProgressButton__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zipProgressButton__label,
.zipProgressButton__value {
  position: relative;
  z-index: 1;
}

.zipProgressButton__label {
  min-width: 0;
}

.zipProgressButton__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2ch;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(20, 23, 30, 0.72);
  opacity: 0;
  transform: translateY(1px);
  transition: opacity 140ms ease;
}

.button--zipProgress.is-preparing {
  border-color: rgba(106, 113, 218, 0.28);
}

.button--zipProgress.is-preparing .zipProgressButton__fill {
  opacity: 1;
}

.button--zipProgress.is-preparing .zipProgressButton__value {
  opacity: 1;
}

.button--zipProgress[aria-busy="true"],
.button--zipProgress[aria-busy="true"]:disabled {
  opacity: 1;
  cursor: progress;
}

.button--primary {
  border-radius: 999px;
  background: linear-gradient(180deg, #8f95ee, #6a71da);
  color: #ffffff;
  box-shadow: var(--button-shadow);
}

.button--ghost {
  width: 100%;
  min-width: 0;
  padding: 0 22px;
  border: 1.5px solid rgba(106, 113, 218, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 8px 16px rgba(106, 113, 218, 0.12);
  text-align: center;
  white-space: nowrap;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button--wide {
  min-height: 86px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.badgeGroup {
  display: flex;
  align-items: center;
  gap: 34px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.badge__swatch {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent-blue);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

.panel--output .panel__spacer {
  height: 0;
  min-height: 0;
  transition: height 160ms ease;
}

.canvasStage {
  position: relative;
  margin-top: 16px;
  border: 1px solid rgba(227, 234, 248, 0.96);
  border-radius: 22px;
  background: #eef3fb;
  overflow: hidden;
}

.canvasStage--preview {
  background-color: #eef3fb;
  background-image:
    linear-gradient(45deg, rgba(164, 176, 204, 0.14) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(164, 176, 204, 0.14) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(164, 176, 204, 0.14) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(164, 176, 204, 0.14) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.workspaceStageView.is-hidden {
  display: none;
}

.previewLayerRail {
  margin: 10px 0 14px;
  min-width: 0;
}

.workspaceComposeView {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "base donor"
    "composite composite";
  gap: 18px;
  align-items: start;
}

.workspaceComposePanel--base {
  grid-area: base;
}

.workspaceComposePanel--donor {
  grid-area: donor;
}

.workspaceComposePanel,
.workspaceComposeCenter {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(106, 113, 218, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.workspaceComposeCardHeading {
  display: grid;
  gap: 4px;
}

.workspaceComposeEyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspaceComposeCardHeading h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.workspaceComposeThumbFrame {
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(106, 113, 218, 0.12), rgba(207, 95, 115, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.workspaceComposeThumbCanvas,
.workspaceComposePreviewCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.workspaceComposeCopy {
  margin-top: 12px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.workspaceComposeMiniList {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.workspaceComposeMiniStat,
.workspaceComposeTransferRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(106, 113, 218, 0.08);
}

.workspaceComposeMiniLabel,
.workspaceComposeTransferRow strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.workspaceComposeMiniValue,
.workspaceComposeTransferRow span {
  font-size: 0.76rem;
  color: var(--muted);
}

.workspaceComposeStatus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.workspaceComposeStatus--soft {
  background: rgba(106, 113, 218, 0.09);
  color: var(--accent-violet);
}

.workspaceComposeStatus--warm {
  background: rgba(207, 95, 115, 0.14);
  color: var(--accent-pink);
}

.workspaceComposeStatus--olive {
  background: rgba(160, 166, 123, 0.2);
  color: #6b7445;
}

.workspaceComposeStatus--cool {
  background: rgba(75, 125, 240, 0.11);
  color: var(--accent-blue);
}

.workspaceComposeCenter {
  grid-area: composite;
  padding: 18px 18px 16px;
}

.workspaceComposeHero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.workspaceComposePills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.workspaceComposePill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.workspaceComposePill--dark {
  background: #21242e;
  color: #fffaf5;
}

.workspaceComposePreviewFrame {
  position: relative;
  margin-top: 14px;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 12, 18, 0.12), rgba(10, 12, 18, 0.2)),
    linear-gradient(135deg, rgba(106, 113, 218, 0.16), rgba(207, 95, 115, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.workspaceComposeHotspot {
  position: absolute;
  border: 2px solid rgba(255, 244, 236, 0.78);
  background: rgba(207, 95, 115, 0.12);
  box-shadow: 0 10px 24px rgba(207, 95, 115, 0.12);
  pointer-events: none;
}

.workspaceComposeHotspot--hair {
  top: 8%;
  left: 28%;
  width: 22%;
  height: 18%;
  border-radius: 46% 52% 44% 50% / 42% 56% 40% 46%;
}

.workspaceComposeHotspot--eyes {
  top: 36%;
  left: 39%;
  width: 10%;
  height: 6%;
  border-radius: 999px;
}

.workspaceComposeHotspot--mouth {
  top: 55%;
  left: 42%;
  width: 9%;
  height: 5%;
  border-radius: 999px;
}

.workspaceComposeNote {
  position: absolute;
  max-width: 190px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 250, 245, 0.84);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(58, 63, 82, 0.14);
  pointer-events: none;
}

.workspaceComposeNote--left {
  top: 16%;
  left: 5%;
}

.workspaceComposeNote--right {
  top: 20%;
  right: 5%;
}

.workspaceComposePanel--donor .workspaceComposeThumbFrame,
.workspaceComposePanel--base .workspaceComposeThumbFrame {
  min-height: 300px;
}

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

.workspaceComposeSwatches {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workspaceComposeSwatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.workspaceComposeSwatch--rose { background: #cf5f73; }
.workspaceComposeSwatch--slate { background: #677387; }
.workspaceComposeSwatch--sand { background: #d8b8a2; }
.workspaceComposeSwatch--olive { background: #a0a67b; }

.workspaceComposeFooterCopy {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: right;
}

.previewLayerStrip {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 12px;
  overflow: visible;
  padding: 2px 2px 6px;
  cursor: default;
}

.previewLayerStrip.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.previewLayerStrip.is-hidden {
  display: none;
}

.previewLayerCard {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(106, 113, 218, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.previewLayerCard:hover {
  border-color: rgba(106, 113, 218, 0.24);
  background: rgba(255, 255, 255, 0.56);
}

.previewLayerCard:focus-visible {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--focus);
}

.previewLayerCard.is-selected {
  border-color: rgba(106, 113, 218, 0.34);
  background: rgba(106, 113, 218, 0.1);
}

.previewLayerCard.is-selected.is-pending {
  border-color: rgba(106, 113, 218, 0.56);
  background: rgba(106, 113, 218, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 2px rgba(106, 113, 218, 0.16);
}

.previewLayerCard:disabled {
  cursor: default;
  opacity: 0.64;
}

.previewLayerCard:disabled:hover {
  border-color: rgba(106, 113, 218, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

.previewLayerCard__canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(227, 234, 248, 0.96);
  background-color: #eef3fb;
  background-image:
    linear-gradient(45deg, rgba(164, 176, 204, 0.16) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(164, 176, 204, 0.16) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(164, 176, 204, 0.16) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(164, 176, 204, 0.16) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.previewLayerCard__label {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--muted);
}

.canvasStage--drop {
  cursor: pointer;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.canvasStage--drop[data-drag="true"] {
  border-color: rgba(66, 133, 244, 0.28);
  box-shadow: 0 0 0 4px var(--focus);
}

.canvasStage canvas {
  display: block;
  width: 100%;
  height: auto;
}

.dropOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  pointer-events: none;
  transition: opacity 160ms ease;
  text-align: center;
}

.canvasStage--drop[data-has-image="true"] .dropOverlay {
  opacity: 0;
}

.dropOverlay__title {
  font-size: 0.96rem;
  font-weight: 700;
}

.dropOverlay__copy {
  font-size: 0.88rem;
  color: var(--muted);
}

.actionDock {
  margin-top: 26px;
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 260px) repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.actionDock .button {
  min-height: 58px;
}

.footer {
  padding-bottom: 18px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
}

.infoGrid {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
}

.infoCard {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px 30px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.infoCard h2 {
  margin-top: 8px;
  margin-bottom: 20px;
}

.infoCard--stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.faqList {
  display: grid;
  gap: 12px;
}

.faqItem {
  border: 1px solid rgba(106, 113, 218, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  overflow: hidden;
}

.faqItem summary {
  list-style: none;
  padding: 16px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.faqItem summary::-webkit-details-marker {
  display: none;
}

.faqItem p {
  padding: 0 18px 18px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.miniSection {
  padding: 18px 20px;
  border: 1px solid rgba(106, 113, 218, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.miniSection__copy {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

.miniSection__cta {
  margin-top: 14px;
}

.languageSelect {
  margin-top: 0;
  min-height: 50px;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer__copyright {
  width: 100%;
  text-align: center;
}

.statusRow--hidden {
  display: none !important;
}

.rangeValue {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.12);
  color: var(--accent-violet);
  font-size: 0.88rem;
  font-weight: 700;
}

.rangeInput {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 42px;
  background: transparent;
}

.rangeInput:focus {
  outline: none;
}

.rangeInput::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.18);
}

.rangeInput::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #6a71da;
  box-shadow: 0 4px 12px rgba(106, 113, 218, 0.22);
}

.rangeInput::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 113, 218, 0.18);
}

.rangeInput::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #6a71da;
  box-shadow: 0 4px 12px rgba(106, 113, 218, 0.22);
}

@media (max-width: 900px) {
  .workspace,
  .actionDock,
  .infoGrid {
    grid-template-columns: 1fr;
  }

  .panel__controls {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .panel--output .panel__spacer {
    height: 0 !important;
  }

  .panel__top,
  .statusRow {
    align-items: flex-start;
  }

  .panel__top {
    grid-template-columns: 1fr;
  }

  .panel__top--output {
    grid-template-columns: 1fr;
  }

  .panel__heading {
    min-width: 0;
    flex-basis: auto;
  }

  .panel__heading--output {
    flex-wrap: wrap;
  }

  .workspaceTopActions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .workspaceViewTabs {
    width: 100%;
    justify-content: stretch;
  }

  .workspaceViewTab {
    flex: 1 1 0;
  }

  .badgeGroup {
    gap: 18px;
    flex-wrap: wrap;
  }

  .button--ghost {
    width: 100%;
    text-align: center;
  }

  .infoCard {
    padding: 24px 22px;
  }

  .brushSelector__content,
  .brushOption {
    grid-template-columns: 1fr;
  }

  .brushSelector__preview,
  .brushOption__preview {
    width: 100%;
  }

  .panelTopActions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .modelPresetGrid {
    grid-template-columns: 1fr;
  }

  .modelTurnButtons {
    grid-template-columns: 1fr;
  }

  .workspaceComposeView {
    grid-template-columns: 1fr;
  }

  .workspaceComposeFooter {
    align-items: start;
    flex-direction: column;
  }

  .workspaceComposeFooterCopy {
    text-align: left;
  }

}

@media (max-width: 1100px) {
  .composeToolbar__actions {
    gap: 8px;
  }

  .composeSizeControl,
  .composeOpacityControl {
    padding: 0 12px;
    grid-template-columns: 74px minmax(0, 1fr);
  }
}

@media (pointer: coarse) {
  .composeScaleRange,
  .composeOpacityRange {
    height: 52px;
  }

  .composeScaleRange::-webkit-slider-runnable-track,
  .composeOpacityRange::-webkit-slider-runnable-track {
    height: 10px;
  }

  .composeScaleRange::-webkit-slider-thumb,
  .composeOpacityRange::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -9px;
  }

  .composeScaleRange::-moz-range-track,
  .composeOpacityRange::-moz-range-track {
    height: 10px;
  }

  .composeScaleRange::-moz-range-thumb,
  .composeOpacityRange::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1320px);
    padding-top: 28px;
  }

  .hero__top {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero__aside {
    justify-items: start;
    gap: 10px;
  }

  .heroLanguage {
    width: min(192px, 100%);
  }

  .heroKofi {
    width: min(192px, 100%);
    min-height: 84px;
    padding-top: 2px;
    justify-self: start;
    align-self: start;
    border-radius: 22px;
  }

  .heroKofi__logo {
    max-width: 160px;
  }

  .heroKofi__cta {
    min-height: 34px;
    width: min(146px, 100%);
    font-size: 0.88rem;
  }

  .panel {
    padding: 22px 20px;
  }

  .workspaceComposePanel,
  .workspaceComposeCenter {
    padding: 14px;
    border-radius: 20px;
  }

  .workspaceComposeNote {
    display: none;
  }

  .workspaceComposeHotspot--hair {
    top: 10%;
    left: 24%;
    width: 28%;
    height: 18%;
  }

  .composeToolbar {
    gap: 8px;
  }

  .composeToolbar__sliders {
    gap: 8px;
  }

  .composeToolbar__actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .composeSizeControl,
  .composeOpacityControl {
    padding: 0 12px;
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .composeTool {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .hero__text {
    font-size: 0.68rem;
  }

  .button--wide {
    min-height: 76px;
  }
}
