@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/nunito-latin.woff2) format("woff2"); }
@font-face { font-family: "Mountains of Christmas"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/mountains-of-christmas-700-latin.woff2) format("woff2"); }
:root {
  --green: #123d2f;
  --green-2: #1d5a45;
  --red: #b8322a;
  --red-2: #962520;
  --gold: #d9a441;
  --cream: #fbf6ee;
  --paper: #ffffff;
  --ink: #1f2a26;
  --muted: #6c756f;
  --line: #e6dfd2;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}
a { color: var(--green-2); }
h1, h2 { line-height: 1.2; margin: 0 0 0.75rem; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 800; }
code { background: #f1ebe0; padding: 0 0.3em; border-radius: 4px; }

.script { font-family: "Mountains of Christmas", cursive; font-weight: 700; }
.muted { color: var(--muted); text-decoration: none; font-weight: 400; }
.small, .hint { font-size: 0.88rem; color: var(--muted); }
.hint { margin: 0.5rem 0 0.75rem; }
.hint.warn { color: #8a5a00; background: #fff6e0; border: 1px solid #f1dca6; border-radius: 10px; padding: 0.5rem 0.75rem; }
.error { color: var(--red-2); background: #fbe9e7; border: 1px solid #f1c3bd; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 16px; background: var(--green); color: #fff;
}
.topbar a { color: #fff; }
.brand { font-weight: 800; text-decoration: none; }

.wrap { max-width: 880px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.wrap.narrow { max-width: 440px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin: 0 0 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.card.center { text-align: center; }
.card.narrow { max-width: 360px; margin: 1.5rem auto 0; text-align: left; color: var(--ink); }
details > summary { cursor: pointer; list-style: none; }
details > summary h2 { display: inline; }
/* Space under an open in-page disclosure (FAQ). The header country menu is also
   a <details>; that margin would grow the bar and shift the page, so it is excluded. */
details:not(.locale-picker) > summary::after { content: " ▾"; color: var(--muted); }
details[open]:not(.locale-picker) > summary { margin-bottom: 0.75rem; }

label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.75rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.25rem;
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
input[readonly], input:disabled, textarea:disabled { background: #f6f2ea; color: var(--muted); }
label.check { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.inline { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.inline input { width: 5rem; }
.grid2, .grid3 { display: grid; gap: 0 1rem; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: repeat(3, 1fr); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 800; font-size: 0.95rem; text-decoration: none;
  padding: 0.55rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--green-2); background: #fff; color: var(--green-2);
}
.btn:hover { background: #eef5f1; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-2); }
.btn.big { font-size: 1.15rem; padding: 0.85rem 1.6rem; }
.btn.small { font-size: 0.82rem; padding: 0.3rem 0.75rem; }
.btn.ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn.ghost:hover { color: var(--red-2); background: #fbe9e7; }
.btn.wa { border-color: #1e9e57; color: #1e9e57; }
.actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.wrap-actions { gap: 0.6rem; }

.pill {
  display: inline-block; font-size: 0.75rem; font-weight: 800; vertical-align: middle;
  padding: 0.15rem 0.6rem; border-radius: 999px; background: #f1ebe0; color: var(--muted);
}
.pill.drawn { background: #e3f2ea; color: var(--green-2); }

.draw-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.draw-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.draw-list a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }

.people { margin-bottom: 0.5rem; }
.people .row { display: grid; grid-template-columns: 1.4fr 1.1fr 1.1fr auto; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
.people .row input { margin: 0; }
.people .head { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.excl { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.excl li { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; border-bottom: 1px dashed var(--line); }
.excl form { margin: 0; }
.excl-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.excl-form select { width: auto; margin: 0; }
.excl-form .check { margin: 0; }

.links { list-style: none; padding: 0; margin: 0; }
.links li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.links .who { font-weight: 700; }

.results { width: 100%; border-collapse: collapse; }
.results th, .results td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }

/* Participant-facing pages */
body.festive {
  min-height: 100vh;
  color: #fff;
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / 0.08) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgb(255 255 255 / 0.06) 0 1.5px, transparent 2.5px) 0 0 / 31px 31px,
    linear-gradient(170deg, var(--green) 0%, #0c2c22 100%);
}
body.festive a { color: var(--gold); }
.hero { max-width: 560px; margin: 0 auto; padding: 14vh 16px 3rem; text-align: center; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); color: #fff; margin-bottom: 1rem; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 800; color: var(--gold); margin: 0 0 0.5rem; }
.hero form { margin-top: 1.5rem; }
.hero .small { color: rgb(255 255 255 / 0.7); }
.gift {
  margin: 1.5rem auto; padding: 1.5rem 1rem; border-radius: 20px;
  background: rgb(255 255 255 / 0.07); border: 1px solid rgb(217 164 65 / 0.5);
  animation: pop 0.5s ease-out;
}
.gift p { margin: 0.25rem 0; }
.gift .receiver { font-size: clamp(2.4rem, 10vw, 3.8rem); color: var(--gold); line-height: 1.1; margin: 0.5rem 0; }
.info { margin-top: 1.5rem; color: rgb(255 255 255 / 0.85); }
.info p { margin: 0.3rem 0; }
.mine { text-align: center; margin: 2.5rem auto 1rem; max-width: 36rem; opacity: 0.75; }
.mine a { text-decoration: underline; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 680px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .people .row { grid-template-columns: 1fr 1fr; }
  .people .row input[name="name"] { grid-column: 1 / -1; }
  .people .head { display: none; }
  .people .row { padding-bottom: 0.5rem; border-bottom: 1px dashed var(--line); }
}

.people .row.nophone { grid-template-columns: 1.4fr 1.4fr auto; }
code.url { word-break: break-all; }

/* Public site pages */
.sitebar { background: var(--green); color: #fff; }
.sitebar .inner { max-width: 880px; margin: 0 auto; padding: 0.45rem 16px; display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 0.6rem; min-height: 52px; }
.sitebar .inner:has(nav.acctnav) { flex-wrap: wrap; }
.sitebar nav.acctnav { flex-wrap: wrap; justify-content: flex-end; }
.sitebar a { color: #fff; text-decoration: none; font-weight: 800; }
.sitebar nav { display: flex; flex-wrap: nowrap; gap: 0.35rem 0.7rem; align-items: center; flex: none; }
.sitebar .btn.primary { color: #fff; }
.sitebar .brandlink { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.sitebar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.65rem; }
.doc { max-width: 780px; margin: 0 auto; padding: 1.5rem 16px 3rem; font-size: 1.05rem; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.doc h3 { font-size: 1.05rem; margin: 0; display: inline; }
.doc .sub { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.doc .answer { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 1rem 1.2rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.crumbs a { color: var(--muted); }
.tablewrap { overflow-x: auto; margin: 1rem 0; }
table.grid { border-collapse: collapse; width: 100%; background: #fff; font-size: 0.95rem; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
table.grid thead th { background: #f1ebe0; }
.faqitem { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; margin: 0.5rem 0; }
.faqitem summary { cursor: pointer; font-weight: 800; }
.faqitem p { margin: 0.6rem 0 0; }
.cards { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.cards li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 1rem; }
.cta2 { margin-top: 2.5rem; text-align: center; }
.sitefoot { text-align: center; padding: 1.5rem 16px 3rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
.md img { max-width: 100%; height: auto; }

/* Create form (wizard) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wizard .step h2 { font-size: 1.1rem; }
.wizard .count { font-size: 0.9rem; font-weight: 600; }
.plist { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.prow { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; }
.prow input[type="text"], .prow input:not([type]) { margin: 0; flex: 1; min-width: 0; }
.prow input[aria-invalid="true"] { border-color: var(--red); outline-color: var(--red); }
.badge { font-size: 0.78rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; background: #e3f2ea; color: var(--green-2); }
.fielderr { color: var(--red-2); font-size: 0.9rem; margin: 0.2rem 0 0.6rem; }
.group { border: 1px solid var(--line); border-left: 5px solid var(--green-2); border-radius: 12px; padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; background: #fcfaf5; }
.group.g1 { border-left-color: var(--red); } .group.g2 { border-left-color: var(--gold); }
.group.g3 { border-left-color: #3a7ca5; } .group.g4 { border-left-color: #8a5aa8; } .group.g5 { border-left-color: #d1633a; }
.badge.g1 { background: #fbe9e7; color: var(--red-2); } .badge.g2 { background: #fff1d1; color: #7a5a00; }
.badge.g3 { background: #e0eef7; color: #24566f; } .badge.g4 { background: #efe5f5; color: #6a3f85; } .badge.g5 { background: #fde8de; color: #a0431f; }
.ghead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
label.chip { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
label.chip input { width: auto; margin: 0; }
label.chip.on { background: #e3f2ea; border-color: var(--green-2); }
label.chip.off { opacity: 0.45; cursor: not-allowed; }
.gnote { margin: 0.4rem 0 0; font-size: 0.88rem; color: var(--green-2); font-weight: 600; min-height: 1.2em; }
.rule { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.55rem; padding: 0.5rem 0.6rem; background: #fcfaf5; border: 1px solid var(--line); border-radius: 12px; }
.rule select { width: auto; min-width: 9rem; flex: 1 1 9rem; margin: 0; }
.rule .rtext { color: var(--muted); font-size: 0.92rem; }
.rule .check { margin: 0; }
.feas { min-height: 1.5rem; margin: 0.6rem 0; font-weight: 600; font-size: 0.95rem; }
.feas.ok { color: var(--green-2); } .feas.bad { color: var(--red-2); } .feas.idle { color: var(--muted); font-weight: 400; }
.wizard .btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 560px) {
  .rule { flex-direction: column; align-items: stretch; }
  .rule select { min-width: 0; flex: none; width: 100%; }
  .prow input { font-size: 16px; }
  .btn.primary.big { width: 100%; }
}
.badge[hidden] { display: inline-block; visibility: hidden; width: 3.4rem; }
.masked { list-style: none; padding: 0; margin: 0.4rem 0; columns: 2 14rem; }
.masked li { padding: 0.15rem 0; }
.mask { letter-spacing: 0.15em; color: var(--muted); user-select: none; }
details.hist { border-bottom: 1px dashed var(--line); padding: 0.4rem 0; }

.prow input.pemail { flex: 1; min-width: 0; margin: 0; }
.prow .nomail { display: none; }
@media (max-width: 560px) { .prow { flex-wrap: wrap; } .prow input.pemail { flex: 1 1 100%; order: 5; } }
.pill.mail { background: #eef3f0; color: var(--green-2); }
.pill.mail.bad { background: #fbe9e7; color: var(--red-2); }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 14rem; margin: 0; }

/* account area */
.sitebar nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.auth .btn.block, .btn.google { width: 100%; }
.btn.google { background: #fff; color: var(--ink); border-color: #dadce0; margin-bottom: 0.4rem; }
.btn.google:hover { background: #f7f8f8; }
.or-line { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); margin: 0.2rem 0 1rem; font-size: 0.92rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-links { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin: 0.85rem 0 0; font-size: 0.92rem; }
.wish-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.9rem; }
.wish-item { display: grid; gap: 0.4rem; padding-bottom: 0.8rem; border-bottom: 1px dashed var(--line); }
.wish-fields { display: grid; grid-template-columns: 1.4fr 0.7fr 1fr; gap: 0.4rem; }
.wish-fields input, .wish-item > label input { margin: 0; }
@media (max-width: 640px) { .wish-fields { grid-template-columns: 1fr; } }
.sitebar nav a.light { font-weight: 400; opacity: 0.85; }
.headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.headrow h1 { margin-bottom: 0.2rem; }
.empty { padding: 2rem 1.2rem; }
.empty .muted { max-width: 34rem; margin: 0 auto 1.2rem; }
.empty-icon { font-size: 2.6rem; margin: 0 0 0.4rem; }
.center-actions { justify-content: center; gap: 0.6rem; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); gap: 0 1rem; }
.group h2 a { color: var(--ink); text-decoration: none; }
.group h2 a:hover { color: var(--green-2); text-decoration: underline; }
.meta { margin: 0 0 0.6rem; font-size: 0.92rem; }
.status { margin: 0 0 0.8rem; font-size: 0.92rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.card.highlight { border-color: #d8c79c; background: #fffdf7; }
.card.danger { border-color: #f1c3bd; }
.card.danger h2 { color: var(--red-2); }
.btn.danger-btn { border-color: var(--red-2); color: var(--red-2); background: #fff; }
.btn.danger-btn:hover { background: #fbe9e7; }
.action-list { display: grid; gap: 0.6rem; }
.action-list form { margin: 0; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.action-list .hint { margin: 0; }
@media (max-width: 560px) {
  .people .row { grid-template-columns: 1fr 1fr; }
  .people .row.head { display: none; }
  .people .row .actions { grid-column: 1 / -1; }
}
.sitebar .acctnav a { white-space: nowrap; }
@media (max-width: 560px) { .sitebar .acctnav { gap: 0.7rem; } .sitebar .acctnav a { font-size: 0.86rem; } }

.tpl { white-space: pre-wrap; background: #fff; border: 1px solid rgb(0 0 0 / 0.15); border-radius: 8px; padding: 1rem; margin: 0.8rem 0 1.2rem; font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }

.slack-cta { margin: 1.2rem 0; }
.teams-steps { margin: 0.2rem 0 0.6rem; }
.notify { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.6rem 0 0.2rem; }
.notify input[type="email"] { flex: 1 1 14rem; min-height: 44px; }
.notify .hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.teams-store-note { color: var(--muted); margin-top: 0; }
a.slack-add { display: inline-flex; align-items: center; gap: 0.55rem; background: #fff; color: #1d1c1d; border: 1px solid #ddd; border-radius: 6px; padding: 0.45rem 0.85rem 0.45rem 0.65rem; font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
a.slack-add:hover { border-color: #bbb; background: #fafafa; color: #1d1c1d; }
a.slack-add svg { display: block; }
.soon { background: #fffdf7; border: 1px solid #e6d9a8; border-radius: 8px; padding: 0.85rem 1rem; }

.shot { margin: 1.25rem 0; }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: block; }
.video-guide { margin: 1.25rem 0; }
.video-guide video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--line); background: #14532d; display: block; }
.video-guide figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.45rem; }
.shot figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.45rem; }
.slack-cta-line { margin-top: 0.25rem; }

/* Country / tradition cards and locale picker */
.world { margin-top: 2.2rem; }
.world-grid { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 0.6rem; }
.world-grid a { display: flex; gap: 0.55rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.85rem; text-decoration: none; color: inherit; min-height: 44px; }
.world-grid a:hover { border-color: var(--green-2); }
.world-grid .flag { font-size: 1.35rem; line-height: 1; flex: none; }
.world-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.world-text strong { font-size: 0.95rem; }
.world-text .local, .locale-item-text .local { color: var(--muted); font-size: 0.86rem; font-weight: 500; }
.see-all { margin-top: 0.9rem; }
.flag-senyera, .flag-svg { display: inline-block; width: 1.35em; height: 0.95em; flex: none; margin-top: 0.15em; border-radius: 6px; border: 0; padding: 0; outline: 0; box-shadow: none; vertical-align: middle; }
.flag-senyera { background: repeating-linear-gradient(#fcd700, #fcd700 20%, #da121a 20%, #da121a 40%); }
.flag-svg { object-fit: fill; max-width: none; background: transparent; }

.locale-picker { position: relative; }
.locale-picker > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; font-weight: 600; color: #fff; min-height: 44px; padding: 0 0.5rem; }
.locale-picker > summary::-webkit-details-marker { display: none; }
.locale-picker > summary .flag { font-size: 1.15rem; }
.locale-picker-name { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locale-panel { position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 40; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); padding: 0.7rem 0.4rem 0.5rem; width: min(20rem, calc(100vw - 24px)); max-height: min(24rem, 70vh); overflow: auto; }
.locale-panel-label, .locale-region { margin: 0.35rem 0.6rem 0.2rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.locale-panel ul { list-style: none; padding: 0; margin: 0 0 0.4rem; }
.locale-panel a { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--ink); font-weight: 600; padding: 0.55rem 0.6rem; border-radius: 8px; min-height: 44px; }
.locale-panel a:hover { background: #f1ebe0; }
.locale-panel a[aria-current="true"] { background: #e3f2ea; }
.locale-item-text { display: flex; flex-direction: column; min-width: 0; }
.locale-picker .flag-senyera, .locale-picker .flag-svg { margin-top: 0; }

/* Apple-style country suggestion banner (injected by geo.js, never in cached HTML) */
.geobar { background: #f6f1e7; border-bottom: 1px solid var(--line); color: var(--ink); padding: 0.5rem 16px; }
.geobar-inner { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem 0.75rem; align-items: center; }
.geobar p { margin: 0; grid-column: 1; font-size: 0.92rem; line-height: 1.35; min-width: 0; }
.geobar form { display: flex; flex-wrap: nowrap; gap: 10px; align-items: center; grid-column: 2; min-width: 0; }
.geobar label { margin: 0; font-weight: 600; flex: 1 1 auto; min-width: 0; position: relative; }
.geobar select { margin: 0; width: 100%; height: 44px; min-height: 44px; padding: 0 0.75rem 0 2.15rem; line-height: 1.2; }
.geobar-flag { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; z-index: 1; }
.geobar-flag .flag-svg, .geobar-flag .flag-senyera { margin: 0; width: 1.25em; height: 0.85em; border-radius: 4px; }
.geobar .btn, .geobar .btn.small {
  flex: none; flex-shrink: 0; box-sizing: border-box;
  height: 44px; min-height: 44px; padding: 0 16px;
  white-space: nowrap; font-size: 0.95rem; line-height: 1;
}
.geobar-close { grid-column: 3; justify-self: end; background: none; border: 0; font-size: 1.35rem; line-height: 1; cursor: pointer; color: var(--muted); width: 44px; height: 44px; padding: 0; }
.geobar-close:hover { color: var(--ink); }

@media (max-width: 640px) {
  .locale-picker-name { display: none; }
  .locale-picker > summary { min-width: 44px; padding: 0 0.5rem; }
  .sitebar .inner { padding: 0.3rem 16px; gap: 0.5rem; }
  .sitebar nav { gap: 0.25rem; }
  .geobar { padding: 0.5rem 16px; max-height: 120px; overflow: hidden; }
  .geobar-inner { grid-template-columns: 1fr 44px; gap: 0.5rem 8px; }
  .geobar p { grid-column: 1; grid-row: 1; flex: none; font-size: 0.85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .geobar-close { grid-column: 2; grid-row: 1; align-self: center; }
  .geobar form { grid-column: 1 / -1; grid-row: 2; flex: none; gap: 10px; }
}

/* Site-wide mobile: overflow, tap targets, type, tables */
html { overflow-x: clip; }
img, video, iframe { max-width: 100%; height: auto; }
.doc, .wrap, .hero { overflow-wrap: anywhere; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.15rem; }
.tablewrap, .imp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 680px) {
  .doc { padding: 1.1rem 14px 2.5rem; font-size: 1rem; }
  .doc h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .doc h2 { font-size: 1.25rem; }
  .hero { padding: 8vh 16px 3rem; }
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 36px; padding: 0.35rem 0.8rem; }
  .geobar .btn, .geobar .btn.small { height: 44px; min-height: 44px; padding: 0 16px; }
  .faqitem summary { min-height: 44px; display: flex; align-items: center; }
  .cta2 .btn, .doc > p > .btn.big { width: 100%; box-sizing: border-box; }
  table.grid, .results, .imp-table { font-size: 0.88rem; }
  .sitefoot { padding: 1.2rem 14px 2.5rem; }
}

/* ── Design polish (2026-11) ───────────────────────────────────────────── */
:root { --shadow-1: 0 1px 2px rgb(18 61 47 / 0.05), 0 4px 14px rgb(18 61 47 / 0.06); --shadow-2: 0 2px 4px rgb(18 61 47 / 0.06), 0 12px 32px rgb(18 61 47 / 0.10); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.muted, .small, .hint, .crumbs, .crumbs a, .doc .sub { color: #5d665f; } /* AA on cream and white */
.btn { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s; }
.btn.primary { box-shadow: 0 2px 0 var(--red-2), 0 6px 16px rgb(184 50 42 / 0.25); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--red-2), 0 10px 22px rgb(184 50 42 / 0.3); }
.btn.primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--red-2); }
.card { box-shadow: var(--shadow-1); border-radius: 16px; }

/* Content pages: festive hero that continues the green header */
.doc { padding-top: 0; }
.doc-hero {
  position: relative; color: #fff; margin: 0 calc(50% - 50vw) 0; padding: 1.2rem calc(50vw - 50%) 3.4rem;
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / 0.07) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgb(255 255 255 / 0.05) 0 1.5px, transparent 2.5px) 0 0 / 31px 31px,
    linear-gradient(175deg, var(--green) 0%, #0f3428 100%);
  display: flex; align-items: center; gap: 2rem;
}
.doc-hero-text { flex: 1 1 auto; min-width: 0; }
.doc-hero .crumbs, .doc-hero .crumbs a { color: rgb(255 255 255 / 0.78); }
.doc-hero .crumbs { margin-bottom: 0.9rem; }
.doc-hero h1 { color: #fff; letter-spacing: -0.01em; margin-bottom: 0.6rem; text-wrap: balance; }
.doc-hero .sub { color: rgb(255 255 255 / 0.86); max-width: 38rem; text-wrap: pretty; }
.doc-hero .hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 1.4rem 0 0; }
.doc-hero .hero-cta .small { color: rgb(255 255 255 / 0.85); font-weight: 600; }
.doc-hero .hero-apps { margin: 0.85rem 0 0; font-weight: 700; }
.doc-hero .hero-apps a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--gold); }
.doc-hero .hero-cta .small::before { content: "✓ "; color: var(--gold); }
.doc-hero .btn.primary { box-shadow: 0 2px 0 #7d1e19, 0 8px 22px rgb(0 0 0 / 0.28); }
.hero-gift { flex: none; width: 150px; height: 150px; display: none; filter: drop-shadow(0 10px 18px rgb(0 0 0 / 0.3)); }
@media (min-width: 760px) { .hero-gift { display: block; } .doc-hero { padding-top: 1.6rem; padding-bottom: 4rem; } }
.doc > .answer { position: relative; margin-top: -2.2rem; box-shadow: var(--shadow-2); border-left-width: 5px; z-index: 1; }
.doc > .doc-hero + .world, .doc > .doc-hero + section { margin-top: 1.6rem; }

/* Long-form rhythm */
.doc { line-height: 1.65; }
.doc section { margin-top: 2.6rem; }
.doc h2 { position: relative; padding-top: 0.9rem; margin-top: 0; text-wrap: balance; }
.doc h2::before { content: ""; position: absolute; left: 0; top: 0; width: 2.2rem; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--red) 0 60%, var(--gold) 60%); }
.doc p, .doc li { text-wrap: pretty; }
.doc ul:not([class]) { list-style: none; padding-left: 0; }
.doc ul:not([class]) > li { position: relative; padding-left: 1.5rem; margin: 0.45rem 0; }
.doc ul:not([class]) > li::before { content: ""; position: absolute; left: 0.25rem; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #f6d9d6; }
.doc ol:not([class]) { list-style: none; padding-left: 0; counter-reset: step; }
.doc ol:not([class]) > li { position: relative; counter-increment: step; padding: 0.15rem 0 0.15rem 2.6rem; margin: 0 0 0.9rem; min-height: 1.9rem; }
.doc ol:not([class]) > li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 0.95rem; display: grid; place-items: center; }
.doc .cards li { box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s, box-shadow .15s; }
.doc .cards li:hover { border-color: var(--green-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.doc .cards a { font-weight: 700; text-decoration: none; color: var(--green-2); }
.doc .cards a::after { content: " →"; color: var(--red); }
.doc .cards li > a:only-child { display: block; }
.world-grid a { box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s, box-shadow .15s; }
.world-grid a:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.faqitem { box-shadow: var(--shadow-1); padding: 0; }
.faqitem summary { padding: 0.85rem 2.6rem 0.85rem 1rem; position: relative; }
.faqitem summary::after { content: ""; position: absolute; right: 1rem; top: 50%; width: 0.55rem; height: 0.55rem; border-right: 2.5px solid var(--green-2); border-bottom: 2.5px solid var(--green-2); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faqitem[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faqitem summary::-webkit-details-marker { display: none; }
.faqitem summary h3 { font-size: 1rem; }
.faqitem p { margin: 0; padding: 0 1rem 1rem; }
.cta2 { padding: 2rem 1rem; border-radius: 20px; background: linear-gradient(175deg, var(--green) 0%, #0f3428 100%); }
.sitefoot { background: #f3ece0; }
.sitefoot a { color: var(--green-2); }

/* Tables: cards on phones instead of crushed columns */
table.grid { border-radius: 12px; overflow: hidden; border-style: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
table.grid td, table.grid th { overflow-wrap: normal; word-break: normal; hyphens: auto; }
table.grid thead th { background: var(--green); color: #fff; border-color: #0f3428; }
table.grid tbody tr:nth-child(even) td { background: #fcfaf5; }
@media (max-width: 640px) {
  .md table:not(.grid) { display: block; overflow-x: auto; }
  table.grid:has(td[data-label]) { box-shadow: none; background: none; border-radius: 0; overflow: visible; }
  table.grid:has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.grid:has(td[data-label]), table.grid:has(td[data-label]) tbody, table.grid:has(td[data-label]) tr, table.grid:has(td[data-label]) td { display: block; width: 100%; }
  table.grid:has(td[data-label]) tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 0.7rem; padding: 0.75rem 0.9rem; box-shadow: var(--shadow-1); }
  table.grid:has(td[data-label]) tbody tr:nth-child(even) td { background: none; }
  table.grid:has(td[data-label]) td { border: 0; padding: 0.2rem 0; }
  table.grid:has(td[data-label]) td:first-child { font-weight: 800; font-size: 1.02rem; padding-bottom: 0.35rem; }
  table.grid:has(td[data-label]) td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green-2); }
  table.grid:has(td[data-label]) td:not(:first-child) + td { margin-top: 0.4rem; }
  .doc-hero { padding-bottom: 3rem; }
  .doc-hero .hero-cta { margin-top: 1.1rem; }
  .doc-hero .hero-cta .btn { width: 100%; }
  .doc-hero .hero-cta .small { width: 100%; text-align: center; }
}

/* Create form */
.wizard { counter-reset: wstep; }
.wizard .step.num { counter-increment: wstep; }
.wizard .step.num h2::before { content: counter(wstep); display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-right: 0.55rem; border-radius: 50%; background: var(--green); color: #fff; font-size: 0.9rem; vertical-align: 0.1em; }
.wizard .step.num details > summary h2::before { content: counter(wstep); }
.wizard .step { padding: 1.25rem 1.3rem; }
.wizard .step.final { border: 2px solid #cfe5d8; background: linear-gradient(180deg, #fff, #f5faf7); }
.teamrule label { font-weight: 600; margin: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; background: #fcfaf5; cursor: pointer; }
.teamrule label:has(input:checked) { border-color: var(--green-2); background: #eef6f1; }
.teamrule input, label.check input, .excl-form .check input { width: 1.15rem; height: 1.15rem; flex: none; margin: 0.15rem 0 0; accent-color: var(--green-2); }
label.check { align-items: flex-start; line-height: 1.4; }
.wizard:has(#f-reveal:not(:checked)) .reveal-date { display: none; }
.wizard .hint { line-height: 1.5; }
.badge[hidden] { display: none; }
.prow .rm { flex: none; }
.btn.ghost.rm { color: #5d665f; }

/* Organizer page */
.manage-note { background: #fff8e6; border: 1px solid #f1dca6; border-radius: 14px; padding: 0.8rem 1rem; margin: 0 0 1.2rem; color: #6b4700; }
.manage-note p { margin: 0 0 0.5rem; font-weight: 600; font-size: 0.92rem; }
.manage-url { display: flex; gap: 0.5rem; align-items: center; }
.manage-url code.url { flex: 1 1 auto; min-width: 0; background: #fff; border: 1px solid #f1dca6; border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; color: var(--ink); }
.manage-url .btn { flex: none; }
.wrap > h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.7rem; }
.people .row.t4.nophone { grid-template-columns: 1.4fr 1.1fr 1.1fr auto; }
.people .row .actions { flex-wrap: nowrap; }
.drawcta { background: linear-gradient(175deg, var(--green) 0%, #0f3428 100%); border-color: #0f3428; color: #fff; padding: 1.6rem 1.2rem; }
.drawcta .hint { color: rgb(255 255 255 / 0.82); }
.drawcta .btn.primary { box-shadow: 0 2px 0 #7d1e19, 0 8px 22px rgb(0 0 0 / 0.3); min-width: min(100%, 18rem); }
.links li { padding: 0.7rem 0; }
.links .who { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
@media (max-width: 700px) {
  .people .row.t4.nophone { grid-template-columns: 1fr 1fr; }
  .people .row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Participant page: grouped panels on the festive background */
.hero .info.wish-box, .hero .info.acct-box, .hero .info.addr-box, .hero .info.claim-box, .hero .info.msg-box {
  background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.14); border-radius: 18px; padding: 1.1rem 1.1rem 1.2rem;
}
.hero .info.wish-box .small, .hero .info.acct-box .small, .hero .info.msg-box .small { color: rgb(255 255 255 / 0.78); }
.hero .imp-done { color: #a8e6c1; }
.hero .wish-edit li { grid-template-columns: 1fr 1fr; }
.hero .wish-edit li input:first-child { grid-column: 1 / -1; font-weight: 600; }
.hero .wish-edit input, .hero .acct-box input, .hero .addr-box textarea { border-color: transparent; }
.hero .wish-box .btn:not(.primary), .hero .acct-box .btn:not(.primary), .hero .addr-box .btn:not(.primary), .hero .msg-box .btn:not(.primary) { background: #fff; border-color: #fff; color: var(--green); }
@media (max-width: 640px) { .hero .wish-edit li { grid-template-columns: 1fr; border-bottom-color: rgb(255 255 255 / 0.18); } }
.hero > .info:not(.wish-box):not(.acct-box):not(.addr-box):not(.claim-box):not(.claim-code):not(.msg-box) { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.hero > .info:not(.wish-box):not(.acct-box):not(.addr-box):not(.claim-box):not(.claim-code):not(.msg-box) p { margin: 0; padding: 0.35rem 0.85rem; border-radius: 999px; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.12); }
.msg-thread { text-align: left; margin: 0.4rem 0 1rem; }
.msg-thread + .msg-thread { border-top: 1px solid rgb(255 255 255 / 0.16); padding-top: 0.9rem; }
.msg-list { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.55rem 0; }
.msg-bubble { max-width: min(100%, 28rem); align-self: flex-start; padding: 0.45rem 0.7rem; border-radius: 12px; background: rgb(255 255 255 / 0.10); }
.msg-bubble.mine { align-self: flex-end; background: rgb(217 164 65 / 0.28); }
.msg-bubble.fresh { outline: 1px solid var(--gold); }
.msg-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-bubble .who { font-size: 0.75rem; opacity: 0.8; margin-bottom: 0.15rem; }
.msg-box textarea { width: 100%; max-width: 100%; border: 0; border-radius: 10px; padding: 0.55rem 0.7rem; font: inherit; }
.msg-box form { margin: 0.35rem 0; }
.msg-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.msg-bubble .btn { padding: 0.15rem 0.55rem; font-size: 0.78rem; margin-top: 0.3rem; }
.hero .btn.primary.big { box-shadow: 0 3px 0 #7d1e19, 0 10px 28px rgb(0 0 0 / 0.35); }
.gift { box-shadow: 0 18px 40px rgb(0 0 0 / 0.25); background: linear-gradient(180deg, rgb(255 255 255 / 0.10), rgb(255 255 255 / 0.04)); }
.teamrule[hidden] { display: none; }
.world-grid li { display: flex; }
.world-grid li > a { flex: 1 1 auto; }
/* After the draw the private links are what the organizer came for: show them first */
.wrap.is-drawn { display: flex; flex-direction: column; }
.wrap.is-drawn > * { order: 3; }
.wrap.is-drawn > .manage-note, .wrap.is-drawn > h1, .wrap.is-drawn > .error { order: 0; }
.wrap.is-drawn > #enlaces { order: 1; border: 2px solid #cfe5d8; }
.wrap.is-drawn > .hint.card[role="status"] { order: 1; }
/* Wish list: link and note only appear once an idea has a name */
.wish-edit li:has(> input:nth-child(1):placeholder-shown):has(> input:nth-child(2):placeholder-shown):has(> input:nth-child(3):placeholder-shown):has(> input:nth-child(4):placeholder-shown) > input:not(:first-child) { display: none; }
.wish-edit li:has(> input:nth-child(1):placeholder-shown):has(> input:nth-child(2):placeholder-shown):has(> input:nth-child(3):placeholder-shown):has(> input:nth-child(4):placeholder-shown) { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 700px) {
  .people .row.t4.nophone { grid-template-columns: 1fr 1fr auto; }
  .people .row.t4.nophone > input[name="name"] { grid-column: 1 / 3; grid-row: 1; }
  .people .row.t4.nophone > .actions { grid-column: 3; grid-row: 1; }
  .people .row.t4.nophone > input[name="household"] { grid-column: 1; grid-row: 2; }
  .people .row.t4.nophone > input[name="team"] { grid-column: 2 / 4; grid-row: 2; }
}

/* Catalan senyera: 9 equal stripes, 4 red on yellow. Other countries use the same box. */
.flag-senyera, .flag-svg {
  width: 1.4em; height: 0.95em; border-radius: 6px; border: 0; outline: 0; padding: 0; box-shadow: none;
}
.flag-senyera {
  background: #fcdd09 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' preserveAspectRatio='none'%3E%3Cg fill='%23da121a'%3E%3Crect y='1' width='9' height='1'/%3E%3Crect y='3' width='9' height='1'/%3E%3Crect y='5' width='9' height='1'/%3E%3Crect y='7' width='9' height='1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* Header country picker: a real pill button + dropdown (desktop) / bottom sheet (phones) */
.locale-picker > summary,
.locale-picker[open] > summary { margin: 0; }
.locale-picker > summary::marker { content: none; }
.locale-picker > summary {
  gap: 0.4rem; min-height: 40px; height: 40px; padding: 0 0.7rem 0 0.6rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.10); border: 1px solid rgb(255 255 255 / 0.28); color: #fff;
  font-weight: 800; font-size: 0.88rem; letter-spacing: 0.02em; transition: background-color .15s, border-color .15s;
  position: relative;
}
.locale-picker > summary::after { content: ""; position: absolute; inset: -3px -2px; } /* 44px+ tap area */
.locale-picker > summary:hover, .locale-picker[open] > summary { background: rgb(255 255 255 / 0.18); border-color: rgb(255 255 255 / 0.5); }
.locale-picker > summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.locale-picker > summary .flag { font-size: 1.1rem; line-height: 1; }
.locale-picker > summary .flag-senyera, .locale-picker > summary .flag-svg { width: 1.3em; height: 0.9em; border-radius: 4px; }
.locale-picker-code { display: none; }
.locale-picker-name { max-width: 10rem; font-weight: 700; }
.locale-chev { opacity: 0.85; transition: transform .2s; flex: none; }
.locale-picker[open] .locale-chev { transform: rotate(180deg); }
.locale-panel {
  top: calc(100% + 0.5rem); width: min(36rem, calc(100vw - 24px)); max-height: min(30rem, 75vh);
  border-radius: 16px; padding: 0.6rem 0.5rem 0.6rem; box-shadow: 0 18px 48px rgb(0 0 0 / 0.22);
  overscroll-behavior: contain;
}
.locale-panel ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.1rem 0.3rem; }
.locale-panel a { align-items: center; min-height: 48px; gap: 0.65rem; text-decoration: none; }
.locale-panel a .flag { font-size: 1.3rem; line-height: 1; width: 1.6rem; text-align: center; flex: none; }
.locale-panel a .flag-senyera, .locale-panel a .flag-svg { margin: 0 0.1rem; width: 1.4rem; height: 0.95rem; border-radius: 4px; }
.locale-item-text { line-height: 1.25; }
.locale-item-text strong { font-weight: 700; }
.locale-panel a[aria-current="true"],
.locale-panel a[aria-selected="true"] { background: #e3f2ea; }
.locale-panel a[aria-selected="true"]::after,
.locale-panel a[aria-current="true"]::after {
  content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%;
  background: var(--green-2); flex: none;
}
.locale-panel-label { font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 0.3rem 0.6rem 0.5rem; }
.locale-region { margin-top: 0.7rem; color: #5d665f; }
.locale-search-wrap { display: block; margin: 0 0.55rem 0.35rem; position: relative; }
.locale-search {
  margin: 0; height: 42px; min-height: 42px; padding: 0 0.85rem 0 2.35rem; border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c756f' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0.7rem center; background-size: 16px;
}
.locale-search:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.locale-empty { margin: 0.4rem 0.7rem 0.6rem; color: var(--muted); font-weight: 700; }
.locale-pin-label { margin-top: 0.15rem; }
/* Desktop mega-menu. The phone sheet (max-width 640px) keeps the previous layout. */
@media (min-width: 641px) {
  .sitebar { position: relative; }
  .locale-picker { position: static; }
  .locale-panel {
    top: calc(100% + 0.35rem); right: 16px; left: auto;
    width: min(58rem, calc(100vw - 32px));
    max-height: calc(100vh - 5.25rem);
    padding: 0.75rem 0.65rem 0.7rem;
    scrollbar-width: thin; scrollbar-color: #d6cfc2 transparent;
  }
  .locale-panel .locale-group ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.15rem 0.35rem; }
  .locale-pin ul { display: block; }
  .locale-pin a { width: 100%; }
  .locale-pin { margin: 0 0.15rem 0.35rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--line); }
  .locale-region { margin: 0.65rem 0.55rem 0.2rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--green-2); }
  .locale-panel a:hover { background: #f4efe6; }
  .locale-panel a[aria-selected="true"],
  .locale-panel a[aria-current="true"] { background: #e5f4eb; }
  .locale-panel a[aria-selected="true"]:hover,
  .locale-panel a[aria-current="true"]:hover { background: #d3eadf; }
  .locale-panel a.is-active,
  .locale-panel a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  .locale-panel a[aria-selected="true"].is-active { outline-color: var(--green-2); background: #d3eadf; }
  .locale-item-text { min-width: 0; }
  .locale-item-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .locale-panel .locale-group ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .locale-picker-name { display: none; }
  .locale-picker-code { display: inline; }
  .locale-picker > summary { min-width: 0; padding: 0 0.6rem 0 0.55rem; }
  .locale-picker[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgb(10 25 20 / 0.5); z-index: 45; cursor: default; }
  .locale-panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 78vh; z-index: 50;
    border-radius: 20px 20px 0 0; border: 0; padding: 0.4rem 0.6rem calc(0.8rem + env(safe-area-inset-bottom));
    animation: sheet-up .22s ease-out;
  }
  .locale-panel::before { content: ""; display: block; width: 2.6rem; height: 5px; border-radius: 5px; background: #d6cfc2; margin: 0.35rem auto 0.5rem; }
  .locale-panel ul { grid-template-columns: 1fr 1fr; }
  .locale-panel a { padding: 0.5rem; min-height: 48px; }
  .locale-item-text .local { font-size: 0.8rem; }
  .locale-search-wrap, .locale-pin, .locale-empty { display: none; }
}
@media (max-width: 360px) { .locale-panel ul { grid-template-columns: 1fr; } }
@keyframes sheet-up { from { transform: translateY(30%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .locale-panel, .gift { animation: none; } * { transition: none !important; } }
/* Create page: same festive band as the content pages, form lifts over it */
.tool-hero {
  color: #fff; margin: -1.5rem calc(50% - 50vw) 0; padding: 1.6rem calc(50vw - 50%) 3.2rem;
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / 0.07) 0 2px, transparent 3px) 0 0 / 46px 46px,
    linear-gradient(175deg, var(--green) 0%, #0f3428 100%);
}
.tool-hero h1 { color: #fff; margin-bottom: 0.4rem; text-wrap: balance; }
.tool-hero .muted { color: rgb(255 255 255 / 0.85); margin: 0; }
.tool-hero + .error, .tool-hero + form > .card:first-of-type, .tool-hero + .wizard > .step:first-of-type { position: relative; margin-top: -2rem; box-shadow: var(--shadow-2); }
.tool-hero + .error { margin-bottom: 1rem; }
.tool-hero + .error + .wizard { margin-top: 0; }
@media (max-width: 680px) { .tool-hero { padding-top: 1.1rem; } .tool-hero h1 { font-size: 1.65rem; } }

/* Reveal: a one-off burst of confetti around the name */
.gift { position: relative; overflow: visible; }
.gift::before, .gift::after {
  content: ""; position: absolute; left: 50%; top: 38%; width: 10px; height: 10px; border-radius: 2px; pointer-events: none; opacity: 0;
  box-shadow: -120px -40px 0 var(--gold), 110px -55px 0 #e85d52, -80px 50px 0 #fff, 95px 35px 0 var(--gold), -150px 10px 0 #e85d52,
              140px 5px 0 #fff, -40px -75px 0 #fff, 50px -80px 0 #e85d52, 20px 70px 0 var(--gold), -100px -10px 0 #9be3b8;
  animation: confetti 1.4s ease-out 0.25s 1 both;
}
.gift::after { width: 6px; height: 6px; border-radius: 50%; transform: rotate(40deg); animation-delay: 0.4s;
  box-shadow: -90px -70px 0 #fff, 130px -30px 0 var(--gold), -130px 40px 0 #9be3b8, 70px 60px 0 #e85d52, -20px -90px 0 var(--gold), 160px 40px 0 #fff; }
@keyframes confetti { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1.15) rotate(25deg); } }

/* Organizer after the draw: names read as text, not as locked inputs */
.wrap.is-drawn .people input[readonly] { background: transparent; border-color: transparent; padding-left: 0; color: var(--ink); }
.wrap.is-drawn .people input[readonly][name="name"] { font-weight: 700; }
.wrap.is-drawn .people input[readonly]::placeholder { color: transparent; }
.wrap.is-drawn .people .row { border-bottom: 1px dashed var(--line); margin-bottom: 0; padding: 0.1rem 0; }
/* Create form: calmer helper text */
.wizard .hint { font-size: 0.85rem; max-width: 40rem; }
.wizard label.check + .hint, .wizard label.check + .reveal-date + .hint, .wizard:has(#f-reveal:not(:checked)) label.check + .reveal-date + .hint { margin-top: -0.35rem; padding-left: 1.65rem; }

/* Native app: the status bar overlays the page on iPhone, so the header or the
   body takes the safe area. Android draws the status bar outside the WebView. */
html.ss-native { background: var(--cream); }
html.ss-native.ss-darkbar { background: var(--green); }
html.ss-native body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
html.ss-native:not(.ss-darkbar) body { padding-top: env(safe-area-inset-top); }
html.ss-native.ss-darkbar .sitebar .inner,
html.ss-native.ss-darkbar .topbar {
  padding-top: calc(0.45rem + env(safe-area-inset-top));
}
#ss-ptr {
  position: fixed;
  z-index: 40;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  border: 1px solid var(--line);
  font-weight: 800;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
#ss-ptr.on { opacity: 1; transform: translateY(0); }
