:root {
  --night: #0d2620;
  --night-2: #123329;
  --pine: #1f6a4b;
  --pine-d: #154a34;
  --red: #d23a3f;
  --red-d: #9e2429;
  --gold: #f0c24f;
  --gold-d: #c9962a;
  --cream: #fff6e6;
  --paper: #fffcf6;
  --ink: #2d1f17;
  --muted: #7c6a5b;
  --line: #eadcc6;
  --radius: 22px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 2px 0 rgba(0, 0, 0, .04);
  --font: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Mountains of Christmas', 'Fredoka', cursive;
  --tabs-h: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--cream);
  background:
    radial-gradient(900px 520px at 50% -8%, #2a5e48 0%, transparent 65%),
    radial-gradient(600px 400px at 90% 30%, rgba(210, 58, 63, .12), transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night) 60%, #0a1d18);
  background-attachment: fixed;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
a { color: var(--red-d); font-weight: 600; }
button { font: inherit; }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.lights, .top, .tabs, main, .hills { position: relative; z-index: 1; }

/* ---------- lucine */
.lights { height: 48px; overflow: hidden; }
.lights svg { display: block; overflow: visible; }
.bulb { animation: twinkle 1.6s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes twinkle {
  from { opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
  to { opacity: .45; filter: none; }
}

/* ---------- intestazione */
.top { text-align: center; padding: 4px 16px 0; }
.kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.title {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(42px, 11.5vw, 78px);
  line-height: .95;
  letter-spacing: .01em;
}
.title a { color: var(--cream); text-decoration: none; text-shadow: 0 3px 0 var(--red-d), 0 10px 26px rgba(0, 0, 0, .45); }
.title span { color: var(--gold); display: inline-block; }

/* ---------- tab */
.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(255, 246, 230, .97);
  backdrop-filter: blur(8px);
  border-top: 4px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 20px) 4;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .25);
}
.tabs a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px 9px;
  min-height: var(--tabs-h);
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.tabs a span { font-size: 22px; line-height: 1.1; transition: transform .2s; }
.tabs a.active { color: var(--red-d); }
.tabs a.active span { transform: translateY(-2px) scale(1.15); }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .tabs {
    position: sticky;
    top: 10px;
    width: max-content;
    margin: 18px auto 0;
    border: 0;
    border-radius: 999px;
    padding: 5px;
    gap: 4px;
  }
  .tabs a { flex-direction: row; gap: 8px; min-height: 0; padding: 9px 20px; border-radius: 999px; font-size: 16px; }
  .tabs a span { font-size: 18px; }
  .tabs a.active { background: var(--red); color: #fff; }
  .tabs a.active span { transform: none; }
}

main { max-width: 760px; margin: 0 auto; padding: 8px 16px 24px; min-height: 50vh; }

/* ---------- palline (avatar) */
.orn {
  --s: 52px;
  --c1: #ef5a5f; --c2: #a3242a;
  position: relative;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  margin-top: calc(var(--s) * .12);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .8) 0 5%, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 50% 45%, var(--c1), var(--c2));
  box-shadow: inset -4px -7px 12px rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .22);
  vertical-align: middle;
}
.orn::before {
  content: '';
  position: absolute;
  top: calc(var(--s) * -.1);
  left: 50%;
  width: 30%;
  height: calc(var(--s) * .16);
  transform: translateX(-50%);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #b98b22, #f7dd8a 45%, #b98b22);
}
.orn i { font-style: normal; font-size: calc(var(--s) * .5); line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.orn b { color: #fff; font-size: calc(var(--s) * .5); font-weight: 700; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.c-0 { --c1: #ef5a5f; --c2: #a3242a; }
.c-1 { --c1: #44a777; --c2: #17583c; }
.c-2 { --c1: #ffd86e; --c2: #c58c1c; }
.c-3 { --c1: #74b0ee; --c2: #2a5f9e; }
.orn.mystery { animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ---------- countdown */
.hero { text-align: center; padding: 0 0 6px; }
.count { display: flex; justify-content: center; gap: clamp(8px, 3.4vw, 26px); min-height: 190px; }
.hang {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  animation: swing 3.4s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -.8s);
}
@keyframes swing { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.hang .string { width: 2px; height: var(--h); background: linear-gradient(rgba(240, 194, 79, .2), var(--gold)); }
.ball {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(66px, 19vw, 100px);
  aspect-ratio: 1;
  margin-top: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .8) 0 5%, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 50% 45%, var(--c1), var(--c2));
  box-shadow: inset -6px -10px 18px rgba(0, 0, 0, .28), 0 12px 26px rgba(0, 0, 0, .4);
}
.ball::before {
  content: '';
  position: absolute;
  top: -9px; left: 50%;
  width: 26%; height: 12px;
  transform: translateX(-50%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, #b98b22, #f7dd8a 45%, #b98b22);
}
.ball b {
  color: #fff;
  font-size: clamp(26px, 7.6vw, 40px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .22);
}
.hang small {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: .85;
}
.until { margin: 16px 0 12px; color: var(--cream); opacity: .95; }
.until b { color: var(--gold); font-size: 18px; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--cream);
  background: rgba(255, 246, 230, .1);
  border: 1px solid rgba(255, 246, 230, .22);
}

/* ---------- card */
.card {
  position: relative;
  margin: 18px 0;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.card.cane { padding-top: 28px; overflow: hidden; }
.card.cane::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 11px, #fff 11px 22px);
}
.card h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.05;
  color: var(--red-d);
}
.card p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.light-text { color: var(--cream); }
.link-light { color: var(--gold); }
.loading { text-align: center; color: var(--cream); opacity: .85; padding: 30px 0; }
.card .loading { color: var(--muted); padding: 8px 0; }
.pill {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}

.intro { text-align: center; margin-top: 8px; }
.h-cream { font-family: var(--display); font-size: 40px; color: var(--cream); margin: 0; line-height: 1; text-shadow: 0 3px 0 var(--red-d); }
.intro p { margin: 6px 0 0; opacity: .9; }

/* ---------- bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
  touch-action: manipulation;
}
.btn:focus-visible, input:focus-visible + span, .tabs a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-d), 0 10px 20px rgba(158, 36, 41, .3); }
.btn-red:hover { background: #dc4449; }
.btn-red:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-d); }
.btn-green { background: var(--pine); color: #fff; box-shadow: 0 4px 0 var(--pine-d); }
.btn-green:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pine-d); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--gold-d); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-d); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost.light { color: var(--ink); background: #fff; border-color: #fff; }
.btn-block { width: 100%; }
.btn.big { padding: 15px 26px; font-size: 18px; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.spin {
  width: 16px; height: 16px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cta .btn { flex: 1 1 200px; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.row.end { justify-content: space-between; }
.row.two > * { flex: 1; }
.gate-form input { flex: 1; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- partecipanti */
.bubbles { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 10px; padding: 0; margin: 14px 0 4px; }
.bubbles li { display: flex; flex-direction: column; align-items: center; width: 64px; text-align: center; }
.bubbles span { margin-top: 4px; font-size: 13px; font-weight: 500; line-height: 1.15; word-break: break-word; }

/* ---------- come funziona */
.steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps b { font-size: 17px; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- form */
fieldset { border: 0; padding: 0; margin: 22px 0 0; }
legend { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 10px; }
.step {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 15px;
}
.field { margin: 12px 0; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.field.narrow { max-width: 260px; }
.field.narrow input { max-width: 160px; }
.field small { display: block; margin-top: 6px; line-height: 1.35; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(240, 194, 79, .3); }
input::placeholder, textarea::placeholder { color: #b3a291; }

.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.av { position: relative; display: grid; place-items: center; padding: 6px 0 8px; border-radius: 16px; cursor: pointer; border: 2px solid transparent; transition: background .15s; }
.av input { position: absolute; opacity: 0; pointer-events: none; }
.av:hover { background: #fbf1df; }
.av:has(input:checked) { background: #fff1c9; border-color: var(--gold); }
.av:has(input:checked) .orn { transform: scale(1.1) rotate(-6deg); }
.av:has(input:focus-visible) { outline: 3px solid var(--gold); }
.av .orn { transition: transform .2s; }

.seg { display: flex; gap: 8px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  white-space: nowrap;
  display: block;
  padding: 11px 8px;
  text-align: center;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
}
.seg input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }

.wish {
  display: grid;
  grid-template-columns: 26px 1fr 100px 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  background: #fff8ec;
  border: 2px dashed var(--line);
  border-radius: 16px;
}
.num {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  font-weight: 700;
  font-size: 14px;
}
.w-price { position: relative; display: block; }
.w-price input { padding-right: 26px; }
.w-price span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.w-del {
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: #f3e6d1; color: var(--red-d);
  font-weight: 700; cursor: pointer;
}
.w-del[disabled] { opacity: .35; cursor: default; }
.wish .more { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wish .more input { padding: 9px 12px; font-size: 15px; }
.wish-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 520px) {
  .wish { grid-template-columns: 26px 1fr 34px; }
  .wish .w-price { grid-column: 2; }
  .wish .w-del { grid-column: 3; grid-row: 1; }
  .wish .more { grid-template-columns: 1fr; }
}
.signup .btn-block { margin-top: 24px; }

/* ---------- listone */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 18px 0 6px; }
.seg.light { background: rgba(255, 246, 230, .1); padding: 4px; border-radius: 18px; }
.seg.light span { background: transparent; border-color: transparent; color: var(--cream); padding: 8px 14px; }
.seg.light input:checked + span { background: var(--cream); color: var(--red-d); }
.stat { text-align: center; opacity: .85; font-size: 14px; margin: 4px 0 18px; }
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px 18px; }
.tagw { filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .32)); transform: rotate(var(--r)); transition: transform .25s; }
.tagw:hover { transform: rotate(0) translateY(-3px); }
.tag {
  position: relative;
  padding: 34px 18px 16px;
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(14% 0, 86% 0, 100% 34px, 100% 100%, 0 100%, 0 34px);
  border-radius: 0 0 18px 18px;
}
.tag::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%;
  width: 14px; height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--night);
  box-shadow: 0 0 0 3px var(--gold);
}
.tag header { font-size: 15px; color: var(--muted); padding-bottom: 8px; border-bottom: 2px dotted var(--line); margin-bottom: 6px; }
.tag header b { color: var(--red-d); font-size: 18px; }
.g-ic { margin-right: 4px; }
.tag ul, .wl { list-style: none; padding: 0; margin: 0; }
.tag li, .wl li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: baseline;
  padding: 8px 6px;
  border-radius: 10px;
  transition: background .3s;
}
.tag li + li, .wl li + li { border-top: 1px dashed var(--line); }
.w-t { font-weight: 500; }
.tag small, .wl small { display: block; color: var(--muted); font-size: 13px; }
.price {
  font-weight: 700;
  font-size: 14px;
  color: var(--pine);
  background: #e6f3ec;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.w-link { grid-column: 1 / -1; font-size: 13px; color: var(--red-d); justify-self: start; }
li.picked { background: #fff1c2; box-shadow: 0 0 0 3px var(--gold); animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.04); } }

/* ---------- area personale */
.me-head { display: flex; align-items: center; gap: 14px; margin: 14px 0 4px; }
.me-head > div { flex: 1; min-width: 0; }
.hello { margin: 0; font-family: var(--display); font-size: 34px; line-height: 1; color: var(--cream); }
.me-head p.small { margin: 4px 0 0; opacity: .85; }
.banner { display: block; text-decoration: none; color: var(--ink); font-weight: 500; background: #fff1c2; }
.target { background: linear-gradient(180deg, #fffaf0, var(--paper)); }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.target-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 10px; }
.target-head h2 { margin: 0; }
.who-hint { margin: 4px 0 0 !important; font-size: 18px; font-weight: 600; }
.budget { margin-top: 12px !important; font-weight: 600; color: var(--pine); }
.msgs { display: grid; gap: 10px; margin: 12px 0; }
.msg { padding: 12px 14px; border-radius: 16px; background: #fbf3e4; }
.msg + .msg { margin-top: 10px; }
.msg .q { margin: 0; font-weight: 600; }
.msg .a { margin: 6px 0 0; color: var(--pine-d); }
.reply { margin-top: 8px; }
.preview blockquote {
  margin: 8px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #fff7dd;
  font-weight: 500;
}
details.mine summary { cursor: pointer; font-weight: 700; font-size: 18px; }
details.mine[open] summary { margin-bottom: 8px; }

/* ---------- svelamento */
.reveal { text-align: center; }
.giftbox { position: relative; width: 180px; height: 180px; margin: 18px auto 14px; transition: opacity .5s, height .5s .3s, margin .5s .3s; }
.gb-box {
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 112px;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent 43%, var(--gold) 43% 57%, transparent 57%), var(--red);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .12), 0 12px 24px rgba(0, 0, 0, .25);
}
.gb-lid {
  position: absolute;
  left: 4px; right: 4px; top: 36px;
  height: 36px;
  z-index: 1;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent 43%, var(--gold) 43% 57%, transparent 57%), #e14a4f;
  box-shadow: 0 6px 10px rgba(0, 0, 0, .18);
  transition: transform 1s cubic-bezier(.2, .9, .3, 1.2), opacity 1s;
}
.gb-bow { position: absolute; left: 50%; top: -26px; width: 0; height: 0; }
.gb-bow::before, .gb-bow::after {
  content: '';
  position: absolute;
  top: 0;
  width: 38px; height: 28px;
  border: 7px solid var(--gold);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.gb-bow::before { right: 0; transform: rotate(-22deg); }
.gb-bow::after { left: 0; transform: rotate(22deg); }
.giftbox.shake { animation: shake .42s ease-in-out 3; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg) scale(1.03); }
  75% { transform: rotate(7deg) scale(1.03); }
}
.giftbox.open .gb-lid { transform: translate(60px, -170px) rotate(40deg); opacity: 0; }
.giftbox.gone { opacity: 0; height: 0; margin: 0 auto; }

.chain { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 16px;
  border-radius: 20px;
  background: #fff8ec;
  border: 2px solid var(--line);
  opacity: 0;
  transform: translateY(24px) scale(.96);
  transition: opacity .5s, transform .5s cubic-bezier(.2, .9, .3, 1.2);
}
.pair.in { opacity: 1; transform: none; }
.pair.new-chain { margin-top: 18px; }
.pair.new-chain::before {
  content: '✦ nuovo giro ✦';
  position: absolute;
  top: -26px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pair.mine { border-color: var(--gold); background: #fff3cf; box-shadow: 0 0 0 4px rgba(240, 194, 79, .35); }
.you-tag {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.who { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.who b { font-size: 17px; line-height: 1.15; word-break: break-word; }
.arrow { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--muted); max-width: 90px; line-height: 1.2; }
.arrow i { font-style: normal; font-size: 26px; margin-top: 4px; animation: hop 1.2s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateX(6px); } }
.who.to { display: grid; perspective: 600px; }
.who.to .face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  backface-visibility: hidden;
  transition: transform .7s cubic-bezier(.3, 1.4, .5, 1);
}
.who.to .front { transform: rotateY(180deg); }
.pair.done .who.to .back { transform: rotateY(-180deg); }
.pair.done .who.to .front { transform: rotateY(0); }
.note {
  grid-column: 1 / -1;
  margin: 10px 4px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed var(--line);
  font-style: italic;
  color: var(--ink);
  opacity: 0;
  transition: opacity .6s .5s;
}
.pair.done .note { opacity: 1; }
.reveal-ctrl {
  justify-content: center;
  position: sticky;
  bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom));
  z-index: 5;
  padding: 8px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.reveal-ctrl .btn { flex: 1 1 140px; }
.reveal-ctrl[hidden] { display: none; }
@media (min-width: 760px) { .reveal-ctrl { bottom: 16px; } }
.finale { margin-top: 22px; }
.big-title { font-family: var(--display); font-size: 46px; color: var(--red-d); margin: 0; line-height: 1; }

/* ---------- coriandoli, toast, colline */
.confetti {
  position: fixed;
  top: -16px;
  z-index: 60;
  width: 9px; height: 14px;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 108vh) rotate(var(--rot)); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 16px;
  background: #1b1310;
  color: var(--cream);
  font-weight: 500;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { .toast { bottom: 28px; } }

.hills { margin-top: 30px; }
.hills svg { display: block; width: 100%; height: 110px; }
.hills p { margin: 0; padding: 0 16px 16px; background: #fff; color: var(--muted); text-align: center; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
