/* WichtelLotse: festlich, aber ruhig. Nachthimmel, Gold, ein Hauch Seefahrt. */

/* ------------------------------------------------------------ Schriften (lokal, OFL) */
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/nunito-var.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/nunito-var-ext.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/assets/fonts/playfair-italic-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/assets/fonts/playfair-italic-var-ext.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cinzel';
  src: url('/assets/fonts/cinzel-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel Decorative';
  src: url('/assets/fonts/cinzel-decorative-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------ Grundwerte */
:root {
  --night-950: #050d18;
  --night-900: #08152a;
  --night-800: #0b1a2e;
  --night-700: #13294b;
  --cream: #fbf3e2;
  --cream-dim: #d8ccb4;
  --gold-200: #fff1b8;
  --gold-300: #f6e08f;
  --gold-400: #ecc659;
  --gold-500: #d4a62a;
  --gold-600: #a97d14;
  --gold-700: #7a560a;
  --ink: #3b2504;
  --ink-soft: #5c3d0c;
  --paper-ink: #2a1c06;
  --paper-muted: #5a4a2c;
  --red: #c8323a;
  --red-dark: #8e1f26;
  --pine: #2f7a5a;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-label: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-title: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-script: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-900);
  color: var(--cream);
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

a {
  color: var(--gold-300);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gold-400);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--gold-300);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ Himmel und Schnee */
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 650px at 85% -10%, rgba(255, 214, 120, 0.1), transparent 60%),
    radial-gradient(900px 600px at 5% 0%, rgba(80, 130, 210, 0.16), transparent 60%),
    linear-gradient(180deg, #0b1a2e 0%, #0d2140 50%, #07132a 100%);
}

.sky::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1.2px 1.2px at 24px 38px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 132px 88px, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 220px 160px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70px 230px, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 280px 260px, #fff 50%, transparent 51%),
    radial-gradient(0.9px 0.9px at 180px 20px, #fff 50%, transparent 51%);
  background-size: 320px 320px;
}

.snow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.snow::before,
.snow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  will-change: transform;
}

.snow::before {
  top: -260px;
  opacity: 0.55;
  background-image:
    radial-gradient(2px 2px at 30px 40px, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 150px 110px, #fff 50%, transparent 52%),
    radial-gradient(2.2px 2.2px at 210px 200px, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 90px 170px, #fff 50%, transparent 52%);
  background-size: 260px 260px;
  animation: snow-a 34s linear infinite;
}

.snow::after {
  top: -420px;
  opacity: 0.4;
  filter: blur(0.6px);
  background-image:
    radial-gradient(3px 3px at 60px 80px, #fff 50%, transparent 52%),
    radial-gradient(2.6px 2.6px at 300px 250px, #fff 50%, transparent 52%),
    radial-gradient(3.2px 3.2px at 180px 360px, #fff 50%, transparent 52%);
  background-size: 420px 420px;
  animation: snow-b 56s linear infinite;
}

@keyframes snow-a {
  to { transform: translate3d(0, 260px, 0); }
}

@keyframes snow-b {
  to { transform: translate3d(0, 420px, 0); }
}

/* ------------------------------------------------------------ Kopf und Fuß */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 43px;
  flex: none;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand-name span {
  color: var(--gold-400);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(236, 198, 89, 0.45);
  color: var(--cream);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.lang-switch:hover {
  background: rgba(236, 198, 89, 0.12);
}

.site-footer {
  margin-top: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(236, 198, 89, 0.18);
  color: var(--cream-dim);
  text-align: center;
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-bottom: 6px;
}

.site-footer a {
  display: inline-block;
  padding: 8px 2px;
  color: var(--cream);
}

.site-footer p {
  margin: 0;
}

/* ------------------------------------------------------------ Knöpfe */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font: 800 1rem/1.2 var(--font-body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn[disabled] {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}

.btn-gold {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe9a6 0%, #f0c654 48%, #d29f27 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(120, 80, 0, 0.35),
    0 10px 24px rgba(212, 166, 42, 0.25);
}

.btn-gold:hover {
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 0 rgba(120, 80, 0, 0.35),
    0 14px 30px rgba(212, 166, 42, 0.35);
}

.btn-ghost {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px rgba(236, 198, 89, 0.55);
}

.btn-ghost:hover {
  background: rgba(236, 198, 89, 0.14);
}

.btn-big {
  width: 100%;
  min-height: 58px;
  padding: 14px 28px;
  font-size: 1.12rem;
}

.btn-small {
  min-height: 44px;
  padding: 8px 15px;
  font-size: 0.95rem;
}

.btn-plain {
  color: var(--night-700);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #d8c59a;
}

.btn-link {
  min-height: 44px;
  margin-top: 6px;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--cream-dim);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ------------------------------------------------------------ Startbereich */
.hero {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 0 0 36px;
}

.hero-art {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

.hero-art svg {
  width: 100%;
  height: auto;
  /* Meer und Lichtkegel laufen weich in den Himmel aus, statt an der Bildkante zu enden. */
  -webkit-mask-image: radial-gradient(72% 78% at 52% 40%, #000 62%, transparent 100%);
  mask-image: radial-gradient(72% 78% at 52% 40%, #000 62%, transparent 100%);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--gold-400);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.08;
}

.hero h1 em {
  display: block;
  margin-top: 0.15em;
  color: var(--gold-300);
  font-family: var(--font-script);
  font-weight: 600;
  font-style: italic;
}

.lead {
  max-width: 34em;
  margin: 0;
  color: var(--cream-dim);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6rem 0 1.1rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.hero-facts li::before {
  content: '✦';
  margin-right: 6px;
  color: var(--gold-400);
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
    padding: 28px 0 64px;
  }
}

@media (max-width: 859px) {
  .hero-art {
    order: -1;
    max-width: 420px;
  }
}

/* Leuchtturm-Szene */
.scene .beam {
  transform-box: view-box;
  transform-origin: 338px 121px;
  animation: beam 10s ease-in-out infinite alternate;
}

.scene .lamp-glow {
  animation: glow 4s ease-in-out infinite alternate;
}

.scene .bulb {
  animation: twinkle 3.4s ease-in-out infinite;
}

.scene .bulb.b1 {
  animation-delay: -1.1s;
}

.scene .bulb.b2 {
  animation-delay: -2.3s;
}

.scene .tw {
  animation: twinkle 5s ease-in-out infinite;
}

.scene .shimmer {
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes beam {
  from { transform: rotate(-4deg); }
  to { transform: rotate(5deg); }
}

@keyframes glow {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ------------------------------------------------------------ Werkstatt (Pergament) */
.werkstatt {
  padding: 16px 0 56px;
  scroll-margin-top: 16px;
}

.paper {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: 30px 18px 26px;
  border-radius: 22px;
  color: var(--paper-ink);
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(255, 255, 255, 0.7), transparent 70%),
    linear-gradient(180deg, #fdf8ec 0%, #f5e9cf 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  color-scheme: light;
}

.paper::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1.5px dashed rgba(169, 125, 20, 0.45);
  border-radius: 15px;
  pointer-events: none;
}

.paper a:not(.btn) {
  color: var(--red-dark);
}

.paper-title {
  margin: 0 0 0.3rem;
  color: var(--night-700);
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 6vw, 2.2rem);
  line-height: 1.15;
  text-align: center;
}

.paper-lead {
  margin: 0 auto 1.6rem;
  max-width: 30em;
  color: var(--paper-muted);
  text-align: center;
}

@media (min-width: 640px) {
  .paper {
    padding: 44px 52px 36px;
  }
}

.step {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.step legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 0;
  color: var(--night-700);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.15rem;
}

.step-no {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff1b8, #e0b23f 55%, #a97d14);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-family: var(--font-label);
  font-weight: 800;
  font-size: 1rem;
}

.optional {
  color: #8a7a5a;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.hint {
  margin: 0 0 12px;
  color: var(--paper-muted);
  font-size: 0.97rem;
}

.paper input[type='text'],
.paper input[type='date'],
.paper select,
.paper textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid #d8c59a;
  border-radius: 12px;
  background: #fffdf7;
  color: #1d1405;
  font: inherit;
}

.paper select {
  padding-right: 34px;
}

.paper textarea {
  resize: vertical;
  min-height: 84px;
}

.paper input::placeholder,
.paper textarea::placeholder {
  color: #9a8a6a;
  opacity: 1;
}

.paper input:focus,
.paper select:focus,
.paper textarea:focus {
  border-color: var(--gold-600);
  outline: 3px solid rgba(212, 166, 42, 0.35);
  outline-offset: 0;
}

.paper :disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.add-row {
  display: flex;
  gap: 8px;
}

.add-row .btn {
  flex: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
  padding: 0;
  list-style: none;
}

.chips:empty {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 4px 4px 14px;
  border-radius: 999px;
  background: var(--night-700);
  color: var(--cream);
  font-weight: 700;
}

.chip.is-paired {
  box-shadow: inset 0 0 0 2px var(--gold-500);
}

.chip-pair {
  background: var(--red-dark);
}

.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.chip-remove:hover {
  background: rgba(200, 50, 58, 0.9);
}

.count {
  margin: 4px 0 0;
  color: #8a6a2a;
  font-weight: 800;
  font-size: 0.95rem;
}

.count.is-ready {
  color: var(--pine);
}

.field-error {
  margin: 8px 0 0;
  color: #a1232b;
  font-weight: 800;
  font-size: 0.95rem;
}

.pair-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.pair-row .and {
  color: #8a6a2a;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.1rem;
}

.pair-row .btn {
  grid-column: 1 / -1;
}

@media (max-width: 479px) {
  .pair-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pair-row .and {
    text-align: center;
  }

  .pair-row .btn {
    margin-top: 6px;
  }
}

@media (min-width: 640px) {
  .pair-row {
    grid-template-columns: 1fr auto 1fr auto;
  }

  .pair-row .btn {
    grid-column: auto;
  }
}

.fields {
  display: grid;
  gap: 14px;
}

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

  .field-wide {
    grid-column: 1 / -1;
  }
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: var(--night-700);
  font-weight: 800;
  font-size: 0.97rem;
}

.counter {
  display: block;
  margin-top: 2px;
  color: #8a7a5a;
  font-size: 0.85rem;
  text-align: right;
}

.choices {
  display: grid;
  gap: 10px;
}

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

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
}

.choice-card {
  position: relative;
  display: block;
  height: 100%;
  padding: 14px 16px 14px 50px;
  border: 2px solid #e2d3ae;
  border-radius: 14px;
  background: #fffdf7;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.choice-card::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 22px;
  height: 22px;
  border: 2px solid #b8a578;
  border-radius: 50%;
  background: #fff;
}

.choice input:checked + .choice-card {
  border-color: var(--gold-500);
  background: #fff6da;
  box-shadow: 0 0 0 3px rgba(212, 166, 42, 0.22);
}

.choice input:checked + .choice-card::before {
  border-color: var(--gold-600);
  background: radial-gradient(circle, var(--gold-600) 0 42%, #fff 46%);
}

.choice input:focus-visible + .choice-card {
  outline: 3px solid var(--gold-600);
  outline-offset: 2px;
}

.choice-title {
  display: block;
  color: var(--night-700);
  font-weight: 800;
}

.choice-text {
  display: block;
  color: var(--paper-muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fde8e8;
  color: var(--red-dark);
  font-weight: 800;
}

.fine {
  margin: 12px 0 0;
  color: #7a6a4a;
  font-size: 0.9rem;
  text-align: center;
}

/* Ergebnis: Versandliste */
.result-head {
  text-align: center;
}

.result-seal {
  width: 86px;
  height: 86px;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
}

.result-code {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 8px;
  background: var(--night-700);
  color: var(--gold-300);
  font-family: var(--font-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.progress-wrap {
  margin: 18px 0 6px;
}

.progress-wrap p {
  margin: 0 0 6px;
  color: var(--paper-muted);
  font-weight: 800;
  text-align: center;
}

.is-done .progress-wrap p {
  color: var(--pine);
}

progress {
  display: block;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #eadfc4;
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eadfc4;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a62a, #f0c654);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a62a, #f0c654);
}

.send-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.send-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'name status'
    'actions actions';
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid #e2d3ae;
  border-radius: 14px;
  background: #fffdf7;
}

@media (min-width: 640px) {
  .send-item {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: 'name status actions';
  }
}

.send-item.is-sent {
  border-color: #a9d8bb;
  background: #f1f8f2;
}

@media (max-width: 479px) {
  .paper {
    padding-inline: 14px;
  }

  .send-item {
    padding: 12px;
  }

  .send-actions .btn {
    flex: 1 1 0;
    padding-inline: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
}

.send-name {
  grid-area: name;
  color: var(--night-700);
  font-weight: 800;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.send-status {
  grid-area: status;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-weight: 800;
  font-size: 0.9rem;
}

.send-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-wa {
  color: #fff;
  background: #17784f;
}

.btn-wa:hover {
  background: #116241;
}

.btn-copy {
  color: var(--cream);
  background: var(--night-700);
}

.btn-copy:hover {
  background: #0c1d38;
}

.tips {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--night-700);
  color: var(--cream);
}

.tips h3 {
  margin: 0 0 6px;
  color: var(--gold-300);
  font-family: var(--font-label);
  font-size: 1rem;
}

.tips ul {
  margin: 0;
  padding-left: 1.1em;
}

.tips li + li {
  margin-top: 4px;
}

.result-actions {
  display: flex;
  justify-content: center;
}

/* ------------------------------------------------------------ So funktioniert's und Fragen */
.section-title {
  margin: 0 0 28px;
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 5.5vw, 2.3rem);
  line-height: 1.15;
  text-align: center;
}

.how {
  padding: 48px 0 24px;
}

.how-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .how-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .how-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.how-steps li {
  padding: 22px;
  border: 1px solid rgba(236, 198, 89, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.how-icon {
  display: block;
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}

.how-steps h3 {
  margin: 0 0 6px;
  color: var(--gold-300);
  font-family: var(--font-label);
  font-size: 1.1rem;
}

.how-steps p {
  margin: 0;
  color: var(--cream-dim);
}

.faq {
  max-width: 820px;
  margin-inline: auto;
  padding: 48px 0 40px;
}

.faq details {
  border-bottom: 1px solid rgba(236, 198, 89, 0.22);
}

.faq summary {
  position: relative;
  padding: 16px 44px 16px 0;
  font-weight: 800;
  font-size: 1.07rem;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: var(--gold-400);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details p {
  margin: 0 0 18px;
  color: var(--cream-dim);
}

/* ------------------------------------------------------------ Ansichten */
.view-ticket {
  display: none;
}

html.is-ticket .view-ticket {
  display: block;
}

html.is-ticket .view-werkstatt {
  display: none;
}

.ticket-stage {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 0 24px;
  text-align: center;
}

.demo-badge {
  display: inline-block;
  margin: 4px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--gold-400);
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Briefumschlag mit Siegel */
.envelope {
  position: relative;
  max-width: 520px;
  margin: 28px auto 26px;
  padding: 172px 22px 30px;
  border-radius: 18px;
  color: var(--paper-ink);
  background: linear-gradient(180deg, #fdf8ec 0%, #efdfb9 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.envelope::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 124px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #f8efd9 0%, #eadab2 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
}

.envelope::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(to top right, transparent 49.6%, rgba(160, 120, 40, 0.18) 50%, transparent 50.4%) left bottom / 50% 60% no-repeat,
    linear-gradient(to top left, transparent 49.6%, rgba(160, 120, 40, 0.18) 50%, transparent 50.4%) right bottom / 50% 60% no-repeat;
  pointer-events: none;
}

.envelope .seal {
  position: absolute;
  top: 124px;
  left: 50%;
  z-index: 1;
  width: 98px;
  height: 98px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.35));
}

.seal-kicker {
  position: relative;
  margin: 0;
  color: #7a5f2a;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.seal-name {
  position: relative;
  margin: 2px 0 4px;
  color: var(--night-700);
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.seal-occasion {
  position: relative;
  margin: 0;
  color: var(--paper-muted);
  font-weight: 700;
}

.seal-actions {
  max-width: 520px;
  margin: 0 auto;
}

.not-me-note {
  max-width: 520px;
  margin: 10px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(200, 50, 58, 0.55);
  border-radius: 14px;
  background: rgba(200, 50, 58, 0.18);
}

.seal-step.is-breaking .seal {
  animation: seal-break 0.65s ease-in forwards;
}

.seal-step.is-breaking .envelope::before {
  animation: flap-open 0.65s ease-in forwards;
}

@keyframes seal-break {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  35% { transform: translate(-50%, -50%) scale(1.12) rotate(-8deg); }
  100% { transform: translate(-50%, -50%) scale(0.5) rotate(24deg); opacity: 0; }
}

@keyframes flap-open {
  to { transform: scaleY(-1); opacity: 0.5; }
}

/* Goldenes Ticket */
.ticket-heading {
  margin: 10px 0 22px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
}

.ticket-heading:focus {
  outline: none;
}

.ticket-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.55));
}

.golden-ticket {
  --notch: 17px;
  position: relative;
  padding: 13px 25px;
  border-radius: 12px;
  color: var(--ink);
  text-align: center;
  /* Mattes Goldpapier statt Hochglanz: wenige, weiche Farbstufen, keine Streifen. */
  background:
    radial-gradient(140% 120% at 20% 0%, rgba(255, 250, 225, 0.35), transparent 55%),
    linear-gradient(115deg, #c39a3c 0%, #e6c873 28%, #f1d998 50%, #ddb862 74%, #bf9437 100%);
  -webkit-mask:
    radial-gradient(circle at 0 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle at 0 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent var(--notch), #000 calc(var(--notch) + 0.5px)) right / 51% 100% no-repeat;
  overflow: hidden;
}

.gt-frame {
  position: relative;
  padding: 14px 16px 16px;
  border: 2px solid rgba(92, 61, 12, 0.8);
  border-radius: 6px;
}

.gt-frame::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(92, 61, 12, 0.5);
  border-radius: 3px;
  pointer-events: none;
}

.gt-code {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(0.62rem, 2.2vw, 0.74rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gt-title {
  margin: 4px 0 2px;
  color: #4a2f05;
  font-family: var(--font-label);
  font-weight: 800;
  font-size: clamp(1.25rem, 5.4vw, 2rem);
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.gt-greeting {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(0.82rem, 3vw, 1rem);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.gt-scratch {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(68px, 17vw, 92px);
  max-width: 460px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(255, 250, 225, 0.55);
  box-shadow: inset 0 2px 6px rgba(90, 60, 0, 0.35);
  overflow: hidden;
}

.gt-name {
  max-width: 100%;
  margin: 0;
  padding: 0 14px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 1.2;
  white-space: nowrap;
}

.gt-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;
  cursor: grab;
  transition: opacity 0.8s ease;
}

.gt-cover:active {
  cursor: grabbing;
}

.gt-cover.is-gone {
  opacity: 0;
  pointer-events: none;
}

.gt-facts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 4px 0 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(122, 86, 10, 0.45);
}

.gt-facts div {
  min-width: 90px;
}

.gt-facts dt {
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gt-facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 600;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.gt-message {
  max-width: 32em;
  margin: 8px auto 0;
  color: #4a3208;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.gt-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.gt-shine::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: shine 11s ease-in-out 1.2s infinite;
}

@keyframes shine {
  0% { transform: translateX(-160%) skewX(-18deg); }
  28%, 100% { transform: translateX(420%) skewX(-18deg); }
}

.ticket-sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d1 0 30%, #ffd76a 32% 60%, transparent 62%);
  opacity: 0;
  animation: spark 1.1s ease-out var(--delay, 0ms) forwards;
}

@keyframes spark {
  0% { opacity: 1; transform: translate(0, 0) scale(0.5); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

.countdown {
  margin: 24px 0 6px;
  color: var(--gold-300);
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.25rem;
}

.ticket-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}

.ticket-error .seal {
  width: 110px;
  height: 110px;
  margin: 24px auto 8px;
}

.ticket-error h1 {
  margin: 0 0 8px;
  font-family: var(--font-label);
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.ticket-error p {
  max-width: 30em;
  margin: 0 auto;
  color: var(--cream-dim);
}

.ticket-cta {
  margin: 40px 0 0;
  text-align: center;
}

.ticket-cta p {
  margin: 0 0 10px;
  color: var(--cream-dim);
}

/* ------------------------------------------------------------ Hinweise und Dialog */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  border: 1px solid rgba(236, 198, 89, 0.5);
  border-radius: 14px;
  background: var(--night-700);
  color: var(--cream);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

dialog {
  max-width: min(92vw, 470px);
  padding: 26px 22px 22px;
  border: 0;
  border-radius: 20px;
  background: #fdf8ec;
  color: var(--paper-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  color-scheme: light;
}

dialog::backdrop {
  background: rgba(4, 10, 20, 0.72);
}

dialog h2 {
  margin: 0 0 10px;
  color: var(--night-700);
  font-family: var(--font-label);
  font-size: 1.3rem;
}

dialog p {
  margin: 0 0 10px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.noscript {
  max-width: 760px;
  margin: 16px auto;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--red-dark);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

/* ------------------------------------------------------------ Rechtstexte */
.legal {
  max-width: 760px;
  margin: 8px auto 40px;
}

.legal h1 {
  margin: 8px 0 6px;
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 6vw, 2.4rem);
}

.legal h2 {
  margin: 28px 0 6px;
  color: var(--gold-300);
  font-family: var(--font-label);
  font-size: 1.15rem;
}

.legal p,
.legal li {
  color: var(--cream-dim);
}

.legal .stand {
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.legal .back {
  display: inline-block;
  margin-top: 28px;
}

/* ------------------------------------------------------------ Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .snow {
    display: none;
  }
}
