:root {
  --night: #0d1f1a;
  --pine: #14352b;
  --pine-2: #1c4a3b;
  --berry: #8e2433;
  --berry-2: #a93244;
  --gold: #e9c46a;
  --gold-soft: #f3dfa8;
  --cream: #fbf4e6;
  --muted: #c9bfa9;
  --ink: #2a1a12;
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(233, 196, 106, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(142, 36, 51, 0.35), transparent 60%),
    radial-gradient(700px 500px at 0% 90%, rgba(28, 74, 59, 0.7), transparent 60%),
    var(--night);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* ---------- fényfüzér ---------- */
.lights {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between;
  padding: 0 4vw; margin: 0; list-style: none;
  height: 54px; overflow: hidden;
}
.lights::before {
  content: ""; position: absolute; left: -5%; right: -5%; top: -36px; height: 60px;
  border-bottom: 2px solid #233a30; border-radius: 50%;
}
.lights li {
  position: relative; top: 18px;
  width: 11px; height: 18px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 4px 18px 3px var(--gold);
  animation: twinkle 2.4s infinite ease-in-out;
}
.lights li::before {
  content: ""; position: absolute; top: -6px; left: 2px; width: 7px; height: 7px; border-radius: 2px; background: #2c3f36;
}
.lights li:nth-child(3n+1) { background: #ff6b6b; box-shadow: 0 4px 18px 3px #ff6b6b; animation-delay: .4s; }
.lights li:nth-child(3n+2) { background: #7ee0a5; box-shadow: 0 4px 18px 3px #7ee0a5; animation-delay: .9s; }
.lights li:nth-child(4n)   { animation-duration: 3.1s; }
.lights li:nth-child(even) { top: 24px; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: none; } }

/* ---------- elrendezés ---------- */
main {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto; padding: 24px 20px 64px;
  text-align: center;
}

.eyebrow {
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold); margin: 12px 0 10px;
}

h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(42px, 10vw, 68px); line-height: 1.02; margin: 0 0 18px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgba(233, 196, 106, .25);
}
h1 em { color: var(--gold); font-style: italic; }

.lead { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 auto 30px; max-width: 30em; }

.tree { font-size: 54px; line-height: 1; display: inline-block; animation: sway 6s infinite ease-in-out; transform-origin: 50% 100%; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

/* ---------- kártya ---------- */
.card {
  position: relative; text-align: left;
  background: linear-gradient(180deg, rgba(251, 244, 230, .97), rgba(246, 236, 216, .97));
  color: var(--ink);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(233, 196, 106, .4);
}
.card h2 { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; color: var(--berry); text-align: center; }
.card .sub { margin: 0 0 22px; color: #6b5a4a; text-align: center; font-size: 15px; }

label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; color: #4b3a2c; }
label .opt { font-weight: 400; color: #8a7865; }
.field { margin-bottom: 16px; }

input, textarea {
  width: 100%; font: inherit; font-size: 17px;
  padding: 13px 15px; border-radius: 14px;
  border: 1.5px solid #dccbae; background: #fffdf8; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 78px; font-size: 16px; }
input:focus, textarea:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 4px rgba(142, 36, 51, .14); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border: 0; cursor: pointer;
  font: inherit; font-size: 18px; font-weight: 700;
  padding: 16px 20px; border-radius: 16px;
  color: #fff8ea; background: linear-gradient(180deg, var(--berry-2), var(--berry));
  box-shadow: 0 10px 24px -8px rgba(142, 36, 51, .8), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.gold { background: linear-gradient(180deg, #f1d27f, var(--gold)); color: var(--ink); box-shadow: 0 10px 30px -8px rgba(233, 196, 106, .7); }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; border: 1.5px solid rgba(201, 191, 169, .35); font-size: 15px; padding: 10px 14px; width: auto; }
.btn.small { font-size: 14px; padding: 8px 12px; width: auto; border-radius: 10px; }
.btn.link { background: none; box-shadow: none; color: var(--berry); text-decoration: underline; padding: 6px; width: auto; font-size: 14px; font-weight: 600; }

.error { color: #b3261e; font-size: 14px; margin: -4px 0 14px; min-height: 0; }
.error:empty { display: none; }

.done { text-align: center; }
.done .big { font-size: 56px; line-height: 1; margin-bottom: 8px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done p { color: #5b4a3a; line-height: 1.6; margin: 0 0 12px; }

.hat {
  margin: 30px auto 0; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(251, 244, 230, .07); border: 1px solid rgba(233, 196, 106, .25);
  color: var(--gold-soft); font-size: 15px;
}
.hat b { font-size: 20px; color: var(--gold); font-family: var(--serif); }

.info {
  margin: 0 auto 26px; padding: 12px 16px; max-width: 30em;
  border-radius: 14px; border: 1px dashed rgba(233, 196, 106, .45);
  color: var(--gold-soft); font-size: 15px; line-height: 1.5;
}

footer { position: relative; z-index: 1; text-align: center; color: rgba(201, 191, 169, .55); font-size: 13px; padding: 0 0 30px; }
footer a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- admin ---------- */
.admin main { max-width: 820px; }
.admin .card { text-align: left; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 18px; }
.toolbar h2 { margin: 0; text-align: left; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #efe3cb; color: #6b5a4a; white-space: nowrap; }
.pill.ok { background: #d7efdf; color: #1d6b3c; }
.pill.bad { background: #f7d9d6; color: #9b1c1c; }
.pill.wait { background: #fbefc9; color: #7a5a00; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8a7865; font-weight: 600; padding: 8px 8px; border-bottom: 1.5px solid #e6d7bb; }
td { padding: 11px 8px; border-bottom: 1px solid #efe3cb; vertical-align: middle; }
td.email { color: #6b5a4a; word-break: break-all; }
td.act { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: #8a7865; padding: 26px 0; }

.addrow { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; margin-top: 18px; }
.addrow input { font-size: 15px; padding: 10px 12px; }
.addrow .btn { font-size: 15px; padding: 10px 16px; }

.drawbox { margin-top: 22px; text-align: center; }
.drawbox p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 12px 0 0; }
.drawbox .btn.gold { max-width: 420px; font-size: 20px; padding: 18px; }

.warn { background: #fbefc9; color: #6a4e00; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }

@media (max-width: 600px) {
  .addrow { grid-template-columns: 1fr; }
  th.when, td.when { display: none; }
  .card { padding: 24px 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
