/* Shared site styles: poster editor, legal and message pages.
   Admin pages add admin.css on top. */

:root {
  color-scheme: dark;
  --page: #080b16;
  --surface: #111528;
  --surface-soft: #181d35;
  --surface-raised: #1f2542;
  --ink: #f3efe4;
  --muted: #9ba1ba;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #e9c57c;
  --accent-ink: #1a1405;
  --accent-soft: rgba(233, 197, 124, 0.13);
  --success: #6fd3a0;
  --success-soft: rgba(111, 211, 160, 0.13);
  --warn: #f0c36a;
  --warn-soft: rgba(240, 195, 106, 0.14);
  --danger: #ff8d9b;
  --danger-soft: rgba(255, 141, 155, 0.13);
  --info-soft: rgba(140, 165, 255, 0.14);
  --poster-bg: #05070f;
  --poster-fg: #faf8f2;
  --font-ui: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --topbar-height: 60px;
  --content: 1360px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 12px);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(70% 50% at 85% -5%, rgba(92, 108, 220, 0.2), transparent 70%),
    radial-gradient(55% 40% at 0% 8%, rgba(233, 197, 124, 0.09), transparent 70%),
    var(--page);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Faint star field behind the whole page. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 37% 62%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 28%, rgba(255, 255, 255, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 74%, rgba(255, 255, 255, 0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, rgba(255, 255, 255, 0.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 82%, rgba(233, 197, 124, 0.6) 50%, transparent 51%);
  background-size: 420px 380px, 310px 290px, 520px 460px, 270px 330px, 380px 410px, 610px 540px;
  opacity: 0.55;
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
summary,
select {
  cursor: pointer;
}

button,
a,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: linear-gradient(180deg, #f3d595, var(--accent));
  box-shadow: 0 8px 24px rgba(233, 197, 124, 0.22);
  color: var(--accent-ink);
}

.button--primary:hover {
  background: linear-gradient(180deg, #f8dea6, #efcf8c);
}

.button--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--ink);
}

.button--small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.link-button:hover {
  text-decoration: underline;
}

.round-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
}

.round-button:hover {
  border-color: var(--ink);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 22, 0.82);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  display: flex;
  max-width: var(--content);
  height: var(--topbar-height);
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 32px;
  height: 32px;
}

.brand__name span {
  color: var(--accent);
  font-weight: 500;
}

.topbar__nav {
  display: flex;
  gap: 22px;
  margin-left: 12px;
}

.topbar__nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.topbar__nav a:hover {
  color: var(--ink);
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang__button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.lang__button.is-active {
  background: var(--ink);
  color: var(--page);
}

.topbar__support {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.topbar__support:hover {
  color: var(--accent);
}

/* ---------- intro ---------- */

main {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 32px;
  align-items: end;
  padding: 28px 0 22px;
}

.intro h1 {
  grid-row: span 2;
  max-width: 24ch;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.06;
}

.intro__lead {
  max-width: 44ch;
  color: var(--muted);
  font-size: 1rem;
}

.intro__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.intro__chips li::before {
  content: "✦";
  margin-right: 6px;
  color: var(--accent);
}

/* ---------- notice ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--info-soft);
}

.notice.is-error {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.notice__close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
}

/* ---------- editor layout ---------- */

.studio {
  backdrop-filter: blur(6px);
}

.studio {
  display: grid;
  grid-template-columns: 92px minmax(340px, 430px) minmax(0, 1fr);
  grid-template-areas: "rail builder stage";
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 21, 40, 0.72);
  box-shadow: var(--shadow);
}

.rail {
  position: sticky;
  top: calc(var(--topbar-height) + 12px);
  display: grid;
  grid-area: rail;
  gap: 4px;
  padding: 12px 8px;
}

.step {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 4px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.step svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step:hover {
  color: var(--ink);
}

.step {
  transition: color 0.15s, background-color 0.15s;
}

.step.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.builder {
  grid-area: builder;
  align-self: stretch;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stage {
  position: sticky;
  top: calc(var(--topbar-height) + 12px);
  display: grid;
  grid-area: stage;
  gap: 12px;
  padding: 26px 26px 18px;
}

.stage__frame {
  position: relative;
  display: grid;
  place-items: center;
}

/* Soft spotlight behind the poster. */
.stage__frame::before {
  content: "";
  position: absolute;
  inset: -4% 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 138, 255, 0.2), transparent);
  filter: blur(20px);
  pointer-events: none;
}

.poster-surface {
  position: relative;
}

body[data-step="order"] .stage__bar {
  display: none;
}

.stage__note {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 12px 12px 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.stage__price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stage__price strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.stage__close,
.stage__zoom {
  display: none;
}

.poster-surface {
  display: grid;
  width: 100%;
  place-items: center;
}

.poster {
  position: relative;
  width: auto;
  height: clamp(380px, calc(100vh - 372px), 820px);
  max-width: 100%;
  aspect-ratio: 297 / 420;
  overflow: hidden;
  border-radius: 4px;
  background: var(--poster-bg);
  color: var(--poster-fg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.65);
}

.poster__svg,
.poster__svg svg {
  display: block;
  width: 100%;
  height: auto;
}

.poster__watermark-layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: space-between;
  gap: 40px 24px;
  padding: 56px 24px;
  overflow: hidden;
  pointer-events: none;
}

.poster__watermark {
  color: rgba(255, 255, 255, 0.06);
  font-family: var(--font-ui);
  font-size: clamp(0.6rem, 1vw, 0.9rem);
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-28deg);
  mix-blend-mode: difference;
  user-select: none;
}

.spinner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 11, 22, 0.85);
  color: #fff;
  font-size: 0.8rem;
  transform: translateX(-50%);
}

/* ---------- panels and fields ---------- */

.panel {
  display: none;
  padding: 28px 26px 8px;
}

.panel.is-active {
  display: block;
  animation: panel-in 0.25s ease-out;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.panel h2 {
  font-size: 1.7rem;
  line-height: 1.15;
}

.panel__intro {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field label,
.group__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  /* 16px keeps iOS from zooming into the field. */
  font-size: 1rem;
}

.field textarea {
  min-height: 0;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6c7290;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--muted);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
  outline-offset: 0;
}

.field .is-invalid {
  border-color: var(--danger);
}

.field__hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.field__hint.is-ok {
  color: var(--success);
}

.field__hint.is-ok::before {
  content: "✓ ";
}

.field__hint.is-error {
  color: var(--danger);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-row--three {
  grid-template-columns: 1fr;
  gap: 0;
}

/* ---------- styled dropdown ---------- */

.dropdown {
  position: relative;
}

.dropdown__button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 1rem;
  text-align: left;
}

.dropdown__button::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.dropdown__button:hover {
  border-color: var(--muted);
}

.dropdown.is-open .dropdown__button {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.dropdown.is-open .dropdown__button::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.dropdown__list {
  position: absolute;
  z-index: 12;
  right: 0;
  left: 0;
  max-height: 264px;
  margin-top: 6px;
  /* Clears the fixed action bar on phones when scrolled into view. */
  scroll-margin-bottom: 96px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.dropdown__option {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
}

.dropdown__option:hover,
.dropdown__option.is-active {
  background: rgba(255, 255, 255, 0.07);
}

.dropdown__option[aria-selected="true"] {
  color: var(--accent);
  font-weight: 600;
}

.dropdown__option[aria-selected="true"]::after {
  content: "✓";
}

.suggestions {
  position: absolute;
  z-index: 10;
  right: 0;
  left: 0;
  max-height: 290px;
  margin-top: 4px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.suggestion {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
}

.suggestion strong,
.suggestion small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion small {
  color: var(--muted);
  font-size: 0.8rem;
}

.suggestion:hover,
.suggestion.is-active {
  background: var(--accent-soft);
}

.more {
  margin-bottom: 4px;
}

.more summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 12px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

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

.more summary::before {
  content: "+";
  font-weight: 700;
}

.more[open] summary::before {
  content: "−";
}

.more summary small {
  color: var(--muted);
  font-weight: 400;
}

.group {
  margin-bottom: 24px;
}

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

.group__head .group__label {
  margin: 0;
}

.group__value {
  font-size: 0.9rem;
}

.presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset {
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 10px;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 0.88rem;
  text-align: left;
}

.preset:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.preset.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.swatch {
  background:
    radial-gradient(circle at 50% 50%, var(--swatch-fg) 0 30%, transparent 33%),
    var(--swatch-bg);
}

.preset__thumb {
  flex: none;
  width: 30px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.preset__thumb svg {
  display: block;
  width: 100%;
  height: auto;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  padding: 0;
}

.swatch:hover {
  transform: scale(1.06);
}

.swatch.is-active {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent);
}

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

.shape {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 2px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 0.8rem;
}

.shape svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.shape:hover {
  border-color: var(--line-strong);
}

.shape.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.switches {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.switch {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  font-size: 0.95rem;
  cursor: pointer;
}

.switch + .switch {
  border-top: 1px solid var(--line);
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch__track {
  position: relative;
  flex: none;
  order: 2;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.15s;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.switch input:checked + .switch__track {
  background: var(--accent);
}

.switch input:checked + .switch__track::after {
  background: var(--accent-ink);
  transform: translateX(18px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- order step ---------- */

.summary {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.summary__row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
}

.summary__row + .summary__row {
  border-top: 1px solid var(--line);
}

.summary dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.summary dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.total strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
}

.order-message {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.92rem;
}

.order-message.is-success {
  background: var(--success-soft);
  color: var(--success);
}

.order-message a {
  color: inherit;
  font-weight: 700;
}

.secure-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.secure-note svg {
  flex: none;
}

.builder__nav {
  display: flex;
  gap: 10px;
  padding: 16px 26px 26px;
}

.builder__nav .button--primary {
  flex: 1;
}

/* Until the last step the gold button belongs to "Order" under the poster. */
body:not([data-step="order"]) .builder__nav .button--primary {
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

#nextButton::after,
#mobileNextButton::after {
  content: "→";
  font-weight: 400;
}

body[data-step="order"] #nextButton::after,
body[data-step="order"] #mobileNextButton::after {
  content: none;
}

body:not([data-step="order"]) .builder__nav .button--primary:hover {
  border-color: var(--ink);
}

/* ---------- content sections ---------- */

.how,
.examples,
.about,
.faq {
  margin-top: 88px;
}

.how h2,
.examples h2,
.about h2,
.faq h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.12;
}

.how__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.how__list li {
  padding: 24px 28px 0 0;
}

.how__list li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.how__num {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
}

.how__list h3 {
  margin: 14px 0 6px;
  font-size: 1.1rem;
}

.how__list p {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head__tools a {
  margin-right: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding-bottom: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.gallery img {
  transition: transform 0.25s;
}

.gallery img:hover {
  transform: translateY(-4px);
}

.gallery img {
  flex: none;
  width: min(320px, 70vw);
  height: auto;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--surface);
  object-fit: cover;
  scroll-snap-align: start;
}

.about,
.faq {
  max-width: 780px;
}

.about p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq h2 {
  margin-bottom: 14px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 1.05rem;
  font-weight: 600;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- legal and message pages ---------- */

.legal {
  max-width: 760px;
  padding-top: 40px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.legal-updated {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-section {
  margin-top: 30px;
}

.legal-section h2 {
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.legal-section p,
.legal-section li {
  color: #c4c8d8;
  line-height: 1.7;
}

.legal-section p + p,
.legal-section ul {
  margin-top: 10px;
}

.legal-section ul {
  padding-left: 20px;
}

.message-page {
  display: grid;
  min-height: calc(100vh - var(--topbar-height));
  place-items: center;
  padding-top: 32px;
  padding-bottom: 64px;
}

.message-card {
  width: min(100%, 480px);
  padding: 38px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.message-card__icon {
  display: inline-grid;
  min-width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 16px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

.message-card__icon--ok {
  background: var(--success-soft);
  color: var(--success);
  font-size: 1.6rem;
}

.message-card h1 {
  font-size: 1.9rem;
  line-height: 1.15;
}

.message-card > p {
  margin-top: 10px;
  color: var(--muted);
}

.message-card__actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.message-card .message-card__tip {
  margin-top: 20px;
  font-size: 0.85rem;
}

/* ---------- footer ---------- */

.footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  max-width: var(--content);
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin: 0 auto;
  padding: 26px 24px 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer__links a,
.footer__button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer__links a:hover,
.footer__button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer__audit {
  margin-left: auto;
}

.footer__audit img {
  display: block;
  width: 150px;
  height: auto;
}

/* ---------- mobile action bar, cookie banner ---------- */

.mobile-bar {
  display: none;
}

.cookie-consent {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  max-width: 720px;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.cookie-consent__copy {
  flex: 1;
  font-size: 0.88rem;
}

.cookie-consent__copy p {
  margin-top: 2px;
  color: var(--muted);
}

.cookie-consent__actions {
  display: flex;
  gap: 8px;
}

.cookie-consent .button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.9rem;
}

/* ---------- medium screens ---------- */

@media (max-width: 1180px) {
  .studio {
    grid-template-columns: 80px minmax(320px, 400px) minmax(0, 1fr);
  }

  .stage__price span {
    display: none;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  :root {
    --topbar-height: 54px;
  }

  main {
    padding: 0 16px;
  }

  .topbar__inner {
    gap: 12px;
    padding: 0 16px;
  }

  .topbar__nav {
    display: none;
  }

  .intro {
    grid-template-columns: 1fr;
    padding: 22px 0 18px;
  }

  .intro h1 {
    grid-row: auto;
  }

  .studio {
    display: block;
    margin: 0 -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* The poster stays in view while options change... */
  .stage {
    z-index: 20;
    top: var(--topbar-height);
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--page);
  }

  /* ...except while typing, so the keyboard does not squeeze the form. */
  .studio:has(.field input:focus, .field textarea:focus) .stage:not(.is-zoomed) {
    position: static;
  }

  .poster {
    height: 36vh;
    height: 36svh;
  }

  .stage__note,
  .stage__bar {
    display: none;
  }

  .stage__zoom {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 16px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(8, 11, 22, 0.7);
  }

  .stage.is-zoomed {
    position: fixed;
    z-index: 80;
    inset: 0;
    align-content: center;
    padding: 56px 16px 20px;
    overflow-y: auto;
  }

  .stage.is-zoomed .poster {
    height: min(calc(100vh - 130px), 141vw);
    height: min(calc(100svh - 130px), 141vw);
  }

  .stage.is-zoomed .stage__note {
    display: block;
  }

  .stage.is-zoomed .stage__zoom {
    display: none;
  }

  .stage.is-zoomed .stage__close {
    position: absolute;
    top: 10px;
    right: 12px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
  }

  .rail {
    position: static;
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .rail::-webkit-scrollbar {
    display: none;
  }

  .step {
    flex: 1 0 auto;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
  }

  .step svg {
    width: 18px;
    height: 18px;
  }

  .builder {
    border: 0;
  }

  .panel {
    padding: 22px 16px 4px;
  }

  .builder__nav {
    display: none;
  }

  .how,
  .examples,
  .about,
  .faq {
    margin-top: 60px;
  }

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

  .how__list li,
  .how__list li + li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0 8px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .how__num {
    grid-row: span 2;
  }

  .how__list h3 {
    margin: 0 0 4px;
  }

  .footer {
    margin-top: 64px;
  }

  body[data-step] .footer {
    padding-bottom: 76px;
  }

  .footer__inner {
    padding: 22px 16px 26px;
  }

  .footer__audit {
    margin-left: 0;
  }

  .mobile-bar {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(8, 11, 22, 0.94);
    backdrop-filter: blur(12px);
  }

  .mobile-bar .button--primary {
    flex: 1;
    min-width: 0;
  }

  .mobile-bar__back {
    width: 48px;
    padding: 0;
    font-size: 1.4rem;
  }

  .cookie-consent {
    bottom: 80px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__actions .button {
    flex: 1;
  }

  .message-card {
    padding: 30px 22px;
  }
}

@media (max-width: 480px) {
  .topbar__support,
  .step svg {
    display: none;
  }

  .rail {
    padding: 8px;
  }

  .step {
    padding: 9px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
