/* Barrio Events Manager 1.2 — temi globali leggeri, senza font, immagini o animazioni esterne. */
body.theme-natale{--bg:#0a1014;--surface:#172127;--surface2:#233036;--stroke:#425054;--text:#fff9ed;--muted:#c4d1cf;--red:#c83a4a;--red2:#edc881;--green:#84d9a5}
body.theme-autunno{--bg:#17110f;--surface:#2a1d19;--surface2:#382820;--stroke:#61473b;--text:#fff3e5;--muted:#dbc9be;--red:#a6542e;--red2:#efa96d;--green:#97d5a5}
body.theme-inverno{--bg:#091321;--surface:#142637;--surface2:#1b3447;--stroke:#415e73;--text:#f3fbff;--muted:#bbd0dd;--red:#356e91;--red2:#a9dbef;--green:#89d9bd}
body.theme-primavera{--bg:#101a16;--surface:#1c2b23;--surface2:#27392f;--stroke:#4b6957;--text:#f5fff3;--muted:#cbddcd;--red:#487b5a;--red2:#b3df96;--green:#a4deb3}
body.theme-estate{--bg:#081c23;--surface:#142e35;--surface2:#1c4046;--stroke:#426772;--text:#f1fffd;--muted:#bce1df;--red:#af5038;--red2:#f5bd78;--green:#a7e1bb}
body:not(.theme-barrio){background:var(--bg);color:var(--text)}
body:not(.theme-barrio) .top{background:var(--surface);border-bottom-color:var(--stroke)}
body:not(.theme-barrio) .event-art{background:radial-gradient(ellipse at 75% 20%,var(--surface2),transparent 60%),linear-gradient(135deg,var(--surface),var(--bg))}
body:not(.theme-barrio) .event-photo{background:var(--surface2)}
body:not(.theme-barrio) .pack-card:first-of-type{border-color:var(--red)}
body:not(.theme-barrio) .event-card:hover{border-color:var(--red)}
body:not(.theme-barrio) .primary-button{background:var(--red);color:var(--button-fg,#fff)}
body:not(.theme-barrio) .primary-button:hover{filter:brightness(1.1)}
body:not(.theme-barrio) .circle-arrow{background:var(--red);color:var(--button-fg,#fff)}
body:not(.theme-barrio) .event-details>p,body:not(.theme-barrio) .page-intro>p:last-child,body:not(.theme-barrio) .consent,body:not(.theme-barrio) .pack-description,body:not(.theme-barrio) .secure-note{color:var(--muted)}
body:not(.theme-barrio) .footer,body:not(.theme-barrio) .summary,body:not(.theme-barrio) .text-section{border-color:var(--stroke)}
body:not(.theme-barrio) .mini-link{color:var(--text)}
body:not(.theme-barrio) .event-card,body:not(.theme-barrio) .pack-card,body:not(.theme-barrio) .confirm-card,body:not(.theme-barrio) .empty{background:var(--surface);border-color:var(--stroke)}
body:not(.theme-barrio) .event-card:focus-visible,body:not(.theme-barrio) .primary-button:focus-visible{outline:3px solid var(--red2);outline-offset:3px}
/* Season marker: tiny, integrated into header, no extra layout shifts. */
.season-marker{display:none;font-size:10px;letter-spacing:.16em;text-transform:uppercase;font-weight:850;color:var(--red2)}
body:not(.theme-barrio) .season-marker{display:inline-flex;gap:7px;align-items:center}
body:not(.theme-barrio) .season-marker::before{content:'✦';font-size:12px}
body:not(.theme-barrio) .top-inner{flex-wrap:wrap}
/* Minimal decorative light, 100% CSS and static. */
body:not(.theme-barrio) .page-intro,body:not(.theme-barrio) .event-overview{position:relative;isolation:isolate}
body:not(.theme-barrio) .page-intro::before,body:not(.theme-barrio) .event-overview::before{content:'';position:absolute;z-index:-1;pointer-events:none;right:-12vw;top:10px;width:min(72vw,620px);height:240px;opacity:.65}
body.theme-natale .page-intro::before,body.theme-natale .event-overview::before{background:radial-gradient(circle at 14% 25%,#f8d792 0 2px,transparent 3px),radial-gradient(circle at 34% 56%,#f8d792 0 1px,transparent 2px),radial-gradient(circle at 75% 20%,#fff0bd 0 2px,transparent 4px),radial-gradient(circle at 82% 82%,#f8d792 0 1px,transparent 3px),radial-gradient(ellipse at 75% 12%,#e0b05d35,transparent 65%)}
body.theme-natale .top{border-bottom:2px solid #b4935c}
body.theme-autunno .page-intro::before,body.theme-autunno .event-overview::before{background:radial-gradient(ellipse at 92% 12%,#c46f3940,transparent 55%),radial-gradient(ellipse at 20% 72%,#d18b3530,transparent 55%),repeating-linear-gradient(127deg,transparent 0 61px,#ca8a5120 62px 63px,transparent 64px 118px)}
body.theme-inverno .page-intro::before,body.theme-inverno .event-overview::before{background:linear-gradient(120deg,transparent 30%,#b1e5ff17 46%,transparent 57%),radial-gradient(circle at 23% 29%,#d0f2ff 0 1px,transparent 2px),radial-gradient(circle at 71% 41%,#d0f2ff 0 1px,transparent 3px),radial-gradient(circle at 89% 18%,#d0f2ff 0 2px,transparent 3px)}
body.theme-primavera .page-intro::before,body.theme-primavera .event-overview::before{background:radial-gradient(circle at 70% 25%,#dbe4a026,transparent 32%),radial-gradient(circle at 23% 58%,#c6deae24,transparent 23%),radial-gradient(circle at 81% 70%,#b5d99d22,transparent 28%)}
body.theme-estate .page-intro::before,body.theme-estate .event-overview::before{background:radial-gradient(ellipse at 90% 15%,#f4a66440,transparent 56%),linear-gradient(132deg,transparent 25%,#76c9c918 38%,transparent 61%)}
@media(max-width:730px){.season-marker{font-size:8px;letter-spacing:.1em}body:not(.theme-barrio) .page-intro::before,body:not(.theme-barrio) .event-overview::before{width:250px;height:170px;right:-35px;opacity:.45}body:not(.theme-barrio) .brand small{display:none}}
/* Admin: selection cards and editable accessible palette controls. */
.theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.theme-choice{border:1px solid var(--stroke);border-radius:13px;background:#181921;padding:12px;min-width:0}
.theme-choice:has(input[type=radio]:checked){border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
.theme-choice>label{display:flex;align-items:center;gap:7px;font-weight:850;font-size:13px;margin-bottom:8px!important}
.theme-choice input[type=radio]{accent-color:var(--red)}
.theme-choice p{font-size:11px;color:var(--muted);margin:7px 0 10px}
.theme-swatch{height:62px;border-radius:9px;background:var(--sample-bg);border:1px solid var(--sample-stroke);padding:9px;position:relative;overflow:hidden}
.theme-swatch::before{content:'';display:block;position:absolute;right:13px;top:-22px;width:67px;height:67px;border-radius:50%;background:var(--sample-accent);opacity:.16}
.theme-swatch::after{content:'';position:absolute;left:9px;bottom:10px;width:54px;height:7px;background:var(--sample-accent);border-radius:9px}
.theme-swatch strong{font-size:12px;color:var(--sample-text);position:relative;z-index:1}
.theme-choice details{margin-top:12px;border-top:1px solid #373943;padding-top:9px}
.theme-choice summary{cursor:pointer;font-size:11px;font-weight:850;color:#e2e2ed}
.theme-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.theme-colors label{font-size:10px!important;font-weight:650!important;color:#c3c5d0;margin:0!important;display:flex;align-items:center;justify-content:space-between;gap:5px}
.theme-colors input[type=color]{width:38px;height:32px;min-width:38px;border:1px solid #626470;border-radius:7px;padding:2px;cursor:pointer;background:transparent}
.theme-help{color:#c8c9d1;font-size:12px}
@media(max-width:970px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:570px){.theme-grid{grid-template-columns:1fr}.theme-choice{padding:14px}.theme-swatch{height:68px}}

.theme-swatch-barrio{--sample-bg:#0c0d11;--sample-stroke:#33343e;--sample-text:#f7f7f9;--sample-accent:#ef2e49}
.theme-swatch-natale{--sample-bg:#0a1014;--sample-stroke:#425054;--sample-text:#fff9ed;--sample-accent:#edc881}
.theme-swatch-autunno{--sample-bg:#17110f;--sample-stroke:#61473b;--sample-text:#fff3e5;--sample-accent:#a6542e}
.theme-swatch-inverno{--sample-bg:#091321;--sample-stroke:#415e73;--sample-text:#f3fbff;--sample-accent:#a9dbef}
.theme-swatch-primavera{--sample-bg:#101a16;--sample-stroke:#4b6957;--sample-text:#f5fff3;--sample-accent:#b3df96}
.theme-swatch-estate{--sample-bg:#081c23;--sample-stroke:#426772;--sample-text:#f1fffd;--sample-accent:#f5bd78}

body.theme-barrio .primary-button{color:var(--button-fg,#fff)}
body.theme-barrio .circle-arrow{color:var(--button-fg,#fff)}

/* V1.3.2 — selettore sfondo neutro e preview accessibile in amministrazione. */
.background-tone-section{border:1px solid #464857;background:#20212b;border-radius:13px;padding:18px;margin:24px 0}
.background-tone-section h3{margin:0 0 8px;font-size:19px}
.background-tone-editor>label{display:block!important;margin-bottom:5px!important;color:#f6f6f9}
.background-tone-editor>input[type=range]{display:block;width:100%;max-width:640px;height:30px;accent-color:var(--red);cursor:pointer;margin:10px 0 2px}
.background-tone-ends{display:flex;justify-content:space-between;max-width:640px;color:#c3c7d1;font-size:11px}
.background-tone-options{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.tone-option{display:flex;align-items:center;gap:6px;padding:7px 9px;min-height:38px;background:#292b36;color:#f3f3f5;border:1px solid #555767;border-radius:8px;font-size:11px;font-weight:800}
.tone-option[aria-pressed=true]{border-color:#ff6d87;outline:2px solid #ff6d8750;outline-offset:1px}
.tone-dot{display:inline-block;width:16px;height:16px;border-radius:4px;border:1px solid #8f919b}
.tone-dot-0{background:#fff}.tone-dot-20{background:#e3e5e9}.tone-dot-40{background:#b9bec5}.tone-dot-60{background:#464b54}.tone-dot-80{background:#20232b}.tone-dot-100{background:#0c0d11}
.background-preview{--preview-bg:#0c0d11;--preview-surface:#181a21;--preview-fg:#f7f8fa;--preview-muted:#cbd0d9;--preview-accent:#ef2e49;--preview-button:#fff;padding:18px;background:var(--preview-bg);border:1px solid #515662;border-radius:12px;max-width:640px;transition:background .15s}
.background-preview-card{background:var(--preview-surface);color:var(--preview-fg);padding:16px;border-radius:10px;display:grid;justify-items:start;gap:6px}
.background-preview-card small{font-size:10px;letter-spacing:.08em;color:var(--preview-accent);font-weight:900}
.background-preview-card strong{font-size:22px;letter-spacing:-.03em}
.background-preview-card p{color:var(--preview-muted);margin:0 0 8px;font-size:12px}
.background-preview-cta{background:var(--preview-accent);color:var(--preview-button);padding:11px 14px;border-radius:8px;font-size:11px;font-weight:800}
.background-tone-editor>small{display:block;margin-top:12px;line-height:1.55}
@media(max-width:570px){.background-tone-section{padding:14px}.tone-option{flex:1;justify-content:center}}
