/* =====================================================================
   Bence & Hani – esküvői oldal
   Hani terve alapján: borvörös háttér, fehér csipke, kártyalap-motívum.
   ===================================================================== */
:root {
  --wine: #6A1235;
  --wine-deep: #4F0C27;
  --wine-soft: #8E3A5A;
  --paper: #FFFFFF;
  --lace: #F3EEF0;
  --ink: #3A0A1D;
  --muted: #7E5B69;
  --line: #E7D7DE;
  --ok: #2F6B4A;
  --danger: #A3253F;

  --f-display: 'Antonio', 'Arial Narrow', sans-serif;
  --f-body: 'Cormorant Garamond', Georgia, serif;
  --f-index: 'Bodoni Moda', Didot, Georgia, serif;

  --radius: 22px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wine);
  /* finom csipkeháló-textúra a háttéren */
  background-image:
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px);
  background-size: 9px 9px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 1.55;
}

main {
  width: min(100% - 2 * var(--gutter), 620px);
  margin-inline: auto;
  padding-block: 20px 8px;
  display: grid;
  gap: 28px;
}

a { color: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------- Nyitó kártya ---------------- */
.hero { display: grid; justify-items: center; gap: 14px; }
.hero-card {
  container-type: inline-size;
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1241 / 1748;
  background: url('../img/hero-card.jpg?v=3') center / contain no-repeat;   /* Hani kártyája, szöveggel együtt */
}

.scroll-hint {
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .2em;
  font-size: 14px; color: #fff; text-decoration: none; opacity: .8;
}
.scroll-hint:hover { opacity: 1; }

/* ---------------- Kártyák (szekciók) ---------------- */
.card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 44px clamp(22px, 6vw, 48px) 40px;
  box-shadow: 0 0 0 6px var(--lace), 0 0 0 7px rgba(255,255,255,.5), 0 16px 32px rgba(0,0,0,.22);
  scroll-margin-top: 20px;
}
/* „öltés” – pöttyözött belső keret, mint a csipke szélén */
.card { outline: 2px dotted rgba(106,18,53,.28); outline-offset: -10px; }
/* kártyalap-sarkok a szekció színével: bal felül, és jobb alul fejjel lefelé, mint a francia kártyán */
.card::before, .card::after {
  content: attr(data-suit);
  position: absolute; top: 16px; left: 20px;
  font-size: 20px; line-height: 1; color: var(--wine); pointer-events: none;
}
.card::before { top: auto; left: auto; bottom: 16px; right: 20px; transform: rotate(180deg); }
.card > :last-child { margin-bottom: 0; }

h2, h3 {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  color: var(--wine); letter-spacing: .02em; line-height: 1.1;
}
h2 { font-size: clamp(30px, 8vw, 40px); text-align: center; margin: 0 0 22px; }
h3 { font-size: 21px; margin: 26px 0 8px; letter-spacing: .06em; }

p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.link { color: var(--wine); font-weight: 600; text-underline-offset: 3px; }

/* Meghívó szöveg */
.quote {
  margin: 0 0 26px; text-align: center; font-style: italic;
  font-size: clamp(22px, 5.6vw, 27px); line-height: 1.35; color: var(--wine);
}
.quote::before, .quote::after { content: '♥'; display: block; font-style: normal; font-size: 14px; margin: 8px 0; opacity: .6; }
.lead { text-align: center; font-size: 21px; }
.lead a { text-decoration-color: rgba(106,18,53,.35); text-underline-offset: 3px; }
.big {
  display: inline-block; margin: 6px 0; font-family: var(--f-display); font-weight: 400;
  text-transform: uppercase; font-size: clamp(26px, 7vw, 34px); color: var(--wine); line-height: 1.1;
}
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0;
  border-block: 1px solid var(--line); padding-block: 14px; text-align: center;
}
.fact-label { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-family: var(--f-display); }
.fact-value { display: block; font-family: var(--f-display); font-size: 28px; color: var(--wine); line-height: 1.2; }
.address { text-align: center; }
.deadline { text-align: center; }
#meghivo { text-align: center; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.subtitle { text-align: center; color: var(--muted); font-style: italic; margin: -14px 0 22px; }
.inline-link { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.hint { display: block; margin-top: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }

/* Zárás + fotó */
.closing-text {
  text-align: center; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(26px, 7vw, 34px); line-height: 1.15; color: var(--wine); margin-bottom: 24px;
}
.closing-text .heart { display: inline-block; font-size: .8em; }
.photo-frame {
  margin: 0 auto; width: min(100%, 420px); padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 0 0 5px var(--lace), 0 0 0 6px rgba(106,18,53,.18), 0 10px 22px rgba(0,0,0,.15);
}
.photo-frame img { display: block; width: 100%; height: auto; border-radius: 6px; }

/* Gomb */
.btn {
  display: block; width: 100%; max-width: 340px; margin: 22px auto 0;
  border: 0; border-radius: 999px; padding: 14px 24px; min-height: 52px;
  background: var(--wine); color: #fff; text-align: center; text-decoration: none;
  font-family: var(--f-display); font-size: 20px; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--wine-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .linkbtn:focus-visible, a:focus-visible {
  outline: 3px solid var(--wine-soft); outline-offset: 2px;
}
.btn-ghost { background: transparent; color: var(--wine); box-shadow: inset 0 0 0 2px var(--wine); }
.btn-ghost:hover { background: var(--lace); }

/* ---------------- Űrlap ---------------- */
.state[hidden] { display: none; }
.greeting { font-family: var(--f-display); text-transform: uppercase; font-size: 26px; color: var(--wine); text-align: center; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend {
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .08em;
  color: var(--wine); font-size: 19px; margin-bottom: 8px; padding: 0;
}
.choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; line-height: 1.35;
  transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--wine-soft); }
.choice:has(input:checked) { border-color: var(--wine); background: #FBF5F7; }
.choice input { accent-color: var(--wine); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span { font-size: 17px; }
.field small { color: var(--muted); }
.field.indent { margin: 4px 0 12px 32px; }
input:not([type=radio]), textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink);
  padding: 12px 14px; border: 1px solid #D6BFC9; border-radius: 12px; background: #fff;
}
textarea { resize: vertical; min-height: 84px; }
#codeInput {
  font-family: var(--f-display); font-size: 30px; letter-spacing: .35em; text-align: center; text-transform: uppercase;
}
.error { color: var(--danger); min-height: 1em; margin: 6px 0 0; font-size: 17px; }
.error:empty { display: none; }
.summary { padding-left: 1.1em; margin: 0 0 8px; }
.summary li { margin-bottom: 4px; }
.switch { text-align: center; font-size: 16px; color: var(--muted); margin: 26px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--wine); text-decoration: underline; cursor: pointer; }

/* ---------------- Menetrend ---------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 66px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 7px 0; align-items: baseline; position: relative; }
.timeline li::after {
  content: '♥'; position: absolute; left: 61px; top: 11px; font-size: 11px; color: var(--wine); background: #fff; line-height: 1;
}
.timeline time { font-family: var(--f-display); font-size: 22px; color: var(--wine); text-align: right; }

/* ---------------- Menü ---------------- */
#menu h3 { text-align: center; }
#menu h3:first-of-type { margin-top: 0; }
.menu { list-style: none; padding: 0; margin: 0 0 6px; text-align: center; }
.menu li { padding: 3px 0; }
.veg {
  display: inline-block; font-size: 12px; font-family: var(--f-display); text-decoration: none;
  border: 1px solid var(--ok); color: var(--ok); border-radius: 50%; width: 20px; height: 20px; line-height: 18px;
  text-align: center; vertical-align: 2px;
}

/* ---------------- Közlemények ---------------- */
.notes { padding-left: 1.3em; margin: 0; }
.notes li { margin-bottom: 14px; padding-left: 4px; }
.notes li::marker { font-family: var(--f-display); color: var(--wine); }
.notes strong { color: var(--wine); }

/* ---------------- Lábléc ---------------- */
.footer { text-align: center; color: rgba(255,255,255,.85); padding: 26px var(--gutter) calc(30px + env(safe-area-inset-bottom)); font-size: 16px; }
.footer p { margin: 0; }
.footer-mark { font-family: var(--f-index); font-size: 28px; letter-spacing: .2em; color: #fff; }

/* ---------------- Asztali nézet ---------------- */
@media (min-width: 760px) {
  body { font-size: 20px; }
  main { padding-top: 40px; gap: 40px; }
}
#codeInput::placeholder { letter-spacing: .12em; font-size: 22px; color: #C9AAB7; }

/* +1 saját meghívója */
.companion { margin: 22px 0 6px; padding: 18px; border-radius: 14px; background: #FBF5F7; border: 1px dashed var(--wine-soft); }
.companion p { margin-bottom: 10px; }
.companion-code { font-family: var(--f-display); font-size: 22px; color: var(--wine); text-align: center; }
.companion-code b { letter-spacing: .25em; font-weight: 600; }
.companion-actions { display: grid; gap: 10px; }
.companion-actions .btn { margin-top: 0; }

/* Menü: egyértelmű „megnézem” gomb a részvételnél + vissza a visszajelzéshez a desszert után */
.menu-jump {
  display: inline-block; margin: 6px 0 0; padding: 4px 12px; border-radius: 999px;
  font-family: var(--f-display); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: #fff; background: var(--wine); white-space: nowrap;
}
.menu-jump:hover { background: var(--wine-deep); }
.menu-back { margin-top: 26px; text-align: center; }
.menu-back[hidden] { display: none; }
.btn-back-rsvp { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: 19px; line-height: 1.3; font-weight: 600; max-width: 420px; padding: 14px 22px; }

/* ---------- Esküvő napja / utána (élő rész, assets/js/live/live.js) ---------- */
.live-card { text-align: center; }
.live-title { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--wine); font-size: clamp(26px, 7vw, 34px); margin: 4px 0 10px; }
.live-lead { font-size: 20px; margin: 0 0 18px; }
.live-empty { color: var(--muted); font-style: italic; font-size: 18px; margin: 0; }
.live-preview { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 20px; background: var(--lace); color: var(--muted); font-family: var(--f-display); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.live-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 16px; border: 1px solid var(--line); background: #FDF8FA; color: var(--wine); text-decoration: none; font-family: var(--f-display); letter-spacing: .03em; }
.live-icon { font-size: 28px; }
.live-back { text-align: left; margin: 0 0 6px; }
.live-back a { color: var(--wine-soft); }
/* Asztalom + beszélgetésindító */
.table-label { margin: 6px 0 0; color: var(--muted); font-size: 18px; }
.table-name { margin: 0 0 8px; font-family: var(--f-display); text-transform: uppercase; color: var(--wine); font-size: clamp(30px, 9vw, 42px); letter-spacing: .03em; }
.table-mates { margin: 0 0 18px; font-size: 18px; }
.ice { border-top: 1px solid var(--line); padding-top: 16px; }
.ice-intro { margin: 0 0 12px; font-size: 18px; }
.ice-card { position: relative; margin: 0 auto 14px; max-width: 340px; padding: 26px 22px 18px; border-radius: 16px; background: #FDF8FA; border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(79,12,39,.12); }
.ice-suit { position: absolute; top: 10px; left: 14px; color: var(--wine); font-size: 18px; }
.ice-who { margin: 0 0 6px; font-size: 18px; }
.ice-fact { margin: 0; font-size: 21px; font-style: italic; color: var(--ink); }
.ice-ask { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.ice-flip { animation: ice-flip .5s ease-out; }
@keyframes ice-flip { from { transform: rotateY(90deg) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ice-flip { animation: none; } }
/* Üzenet nekünk */
.msg-lead { font-size: 19px; }
.msg-form { display: flex; flex-direction: column; gap: 10px; }
.msg-text { width: 100%; font: inherit; font-size: 19px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #FDF8FA; color: var(--ink); resize: vertical; }
.msg-or { margin: 14px 0 8px; color: var(--muted); font-style: italic; }
.msg-rec.recording { background: var(--danger); }
.msg-timer { margin: 10px 0 0; color: var(--danger); font-family: var(--f-display); letter-spacing: .04em; }
.msg-preview audio { width: 100%; margin-top: 12px; }
.msg-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.msg-status { min-height: 1.4em; margin: 12px 0 0; color: var(--danger); }
.msg-status.ok { color: var(--ok); }
.msg-sent { text-align: left; margin-top: 10px; }
.msg-sent-title { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-size: 14px; margin: 8px 0 6px; }
.msg-list { margin: 0; padding-left: 1.2em; font-size: 17px; }
.msg-list li { margin-bottom: 4px; overflow-wrap: anywhere; }
/* Fotókihívások */
.ch-progress { margin: 0 0 16px; }
.ch-bar { height: 10px; border-radius: 10px; background: var(--lace); overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--wine-soft), var(--wine)); border-radius: 10px; transition: width .6s ease-out; }
.ch-count { margin: 8px 0 0; font-size: 19px; }
.ch-deadline { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.ch-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.ch-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.ch-tick { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; font-weight: 700; margin-top: 2px; }
.ch-item.done .ch-tick { background: var(--ok); border-color: var(--ok); }
.ch-main { flex: 1; min-width: 0; }
.ch-title { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); }
.ch-desc { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.ch-shoot { margin-top: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer; }
.ch-shoot.busy { opacity: .55; pointer-events: none; }
.ch-status { margin: 6px 0 0; color: var(--danger); font-size: 15px; }
.ch-status:empty { display: none; }
.ch-thumb { flex: 0 0 72px; height: 72px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--lace); }
.ch-thumb img, .ct-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Közönségdíj */
.ct-mine { margin-bottom: 18px; }
.ct-form { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.ct-pick { cursor: pointer; }
.ct-picked { margin: 0; color: var(--ok); overflow-wrap: anywhere; }
.ct-note { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.ct-card { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #FDF8FA; }
.ct-card.mine { max-width: 260px; margin: 0 auto 10px; }
.ct-card.winner { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(106,18,53,.25); }
.ct-crown { position: absolute; top: 6px; left: 8px; font-size: 26px; z-index: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.ct-img { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--lace); cursor: zoom-in; }
.ct-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 15px; }
.ct-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-like { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--wine); border-radius: 20px; padding: 4px 10px; font: inherit; font-size: 15px; cursor: pointer; }
.ct-like.on { background: var(--wine); color: #fff; border-color: var(--wine); }
.ct-like[disabled] { cursor: default; opacity: .8; }
.live-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(20,4,10,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.live-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; object-fit: contain; }
.live-lightbox p { color: #fff; margin: 10px 0 0; font-size: 18px; text-align: center; }
.live-lightbox button { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
