/* REDIVO · Le mie carte (me.redivo.ch) — una colonna da telefono, palette REDIVO chiara */
:root {
  --ink: #222E3B; --ink-2: #4A5868; --muted: #5B6B7C; --line: #D3DCE4;
  --ground: #EFF3F6; --surface: #FFFFFF; --chip: #DCE4EB;
  --gift: #F2B544; --gift-bg: #FCEBC5; --gift-ink: #5A3A00;
  --ok-bg: #E3F0E8; --ok-ink: #1F4F35; --err: #9B2C2C;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.me { background: #E4E9EE; color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #7FA3C4; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.me-app { max-width: 460px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--ground); display: flex; flex-direction: column; }
@media (min-width: 520px) { .me-app { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(34, 46, 59, .12); } }
.me-main { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: calc(18px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 28px max(18px, env(safe-area-inset-left, 0px)); animation: me-in .4s var(--ease); }
body.in .me-main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@keyframes me-in { from { opacity: 0; transform: translateY(14px); } }
.me-foot { padding: 14px 18px 24px; font-size: 12px; color: var(--muted); text-align: center; }
.me-foot a { color: var(--muted); }
.me-foot nav, .me-foot p { margin: 4px 0 0; }

/* testata */
.me-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.me-brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.me-brand small { font-weight: 500; color: var(--muted); letter-spacing: 0; font-size: 13px; }
.me-langs { display: flex; gap: 2px; }
.me-langs a { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted); padding: 10px 6px; border-radius: 8px; }
.me-langs a.on { color: var(--ink); background: var(--chip); }
.me-langs-row { display: flex; justify-content: center; }
.me-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; text-decoration: none; }
.me-iconbtn { width: 44px; height: 44px; display: grid; place-items: center; margin-left: -12px; border-radius: 12px; }

/* titoli e testi */
.me-hero h1, .me-screen h1 { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.me-h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.me-h2 { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.me-lead { margin: 0; color: var(--ink-2); }
.me-small { margin: 0; font-size: 13px; color: var(--muted); }
.me-small.center, .center { text-align: center; }
.me-note { margin: 0; background: var(--gift-bg); color: var(--gift-ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.me-kicker { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--chip); border-radius: 999px; padding: 6px 12px; }
.me-hero, .me-screen { display: flex; flex-direction: column; gap: 14px; }
.me-mail { word-break: break-all; color: var(--ink); }
.ic { flex-shrink: 0; }
.ic.sm { width: 16px; height: 16px; vertical-align: -3px; }

/* moduli */
.me-form { display: flex; flex-direction: column; gap: 10px; }
.me-form label { font-size: 14px; font-weight: 600; }
.me-form input:not([type=checkbox]), .me-form select { height: 52px; border-radius: 12px; border: 1.5px solid #B4C0CB; background: var(--surface); padding: 0 14px; font-size: 17px; width: 100%; }
.me-form input:focus, .me-form select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--chip); }
.me-form input[aria-invalid="true"] { border-color: var(--err); }
.me-code { text-align: center; font-size: 30px !important; font-weight: 800; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.me-err { margin: 0; color: var(--err); font-size: 14px; font-weight: 600; }
.me-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.me-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--ink-2); line-height: 1.45; }
.me-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.me-static { margin: 0 0 4px; font-weight: 600; word-break: break-all; }
.me-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; width: 100%; position: relative; overflow: hidden; }
.me-btn.sec { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
.me-btn.light { background: #fff; color: var(--ink); }
.me-btn.danger { background: var(--err); }
.me-btn.sm { min-height: 40px; width: auto; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.me-btn:not(.sm):not(.sec)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-20deg); animation: me-sweep 4.5s 1.5s ease-in-out infinite; }
@keyframes me-sweep { 0% { left: -80px; } 30%, 100% { left: 110%; } }
.me-link { background: none; border: 0; padding: 10px 0; font-weight: 600; text-decoration: underline; color: var(--ink); }
.me-link.sm { font-size: 13px; padding: 6px 0; }
.me-center { display: flex; justify-content: center; }
.me-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.me-two .me-btn { font-size: 14px; padding: 0 10px; }
.me-flash { margin: 0; border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.me-flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.me-flash.err { background: #FBE5E5; color: var(--err); }
.me-steps { display: flex; gap: 6px; }
.me-steps i { flex: 1; height: 4px; border-radius: 4px; background: #CBD5DE; }
.me-steps i.on { background: var(--ink); }

/* mazzo di carte animato (pagina d'ingresso) */
.me-deck { position: relative; height: 210px; }
.me-deck .dk { position: absolute; left: 6%; right: 6%; top: 10px; height: 152px; border-radius: 20px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 30px rgba(34, 46, 59, .22);
  transition: transform .85s var(--ease); animation: me-deal .9s var(--ease) backwards; }
.me-deck .dk.d1 { background: #1C1D22; transform: translateY(42px); z-index: 3; animation-delay: .3s; }
.me-deck .dk.d2 { background: #2F3E4E; transform: translateY(16px) translateX(-16px) rotate(-6deg) scale(.93); z-index: 2; animation-delay: .15s; }
.me-deck .dk.d3 { background: #7A4E3A; transform: translateX(16px) rotate(6deg) scale(.86); z-index: 1; }
.me-deck .dk .big { font-size: 30px; font-weight: 800; }
.me-deck .dk span { font-size: 13px; opacity: .9; }
.me-deck .st { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.me-deck .st i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); }
.me-deck .st i.on { background: #4F916D; border: 0; animation: me-pop .45s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(1s + var(--d)); }
@keyframes me-deal { from { transform: translateY(260px) rotate(16deg); opacity: 0; } }
@keyframes me-pop { from { transform: scale(0); } }
.me-trio { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.me-trio li { background: var(--surface); border-radius: 14px; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me-trio b { font-size: 18px; font-weight: 800; }
.me-trio span { font-size: 12px; color: var(--ink-2); line-height: 1.3; }

/* home */
.me-wallet { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.me-wallet::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 160px; height: 160px; background: url(/static/img/r.png) center/contain no-repeat; opacity: .08; }
.me-wallet .lbl { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #B9C5D1; }
.me-wallet .amt { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.me-wallet .amt small { font-size: 20px; font-weight: 700; margin-right: 6px; color: #B9C5D1; }
.me-wallet .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.me-wallet .meta span { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.me-wallet .meta span.g { background: var(--gift); color: #3D2700; }
.me-install { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 10px 12px; border: 1.5px dashed #9AAABA; }
.me-install a { flex: 1; text-decoration: none; display: flex; flex-direction: column; padding: 4px 0; }
.me-install small { color: var(--muted); font-size: 13px; }
.me-install .x { width: 40px; height: 40px; border: 0; background: none; font-size: 22px; color: var(--muted); border-radius: 10px; }
.ico { width: 38px; height: 38px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; flex-shrink: 0; }
.me-nudge { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; text-decoration: none; }
.me-nudge .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-nudge small { color: var(--muted); font-size: 13px; }
.me-nudge .v { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg { width: 42px; height: 42px; border-radius: 12px; background: var(--c, #25303d); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.me-list { display: flex; flex-direction: column; gap: 12px; }
.me-list > * { animation: me-in .5s var(--ease) backwards; }
.me-list > *:nth-child(2) { animation-delay: .06s; } .me-list > *:nth-child(3) { animation-delay: .12s; } .me-list > *:nth-child(4) { animation-delay: .18s; } .me-list > *:nth-child(n+5) { animation-delay: .24s; }
.me-card { display: flex; flex-direction: column; gap: 10px; border-radius: 18px; padding: 16px 18px; background: var(--c, #25303d); color: #fff; text-decoration: none; box-shadow: 0 8px 20px rgba(34, 46, 59, .14); }
.me-card .row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.me-card .row > span:first-child { min-width: 0; display: flex; flex-direction: column; }
.me-card small { font-size: 12px; opacity: .8; }
.me-card .val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.me-card .hint { font-size: 13px; opacity: .9; }
.me-card .bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.me-card .bar i { display: block; height: 100%; background: #fff; border-radius: 8px; }
.me-card.ready { outline: 3px solid var(--gift); outline-offset: -3px; }
.me-st { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.me-st i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .4); }
.me-st i.on { background: #fff; border: 0; }
.me-empty { background: var(--surface); border-radius: 16px; padding: 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 12px; }
.me-empty p { margin: 0; }

/* carta */
.me-bigval { margin: 0; text-align: center; font-size: 38px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.me-bigval small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.me-box { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.me-box > p { margin: 0; }
.me-box summary { cursor: pointer; padding: 6px 0; list-style-position: outside; }
.me-rewards, .me-moves { list-style: none; margin: 0; padding: 0; }
.me-rewards li, .me-moves li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #E6ECF1; font-size: 15px; }
.me-rewards li:last-child, .me-moves li:last-child { border-bottom: 0; }
.me-rewards li.on b { color: var(--ok-ink); }
.me-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 14px 16px; text-decoration: none; font-weight: 600; }
.me-row span { flex: 1; }
/* la carta del negozio (stessa visuale della carta web) */
.me .loyalty-card { margin: 0 auto; max-width: 380px; width: 100%; }

/* Esplora */
.me-loc { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; border: 1.5px solid var(--ink); }
.me-loc .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-loc small { color: var(--muted); font-size: 12px; }
.me-loc.on { border-color: var(--ok-ink); }
.me-loc.on .ico { background: var(--ok-bg); color: var(--ok-ink); }
.me-search { display: flex; align-items: center; gap: 10px; height: 50px; background: var(--surface); border-radius: 14px; padding: 0 14px; border: 1px solid var(--line); }
.me-search input { border: 0; outline: none; flex: 1; background: transparent; font-size: 16px; min-width: 0; height: 100%; }
.me-rail { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * max(18px, env(safe-area-inset-left, 0px))); padding: 2px max(18px, env(safe-area-inset-left, 0px)) 4px; scroll-snap-type: x proximity; }
.me-rail::-webkit-scrollbar { display: none; }
.me-cat { flex: 0 0 auto; min-width: 92px; min-height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 12px; text-decoration: none; scroll-snap-align: start; transition: transform .2s; }
.me-cat span { font-size: 13px; font-weight: 600; white-space: nowrap; }
.me-cat small { font-size: 11px; color: var(--muted); }
.me-cat[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 20px rgba(34, 46, 59, .25); }
.me-cat[aria-current] small { color: #B9C5D1; }
.me-cat:active { transform: scale(.95); }
.me-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.me-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #C3CED8; background: var(--surface); font-size: 13px; font-weight: 500; text-decoration: none; }
.me-chips a.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2FA765; }
.me-count { margin: 0; font-size: 14px; }
.me-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.me-place { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 14px; flex-wrap: wrap; }
.me-place .tx { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.me-place small { font-size: 13px; color: var(--muted); }
.me-place small.open { color: #1F6B42; } .me-place small.closed { color: #8A5A2B; }
.me-place small.closed .dot { background: #C98B4A; }
.me-place small .dot { margin-right: 5px; }
.me-place .rw { color: var(--ink-2); }
.me-place .act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.me-place em.new { align-self: flex-start; font-style: normal; font-size: 10px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 7px; vertical-align: 2px; }
.me-place em.mine { font-style: normal; font-size: 12px; font-weight: 700; background: var(--ok-bg); color: var(--ok-ink); border-radius: 999px; padding: 6px 10px; }
.me-wish { background: var(--ink); color: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.me-wish h2 { margin: 0; font-size: 19px; }
.me-wish p { margin: 0; color: #DCE4EB; }
.me-wish label { color: #fff; }
.me-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.me-reqs li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 10px 12px; }
.me-reqs .n { font-size: 20px; min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.me-reqs .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-reqs small { color: var(--muted); font-size: 12px; }
.me-vote { min-height: 40px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--surface); font-size: 13px; font-weight: 600; padding: 0 12px; }
.me-vote[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* installazione */
.me-isteps { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* benvenuto */
.me-found { list-style: none; margin: 0; padding: 14px 16px; background: var(--surface); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.me-found li { display: flex; align-items: center; gap: 10px; }
.me-found li i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, #25303d); }
.me-found small { margin-left: auto; color: var(--muted); }

/* menu in basso */
.me-tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 460px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); z-index: 10; }
.me-tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
.me-tabs a[aria-current] { color: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v50 · Sfide e Gratta & Vinci ---------- */
.me-tabs a { position: relative; }
.me-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gift); color: var(--gift-ink); font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.me-scratch-nudge { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-decoration: none; color: var(--gift-ink);
  background: linear-gradient(135deg, #FCEBC5, #F7D88E); box-shadow: 0 8px 24px rgba(242, 181, 68, .28); animation: ch-pulse 2.4s var(--ease) infinite; }
.me-scratch-nudge .ico { width: 42px; height: 42px; border-radius: 12px; background: #fff8; display: grid; place-items: center; flex: none; }
.me-scratch-nudge .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-scratch-nudge small { font-size: 13px; }
@keyframes ch-pulse { 50% { box-shadow: 0 8px 30px rgba(242, 181, 68, .5); } }
@media (prefers-reduced-motion: reduce) { .me-scratch-nudge { animation: none; } }
.me-nudge .lg.gold, .ch-ticket .ico { background: var(--gift-bg); color: var(--gift-ink); }
.me-nudge .lg.gold { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }

.ch-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 18px; padding: 14px 16px; text-decoration: none; border: 1px solid transparent; }
.ch-card.on { border-color: var(--ink); }
.ch-card .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.ch-card .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ch-card b { font-size: 17px; line-height: 1.25; }
.ch-card .who { color: var(--muted); font-size: 13px; }
.top { flex: none; font-size: 12px; font-weight: 800; background: var(--gift-bg); color: var(--gift-ink); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog small { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.ch-dots { display: flex; gap: 6px; }
.ch-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; }
.ch-dots i.on { background: var(--ink); }

.ch-ticket { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 14px; text-decoration: none; border: 2px dashed var(--gift); }
.ch-ticket .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ch-ticket .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-ticket small { color: var(--muted); font-size: 13px; }
.ch-ticket .go { font-size: 13px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 999px; padding: 7px 12px; white-space: nowrap; }

.ch-win { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border-radius: 18px; padding: 16px; border-left: 6px solid var(--gift); }
.ch-win .row { display: flex; justify-content: space-between; gap: 10px; }
.ch-win .v { font-weight: 800; white-space: nowrap; }
.ch-win small { color: var(--muted); font-size: 13px; }
.code { display: inline-block; align-self: flex-start; margin: 6px 0 2px; padding: 8px 14px; border-radius: 12px; background: var(--ground); font: 800 22px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; user-select: all; }

.ch-hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.ch-hero .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #C8D3DC; }
.ch-hero h1 { margin: 0; font-size: 26px; line-height: 1.15; text-wrap: balance; }
.ch-hero p { margin: 0; color: #DCE4EB; }
.ch-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: #DCE4EB; }
.ch-hero .meta .g { background: var(--gift); color: var(--gift-ink); font-weight: 800; border-radius: 999px; padding: 4px 10px; }
.ch-hero .ch-dots i { border-color: #fff; } .ch-hero .ch-dots i.on { background: #fff; }
.ch-hero .prog small { color: #fff; }
.ch-places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ch-places li { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 18px; padding: 12px 14px; flex-wrap: wrap; }
.ch-places .lg { width: 42px; height: 42px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.ch-places li.on .lg { background: var(--ok-ink); }
.ch-places .tx { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.ch-places small { color: var(--muted); font-size: 13px; }
.ch-places small.pz { color: var(--gift-ink); font-weight: 600; }
.ch-places .act { margin-left: auto; }
.ch-places em { font-style: normal; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.ch-places em.mine { background: var(--ok-bg); color: var(--ok-ink); }
.ch-places em.has { background: var(--chip); color: var(--ink); }
.ch-rule p { margin: 0 0 8px; } .ch-rule p:last-child { margin: 0; }
.ch-how { margin: 0 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.center { text-align: center; }
.me-kicker.center { align-self: center; }

/* biglietto da grattare */
.ch-scratch { position: relative; width: 100%; max-width: 360px; aspect-ratio: 5 / 4; margin: 4px auto 0; border-radius: 22px; overflow: hidden;
  background: linear-gradient(135deg, #FFF6DF, #FCEBC5); box-shadow: 0 14px 40px rgba(34, 46, 59, .16); border: 2px dashed var(--gift); }
.ch-under { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; }
.ch-scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .5s var(--ease); }
.ch-scratch canvas.gone { opacity: 0; pointer-events: none; }
.ch-res { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ch-res .big { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--muted); }
.ch-res.win .big { background: var(--gift); color: var(--gift-ink); animation: ch-pop .6s var(--ease); }
.ch-res .h { font-size: 22px; }
.ch-res .pz { font-size: 18px; font-weight: 700; }
.ch-res small { color: var(--ink-2); font-size: 13px; }
.ch-res .code { align-self: center; background: #fff; }
@keyframes ch-pop { from { transform: scale(.4); } 70% { transform: scale(1.15); } }

/* ---------- v53 · Amici REDIVO ---------- */
.me-tabs span { font-size: 11px; }
.fr-note { display: flex; gap: 8px; align-items: center; }
.fr-av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.fr-invite { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.fr-invite .tx { display: flex; flex-direction: column; gap: 4px; }
.fr-invite b { font-size: 18px; }
.fr-invite small { color: #DCE4EB; font-size: 14px; }
.fr-invite .me-btn { background: #fff; color: var(--ink); display: inline-flex; gap: 8px; justify-content: center; align-items: center; }
.fr-code { margin: 0; font-size: 13px; color: #C8D3DC; }
.fr-code b { font: 800 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: #fff; user-select: all; }
.fr-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--chip); border-radius: 14px; padding: 4px; gap: 4px; }
.fr-seg a { text-align: center; padding: 9px 6px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); }
.fr-seg a[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(34, 46, 59, .08); }
.fr-feed, .fr-board, .fr-list, .fr-pick { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fr-item, .fr-list li, .fr-board li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 12px 14px; }
.fr-item .tx, .fr-list .tx, .fr-board .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-item .tx span { line-height: 1.35; }
.fr-item small, .fr-list small, .fr-board small { color: var(--muted); font-size: 12px; }
.fr-item .ki { color: var(--muted); }
.fr-item.k-prize_won .ki, .fr-item.k-challenge_done .ki, .fr-item.k-team_done .ki { color: var(--gift-ink); }
.fr-item.k-rec_to_me { border: 2px solid var(--ink); }
.fr-board .pos { width: 22px; text-align: center; font-weight: 800; color: var(--muted); }
.fr-board li.me { border: 2px solid var(--ink); }
.fr-board .md { font-size: 18px; letter-spacing: 2px; }
.fr-board li:first-child .pos { color: var(--gift-ink); }
.fr-add .row { display: flex; gap: 8px; }
.fr-add .row input { flex: 1; min-width: 0; }
.fr-pick li { background: var(--surface); border-radius: 16px; padding: 10px 14px; }
.fr-pick .me-check { display: flex; align-items: center; gap: 12px; }
.fr-teaminv { display: flex; flex-direction: column; gap: 8px; }
.fr-teaminv .row { display: flex; gap: 10px; align-items: center; background: var(--gift-bg); color: var(--gift-ink); border-radius: 16px; padding: 12px 14px; flex-wrap: wrap; }
.fr-teaminv .tx { flex: 1; min-width: 150px; display: flex; flex-direction: column; }
.fr-teambox p { margin: 0 0 8px; }
.fr-teambox .fr-list li { background: var(--ground); }
.fr-go { align-self: flex-start; margin-top: 6px; }
