/* veganthron.de — manifesto da sagra × tabellone sportivo.
   Palette Projects Kreate: giallo corona, rosa sorpasso, blu link. */
:root {
  --paper: #f3ecdc;
  --paper-2: #e9e0cb;
  --ink: #161310;
  --muted: #6d6458;
  --yellow: #f5ce02;
  --pink: #af1d8b;
  --blue: #32b3fc;
  --line: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Figtree', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.5 var(--body);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(245, 206, 2, .22), transparent 34%),
    radial-gradient(circle at 92% 40%, rgba(175, 29, 139, .10), transparent 30%);
  background-attachment: fixed;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- testata ---------- */
.top {
  display: flex; align-items: center; gap: 1rem; padding: .9rem clamp(1rem, 4vw, 3rem);
  border-bottom: var(--line); position: sticky; top: 0; background: var(--paper); z-index: 20;
}
.logo { font: 900 1.6rem/1 var(--display); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--pink); font-style: italic; font-weight: 400; }
.live { margin-left: auto; font: 500 .85rem var(--mono); display: flex; align-items: center; gap: .4rem; }
.live i { width: .6rem; height: .6rem; border-radius: 50%; background: #e2261d; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- layout ---------- */
main {
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 3rem;
  grid-template-areas: "hero hero" "warn warn" "crown crown" "board feed" "rules rules";
}
.hero { grid-area: hero; } .crown { grid-area: crown; } .board-wrap { grid-area: board; }
.feed-wrap { grid-area: feed; } .rules { grid-area: rules; }
@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "warn" "crown" "board" "feed" "rules"; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 2rem; animation: rise .7s both; }
.kicker { font: 500 .8rem var(--mono); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 1.2rem; }
h1 {
  font: 900 clamp(3rem, 10vw, 8.4rem)/.86 var(--display); letter-spacing: -.045em; margin: 0;
  font-variation-settings: "opsz" 144;
}
h1 em { font-weight: 400; font-style: italic; color: var(--muted); }
h1 .hl {
  background: var(--yellow); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  display: inline-block; transform: rotate(-1.5deg); box-shadow: var(--shadow); border: var(--line); margin-top: .12em;
}
.lede { max-width: 36rem; font-size: 1.15rem; margin: 2rem 0; }
.lede strong { background: linear-gradient(transparent 60%, rgba(175, 29, 139, .25) 0); }
.ticker { display: flex; flex-wrap: wrap; gap: .8rem; }
.ticker div, .ticker a {
  border: var(--line); padding: .6rem 1rem; background: var(--paper); display: flex; flex-direction: column;
  min-width: 9rem; box-shadow: 4px 4px 0 var(--ink);
}
.ticker b { font: 500 1.7rem/1 var(--mono); letter-spacing: -.03em; }
.ticker span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .35rem; }
.ticker .pink { background: var(--pink); color: #fff; text-decoration: none; } .ticker .pink span { color: #fbd6f1; }

/* ---------- il re ---------- */
.crown:empty { display: none; }
.crown {
  margin: 2rem 0 3rem; border: 3px solid var(--ink); background: var(--yellow); box-shadow: 10px 10px 0 var(--ink);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2rem; align-items: center; padding: clamp(1.2rem, 3vw, 2.2rem);
  position: relative; animation: rise .7s .15s both;
}
.crown .num { font: 900 clamp(5rem, 13vw, 10rem)/.8 var(--display); letter-spacing: -.06em; }
.crown .who h2 { font: 900 clamp(1.8rem, 4.5vw, 3.4rem)/1 var(--display); margin: 0 0 .4rem; letter-spacing: -.03em; word-break: break-word; }
.crown .who h2 a { text-decoration: none; }
.crown .who h2 a:hover { text-decoration: underline 3px; }
.crown .who p { margin: 0; font-size: 1.05rem; }
.crown .meta { font: 500 .8rem var(--mono); margin-top: .7rem !important; opacity: .75; }
.crown .side { text-align: right; }
.crown .side b { display: block; font: 500 clamp(2rem, 5vw, 3.4rem)/1 var(--mono); letter-spacing: -.04em; }
.crown .side small { display: block; font: 500 .75rem var(--mono); text-transform: uppercase; margin: .3rem 0 1rem; }
.stamp-1 {
  position: absolute; top: -1.4rem; right: 2rem; background: var(--ink); color: var(--yellow);
  font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: .45rem .8rem; transform: rotate(3deg);
}
@media (max-width: 640px) {
  .crown { grid-template-columns: auto 1fr; }
  .crown .side { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .crown .side small { margin: .3rem 0 0; }
}

/* ---------- bottoni ---------- */
.cta, .steal, .pay {
  border: var(--line); background: var(--ink); color: var(--paper); font-weight: 800; padding: .7rem 1.1rem;
  box-shadow: 4px 4px 0 var(--pink); transition: transform .12s, box-shadow .12s;
}
.cta:hover, .steal:hover, .pay:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--pink); }
.cta:active, .steal:active, .pay:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--pink); }
.crown .steal { background: var(--pink); color: #fff; box-shadow: 4px 4px 0 var(--ink); font-size: 1.05rem; }
.crown .steal:hover { box-shadow: 6px 6px 0 var(--ink); }

/* ---------- classifica ---------- */
.board-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs { display: flex; gap: .3rem; }
.tabs button {
  border: var(--line); background: none; padding: .45rem .9rem; font: 500 .85rem var(--mono); text-transform: uppercase;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.board { list-style: none; margin: 0; padding: 0; border-top: var(--line); }
.row {
  display: grid; grid-template-columns: 3.4rem 2.6rem minmax(0, 1fr) auto auto; gap: .3rem 1rem; align-items: center;
  padding: .95rem .2rem; border-bottom: 1px solid rgba(22, 19, 16, .25);
}
.board.intro .row { animation: rise .5s both; animation-delay: calc(var(--i, 0) * 40ms); }
.row:hover { background: rgba(245, 206, 2, .18); }
.row .rk { font: 700 1.9rem/1 var(--display); letter-spacing: -.04em; text-align: right; }
.row:nth-child(2) .rk, .row:nth-child(3) .rk { color: var(--pink); }
.row img { width: 2.4rem; height: 2.4rem; border: var(--line); background: #fff; padding: .25rem; border-radius: 50%; }
.row .nm { min-width: 0; }
.row .nm a { font-weight: 800; font-size: 1.08rem; text-decoration: none; }
.row .nm a:hover { color: var(--blue); text-decoration: underline; }
.row .nm p { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--ink); padding: .05rem .4rem; border-radius: 99px; margin-left: .4rem; vertical-align: 2px; }
.row .tot { font: 500 1.15rem var(--mono); text-align: right; white-space: nowrap; }
.row .tot small { display: block; font-size: .7rem; color: var(--muted); }
.row .steal { padding: .45rem .7rem; font-size: .85rem; white-space: nowrap; box-shadow: 3px 3px 0 var(--pink); }
.row.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 30% { background: var(--pink); color: #fff; } }
@media (max-width: 640px) {
  .row { grid-template-columns: 2.4rem 2.2rem minmax(0, 1fr) auto; }
  .row .rk { font-size: 1.4rem; }
  .row img { width: 2rem; height: 2rem; }
  .row .steal { grid-column: 3 / -1; justify-self: start; }
}
.empty { font: 400 1.4rem var(--display); font-style: italic; padding: 2rem 0; }

/* ---------- feed ---------- */
.feed-wrap { padding-top: .2rem; }
.feed-wrap h2, .rules h2 { font: 900 1.6rem/1 var(--display); letter-spacing: -.02em; margin: .3rem 0 1rem; }
.feed { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--ink); }
.feed li { padding: .55rem 0 .55rem 1rem; position: relative; font-size: .93rem; }
.feed li.new { animation: rise .4s both; }
.feed li::before { content: ''; position: absolute; left: -.48rem; top: .95rem; width: .7rem; height: .7rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.feed li.up::before { background: var(--pink); }
.feed b { font-weight: 800; }
.feed .amt { font-family: var(--mono); background: var(--yellow); padding: 0 .25rem; }
.feed time { display: block; font: 400 .72rem var(--mono); color: var(--muted); }

/* ---------- regole ---------- */
.rules { margin: 4rem 0 2rem; border: var(--line); padding: clamp(1.2rem, 3vw, 2rem); background: var(--paper-2); }
.rules ol { margin: 0; padding-left: 1.3rem; columns: 2 18rem; column-gap: 3rem; }
.rules li { margin-bottom: .7rem; break-inside: avoid; }
.shelter { margin: 1rem 0 0; font: 500 .9rem var(--mono); }
.foot { text-align: center; padding: 2rem 1rem 3rem; font-size: .9rem; color: var(--muted); }

/* ---------- modali ---------- */
dialog {
  border: 3px solid var(--ink); background: var(--paper); color: var(--ink); padding: 0; width: min(30rem, calc(100vw - 2rem));
  box-shadow: 10px 10px 0 var(--ink);
}
dialog::backdrop { background: rgba(22, 19, 16, .55); backdrop-filter: blur(2px); }
dialog form, .fake { padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; position: relative; }
dialog h3 { font: 900 1.9rem/1 var(--display); margin: 0; letter-spacing: -.02em; padding-right: 2rem; }
.x { position: absolute; top: .6rem; right: .8rem; border: 0; background: none; font-size: 2rem; line-height: 1; }
.target { margin: 0; color: var(--muted); }
.target:empty { display: none; }
dialog label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .9rem; }
dialog input, dialog select {
  font: 400 1rem var(--body); padding: .6rem .7rem; border: var(--line); background: #fffdf7; color: var(--ink); border-radius: 0;
}
dialog input:focus, dialog select:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.new-only { display: contents; }
form.topup .new-only { display: none; }
.euro { display: flex; align-items: stretch; }
.euro input { flex: 1; font: 500 1.6rem var(--mono); }
.euro b { border: var(--line); border-left: 0; padding: 0 .9rem; display: grid; place-items: center; font: 500 1.4rem var(--mono); background: var(--yellow); }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick button { border: var(--line); background: #fffdf7; padding: .3rem .6rem; font: 500 .8rem var(--mono); }
.quick button:hover { background: var(--yellow); }
.preview { margin: 0; font: 500 .9rem var(--mono); min-height: 1.3em; }
.preview b { background: var(--yellow); padding: 0 .25rem; }
.pledge { flex-direction: row !important; align-items: flex-start; gap: .6rem !important; font-weight: 400 !important; font-size: .85rem !important; }
.pledge input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--pink); }
.err { color: #c1121f; margin: 0; font-weight: 600; font-size: .9rem; }
.err:empty { display: none; }
.pay { font-size: 1.1rem; padding: .9rem; }
.fine { margin: 0; font-size: .78rem; color: var(--muted); text-align: center; }
.fake { text-align: center; align-items: center; }
.fake .stamp { font: 500 .75rem var(--mono); text-transform: uppercase; border: 2px dashed var(--pink); color: var(--pink); padding: .3rem .6rem; margin: 0; transform: rotate(-2deg); }
.fake h3 { font: 500 3.2rem/1 var(--mono); padding: 0; }
.fake .pay { width: 100%; }
.ghost { border: 0; background: none; text-decoration: underline; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 200%); z-index: 40;
  background: var(--pink); color: #fff; border: var(--line); box-shadow: var(--shadow); padding: .9rem 1.3rem;
  font-weight: 800; max-width: calc(100vw - 2rem); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1); visibility: hidden;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; }

@media (max-width: 520px) {
  .top { gap: .6rem; }
  .live span { display: none; }
  .ticker div, .ticker a { min-width: 0; flex: 1 1 8rem; }
  .crown .who h2 { font-size: 1.7rem; }
  .crown .steal { width: 100%; }
  .stamp-1 { right: 1rem; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- avviso: solo vegani ---------- */
.warning {
  grid-area: warn; border: 3px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 1.2rem 1.5rem; margin: 0 0 2.5rem; box-shadow: 8px 8px 0 var(--pink); transform: rotate(-.4deg);
  animation: rise .7s .1s both;
}
.warning p { margin: .35rem 0; max-width: 62rem; }
.warning strong { color: var(--yellow); }
.warn-title { font: 900 1.6rem/1.1 var(--display); color: var(--yellow); margin: 0 0 .5rem !important; }
.warn-mini { margin: 0; font-size: .85rem; border-left: 4px solid var(--pink); background: rgba(175, 29, 139, .08); padding: .5rem .7rem; }

/* ---------- classifica: note, archivio, link ---------- */
.board-note { font: 400 .85rem var(--mono); color: var(--muted); margin: 0 0 .8rem; min-height: 1px; }
.board-note:empty { display: none; }
.ad-note { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }
button.link { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
button.link.strong { color: var(--ink); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
button.link.strong:hover { color: var(--blue); text-decoration: underline; }
.row.day .rk { font-size: 1.5rem; }
.foot-links { margin-bottom: .6rem; font: 500 .85rem var(--mono); }
.foot-links a { color: var(--ink); }
dialog .pledge a { color: var(--blue); }

/* ---------- pagine legali ---------- */
body.legal { background-attachment: fixed; }
.top .back { margin-left: auto; font: 500 .85rem var(--mono); }
.draft {
  background: var(--pink); color: #fff; text-align: center; font: 500 .8rem var(--mono); text-transform: uppercase;
  letter-spacing: .06em; padding: .5rem 1rem; border-bottom: var(--line);
}
.legal-main { display: block; max-width: 46rem; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 2rem) 2rem; }
.legal-main h1 { font: 900 clamp(2.4rem, 7vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; margin: 0 0 1rem; }
.legal-main h2 { font: 700 1.35rem/1.2 var(--display); margin: 2.2rem 0 .6rem; }
.legal-main h3 { font: 700 1.1rem/1.2 var(--display); margin: 1.4rem 0 .5rem; }
.legal-main p, .legal-main li { font-size: 1rem; }
.legal-main a { color: var(--blue); }
.legal-main .stand { font: 500 .85rem var(--mono); color: var(--muted); }
.legal-main .box { border: var(--line); background: #fffdf7; padding: .4rem 1.3rem 1rem; margin: 1rem 0; box-shadow: 5px 5px 0 var(--ink); }
.legal-main details { border-bottom: 1px solid rgba(22, 19, 16, .25); padding: .9rem 0; }
.legal-main summary { font-weight: 800; font-size: 1.08rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.legal-main summary::after { content: '+'; font: 500 1.3rem/1 var(--mono); }
.legal-main details[open] summary::after { content: '–'; }
.legal-main details p { margin: .6rem 0 0; }

/* ---------- /spenden ---------- */
.legal-main .ticker.big { margin: 1.5rem 0 1rem; }
.legal-main .month { border: var(--line); background: #fffdf7; padding: .2rem 1.3rem 1rem; margin: 1.5rem 0; box-shadow: 5px 5px 0 var(--ink); }
.legal-main .month table { width: 100%; border-collapse: collapse; font: 400 .95rem var(--mono); }
.legal-main .month td { padding: .35rem 0; border-bottom: 1px solid rgba(22, 19, 16, .15); }
.legal-main .month td:last-child { text-align: right; }
.legal-main .month tr.hl td { background: var(--yellow); font-weight: 500; padding: .35rem .4rem; }
.legal-main .payout { font-size: .9rem; margin: .7rem 0 0; }

/* ---------- /admin ---------- */
.legal-main.wide { max-width: 72rem; }
.admin table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin th { text-align: left; font: 500 .75rem var(--mono); text-transform: uppercase; border-bottom: var(--line); padding: .4rem; }
.admin td { padding: .45rem .4rem; border-bottom: 1px solid rgba(22, 19, 16, .15); vertical-align: top; }
.admin tr.gone td { opacity: .45; text-decoration: line-through; }
.admin tr.gone td:last-child { opacity: 1; text-decoration: none; }
.admin .scroll { overflow-x: auto; }
.admin .steal { padding: .3rem .6rem; font-size: .8rem; }
.admin input { font: 400 .95rem var(--body); padding: .5rem .6rem; border: var(--line); background: #fffdf7; margin: .2rem .3rem .2rem 0; }
.admin .payout-form { margin-top: 1rem; }
.admin #login { display: flex; flex-direction: column; gap: .6rem; max-width: 26rem; }
.admin #login[hidden], .admin #app[hidden] { display: none; }

/* ---------- iscrizioni chiuse (PAYMENTS = "off") ---------- */
.soon-badge { display: none; border: var(--line); background: var(--yellow); padding: .6rem 1rem; font-weight: 800; box-shadow: 4px 4px 0 var(--ink); transform: rotate(-1deg); }
body.soon .soon-badge { display: inline-block; }
body.soon .cta, body.soon .steal { display: none !important; }

/* ---------- tetto annuo raggiunto ---------- */
.soldout-badge { display: none; border: var(--line); background: var(--pink); color: #fff; padding: .6rem 1rem; font-weight: 800; box-shadow: 4px 4px 0 var(--ink); transform: rotate(-1deg); }
body.soldout .soldout-badge { display: inline-block; }
body.soldout .cta, body.soldout .steal { display: none !important; }
