:root {
  color-scheme: light;
  --page: #f8f5ed;
  --paper: #fffcf5;
  --ink: #213c33;
  --muted: #555e51;
  --forest: #1d4939;
  --forest-deep: #153c2f;
  --pale: #ebece0;
  --line: #e1dbcd;
  --berry: #8b2a37;
  --berry-wash: #f5e6e5;
  --cream: #fff4da;
  --display: Georgia, 'Times New Roman', serif;
  --body: 'Segoe UI', system-ui, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 22px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font-family: var(--body); line-height: 1.55; }
::selection { background: #ead3ce; color: #422126; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 4px; }
a { color: inherit; text-underline-offset: .24em; }
button, input { font: inherit; }
button { cursor: pointer; }
p, h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: 2.28rem; }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.container { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }

.masthead { border-bottom: 1px solid var(--line); }
.nav-row { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark, nav { display: flex; align-items: center; gap: 12px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: var(--forest); color: var(--cream); }
.brand-mark .icon { width: 23px; height: 23px; }
nav { gap: 20px; }
.nav-link { font-size: .9rem; font-weight: 600; text-decoration: none; }
.nav-link:hover, .back-link:hover { color: var(--berry); }

.button { min-height: 48px; padding: 10px 19px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; font-size: .94rem; font-weight: 650; line-height: 1.2; transition: background-color .16s, border-color .16s, color .16s; }
.button .icon { width: 18px; height: 18px; }
.button-small { min-height: 40px; padding: 8px 14px; font-size: .875rem; }
.button-primary { color: #fffdf4; background: var(--forest); }
.button-primary:hover { background: var(--forest-deep); }
.button-outline { border-color: #d2d7c8; color: var(--forest-deep); background: transparent; }
.button-outline:hover { border-color: #9aab9d; background: var(--pale); }
.button-cream { color: #1c392e; background: var(--cream); }
.button-cream:hover { background: #fffaf0; }
.button-text { padding-inline: 4px; color: var(--forest-deep); background: transparent; text-decoration: underline; }
.button-text:hover { color: var(--berry); }
.button-danger { color: #fff; background: var(--berry); }
.button-danger:hover { background: #70222d; }
.button:disabled { opacity: .55; cursor: not-allowed; }

.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 446px; margin-top: 32px; background: #152419; color: var(--cream); border-radius: var(--radius); }
.hero-slides { position: absolute; z-index: -2; inset: 0 0 0 24%; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; object-fit: cover; object-position: center 49%; filter: brightness(1.13); transition: opacity .85s ease; }
.hero-slide.is-active { opacity: 1; }
.hero::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #152419 15%, #152419eb 26%, #152419a6 43%, #15241940 61%, transparent 84%); pointer-events: none; }
.hero-snow { position: absolute; z-index: 0; inset: 0; container-type: size; pointer-events: none; }
.hero-flake { position: absolute; top: -22px; left: var(--left); width: var(--size); height: var(--size); color: #fff8e7; stroke-width: 1.35; filter: drop-shadow(0 1px 3px #15241980); animation: hero-fall var(--duration) linear var(--delay) infinite; }
.hero-flake:nth-child(1) { --left: 12%; --size: 10px; --duration: 16s; --delay: -6s; --drift: 18px; --alpha: .38; }
.hero-flake:nth-child(2) { --left: 27%; --size: 14px; --duration: 19s; --delay: -14s; --drift: -20px; --alpha: .44; }
.hero-flake:nth-child(3) { --left: 40%; --size: 9px; --duration: 13s; --delay: -9s; --drift: 26px; --alpha: .48; }
.hero-flake:nth-child(4) { --left: 55%; --size: 18px; --duration: 18s; --delay: -5s; --drift: -18px; --alpha: .65; }
.hero-flake:nth-child(5) { --left: 68%; --size: 12px; --duration: 14s; --delay: -11s; --drift: 20px; --alpha: .54; }
.hero-flake:nth-child(6) { --left: 80%; --size: 15px; --duration: 17s; --delay: -8s; --drift: 26px; --alpha: .59; }
.hero-flake:nth-child(7) { --left: 93%; --size: 8px; --duration: 12s; --delay: -3s; --drift: -22px; --alpha: .47; }
.hero[data-motion-paused] .hero-flake { animation-play-state: paused; }
@keyframes hero-fall {
  from { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  14%, 86% { opacity: var(--alpha); }
  to {
    transform: translate3d(var(--drift), 520px, 0) rotate(160deg);
    transform: translate3d(var(--drift), calc(100cqh + 42px), 0) rotate(160deg);
    opacity: 0;
  }
}
.hero-inner { position: relative; z-index: 1; width: 60%; padding: 43px 0 49px clamp(34px, 6vw, 86px); }
.hero h1, .hero p { text-shadow: 0 2px 5px #0b160dbf, 0 3px 18px #0b160d9e; }
.hero h1 { font-size: clamp(4rem, 5.9vw, 5.05rem); line-height: .96; font-weight: 500; letter-spacing: -.04em; }
.hero h1 em { color: #f4d29b; font-weight: 400; }
.hero p { margin-top: 25px; color: #eee9d6; font-size: 1.08rem; line-height: 1.55; }
.hero .button { margin-top: 25px; }
.hero :focus-visible { outline-color: #f4d29b; }
.hero-controls { position: absolute; z-index: 2; right: 19px; bottom: 17px; display: flex; align-items: center; gap: 4px; padding: 3px 5px; border: 1px solid #fff4da47; border-radius: 24px; background: #152419ec; }
.hero-dots { display: flex; }
.hero-controls button { display: grid; place-items: center; width: 27px; height: 32px; padding: 0; border: 0; border-radius: 100%; background: transparent; color: var(--cream); }
.hero-controls button:hover { background: #fff4da24; }
.hero-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff4da8a; }
.hero-dot[aria-current='true']::before { background: var(--cream); }
.hero-controls .hero-toggle { width: 32px; }
.hero-toggle .icon { width: 18px; height: 18px; stroke-width: 2; }

.home-content { display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(300px, .9fr); gap: clamp(32px, 7.2vw, 104px); padding-block: 43px 47px; }
.guide { scroll-margin-top: 16px; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; }
.steps li { min-height: 68px; display: flex; align-items: center; gap: 15px; padding: 11px 0; }
.steps li + li { border-top: 1px solid var(--line); }
.step-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; color: var(--forest); background: var(--pale); }
.step-mark .icon { width: 20px; height: 20px; }
.steps h3 { font-size: .99rem; line-height: 1.4; font-weight: 700; }
.steps p { color: var(--muted); margin-top: 2px; }
.access-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.access-card { align-self: start; padding: 27px 26px 24px; }
.title-with-icon { display: flex; align-items: center; gap: 11px; }
.title-with-icon h2 { text-wrap: initial; }
.title-with-icon .icon { width: 25px; height: 25px; color: var(--berry); }
.access-card h2 { font-size: 2rem; }
.access-card > p { margin-top: 13px; color: var(--muted); }
.access-card .button { width: 100%; margin-top: 21px; }
.access-card .access-note { text-align: center; font-size: .84rem; margin-top: 11px; }
.access-note:empty { display: none; }

.subpage { padding-block: 36px 58px; min-height: 62vh; }
.subhead { margin-bottom: 28px; }
.back-link { font-size: .875rem; font-weight: 600; }
.subhead h1 { margin-top: 16px; font-size: 3.4rem; }
.subhead p { margin-top: 9px; color: var(--muted); }
.panel { padding: 24px; }
.panel h2 { font-size: 1.93rem; }
.recipient { width: min(100%, 530px); padding: 32px; }
.recipient p, .draw p { margin-top: 12px; color: var(--muted); }
.recipient .button, .draw .button { margin-top: 20px; }
.recipient-name { font-family: var(--display); font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.1; color: var(--berry); margin-top: 15px; overflow-wrap: anywhere; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.section-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.section-heading h2 { text-wrap: initial; }
.muted { color: var(--muted); }
.section-heading p { margin-top: 5px; }
.account-form, .invite-box { margin-top: 20px; padding: 18px; background: #f2efe4; border-radius: 9px; display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: .93rem; }
.field input { border-radius: 7px; border: 1px solid #bfc5b7; min-height: 44px; padding: 7px 11px; width: 100%; color: var(--ink); background: var(--paper); caret-color: var(--berry); }
.form-actions { display: flex; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.empty { color: var(--muted); margin-top: 18px; }
.roster-list { margin: 17px 0 0; padding: 0; list-style: none; }
.roster-list:empty { display: none; }
.roster-list li { border-top: 1px solid var(--line); padding-block: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.roster-list strong, .roster-list small { display: block; overflow-wrap: anywhere; }
.roster-list small { color: var(--muted); font-size: .875rem; }
.roster-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.roster-actions .button { min-height: 36px; }
.delete-account { color: var(--berry); flex: none; padding-inline: 10px; }
.delete-account:hover { background: var(--berry-wash); border-color: #e0b5b7; }
.feedback { color: var(--forest-deep); font-size: .92rem; margin-top: 12px; }
.feedback.error { color: var(--berry); }
.sharing { margin: 24px 0 0; padding: 19px 0 0; border-top: 1px solid var(--line); }
.sharing h2 { font-family: var(--body); font-size: 1rem; letter-spacing: 0; font-weight: 700; }
.sharing p { margin-top: 7px; color: var(--muted); }
.sharing .button { margin-top: 4px; }
dialog { width: min(450px, calc(100% - 36px)); padding: 25px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); }
dialog::backdrop { background: #152e26a8; }
dialog h2 { font-size: 1.82rem; }
dialog p { margin-top: 12px; overflow-wrap: anywhere; }
dialog .form-actions { margin-top: 22px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer span { display: flex; align-items: center; gap: 8px; }
.footer .icon { width: 16px; height: 16px; color: var(--berry); }
#admin-signin { margin-top: 12px; }

@media (max-width: 920px) {
  .container { width: calc(100% - 64px); }
  .hero { min-height: 395px; }
  .hero h1 { font-size: clamp(3.125rem, 7.3vw, 4.175rem); }
  .home-content { gap: 32px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  .nav-row { min-height: 64px; gap: 7px; }
  nav { gap: 7px; }
  .nav-link { display: none; }
  .wordmark { gap: 7px; font-size: 1.06rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  nav .button { padding-inline: 8px; }
  nav .button .icon { display: none; }
  .hero { align-items: end; min-height: 480px; margin-top: 19px; }
  .hero-slides { inset: 0 0 auto; height: clamp(185px, 61vw, 310px); mask-image: linear-gradient(#000 72%, transparent); }
  .hero::after { background: linear-gradient(0deg, #152419 25%, transparent 57%); }
  .hero-flake:nth-child(6), .hero-flake:nth-child(7) { display: none; }
  .hero-controls { top: 12px; right: 12px; bottom: auto; }
  .hero-inner { width: 100%; padding: 135px 23px 28px; }
  .hero h1 { font-size: clamp(2.125rem, 10.3vw, 3.7rem); }
  .hero p { margin-top: 17px; font-size: 1rem; }
  .hero .button { margin-top: 18px; }
  .wide-break { display: none; }
  .home-content { grid-template-columns: minmax(0, 1fr); gap: 27px; padding-block: 28px 32px; }
  .access-card { grid-row: 1; padding: 22px; }
  .guide h2 { font-size: 2rem; }
  .admin-grid { grid-template-columns: 1fr; gap: 17px; }
  .subpage { padding-block: 24px 34px; }
  .subhead h1 { font-size: 2.75rem; }
  .panel { padding: 19px; }
}

@media (max-width: 365px) {
  .container { width: calc(100% - 28px); }
  .section-heading { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .hero-slide { transition: none; }
  .hero-snow { display: none; }
}
