:root {
  --bg: var(--color-bg);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --blue: var(--color-blue);
  --blue-hover: var(--color-indigo);
  --line: color-mix(in srgb, var(--blue) 16%, transparent);
  --line-soft: color-mix(in srgb, var(--blue) 9%, transparent);
}
html, body { min-width: 0; min-height: 0; }
body { background: transparent; font-family: var(--font-body); font-weight: 400; }
body::before { display: none; }
.ai-app { min-height: 0; width: 100%; padding: 0; display: block; }
.ai-header, .ai-footer { display: none; }
.ai-workspace { padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr) 320px; }
.ai-stage-shell, .ai-tray {
  border: 0;
  border-radius: 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--color-white) 82%, transparent), color-mix(in srgb, var(--color-white) 40%, transparent));
  box-shadow: none;
  animation: none;
}
.ai-stage-shell { min-height: 0; }
.ai-drop { min-height: 0; padding: clamp(24px, 4vw, 56px); }
.ai-drop h1 { margin: 20px 0; font-size: clamp(44px, 5.4vw, 80px); line-height: 1; letter-spacing: -.045em; }
.ai-drop-copy { font-size: 13px; }
.ai-tray { min-width: 0; padding: 20px; border-left: 1px solid var(--line); backdrop-filter: blur(16px); }
.ai-tray h2 { color: var(--blue); font-size: 27px; }
.ai-eyebrow { font-size: 10px; letter-spacing: .08em; }
.ai-source-state { font-size: 9px; letter-spacing: 0; text-transform: none; }
.ai-file-button, .ai-button { min-height: 44px; font-size: 12px; letter-spacing: 0; text-transform: none; }
.ai-label-row label, .ai-label-row > span, .ai-control legend { font-size: 11px; letter-spacing: 0; text-transform: none; }
.ai-label-row output, .ai-label-row button { font-size: 10px; letter-spacing: 0; text-transform: none; }
.ai-segmented, .ai-preset-row, .ai-playback, .ai-exports { border-radius: 13px; background: color-mix(in srgb, var(--blue) 4%, transparent); }
.ai-segmented button, .ai-preset-row button, .ai-playback button, .ai-exports button { min-height: 38px; border-radius: 10px; font-size: 10px; }
.ai-segmented button.is-active, .ai-preset-row button.is-active { background: var(--blue); color: var(--bg); }
.ai-medium { min-height: 42px; border-radius: 8px; }
.ai-medium span { font-size: 11px; }
.ai-range-notes { font-size: 9px; color: var(--muted); letter-spacing: 0; text-transform: none; }
input[type='range'] { min-height: 28px; }
.ai-seed { height: 38px; font-size: 12px; border: 1px solid var(--line); border-radius: 10px; }
.ai-paint-button { min-height: 60px; }
.ai-paint-button small { font-size: 10px; letter-spacing: 0; text-transform: none; }
.ai-export-status, .ai-progress-meta { font-size: 10px; letter-spacing: 0; text-transform: none; }
.ai-progress { border-radius: 14px; }
.ai-compare { min-height: 38px; font-size: 10px; letter-spacing: 0; text-transform: none; }
@media (min-width: 961px) {
  html, body { height: 100%; overflow: hidden; }
  .ai-app { height: 100vh; height: 100dvh; }
  .ai-workspace { height: 100%; }
  .ai-stage-shell { height: 100%; }
  .ai-stage-shell > section { height: 100%; min-height: 0; }
  .ai-drop { align-content: center; }
  .ai-crop, .ai-canvas-stage { padding: 20px; }
  .ai-crop { display: grid; place-items: center; }
  .ai-canvas-mount { min-width: 0; max-width: 100%; }
  .ai-crop canvas, .ai-canvas-mount canvas, .ai-source-compare { max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
  .ai-tray { height: 100%; min-height: 0; max-height: none; align-self: stretch; overflow-y: auto; }
  .ai-source-panel { padding-bottom: 20px; }
  .ai-control-stack { padding-top: 20px; }
}
@media (max-width: 960px) {
  .ai-workspace { grid-template-columns: 1fr; }
  .ai-stage-shell, .ai-drop { min-height: clamp(320px, 66dvh, 580px); }
  .ai-tray { width: 100%; max-height: none; overflow: visible; border-top: 1px solid var(--line); border-left: 0; }
  .ai-crop, .ai-canvas-stage { padding: 16px; }
  .ai-crop canvas, .ai-canvas-mount canvas, .ai-source-compare { max-height: min(70dvh, 580px); }
}
@media (max-width: 620px) {
  .ai-drop { padding: 24px; }
  .ai-drop h1 { font-size: clamp(38px, 12vw, 58px); }
  .ai-tray { padding: 20px; }
}
