:root {
  --bg: #FFFFFF;
  --soft: #F5F5F7;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --line: #E8E8ED;
  --danger: #D70015;
  --accent: #D9A79D;
  --accent-soft: #F8ECE9;
  --accent-text: #A86F63;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25,.1,.25,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--ink); font: 400 17px/1.47 var(--font); letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img, canvas { display: block; max-width: 100%; height: auto; } /* logo mai deformato */
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid rgba(217,167,157,.7); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.muted { color: var(--muted); }
.small { font-size: 14px; letter-spacing: -0.01em; }
.hidden { display: none !important; }
.label { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); }
.topbar img { height: 22px; width: auto; mix-blend-mode: multiply; }
.topbar nav { display: flex; gap: 4px; }
.link { background: none; border: 0; padding: 8px 12px; min-height: 44px; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; border-radius: 8px; transition: color .2s; }
.link:hover { color: var(--ink); }

/* ---------- campi ---------- */
input[type=text], input[type=password], input[type=month], input[type=date] {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid transparent;
  background: var(--soft); font-size: 17px; border-radius: 12px; transition: border-color .2s, background .2s;
}
input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,167,157,.25); }
.field + .field { margin-top: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: 15px; min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }

.tabs { display: inline-grid; grid-auto-flow: column; gap: 2px; background: var(--soft); border-radius: 10px; padding: 3px; }
.tabs button { border: 0; background: transparent; border-radius: 8px; padding: 6px 22px; min-height: 36px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); transition: background .25s var(--ease), box-shadow .25s; }
.tabs button[aria-pressed=true] { background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }

/* ---------- bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 980px; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 17px; font-weight: 500; transition: transform .2s var(--ease), opacity .2s, background .2s; touch-action: manipulation; text-decoration: none; }
.btn:hover:not(:disabled) { background: #000; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.btn.line { background: var(--soft); color: var(--ink); }
.btn.line:hover:not(:disabled) { background: #EBEBF0; }
.btn svg { width: 18px; height: 18px; }
.btn-draw { width: 100%; min-height: 72px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; background: var(--accent); color: var(--ink); }
.btn-draw:hover:not(:disabled) { background: #CF978C; }

.alert { font-size: 14px; color: var(--danger); margin-top: 10px; }
.rec { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: auto 380px; gap: 72px; max-width: 1200px; margin: 0 auto; padding: 40px 32px 72px; align-items: start; justify-content: center; }
.stage { width: min(100%, calc((100dvh - 140px) * 9 / 16)); min-width: 280px; }
.stage canvas { width: 100%; aspect-ratio: 9/16; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 30px 60px -20px rgba(0,0,0,.18); }
.panel { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 32px; }

.count { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.count strong { font-size: 64px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.045em; }

details.more { border-top: 1px solid var(--line); }
details.more summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: 15px; font-weight: 500; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease); }
details.more[open] summary::after { transform: rotate(225deg) translateY(-3px); }
details.more .inner { padding: 4px 0 16px; }
.plist { max-height: 220px; overflow: auto; font-size: 14px; color: var(--muted); columns: 2; column-gap: 16px; }
.plist div { break-inside: avoid; padding: 2px 0; }

.result { animation: rise .6s var(--ease); background: var(--accent-soft); border-radius: 20px; padding: 24px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.result .label { color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.result .winner { font-size: 36px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.result .email { font-size: 14px; color: var(--muted); word-break: break-all; margin-top: 6px; }
.reserves { margin-top: 18px; font-size: 14px; color: var(--muted); }
.reserves div { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.reserves span:first-child { width: 24px; color: var(--ink); font-weight: 600; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.dl .full { grid-column: 1 / -1; }
.result .btn.line { background: #fff; }

.history { max-width: 1200px; margin: 0 auto; padding: 0 32px 96px; }
.history h2 { font-size: 28px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { display: none; }
td { padding: 18px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td:first-child { padding-left: 0; font-weight: 600; }
td:nth-child(2), td:nth-child(4) { color: var(--muted); font-size: 14px; }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }
.td-actions .btn { min-height: 36px; padding: 6px 16px; font-size: 14px; }
.btn.danger, .td-actions .danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px transparent; }
.btn.danger:hover:not(:disabled) { background: rgba(215,0,21,.06); }

.login { max-width: 360px; margin: 18dvh auto 0; padding: 0 24px; text-align: center; }
.login img { width: 240px; margin: 0 auto 48px; mix-blend-mode: multiply; }
.login .btn { width: 100%; margin-top: 20px; }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; gap: 32px; padding: 24px 20px 48px; }
  .panel { position: static; }
  .stage { width: min(100%, 420px); margin: 0 auto; order: 2; }
  .topbar { padding: 12px 20px; }
  .history { padding: 0 20px 48px; }
  td:nth-child(4) { display: none; }
}

/* ---------- pagina pubblica ---------- */
.public { max-width: 1040px; margin: 0 auto; padding: 64px 20px 96px; }
.public-hero { text-align: center; margin-bottom: 64px; }
.public-hero img { width: min(280px, 64%); margin: 0 auto 48px; mix-blend-mode: multiply; }
.public-hero h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 700; letter-spacing: -0.045em; }
.public-hero p { max-width: 520px; margin: 16px auto 0; color: var(--muted); font-size: 19px; line-height: 1.4; }
.public-grid { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 72px; align-items: start; }
.public-grid canvas { width: 100%; aspect-ratio: 9/16; border-radius: 28px; box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 30px 60px -20px rgba(0,0,0,.18); }
.public-grid h2 { font-size: 28px; margin-bottom: 8px; }
.win-list { list-style: none; margin: 0; padding: 0; }
.win-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.win-list .thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--accent-soft); }
.win-list .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.win-list .when { color: var(--muted); font-size: 13px; }
.win-list .who { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; }
.win-list .prize { color: var(--accent-text); font-size: 14px; font-weight: 500; }
.win-list .others { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
body.embed .public { padding-top: 24px; }
body.embed .public-hero img { display: none; }
@media (max-width: 760px) { .public-grid { grid-template-columns: 1fr; gap: 48px; } .public-grid canvas { max-width: 360px; margin: 0 auto; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- selettore premio ---------- */
select {
  width: 100%; min-height: 50px; padding: 12px 40px 12px 16px; border: 1px solid transparent; border-radius: 12px;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236E6E73' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 16px; color: var(--ink); cursor: pointer; text-overflow: ellipsis;
}
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,167,157,.25); }
.prize-pick { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.prize-pick img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--accent-soft); }
.result select { background-color: #fff; }

/* ---------- responsive: tutti i dispositivi ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
.topbar { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* tablet */
@media (max-width: 1100px) and (min-width: 901px) {
  .admin { gap: 40px; grid-template-columns: auto 340px; padding: 32px 24px 64px; }
}
/* telefono */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .admin { padding: 16px 16px 40px; gap: 28px; }
  .stage { min-width: 0; width: 100%; }
  .stage canvas { border-radius: 20px; }
  .count strong { font-size: 52px; }
  .btn-draw { min-height: 64px; font-size: 19px; }
  .result { padding: 20px; border-radius: 18px; }
  .result .winner { font-size: 30px; }
  .dl { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .plist { columns: 1; }
  .topbar img { height: 18px; }
  .link { padding: 8px; font-size: 14px; }
  /* storico come lista */
  table, tbody, tr, td { display: block; width: 100%; }
  tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  td { padding: 2px 0; border: 0; }
  td:nth-child(2) { font-size: 13px; }
  td:nth-child(3) { font-size: 18px; }
  .td-actions { justify-content: flex-start; margin-top: 8px; }
  .history { padding: 0 16px 40px; }
  .history h2 { font-size: 24px; }
  .public { padding: 40px 16px 64px; }
  .public-hero { margin-bottom: 40px; }
  .public-hero img { margin-bottom: 32px; }
  .public-hero p { font-size: 17px; }
  .public-grid canvas { border-radius: 20px; }
  .win-list .who { font-size: 19px; }
  .login { margin-top: 12dvh; }
}
/* telefoni molto piccoli */
@media (max-width: 360px) {
  .count strong { font-size: 44px; }
  .tabs button { padding: 6px 14px; }
}
/* telefono in orizzontale: lo stage non deve superare l'altezza */
@media (max-height: 520px) and (orientation: landscape) {
  .admin { grid-template-columns: auto 1fr; }
  .stage { width: calc((100dvh - 32px) * 9 / 16); min-width: 0; order: 0; }
  .panel { position: static; }
  .public-grid { grid-template-columns: calc((100dvh - 32px) * 9 / 16) 1fr; gap: 32px; }
}

/* ================= pagina pubblica (nuova) ================= */
body.pub { background: #fff; }
.pub main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.pub h1, .pub h2, .pub h3 { letter-spacing: -0.04em; }
.pub .kicker { color: var(--accent-text); font-weight: 600; font-size: 15px; margin: 0 0 10px; }
.pub-nav { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 12px max(24px, env(safe-area-inset-left)); background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.05); }
.pub-nav img { height: 24px; width: auto; mix-blend-mode: multiply; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s; }
.pill:hover { background: #CF978C; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 14px 32px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 18px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; transition: transform .2s var(--ease), background .2s, box-shadow .2s; box-shadow: 0 10px 30px -10px rgba(217,167,157,.8); }
.cta:hover { background: #CF978C; transform: translateY(-1px); }
.cta:active { transform: scale(.98); }

.pub-hero { text-align: center; padding: 96px 0 72px; position: relative; }
.pub-hero::before { content: ""; position: absolute; inset: -40px -20vw auto; height: 520px; z-index: -1; background: radial-gradient(60% 60% at 50% 30%, rgba(217,167,157,.22), rgba(255,255,255,0) 70%); }
.pub-hero h1 { font-size: clamp(40px, 7.2vw, 80px); font-weight: 700; line-height: 1.02; max-width: 11em; margin: 0 auto; }
.pub-hero .sub { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 30em; margin: 20px auto 34px; line-height: 1.4; }

.pub-latest { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 64px; align-items: center; padding: 56px; border-radius: 40px; background: #F7E9E5; background-image: radial-gradient(70% 60% at 20% 30%, rgba(255,255,255,.85), rgba(255,255,255,0)), radial-gradient(50% 50% at 100% 100%, rgba(217,167,157,.35), rgba(217,167,157,0)); }
.latest-media canvas { width: 100%; height: auto; aspect-ratio: 9/16; border-radius: 28px; box-shadow: 0 30px 70px -30px rgba(120,70,60,.45); }
.latest-name { font-size: clamp(44px, 6.5vw, 76px); font-weight: 700; line-height: 1; }
.latest-city { display: flex; align-items: center; gap: 8px; font-size: 22px; color: var(--ink); margin: 16px 0 0; font-weight: 500; }
.latest-city svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.latest-prize { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; margin-top: 32px; padding: 14px; background: #fff; border-radius: 22px; box-shadow: 0 12px 30px -16px rgba(120,70,60,.35); }
.latest-prize img { width: 88px; height: 88px; border-radius: 16px; object-fit: cover; }
.latest-prize div { display: flex; flex-direction: column; gap: 2px; }
.latest-prize strong { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.latest-others { list-style: none; padding: 0; margin: 28px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.latest-others li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted); }
.latest-others b { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.8); color: var(--ink); font-size: 13px; }

.pub-steps { padding: 112px 0 40px; text-align: center; }
.pub-steps h2, .pub-history h2, .pub-final h2, .pub-empty h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; }
.pub .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; text-align: left; }
.pub .step { background: var(--soft); border-radius: 28px; padding: 32px; }
.pub .step b { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 17px; margin-bottom: 20px; }
.pub .step h3 { font-size: 24px; margin-bottom: 8px; }
.pub .step p { color: var(--muted); margin: 0; font-size: 17px; }

.pub-history { padding: 80px 0 24px; max-width: 760px; margin: 0 auto; }
.pub-history h2 { text-align: center; margin-bottom: 24px; }
.pub-empty { text-align: center; padding: 72px 0; }
.pub-empty p { color: var(--muted); font-size: 19px; }

.pub-final { text-align: center; margin: 88px 0 72px; padding: 72px 24px; border-radius: 40px; background: var(--ink); color: #fff; }
.pub-final h2 { color: #fff; }
.pub-final p { color: rgba(255,255,255,.7); font-size: 19px; max-width: 28em; margin: 14px auto 32px; }
.pub-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pub-foot a { color: var(--muted); }

/* incorporata nella pagina Shopify */
body.embed .no-embed { display: none !important; }
body.embed main { padding: 0 12px; }
body.embed .pub-latest { margin-top: 8px; }
body.embed .pub-history { padding-top: 48px; }

@media (max-width: 860px) {
  .pub-latest { grid-template-columns: 1fr; gap: 32px; padding: 24px; border-radius: 32px; }
  .latest-media canvas { max-width: 360px; margin: 0 auto; }
  .latest-info { text-align: center; }
  .latest-city { justify-content: center; }
  .latest-prize { text-align: left; }
  .latest-others { align-items: center; }
  .pub .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pub main { padding: 0 16px; }
  .pub-hero { padding: 56px 0 48px; }
  .pub-hero .cta, .pub-final .cta { width: 100%; }
  .pub-latest { padding: 16px; border-radius: 28px; }
  .latest-media canvas { border-radius: 20px; }
  .pub-steps { padding-top: 72px; }
  .pub .step { padding: 24px; border-radius: 24px; }
  .pub-final { margin: 56px 0 48px; padding: 48px 20px; border-radius: 28px; }
  .pub-nav img { height: 20px; }
}

/* ---------- dati per la spedizione ---------- */
.ship { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 0 0 1px var(--line), 0 16px 40px -24px rgba(0,0,0,.2); }
.ship-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ship-head h2 { font-size: 20px; }
.ship .tabs button { padding: 4px 14px; min-height: 32px; }
.ship > .small { margin: 8px 0 6px; }
.ship-rows { margin: 0; }
.ship-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ship-row:first-child { border-top: 0; }
.ship-row dt { font-size: 13px; color: var(--muted); }
.ship-row dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font-size: 15px; font-weight: 500; }
.ship-row dd span { overflow-wrap: anywhere; }
.ship-row .missing { color: var(--muted); font-weight: 400; font-style: italic; }
.copy { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--soft); color: var(--ink); cursor: pointer; transition: background .2s, transform .15s; }
.copy:hover { background: var(--accent-soft); }
.copy:active { transform: scale(.92); }
.copy.done { background: var(--accent); color: #fff; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 600px) { .ship { padding: 18px; } .ship-row { grid-template-columns: 82px 1fr; } }

/* ---------- pubblica su Instagram ---------- */
.ig { margin-top: 22px; }
.ig-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ig-btn { flex-direction: column; gap: 6px; min-height: 76px; padding: 10px 6px; border-radius: 18px; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #D9A79D 0%, #C98E83 55%, #B8786C 100%); }
.ig-btn:hover:not(:disabled) { background: linear-gradient(135deg, #CF978C 0%, #BE8176 55%, #A86F63 100%); }
.ig-btn svg { width: 24px; height: 24px; }
.ig-btn span { line-height: 1.15; text-align: center; }
.ig-btn:disabled { opacity: .45; }
#igNote { margin: 10px 0 0; }

/* ---------- guida e passi ---------- */
.step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; margin-right: 8px; vertical-align: 1px; letter-spacing: 0; }
.guide { background: var(--accent-soft); border-radius: 16px; padding: 4px 16px; }
.guide summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--accent-text); }
.guide[open] summary::after { content: "–"; }
.guide ol { margin: 0 0 10px; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.guide li { margin: 6px 0; }
.guide .small { margin: 0 0 12px; }
.btn-draw.warn { background: #F3D6CF; font-size: 15px; font-weight: 500; }
.rec-box { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; text-align: center; padding: 12px; border-radius: 14px; background: #FFF4F2; }
textarea { width: 100%; padding: 12px 16px; border: 1px solid transparent; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; color: var(--ink); }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,167,157,.25); }
.todo { background: #fff; border-radius: 16px; padding: 12px 14px; margin-top: 18px; }
.todo-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.todo-list label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; }
.todo-list input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.mail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mail-actions .btn { font-size: 15px; padding: 10px 12px; }
#mailWinner { background: var(--accent); color: var(--ink); }
@media (max-width: 600px) { .mail-actions { grid-template-columns: 1fr; } }
.done-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500; vertical-align: 2px; }
.done-badge.all { background: var(--accent-soft); color: var(--accent-text); }
.result .gender { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.result .gender .tabs { background: #fff; }
.result .gender .tabs button { padding: 2px 14px; min-height: 30px; font-size: 13px; }
.result .gender .tabs button[aria-pressed=true] { background: var(--accent); color: var(--ink); box-shadow: none; }
body.embed { min-height: 0; }
body.embed main { padding-bottom: 8px; }
.mail-actions .full { grid-column: 1 / -1; }
.btn.wa { background: #25D366; color: #fff; }
.btn.wa:hover:not(:disabled) { background: #1EBE5A; }
.btn.wa svg { width: 20px; height: 20px; }

/* ---------- storico per mesi ---------- */
.pub-history { max-width: 1120px; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 8px; }
.month { background: var(--soft); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.month-top { display: flex; flex-direction: column; gap: 2px; }
.month-label { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.month-date { font-size: 13px; color: var(--muted); }
.month-who { display: flex; flex-direction: column; gap: 2px; }
.month-kicker { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.month-who strong { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.month-city { font-size: 15px; color: var(--muted); }
.month-prize { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 8px; font-size: 14px; font-weight: 500; }
.month-prize img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
@media (max-width: 600px) { .months { grid-template-columns: 1fr; } .month { padding: 18px; } }
