.studio-section,
.photozone-dialog {
  --studio-accent: #414da5;
  --studio-accent-hover: #303b8a;
  --studio-surface: #eef0fc;
  --studio-selected: #dce2f8;
  --studio-rule: #d4daf0;
  --studio-border: #7984b7;
  --studio-glow: #b8c5fb;
  --studio-glint: #e2e7ff;
}

.studio-section {
  border-block-start-color: var(--studio-rule);
  background: var(--studio-surface);
}

.studio-section .section-heading > h2,
.photozone-dialog-header h2 { color: var(--studio-accent); }

.studio-section :focus-visible,
.photozone-dialog :focus-visible { outline-color: var(--studio-accent); }

.studio-actions,
.studio-copy,
.studio-steps,
.studio-steps li { border-color: var(--studio-rule); }

.studio-steps li::marker { color: var(--studio-accent); }

.studio-actions > .studio-try-button {
  border-color: var(--studio-accent);
  background: var(--studio-accent);
}

.studio-actions > .studio-try-button:hover {
  border-color: var(--studio-accent-hover);
  background: var(--studio-accent-hover);
}

.studio-actions > .button-quiet {
  border-color: var(--studio-border);
  color: var(--studio-accent);
}

.studio-actions > .button-quiet:hover {
  border-color: var(--studio-accent);
  background: var(--studio-surface);
}

.photozone-dialog {
  --photozone-active: var(--studio-accent);
  --photozone-active-hover: var(--studio-accent-hover);
  --photozone-active-soft: var(--studio-selected);
  --photozone-rule: var(--studio-rule);
  --photozone-control-radius: var(--control-radius);
  --photozone-tile-radius: var(--radius);
  --photozone-gutter: clamp(12px, 4vw, 28px);
  --photozone-photo-height: min(47dvh, 28rem);
  inline-size: min(620px, calc(100% - 32px));
  max-block-size: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--photozone-rule);
  border-radius: 18px;
  background: var(--studio-surface);
  color: var(--text);
  box-shadow: 0 24px 72px color-mix(in srgb, var(--ink) 36%, transparent);
}

.photozone-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.photozone-dialog::backdrop { background: color-mix(in srgb, var(--ink) 76%, transparent); }
body:has(.photozone-dialog[open]) { overflow: hidden; }

.photozone-dialog-header,
.photozone-footer { background: var(--white); }

.photozone-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px 10px;
  border-bottom: 1px solid var(--photozone-rule);
  padding: max(10px, env(safe-area-inset-top)) max(var(--photozone-gutter), env(safe-area-inset-right)) 9px max(var(--photozone-gutter), env(safe-area-inset-left));
}

.photozone-dialog-title { min-inline-size: 0; }

.photozone-dialog-header h2 {
  font-size: clamp(1.125rem, .94rem + .85vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.035em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.photozone-dialog-header #photozone-close {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 5px 10px;
  border-radius: var(--photozone-control-radius);
  border-color: transparent;
  color: var(--muted);
}

.photozone-quota {
  max-inline-size: 100%;
  margin-block-start: 4px;
  color: var(--photozone-active);
  font-size: .8125rem;
  font-weight: 650;
}

.photozone-quota:empty,
.photozone-status:empty,
.photozone-note:empty { display: none; }

.photozone-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 13px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.photozone-steps li {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 5px;
  min-inline-size: 0;
  min-block-size: 36px;
  padding: 4px 2px;
  border: 1px solid var(--photozone-rule);
  border-radius: var(--photozone-control-radius);
  background: var(--paper);
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.photozone-steps li span {
  position: relative;
  display: grid;
  min-inline-size: 1.45em;
  min-block-size: 1.45em;
  place-content: center;
  border-radius: 50%;
  background: var(--studio-selected);
  font-size: .875em;
  font-variant-numeric: tabular-nums;
}

.photozone-steps li[aria-current="step"] {
  border-color: var(--photozone-active);
  background: var(--photozone-active-soft);
  color: var(--photozone-active);
  font-weight: 780;
}

.photozone-steps li[aria-current="step"] span { background: var(--photozone-active); color: var(--white); }

.photozone-steps li:has(~ li[aria-current="step"]) {
  border-color: var(--studio-border);
  background: var(--studio-surface);
  color: var(--photozone-active);
}

.photozone-steps li:has(~ li[aria-current="step"]) span {
  background: var(--white);
  color: transparent;
}

.photozone-steps li:has(~ li[aria-current="step"]) span::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: .65em;
  block-size: .36em;
  transform: translate(-50%, -68%) rotate(-45deg);
  border: solid var(--photozone-active);
  border-width: 0 0 2px 2px;
  content: "";
}

.photozone-body {
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(14px, 4vw, 24px) max(var(--photozone-gutter), env(safe-area-inset-right)) 18px max(var(--photozone-gutter), env(safe-area-inset-left));
}

.photozone-step h3 {
  margin: 0 0 clamp(14px, 2.8vw, 20px);
  font-size: clamp(1.375rem, 1.075rem + 1.55vw, 1.85rem);
  font-weight: 790;
  line-height: 1.22;
  letter-spacing: -.035em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

#photozone-photo-step > h3,
#photozone-theme-step > h3,
#photozone-result-step > h3 { text-align: center; }

.photozone-exhausted-step {
  max-inline-size: 29rem;
  margin-inline: auto;
  padding-block: clamp(26px, 7vh, 56px);
  text-align: center;
}

.photozone-exhausted-step h3 { margin-block-end: 10px; }
.photozone-exhausted-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  word-break: keep-all;
}

.photozone-dialog[data-quota-exhausted="true"] .photozone-dialog-header {
  padding-block-end: 10px;
}

.photozone-note,
.photozone-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.photozone-note { margin-block-start: 10px; font-size: .875rem; }
#photozone-mode-info { margin-block: 0 10px; }
#photozone-save-help { text-align: center; }
.photozone-status { margin-block-end: 10px; color: var(--text); font-size: .875rem; font-weight: 660; }
.photozone-status[data-error="true"] { color: #862e29; }

.photozone-camera-help {
  display: grid;
  gap: 8px;
  margin-block-end: 14px;
  padding: 14px;
  border: 1px solid var(--studio-border);
  border-radius: var(--photozone-tile-radius);
  background: var(--studio-surface);
  overflow-wrap: anywhere;
}

.photozone-camera-help p { margin: 0; color: var(--text); font-size: .875rem; line-height: 1.45; }
.photozone-camera-help .button { justify-self: start; }
.photozone-camera-help .photozone-copy-status:empty { display: none; }
.photozone-camera-help input { inline-size: 100%; min-inline-size: 0; padding: 6px 8px; }

.photozone-photo {
  --photozone-print-padding: clamp(7px, 2vw, 11px);
  display: grid;
  justify-items: center;
  min-inline-size: 0;
  inline-size: fit-content;
  max-inline-size: min(100%, 34rem);
  margin-inline: auto;
  padding: var(--photozone-print-padding);
  border: 1px solid var(--photozone-rule);
  border-radius: var(--photozone-tile-radius);
  background: var(--white);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 6%, transparent), 0 1px 3px color-mix(in srgb, var(--ink) 4%, transparent);
}

.photozone-media {
  display: block;
  inline-size: auto;
  block-size: auto;
  max-inline-size: 100%;
  max-block-size: var(--photozone-photo-height);
  margin-inline: auto;
  border-radius: 7px;
  background: var(--studio-surface);
  object-fit: contain;
}

.photozone-preview-media {
  position: relative;
  display: grid;
  min-inline-size: 0;
  inline-size: fit-content;
  max-inline-size: 100%;
  overflow: hidden;
  border-radius: 7px;
}

.photozone-preview-media > .photozone-media { margin-inline: 0; }

.photozone-neon {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  max-inline-size: none;
  pointer-events: none;
}

.photozone-dialog[data-rendering="true"] .photozone-preview-media:has(.photozone-neon[hidden])::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--studio-glint) 67%, transparent), inset 0 0 14px color-mix(in srgb, var(--studio-glow) 30%, transparent);
  pointer-events: none;
  content: "";
}

.photozone-photo figcaption {
  min-inline-size: 0;
  padding: 8px 2px 2px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.photozone-photo-result {
  inline-size: min(100%, calc(var(--photozone-photo-height) / 1.5 + 2 * var(--photozone-print-padding) + 2px));
}

.photozone-photo-result .photozone-media {
  inline-size: 100%;
  aspect-ratio: 2 / 3;
}

.photozone-photo-result figcaption { color: var(--photozone-active); font-weight: 710; font-variant-numeric: tabular-nums; }

#photozone-result { -webkit-touch-callout: default; }

.photozone-dialog[data-result-expanded="true"] .photozone-photo-result {
  inline-size: 100%;
  max-inline-size: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.photozone-dialog[data-result-expanded="true"] #photozone-result {
  inline-size: min(100%, 27rem);
  max-block-size: none;
}

.photozone-dialog[data-camera-active="true"] {
  --photozone-frame-budget: max(108px, calc(100dvh - 250px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  --photozone-camera-rule: color-mix(in srgb, var(--studio-glow) 27%, var(--ink));
  inline-size: min(680px, calc(100% - 24px));
  border-color: var(--photozone-camera-rule);
  color-scheme: dark;
  background: var(--ink);
  color: var(--white);
}

.photozone-dialog[open][data-camera-active="true"] { grid-template-rows: auto minmax(0, 1fr); }

.photozone-dialog[data-camera-active="true"] .photozone-dialog-header {
  align-items: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  border-color: var(--photozone-camera-rule);
  background: var(--ink);
}

.photozone-dialog[data-camera-active="true"] .photozone-dialog-header h2 { color: inherit; font-size: 1.125rem; }

.photozone-dialog[data-camera-active="true"] #photozone-close {
  padding: 6px 13px;
  border-color: var(--photozone-camera-rule);
  background: var(--stage);
  color: inherit;
}

.photozone-dialog[data-camera-active="true"] :is(.photozone-steps, .photozone-quota, .photozone-footer, #photozone-photo-title) {
  display: none;
}

.photozone-dialog[data-camera-active="true"] .photozone-body {
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr);
  align-items: center;
  padding: 0 0 max(8px, env(safe-area-inset-bottom, 0px));
}

.photozone-dialog[data-camera-active="true"] #photozone-status {
  grid-row: 1;
  margin: 0;
  padding: 8px 12px;
  color: var(--studio-selected);
  text-align: center;
}

.photozone-dialog[data-camera-active="true"] #photozone-status[data-error="true"] { color: #ffc9c2; }

.photozone-dialog[data-camera-active="true"] #photozone-photo-step { grid-row: 2; min-inline-size: 0; }

.photozone-camera-frame {
  position: relative;
  inline-size: min(100%, calc(var(--photozone-frame-budget) * var(--photozone-frame-ratio, 1.333333)));
  aspect-ratio: var(--photozone-frame-ratio, 1.333333);
  margin-inline: auto;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 65%, black);
}

.photozone-camera-frame video {
  display: block;
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  touch-action: none;
  transform: scale(var(--photozone-zoom, 1)) scaleX(var(--photozone-preview-flip, 1));
  object-fit: contain;
}

.photozone-camera-frame video[data-mirrored="true"] { --photozone-preview-flip: -1; }

#photozone-countdown {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  margin: 0;
  place-items: center;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  color: var(--white);
  font-size: clamp(3.5rem, 14vw, 7.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 2px 12px #000b;
  pointer-events: none;
  user-select: none;
}

.photozone-dialog[data-camera-ready="false"] :is(.photozone-camera-zoom, .photozone-camera-actions) { display: none; }

.photozone-camera-controls {
  display: grid;
  gap: 6px;
  justify-items: center;
  inline-size: min(100%, 430px);
  margin-inline: auto;
  padding: 6px 12px 0;
}

.photozone-camera-controls button {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.photozone-camera-controls button:disabled { opacity: .52; cursor: default; }
.photozone-dialog[data-camera-active="true"] :is(button, input):focus-visible {
  outline: 2px solid var(--studio-glow);
  outline-offset: 3px;
}

.photozone-camera-zoom {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 52px;
  align-items: center;
  gap: 8px;
  inline-size: 100%;
}

.photozone-camera-zoom :is(#photozone-zoom-out, #photozone-zoom-in) {
  border: 1px solid var(--photozone-camera-rule);
  border-radius: 50%;
  background: var(--plum);
  color: var(--studio-selected);
  font-size: 1.375rem;
  line-height: 1;
}
.photozone-camera-zoom input { inline-size: 100%; min-block-size: 44px; margin: 0; accent-color: var(--studio-glow); }
.photozone-camera-controls .photozone-camera-zoom-reset {
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--photozone-camera-rule);
  border-radius: 8px;
  color: var(--studio-selected);
  font-size: .75rem;
  line-height: 1.15;
}
.photozone-camera-zoom output { color: var(--studio-glow); font-size: .875rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.photozone-camera-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 8px;
  inline-size: 100%;
}

.photozone-camera-controls .photozone-camera-tool {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 9px;
  color: var(--studio-selected);
  font-size: .8125rem;
  line-height: 1.2;
}

.photozone-camera-tool::before { display: block; font-size: 1.375rem; line-height: 1; }
.photozone-camera-switch { grid-column: 1; }
.photozone-camera-switch::before { content: "⇄"; }
.photozone-camera-mirror { grid-column: 3; }
.photozone-camera-mirror::before { content: "◀│▶"; letter-spacing: -.08em; }
.photozone-camera-controls .photozone-camera-tool[aria-pressed="true"] { background: var(--plum); color: var(--studio-glint); }

.photozone-camera-controls .photozone-shutter {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  inline-size: 66px;
  block-size: 66px;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.photozone-shutter::before { inline-size: 54px; block-size: 54px; border-radius: 50%; background: var(--white); content: ""; }
.photozone-shutter:not(:disabled):active::before { background: var(--studio-glint); }
.photozone-camera-controls .photozone-camera-off { padding-inline: 14px; border-radius: 7px; color: var(--studio-selected); font-size: .875rem; }
.photozone-camera-exit { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.photozone-camera-controls #photozone-native-waiting { background: var(--plum); color: var(--white); }

.photozone-reference-actions,
.photozone-reference-preview,
.photozone-actions-secondary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.photozone-dialog .button:disabled { opacity: .6; cursor: default; }

.photozone-source-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 12px;
  padding: 7px;
  border: 1px solid var(--photozone-rule);
  border-radius: var(--photozone-tile-radius);
  background: var(--white);
  font-size: .875rem;
  font-weight: 700;
}

.photozone-source-card img {
  inline-size: 48px;
  block-size: 48px;
  border-radius: 8px;
  background: var(--paper);
  object-fit: contain;
}

.photozone-themes { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.photozone-themes:disabled { opacity: .75; }

.photozone-theme-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 0 auto 14px;
  padding: 3px;
  border: 1px solid var(--photozone-rule);
  border-radius: calc(var(--photozone-control-radius) + 4px);
  background: var(--studio-surface);
}

.photozone-theme-filter button {
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: var(--photozone-control-radius);
  color: var(--photozone-active);
  background: transparent;
  font-size: .875rem;
  font-weight: 700;
}

.photozone-theme-filter button:hover:not(:disabled) { border-color: var(--photozone-active); background: var(--studio-surface); }
.photozone-theme-filter button[aria-pressed="true"]:hover:not(:disabled),
.photozone-theme-filter button[aria-pressed="true"] {
  border-color: var(--photozone-active);
  color: var(--white);
  background: var(--photozone-active);
  text-decoration: underline;
  text-underline-offset: .22em;
}

.photozone-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.8vw, 13px);
  max-inline-size: 31rem;
  margin-inline: auto;
}

.photozone-theme-options label {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(44px, 1fr);
  min-inline-size: 0;
  border: 1px solid var(--photozone-rule);
  border-radius: var(--photozone-tile-radius);
  background: var(--white);
  font-size: .875rem;
  font-weight: 740;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.photozone-theme-options label:hover:has(input:not(:disabled)) {
  border-color: var(--photozone-active);
}

.photozone-theme-options label:has(input:checked) {
  border-color: var(--photozone-active);
  box-shadow: 0 0 0 1px var(--photozone-active);
  color: var(--photozone-active);
  background: var(--photozone-active-soft);
}

.photozone-theme-options label:has(input:checked)::after {
  position: absolute;
  z-index: 1;
  inset-block-start: 7px;
  inset-inline-end: 7px;
  inline-size: 22px;
  block-size: 22px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--photozone-active);
  box-shadow: 0 0 0 1px var(--photozone-active);
  pointer-events: none;
  content: "";
}

.photozone-theme-options label:has(input:checked)::before {
  position: absolute;
  z-index: 2;
  inset-block-start: 14px;
  inset-inline-end: 13px;
  inline-size: 10px;
  block-size: 6px;
  transform: rotate(-45deg);
  border: 0 solid var(--white);
  border-bottom-width: 2px;
  border-left-width: 2px;
  pointer-events: none;
  content: "";
}

.photozone-theme-options label:has(input:focus-visible) {
  outline: 3px solid var(--studio-accent);
  outline-offset: 2px;
}

.photozone-theme-options label:has(input:disabled) { cursor: default; }
.photozone-theme-options label > span:last-child {
  display: grid;
  align-items: center;
  padding: 5px 3px;
  line-height: 1.3;
}
.photozone-theme-options input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }

.photozone-theme-image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--photozone-tile-radius) - 1px) calc(var(--photozone-tile-radius) - 1px) 0 0;
  background: var(--studio-surface);
  object-fit: cover;
}

.photozone-theme-options label:has(input[value="space"]) img { object-position: 43% center; }

.photozone-reference {
  margin-block-start: 12px;
  border-block: 1px solid var(--photozone-rule);
}

.photozone-reference summary { min-block-size: 44px; padding-block: 9px; line-height: 1.45; cursor: pointer; }
.photozone-reference summary span { margin-inline-start: 6px; color: var(--muted); font-size: .875rem; }
.photozone-reference-actions { padding-block-end: 8px; }
.photozone-reference-preview img { border: 1px solid var(--photozone-rule); border-radius: 5px; object-fit: cover; }

.photozone-footer {
  min-inline-size: 0;
  padding: 10px max(var(--photozone-gutter), env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(var(--photozone-gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--photozone-rule);
}

.photozone-actions { display: grid; gap: 4px; }
.photozone-footer .photozone-note { margin: 0 0 2px; font-size: .8125rem; }
.photozone-footer .photozone-native-fallback { inline-size: 100%; margin-block-end: 5px; text-align: center; }
.photozone-actions > .button-primary {
  inline-size: 100%;
  min-block-size: 48px;
  border-color: var(--photozone-active);
  border-radius: var(--photozone-control-radius);
  background: var(--photozone-active);
  color: var(--white);
  font-weight: 770;
}

.photozone-actions > .button-primary:hover:not(:disabled) {
  border-color: var(--photozone-active-hover);
  background: var(--photozone-active-hover);
}

.photozone-photo-entry { margin-block: 12px; }
.photozone-photo-entry .photozone-note { text-align: center; }

.photozone-photo-entry .photozone-camera-entry {
  display: flex;
  flex-direction: column;
  gap: 7px;
  inline-size: 100%;
  min-block-size: 104px;
  border-color: var(--photozone-active);
  border-radius: var(--photozone-tile-radius);
  background: var(--photozone-active);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 770;
}

.photozone-photo-entry .photozone-camera-entry:hover:not(:disabled) {
  border-color: var(--photozone-active-hover);
  background: var(--photozone-active-hover);
}

.photozone-action-icon {
  flex: 0 0 34px;
  inline-size: 34px;
  block-size: 34px;
}

.photozone-actions-secondary { justify-content: center; gap: 2px 5px; }
.photozone-dialog .button-quiet {
  --violet: var(--photozone-active);
  --blue-border: var(--studio-border);
  --blue-surface: var(--studio-surface);
  min-block-size: 44px;
  padding: 6px 9px;
  border-radius: var(--photozone-control-radius);
}
.photozone-actions-secondary .button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--photozone-active);
  font-size: .875rem;
  font-weight: 695;
}

.photozone-actions-secondary .button-quiet:hover {
  border-color: var(--photozone-rule);
  background: var(--photozone-active-soft);
}

.photozone-actions .photozone-upload-entry {
  justify-self: center;
  padding-inline: 12px;
  border-color: var(--studio-border);
  background: var(--studio-surface);
  color: var(--photozone-active);
  font-weight: 700;
}

.photozone-actions .photozone-upload-entry:hover:not(:disabled) {
  border-color: var(--photozone-active);
  background: var(--photozone-active-soft);
}

.photozone-text-action {
  min-block-size: 44px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: var(--photozone-control-radius);
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.photozone-text-action:hover { color: var(--photozone-active); }

.photozone-progress {
  inline-size: min(100%, 26rem);
  margin: 14px auto 0;
  padding: 9px;
  border: 1px solid var(--photozone-rule);
  border-radius: var(--photozone-control-radius);
  background: var(--white);
}

.photozone-progress-bar {
  display: block;
  block-size: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--studio-selected);
}

.photozone-progress-bar::before {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(125deg, var(--studio-selected) 0 6px, var(--photozone-active) 6px 9px);
  content: "";
}

.photozone-toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 9px auto 0;
  padding: 7px 10px;
  border: 1px solid var(--studio-glow);
  border-radius: var(--photozone-control-radius);
  background: var(--studio-accent-hover);
  color: var(--white);
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
}

.photozone-toast::before {
  flex: none;
  inline-size: 11px;
  block-size: 6px;
  transform: translateY(-1px) rotate(-45deg);
  border: solid var(--studio-glint);
  border-width: 0 0 2px 2px;
  content: "";
}

@media (prefers-reduced-motion: no-preference) {
  .photozone-theme-filter button,
  .photozone-theme-options label {
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }

  .photozone-steps li:has(~ li[aria-current="step"]) span::after,
  .photozone-theme-options label:has(input:checked)::before,
  .photozone-theme-options label:has(input:checked)::after {
    animation: photozone-selection-mark .2s cubic-bezier(.2, .8, .2, 1);
  }

  .photozone-progress-bar::before {
    inline-size: 36%;
    background: linear-gradient(90deg, var(--studio-glow), var(--photozone-active), var(--studio-glow));
    animation: photozone-progress-slide 1.45s ease-in-out infinite;
  }

  .photozone-toast:not([hidden]) { animation: photozone-toast-in .24s ease-out; }
  #photozone-result-step:not([hidden]) .photozone-photo-result {
    animation: photozone-result-in .34s cubic-bezier(.2, .7, .2, 1) both;
  }
  .photozone-dialog[data-rendering="true"] .photozone-preview-media:has(.photozone-neon[hidden])::after {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    block-size: 2px;
    background: linear-gradient(90deg, transparent, var(--studio-glint), transparent);
    opacity: .65;
    pointer-events: none;
    animation: photozone-fallback-sweep 2.8s ease-in-out infinite;
    content: "";
  }
}

@keyframes photozone-progress-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(280%); }
}

@keyframes photozone-toast-in {
  from { opacity: 0; transform: translateY(4px); }
}

@keyframes photozone-selection-mark {
  from { opacity: .4; scale: .75; }
  to { opacity: 1; scale: 1; }
}

@keyframes photozone-result-in {
  from { opacity: .65; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes photozone-fallback-sweep {
  from { inset-block-start: 0; opacity: 0; }
  15%, 85% { opacity: .65; }
  to { inset-block-start: calc(100% - 2px); opacity: 0; }
}

@media (forced-colors: active) {
  .photozone-steps li[aria-current="step"] { border-color: Highlight; }
  .photozone-steps li[aria-current="step"] span { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .photozone-theme-options label:has(input:checked) { border-color: Highlight; outline: 1px solid Highlight; }
  .photozone-theme-options label:has(input:checked)::after { forced-color-adjust: none; border-color: Canvas; background: Highlight; }
  .photozone-theme-options label:has(input:checked)::before { forced-color-adjust: none; border-color: HighlightText; }
  .photozone-theme-options label:has(input:focus-visible) { outline: 3px solid Highlight; }
  .photozone-shutter::before { background: ButtonText; }
  .photozone-steps li:has(~ li[aria-current="step"]) span { forced-color-adjust: none; background: Canvas; }
  .photozone-steps li:has(~ li[aria-current="step"]) span::after { border-color: Highlight; }
  .photozone-theme-filter button[aria-pressed="true"]:hover:not(:disabled),
  .photozone-theme-filter button[aria-pressed="true"] { forced-color-adjust: none; border-color: Highlight; color: HighlightText; background: Highlight; }
  .photozone-theme-filter button:focus-visible { outline-color: Highlight; }
  .photozone-progress-bar { border: 1px solid CanvasText; }
  .photozone-progress-bar::before { forced-color-adjust: none; background: repeating-linear-gradient(125deg, Canvas 0 6px, Highlight 6px 9px); }
  .photozone-toast::before { border-color: CanvasText; }
}

@media (max-width: 650px) {
  .photozone-dialog {
    inset: 0;
    inline-size: 100%;
    block-size: 100dvh;
    max-inline-size: none;
    max-block-size: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .photozone-dialog[data-camera-active="true"] { inline-size: 100%; }
}

@media (max-width: 360px) {
  .photozone-theme-options label { font-size: .8125rem; }
}

@media (max-height: 600px) {
  .photozone-dialog:not([data-camera-active="true"]) .photozone-dialog-header { row-gap: 7px; padding-block-end: 7px; }
}
