/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg: #f7f1e8;
  --bg-glow: #fbe4da;
  --surface: #fffdf9;
  --surface-2: #f2ebe1;
  --ink: #2a221d;
  --muted: #7b6e63;
  --line: #e7dccf;
  --accent: #a3303b;
  --accent-hover: #8a2530;
  --accent-ink: #ffffff;
  --accent-soft: #f7e2e1;
  --green: #2e5a47;
  --gold: #b0843a;
  --media: #fbf8f3;
  --shadow: 0 1px 2px rgb(60 40 20 / 0.06), 0 10px 28px -14px rgb(60 40 20 / 0.22);
  --shadow-lg: 0 2px 4px rgb(60 40 20 / 0.06), 0 22px 48px -18px rgb(60 40 20 / 0.32);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* side padding that also clears the notch of iPhones held sideways */
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111916;
    --bg-glow: #1c2c25;
    --surface: #18221e;
    --surface-2: #212d28;
    --ink: #f1ebe2;
    --muted: #a99f93;
    --line: #2c3934;
    --accent: #e3707a;
    --accent-hover: #ec8890;
    --accent-ink: #1c0f11;
    --accent-soft: #3a2326;
    --green: #8fc6a8;
    --gold: #d9b46c;
    --media: #f1ece4;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -14px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 22px 48px -18px rgb(0 0 0 / 0.75);
    color-scheme: dark;
  }
}

/* ─── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 50% -140px, var(--bg-glow), transparent 70%) no-repeat,
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.auth-btn svg, .btn svg, .tool svg, .icon-btn svg, .fab svg, .wish-link svg,
.wish-placeholder, .empty-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Header ─────────────────────────────────────────────── */
.preview-banner {
  padding: 8px var(--gutter-r) 8px var(--gutter-l);
  background: var(--gold);
  color: #2a1d08;
  font-size: 14px;
  text-align: center;
}
.staging-banner { background: #2f6690; color: #fff; } /* test copy: blue, so it's never mistaken for the real list */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1152px;
  min-height: 60px;
  margin: 0 auto;
  padding: 10px var(--gutter-r) 10px var(--gutter-l);
}

.editor-status {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.is-editor .editor-status { display: inline-flex; }
.editor-status > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-status strong { color: var(--ink); font-weight: 500; }
.editor-status .dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s, background .15s, border-color .15s;
}
.auth-btn:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
.auth-btn svg { width: 16px; height: 16px; }
.auth-btn .i-out, .is-editor .auth-btn .i-lock { display: none; }
.is-editor .auth-btn .i-out { display: block; }

.site-header {
  padding: 12px var(--gutter-r) 44px var(--gutter-l);
  text-align: center;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.site-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8.5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  -webkit-hyphens: auto; /* very narrow screens: "Wunsch-liste" instead of running off the edge */
  hyphens: auto;
  text-wrap: balance;
}
.ornament {
  display: block;
  width: 120px;
  margin: 20px auto 12px;
  color: var(--gold);
}
.count {
  min-height: 1.55em;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ─── Wish list ──────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 var(--gutter-r) 64px var(--gutter-l);
}
.is-editor main { padding-bottom: 120px; }

.wishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) { .wishes { gap: 28px; } }

.wish {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wishes.animate .wish { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.wishes.animate .wish:nth-child(2) { animation-delay: 60ms; }
.wishes.animate .wish:nth-child(3) { animation-delay: 120ms; }
.wishes.animate .wish:nth-child(4) { animation-delay: 180ms; }
.wishes.animate .wish:nth-child(n+5) { animation-delay: 240ms; }
@media (hover: hover) {
  .wish:not(.skeleton):hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}
.wish.is-top { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }

.wish-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.wish.has-image .wish-media { background: var(--media); }

.media-link {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
/* Pinned to the frame: as a centred grid item, a large photo would grow to its
   own size and spill over the text below. */
.media-link img {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain;
  mix-blend-mode: multiply; /* lets white product photos melt into the card */
}
.wish.has-image .media-link img { display: block; }
.wish.has-image .wish-placeholder { display: none; }
.wish-placeholder {
  width: 64px;
  height: 64px;
  color: var(--gold);
  opacity: .65;
  stroke-width: 1.4;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -4px rgb(0 0 0 / .3);
}

.wish-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  gap: 8px;
}
.is-editor .wish-tools { display: flex; }
.tool {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: color .15s, transform .15s;
}
.tool:hover { color: var(--accent); transform: scale(1.06); }
.tool svg { width: 18px; height: 18px; }

.wish-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}
.wish-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-hyphens: auto; /* long German words break at syllables (lang="de") */
  hyphens: auto;
}
.wish-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.wish-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 10px;
}
.wish-price {
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wish-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.wish-link:hover { background: var(--accent-hover); }
.wish-link svg { width: 16px; height: 16px; }

/* "Geschenk reservieren" — only for guests, never for the list's owner */
.wish-reserve {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 9px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
.is-guest .wish-reserve { display: flex; }
.wish-reserve:hover { border-color: var(--accent); background: var(--accent-soft); }
.wish-reserve svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* price filter above the list */
.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin: -12px auto 28px;
}
.filter-label { color: var(--muted); font-size: 15px; font-weight: 600; }
.filter-field { position: relative; }
.filter-field input {
  width: 118px;
  min-height: 42px;
  padding: 9px 30px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px; /* 16px stops iOS from zooming in */
  font-variant-numeric: tabular-nums;
}
.filter-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-currency { position: absolute; top: 50%; right: 13px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.filter-dash { color: var(--muted); }
.filter-reset { min-height: 42px; padding-inline: 14px; }
.filter-note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 14px; text-align: center; }

/* loading placeholders */
.skeleton .wish-media { background: var(--surface-2); }
.bone {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%) 0 0 / 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.bone.title { width: 70%; height: 22px; }
.bone.short { width: 40%; }

.empty {
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}
.empty p { max-width: 36ch; margin: 0 auto 18px; font-size: 17px; }
.empty-icon { width: 56px; height: 56px; margin-bottom: 12px; color: var(--gold); stroke-width: 1.4; }
.for-editor, .is-editor .for-guest { display: none; }
.is-editor .for-editor { display: block; }

/* browser too old (check in index.html): only the note stays visible */
.is-unsupported .topbar,
.is-unsupported main > :not(#old-browser),
.is-unsupported .fab { display: none !important; }
.is-unsupported #old-browser { display: block !important; }

/* password screen */
.gate { display: none; max-width: 420px; margin: 4px auto 40px; }
.is-locked .gate { display: block; }
.is-locked .wishes,
.is-locked .empty,
.is-locked .count,
.is-locked .filter,
.is-locked .auth-btn { display: none !important; }

.gate-card {
  padding: 32px clamp(16px, 6vw, 28px) 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.gate-icon {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--gold);
}
.gate h2 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
}
.gate p { margin: 0 0 20px; color: var(--muted); }
.gate .hint { margin-top: -10px; }
.gate .field { margin-bottom: 14px; }
.gate .form-error { margin: 0 0 14px; color: var(--accent); text-align: left; }
.btn-block { width: 100%; white-space: normal; }
.link-btn {
  margin-top: 14px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

.site-footer {
  padding: 24px var(--gutter-r) 32px var(--gutter-l);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.is-editor .site-footer { padding-bottom: 104px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-soft { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { padding-inline: 12px; background: transparent; color: var(--accent); }
.btn-danger:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: .65; cursor: progress; }

.fab {
  position: fixed;
  z-index: 10;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px 15px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 70%, black);
  transition: background .15s, transform .15s;
}
.is-editor .fab { display: inline-flex; }
.fab:hover { background: var(--accent-hover); transform: translateY(-1px); }
.fab svg { width: 20px; height: 20px; stroke-width: 2.4; }
@media (max-width: 600px) {
  .fab { left: 16px; right: 16px; }
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: max-content; /* otherwise left: 50% caps it at half the screen and it wraps early */
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 20px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-wrap: balance;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─── Dialogs ────────────────────────────────────────────── */
/* --kb (keyboard height) and --vvh (visible height) are set in app.js while the
   on-screen keyboard is open, so dialogs move up and shrink to stay above it. */
dialog.sheet {
  bottom: var(--kb, 0px);
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: min(90vh, 880px);
  max-height: min(90dvh, 880px, calc(var(--vvh, 100dvh) - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45);
}
dialog.sheet-small { width: min(420px, calc(100% - 32px)); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: pop .22s cubic-bezier(.2, .8, .2, 1); }
dialog.sheet::backdrop { background: rgb(28 20 14 / .5); }
dialog.sheet:focus { outline: none; } /* focused on open (autofocus) so Safari doesn't ring the close button */

/* flex-basis must be auto, not 0%: Safari sizes the dialog from it and collapses it to 0 px */
.sheet form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px 24px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 24px 6px;
}
.sheet-foot {
  display: flex;
  flex-wrap: wrap; /* narrow screens / large text: the main button moves to its own line */
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.sheet-foot .spacer { flex: 1; }

.form-error {
  margin: 10px 24px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 600px) {
  dialog.sheet, dialog.sheet-small {
    width: 100%;
    max-height: 94vh;
    max-height: min(94dvh, calc(var(--vvh, 100dvh) - 16px));
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  dialog.sheet[open] { animation: sheet-up .3s cubic-bezier(.2, .8, .2, 1); }
  .sheet-head { padding-left: 16px; }
  .sheet-body { padding: 18px 16px 6px; }
  .sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .form-error { margin-inline: 16px; }
}

/* Narrow phones (or zoomed text): the × already cancels, so drop the extra
   "Abbrechen" button and keep the remaining ones on one line. */
@media (max-width: 389px) {
  .sheet-foot .btn-ghost[data-close] { display: none; }
  .sheet-foot .btn { padding-inline: 14px; }
  .fab { padding-inline: 16px; font-size: 15px; }
}

/* Little room (keyboard open, phone in landscape): drop the intro text and
   tighten the spacing so the sign-in fields and button fit above the keyboard. */
.is-short .sheet .lead { display: none; }
.is-short .sheet-head { padding-top: 8px; padding-bottom: 6px; }
.is-short .sheet-body { padding-top: 12px; }
.is-short .sheet .field { margin-bottom: 12px; }
.is-short .sheet-foot { padding-top: 8px; padding-bottom: 8px; }

/* Hardly any room (small phone in landscape with the keyboard open): a fixed
   header and button row would leave no space for the fields, so the whole
   dialog scrolls as one instead. */
.is-cramped dialog.sheet[open] { overflow-y: auto; overscroll-behavior: contain; }
.is-cramped .sheet form,
.is-cramped .sheet-body { flex: none; overflow: visible; }

/* reservation window: the question, then "check your inbox" */
.reserve-wish { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.reserve-done { display: none; padding: 8px 0 14px; text-align: center; }
.reserve-done-icon { font-size: 40px; line-height: 1; }
.reserve-done-title { margin: 12px 0 6px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.reserve-done p:last-child { margin: 0; color: var(--muted); }
#reserve-form.is-sent .reserve-ask,
#reserve-form.is-sent .reserve-ask-only { display: none; }
#reserve-form.is-sent .reserve-done { display: block; }

/* ─── Form fields ────────────────────────────────────────── */
.lead { margin: 0 0 18px; color: var(--muted); }
.lead + .hint { margin: -8px 0 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; }
.req { color: var(--accent); }

.field input, .field textarea, .more input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 16px; /* 16px stops iOS from zooming in */
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .more input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
::placeholder { color: var(--muted); opacity: .7; }

.hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.status.ok { color: var(--green); }
.status.err { color: var(--accent); }
.status.busy::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin .7s linear infinite;
}

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { flex: none; border-radius: 12px; }

.photo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.photo-preview {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
  text-align: center;
}
.photo-preview.filled { border-style: solid; background: var(--media); }
.photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 6px; object-fit: contain; mix-blend-mode: multiply; }
.photo-preview span { padding: 8px; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.file-btn { position: relative; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.more summary {
  width: fit-content;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.more summary:hover { color: var(--ink); }
.more input { margin-top: 8px; }

.price-input { position: relative; max-width: 200px; }
.price-input input { padding-right: 44px; font-variant-numeric: tabular-nums; }
.currency {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
}
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

/* ─── Motion ─────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
