@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-full-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  src: url('/fonts/fraunces-latin-full-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

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

[hidden] {
  display: none !important;
}

:root {
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --radius: 22px;
  --shadow: 0 1px 2px rgb(60 45 25 / 0.06), 0 12px 32px -12px rgb(60 45 25 / 0.18);
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper) url('/img/paper.jpg') repeat;
  background-size: 360px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--green);
  margin: 0;
  line-height: 1.12;
  font-variation-settings: 'SOFT' 50, 'opsz' 72;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--terracotta-ink);
  margin-bottom: 0.35rem;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-top: 0.6rem;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 560px;
  padding-block: 48px;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.link:focus-visible,
input:focus-visible,
select:focus-visible,
.drop:focus-within {
  outline: 3px solid color-mix(in srgb, var(--terracotta) 55%, transparent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgb(36 63 49 / 0.7);
}

.btn-primary:hover {
  background: var(--green-soft);
}

.btn-accent {
  background: var(--terracotta-ink);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--green) 6%, transparent);
}

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

.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 10px 2px;
  margin: -10px 0;
  font: inherit;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-danger {
  color: var(--terracotta-ink);
}

.is-armed {
  font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: max(env(safe-area-inset-top), 40px) var(--gutter) 0;
  overflow: hidden;
}

/* Handy: Bild unter dem Titel; seine leere Leinenfläche läuft hinter den Titel. */
.hero-img {
  display: block;
  position: relative;
  z-index: -1;
  margin: -46vw calc(var(--gutter) * -1) 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
  mask-image: linear-gradient(to bottom, transparent, #000 30%);
}

.hero-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent, var(--paper));
  z-index: -1;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 34rem;
  overflow-wrap: anywhere;
}

.stamp {
  position: absolute;
  top: 2.6rem;
  right: -0.2rem;
  padding: 0.28em 0.7em 0.2em;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  color: color-mix(in srgb, var(--terracotta) 85%, transparent);
  font: 800 clamp(0.8rem, 3.6vw, 1.05rem) / 1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgb(0 0 0 / 0.75) 70%, #000 85%);
  mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgb(0 0 0 / 0.75) 70%, #000 85%);
  pointer-events: none;
}

.couple {
  font-size: clamp(3.4rem, 15.5vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
  margin-top: 0.1em;
}

.couple-name {
  display: block;
}

.amp {
  display: block;
  font-style: italic;
  color: var(--terracotta-ink);
  font-size: 0.62em;
  line-height: 1;
  margin: 0.04em 0 0 0.12em;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.eyebrow-hero {
  font-size: clamp(1.1rem, 4.4vw, 1.5rem);
}

.hero-date {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-lead,
.hero-cta {
  display: none;
}

.intro-cta {
  width: 100%;
}

@media (min-width: 900px) {
  .hero {
    min-height: min(92vh, 56.25vw);
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-left: max(var(--gutter), 6vw);
  }

  .hero-img {
    position: absolute;
    inset: 0;
    margin: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero-img img {
    height: 100%;
    aspect-ratio: auto;
    object-position: 100% 50%;
  }

  .hero-copy {
    max-width: 40vw;
  }

  .couple {
    font-size: clamp(4.5rem, 7.6vw, 8.5rem);
  }

  .hero-lead {
    display: block;
    margin-top: 1.4rem;
    max-width: 30rem;
    font-size: 1.12rem;
    color: var(--ink-soft);
    text-wrap: pretty;
  }

  .hero-cta {
    display: inline-flex;
    margin-top: 1.8rem;
  }

  .intro,
  .intro-cta {
    display: none;
  }
}

/* ---------- Countdown ---------- */

.countdown {
  position: relative;
  margin-top: -52px;
  padding: 22px 18px 20px;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--paper);
  box-shadow: 0 24px 40px -24px rgb(36 63 49 / 0.75);
  text-align: center;
}

.countdown .eyebrow {
  color: var(--apricot);
  margin-bottom: 0.5rem;
}

.cd-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cd-unit + .cd-unit {
  border-left: 1px solid rgb(255 255 255 / 0.14);
}

.cd-num {
  display: inline-block;
  min-width: 2.2ch;
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
}

.cd-label {
  font-size: clamp(0.66rem, 2.6vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(244 237 225 / 0.7);
}

@media (min-width: 900px) {
  .countdown {
    margin-top: -64px;
    padding: 28px 32px;
  }
}

/* ---------- Karten ---------- */

main.wrap > * + * {
  margin-top: 18px;
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius);
  padding: clamp(22px, 5.5vw, 36px);
  box-shadow: var(--shadow);
}

.hint {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  background: color-mix(in srgb, var(--apricot) 22%, var(--card));
  color: var(--ink);
}

.hint-error {
  background: color-mix(in srgb, var(--terracotta) 18%, var(--card));
}

.empty {
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-top: 12px;
}

/* ---------- Formular ---------- */

.form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font: 500 1.05rem var(--sans);
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:focus {
  border-color: var(--green);
  outline: none;
}

.field input[aria-invalid='true'] {
  border-color: var(--terracotta-ink);
}

.form-msg:empty {
  display: none;
}

.form-msg {
  font-size: 0.93rem;
}

.form-msg.is-error {
  color: var(--terracotta-ink);
  font-weight: 600;
}

.form-msg.is-ok {
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 9%, var(--card));
  color: var(--green);
  font-weight: 500;
}

.form.is-sent .field,
.form.is-sent button {
  display: none;
}

.form .btn {
  margin-top: 4px;
}

.howto {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: howto;
  display: grid;
  gap: 12px;
}

.howto li {
  counter-increment: howto;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  color: var(--ink-soft);
}

.howto li::before {
  content: counter(howto);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--terracotta-ink);
  color: #fff;
  font: 700 0.9rem/1 var(--sans);
}

.howto strong {
  color: var(--ink);
}

/* ---------- Upload ---------- */

.upload-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 16px;
}

.my-score {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, var(--card));
}

.my-score strong {
  color: var(--ink);
}

.drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 22px;
  padding: 34px 20px 30px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgb(255 255 255 / 0.08), transparent 60%),
    var(--green);
  color: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 14px 28px -18px rgb(36 63 49 / 0.9);
  -webkit-tap-highlight-color: transparent;
}

.drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop:hover,
.drop.is-over {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 2px var(--apricot), 0 18px 30px -18px rgb(36 63 49 / 0.9);
}

.drop-stack {
  position: relative;
  width: 86px;
  height: 70px;
  margin-bottom: 12px;
}

.drop-stack i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 58px;
  margin: -29px 0 0 -24px;
  background: #fbf8f2;
  border-radius: 3px;
  box-shadow: 0 6px 12px -4px rgb(0 0 0 / 0.35);
}

.drop-stack i::after {
  content: '';
  position: absolute;
  inset: 5px 5px 14px;
  border-radius: 1px;
  background: linear-gradient(145deg, var(--apricot), var(--terracotta));
}

.drop-stack i:nth-child(1) {
  transform: rotate(-14deg) translate(-16px, 4px);
}

.drop-stack i:nth-child(1)::after {
  background: linear-gradient(145deg, #c9b58f, var(--gold));
}

.drop-stack i:nth-child(2) {
  transform: rotate(10deg) translate(16px, 2px);
}

.drop-stack i:nth-child(2)::after {
  background: linear-gradient(145deg, #7d9a86, var(--green-soft));
}

.drop-stack i:nth-child(3) {
  transform: rotate(-2deg) translateY(-4px);
}

.drop:hover .drop-stack i:nth-child(3),
.drop.is-over .drop-stack i:nth-child(3) {
  transform: rotate(-2deg) translateY(-12px);
  transition: transform 0.25s ease;
}

.drop-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.1;
  font-variation-settings: 'SOFT' 50, 'opsz' 72;
}

.drop-sub {
  font-size: 0.9rem;
  color: rgb(244 237 225 / 0.72);
}

.drop.is-compact {
  padding: 18px 20px;
  grid-template-columns: auto 1fr;
  justify-items: start;
  text-align: left;
  column-gap: 16px;
}

.drop.is-compact .drop-stack {
  grid-row: span 2;
  width: 56px;
  height: 46px;
  margin: 0;
  transform: scale(0.66);
  transform-origin: left center;
}

.drop.is-compact .drop-title {
  font-size: 1.25rem;
  align-self: end;
}

.drop.is-compact .drop-sub {
  align-self: start;
}

.queue {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}

.queue-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-soft), var(--green));
  transition: width 0.3s ease;
}

.job {
  --p: 0;
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #fff;
  padding: 4px 4px 12px;
  box-shadow: 0 4px 10px -4px rgb(60 45 25 / 0.35);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.job:nth-child(3n) {
  transform: rotate(-2deg);
}

.job:nth-child(4n) {
  transform: rotate(1.5deg);
}

.job img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-deep);
}

.job.no-preview img {
  opacity: 0;
}

.job.no-preview::before {
  content: '';
  position: absolute;
  inset: 4px 4px 12px;
  border-radius: 2px;
  background: linear-gradient(145deg, var(--apricot), var(--terracotta));
  opacity: 0.55;
}

.job::after {
  content: '';
  position: absolute;
  inset: 4px 4px 12px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.job.is-waiting::after {
  background: rgb(251 247 240 / 0.6);
}

.job.is-uploading::after {
  background: conic-gradient(rgb(36 63 49 / 0) calc(var(--p) * 360deg), rgb(251 247 240 / 0.72) 0);
}

.job.is-added::after {
  background: rgb(36 63 49 / 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 42% no-repeat;
  animation: pop 0.35s ease;
}

.job.is-duplicate {
  opacity: 0.55;
}

.job.is-failed {
  box-shadow: 0 0 0 2px var(--terracotta);
}

.job-state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  font-size: 0.7rem;
  line-height: 1.1;
  text-align: center;
  color: var(--terracotta-ink);
  font-weight: 600;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-inline: 2px;
}

.queue-errors {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--terracotta-ink);
  font-weight: 600;
}

.job.is-duplicate .job-state {
  color: var(--ink-soft);
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
}

.done {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 8px;
  margin-top: 18px;
  animation: rise 0.5s ease;
}

.done img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 30px -18px rgb(60 45 25 / 0.6);
}

.done .done-extra {
  margin: 4px 0 0;
  font-weight: 600;
  color: var(--ink-soft);
}

.done h3 {
  margin-top: 6px;
  font-size: 1.6rem;
}

.done p {
  color: var(--ink-soft);
  margin: 6px auto 16px;
  max-width: 26rem;
}

@media (min-width: 620px) {
  .done {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    gap: 24px;
    align-items: center;
  }

  .done p {
    margin-inline: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.not-me {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Nochmals senden, Kiste offen, Bestätigen ---------- */

.retry {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--terracotta) 14%, var(--card));
  display: grid;
  gap: 12px;
  justify-items: start;
  color: var(--ink);
}

.revealed h2 {
  margin-bottom: 4px;
}

.confirm-first .lead strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.confirm-first .form-msg {
  margin-top: 12px;
}

/* ---------- Kiste / Stats ---------- */

.box-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 20px;
}

.polaroids {
  position: relative;
  flex: none;
  width: 64px;
  height: 56px;
}

.polaroids i {
  position: absolute;
  inset: 6px 14px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 3px 8px -3px rgb(60 45 25 / 0.45);
}

.polaroids i::after {
  content: '';
  position: absolute;
  inset: 3px 3px 9px;
  background: linear-gradient(145deg, #e9c9a8, var(--terracotta));
  opacity: 0.8;
}

.polaroids i:nth-child(1) {
  transform: rotate(-18deg) translateX(-10px);
}

.polaroids i:nth-child(2) {
  transform: rotate(12deg) translateX(10px);
}

.polaroids i:nth-child(2)::after {
  background: linear-gradient(145deg, #a9bcae, var(--green-soft));
}

.polaroids i:nth-child(3) {
  transform: rotate(-4deg);
}

.polaroids i:nth-child(3)::after {
  background: linear-gradient(145deg, #e3d3a9, var(--gold));
}

.polaroids i:nth-child(4) {
  transform: rotate(6deg) translateY(-3px);
}

.stats-line {
  font-size: 1rem;
  color: var(--ink-soft);
}

.stats-line strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35em;
  color: var(--green);
}

/* ---------- Rangliste ---------- */

.podium,
.board {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.podium-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 60%, var(--card));
}

.podium-rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #fff;
  font-variation-settings: 'SOFT' 100, 'opsz' 72;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.12), inset 0 2px 0 rgb(255 255 255 / 0.35);
}

.medal-gold .podium-rank {
  background: radial-gradient(circle at 35% 30%, #e7cc8a, var(--gold) 60%, #8e6a33);
}

.medal-silver .podium-rank {
  background: radial-gradient(circle at 35% 30%, #e4e1da, #aaa69d 60%, #7c786f);
}

.medal-bronze .podium-rank {
  background: radial-gradient(circle at 35% 30%, #e8b48f, #b8744e 60%, #87502f);
}

.medal-gold {
  background: color-mix(in srgb, var(--gold) 13%, var(--card));
}

.podium-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
  font-variation-settings: 'SOFT' 50, 'opsz' 36;
}

.medal-gold .podium-name {
  font-size: 1.5rem;
}

.podium-count {
  display: grid;
  justify-items: end;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: lining-nums;
}

.podium-count small {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

.board {
  margin-top: 10px;
}

.board li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 16px 11px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.board li:last-child {
  border-bottom: 0;
}

.board-rank {
  text-align: center;
  font-family: var(--serif);
  color: var(--ink-soft);
}

.board-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.board-count {
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.is-me {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--terracotta) 45%, transparent);
  border-radius: 16px;
}

.you {
  display: inline-block;
  vertical-align: 0.2em;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--terracotta-ink);
  color: #fff;
  font: 700 0.68rem/1.4 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- So geht's ---------- */

.steps {
  display: grid;
  gap: 12px;
  margin-top: 36px !important;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  align-items: start;
  align-content: start;
}

.step-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--terracotta) 60%, transparent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--terracotta-ink);
}

.step h3 {
  font-size: 1.15rem;
  margin-top: 2px;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* ---------- Footer, Toast ---------- */

.foot {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 28px var(--gutter) max(env(safe-area-inset-bottom), 36px);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: grid;
  gap: 8px;
}

.foot a {
  display: inline-block;
  padding: 12px 8px;
}

.foot p:first-child {
  max-width: 30rem;
  margin-inline: auto;
  text-wrap: balance;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: max(env(safe-area-inset-bottom), 16px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 16px 30px -14px rgb(0 0 0 / 0.45);
  animation: toast-in 0.4s ease;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast-warn {
  background: var(--terracotta-ink);
}

.toast.is-gone {
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* ---------- Einfache Seiten ---------- */

.back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.92rem;
  text-decoration: none;
  font-weight: 600;
}

.prose h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem);
  margin-bottom: 14px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 24px 0 6px;
}

.prose p + p,
.prose p + form,
.prose ul + p {
  margin-top: 12px;
}

.prose ul {
  padding-left: 1.2em;
  margin: 8px 0;
}

.prose form {
  margin-top: 20px;
}

/* ---------- Galerie ---------- */

.gallery-head {
  padding-block: 36px 20px;
}

.gallery-head .couple {
  font-size: clamp(2.6rem, 9vw, 4.5rem);
}

.gallery {
  columns: 2 160px;
  column-gap: 12px;
  padding: 0 var(--gutter) 48px;
  max-width: 1400px;
  margin-inline: auto;
}

.gallery figure {
  break-inside: avoid;
  margin: 0 0 12px;
  background: #fff;
  padding: 6px 6px 0;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.gallery img {
  width: 100%;
  height: auto;
}

.gallery figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  padding: 6px 2px 8px;
  color: var(--ink-soft);
}

/* ---------- Diashow ---------- */

body.show {
  overflow: hidden;
  height: 100vh;
  background-size: 480px;
  cursor: none;
}

body.show.show-ui {
  cursor: default;
}

body.show::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgb(60 45 25 / 0.28));
  pointer-events: none;
  z-index: 2;
}

.show-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

.show-empty {
  text-align: center;
  color: var(--ink-soft);
}

.show-empty p {
  margin-top: 24px;
  font-size: 1.4rem;
}

.polaroid {
  --depth: 0;
  grid-area: 1 / 1;
  margin: 0;
  background: #fdfbf7;
  padding: 2.2vh 2.2vh 0;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08), 0 40px 70px -30px rgb(40 30 15 / 0.55);
  transform: translate(calc(var(--dx) * min(var(--depth), 1)), calc(var(--dy) * min(var(--depth), 1))) rotate(var(--tilt))
    scale(calc(1 - var(--depth) * 0.05));
  filter: brightness(calc(1 - var(--depth) * 0.06));
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 1.2s ease;
  animation: land 1.1s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.polaroid img {
  display: block;
  max-height: 72vh;
  max-width: 78vw;
  min-height: 40vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.polaroid figcaption {
  height: 10vh;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 4vh;
  color: var(--ink);
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

@keyframes land {
  from {
    opacity: 0;
    transform: translateY(-6vh) rotate(calc(var(--tilt) * -2)) scale(1.12);
  }
}

.show-brand {
  position: fixed;
  z-index: 3;
  left: 3vw;
  bottom: 3vh;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6vh;
  color: var(--green);
  opacity: 0.8;
}

.show-fs {
  position: fixed;
  z-index: 3;
  right: 3vw;
  bottom: 3vh;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background: var(--green);
  color: #fff;
  font: 600 0.9rem var(--sans);
  cursor: pointer;
}

.show-ui .show-fs {
  opacity: 1;
}

/* ---------- Admin ---------- */

.admin-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding-block: 32px 18px;
  max-width: 1200px;
}

.admin-head .couple {
  font-size: 2.2rem;
}

.admin-head .couple-name,
.admin-head .amp {
  display: inline;
}

.admin-head .amp {
  margin: 0 0.2em;
  font-size: 0.8em;
}

.admin-grid {
  max-width: 1200px;
  display: grid;
  gap: 18px;
  padding-bottom: 48px;
}

main.admin-grid > * + * {
  margin-top: 0;
}

/* Grid-Kinder dürfen schmaler werden als ihr Inhalt (breite Tabelle), sonst sprengt der Admin am Handy die Seite. */
.admin-grid > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .span-2 {
    grid-column: span 2;
  }
}

.admin h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.admin h2 small {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
  margin: 0;
}

.kpis div {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 60%, var(--card));
}

.kpis dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.kpis dd small {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.kpis dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pill-ok {
  background: color-mix(in srgb, var(--green) 14%, var(--card));
  color: var(--green);
}

.pill-warn {
  background: color-mix(in srgb, var(--apricot) 30%, var(--card));
  color: #8a4a2a;
}

.pill-muted {
  background: color-mix(in srgb, var(--ink-soft) 14%, var(--card));
  color: var(--ink-soft);
}

.pill-gold {
  background: color-mix(in srgb, var(--gold) 22%, var(--card));
  color: #6e5226;
}

.form-inline {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.form-inline h3,
.form-inline .lead,
.form-inline .form-msg {
  grid-column: 1 / -1;
}

.admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.admin-photos figure {
  margin: 0;
  background: #fff;
  padding: 6px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
}

.admin-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
}

.admin-photos figcaption {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  color: var(--ink-soft);
}

.admin-photos figcaption span {
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.photo-actions .link {
  padding: 12px 4px;
}

.admin-photos .is-hidden img {
  opacity: 0.3;
  filter: grayscale(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
