:root {
  color-scheme: light;
  --pine: #174438;
  --pine-deep: #0d332d;
  --pine-soft: #e8f0e9;
  --cranberry: #b74443;
  --cranberry-dark: #963737;
  --gold: #c99c58;
  --paper: #fbf8f0;
  --ink: #1e302b;
  --muted: #718078;
  --line: #e7e5db;
  --white: #fffefa;
  --shadow: 0 22px 60px rgba(21, 53, 43, .11);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
body::before, body::after { content: ''; position: fixed; z-index: 5; inset: -20vh 0 0; pointer-events: none; opacity: .45; background-image: radial-gradient(2px 2px at 25px 35px, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 85px 90px, #fff 99%, transparent), radial-gradient(2px 2px at 160px 45px, #fff 99%, transparent), radial-gradient(1px 1px at 235px 125px, #fff 99%, transparent); background-size: 260px 180px; animation: snowfall 24s linear infinite; }
body::after { opacity: .24; background-size: 190px 230px; animation-duration: 36s; animation-direction: reverse; transform: scale(1.25); }
@keyframes snowfall { to { background-position: 0 100vh; } }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, .button { border: 0; cursor: pointer; }
.site-header { position: relative; z-index: 8; display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: auto; padding: 24px 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--pine); font-weight: 700; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff8e8; background: var(--pine); box-shadow: 0 5px 14px #17443830; }
.brand-mark svg { width: 22px; height: 22px; }
.header-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: .91rem; }
.header-links a { text-decoration: none; }
.header-links a:hover { color: var(--pine); }
.mini-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #e7e4da; border-radius: 999px; background: #fffdf6; font-size: .8rem; color: #53645c; }
.mini-pill .dot { width: 7px; height: 7px; background: #6a9a72; border-radius: 50%; box-shadow: 0 0 0 3px #6a9a7222; }
.hero { max-width: 1240px; min-height: 540px; margin: 0 auto; padding: 24px 34px 74px; display: grid; grid-template-columns: 1.02fr .98fr; gap: 45px; align-items: center; }
.hero-copy { max-width: 540px; padding: 30px 0 28px 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; color: var(--cranberry); font-size: .77rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, .serif { font-family: Georgia, 'Times New Roman', serif; }
h1 { max-width: 560px; margin: 0 0 20px; color: var(--pine-deep); font-size: clamp(3rem, 5.6vw, 5.1rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 600; }
h1 em { color: var(--cranberry); font-style: normal; }
.hero-copy > p { max-width: 460px; margin-bottom: 29px; color: #6c7870; font-size: 1.05rem; line-height: 1.75; }
.hero-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fffaf0; background: var(--pine); box-shadow: 0 9px 18px #17443826; }
.button-primary:hover { background: var(--pine-deep); box-shadow: 0 12px 23px #17443836; }
.button-secondary { color: var(--pine); background: #fffefa; border: 1px solid #e4e4d9; }
.button-danger { color: #fff8f1; background: var(--cranberry); }
.button-small { min-height: 39px; padding: 0 14px; border-radius: 9px; font-size: .88rem; }
.hero-visual { position: relative; min-width: 0; }
.hero-visual img { display: block; width: 100%; max-width: 620px; margin-left: auto; border-radius: 32px; filter: drop-shadow(0 22px 28px rgba(15, 55, 45, .12)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px); } }
.floating-note { position: absolute; right: -15px; bottom: 35px; display: flex; align-items: center; gap: 12px; padding: 14px 17px; border: 1px solid #eee9dc; border-radius: 16px; background: #fffefa; box-shadow: 0 15px 40px #193c3020; animation: float 6s ease-in-out infinite reverse; }
.floating-note-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--cranberry); background: #f9ece6; font-size: 1.2rem; }
.floating-note strong, .floating-note span { display: block; }
.floating-note strong { margin-bottom: 2px; font-size: .85rem; }
.floating-note span { color: var(--muted); font-size: .73rem; }
.deadline-strip { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: 1125px; margin: -14px auto 72px; padding: 22px 27px; border-radius: 17px; color: #fdf6e8; background: var(--pine); box-shadow: 0 17px 34px #16443721; }
.deadline-label { display: flex; align-items: center; gap: 13px; }
.deadline-label .calendar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #f8e8c8; background: #ffffff16; font-size: 1.2rem; }
.deadline-label strong { display: block; margin-bottom: 3px; font-size: .91rem; }
.deadline-label span { color: #d5e0d8; font-size: .82rem; }
.countdown { display: flex; align-items: center; gap: 9px; }
.count-unit { min-width: 57px; text-align: center; }
.count-unit strong { display: block; color: #f8dfb0; font-size: 1.38rem; font-variant-numeric: tabular-nums; }
.count-unit span { color: #c8d8ce; font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; }
.count-colon { margin-top: -11px; color: #a7b8aa; }
.section { max-width: 1125px; margin: 0 auto 86px; padding: 0 20px; }
.section-heading { max-width: 650px; margin: 0 auto 34px; text-align: center; }
.section-heading h2 { margin-bottom: 11px; color: var(--pine-deep); font-size: clamp(2rem, 3vw, 2.6rem); }
.section-heading p { color: var(--muted); line-height: 1.7; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.step-card { padding: 25px; border: 1px solid #eeece3; border-radius: 17px; background: #fffefa; box-shadow: 0 7px 23px #183b3009; }
.step-number { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 20px; border-radius: 12px; color: var(--cranberry); background: #f8ede7; font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; }
.step-card h3 { margin-bottom: 8px; color: var(--pine); font-size: 1.03rem; }
.step-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.auth-shell { position: relative; z-index: 6; width: min(100% - 36px, 465px); margin: 25px auto 84px; padding: 35px; border: 1px solid #ece9df; border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.auth-shell h1 { margin-bottom: 8px; font-size: 2.2rem; }
.auth-shell > p { color: var(--muted); line-height: 1.6; }
.field { margin: 19px 0; }
.field label { display: block; margin-bottom: 8px; color: #354a40; font-size: .85rem; font-weight: 700; }
.field input, .field textarea { display: block; width: 100%; border: 1px solid #dedfd5; border-radius: 10px; background: #fff; color: var(--ink); outline: none; transition: border .16s, box-shadow .16s; }
.field input { height: 47px; padding: 0 13px; }
.field textarea { min-height: 220px; padding: 14px; resize: vertical; line-height: 1.65; }
.field input:focus, .field textarea:focus { border-color: #4c8169; box-shadow: 0 0 0 3px #2d70531a; }
.auth-shell .button { width: 100%; }
.form-hint { margin: 9px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.notice { position: relative; z-index: 7; max-width: 900px; margin: 16px auto; padding: 13px 16px; border: 1px solid #cfe1d2; border-radius: 11px; color: #225337; background: #eef7ef; font-size: .9rem; }
.notice-error { border-color: #edcbc4; color: #8c332d; background: #fff1ed; }
.notice-info { border-color: #d9e5df; color: #31594a; background: #f0f5f0; }
.notice-warning { border-color: #efdfbd; color: #775720; background: #fff8e9; }
.dashboard-wrap { position: relative; z-index: 6; max-width: 1120px; margin: 22px auto 85px; padding: 0 22px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dashboard-head h1 { margin-bottom: 7px; font-size: clamp(2.25rem, 4vw, 3.2rem); }
.dashboard-head p { margin: 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); gap: 20px; align-items: start; }
.panel { padding: 27px; border: 1px solid #ece9df; border-radius: 18px; background: var(--white); box-shadow: 0 9px 28px #193b300b; }
.panel h2 { margin-bottom: 8px; color: var(--pine); font-size: 1.35rem; }
.panel-intro { margin: 0 0 18px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.save-status { min-height: 22px; margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.save-status.is-saved { color: #317044; }
.save-status.is-error { color: var(--cranberry); }
.recipient-card { overflow: hidden; border: 1px solid #e6eade; border-radius: 16px; background: #f5f7ef; }
.recipient-top { padding: 21px 22px; color: #f9f3e6; background: var(--pine); }
.recipient-top small { display: block; margin-bottom: 8px; color: #d7e1d8; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.recipient-top h2 { margin: 0; color: #fff9ed; font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; }
.recipient-list { padding: 21px 22px; }
.recipient-list h3 { margin-bottom: 12px; color: var(--pine); font-size: .92rem; }
.wishlist-copy { white-space: pre-wrap; overflow-wrap: anywhere; color: #45554d; font-size: .94rem; line-height: 1.8; }
.recipient-empty { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.admin-top { color: #fff8ec; background: var(--pine-deep); }
.admin-top .brand { color: #fff8ec; }
.admin-top .header-links { color: #d1ddd4; }
.admin-top .brand-mark { color: var(--pine); background: #f3dcae; }
.admin-heading { max-width: 1120px; margin: 26px auto 20px; padding: 0 22px; display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.admin-heading h1 { margin-bottom: 7px; font-size: 2.7rem; }
.admin-heading p { margin: 0; color: var(--muted); }
.admin-grid { max-width: 1120px; margin: 0 auto 72px; padding: 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.admin-grid .panel { padding: 24px; }
.admin-wide { grid-column: 1 / -1; }
.admin-form-row { display: flex; align-items: end; gap: 12px; }
.admin-form-row .field { flex: 1; margin: 13px 0 0; }
.admin-form-row .button { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
.participants-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
.participants-table th, .participants-table td { padding: 12px 10px; border-bottom: 1px solid #ecebe4; white-space: nowrap; }
.participants-table th { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.participants-table td:first-child { color: var(--gold); font-weight: 700; }
.status-tag { display: inline-block; padding: 5px 8px; border-radius: 999px; color: #496355; background: #edf3eb; font-size: .72rem; }
.status-tag.pending { color: #876335; background: #fbf2df; }
.draw-box { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 21px; border: 1px dashed #d9dfd1; border-radius: 14px; background: #f6f8f1; }
.draw-box p { max-width: 650px; margin: 0; color: #647168; font-size: .87rem; line-height: 1.65; }
.draw-box strong { color: var(--pine); }
.reset-row { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding-top: 17px; border-top: 1px solid var(--line); }
.reset-row p { max-width: 620px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.footer { position: relative; z-index: 6; padding: 20px; border-top: 1px solid #eae8df; color: #849087; text-align: center; font-size: .78rem; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--pine); }
.muted { color: var(--muted); }
.text-link { display: inline-block; margin-top: 18px; color: var(--pine); font-size: .88rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.empty-state { padding: 17px; border: 1px dashed #d7ded5; border-radius: 12px; color: var(--muted); background: #f7f8f3; font-size: .9rem; line-height: 1.65; }
.footer-logout { display: inline; }
.footer-logout button { padding: 0; color: inherit; background: none; text-decoration: underline; }
.admin-notice { margin: 0 0 18px; }
.admin-meta { opacity: .65; font-weight: 500; }
.reset-spaced { margin-top: 19px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 14px; padding-top: 15px; }
  .hero-copy { max-width: 670px; padding: 25px 0 0; }
  .hero-visual img { max-width: 600px; margin: 0 auto; }
  .floating-note { right: 4px; bottom: 16px; }
  .deadline-strip { margin: 0 20px 62px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { padding: 18px 20px; }
  .header-links { gap: 10px; font-size: .83rem; }
  .header-links .admin-link { display: none; }
  .hero { padding: 7px 21px 50px; }
  h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .hero-copy > p { font-size: .96rem; }
  .hero-visual img { border-radius: 24px; }
  .floating-note { right: -2px; padding: 10px 12px; }
  .deadline-strip { margin: 0 14px 57px; padding: 17px 15px; align-items: flex-start; flex-direction: column; gap: 15px; }
  .countdown { width: 100%; justify-content: center; }
  .count-unit { min-width: 48px; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 0 17px; }
  .auth-shell { padding: 25px 21px; }
  .dashboard-wrap { padding: 0 15px; }
  .dashboard-head, .admin-heading { align-items: flex-start; flex-direction: column; }
  .panel { padding: 21px 18px; }
  .admin-grid { grid-template-columns: 1fr; padding: 0 15px; }
  .admin-wide { grid-column: auto; }
  .admin-form-row { align-items: stretch; flex-direction: column; }
  .draw-box, .reset-row { align-items: flex-start; flex-direction: column; }
  .draw-box .button, .reset-row .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
