/* MÖVAT! — companion web app. Token dal design system Stitch "MÖVAT Cards". */
:root {
  --green: #439626;
  --green-light: #52ae32;
  --green-dark: #1e6a00;
  --green-deep: #155200;
  --lime: #b7f338;
  --lime-soft: #eaf8e4;
  --mint: #f0f7ec;
  --cream: #f8faf5;
  --paper: #ffffff;
  --stroke: #cbe0c2;
  --stroke-soft: #e2edd9;
  --ink: #182317;
  --ink-muted: #52614e;
  --red: #e02e2a;
  --red-soft: #ffe5e3;
  --yellow: #ffc300;
  --blue: #1292e8;
  --card-ratio: 0.716;
  --radius-card: 24px;
  --radius-sm: 14px;
  --shadow-1: 0 6px 16px -2px rgba(67,150,38,.10), 0 2px 6px -1px rgba(24,35,23,.05);
  --shadow-2: 0 10px 24px -4px rgba(67,150,38,.22);
  --font-head: 'Baloo 2', 'Nunito Sans', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #e9efe5; color: var(--ink);
  font: 500 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ms {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1; display: inline-block; letter-spacing: normal;
  text-transform: none; white-space: nowrap; direction: ltr;
  font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 500; user-select: none; flex: none;
}
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 500; }

/* ---------- Shell ---------- */
.shell {
  max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
  background: var(--cream); position: relative; display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0,0,0,.03), 0 20px 60px rgba(24,35,23,.12);
}
main { flex: 1; outline: none; }
.shell.has-tabs main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); }
.page { padding: 18px 16px 28px; }

/* ---------- Topbar (pagine interne) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: url('../assets/img/sfondo-verde.jpg') center 35% / cover, var(--green);
  border-bottom: 3px solid var(--green-dark);
  box-shadow: 0 4px 14px rgba(24,35,23,.15);
}
.topbar .icon-btn { background: #fff; color: var(--green-dark); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.topbar .brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; text-decoration: none; }
.topbar .brand img { height: 34px; width: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.topbar .brand .section {
  font: 800 18px/1 var(--font-head); color: #fff; letter-spacing: .01em;
  text-shadow: 0 2px 0 var(--green-deep), 0 0 6px rgba(0,0,0,.25);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 3px;
}
.topbar .truck { height: 40px; width: auto; margin-left: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }

.icon-btn {
  text-decoration: none;
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--mint); color: var(--green-dark); flex: none;
}
.icon-btn:active { transform: translateY(1px); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: 480px; height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 6px 8px var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--stroke-soft); box-shadow: 0 -4px 20px rgba(24,35,23,.08);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 18px; text-decoration: none; color: var(--ink-muted);
  font: 700 12px/1 var(--font-body); min-height: 52px;
}
.tab .ms { font-size: 25px; }
.tab[aria-current="page"] { background: var(--lime-soft); color: var(--green-dark); font-weight: 800; }
.tab[aria-current="page"] .ms { font-variation-settings: 'FILL' 1, 'wght' 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
  font: 800 16px/1 var(--font-body); letter-spacing: .01em; text-decoration: none;
  background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--green-dark); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px var(--green-light), 0 3px 0 var(--stroke); }
.btn.ghost { background: var(--mint); color: var(--green-dark); box-shadow: none; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.danger { background: var(--red); box-shadow: 0 4px 0 #9b1512; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--stroke); background: #fff;
  font: 800 14px/1 var(--font-body); color: var(--green-dark); white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--lime-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; font: 800 13px/1.1 var(--font-body); color: var(--ink-muted); padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-dark); }

/* ---------- Titles ---------- */
.page-title { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; font-size: 30px; font-weight: 800; color: var(--ink); }
.page-title::before, .page-title::after { content: ''; width: 14px; height: 22px; flex: none; background:
  linear-gradient(var(--lime), var(--lime)) 0 0 / 100% 7px no-repeat,
  linear-gradient(var(--green-light), var(--green-light)) 0 12px / 100% 7px no-repeat; border-radius: 4px; transform: skewY(-25deg); }
.page-sub { text-align: center; color: var(--ink-muted); margin-top: 4px; font-weight: 600; }
.section-title { font-size: 20px; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--ink-muted); }
.demo-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: #fff4cc; color: #6b5200; font: 800 11px/1.3 var(--font-body); letter-spacing: .03em; text-transform: uppercase;
}

/* ---------- Search ---------- */
.search { position: relative; margin: 16px 0 12px; }
.search .ms { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }
.search input {
  width: 100%; height: 52px; border-radius: 999px; border: 1.5px solid #d9e1d4; background: #fff;
  padding: 0 48px 0 48px; font-weight: 600; font-size: 16px;
}
.search input:focus { outline: none; border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(82,174,50,.25); }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }

/* ---------- Home ---------- */
.home-hero {
  position: relative; overflow: hidden; padding: 14px 16px 30px; text-align: center;
  background: url('../assets/img/sfondo-verde.jpg') center 40% / cover;
  border-radius: 0 0 32px 32px;
}
.home-hero .logo { width: min(66%, 280px); margin: 0 auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.home-hero .truck { width: min(46%, 200px); margin: -6px auto 0; filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); animation: drive 3.2s ease-in-out infinite; }
@keyframes drive { 0%,100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(6px) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .home-hero .truck { animation: none; } * { scroll-behavior: auto !important; } }
.home-hero .busa-badge { position: absolute; right: 14px; bottom: 18px; background: #fff; border-radius: 8px; padding: 4px 8px; font: 900 13px/1 var(--font-head); color: var(--green); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.welcome {
  margin: -22px auto 0; position: relative; z-index: 2; width: fit-content; max-width: 92%;
  background: #fff; border-radius: 999px; padding: 10px 22px 8px; box-shadow: var(--shadow-1);
  font: 800 22px/1 var(--font-head); color: var(--green-dark); display: flex; align-items: center; gap: 10px;
}
.welcome::before, .welcome::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--green-light) inset; }
.home-links { display: grid; padding: 12px 16px 8px; }
.home-link {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 10px 4px 10px 0;
  text-decoration: none; color: var(--green-deep); border-bottom: 1px solid var(--stroke-soft);
  -webkit-tap-highlight-color: transparent; transition: background .12s;
}
.home-link:active { background: var(--lime-soft); }
.home-link:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 8px; }
.home-link img { width: 72px; height: 56px; object-fit: contain; flex: none; }
.home-link .txt { flex: 1; min-width: 0; }
.home-link strong { display: block; font: 800 24px/1 var(--font-head); color: var(--green-deep); padding-top: 4px; }
.home-link span.sub { display: block; font: 600 13px/1.3 var(--font-body); color: var(--ink-muted); margin-top: 2px; }
.home-link .go { flex: none; color: var(--green); display: grid; place-items: center; }
.footer { text-align: center; padding: 22px 16px calc(24px + var(--safe-b)); font-size: 13px; color: var(--ink-muted); }
.footer .busa { font: 900 22px/1 var(--font-head); color: var(--green); letter-spacing: -.02em; }
.footer .busa small { display: block; font: 800 9px/1.2 var(--font-body); letter-spacing: .14em; color: var(--ink-muted); margin-top: 2px; }
.footer a { font-weight: 700; }

/* ---------- Carte (illustrazione segnaposto) ---------- */
.card-art {
  position: relative; aspect-ratio: var(--card-ratio); border-radius: 12%/8.6%; overflow: hidden;
  background: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--stroke), 0 3px 8px rgba(24,35,23,.12);
  container-type: inline-size;
}
.card-art .art-bg { position: absolute; inset: 0; background:
  repeating-conic-gradient(from 0deg at 50% 58%, rgba(255,255,255,.22) 0 9deg, transparent 9deg 18deg),
  radial-gradient(circle at 50% 58%, #c6f36a, #7cc52a 70%); }
.card-art .art-name {
  position: absolute; left: 6%; right: 6%; top: 6%; text-align: center;
  font: 800 13cqi/0.95 var(--font-head); color: #fff; text-transform: uppercase;
  -webkit-text-stroke: 1.2cqi #173a0c; paint-order: stroke fill; text-shadow: 0 1cqi 0 #173a0c;
}
.card-art .art-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46cqi; height: 46cqi;
  border-radius: 50%; display: grid; place-items: center; color: #fff;
  border: 2.5cqi solid #fff; box-shadow: 0 1.5cqi 0 rgba(0,0,0,.25);
}
.card-art .art-icon .ms { font-size: 26cqi; font-variation-settings: 'FILL' 1, 'wght' 600; }
.card-art .art-truck { position: absolute; width: 56%; right: -4%; bottom: 3%; }
.card-art .art-num {
  position: absolute; left: 5%; bottom: 4%; min-width: 17cqi; height: 13cqi; padding: 0 3cqi; border-radius: 99px;
  background: #fff; color: var(--ink); font: 900 8cqi/13cqi var(--font-body); text-align: center; box-shadow: 0 1cqi 0 rgba(0,0,0,.2);
}
.card-art img.real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Ascolta: elenco ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card-grid > * { min-width: 0; }
.talk-card {
  background: #fff; border-radius: var(--radius-card); border: 1.5px solid var(--stroke); box-shadow: var(--shadow-1);
  padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.talk-card .open { text-decoration: none; color: inherit; display: block; border-radius: 16px; }
.talk-card .meta { display: flex; align-items: center; gap: 8px; }
.talk-card .meta .t { flex: 1; min-width: 0; }
.talk-card .num { font: 800 12px/1 var(--font-body); color: var(--ink-muted); letter-spacing: .04em; }
.talk-card .name { font: 800 16px/1.1 var(--font-head); margin-top: 3px; padding-top: 2px; overflow-wrap: anywhere; hyphens: auto; }
.play-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; flex: none;
  background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dark);
}
.play-btn .ms { font-size: 28px; font-variation-settings: 'FILL' 1; }
.play-btn.playing { background: var(--green-dark); }
.play-btn:disabled { background: #e3e9df; color: #8b9786; box-shadow: none; cursor: not-allowed; }
.no-audio { font: 700 12px/1.2 var(--font-body); color: var(--ink-muted); display: flex; gap: 4px; align-items: center; }
.no-audio .ms { font-size: 18px; }
.empty {
  text-align: center; padding: 28px 18px; background: #fff; border-radius: var(--radius-card); border: 1.5px dashed var(--stroke);
}
.empty .ms { font-size: 44px; color: var(--green-light); }
.empty h3 { font-size: 20px; margin: 8px 0 4px; }

/* ---------- Ascolta: dettaglio ---------- */
.crumbs { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.counter { font: 800 12px/1 var(--font-body); letter-spacing: .06em; color: var(--ink-muted); background: var(--lime-soft); padding: 8px 12px; border-radius: 999px; }
.detail-card { background: #fff; border-radius: 28px; border: 1.5px solid var(--stroke); box-shadow: var(--shadow-1); padding: 18px; }
.detail-card .card-art { width: calc(var(--cs-detail, 68) * 1%); margin: 0 auto; }
.detail-card h1 { text-align: center; font-size: 30px; margin-top: 14px; }
.detail-card .num-line { text-align: center; color: var(--ink-muted); font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.bubble {
  position: relative; background: var(--lime-soft); border-radius: 20px; padding: 14px 16px; margin-top: 18px;
}
.bubble::before { content: ''; position: absolute; top: -10px; left: 36px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--lime-soft); }
.bubble .lbl { font: 800 11px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); display: flex; gap: 6px; align-items: center; }
.bubble .lbl .ms { font-size: 18px; }
.bubble .dialect { font: 800 21px/1.2 var(--font-head); text-transform: uppercase; margin-top: 6px; }
.bubble .transl { margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed var(--stroke); }
.bubble .transl p { font-weight: 700; font-style: italic; margin-top: 4px; }
.placeholder-text { color: var(--ink-muted); font-style: italic; font-weight: 600; }

.player { margin-top: 16px; background: #f3f8f0; border-radius: 22px; padding: 14px 16px; border: 1.5px solid var(--stroke-soft); }
.player .row { display: flex; align-items: center; gap: 14px; }
.player .play-btn { width: 60px; height: 60px; }
.player .play-btn .ms { font-size: 34px; }
.player .track { flex: 1; }
.player input[type=range] { width: 100%; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; margin: 0; }
.player input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(var(--green-light), var(--green-light)) 0 / var(--p, 0%) 100% no-repeat, var(--stroke-soft); }
.player input[type=range]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--stroke-soft); }
.player input[type=range]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--green-light); }
.player input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--green); }
.player input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--green); }
.player .times { display: flex; justify-content: space-between; font: 700 13px/1 var(--font-body); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.player.unavailable { text-align: center; color: var(--ink-muted); }
.player.unavailable .ms { font-size: 34px; color: #9aa996; }
.player.unavailable strong { display: block; color: var(--ink); font: 800 17px/1.2 var(--font-head); margin: 4px 0 2px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.prevnext a { display: flex; align-items: center; gap: 8px; min-height: 64px; padding: 8px 12px; border-radius: 18px; background: #fff; border: 1.5px solid var(--stroke); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.prevnext a.next { justify-content: flex-end; text-align: right; }
.prevnext small { display: block; font: 800 11px/1.2 var(--font-body); color: var(--ink-muted); letter-spacing: .05em; text-transform: uppercase; }
.prevnext b { font: 800 15px/1.1 var(--font-head); display: block; padding-top: 2px; }
.prevnext a[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ---------- Scopri ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mode-card { background: #fff; border-radius: var(--radius-card); border: 1.5px solid var(--stroke); box-shadow: var(--shadow-1); overflow: hidden; }
.mode-card + .mode-card { margin-top: 16px; }
.mode-banner { position: relative; height: 92px; padding: 14px 16px; overflow: hidden; display: flex; align-items: flex-end;
  background: radial-gradient(rgba(255,255,255,.45) 18%, transparent 20%) 0 0 / 14px 14px, linear-gradient(120deg, var(--b1, #28c4d8), var(--b2, #a6e84a)); }
.mode-banner img { position: absolute; right: -6px; bottom: -6px; width: 120px; transform: scaleX(-1); filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.mode-body { padding: 14px 16px 16px; }
.mode-body h2 { font-size: 22px; }
.by { color: var(--ink-muted); font-weight: 600; font-size: 14px; }
.by b { color: var(--ink); }
.mode-body .desc { margin-top: 8px; color: #33402f; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font: 700 14px/1.2 var(--font-body); color: var(--ink); }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts .ms { font-size: 20px; color: var(--green); }
.rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.rating .ms { color: var(--yellow); font-variation-settings: 'FILL' 1; font-size: 20px; }
.rating .n { color: var(--ink-muted); font-weight: 700; }
.mini-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.mini { position: relative; }
.mini .qty, .qty-badge {
  position: absolute; right: -4px; bottom: -4px; background: var(--ink); color: #fff; border: 2px solid #fff;
  border-radius: 999px; padding: 2px 7px; font: 900 12px/1.2 var(--font-body);
}
.mini.more { display: grid; place-items: center; aspect-ratio: var(--card-ratio); border-radius: 10px; background: var(--lime-soft); font: 900 16px/1 var(--font-body); color: var(--green-dark); }

.mode-head h1 { font-size: 30px; }
.info-box { background: var(--lime-soft); border-radius: 18px; padding: 14px 16px; margin-top: 14px; }
.info-box h3 { font-size: 16px; display: flex; gap: 6px; align-items: center; }
.info-box h3 .ms { font-size: 20px; color: var(--green); }
.info-box p { margin-top: 6px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.card-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1.5px solid var(--stroke); border-radius: 20px; overflow: hidden; }
.card-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; }
.card-list li + li { border-top: 1px solid var(--stroke-soft); }
.card-list .n { font: 800 13px/1 var(--font-body); color: var(--ink-muted); width: 34px; }
.card-list .nm { flex: 1; font-weight: 800; }
.card-list .q { font: 900 16px/1 var(--font-body); color: var(--green-dark); background: var(--lime-soft); padding: 6px 10px; border-radius: 999px; }
.card-list .total { background: var(--mint); }
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
.thumb { border: 0; background: none; padding: 0; text-align: center; }
.thumb .wrap { position: relative; }
.thumb .lbl { font: 800 13px/1.15 var(--font-body); margin-top: 6px; display: block; }
.thumb .lbl small { display: block; color: var(--ink-muted); font-weight: 700; }

.vote-box { margin-top: 22px; background: #fff; border-radius: var(--radius-card); border: 2px solid var(--green-light); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-2); }
.vote-box h2 { font-size: 22px; }
.vote-box .summary { margin-top: 4px; font-weight: 700; color: var(--ink-muted); }
.stars { display: flex; justify-content: center; gap: 4px; margin: 14px 0; }
.stars button { width: 52px; height: 52px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: #c9d3c4; border-radius: 50%; }
.stars button .ms { font-size: 44px; font-variation-settings: 'FILL' 1, 'wght' 500; }
.stars button.on { color: var(--yellow); }
.stars button.on .ms { filter: drop-shadow(0 2px 0 #c58f00); }
.voted { display: inline-flex; align-items: center; gap: 8px; background: var(--lime-soft); color: var(--green-dark); font-weight: 800; padding: 10px 16px; border-radius: 999px; margin-top: 4px; }

/* ---------- Crea ---------- */
.stepper { display: flex; align-items: flex-start; justify-content: space-between; position: relative; margin: 16px 8px 18px; }
.stepper::before { content: ''; position: absolute; left: 24px; right: 24px; top: 21px; height: 4px; background: #e1e8dc; border-radius: 4px; }
.stepper .bar { position: absolute; left: 24px; top: 21px; height: 4px; background: var(--green); border-radius: 4px; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 800 13px/1 var(--font-body); color: #8b9786; background: none; border: 0; padding: 0; width: 72px; }
.step .dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #e1e8dc; color: #6b7867; font: 900 18px/1 var(--font-body); border: 4px solid var(--cream); }
.step.done .dot { background: var(--green-light); color: #fff; }
.step.current .dot { background: var(--green); color: #fff; box-shadow: 0 0 0 4px rgba(82,174,50,.25); }
.step.current, .step.done { color: var(--green-dark); }
.start-box { background: #fff; border: 1.5px solid var(--stroke); border-radius: 20px; padding: 12px; }
.start-box label.lbl { font: 800 13px/1 var(--font-body); color: var(--ink-muted); display: block; margin: 0 4px 8px; letter-spacing: .03em; text-transform: uppercase; }
.start-box select { margin-top: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-row .search { flex: 1 1 100%; margin: 0; }
.base-note { display: flex; gap: 10px; align-items: flex-start; background: #eef6ff; border-radius: 16px; padding: 10px 12px; margin: 12px 0; font-size: 14px; color: #1d3a55; font-weight: 600; }
.base-note .ms { color: var(--blue); font-size: 22px; }
.pick-card { background: #fff; border: 1.5px solid var(--stroke); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.pick-card.selected { border: 2px solid var(--green-light); box-shadow: var(--shadow-2); }
.pick-card .zoom { border: 0; padding: 0; background: none; display: block; width: 100%; border-radius: 14px; }
.pick-card .zoom .card-art { width: 82%; margin: 0 auto; }
.pick-card .nm { text-align: center; font: 800 15px/1.1 var(--font-head); padding-top: 2px; overflow-wrap: anywhere; hyphens: auto; }
.pick-card .nm small { display: block; font: 800 11px/1.2 var(--font-body); color: var(--ink-muted); letter-spacing: .04em; }
.qty-step { display: flex; align-items: center; justify-content: space-between; background: #f0f5ee; border-radius: 999px; padding: 4px; }
.qty-step button { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #fff; color: var(--green-dark); box-shadow: 0 2px 0 var(--stroke); }
.qty-step button.plus { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-dark); }
.qty-step button:disabled { opacity: .35; box-shadow: none; }
.qty-step output { font: 900 20px/1 var(--font-body); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.qty-step + .max { text-align: center; font: 700 12px/1 var(--font-body); color: var(--ink-muted); }
.sticky-action {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 10; margin: 16px -16px -28px; padding: 12px 16px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--stroke-soft);
  display: flex; align-items: center; gap: 12px; box-shadow: 0 -6px 16px rgba(24,35,23,.06);
}
.sticky-action .tot { flex: 1; font: 700 14px/1.15 var(--font-body); }
.sticky-action .tot b { display: block; font: 900 28px/1 var(--font-body); color: var(--green-dark); }
.sticky-action .err { color: var(--red); font-weight: 800; }
.sticky-action.two { display: grid; grid-template-columns: auto 1fr; }
/* Senza menu in basso (passaggi di creazione) la barra delle azioni sta in fondo allo schermo */
.shell:not(.has-tabs) .sticky-action { bottom: var(--safe-b); }
.privacy-modal h1, .privacy-modal h2, .privacy-modal p, .privacy-modal li { text-align: left; }
.privacy-modal h2 { font-size: 18px; margin-top: 18px; }

.form { display: grid; gap: 16px; }
.field label, .field legend { display: block; font: 800 15px/1.2 var(--font-body); margin-bottom: 6px; padding: 0; }
.field .req { color: var(--red); }
.field .opt { color: var(--ink-muted); font-weight: 600; font-size: 13px; }
.field .hint { font-size: 13px; color: var(--ink-muted); margin-top: 5px; font-weight: 600; }
.field input[type=text], .field input[type=email], .field textarea, select {
  width: 100%; min-height: 52px; border: 1.5px solid #d1dccb; border-radius: 16px; background: #fff; padding: 12px 14px; font-size: 16px; font-weight: 600;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus, select:focus { outline: none; border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(82,174,50,.25); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); background: #fffafa; }
.field .error { display: flex; gap: 6px; align-items: center; color: #b3120f; font: 800 13px/1.2 var(--font-body); margin-top: 6px; }
.field .error .ms { font-size: 18px; }
.field .count { text-align: right; font-size: 12px; color: var(--ink-muted); font-weight: 700; margin-top: 4px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.private-badge { display: inline-flex; align-items: center; gap: 4px; font: 800 11px/1 var(--font-body); color: #1d3a55; background: #eef6ff; padding: 4px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.private-badge .ms { font-size: 14px; }
.form-error-summary { display: flex; gap: 10px; background: var(--red-soft); color: #7d0e0b; border-radius: 16px; padding: 12px 14px; font-weight: 700; }

.review-block { background: #fff; border: 1.5px solid var(--stroke); border-radius: 22px; padding: 16px; margin-top: 14px; }
.review-block .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.review-block .head h2 { font-size: 19px; }
.review-block dl { margin: 0; display: grid; gap: 10px; }
.review-block dt { font: 800 12px/1 var(--font-body); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; }
.review-block dd { margin: 3px 0 0; font-weight: 600; white-space: pre-line; }
.check { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1.5px solid var(--stroke); border-radius: 18px; padding: 14px; margin-top: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--green); flex: none; margin: 0; }
.check.invalid { border-color: var(--red); background: #fffafa; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #eef6ff; color: #1d3a55; border-radius: 16px; padding: 12px 14px; margin-top: 14px; font-weight: 600; font-size: 14px; }
.notice .ms { color: var(--blue); }
.alert { display: flex; gap: 10px; align-items: flex-start; background: var(--red-soft); color: #7d0e0b; border-radius: 16px; padding: 14px; margin-top: 14px; font-weight: 700; border: 1.5px solid #f5b5b2; }
.alert .ms { color: var(--red); }
.alert .btn { margin-top: 10px; }

.confirm { text-align: center; padding: 28px 18px; }
.confirm .burst { width: 210px; height: 210px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: repeating-conic-gradient(rgba(183,243,56,.55) 0 12deg, transparent 12deg 24deg), radial-gradient(#fff 35%, var(--lime-soft) 70%); }
.confirm .burst img { width: 170px; }
.confirm h1 { font-size: 34px; margin-top: 14px; color: var(--green-dark); }
.confirm p { margin-top: 10px; font-size: 17px; font-weight: 600; }
.confirm .steps { text-align: left; margin: 22px 0; background: #fff; border-radius: 20px; border: 1.5px solid var(--stroke); padding: 6px 16px; list-style: none; }
.confirm .steps li { display: flex; gap: 12px; align-items: center; padding: 10px 0; font-weight: 700; }
.confirm .steps li + li { border-top: 1px solid var(--stroke-soft); }
.confirm .steps .ms { color: var(--green); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-item { background: #fff; border: 1.5px solid var(--stroke); border-radius: 20px; overflow: hidden; }
.faq-item.open { border: 2px solid var(--green-light); background: #fbfef9; box-shadow: var(--shadow-2); }
.faq-q { width: 100%; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; font: 800 16px/1.25 var(--font-body); min-height: 60px; }
.faq-q .chev { margin-left: auto; flex: none; width: 34px; height: 34px; aspect-ratio: 1; border-radius: 50%; background: var(--lime-soft); display: grid; place-items: center; color: var(--green-dark); transition: transform .2s; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { padding: 0 16px 16px; display: grid; gap: 10px; color: #33402f; }
.faq-a .cat { font: 800 11px/1 var(--font-body); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }
.faq-contact { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--lime-soft); border: 2px solid var(--green-light); color: var(--green-deep); text-decoration: none; }
.faq-contact:active { transform: translateY(2px); }
.faq-contact .fc-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.faq-contact .fc-txt { flex: 1; min-width: 0; }
.faq-contact b { display: block; font: 800 18px/1.15 var(--font-head); padding-top: 2px; }
.faq-contact .fc-txt span { display: block; font: 600 13px/1.3 var(--font-body); color: var(--ink-muted); margin-top: 2px; }
.faq-contact > .ms:last-child { flex: none; color: var(--green); }
.faq-card-link { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: var(--lime-soft); text-decoration: none; color: var(--ink); }
.faq-card-link .card-art { width: 46px; border-width: 2px; }
.faq-card-link b { display: block; font: 800 15px/1.1 var(--font-head); padding-top: 2px; }
.faq-card-link small { color: var(--green-dark); font-weight: 800; }
.faq-card-link .ms { margin-left: auto; color: var(--green-dark); }
mark { background: #f6ff9e; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,25,13,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--cream); border-radius: 28px 28px 0 0; padding: 12px 18px calc(22px + var(--safe-b)); animation: up .2s ease-out; }
.modal .grab { width: 44px; height: 5px; border-radius: 9px; background: #cfd8ca; margin: 0 auto 8px; }
.modal .close-row { display: flex; justify-content: flex-end; }
.modal .card-art { width: calc(var(--cs-preview, 74) * 1%); margin: 0 auto; }
.modal h2 { text-align: center; font-size: 26px; margin-top: 14px; }
.modal .sub { text-align: center; color: var(--ink-muted); font-weight: 700; margin-top: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -12px); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Varie ---------- */
.prose h2 { font-size: 20px; margin: 18px 0 6px; }
.prose p { margin-top: 8px; }
.prose ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.prose a { overflow-wrap: anywhere; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 400px) { .mini-cards { gap: 10px; } }

/* Dettaglio carta: testo e FAQ collegate */
.card-text { margin-top: 16px; background: #fff8e1; border: 1.5px solid #f3dc8a; border-radius: 20px; padding: 14px 16px; }
.card-text h2, .card-faq h2 { display: flex; align-items: center; gap: 8px; font: 800 13px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #6b5200; }
.card-text h2 .ms, .card-faq h2 .ms { font-size: 20px; }
.card-text p { margin-top: 8px; font-weight: 700; font-size: 16px; }
.card-faq { margin-top: 16px; background: #fff; border: 2px solid var(--green-light); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-1); }
.card-faq h2 { color: var(--green-dark); }
.cf-item { margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed var(--stroke); display: grid; gap: 8px; }
.cf-item:first-of-type { border-top: 0; padding-top: 0; }
.cf-item h3 { font: 800 17px/1.25 var(--font-head); }
.cf-item p { color: #33402f; }
.cf-item .btn { justify-self: start; }

/* Schermi stretti (≤ 380px): elementi delle griglie più compatti */
@media (max-width: 380px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .card-grid { gap: 10px; }
  .talk-card { padding: 8px 8px 10px; border-radius: 20px; }
  .talk-card .play-btn { width: 42px; height: 42px; }
  .qty-step button { width: 38px; height: 38px; }
  .qty-step output { min-width: 26px; }
}
/* Nessuno scorrimento orizzontale della pagina */
html, body { overflow-x: clip; }

/* Menu in basso a scomparsa (vedi app.js) */
.tabbar { transition: transform .25s ease, opacity .25s ease; will-change: transform; }
.shell.tabs-hidden .tabbar { transform: translate(-50%, calc(100% + 24px)); opacity: 0; pointer-events: none; }
.sticky-action { transition: bottom .25s ease; }
.shell.tabs-hidden .sticky-action { bottom: var(--safe-b); }
@media (prefers-reduced-motion: reduce) { .tabbar, .sticky-action { transition: none; } }

/* ---------- Ricerca + opzioni di visualizzazione ---------- */
.search-row { display: flex; align-items: center; gap: 8px; margin: 16px 0 12px; }
.search-row .search { flex: 1; min-width: 0; margin: 0; }
.search-row .search input { padding-left: 44px; padding-right: 42px; }
.search-row .search > .ms { left: 14px; }
.view-switch { display: flex; gap: 2px; padding: 3px; background: var(--lime-soft); border-radius: 14px; flex: none; }
.view-switch button { width: 38px; height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-muted); display: grid; place-items: center; }
.view-switch button .ms { font-size: 22px; }
.view-switch button[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-dark); }
.filter-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }

/* 1 carta per riga */
.card-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.card-grid.cols-1 .talk-card .open .card-art, .card-grid.big .pick-card .zoom .card-art { width: calc(var(--cs-list, 78) * 1%); margin: 0 auto; }
.card-grid.cols-1 .talk-card .name { font-size: 20px; }

/* Griglia: miniature quadrate, 4 per riga */
.sq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sq-tile { position: relative; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); border: 0; background: none; padding: 0; text-align: center; font: inherit; }
.sq-art { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--stroke), 0 2px 6px rgba(24,35,23,.1); background: #fff; }
.sq-art .card-art { width: 100%; aspect-ratio: 1; border: 0; border-radius: 0; box-shadow: none; }
.sq-art .card-art .art-truck, .sq-art .card-art .art-num, .sq-art .card-art .art-name { display: none; }
.sq-num { position: absolute; left: 4px; top: 4px; min-width: 22px; padding: 2px 5px; border-radius: 99px; background: #fff; font: 900 11px/1.2 var(--font-body); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sq-name { font: 800 11px/1.15 var(--font-body); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.sq-tile.pick.selected .sq-art { box-shadow: 0 0 0 3px var(--green-light); }
.sq-qty { position: absolute; right: 4px; top: 4px; background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 6px; font: 900 11px/1.2 var(--font-body); border: 2px solid #fff; }

/* Crea: lista testuale */
.pick-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1.5px solid var(--stroke); border-radius: 20px; overflow: hidden; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; min-height: 62px; }
.pick-row + .pick-row { border-top: 1px solid var(--stroke-soft); }
.pick-row.selected { background: #f6fcf2; }
.pick-row .pr-name { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 0; font: 800 15px/1.2 var(--font-head); color: var(--ink); overflow-wrap: anywhere; }
.pick-row .pr-name small { display: block; font: 800 11px/1.2 var(--font-body); color: var(--ink-muted); }
.pick-row .qc { flex: none; display: grid; gap: 2px; }
.pick-row .qty-step button { width: 38px; height: 38px; }
.pick-row .qty-step output { min-width: 26px; font-size: 18px; }
.pick-row .max { font-size: 10px; }

/* Scopri: lista compatta */
.mode-list { display: grid; gap: 10px; }
.mode-row { display: flex; align-items: center; gap: 10px; padding: 14px; background: #fff; border: 1.5px solid var(--stroke); border-radius: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.mode-row .mr-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.mode-row .mr-main > b { font: 800 18px/1.15 var(--font-head); }
.mode-row .facts { margin-top: 2px; font-size: 13px; }
.mode-row .facts .ms { font-size: 18px; }
.mode-row .mr-cards { font-size: 13px; color: #33402f; font-weight: 600; }
.mode-row > .ms { color: var(--green-dark); }

/* Copertina della modalità */
.mode-cover { aspect-ratio: 2 / 1; overflow: hidden; background: var(--lime-soft); }
.mode-cover img { width: 100%; height: 100%; object-fit: cover; }
.mode-cover.detail { aspect-ratio: 1; max-height: min(100vw, 480px); }
.cover-pick { display: flex; gap: 14px; align-items: flex-start; }
.cover-prev { width: 112px; height: 112px; flex: none; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--stroke); background: #fff; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.cover-auto { width: 100%; height: 100%; position: relative; padding: 10px; background: radial-gradient(rgba(255,255,255,.45) 18%, transparent 20%) 0 0 / 10px 10px, linear-gradient(120deg, #28c4d8, #a6e84a); }
.cover-auto img { position: absolute; right: -6px; bottom: -4px; width: 78px; transform: scaleX(-1); }
.cover-actions { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.cover-actions .hint { margin: 0; }
.field .label { display: block; font: 800 15px/1.2 var(--font-body); margin-bottom: 8px; }
.cover-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--stroke); }

/* Condividi e stampa */
.share-box { margin-top: 16px; background: #fff; border: 1.5px solid var(--stroke); border-radius: 20px; padding: 14px 16px; }
.share-box h2 { display: flex; align-items: center; gap: 8px; font: 800 13px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.share-box h2 .ms { font-size: 20px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-actions .btn { flex: 1 1 auto; }
.share-box .hint { margin-top: 10px; font-size: 13px; color: var(--ink-muted); font-weight: 600; }

/* Logo Busa nel footer (caricato dal CMS) */
.busa-logo { max-width: 80px; max-height: 32px; margin: 0 auto; object-fit: contain; }

@media (max-width: 380px) {
  .view-switch button { width: 34px; }
  .sq-grid { gap: 6px; }
  .cover-prev { width: 92px; height: 92px; }
}

/* Crea: giocatori da / + / a */
.players-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.field .pl-box { display: flex; align-items: center; gap: 8px; margin: 0; font: 800 15px/1 var(--font-body); color: var(--ink-muted); flex: none; }
.field .pl-box input[type=text] { width: 68px; min-height: 52px; padding: 0 6px; border: 1.5px solid #d1dccb; border-radius: 16px; background: #fff; text-align: center; font: 800 20px/1 var(--font-body); color: var(--ink); }
.field .pl-box input[type=text]:focus { outline: none; border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(82,174,50,.25); }
.field .pl-box input[type=text]:disabled { background: #eef1ec; color: #a3ad9f; border-style: dashed; }
.field.invalid .pl-box input[type=text]:not(:disabled) { border-color: var(--red); background: #fffafa; }
.plus-toggle { width: 52px; height: 52px; flex: none; border-radius: 16px; border: 1.5px solid var(--stroke); background: #fff; color: var(--green-dark); font: 900 26px/1 var(--font-body); }
.plus-toggle[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dark); }

/* ---------- Schede Scopri (Modalità / Carte) e scelta in Crea ---------- */
.scopri-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.scopri-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 999px; text-decoration: none; font: 800 14px/1.1 var(--font-body); color: var(--ink-muted); padding: 0 8px; text-align: center; }
.scopri-tabs a .ms { font-size: 20px; }
.scopri-tabs a[aria-current="page"] { background: var(--green); color: #fff; box-shadow: 0 2px 0 var(--green-dark); }
.chooser { display: grid; gap: 14px; margin-top: 20px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 18px 16px; background: #fff; border: 2px solid var(--stroke); border-radius: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.choice:active { transform: translateY(2px); }
.choice .ch-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--lime-soft); color: var(--green-dark); display: grid; place-items: center; flex: none; }
.choice .ch-ic .ms { font-size: 30px; }
.choice b { display: block; font: 800 20px/1.15 var(--font-head); }
.choice span span { display: block; color: var(--ink-muted); font-weight: 600; font-size: 14px; margin-top: 3px; }
.choice > .ms { margin-left: auto; color: var(--green-dark); }

/* ---------- Carte dei giocatori ---------- */
.ucard-img { display: block; width: 100%; aspect-ratio: var(--card-ratio); object-fit: cover; border-radius: 12% / 8.6%; background: linear-gradient(135deg, #d9f0c6, #b5e08a); box-shadow: 0 0 0 1.5px var(--stroke), 0 3px 8px rgba(24,35,23,.12); }
.ucard-img.sq { aspect-ratio: 1; border-radius: 0; box-shadow: none; object-position: center 30%; }
.ucard-tile { text-decoration: none; color: inherit; }
.ucard-tile .open { display: block; }
.ucard-tile .t { display: grid; gap: 2px; }
.ucard-tile .by { font-size: 13px; }
.ucard-tile .rating { font-size: 13px; }
.card-grid.cols-1 .ucard-tile .open .ucard-img { width: calc(var(--cs-list, 78) * 1%); margin: 0 auto; }
.ucard-detail { display: flex; justify-content: center; }
.ucard-detail canvas { width: calc(var(--cs-ucard, 82) * 1%); height: auto; border-radius: 12% / 8.6%; box-shadow: 0 10px 28px rgba(24,35,23,.22); }
.ucard-detail.small canvas { width: calc(var(--cs-ucard, 82) * .73%); }

/* Crea una carta: anteprima che resta visibile mentre si scrive */
.cm-preview { position: sticky; top: 66px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 10px; background: linear-gradient(var(--cream) 88%, rgba(248,250,245,0)); }
.cm-preview canvas { height: calc(var(--cs-maker, 32) * 1vh); width: auto; aspect-ratio: var(--card-ratio); border-radius: 12% / 8.6%; box-shadow: 0 8px 22px rgba(24,35,23,.2); }
.cm-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-muted); font: 800 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.cm-badge .ms { font-size: 14px; }
/* I campi restano visibili sotto l'anteprima quando si scrive */
.card-maker .field input, .card-maker .field textarea { scroll-margin-top: calc(var(--cs-maker, 32) * 1vh + 110px); scroll-margin-bottom: 150px; }

/* Scheda carta: modalità che la usano */
.card-modes { margin-top: 16px; background: #fff; border: 1.5px solid var(--stroke); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-1); display: grid; gap: 10px; }
.card-modes h2 { display: flex; align-items: center; gap: 8px; font: 800 13px/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }
.card-modes h2 .ms { font-size: 20px; }
.cm-list { list-style: none; margin: 0; padding: 0; border: 1.5px solid var(--stroke-soft); border-radius: 16px; overflow: hidden; }
.cm-list li + li { border-top: 1px solid var(--stroke-soft); }
.cm-list a { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 60px; text-decoration: none; color: var(--ink); }
.cm-list a:active { background: var(--lime-soft); }
.cm-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cm-main > b { font: 800 16px/1.15 var(--font-head); overflow-wrap: anywhere; }
.cm-main .by { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cm-main .rating .ms { font-size: 16px; }
.cm-qty { flex: none; font: 900 15px/1 var(--font-body); color: var(--green-dark); background: var(--lime-soft); padding: 6px 9px; border-radius: 999px; }
.cm-list a > .ms { color: var(--green-dark); }

/* Scopri: filtro per carta */
.active-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 8px 8px 10px; background: var(--lime-soft); border: 1.5px solid var(--green-light); border-radius: 18px; }
.af-art { width: 34px; flex: none; }
.af-art .card-art { border-width: 2px; }
.af-txt { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.af-txt b { color: var(--green-dark); }
.af-txt small { display: block; color: var(--ink-muted); font-weight: 700; }
.hl-card { background: var(--green); color: #fff; border-radius: 999px; padding: 3px 9px; font-weight: 800; font-size: 13px; }
.mr-cards mark { background: var(--lime-soft); color: var(--green-dark); font-weight: 800; padding: 0 4px; border-radius: 6px; }

/* Scopri: modalità ufficiali del team Busa (bordo verde spesso) */
.mode-card.official, .mode-row.official { border: 4px solid var(--green); box-shadow: 0 0 0 3px rgba(82,174,50,.18), var(--shadow-1); }
.mode-card.official { position: relative; }
.official-strip { position: absolute; top: 10px; left: 10px; }
.official-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--green); color: #fff; font: 800 12px/1 var(--font-body); box-shadow: 0 2px 0 var(--green-dark); }
.official-badge .ms { font-size: 16px; }
.mode-row .official-badge { margin-bottom: 2px; }

/* Icona della modalità: cerchio verde a destra di titolo e autore */
.title-row { display: flex; align-items: stretch; gap: 12px; }
.title-row .tr-text { flex: 1; min-width: 0; display: grid; align-content: center; gap: 2px; }
.mode-icon { flex: none; align-self: center; height: 100%; min-height: 44px; max-height: 64px; aspect-ratio: 1; border-radius: 50%; background: var(--green); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 2px 6px rgba(24,35,23,.15); }
.title-row > .mode-icon { align-self: stretch; height: auto; }
.mode-icon img { object-fit: contain; display: block; position: relative; }
.mode-head .mode-icon { min-height: 56px; max-height: 76px; }
.mode-row .tr-text > b { font: 800 18px/1.15 var(--font-head); }

/* Verifica antibot (Cloudflare Turnstile): compare solo se serve un'interazione */
.ts-slot { position: fixed; inset: auto 0 calc(16px + var(--safe-b)) 0; z-index: 90; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.ts-slot[hidden] { display: none; }
.ts-card { pointer-events: auto; background: #fff; border: 2px solid var(--green-light); border-radius: 20px; box-shadow: var(--shadow-2); padding: 12px 14px; max-width: 360px; width: 100%; }
.ts-card p { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--green-deep); margin-bottom: 8px; }
.vote-err { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; color: var(--red); font-weight: 700; font-size: 14px; text-align: left; }
.vote-err[hidden] { display: none; }
.notify-check[hidden] { display: none; }
.notify-check .muted { font-weight: 600; font-size: 13px; }

/* ---------- Animazioni leggere ----------
   Partono solo all'apertura di una pagina (classe .enter sul contenitore, tolta dopo 1 secondo),
   così ricerche e filtri ridisegnano le liste senza ripetere l'effetto. Durate brevi, nessun
   movimento continuo vicino ai contenuti, tutto disattivato con "riduci movimento". */
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes itemIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } }
@keyframes logoIn { 0% { opacity: 0; transform: scale(.6) rotate(-6deg); } 60% { opacity: 1; transform: scale(1.06) rotate(2deg); } 100% { transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: perspective(800px) rotateY(-18deg) scale(.92); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); color: var(--green); } 100% { transform: scale(1); } }
@keyframes tabPop { 0% { transform: translateY(0); } 40% { transform: translateY(-5px) scale(1.12); } 100% { transform: none; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(67,150,38,.45); } 100% { box-shadow: 0 0 0 14px rgba(67,150,38,0); } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes driveIn { 0% { opacity: 0; transform: translateX(-70px) rotate(-4deg); } 70% { opacity: 1; transform: translateX(6px) rotate(1deg); } 100% { transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 60% { transform: rotate(5deg); } }

/* Ingresso della pagina */
.enter > .page, .enter > .home-hero, .enter > .welcome { animation: pageIn .32s ease-out both; }
.enter .home-hero .logo { animation: logoIn .6s cubic-bezier(.2, .9, .3, 1.3) both; }
/* Liste a cascata (solo i primi elementi hanno un ritardo, gli altri arrivano insieme) */
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block) { animation: itemIn .38s ease-out both; animation-delay: .38s; }
.enter .home-link { animation-name: slideIn; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(1) { animation-delay: .04s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(2) { animation-delay: .08s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(3) { animation-delay: .12s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(4) { animation-delay: .16s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(5) { animation-delay: .2s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(6) { animation-delay: .24s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(7) { animation-delay: .28s; }
.enter :is(.home-link, .talk-card, .mode-card, .mode-row, .sq-tile, .pick-card, .pick-row, .faq-item, .choice, .review-block):nth-child(8) { animation-delay: .32s; }

/* Home: le icone delle sezioni ondeggiano al passaggio o al tocco */
.home-link:hover img, .home-link:active img { animation: wiggle .45s ease-in-out; }

/* Guarda: la carta del dettaglio entra girando; il play pulsa mentre suona */
.enter .detail-card .card-art { animation: cardIn .55s cubic-bezier(.2, .8, .3, 1.1) .05s both; }
.play-btn.playing { animation: pulseRing 1.4s ease-out infinite; }

/* Scopri: stelle e conferma del voto */
.stars button[aria-checked="true"] .ms { animation: pop .32s ease-out; }
.vote-box .voted .ms { display: inline-block; animation: pop .45s ease-out .1s; }
.enter .ucard-detail canvas { animation: cardIn .55s cubic-bezier(.2, .8, .3, 1.1) .05s both; }

/* Crea: il numero delle carte scelte sobbalza */
.bump { display: inline-block; animation: bump .35s ease-out; }

/* Pagine di conferma: raggi che ruotano piano, camioncino che arriva */
.confirm .burst { position: relative; background: radial-gradient(#fff 35%, var(--lime-soft) 70%); }
.confirm .burst::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(183,243,56,.55) 0 12deg, transparent 12deg 24deg); animation: rays 40s linear infinite; }
.confirm .burst img { position: relative; animation: driveIn .8s cubic-bezier(.2, .8, .3, 1.2) .1s both; }
.confirm h1 { animation: pageIn .4s ease-out .25s both; }
.confirm .steps li { animation: slideIn .35s ease-out both; }
.confirm .steps li:nth-child(1) { animation-delay: .35s; }
.confirm .steps li:nth-child(2) { animation-delay: .5s; }
.confirm .steps li:nth-child(3) { animation-delay: .65s; }
.confirm .steps li:nth-child(1) .ms { animation: pop .45s ease-out .55s; }

/* FAQ: la risposta scivola giù */
.faq-item.open .faq-a { animation: slideDown .22s ease-out; }

/* Menu in basso: l'icona della nuova sezione salta */
.tab.pop .ms { animation: tabPop .4s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
