:root {
  color-scheme: light;
  --paper: #f9f5ed;
  --white: #fffdf8;
  --forest: #17382e;
  --ink: #202d25;
  --muted: #556358;
  --gold: #e4b76a;
  --wine: #8d2837;
  --line: #ded9cc;
  --shadow: 0 16px 42px #31261810;
  font-family: system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #245640; text-underline-offset: .2em; }
a:hover { color: var(--wine); }
:focus-visible { outline: 3px solid #976029; outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -6rem; padding: .8rem; background: white; z-index: 5; }
.skip:focus { top: 1rem; }
h1, h2, h3 { font-family: Georgia, serif; font-weight: 500; line-height: 1.1; margin: 0 0 .65rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.65rem, 6vw, 5.5rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -.035em; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; line-height: 1.55; overflow-wrap: anywhere; }
small { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { width: min(calc(100% - 2rem), 76rem); margin: auto; padding: .75rem 0; display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.2rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--forest); font: 1.25rem Georgia, serif; }
.brand-icon { background: var(--forest); color: var(--gold); padding: .38rem .55rem; border-radius: .55rem; }
nav, .header-actions { display: flex; align-items: center; gap: .25rem .75rem; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; }
.language { display: flex; padding: .15rem; border: 1px solid var(--line); border-radius: .7rem; }
.language button { background: transparent; color: var(--forest); border: 0; border-radius: .5rem; min-height: 42px; font: inherit; font-size: .87rem; padding: .25rem .55rem; cursor: pointer; }
.language button[aria-pressed=true] { background: var(--forest); color: white; }
.shell { flex: 1; width: min(calc(100% - 2rem), 76rem); margin: 0 auto; padding: clamp(1.55rem, 5vw, 4rem) 0; }
.site-footer { border-top: 1px solid var(--line); text-align: center; padding: 1.3rem; color: var(--muted); }
.site-footer span { color: var(--wine); }
.welcome { display: grid; gap: 1rem; align-items: stretch; }
.holiday, .dashboard-hero { position: relative; overflow: hidden; border-radius: 1.3rem; background: radial-gradient(ellipse at 92% 34%, #3b6450, transparent 63%), var(--forest); color: #fffbef; isolation: isolate; }
.holiday { min-height: 24rem; display: grid; align-items: end; padding: clamp(1.5rem, 5vw, 3.5rem); }
.holiday-copy { z-index: 1; position: relative; max-width: 30rem; }
.holiday-copy > p:not(.eyebrow) { max-width: 20rem; color: #eff0e5; }
.eyebrow { color: var(--wine); font-size: .82rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem; }
.holiday .eyebrow, .dashboard-hero .eyebrow { color: #f5ca83; }
.holiday-art { position: absolute; top: 0; right: 0; width: 16rem; height: 15rem; opacity: .9; transform-origin: top right; transform: scale(.76); }
.parcel { position: absolute; border-radius: .2rem; box-shadow: 0 15px 24px #1119; }
.parcel::before, .parcel::after { content: ''; position: absolute; }
.parcel::before { inset: 0 42%; background: #e2ad61; }
.parcel::after { width: 56%; height: 27%; border: .26rem solid #f3c883; border-bottom-width: .45rem; border-radius: 80% 80% 48% 48%; left: 22%; top: -27%; transform: rotate(-8deg); }
.parcel-back { width: 7rem; height: 6.6rem; top: 4.1rem; right: 2.2rem; transform: rotate(16deg); background: repeating-linear-gradient(45deg,#c2944b 0 1px,#efd39c 1px 12px); }
.parcel-back::before { background: #8d2837; }
.parcel-front { width: 7.75rem; height: 5.6rem; top: 7.3rem; right: 5rem; transform: rotate(-13deg); background: repeating-linear-gradient(130deg,#7c2535 0 3px,#a53a4a 3px 12px); }
.star { position: absolute; color: #f5d28d; }
.star.one { top: .7rem; left: 5rem; font-size: 2.2rem; }
.star.two { top: 2rem; right: .8rem; font-size: 1.5rem; }
.star.three { bottom: .4rem; right: 2.1rem; }
.star.four { bottom: 1rem; left: 1rem; font-size: 1.25rem; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 1.05rem; padding: clamp(1rem, 3vw, 1.9rem); min-width: 0; box-shadow: var(--shadow); }
.access { padding: clamp(1.25rem, 4vw, 2.5rem); align-content: center; }
.access > p, .intro > p, .section-head p, .exchange-card > p { color: var(--muted); }
.access-alternate { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stack { display: grid; gap: .9rem; align-content: start; }
.narrow { max-width: 33rem; }
label { display: grid; gap: .35rem; min-width: 0; font-weight: 650; }
input:not([type=checkbox]), select { width: 100%; min-height: 46px; border: 1px solid #a8ad9f; border-radius: .5rem; padding: .55rem .75rem; font: inherit; color: var(--ink); background: white; }
input[type=checkbox] { accent-color: var(--forest); width: 1.15rem; height: 1.15rem; flex: none; }
.check { display: flex; min-height: 44px; align-items: center; gap: .5rem; font-weight: 500; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; }
legend { font-weight: 700; }
.button { color: white; background: var(--forest); min-height: 46px; border: 1px solid transparent; border-radius: .55rem; padding: .62rem .95rem; font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.button:hover { background: #245640; color: white; }
.button.secondary { background: #eef2e9; color: var(--forest); border-color: #cbd6c9; }
.button.secondary:hover, .button.plain:hover { background: #e0e8dc; color: var(--forest); }
.button.plain { background: transparent; color: var(--forest); padding-inline: .55rem; }
.button.danger { background: var(--wine); }
.button, .language button { transition: background-color .18s ease; }
.stack > .button { justify-self: start; }
.access .stack > .button { justify-self: stretch; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; padding: clamp(1.5rem, 5vw, 3.3rem); margin-bottom: 1.4rem; }
.hero-star { position: absolute; color: #e4b76a43; right: 4%; font-size: clamp(5rem, 19vw, 13rem); z-index: -1; }
.intro { margin-bottom: 1.45rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem),1fr)); }
.section { margin-block: 1.55rem; }
.section-head, .browse-cta, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; }
.section-head, .browse-cta { justify-content: space-between; margin-bottom: 1rem; }
.section-head p, .browse-cta p { margin-bottom: 0; }
.card-icon { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .6rem; background: #f2e5cf; color: var(--wine); margin-bottom: .8rem; }
.exchange-card .recipient { color: var(--forest); font-weight: 750; }
details { border-top: 1px solid var(--line); margin-top: .65rem; }
summary { cursor: pointer; padding: .85rem .15rem; line-height: 1.4; }
summary:hover { color: var(--wine); }
details form + form { margin-top: .7rem; }
.private { margin-top: 1.2rem; padding: 1rem; background: #f5ead8; border-radius: .5rem; }
.error h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
code { overflow-wrap: anywhere; }
@media (min-width: 49rem) {
  .welcome { grid-template-columns: 1.35fr 1fr; gap: 1.35rem; }
  .holiday { min-height: 35rem; }
  .holiday-art { transform: scale(1.22); }
}
@media (max-width: 34rem) {
  .header-inner { align-items: flex-start; }
  nav:not(:empty) { order: 3; width: 100%; }
  .welcome h1 { max-width: 11ch; }
  .header-actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .button, .skip { display: none !important; }
  .shell { width: 100%; padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
.notice { border: 1px solid #a7bba6; border-radius: .55rem; background: #edf3e8; color: var(--forest); padding: .65rem 1rem; }
.projection .site-header { display: none; }

[hidden] { display: none !important; }
.access-alternate { border-top: 0; padding-top: 0; margin: .85rem 0 1.15rem; }
.access-alternate .button { width: 100%; text-align: center; }
.organizer-jumps { margin: 0 0 1.25rem; padding: .65rem; gap: .45rem; background: var(--white); border: 1px solid var(--line); border-radius: .75rem; }
.organizer-jumps a { padding: .45rem .65rem; border-radius: .4rem; background: #eef2e9; }
section[id] { scroll-margin-top: 1rem; }
.invitation-panel { margin-bottom: 1.25rem; }
.invitation-panel .actions { margin-top: .75rem; }
.invitation-panel [role=status]:empty, .live-feedback:empty, .turn-panel p:empty { display: none; }
dialog { width: min(34rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 1rem; color: var(--ink); background: var(--white); padding: clamp(1rem, 4vw, 2rem); }
dialog::backdrop { background: #112b24b8; }
.field-error { color: var(--wine); font-weight: 650; font-size: .95rem; }
[aria-invalid="true"] { border-color: var(--wine) !important; }
fieldset:disabled, select:disabled, input:disabled { opacity: .8; }
.turn-panel { background: var(--forest); color: var(--white); }
.turn-panel h2 { margin-bottom: 0; }
.turn-panel p { color: #edf3e8; margin: .5rem 0 0; }
.game-controls, .game-tools { display: flex; flex-wrap: wrap; align-items: start; gap: .9rem; margin-block: 1rem; }
.game-tools details { flex-basis: 100%; }
.game-tools > p { flex-basis: 100%; color: var(--muted); }
.gift-section { margin-top: 1.25rem; }
.game-rule { color: var(--muted); }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .75rem; }
.gift-tile { background: var(--white); border: 1px solid var(--line); border-radius: .8rem; padding: .8rem; min-width: 0; display: flex; flex-direction: column; }
.gift-tile h3 { margin-block: 0 .35rem; }
.gift-tile p { margin: 0 0 .35rem; }
.gift-tile .gift-reason { color: var(--muted); }
.gift-reason:empty { display: none; }
.gift-tile form { margin-top: auto; }
.gift-action { width: 100%; padding-inline: .4rem; overflow-wrap: anywhere; }
.button[aria-disabled=true] { border-color: var(--line); background: #f5f1e8; color: #565c53; cursor: default; }
.game-order [aria-current] { font-weight: 750; color: var(--forest); }
.live-feedback { color: var(--wine); }
.projection .turn-panel { margin-bottom: 1.5rem; }
@media (max-width: 48.99rem) {
  .welcome .access { grid-row: 1; }
  .welcome .holiday { min-height: 0; padding-top: 11rem; }
  .welcome .holiday-art { transform: scale(.65); }
}
@media (min-width: 340px) and (max-width: 36rem) {
  .gift-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.family-cards { display: grid; gap: .65rem; }
.family-card { border: 1px solid var(--line); border-radius: .8rem; margin: 0; background: var(--white); }
.family-card > summary { min-height: 48px; padding: .85rem 1rem; }
.family-name { font: 1.5rem Georgia, serif; font-weight: 600; }
.family-members { display: block; margin: .3rem 0 0 1.05rem; color: var(--muted); overflow-wrap: anywhere; }
.family-body { padding: 1rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; }
.family-names { padding-inline-start: 1.3rem; margin: 0; }
.family-names li { margin-block: .3rem; }
.guardian-card { padding: .85rem; margin-block: .65rem; background: #f6f3eb; border-radius: .65rem; }
.guardian-card h4 { font-size: 1.15rem; margin: 0 0 .6rem; }
.guardian-card fieldset { background: var(--white); }
.guardian-card .check { overflow-wrap: anywhere; }
.family-links { border-top: 1px solid var(--line); padding-top: 1rem; }
.family-link { margin: .65rem 0; padding: .85rem; border: 1px solid var(--line); border-radius: .65rem; }
.relation-tag { display: inline-block; padding: .15rem .45rem; border-radius: .3rem; background: #eef2e9; color: var(--forest); margin-inline-start: .25rem; }
@media (min-width: 54rem) {
  .family-body { grid-template-columns: minmax(10rem,1fr) minmax(0,3fr); }
  .family-links { grid-column: 1 / -1; }
}
.family-name { overflow-wrap: anywhere; }
.guardian-card { scroll-margin-top: 1rem; }

.my-children { background: #edf3e8; border: 1px solid #cbd6ca; border-radius: 1rem; padding: clamp(1rem, 3vw, 1.8rem); }
.my-children > .profile-exchange:last-child { margin-bottom: 0; }
.my-children > .profile-exchange + .profile-exchange { border-top: 1px solid #cbd6ca; padding-top: 1.2rem; }
.my-children h4 { font: 500 1.28rem/1.2 Georgia,serif; margin: 0 0 .5rem; }
.child-participation .actions { align-items: start; }

.site-footer p { margin: 0; }
.site-footer .footer-credit { margin-top: .35rem; font-size: .875rem; }
