/* Noël chez les Ouellet · Boule à neige. Desktop first, its own proportions; phones below 760px. */
:root {
  --bg: #0F2E44; --bg-2: #16405C; --bg-3: #245372; --line: #2C5C7C; --line-2: #7FA6BD;
  --ink: #EAF3F8; --ink-soft: #DCE9F1; --ink-eye: #BFD6E4; --ink-mute: #A9C3D3;
  --gold: #F4D58D; --gold-hover: #FFE7B3; --on-gold: #2E1E00; --cran: #7E2128; --paper: #FFF8EC; --paper-ink: #0F2E44;
  --danger: #FFC9CD;
  --display: 'Fraunces', Georgia, serif; --body: 'Atkinson Hyperlegible', Arial, sans-serif;
  --fs: 18px; --h1: 46px; --btn-h: 56px; --btn-fs: 19px; --pad: 56px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: var(--fs); line-height: 1.45; }
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* top bar */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 20px var(--pad); position: relative; z-index: 1; }
.brand { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); text-decoration: none; flex: 1 1 auto; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 16px; padding: 10px 14px; border-radius: 999px; }
.nav a[aria-current="page"] { background: var(--bg-2); color: var(--gold); }
.ghost { font-family: var(--body); font-size: 15px; font-weight: 700; color: var(--ink); background: transparent; border: 2px solid var(--line-2); border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.ghost:hover { border-color: var(--ink); }
.back { color: var(--gold); font-weight: 700; text-decoration: none; font-size: 17px; display: inline-flex; align-items: center; min-height: 44px; }

.page.globe-page .switcher { margin: 0; }
.switcher { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 var(--pad); padding: 10px 16px; background: var(--bg-2); border: 2px solid var(--gold); border-radius: 16px; font-size: 17px; }
.switcher form { margin: 0; }
main.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 12px var(--pad) 56px; display: flex; flex-direction: column; gap: 22px; flex: 1; position: relative; z-index: 1; }
main.narrow { max-width: 680px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.cols.side { grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
.cols.form { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.row > .grow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; align-items: start; }

/* type */
.eye { margin: 0; font-size: 20px; color: var(--ink-eye); }
h1, .h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: var(--h1); line-height: 1.07; text-wrap: balance; }
h1 em, h2 em, .h1 em { font-style: italic; font-weight: 600; color: var(--gold); }
h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; }
h3 { margin: 0; font-size: 19px; }
.lead { margin: 0; font-size: 20px; line-height: 1.5; color: var(--ink-soft); max-width: 34em; }
.sub { margin: 0; font-size: 16px; color: var(--ink-mute); }
.body { margin: 0; line-height: 1.5; color: var(--ink-soft); }
.center { text-align: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--btn-h); padding: 0 28px; border-radius: 999px; border: 2px solid transparent; font-family: var(--body); font-size: var(--btn-fs); font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2; }
.btn.gold { background: var(--gold); color: var(--on-gold); }
.btn.gold:hover { background: var(--gold-hover); color: var(--on-gold); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.line:hover { background: rgba(234,243,248,.1); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: #F2A7AD; }
.btn.sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn.big { min-height: 64px; padding: 0 36px; font-size: 21px; }
.btn.wide { width: 100%; }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card .btns { align-items: stretch; }
.card .btns form { margin: 0; }

/* surfaces */
.card { background: var(--bg-2); border: 2px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card .in { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.card .ttl { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.card .note { font-size: 16px; line-height: 1.45; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.panel { background: var(--bg-2); border: 2px solid var(--line); border-radius: 22px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.gold-card { background: var(--gold); color: var(--on-gold); border-radius: 22px; padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.gold-card:hover { color: var(--on-gold); }
.gold-card .k { font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.gold-card .name { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.05; }
.ask-card { background: var(--bg-2); border: 2px solid var(--gold); border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.dashed { border: 2px dashed var(--line-2); border-radius: 16px; padding: 14px 16px; line-height: 1.5; color: var(--ink-soft); }
.flash { background: rgba(244,213,141,.15); border: 2px solid var(--gold); border-radius: 16px; padding: 12px 16px; }
.error { color: var(--danger); font-weight: 700; margin: 0; }
.drawcard { display: flex; gap: 18px; align-items: center; background: var(--bg-2); border: 2px solid var(--line); border-radius: 22px; padding: 14px 22px 14px 14px; }
.drawcard .who { font-family: var(--display); font-weight: 800; font-size: 44px; color: var(--gold); line-height: 1; }
.mini-globe { width: 120px; flex-shrink: 0; }

/* photos & links */
.ph { background: var(--bg-3); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; font-size: 14px; text-align: center; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery { display: grid; gap: 3px; height: 210px; }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery.n3 > :first-child { grid-row: 1 / span 2; }
.gallery a { display: block; position: relative; }
.gallery .more { position: absolute; inset: 0; background: rgba(15,46,68,.72); color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.links { display: flex; flex-direction: column; gap: 8px; }
.lk { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 2px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; min-height: 60px; }
.lk:hover { border-color: var(--gold); color: var(--ink); }
.lk .th { width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; }
.lk .tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lk .tx b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk .tx span { font-size: 14px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk .go { color: var(--gold); font-weight: 700; font-size: 15px; white-space: nowrap; }

/* people row: little globes */
.people { display: flex; gap: 4px; flex-wrap: wrap; }
.p { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 15px; padding: 6px 8px; border-radius: 14px; min-width: 72px; }
.p:hover { color: var(--ink); background: rgba(22,64,92,.6); }
.p[aria-current="page"] { color: var(--gold); background: var(--bg-2); }
.p .g { width: 40px; height: 44px; position: relative; }
.p .g::before { content: ""; position: absolute; left: 2px; top: 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(207,228,240,.14); border: 2.5px solid #9FC2D6; }
.p .g::after { content: ""; position: absolute; left: 8px; bottom: 0; width: 24px; height: 10px; border-radius: 3px 3px 2px 2px; background: var(--cran); }
.p[aria-current="page"] .g::before { background: rgba(244,213,141,.25); border-color: var(--gold); }
.p.empty .g::before { border-style: dashed; }

/* forms */
.f { display: flex; flex-direction: column; gap: 8px; }
.f > label, .f .lbl { font-size: 18px; font-weight: 700; }
.opt { font-weight: 400; color: var(--ink-mute); }
.field { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--paper-ink); font-family: var(--body); font-size: 18px; }
textarea.field { resize: vertical; line-height: 1.4; }
.hint { margin: 0; font-size: 15px; color: var(--ink-mute); line-height: 1.4; }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumb { width: 96px; height: 96px; border-radius: 12px; position: relative; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; display: block; }
.thumb label.x { position: absolute; right: -8px; top: -8px; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--paper-ink); border: 2px solid var(--bg); font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.thumb input { position: absolute; opacity: 0; pointer-events: none; }
.thumb input:checked + img { opacity: .25; }
.thumb input:checked ~ label.x { background: var(--danger); }
.addph { position: relative; width: 96px; height: 96px; border: 2px dashed var(--line-2); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink); font-weight: 700; font-size: 14px; text-align: center; cursor: pointer; overflow: hidden; }
.addph input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip { font-family: var(--body); font-size: 16px; font-weight: 700; color: var(--ink); background: transparent; border: 2px solid var(--line-2); border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chips label { position: relative; }
.radio-chips input { position: absolute; opacity: 0; }
.radio-chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid var(--line-2); border-radius: 999px; font-weight: 700; font-size: 16px; cursor: pointer; }
.radio-chips input:checked + span { border-color: var(--gold); color: var(--gold); }
.radio-chips input:focus-visible + span { outline: 4px solid var(--gold); outline-offset: 3px; }

/* tiles on home */
.tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; min-height: 76px; }
.tile:hover { border-color: var(--gold); color: var(--ink); }
.tile .lb { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 19px; font-weight: 700; }
.tile .lb small { font-size: 15px; font-weight: 400; color: var(--ink-mute); }
.tile .ch { color: var(--gold); font-size: 26px; }
.check { width: 84px; height: 84px; border-radius: 50%; background: rgba(244,213,141,.18); display: flex; align-items: center; justify-content: center; }

/* the draw page (globe) */
.page.globe-page { overflow: hidden; padding-left: var(--pad); padding-right: var(--pad); }
.page.globe-page .bar { padding-left: 0; padding-right: 0; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.layout { flex: 1; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: center; gap: 24px; position: relative; z-index: 1; }
.copy { display: grid; min-width: 0; padding-left: clamp(0px, 4vw, 64px); padding-block: 24px; }
.copy .panel-x { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 20px; animation: panel-in 500ms ease both; }
.copy h1 { font-size: clamp(38px, 4.4vw, 56px); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stage { align-self: stretch; min-height: min(640px, 80vh); position: relative; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.stage.is-dragging { cursor: grabbing; }
.stage.is-static { cursor: default; }
.fallback { position: absolute; inset: 0; margin: auto; width: min(100%, 560px); height: auto; max-height: 100%; }

/* dialog-ish page for questions on desktop */
.sheet { background: var(--bg); border: 2px solid var(--line-2); border-radius: 24px; padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }

@media (max-width: 760px) {
  :root { --fs: 19px; --h1: 34px; --btn-h: 60px; --btn-fs: 20px; --pad: 20px; }
  .bar { padding: 14px var(--pad); }
  .brand { font-size: 19px; }
  .ghost { font-size: 13px; padding: 6px 10px; min-height: 40px; }
  .nav { order: 3; width: 100%; }
  .nav a { flex: 1; text-align: center; padding: 10px 6px; }
  .cols, .cols.side, .cols.form { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .row .btn, .btns .btn { width: 100%; }
  .lead { font-size: 19px; }
  .field { min-height: 58px; font-size: 19px; border-width: 3px; }
  .f > label, .f .lbl { font-size: 19px; }
  .card .ttl { font-size: 21px; } .card .note { font-size: 17px; }
  .people { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 calc(var(--pad) - 6px); }
  .gold-card .name { font-size: 42px; }
  .drawcard .who { font-size: 36px; }
  .mini-globe { width: 90px; }
  .layout { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0; }
  .stage { order: -1; min-height: 0; height: min(52vh, 100vw); }
  .copy { padding-left: 0; padding-block: 4px 32px; }
  .copy h1 { font-size: 32px; }
  .sheet { padding: 0; border: 0; box-shadow: none; background: transparent; }
}
@media (prefers-reduced-motion: reduce) { .copy .panel-x { animation: none; } }

/* print page */
@media print {
  body { background: #fff; color: #111; }
  .no-print, #snow { display: none !important; }
}
