/* CoFo Raffine — variable font (enables smooth weight animation) */
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/VF/CoFoRaffine-VF-Trial.ttf') format('truetype');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

/* CoFo Raffine — static fallbacks */
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/OTF/CoFoRaffine-Thin-Trial.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/OTF/CoFoRaffine-Light-Trial.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/OTF/CoFoRaffine-Regular-Trial.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/OTF/CoFoRaffine-Medium-Trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CoFo Raffine';
  src: url('/assets/fonts/CoFoRaffine/OTF/CoFoRaffine-Bold-Trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* TRY Clother */
@font-face {
  font-family: 'TRY Clother';
  src: url('/assets/fonts/TryClother/TRYClother-Light.woff2') format('woff2'),
       url('/assets/fonts/TryClother/TRYClother-Light.woff') format('woff'),
       url('/assets/fonts/TryClother/TRYClother-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TRY Clother';
  src: url('/assets/fonts/TryClother/TRYClother-Regular.woff2') format('woff2'),
       url('/assets/fonts/TryClother/TRYClother-Regular.woff') format('woff'),
       url('/assets/fonts/TryClother/TRYClother-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TRY Clother';
  src: url('/assets/fonts/TryClother/TRYClother-Bold.woff2') format('woff2'),
       url('/assets/fonts/TryClother/TRYClother-Bold.woff') format('woff'),
       url('/assets/fonts/TryClother/TRYClother-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TRY Clother';
  src: url('/assets/fonts/TryClother/TRYClother-Black.woff2') format('woff2'),
       url('/assets/fonts/TryClother/TRYClother-Black.woff') format('woff'),
       url('/assets/fonts/TryClother/TRYClother-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Warbler Deck */
@font-face {
  font-family: 'Warbler Deck';
  src: url('/assets/fonts/Warbler/WarblerDeck-Regular-Testing-BF674fd386b2031.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Warbler Deck';
  src: url('/assets/fonts/Warbler/WarblerDeck-Italic-Testing-BF674fd386a68f7.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Warbler Deck';
  src: url('/assets/fonts/Warbler/WarblerDeck-Bold-Testing-BF674fd386a7d12.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Warbler Deck';
  src: url('/assets/fonts/Warbler/WarblerDeck-BoldItalic-Testing-BF674fd3867d306.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --color-background: #F5F0E8;
  --color-accent-green: #5A8C75;
  --color-accent-red:   #7A2E35;
  --color-silver:       #C8BEB7;

  --bg:       var(--color-background);
  --ink:      var(--color-accent-green);
  --ink-soft: #78A68B;
  --muted:    var(--color-silver);
  --gold:     var(--color-accent-red);
  --gold-soft: #9E4A51;
  --paper:    #EDE8DE;

  --serif: 'TRY Clother', 'Cormorant Garamond', "Times New Roman", serif;
  --script: 'TRY Clother', cursive;
  --sans:  'Warbler Deck', 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 800px at 50% -200px, rgba(194,154,85,0.08), transparent 60%),
    radial-gradient(1000px 700px at 80% 60%, rgba(22,80,45,0.04), transparent 60%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }

/* ---------- Decorative gold waves ---------- */
.wave {
  display: block;
  width: 100%;
  height: 110px;
  color: var(--gold);
  opacity: 0.85;
  margin: -10px 0;
}
.wave-top { margin-top: 0; }

/* ---------- Opener ---------- */
.opener {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

@media (orientation: landscape) {
  .opener {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    height: 100svh;
    padding-bottom: 5rem;
  }
  .opener-left {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 2rem 1rem 1rem 4rem;
    overflow: hidden;
  }
  .opener-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 8rem 4rem 8rem;
    overflow: hidden;
  }
}

@media (orientation: portrait) {
  .opener-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
  }
}

@media (orientation: portrait) {
  .opener {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 7rem 1rem 5rem;
    height: 100svh;
    overflow: hidden;
  }
}

/* Countdown pinned to bottom center on landscape, inline on portrait */
.opener > .countdown {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

@media (orientation: portrait) {
  .opener > .countdown {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 0.5rem;
  }
}

.opener-couple {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

/* When SVG is inlined, object-fit/position don't apply — use explicit sizing */
svg.opener-couple {
  width: 100%;
  height: auto;
}

@media (orientation: landscape) {
  .opener-couple {
    height: 75svh;
    width: auto;
    max-width: 100%;
    object-position: top left;
  }
  svg.opener-couple {
    height: 75svh;
    width: auto;
    max-width: 100%;
  }
  .opener-logo-date { max-height: 42svh; object-fit: contain; }
}

@media (orientation: portrait) {
  .opener-couple {
    max-height: 38svh;
    width: auto;
  }
  svg.opener-couple {
    max-height: 38svh;
    width: 100%;
    height: auto;
  }
}

@keyframes logoEntrance {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

.opener-logo-date {
  display: block;
  width: 100%;
  height: auto;
  animation: logoEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.opener-city {
  margin: 0;
  font-family: 'CoFo Raffine', var(--serif);
  font-weight: 1000;
  font-size: clamp(3.5rem, 10vw, 9rem);
  color: var(--color-accent-red);
  letter-spacing: -0.15em;
  text-indent: 0.18em;
  text-align: center;
  line-height: 2;
  overflow: clip visible;
  white-space: nowrap;
  padding-bottom: 0.1em;
  padding-left: 0.2em;
  padding-right: 0.2em;
}

@keyframes charRise {
  from { opacity: 0; transform: translateY(0.6em); }
  to   { opacity: 1; transform: translateY(0); }
}

.city-char {
  display: inline-block;
  animation: charRise 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .city-char { animation: none; }
}

@media (orientation: portrait) {
  .opener-logo-date { width: clamp(180px, 60vw, 300px); }
  .opener-city { font-size: clamp(2.5rem, 11vw, 4.5rem); }
}

@media (orientation: landscape) {
  .opener-logo-date { width: 100%; }
  .opener-city {
    font-size: clamp(3.1rem, 10svh, 7.5rem);
    line-height: 1;
  }
  .cd-num { font-size: clamp(1rem, 2vw, 1.6rem); }
  .cd-lbl { font-size: clamp(0.45rem, 0.8vw, 0.65rem); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(1rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 3vw, 2rem);
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  row-gap: clamp(0.25rem, 1.2vw, 0.75rem);
  justify-items: center;
}

.wave-hero {
  width: 100vw;
  justify-self: center;
  height: clamp(40px, 5vw, 70px);
  margin: clamp(-0.5rem, -1vw, -0.25rem) 0;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.9rem, 3vw, 1.8rem);
  margin: 0;
}

.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.5ch;
}

.cd-num {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-red);
}

.cd-lbl {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.6rem, 1.2vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  text-indent: 0.35em;
  color: var(--color-silver);
}

.sketch {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.sketch-church { max-width: 460px; }
.sketch-hotel  { max-width: 540px; }

.couple {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: clamp(240px, 60vw, 480px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(22, 80, 45, 0.10));
}

.date {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.55em;
  color: var(--ink);
  opacity: 0.72;
  margin: 0;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  text-indent: 0.55em;
}

/* ---------- Sections ---------- */
section {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.intro .lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 auto 2.4rem;
  max-width: 36ch;
}

.intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 1rem;
  font-style: italic;
}

.prognose {
  list-style: none;
  margin: 0 auto 2.2rem;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.9;
  color: var(--ink);
  max-width: 30ch;
}

.prognose li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 0.6rem;
}
.prognose li > span:first-child { text-align: right; color: var(--ink); }
.prognose li > span:last-child  { text-align: left;  color: var(--muted); }
.prognose li em { color: var(--gold); font-style: normal; }

.cheer {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-style: italic;
  margin: 1.5rem 0 0;
}

/* ---------- Schedule ---------- */
.schedule {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3.25rem);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  text-align: left;
  max-width: 760px;
}

.event {
  max-width: 340px;
  width: 100%;
}

.event:nth-child(odd)  { margin-left: 0;     margin-right: auto; padding-left: clamp(1rem, 6%, 4rem); }
.event:nth-child(even) { margin-left: auto;  margin-right: 0;    padding-right: clamp(1rem, 6%, 4rem); text-align: right; }

.event h3 {
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  font-style: italic;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.event .time {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.event .place {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--muted);
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
}

.event .addr {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.2rem 0 0;
  letter-spacing: 0.04em;
}

/* ---------- Hotel info block ---------- */
.hotel-info {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  color: var(--muted);
  line-height: 1.65;
  max-width: 38ch;
}
.hotel-info strong { color: var(--ink); font-weight: 600; }

/* ---------- RSVP ---------- */
.rsvp {
  background: var(--paper);
  border-top: 1px solid rgba(194,154,85,0.25);
  border-bottom: 1px solid rgba(194,154,85,0.25);
  max-width: none;
  padding: 4rem 1.5rem;
}

.rsvp h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  margin: 0 0 0.4rem;
}

.rsvp-sub {
  color: var(--muted);
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
}

#rsvpForm {
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  gap: 1.1rem;
  text-align: left;
}

#rsvpForm label > span,
#rsvpForm legend {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

#rsvpForm input[type="text"],
#rsvpForm input[type="email"],
#rsvpForm input[type="number"],
#rsvpForm textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(22,80,45,0.35);
  background: transparent;
  padding: 0.55rem 0.25rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

#rsvpForm input:focus,
#rsvpForm textarea:focus {
  border-bottom-color: var(--gold);
}

#rsvpForm textarea { resize: vertical; }

#rsvpForm fieldset.choice {
  border: none;
  padding: 0;
  margin: 0;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 1.5rem;
  font-family: var(--serif);
  color: var(--ink);
  cursor: pointer;
}

.radio input[type="radio"] { accent-color: var(--ink); }

#rsvpForm button {
  margin-top: 0.6rem;
  justify-self: start;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 0.85rem 2.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#rsvpForm button:hover { background: var(--ink-soft); transform: translateY(-1px); }
#rsvpForm button:disabled { opacity: 0.55; cursor: progress; transform: none; }

.form-status {
  font-family: var(--serif);
  font-style: italic;
  margin: 0.4rem 0 0;
  min-height: 1.2em;
  color: var(--gold);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2.5rem 1rem 3.5rem;
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
}

/* ---------- Liquid-glass language switch ---------- */
.lang-switch {
  position: fixed;
  top: max(2rem, env(safe-area-inset-top, 2rem));
  right: max(2rem, env(safe-area-inset-right, 2rem));
  z-index: 50;

  display: inline-flex;
  align-items: stretch;
  padding: 5px;
  border-radius: 999px;
  isolation: isolate;
  transition: opacity 0.26s ease-out;

  /* GlassSurface fallback (Safari / Firefox / no-backdrop-filter) */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px) saturate(1.8) brightness(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.8) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.2),
    0 2px 16px 0 rgba(31, 38, 135, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
}

/* SVG-displacement mode — class added by JS in Chrome */
.lang-switch.glass-surface--svg {
  background: transparent;
  border: none;
  box-shadow:
    0 0 2px 1px color-mix(in oklch, black, transparent 85%) inset,
    0 0 10px 4px color-mix(in oklch, black, transparent 90%) inset,
    0px 4px 16px rgba(17, 17, 26, 0.05),
    0px 8px 24px rgba(17, 17, 26, 0.05),
    0px 16px 56px rgba(17, 17, 26, 0.05),
    0px 4px 16px rgba(17, 17, 26, 0.05) inset,
    0px 8px 24px rgba(17, 17, 26, 0.05) inset,
    0px 16px 56px rgba(17, 17, 26, 0.05) inset;
}

/* The sliding "pill" that marks the active option */
.lang-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: calc(50% - 5px);
  left: 5px;
  border-radius: 999px;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.85) 0%,
      rgba(255,255,255,0.45) 60%,
      rgba(255,255,255,0.65) 100%);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 -1px 0 rgba(80,60,30,0.08) inset,
    0 4px 14px -4px rgba(22,80,45,0.30);
  transition: transform 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
  z-index: 0;
}

.lang-switch[data-lang="sr"] .lang-pill {
  transform: translateX(100%);
}

.lang-opt {
  position: relative;
  z-index: 1;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.45rem 1.05rem;
  min-width: 3.4rem;
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(22, 80, 45, 0.55);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.35s ease, transform 0.2s ease;
}

.lang-opt:hover { color: var(--ink); }
.lang-opt:active { transform: scale(0.97); }
.lang-opt.is-active { color: var(--ink); }

.lang-opt:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Reduced-motion + Safari-no-backdrop-filter fallbacks */
@media (prefers-reduced-motion: reduce) {
  .lang-pill { transition: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lang-switch {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  }
}

/* ---------- Save the Date button (fixed, bottom-right) ---------- */
.save-date-btn {
  position: fixed;
  bottom: max(3rem, env(safe-area-inset-bottom, 3rem));
  right: max(2rem, env(safe-area-inset-right, 2rem));
  z-index: 50;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  isolation: isolate;
  transition: opacity 0.26s ease-out, transform 0.2s ease;

  /* GlassSurface fallback */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px) saturate(1.8) brightness(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.8) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.2),
    0 2px 16px 0 rgba(31, 38, 135, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.2);
}

@media (orientation: portrait) {
  .save-date-btn {
    bottom: auto;
    right: auto;
    top: max(2rem, env(safe-area-inset-top, 2rem));
    left: max(2rem, env(safe-area-inset-left, 2rem));
  }
}

.save-date-btn:hover  { opacity: 0.82; }
.save-date-btn:active { transform: scale(0.97); }

.save-date-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.save-date-btn.glass-surface--svg {
  background: transparent;
  border: none;
  box-shadow:
    0 0 2px 1px color-mix(in oklch, black, transparent 85%) inset,
    0 0 10px 4px color-mix(in oklch, black, transparent 90%) inset,
    0px 4px 16px rgba(17, 17, 26, 0.05),
    0px 8px 24px rgba(17, 17, 26, 0.05),
    0px 16px 56px rgba(17, 17, 26, 0.05),
    0px 4px 16px rgba(17, 17, 26, 0.05) inset,
    0px 8px 24px rgba(17, 17, 26, 0.05) inset,
    0px 16px 56px rgba(17, 17, 26, 0.05) inset;
}

.save-date-line1 {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink);
  line-height: 1.3;
  text-transform: uppercase;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .save-date-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
  }
}

/* ---------- Toggle switch ---------- */
.toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 2.6rem;
  height: 1.4rem;
  background: var(--muted);
  border-radius: 999px;
  transition: background 0.22s ease;
}

.toggle input:checked ~ .toggle-track {
  background: var(--ink);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.4rem - 4px);
  height: calc(1.4rem - 4px);
  background: white;
  border-radius: 50%;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(1.2rem);
}

/* ---------- Allergy row & field ---------- */
.allergy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.allergy-row > span {
  font-size: 0.9rem;
  color: var(--ink);
}

.allergy-field {
  width: 100%;
  border: 1px solid var(--muted);
  border-radius: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  background: rgba(0,0,0,0.03);
  color: var(--ink);
  resize: none;
  margin-bottom: 0.25rem;
  outline: none;
  transition: border-color 0.18s;
}

.allergy-field:focus {
  border-color: var(--ink);
}

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

/* ---------- Companions ---------- */
.companions-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--muted);
}

.companions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.companions-title {
  font-size: 0.95rem;
}

.companion-controls {
  display: flex;
  gap: 0.4rem;
}

.companion-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
  padding: 0;
}

.companion-btn:hover:not(:disabled) {
  background: var(--ink);
  color: white;
}

.companion-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.companion-card {
  background: rgba(0,0,0,0.025);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(0,0,0,0.07);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .hero { padding-top: 4rem; }       /* leave room for the language pill */
  .sketch-church, .sketch-hotel { max-width: 100%; }
  .prognose { font-size: 1.05rem; max-width: 26ch; }
  .prognose li { gap: 0.5rem; }
  .event:nth-child(odd)  { padding-left: 1.25rem; }
  .event:nth-child(even) { padding-right: 1.25rem; }
  .radio { display: flex; margin: 0 0 0.4rem; }
  .lang-switch { padding: 4px; }
  .lang-opt { padding: 0.4rem 0.85rem; min-width: 3rem; font-size: 0.85rem; }
}

@media (max-width: 380px) {
  .schedule { gap: 1.75rem; }
  .event h3 { font-size: 1.85rem; }
  .event .time { font-size: 1.5rem; }
  .countdown { gap: 0.6rem; }
  .cd-lbl { letter-spacing: 0.2em; }
}
