:root {
  --yellow: #ffe063;
  --yellow-soft: #fff4bf;
  --ink: #082c72;
  --red: #ef4123;
  --paper: #fff9e8;
  --line: #082c72;
  --muted: #53627d;
  --focus: #f05a33;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scrollbar-width: none; scroll-behavior: smooth; }
html::-webkit-scrollbar { width: 0; height: 0; }
body { min-width: 0; margin: 0; overflow-x: clip; color: var(--ink); background: var(--yellow); font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
.page-shell { width: calc(100vw - 40px); max-width: 1180px; margin: auto; }
.hero { position: relative; isolation: isolate; min-height: 620px; margin: 18px 0 0; padding: 32px clamp(28px, 6vw, 76px) 34px; overflow: hidden; border-bottom: 2px dashed var(--ink); background: var(--yellow); }
.hero::after { position: absolute; z-index: -1; top: 126px; right: clamp(26px, 5vw, 82px); width: clamp(190px, 29vw, 350px); aspect-ratio: 1; content: ""; background: var(--red) url("hero-aperitivo.png") center / cover no-repeat; border: 3px solid var(--ink); border-radius: 48% 52% 47% 53% / 53% 44% 56% 47%; box-shadow: 15px 17px 0 var(--ink); transform: rotate(5deg); }
.hero-grid { width: 100%; padding: clamp(38px, 5vw, 72px) 0 28px; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: .94; }
h1 { max-width: 700px; margin-bottom: 22px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(3.1rem, 7vw, 7.5rem); font-weight: 900; letter-spacing: -.045em; text-transform: uppercase; }
.poster-title { display: grid; width: min(62%, 660px); }
.poster-title span { display: block; }
.poster-title i { color: var(--red); font-family: inherit; font-style: normal; }
h2 { max-width: 620px; margin-bottom: 15px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(2.15rem, 4.8vw, 4.6rem); font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; }
h3 { margin-bottom: 12px; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.12rem; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.intro { width: min(57%, 530px); margin-bottom: 0; font-size: clamp(1rem, 1.55vw, 1.28rem); font-weight: 600; }
.event-details { display: grid; grid-template-columns: .86fr 1.14fr; gap: 16px; width: min(730px, 100%); margin: 44px 0 0; }
.event-details div { min-width: 0; padding: 21px 22px 19px; border: 2px solid rgba(8, 44, 114, .24); background: var(--paper); box-shadow: 7px 7px 0 rgba(8, 44, 114, .12); }
.event-details dt { margin-bottom: 8px; color: var(--red); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: .76rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.event-details dd { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(1.25rem, 2.1vw, 2rem); font-weight: 900; letter-spacing: .015em; line-height: 1.05; text-transform: uppercase; }
.map-link { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.transit-note { display: block; margin-top: 7px; color: var(--red); font-size: .68em; letter-spacing: .04em; }

.flash { width: min(760px, calc(100% - 40px)); margin: 22px auto; padding: 14px 18px; border: 2px solid var(--ink); background: var(--yellow-soft); color: var(--ink); font-weight: 700; }
.flash.error { background: #ffc9b9; color: #6b1b13; }
.two-column { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(34px, 8vw, 110px); padding: 64px 0 82px; align-items: start; }
.response-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 6vw, 100px); padding: 70px 0 82px; }
.reply-section { display: grid; gap: 28px; align-content: start; }
.section-heading > p:last-child { max-width: 370px; color: var(--muted); font-size: 1.04rem; }
.card { border: 3px solid var(--ink); background: var(--paper); box-shadow: 8px 8px 0 var(--ink); }
.form-card { padding: clamp(23px, 4vw, 38px); }
.narrow { width: min(510px, 100%); margin: 42px auto; padding: 36px; }
form { display: grid; gap: 20px; }
label { display: grid; gap: 7px; font-size: .86rem; font-weight: 900; }
small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 47px; border: 2px solid var(--ink); border-radius: 0; background: #fffdf5; color: var(--ink); font: inherit; padding: 10px 12px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset { padding: 0; border: 0; }
legend { margin-bottom: 9px; font-size: .86rem; font-weight: 900; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice-row label { display: block; position: relative; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: grid; min-height: 49px; place-items: center; border: 2px solid var(--ink); background: var(--yellow-soft); cursor: pointer; font-size: .83rem; font-weight: 900; text-align: center; }
.choice-row input:checked + span { background: var(--red); color: #fff8df; }
.contribution-choice { padding-top: 10px; border-top: 2px solid var(--ink); }
.contribution-choice legend { margin-bottom: 5px; }
.suggestion-list { margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; font-weight: 700; }
.suggestion-list li { display: inline; }
.suggestion-list .suggestion-label { margin-right: .25em; color: var(--ink); }
.suggestion-list li:not(.suggestion-label):not(:last-child)::after { color: var(--red); content: " · "; }
.contribution-choice.is-disabled { opacity: .55; }
button { appearance: none; min-height: 49px; border: 2px solid var(--ink); border-radius: 0; background: var(--red); color: #fff9e7; cursor: pointer; font: inherit; font-weight: 900; letter-spacing: .01em; }
button:hover { background: var(--ink); }
button.quiet { background: var(--yellow-soft); color: var(--ink); }

.attendance { position: relative; margin: 0; padding: 68px 0 64px; border-top: 2px dashed var(--ink); border-bottom: 2px dashed var(--ink); background: var(--yellow); color: var(--ink); }
.attendance::before { position: absolute; top: -15px; left: 0; width: 100%; color: var(--red); content: "✦   ✦   ✦"; font-size: 1.1rem; letter-spacing: 1.4rem; text-align: center; }
.attendance .section-heading, .attendance .stats, .attendance .guest-grid, .commitment-list { width: calc(100vw - 40px); max-width: 1180px; margin-right: auto; margin-left: auto; }
.response-layout .attendance { padding: 0; border: 0; }
.response-layout .attendance::before { display: none; }
.response-layout .attendance .section-heading, .response-layout .commitment-list { width: 100%; }
.attendance h2 { color: var(--ink); }
.attendance .eyebrow { color: var(--red); }
.stats { display: flex; width: min(640px, 100%); margin: 28px 0 25px !important; }
.stats div { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: 18px; }
.stats strong { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--yellow); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 1.65rem; letter-spacing: -.04em; line-height: 1; }
.stats span { display: block; max-width: 100px; font-size: .78rem; font-weight: 800; line-height: 1.12; }
.guest-grid { display: flex; flex-wrap: wrap; gap: 10px; width: min(820px, 100%); }
.guest { display: grid; width: 100px; min-height: 100px; place-content: center; padding: 10px; border: 0; border-radius: 50%; background: var(--ink); color: var(--yellow); text-align: center; }
.guest:nth-child(3n + 2), .guest:nth-child(3n + 3) { padding-left: 10px; border-left: 0; }
.guest h3 { margin: 3px 0 0; color: var(--yellow); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .82rem; letter-spacing: 0; line-height: 1.1; text-transform: none; }
.guest p { display: none; }
.guest .guest-status { color: var(--yellow-soft); font-size: .58rem; letter-spacing: .05em; }
.guest-grid .empty { width: auto; color: var(--ink); font-size: .92rem; }
.commitment-list { display: grid; grid-template-columns: 1fr; margin-top: 30px; margin-bottom: 0; padding: 0; list-style: none; }
.commitment { position: relative; padding: 18px 0; border-top: 2px solid rgba(8, 44, 114, .45); }
.commitment p { margin: 0; font-weight: 700; }
.commitment-highlight { color: var(--red); font-weight: 900; }
.commitment.host { padding-top: 0; border-top: 0; }
.commitment--just-saved { animation: saved-entry .9s cubic-bezier(.2, .85, .35, 1) both; }
.entry-stamp { position: absolute; z-index: 1; top: -12px; right: 0; padding: 6px 9px; background: var(--red); box-shadow: 3px 3px 0 var(--ink); color: var(--paper); font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: .78rem; letter-spacing: .04em; line-height: 1; text-transform: uppercase; transform: rotate(-4deg); animation: entry-stamp 1.9s ease-out both; }

@keyframes saved-entry {
  0% { background: transparent; transform: translateY(13px); }
  35% { background: rgba(239, 65, 35, .2); transform: translateY(0); }
  100% { background: transparent; transform: translateY(0); }
}

@keyframes entry-stamp {
  0% { opacity: 0; transform: translateY(10px) rotate(-12deg) scale(.8); }
  24%, 68% { opacity: 1; transform: translateY(0) rotate(-4deg) scale(1); }
  100% { opacity: 0; transform: translateY(-6px) rotate(-4deg) scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  .commitment--just-saved { animation: none; }
  .entry-stamp { display: none; }
}

.bring-section { padding: 72px 0 84px; }
.bring-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 32px 0 0; }
.bring-grid .card { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.bring-grid .card + .card { border-left: 0; }
.check-list, .manage-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(8, 44, 114, .4); font-weight: 700; }
.check-list li::before { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; background: var(--red); color: var(--paper); content: "+"; font-size: 1.55rem; line-height: 1; }
.check-list li:nth-child(even)::before { background: var(--ink); }
.check-list li:first-child { border-top: 0; }
.guest-items li { justify-content: flex-start; }
.guest-items small { margin-left: auto; color: var(--muted); font-weight: 700; }
footer { width: calc(100vw - 40px); max-width: 1180px; margin: auto; padding: 24px 0 32px; border-top: 3px solid var(--ink); color: var(--ink); font-size: .83rem; font-weight: 700; }
footer a { color: inherit; }
.admin-head { display: flex; align-items: center; justify-content: space-between; padding: 48px 0 30px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding-bottom: 80px; }
.admin-card { padding: 28px; border-radius: 0; box-shadow: none; }
.admin-card + .admin-card { border-left: 0; }
.manage-list { margin-bottom: 22px; }
.manage-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ink); font-weight: 700; }
.manage-list form { display: block; }
.icon-button { min-width: 30px; min-height: 30px; padding: 0; background: var(--red); font-size: 1.2rem; line-height: 1; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 840px) {
  .page-shell { width: calc(100vw - 24px); max-width: 620px; }
  .hero { min-height: 560px; margin-top: 8px; padding: 24px 0 28px; }
  .hero::after { top: 152px; right: 0; width: min(43vw, 220px); box-shadow: 9px 10px 0 var(--ink); }
  .hero-grid { width: 100%; }
  .hero-grid { padding: 28px 0 28px; }
  h1 { font-size: clamp(3rem, 15.5vw, 5.5rem); }
  .poster-title { width: 70%; }
  .intro { width: 68%; font-size: 1rem; }
  .event-details { grid-template-columns: .84fr 1.16fr; gap: 10px; margin-top: 33px; }
  .event-details div { padding: 16px 14px 14px; box-shadow: 4px 4px 0 rgba(8, 44, 114, .12); }
  .event-details dd { font-size: clamp(1rem, 5.5vw, 1.35rem); }
  .two-column { grid-template-columns: 1fr; gap: 26px; padding: 60px 0; }
  .response-layout { grid-template-columns: 1fr; gap: 58px; padding: 60px 0; }
  .attendance { margin: 0 -12px; padding: 62px 12px; }
  .response-layout .attendance { margin: 0; padding: 0; }
  .attendance .section-heading, .attendance .stats, .attendance .guest-grid { width: 100%; }
  .commitment-list { width: 100%; grid-template-columns: 1fr; }
  .guest { width: 88px; min-height: 88px; }
  .bring-section { padding: 62px 0; }
  .bring-grid, .admin-grid { grid-template-columns: 1fr; }
  .bring-grid { gap: 32px; }
  .admin-card + .admin-card { border-top: 0; }
}

@media (max-width: 640px) {
  .poster-title, .intro { margin-right: auto; margin-left: auto; text-align: center; }
  .hero::after { top: clamp(260px, 55vw, 320px); right: auto; left: 50%; transform: translateX(-50%) rotate(5deg); }
  .event-details { grid-template-columns: 1fr; gap: 12px; width: min(82%, 310px); margin-top: clamp(250px, 48vw, 310px); margin-right: auto; margin-left: auto; }
}

@media (max-width: 460px) {
  .choice-row { grid-template-columns: 1fr; }
  .hero { min-height: 530px; }
  .hero::after { width: 150px; }
  .poster-title { width: 68%; }
  .intro { width: 66%; }
  .stats { display: flex; gap: 8px; }
  .stats div { margin-right: 0; }
  .guest { width: 78px; min-height: 78px; }
  footer { width: calc(100vw - 24px); max-width: 620px; }
}
