:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #1c1c1c;
  --surface-2: #2a2a2a;
  --line: #333;
  --text: #fff;
  --muted: #a3a3a3;
  --accent: #f0ff3d;
  --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { flex: none; }

/* Testata */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px 48px; background: rgba(0,0,0,.92); backdrop-filter: blur(10px); }
.logo { display: inline-flex; flex: none; align-items: center; }
.logo img { display: block; width: 170px; height: 55px; }
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font-size: 15px; outline: none; }
.toplink { margin-left: auto; font-size: 15px; }
.manifesto-link { flex: none; font-size: 15px; }
.manifesto-link:hover, .manifesto-link:focus-visible { color: var(--accent); }
.account-open { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 10px 12px; cursor: pointer; font-size: 13px; }
.account-dialog { width: min(560px, calc(100% - 32px)); max-height: 85vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 28px; background: var(--surface); color: var(--text); }
.account-dialog::backdrop { background: rgba(0,0,0,.75); }
.account-dialog h2 { margin: 0 32px 12px 0; font-size: 24px; }
.account-dialog p, .account-dialog li { color: var(--muted); font-size: 14px; line-height: 1.6; }
.account-dialog label { display: block; font-size: 14px; }
.account-dialog textarea { display: block; width: 100%; resize: vertical; margin: 10px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.account-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 28px; cursor: pointer; }
.account-dialog .pill { background: var(--accent); color: #000; }
.account-dialog .pill:disabled { opacity: .5; cursor: wait; }
.account-dialog ul { padding-left: 18px; overflow-wrap: anywhere; }

/* Pagina */
.page { width: min(1150px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; position: relative; z-index: 1; }
.manifesto { max-width: 760px; padding-top: 48px; }
.manifesto p { font-size: clamp(18px, 2.5vw, 22px); line-height: 1.65; color: #ddd; margin: 0 0 28px; }
.manifesto .manifesto-lead { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; color: var(--text); letter-spacing: -.02em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent; background: var(--surface); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.pill svg { width: 18px; height: 18px; }
.pill.on, .pill[aria-expanded="true"] { border-color: var(--text); }
.pill.static { cursor: default; }
.dropdown { position: relative; }
.panel { position: absolute; top: 54px; left: 0; z-index: 30; width: 340px; padding: 14px; border-radius: var(--radius); background: #fff; color: #000; box-shadow: 0 16px 50px rgba(0,0,0,.6); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid #ddd; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.chip.on, .chip:hover { background: #000; color: #fff; border-color: #000; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; text-transform: capitalize; }
.cal-head button { width: 32px; height: 32px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.cal-head button:disabled { opacity: .2; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid b { font-size: 11px; color: #777; text-transform: uppercase; padding: 6px 0; }
.cal-grid a, .cal-grid span { display: grid; place-items: center; height: 38px; border-radius: 999px; font-size: 14px; }
.cal-grid a:hover { background: #eee; }
.cal-grid .past { color: #c8c8c8; }
.cal-grid .today { font-weight: 800; text-decoration: underline; }
.cal-grid .on { background: #000; color: #fff; }
.clear { display: block; margin-top: 10px; font-size: 13px; text-decoration: underline; }

.tiles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 36px; scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: none; display: flex; flex-direction: column; justify-content: space-between; width: 92px; height: 74px; padding: 12px; border-radius: 6px; border: 1px solid transparent; background: var(--surface); font-size: 12px; }
.tile:hover { background: var(--surface-2); }
.tile.on { border-color: var(--text); background: var(--surface-2); }

.genre-block { margin: -20px 0 32px; }
.genre-title { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.genres { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.genres::-webkit-scrollbar { display: none; }
.genres.sub { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--accent); }
.gchip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.gchip small { color: var(--muted); font-size: 11px; }
.gchip:hover { border-color: #777; }
.gchip.on { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.gchip.on small { color: #333; }
.genres.sub .gchip { height: 32px; font-size: 12px; }
.tag-link { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); }
.section { font-size: clamp(28px, 4vw, 40px); font-weight: 500; letter-spacing: -.02em; margin: 0 0 24px; }
.section span { color: var(--muted); }

/* Griglia e card */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 28px; }
.card { position: relative; min-width: 0; }
.thumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface); margin-bottom: 12px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); }
.thumb-fallback svg { width: 56px; height: 56px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.when { color: var(--accent); margin: 0 0 2px; font-size: 14px; }
.where, .via { margin: 0; font-size: 14px; color: #ddd; }
.via { color: var(--muted); font-size: 12px; margin-top: 2px; }
.save { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 0; background: rgba(0,0,0,.75); cursor: pointer; }
.card .save { position: absolute; top: 10px; right: 10px; }
.save svg { width: 18px; height: 18px; }
.save.on svg { fill: var(--accent); stroke: var(--accent); }

.more { display: flex; justify-content: center; margin-top: 48px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 24px; border-radius: 999px; border: 0; background: #fff; color: #000; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.button.yellow { background: var(--accent); }
.button.ghost { background: var(--surface-2); color: #fff; }
.button.small { height: 36px; padding: 0 16px; font-size: 12px; }
.button.small svg { width: 16px; height: 16px; }
.empty { grid-column: 1 / -1; padding: 64px 16px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); margin-top: 0; }

/* Pagina evento */
.backdrop { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; filter: blur(80px) saturate(1.4); opacity: .45; transform: scale(1.2); }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.2), #000 70%); }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.event-grid { display: grid; grid-template-columns: 330px 1fr; gap: 48px; align-items: start; }
.event-art { position: sticky; top: 96px; }
.art { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-actions { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.round { position: static; margin: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 0; background: rgba(0,0,0,.8); cursor: pointer; }
.round.done { background: var(--accent); color: #000; }
.event-body h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; }
.venue-line { font-size: 22px; margin: 0 0 4px; }
.when.big { font-size: 22px; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 28px; color: #ddd; }
.tags span { display: inline-flex; align-items: center; gap: 6px; }
.tags svg { width: 18px; height: 18px; }
.ticket { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: rgba(28,28,28,.92); margin-bottom: 36px; }
.ticket strong { display: block; font-size: 18px; }
.ticket span { color: var(--muted); font-size: 13px; }
.block { border-top: 1px solid var(--line); padding: 28px 0; }
.block:first-of-type { border-top: 0; padding-top: 0; }
.block h2 { font-size: 26px; font-weight: 500; margin: 0 0 12px; }
.block p { color: #ddd; line-height: 1.6; margin: 0 0 12px; }
.block .label { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.muted { color: var(--muted) !important; }
details { margin: 8px 0 14px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
details p { margin-top: 10px; }
.sources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sources a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 8px; background: var(--surface); }
.sources a:hover { background: var(--surface-2); }
.sources small { color: var(--muted); }

.site-footer { position: relative; z-index: 1; padding: 40px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid #111; }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .event-grid { grid-template-columns: 1fr; gap: 28px; }
  .event-art { position: static; max-width: 420px; }
}
@media (max-width: 700px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .topbar { flex-wrap: wrap; }
  .topbar .search { order: 4; flex-basis: calc(100% - 90px); min-width: 0; max-width: none; }
  .manifesto-link { order: 5; font-size: 13px; }
  .toplink { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .card h3 { font-size: 14px; }
  .when, .where { font-size: 13px; }
  .panel { position: fixed; left: 16px; right: 16px; top: 140px; width: auto; }
  .ticket { flex-direction: column; align-items: stretch; }
  .site-footer { padding: 32px 16px; }
}

.site-tagline { color: var(--muted); font-size: 15px; margin: 0 0 24px; line-height: 1.5; }
.logo { white-space: nowrap; }
.share-status { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; background: var(--accent); color: #000; border-radius: 999px; padding: 12px 20px; max-width: calc(100% - 32px); }
.share-status:empty { display: none; }
.share-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; width: min(440px, 90vw); padding: 24px; }
.share-dialog::backdrop { background: #000b; }
.share-dialog input { width: 100%; padding: 12px; margin-bottom: 16px; font: inherit; }
.site-footer .pill { margin-top: 12px; }

/* Login, mi piace, commenti, proposte */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-slot { flex: none; display: flex; align-items: center; gap: 8px; min-height: 34px; }
.account-open.sign-up { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.save .likes { font-size: 12px; font-weight: 700; }
.save .likes:empty { display: none; }
.save:has(.likes:not(:empty)) { width: auto; padding: 0 10px; grid-auto-flow: column; gap: 5px; }
.comment-list, .proposal-list { list-style: none; margin: 0 0 20px; padding: 0; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment .avatar { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--surface); object-fit: cover; }
.block .comment-head { margin: 0 0 4px; font-size: 14px; }
.comment-head time { color: var(--muted); margin-left: 6px; }
.block .comment-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.comment-delete { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; margin-left: 6px; }
.comment-form textarea { display: block; width: 100%; resize: vertical; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.form-message { color: var(--muted); font-size: 14px; margin-top: 10px; }
.form-message:empty { display: none; }
.proposal-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.manifesto .proposal-list p { font-size: 17px; margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.proposal-list small { color: var(--muted); }
.site-footer a { text-decoration: underline; }
.city-dialog .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.city-dialog .chip { cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; background: transparent; color: var(--text); border-color: var(--line); }
.city-dialog .chip.on, .city-dialog .chip:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.join-dialog .join-reason { color: var(--text); font-weight: 700; }
.join-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.toplink.mine-link { margin-left: 0; }
.my-accounts { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.my-accounts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.my-accounts small { color: var(--muted); }
.my-accounts .status-approved { color: var(--accent); }
.mine-actions { margin: 0 0 12px; }
.mine-actions .pill { background: var(--accent); color: #000; }
.import-progress { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.import-progress strong { color: var(--text); }
.import-hint { margin: 16px 0 0; }
.link-button { border: 0; padding: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.import-guide { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.import-guide summary { cursor: pointer; color: var(--text); }
.import-guide ol { padding-left: 20px; line-height: 1.6; }
.import-dialog kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; font-family: inherit; font-size: 12px; }
.import-preview { margin-top: 16px; }
.import-preview fieldset { margin: 12px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.import-preview legend { color: var(--text); font-size: 14px; padding: 0 4px; }
.import-preview details { margin: 12px 0 16px; }
.import-preview summary { cursor: pointer; font-size: 14px; }
.account-dialog .import-list { list-style: none; padding: 0; max-height: 240px; overflow: auto; columns: 2; font-size: 14px; }
.import-list label { display: inline-flex; gap: 6px; align-items: center; }
.import-privacy { font-size: 12px !important; }
.account-dialog .import-disclaimer { margin: 16px 0 4px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--bg); color: var(--text); }

/* Invito della community: più Fuori, meno feed. */
.account-banner { position: relative; z-index: 21; background: #16180f; color: #c7c7c7; border-bottom: 1px solid rgba(240,255,61,.22); padding: 9px 48px; }
.account-banner-inner { width: min(1150px, 100%); margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.account-banner p { flex: 1; margin: 0; font-size: 13px; line-height: 1.5; }
.account-banner b { color: #fff; font-weight: 500; }
.account-banner-cta { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 6px 10px; border: 1px solid rgba(240,255,61,.3); border-radius: 4px; background: none; color: var(--accent); font-size: 12px; cursor: pointer; white-space: nowrap; }
.account-banner-cta span { color: var(--accent); }
.account-banner-cta:hover { background: rgba(240,255,61,.08); border-color: var(--accent); }
.account-banner-cta:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
@media (max-width: 700px) {
  .account-banner { padding: 8px 16px; }
  .account-banner-inner { gap: 12px; }
}

/* Come funziona: una spiegazione, tre passi. */
.info-links { display: flex; align-items: center; gap: 16px; flex: none; }
.how-page { max-width: 1000px; padding-top: 36px; }
.how-intro { max-width: 750px; margin: 26px 0 52px; }
.how-eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }
.how-intro h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin: 0 0 24px; }
.how-intro .how-lead { color: #fff; font-size: clamp(22px, 3vw, 30px); line-height: 1.35; letter-spacing: -.02em; margin-bottom: 18px; }
.how-intro > p:not(.how-eyebrow):not(.how-lead) { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 620px; }
.how-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 26px; }
.how-text-link { font-size: 14px; color: #ddd; }
.how-text-link:hover { color: var(--accent); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; padding: 0; margin: 0 0 56px; }
.how-steps li { border-top: 1px solid var(--line); padding-top: 20px; }
.how-number { color: var(--accent); font-size: 13px; letter-spacing: .06em; }
.how-page h2 { font-size: 23px; letter-spacing: -.02em; font-weight: 600; margin: 16px 0 12px; }
.how-steps p, .how-together p, .how-faq p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 12px; }
.how-steps strong, .how-faq strong { color: #ddd; font-weight: 500; }
.how-together { border-left: 2px solid var(--accent); padding: 4px 0 4px 24px; margin: 0 0 52px; max-width: 750px; }
.how-together h2 { margin-top: 0; }
.how-faq { max-width: 750px; }
.how-faq h2 { margin-bottom: 20px; }
.how-faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.how-faq summary { font-size: 16px; cursor: pointer; color: #eee; font-weight: 500; letter-spacing: normal; text-transform: none; }
.how-faq summary:hover { color: var(--accent); }
.how-faq details p { margin: 14px 0 0; }
.how-end { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.how-end p { font-size: clamp(24px, 4vw, 32px); color: var(--muted); line-height: 1.3; margin: 0; letter-spacing: -.02em; }
.how-end strong { color: #fff; font-weight: 600; }
@media (max-width: 700px) {
  .info-links { order: 5; gap: 18px; }
  .how-page { padding-top: 24px; }
  .how-intro { margin-bottom: 36px; }
  .how-steps { grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
  .how-steps li { padding-top: 16px; }
  .how-end { align-items: flex-start; flex-direction: column; }
}

.manifesto-add { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; cursor: pointer; }
