:root {
  --pine: #0c3b2e;
  --holly: #17694a;
  --mint: #e3f0e6;
  --cranberry: #c8102e;
  --berry-dark: #9c0c24;
  --blush: #fbe6e6;
  --snow: #fffdf7;
  --drift: #f1ece0;
  --gold: #f2c14e;
  --ink: #17251f;
  --muted: #56685f;
  --line: #dbe4db;
  --display: 'Grandstander', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --tabs-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--snow);
  min-height: 100dvh;
}
body.is-auth { background: var(--pine); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.noscript { padding: 24px; color: #fff; }

/* ------------------------------------------------------------ type */
.h1 { font-family: var(--display); font-weight: 800; font-size: 1.75rem; line-height: 1.15; margin: 0 0 6px; color: var(--pine); }
.h2 { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.2; margin: 0 0 8px; color: var(--pine); }
.h3 { font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin: 22px 0 6px; color: var(--pine); }
.lead { margin: 0 0 16px; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); margin: 0 0 10px; font-size: .95rem; }

/* ------------------------------------------------------- the scene */
.scene { position: fixed; inset: 0; overflow: hidden; z-index: 0; display: none;
  background:
    radial-gradient(120% 70% at 50% 0%, #1b7a55 0%, transparent 60%),
    linear-gradient(#0c3b2e, #0a3024); }
body.is-auth .scene { display: block; }

.stars { position: absolute; inset: 0; }
.star { position: absolute; left: var(--x); top: var(--y); width: 9px; height: 9px; background: var(--snow);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3.6s ease-in-out var(--d) infinite; }
.star--big { width: 16px; height: 16px; background: var(--gold); }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }

.hill { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 24vh; min-height: 130px; }

.gift svg { display: block; width: 100%; height: auto; overflow: visible; }
.gift .g-box { fill: var(--box); }
.gift .g-lid { fill: var(--lid); }
.gift .g-rib { fill: var(--rib); }
.gift--red { --box: #c8102e; --lid: #e3213f; --rib: #fffdf7; }
.gift--green { --box: #17694a; --lid: #1f8a61; --rib: #f2c14e; }
.gift--cream { --box: #fffdf7; --lid: #f6efe0; --rib: #c8102e; }
.gift--gold { --box: #f2c14e; --lid: #f7d377; --rib: #17694a; }

.gifts { position: absolute; left: 0; right: 0; bottom: 3vh; display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 2vw, 18px); padding: 0 12px; }
.gifts .gift { width: clamp(46px, 13vw, 84px); filter: drop-shadow(0 6px 0 rgba(12, 59, 46, .12)); animation: hop 5s cubic-bezier(.3, .7, .4, 1) infinite; transform-origin: 50% 100%; }
.gifts .gift .g-lidgroup { animation: lid 5s ease-in-out infinite; transform-box: fill-box; transform-origin: 8% 100%; }
.gift--n1 { --w: 0s; } .gift--n2 { --w: 1.1s; width: clamp(56px, 16vw, 104px) !important; } .gift--n3 { --w: 2.3s; } .gift--n4 { --w: .6s; width: clamp(38px, 10vw, 64px) !important; } .gift--n5 { --w: 3.1s; }
.gifts .gift, .gifts .gift .g-lidgroup { animation-delay: var(--w); }
@keyframes hop { 0%, 62%, 100% { transform: translateY(0) scale(1, 1); } 68% { transform: translateY(0) scale(1.08, .88); } 78% { transform: translateY(-26%) scale(.96, 1.06) rotate(-4deg); } 88% { transform: translateY(0) scale(1.05, .93); } 94% { transform: translateY(-5%) scale(1, 1); } }
@keyframes lid { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-22%) rotate(-16deg); } 90% { transform: translateY(0) rotate(2deg); } }

.falling { position: absolute; inset: 0; }
.gift--fall { position: absolute; top: -60px; left: var(--x); width: var(--s); opacity: .92; animation: fall var(--t) linear var(--d) infinite; }
@keyframes fall { 0% { transform: translate(0, -10vh) rotate(-14deg); } 25% { transform: translate(18px, 22vh) rotate(10deg); } 50% { transform: translate(-12px, 52vh) rotate(-8deg); } 75% { transform: translate(14px, 82vh) rotate(12deg); } 100% { transform: translate(0, 112vh) rotate(-6deg); } }

/* ----------------------------------------------------- login tag */
#app { position: relative; z-index: 1; }
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 120px 16px 22vh; }
.tag-wrap { position: relative; width: min(100%, 380px); }
.tag { position: relative; z-index: 2; background: var(--snow); border-radius: 22px; padding: 0 22px 20px; text-align: center;
  box-shadow: 0 18px 0 -8px rgba(0, 0, 0, .18), 0 24px 50px rgba(0, 0, 0, .35); overflow: hidden; }
.tag-stripe { height: 16px; margin: 0 -22px 20px;
  background: repeating-linear-gradient(-45deg, var(--cranberry) 0 14px, var(--snow) 14px 28px); border-bottom: 3px solid var(--cranberry); }
.tag-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 9.5vw, 2.7rem); line-height: 1; margin: 0; color: var(--cranberry); letter-spacing: -.01em; }
.tag-sub { margin: 6px 0 18px; color: var(--holly); font-weight: 700; }
.tag-form { text-align: left; }
.tag-note { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }

.santa-holder { position: absolute; z-index: 1; left: 50%; top: 0; width: 132px; height: 0; pointer-events: none; }
.santa { position: absolute; left: 0; top: 0; width: 100%; animation: peek 15s ease-in-out infinite; transform: translate(-112%, 0); }
.santa-eyes { animation: look 5s ease-in-out infinite; }
@keyframes peek {
  0%, 6% { transform: translate(-112%, 4%); }
  11% { transform: translate(-112%, -77%); }
  13% { transform: translate(-112%, -70%); }
  15%, 36% { transform: translate(-112%, -73%); }
  41%, 44% { transform: translate(-112%, 4%); }
  50%, 52% { transform: translate(14%, 4%); }
  57% { transform: translate(14%, -50%); }
  61% { transform: translate(14%, -44%); }
  66% { transform: translate(14%, -77%); }
  68%, 86% { transform: translate(14%, -73%); }
  92%, 96% { transform: translate(14%, 4%); }
  100% { transform: translate(-112%, 4%); }
}
@keyframes look { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

.mitts { position: absolute; z-index: 3; top: -9px; left: 50%; width: 132px; display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; opacity: 0; }
.mitts i { width: 26px; height: 20px; border-radius: 12px 12px 8px 8px; background: var(--cranberry); border-bottom: 5px solid var(--snow); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.mitts--a { transform: translateX(-112%); animation: gripA 15s ease-in-out infinite; }
.mitts--b { transform: translateX(14%); animation: gripB 15s ease-in-out infinite; }
@keyframes gripA { 0%, 9%, 39%, 100% { opacity: 0; } 12%, 36% { opacity: 1; } }
@keyframes gripB { 0%, 63%, 89%, 100% { opacity: 0; } 67%, 86% { opacity: 1; } }

.tag-wrap.shy .santa { animation: none; transform: translate(14%, 4%); }
.tag-wrap.shy .mitts { animation: none; opacity: 0; }

/* ----------------------------------------------------------- forms */
.field { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin: 0 0 4px; padding: 0; }
.field input[type=text], .field input[type=password], .field input[type=url], .field select, .search-input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.field input:focus, .field select:focus, .search-input:focus { outline: none; border-color: var(--holly); box-shadow: 0 0 0 3px var(--mint); }
.field-hint { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.form-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--blush); color: var(--berry-dark); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 2px solid transparent; font-family: var(--display); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.btn--primary { background: var(--cranberry); color: #fff; box-shadow: 0 4px 0 var(--berry-dark); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--berry-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--pine); }
.btn--danger { background: var(--berry-dark); color: #fff; }
.btn--dangerous { color: var(--berry-dark); }
.btn--wide { width: 100%; }
.btn--small { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.btn:disabled { opacity: .55; cursor: default; }
.btn + .btn { margin-left: 8px; }
.btn--wide + .btn--wide { margin: 10px 0 0; }

.link { background: none; border: 0; padding: 12px 6px; color: var(--holly); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { opacity: .4; text-decoration: none; cursor: default; }
.link--quiet { color: var(--muted); font-weight: 400; padding-top: 4px; }

.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatar-opt { position: relative; }
.avatar-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.avatar-opt span { display: grid; place-items: center; aspect-ratio: 1; font-size: 1.5rem; border-radius: 12px; border: 2px solid transparent; background: var(--drift); }
.avatar-opt input:checked + span { border-color: var(--cranberry); background: var(--blush); }
.avatar-opt input:focus-visible + span { outline: 3px solid var(--gold); }
.avatars--small { grid-template-columns: repeat(8, 1fr); }
.avatars--small .avatar-opt span { font-size: 1.25rem; }

/* ----------------------------------------------------------- shell */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--pine); color: var(--snow);
  border-bottom: 5px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--cranberry) 0 10px, var(--snow) 10px 20px) 5; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.3rem; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 55%; padding: 4px 12px 4px 4px; border-radius: 999px; border: 0; background: rgba(255, 253, 247, .14); color: var(--snow); font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.me-chip-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--snow); font-size: 1.1rem; flex: none; }

.page { max-width: 560px; margin: 0 auto; padding: 18px 16px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom)); }
.page--narrow { padding-top: 12vh; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: var(--tabs-h); padding: 8px 4px; background: none; border: 0; color: var(--muted); font-weight: 700; font-size: .85rem; }
.tab-icon { font-size: 1.45rem; line-height: 1.2; filter: grayscale(.9); opacity: .75; }
.tab--on { color: var(--cranberry); }
.tab--on .tab-icon { filter: none; opacity: 1; transform: translateY(-2px); }

.panel { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 16px; min-width: 0; }
.panel--center { text-align: center; }
.panel--center .lead { margin-inline: auto; }
.panel--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel--row .h2 { margin: 0; }
.big-emoji { font-size: 4rem; line-height: 1.1; }

/* ----------------------------------------------------------- swipe */
.swipe { display: flex; flex-direction: column; align-items: center; outline: none; }
.progress { width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.progress-track { flex: 1; height: 12px; border-radius: 999px; background: var(--mint); overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--cranberry) 0 8px, #e3213f 8px 16px); transition: width .3s; }
.progress-label { font-size: .9rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.stack { position: relative; width: min(100%, 330px); aspect-ratio: 3 / 3.7; max-height: 52dvh; margin: 0 auto; }
.card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px 18px 22px; text-align: center;
  background: #fff; border: 3px solid var(--pine); border-radius: 26px; box-shadow: 0 8px 0 var(--pine); user-select: none; -webkit-user-select: none; overflow: hidden; --band: var(--holly); }
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--band); }
.card::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 22px; margin-left: -11px; background: var(--band); opacity: .1; }
.card--top { touch-action: none; cursor: grab; transition: transform .24s cubic-bezier(.2, .8, .3, 1); z-index: 2; }
.card--drag { transition: none; cursor: grabbing; }
.card--next { transform: scale(.94) translateY(14px); filter: saturate(.6); opacity: .8; z-index: 1; }
.card--chocolate { --band: #6f4327; } .card--sweet { --band: #d6447a; } .card--salty { --band: #c88a1b; } .card--spicy { --band: #c8102e; }
.card--drinks { --band: #1f7fa8; } .card--bakery { --band: #a5632a; } .card--healthy { --band: #3f8f3a; } .card--other { --band: #6b4fa3; }
.card-cat { position: absolute; top: 0; left: 0; right: 0; height: 46px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 600; z-index: 1; }
.card-emoji { font-size: clamp(4.4rem, 26vw, 6.4rem); line-height: 1.1; margin-top: 30px; position: relative; z-index: 1; }
.card-name { position: relative; z-index: 1;font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 6vw, 1.7rem); line-height: 1.15; margin: 0; color: var(--ink); text-wrap: balance; }

.card--fly-like { transform: translate(130%, -6%) rotate(22deg) !important; }
.card--fly-dislike { transform: translate(-130%, -6%) rotate(-22deg) !important; }
.card--fly-love { transform: translate(0, -130%) !important; }
.card--fly-cant { transform: translate(0, 130%) !important; }
.card--fly { --like: 0; --dislike: 0; --love: 0; --cant: 0; }
.card--fly-like { --like: 1; } .card--fly-dislike { --dislike: 1; } .card--fly-love { --love: 1; } .card--fly-cant { --cant: 1; }

.stamp { position: absolute; z-index: 3; padding: 4px 12px; border: 4px solid currentColor; border-radius: 12px; background: rgba(255, 255, 255, .92); font-family: var(--display); font-weight: 800; font-size: 1.35rem; white-space: nowrap; pointer-events: none; opacity: 0; }
.stamp--like { top: 64px; left: 14px; color: var(--holly); transform: rotate(-14deg); opacity: var(--like, 0); }
.stamp--dislike { top: 64px; right: 14px; color: var(--muted); transform: rotate(14deg); opacity: var(--dislike, 0); }
.stamp--love { bottom: 22px; left: 50%; color: #b5820a; transform: translateX(-50%) rotate(-4deg); opacity: var(--love, 0); }
.stamp--cant { top: 64px; left: 50%; color: var(--cranberry); transform: translateX(-50%) rotate(4deg); opacity: var(--cant, 0); }

.card--versus { gap: 8px; padding: 58px 14px 14px; justify-content: stretch; --band: var(--pine); }
.card--versus::after { display: none; }
.vs-q { position: absolute; top: 0; left: 0; right: 0; height: 46px; margin: 0; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem; z-index: 1; }
.vs-opt { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px; border: 3px solid var(--line); background: var(--snow); }
.vs-opt:not(:disabled):active { transform: scale(.97); }
.vs-opt--a:not(:disabled):hover, .vs-opt--a:focus-visible { border-color: var(--cranberry); background: var(--blush); }
.vs-opt--b:not(:disabled):hover, .vs-opt--b:focus-visible { border-color: var(--holly); background: var(--mint); }
.vs-emoji { font-size: clamp(2.4rem, 13vw, 3.3rem); line-height: 1.1; }
.vs-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.vs-or { font-family: var(--display); font-weight: 600; color: var(--muted); line-height: 1; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(100%, 360px); margin: 26px auto 0; }
.swipe-hint { min-height: 78px; margin: 26px 0 0; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; background: none; border: 0; font-size: .84rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.act-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid currentColor; background: #fff; font-size: 1.5rem; box-shadow: 0 4px 0 currentColor; }
.act:active .act-icon { transform: translateY(3px); box-shadow: 0 1px 0 currentColor; }
.act--dislike .act-icon { color: var(--muted); }
.act--cant .act-icon { color: var(--cranberry); font-size: 1.3rem; }
.act--love .act-icon { color: #b5820a; background: #fff8e3; }
.act--like .act-icon { color: var(--holly); background: var(--mint); }
.swipe-foot { display: flex; justify-content: space-between; width: min(100%, 360px); margin: 6px auto 0; }

/* ---------------------------------------------------------- people */
.search { position: sticky; top: 62px; z-index: 5; padding: 0 0 12px; background: var(--snow); }
.search-input { border-radius: 999px; padding-left: 18px; }
.people { display: grid; gap: 8px; margin: 0 0 18px; }
.person { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 16px; }
.person:hover { border-color: var(--holly); }
.person-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--mint); font-size: 1.5rem; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 700; }
.person-you { color: var(--muted); font-weight: 400; }
.person-title { color: var(--holly); font-size: .92rem; }
.person-meta { flex: none; font-size: .82rem; color: var(--muted); text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--drift); font-size: .95rem; border: 0; }
.chip--person { background: var(--mint); font-weight: 700; }
.thing { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 10px; }
.thing-name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin: 0 0 10px; }
.thing-row, .common-row { margin: 0 0 10px; }
.thing-label { display: block; font-size: .88rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.thing-row--cant .thing-label { color: var(--cranberry); }
.thing-row--love .thing-label { color: #8a6306; }

.profile-head { text-align: center; margin: 4px 0 20px; }
.profile-avatar { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 10px; border-radius: 50%; background: var(--mint); border: 4px solid var(--pine); font-size: 3rem; }
.profile-title { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--cranberry); }
.group, .common { margin: 0 0 22px; }
.group--cant { padding: 14px; border-radius: 16px; background: var(--blush); border: 2px solid var(--cranberry); }
.group--cant .h2 { color: var(--berry-dark); }
.group--cant .chip { background: #fff; }
.group--love .chip { background: #fdf0c8; }
.group--dislike .chip { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(86, 104, 95, .5); }
.common { padding: 14px; border-radius: 16px; background: var(--mint); }
.common .chip { background: #fff; }
.wishes { margin: 0; padding: 0; list-style: none; counter-reset: wish; display: grid; gap: 8px; }
.wish { counter-increment: wish; position: relative; padding: 12px 14px 12px 52px; background: #fff; border: 2px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; }
.wish::before { content: counter(wish); position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--cranberry); color: #fff; font-family: var(--display); font-weight: 800; }
.wish-title { font-weight: 700; overflow-wrap: anywhere; }
.wish-note { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.wish-link { color: var(--holly); font-weight: 700; padding: 6px 0; align-self: flex-start; }
.surprise { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: #fdf0c8; overflow-wrap: anywhere; }

/* ---------------------------------------------------- wishes and me */
.wishbox-n { font-family: var(--display); font-weight: 800; color: var(--cranberry); padding: 0 8px; }
.wishbox .field:last-child { margin-bottom: 0; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 54px; height: 32px; margin: 2px 0 0; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch:checked { background: var(--holly); }
.switch:checked::after { transform: translateX(22px); }

.fold { border-top: 2px solid var(--line); }
.fold summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px; font-weight: 700; cursor: pointer; }
.fold-count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.answer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.answer-name { flex: 1 1 140px; min-width: 0; }
.answer-opts, .seg-group { display: flex; gap: 4px; flex-wrap: wrap; }
.seg { min-width: 44px; min-height: 44px; padding: 4px 8px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--muted); font-weight: 700; }
.seg--text { padding: 4px 14px; }
.seg--on { background: var(--pine); border-color: var(--pine); color: #fff; }
.seg--on.seg--cant { background: var(--cranberry); border-color: var(--cranberry); }
.seg--on.seg--love { background: #b5820a; border-color: #b5820a; }
.seg--on.seg--like { background: var(--holly); border-color: var(--holly); }
.seg--on.seg--dislike { background: var(--muted); border-color: var(--muted); }

.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.row-main { flex: 1 1 150px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.row-sub { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.row .btn + .btn { margin-left: 0; }
.me .panel .btn { margin: 4px 8px 4px 0; }
.me .panel .row .btn { margin: 0; }

/* -------------------------------------------------- dialogs, toasts */
.dlg { width: min(92vw, 400px); border: 0; border-radius: 22px; padding: 22px; color: var(--ink); background: var(--snow); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.dlg::backdrop { background: rgba(12, 59, 46, .6); }
.dlg-title { font-family: var(--display); font-weight: 800; font-size: 1.3rem; margin: 0 0 8px; color: var(--pine); }
.dlg-body { margin: 0 0 16px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dlg-actions .btn + .btn { margin-left: 0; }
.temp-pass { margin: 0 0 16px; padding: 14px; text-align: center; border-radius: 14px; background: #fff; border: 2px dashed var(--cranberry); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.6rem; letter-spacing: .12em; user-select: all; }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 50; display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; background: var(--pine); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: opacity .3s, transform .3s; max-width: 100%; }
.toast--error { background: var(--berry-dark); }
.toast--out { opacity: 0; transform: translateY(8px); }

@media (min-width: 700px) {
  .auth { padding-top: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .star, .gifts .gift, .gifts .gift .g-lidgroup, .santa-eyes { animation: none; }
  .star { opacity: .8; }
  .gift--fall { display: none; }
  .santa { animation: none; transform: translate(14%, -73%); }
  .mitts--a { animation: none; opacity: 0; }
  .mitts--b { animation: none; opacity: 1; }
  .card--top, .progress-fill, .toast, .switch, .switch::after { transition: none; }
}
