/* JUST PV IT! — PWA mobile. Light theme, Bento Grid, Frosted Glass. */
:root {
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --ink: #333B42;
  --muted: #7A8691;
  --line: #E7EBEF;
  --red: #F21B3F;
  --red-dark: #A3142E;
  --red-soft: #FDECEF;
  --grad: linear-gradient(135deg, #F21B3F 0%, #A3142E 100%);
  --shadow: 0 1px 2px rgba(51, 59, 66, .04), 0 8px 24px rgba(51, 59, 66, .06);
  --shadow-red: 0 10px 24px -8px rgba(242, 27, 63, .55);
  --glass: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .85);
  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --ok: #1E9E6A;
  --ok-soft: #E6F6EF;
  --warn: #C27803;
  --warn-soft: #FFF5E1;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
/* sfondo "materico": macchie di colore tenui che danno profondità al vetro.
   Due strati più grandi dello schermo che derivano lentamente in direzioni opposte
   (solo transform: leggero per la batteria; fermi con "riduci movimento"). */
body::before, body::after {
  content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  will-change: transform;
}
body::before {
  background:
    radial-gradient(34% 26% at 82% 18%, rgba(242, 27, 63, .16), transparent 70%),
    radial-gradient(30% 26% at 18% 44%, rgba(122, 134, 145, .16), transparent 70%),
    radial-gradient(34% 28% at 70% 84%, rgba(242, 27, 63, .12), transparent 70%);
  animation: bgDriftA 24s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(28% 22% at 30% 22%, rgba(242, 27, 63, .10), transparent 70%),
    radial-gradient(32% 26% at 76% 56%, rgba(163, 20, 46, .08), transparent 70%),
    radial-gradient(30% 24% at 26% 80%, rgba(122, 134, 145, .12), transparent 70%);
  animation: bgDriftB 32s ease-in-out infinite alternate;
}
@keyframes bgDriftA {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-10%, 7%, 0) rotate(10deg); }
  100% { transform: translate3d(8%, -6%, 0) rotate(-8deg); }
}
@keyframes bgDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(9%, -8%, 0) scale(1.12); }
  100% { transform: translate3d(-8%, 6%, 0) scale(.94); }
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.splash { height: 100vh; display: grid; place-items: center; }
.splash img { width: 150px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }

/* gufo della splash: scende sbattendo le ali, atterra morbido, fa l'occhiolino (≈2.6s) */
.owl-fly { width: min(46vw, 210px); animation: owlDescend 1.6s cubic-bezier(.22, .7, .3, 1) both; }
.owl { width: 100%; height: auto; display: block; overflow: visible; transform-origin: 50% 100%; animation: owlLand .45s 1.55s ease-out both; }
@keyframes owlDescend {
  0% { transform: translateY(-62vh) rotate(-4deg); }
  35% { transform: translateY(-34vh) rotate(3deg); }
  70% { transform: translateY(-8vh) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes owlLand {
  0%, 100% { transform: none; }
  35% { transform: scale(1.06, .92); }
  70% { transform: scale(.98, 1.03); }
}
/* ali: si alternano le due pose; a terra resta l'ala bassa */
#gufo-ala-sx-alta, #gufo-ala-dx-alta { visibility: hidden; animation: wingOn .2s steps(1) 8; }
#gufo-ala-sx-bassa, #gufo-ala-dx-bassa { animation: wingOff .2s steps(1) 8; }
@keyframes wingOn { 0% { visibility: visible; } 50% { visibility: hidden; } }
@keyframes wingOff { 0% { visibility: hidden; } 50% { visibility: visible; } }
/* occhiolino con l'occhio destro */
#gufo-occhio-sx-chiuso, #gufo-occhio-dx-chiuso, #gufo-goccia-sudore { visibility: hidden; }
#gufo-occhio-dx-chiuso { animation: show .38s 2.1s; }
#gufo-occhio-dx-aperto { animation: hide .38s 2.1s; }
@keyframes show { from, to { visibility: visible; } }
@keyframes hide { from, to { visibility: hidden; } }

/* ── layout ── */
.screen {
  max-width: 560px; margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 16px calc(120px + var(--safe-b));
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 18px; }
.topbar .logo { height: 40px; width: auto; }
.hello { font-size: 13px; color: var(--muted); font-weight: 600; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 12px; }
.section-title h2 { font-size: 18px; }
.link { color: var(--red); font-weight: 700; font-size: 13px; }

/* ── bento grid ── */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bento > .span2 { grid-column: span 2; }
.card {
  background: var(--card); border-radius: var(--r-xl); padding: 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.card.tap { transition: transform .15s ease; cursor: pointer; }
.card.tap:active { transform: scale(.98); }
.card.soft { background: var(--red-soft); box-shadow: none; }
.stat-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.stat-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); font-size: 18px; margin-bottom: 12px; }

/* ── hero adattivo ── */
.hero { border-radius: var(--r-xl); padding: 22px; color: #fff; background: var(--grad); box-shadow: var(--shadow-red); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.hero h2, .hero h3 { color: #fff; }
.hero .muted { color: rgba(255, 255, 255, .8); }
.hero.light { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.hero.light::after { background: var(--red-soft); }
.hero.light h2, .hero.light h3 { color: var(--ink); }
.hero.light .muted { color: var(--muted); }
.hero > * { position: relative; z-index: 1; }
.qr-big {
  width: 100%; margin-top: 18px; padding: 18px; border-radius: 22px;
  background: rgba(255, 255, 255, .96); color: var(--red-dark);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 800; font-size: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}
.qr-big svg { width: 30px; height: 30px; }
.countdown { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 6px 0; }

/* ── bottoni ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 18px; font-weight: 700; font-size: 15px;
  background: #EEF1F4; color: var(--ink); transition: transform .12s ease, opacity .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-red); }
.btn-soft { background: var(--red-soft); color: var(--red); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 13px; font-size: 13px; }
.icon-btn { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; }

/* ── badge/chip ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 12px; white-space: nowrap; }
.badge.grey { background: #EEF1F4; color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.dark { background: var(--ink); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 10px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); font-weight: 700; font-size: 13px; text-align: center; min-width: 54px; }
.chip small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.chip.active { background: var(--ink); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, .7); }
.chip.has::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin: 4px auto 0; }

/* ── card corso ── */
.lesson { display: flex; flex-direction: column; gap: 12px; }
.lesson-head { display: flex; gap: 12px; align-items: flex-start; }
.emoji-tile { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 17px; background: var(--red-soft); display: grid; place-items: center; font-size: 25px; }
.lesson-title { font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.lesson-meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.lesson-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lesson.cancelled { opacity: .55; }
.lesson.cancelled .lesson-title { text-decoration: line-through; }
.mini-lesson { min-width: 230px; flex: 0 0 auto; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }

/* avatar sovrapposti */
.avatars { display: flex; align-items: center; }
.av {
  width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #fff; background: #DDE3E8;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--ink);
  overflow: hidden; flex: 0 0 auto; box-shadow: 0 2px 6px rgba(51, 59, 66, .12);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.avatars .av + .av { margin-left: -11px; }
.av.more { background: var(--ink); color: #fff; font-size: 11px; }
.av.lg { width: 84px; height: 84px; font-size: 28px; border-width: 4px; }
.av.md { width: 46px; height: 46px; font-size: 15px; }
.av-c1 { background: #FDECEF; color: var(--red-dark); }
.av-c2 { background: #E7F0FB; color: #2E5E9C; }
.av-c3 { background: #EAF6EF; color: #1E7A52; }
.av-c4 { background: #FFF3DF; color: #9A5B00; }
.av-c5 { background: #F0EBFA; color: #5B3E9C; }

/* progress quorum split */
.quorum { background: var(--red-soft); border-radius: 16px; padding: 10px 12px; }
.quorum-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--red); margin-bottom: 7px; }
.bar { height: 9px; border-radius: 99px; background: rgba(242, 27, 63, .14); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.quorum.reached { background: var(--ok-soft); }
.quorum.reached .quorum-top { color: var(--ok); }
.quorum.reached .bar { background: rgba(30, 158, 106, .15); }
.quorum.reached .bar > i { background: var(--ok); }

/* ── bottom nav flottante (thumb zone) ── */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--safe-b)); z-index: 40;
  width: min(calc(100% - 28px), 520px);
  display: flex; align-items: center; justify-content: space-around; gap: 4px;
  padding: 8px; border-radius: 28px;
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 40px rgba(51, 59, 66, .14);
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 20px; color: var(--muted); font-size: 10.5px; font-weight: 700; transition: background .2s, color .2s; }
.nav-item svg { width: 23px; height: 23px; }
.nav-item.active { color: var(--red); background: var(--red-soft); }
.nav-qr {
  flex: 0 0 58px; height: 58px; border-radius: 21px; margin: -24px 2px 0;
  background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-red);
  border: 4px solid rgba(255, 255, 255, .9);
}
.nav-qr svg { width: 26px; height: 26px; }

/* ── bottom sheet frosted glass ── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(51, 59, 66, .28); opacity: 0; transition: opacity .3s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 600px; margin: 0 auto; max-height: 92vh; display: flex; flex-direction: column;
  border-radius: 32px 32px 0 0;
  background: rgba(255, 255, 255, .82); border: 1px solid var(--glass-border); border-bottom: 0;
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 -10px 50px rgba(51, 59, 66, .18);
  transform: translateY(100%); transition: transform .38s cubic-bezier(.2, .9, .25, 1);
}
.sheet.show { transform: translateY(0); }
.sheet-grip { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-grip::before { content: ""; width: 42px; height: 5px; border-radius: 9px; background: rgba(51, 59, 66, .22); }
.sheet-body { overflow-y: auto; padding: 6px 20px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.sheet-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(51, 59, 66, .07); display: grid; place-items: center; z-index: 2; }
.sheet-close svg { width: 18px; height: 18px; }
.sheet h2 { padding-right: 40px; }
.sheet .block { background: rgba(255, 255, 255, .85); border-radius: var(--r-lg); padding: 16px; margin-top: 12px; }

/* ── form ── */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 4px 6px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field textarea, .field select {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; font-size: 16px;
}
.field textarea { height: auto; min-height: 100px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); margin-top: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--red); flex: 0 0 22px; margin: 1px 0 0; }
.check.strong { border-color: var(--red); background: var(--red-soft); }
.legal { max-height: 150px; overflow-y: auto; font-size: 12.5px; color: var(--muted); background: #fff; border-radius: 14px; padding: 12px; margin-top: 8px; border: 1px solid var(--line); }
.seg { display: flex; background: #EEF1F4; border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 42px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; text-align: left; width: 100%; }
.option.on { border-color: var(--red); background: var(--red-soft); }
.option .ico { width: 40px; height: 40px; border-radius: 13px; background: #F4F6F8; display: grid; place-items: center; font-size: 20px; }
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 24px; border: 2px dashed var(--line); background: #fff; cursor: pointer; }
.photo-pick .av { width: 110px; height: 110px; font-size: 34px; }
.photo-pick { cursor: default; }
.pick-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pick-btns label { cursor: pointer; }

/* scatto e ritaglio della foto profilo */
.cam, .crop { position: relative; border-radius: 28px; overflow: hidden; background: #111; aspect-ratio: 1; width: min(100%, 50vh); margin-inline: auto; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam.mirror video { transform: scaleX(-1); }
.ring { position: absolute; inset: 8%; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); border: 3px solid rgba(255, 255, 255, .9); pointer-events: none; }
.crop .ring { inset: 0; }
.cam-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; border: 5px solid var(--red); box-shadow: var(--shadow-red); transition: transform .12s; }
.shutter:active { transform: scale(.92); }
.crop { touch-action: none; cursor: grab; user-select: none; }
.crop:active { cursor: grabbing; }
.crop img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
.zoom { width: 100%; margin-top: 14px; accent-color: var(--red); }

.crop.rect .ring { border-radius: 0; }

/* immagine del corso */
.emoji-tile.has-img { overflow: hidden; background: var(--line); }
.emoji-tile.has-img img { width: 100%; height: 100%; object-fit: cover; }
/* nelle card: a filo dei bordi (la card arrotonda gli angoli in alto) */
/* altezza fissa e img assoluta: la foto non allarga mai la card */
.course-cover { position: relative; margin: -18px -18px 0; height: 130px; overflow: hidden; background: var(--line); box-shadow: none; }
.course-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-lesson .course-cover { height: 92px; }
/* nel dettaglio: a tutta larghezza in cima allo sheet, maniglia e X sopra la foto */
.course-cover.sheet-cover { margin: 0 -20px 16px; height: auto; aspect-ratio: 16 / 9; max-height: 45vh; border-radius: 31px 31px 0 0; }
.sheet.has-cover .sheet-grip { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.sheet.has-cover .sheet-grip::before { background: rgba(255, 255, 255, .9); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.sheet.has-cover .sheet-body { padding-top: 0; }
.sheet.has-cover .sheet-close { background: rgba(255, 255, 255, .88); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.cover-pick { margin-top: 6px; border-radius: 22px; overflow: hidden; position: relative; background: #fff; }
.cover-pick > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cover-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.cover-actions .btn { background: rgba(255, 255, 255, .92); cursor: pointer; }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--line); border-radius: 22px; cursor: pointer; text-align: center; }

/* invito a installare l'app */
.install-hero { display: grid; place-items: center; margin: 4px 0 14px; }
.install-hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow-red); }
.install-steps { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; gap: 10px; }
.install-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); font-size: 14px; }
.install-steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-weight: 800; display: grid; place-items: center; }
.ios-share { width: 18px; height: 18px; vertical-align: -3px; color: #0A84FF; }
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--grad); }

/* stelle */
.stars { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.stars button { font-size: 38px; line-height: 1; filter: grayscale(1); opacity: .35; transition: transform .15s, opacity .15s, filter .15s; }
.stars button.on { filter: none; opacity: 1; transform: scale(1.08); }
.stars-inline { color: #F5A524; letter-spacing: 1px; font-size: 13px; }

/* recensioni / liste */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.list-item:last-child { border-bottom: 0; }
.review-text { font-size: 14px; margin-top: 4px; }
.people { display: flex; flex-wrap: wrap; gap: 14px 10px; }
.person { width: 62px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.person .av { margin: 0 auto 5px; width: 50px; height: 50px; }

/* badge gamification */
.pledges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pledge { background: var(--card); border-radius: 22px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.pledge .pe { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--red-soft); }
.pledge.locked .pe { background: #EEF1F4; filter: grayscale(1); opacity: .55; }
.pledge b { display: block; font-size: 12px; line-height: 1.2; }
.pledge .bar { height: 5px; margin: 8px 6px 0; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 14px; }
.chart i { flex: 1; border-radius: 8px 8px 4px 4px; background: var(--red-soft); min-height: 6px; position: relative; }
.chart i.on { background: var(--grad); }

/* calendario mensile */
.cal { padding: 14px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head span { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding-bottom: 6px; }
.cal-cell { aspect-ratio: 1; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; position: relative; }
.cal-cell.empty { pointer-events: none; }
.cal-cell.past { opacity: .45; }
.cal-cell.today b { color: var(--red); }
.cal-cell.sel { background: var(--ink); color: #fff; opacity: 1; }
.cal-cell.sel.today b { color: #fff; }
.cal-cell.mine::after { content: ""; position: absolute; inset: 3px; border-radius: 12px; border: 2px solid var(--red); }
.dots { display: flex; gap: 2px; height: 6px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot.rec { background: #A9B3BC; }
.dot.spot { background: var(--red); }
.cal-cell.sel .dot.rec { background: rgba(255, 255, 255, .7); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend .ring { width: 10px; height: 10px; border-radius: 4px; border: 2px solid var(--red); display: inline-block; }

/* scanner */
.scanner { position: relative; border-radius: 28px; overflow: hidden; background: #111; aspect-ratio: 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border-radius: 28px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); border: 3px solid rgba(255, 255, 255, .9); }
.scanner .laser { position: absolute; left: 20%; right: 20%; height: 3px; background: var(--red); box-shadow: 0 0 14px var(--red); animation: laser 2s ease-in-out infinite; top: 20%; }
@keyframes laser { 50% { top: 78%; } }

/* auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); max-width: 460px; margin: 0 auto; }
.auth-logo { width: 170px; margin: 0 auto 10px; }
.auth .card { padding: 24px; }
.powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 11px; font-weight: 600; }
.powered img { height: 26px; width: auto; }

/* toast */
#toast {
  position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -150%); z-index: 100;
  background: rgba(51, 59, 66, .92); color: #fff; padding: 12px 18px; border-radius: 18px; font-weight: 600; font-size: 14px;
  max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); transition: transform .35s cubic-bezier(.2, .9, .25, 1);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
#toast.show { transform: translate(-50%, 0); }
#toast.err { background: var(--red-dark); }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .e { font-size: 40px; margin-bottom: 8px; }
.celebrate { text-align: center; padding: 10px 0; }
.celebrate .big { font-size: 64px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.pay-box { background: #fff; border-radius: 18px; padding: 14px; border: 1.5px solid var(--line); margin-top: 10px; }
.copy { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }

@media (min-width: 700px) {
  .screen { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
