:root {
  --bg: #0b1c2c;
  --bg-soft: #14253a;
  --paper: #f7f1e8;
  --ink: #1a2430;
  --muted: #5c6670;
  --gold: #e8c07a;
  --gold-dark: #c9a05a;
  --ok: #1f6b4a;
  --err: #8b2e2e;
  --radius: 10px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, #163048 0%, var(--bg) 55%),
    var(--bg);
  min-height: 100vh;
}

.hero {
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
  line-height: 0;
  overflow: hidden;
  background: transparent;
  display: flex;
  justify-content: center;
}
.hero img {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.panel {
  max-width: 720px;
  margin: 1rem auto 3rem;
  padding: 1.75rem 1.5rem 2rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}
@media (max-width: 600px) {
  .hero {
    padding: 0.5rem 0.75rem 0;
  }
  .panel {
    margin-top: 0.75rem;
  }
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 1rem;
  color: var(--bg-soft);
}

.lede {
  margin: 0 0 0.35rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.form-intro {
  margin: 0.65rem 0 0;
  padding: 0.85rem 1rem;
  background: #ebe3d6;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 42rem;
}

.form label {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.form label[hidden],
.form [hidden] {
  display: none !important;
}
.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d4c8b4;
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
}
.form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6a7a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold-dark);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
}

fieldset {
  border: 1px solid #d4c8b4;
  border-radius: 6px;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
}
legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.radio {
  font-weight: 400 !important;
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem !important;
}
.radio input { width: auto; margin: 0; }

.btn {
  display: inline-block;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--bg-soft);
  color: var(--bg-soft);
}

.totale-box {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: #ebe3d6;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
  font-size: 1.05rem;
  color: var(--bg-soft);
}
.totale-box strong {
  font-size: 1.2rem;
  color: var(--ink);
}
.caparra-note {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}
#caparra-row[hidden] {
  display: none !important;
}
#caparra-row:not([hidden]) {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #d4c8b4;
}

.error { color: var(--err); }
.success { color: var(--ok); }
.muted { color: var(--muted); font-size: 0.9rem; }

.iban-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.iban-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e0d5c4;
}
.iban-list span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.share-box {
  background: #ebe3d6;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0 1.5rem;
  text-align: center;
}
.share-box code {
  display: block;
  word-break: break-all;
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
}
.share-box .qr {
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  margin: 0.75rem 0 1rem;
}
.share-actions .btn {
  margin: 0;
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1da851) !important;
  color: #fff !important;
}
.btn-whatsapp:hover {
  filter: brightness(1.06);
}

.soldout-banner {
  background: #f3e8e4;
  border: 1px solid #d4b4a8;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.25rem;
}
.soldout-banner p {
  margin: 0;
  font-size: 1.05rem;
  color: #5c2e24;
}

.join-banner {
  background: #ebe3d6;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}
.join-banner[hidden],
.join-panel[hidden],
.join-search[hidden],
.search-results[hidden],
.form-intro[hidden] {
  display: none !important;
}
.join-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
}

.join-panel {
  margin: 0 0 1.25rem;
}
.join-search {
  margin-top: 0.85rem;
  padding: 1rem;
  border: 1px dashed #d4c8b4;
  border-radius: 8px;
  background: #faf6f0;
}
.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.tavolo-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.tavolo-result:hover:not(:disabled) {
  border-color: var(--gold-dark);
  outline: 2px solid var(--gold);
}
.tavolo-result:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tavolo-result strong {
  color: var(--bg-soft);
}
.tavolo-result-cta {
  color: var(--bg-soft) !important;
  font-size: 1.02rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.tavolo-result:not(:disabled):hover .tavolo-result-cta {
  color: var(--gold-dark) !important;
}

.event-copy {
  margin: 0 0 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0d5c4;
}
.event-copy > h1 {
  margin-bottom: 1.15rem;
}
.event-block {
  margin: 0 0 1.25rem;
}
.event-block:last-child {
  margin-bottom: 0;
}
.event-block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
  color: var(--bg-soft);
}
.event-block p {
  margin: 0 0 0.65rem;
  line-height: 1.55;
}
.event-block p:last-child {
  margin-bottom: 0;
}
.event-dopocena .btn {
  display: inline-block;
  margin: 0.15rem 0 0.35rem;
  text-decoration: none;
}
.event-contacts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.event-contacts li {
  margin: 0.35rem 0;
  line-height: 1.45;
}
.event-contacts a {
  color: var(--bg-soft);
  font-weight: 600;
  text-decoration: none;
}
.event-contacts a:hover {
  text-decoration: underline;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.25rem;
}
.panel-head h1 { margin-bottom: 0; }
.panel-head .lede { margin-bottom: 0.35rem; }
.panel-head .btn.ghost {
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  flex-shrink: 0;
}
.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.prenota-choice {
  margin: 0.5rem 0 1.5rem;
  padding: 1.25rem 1.1rem 1.4rem;
  background: linear-gradient(180deg, rgba(232, 192, 122, 0.18), transparent);
  border: 1px solid #e0d5c4;
  border-radius: 10px;
}
.prenota-choice-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.25;
}
.prenota-choice-copy p {
  margin: 0 0 0.75rem;
  line-height: 1.55;
  color: var(--ink);
}
.prenota-choice-copy p:last-child {
  margin-bottom: 1.15rem;
}
.prenota-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.prenota-choice-actions .btn {
  flex: 1 1 14rem;
  text-align: center;
}
.form-mode-bar {
  margin: 0 0 1rem;
}
.form[hidden],
.prenota-choice[hidden] {
  display: none !important;
}
.menu-section {
  margin-bottom: 0.65rem;
}
.menu-section:last-child {
  margin-bottom: 0;
}
.menu-section-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--gold-dark);
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.menu-list-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list-bullets li {
  position: relative;
  padding: 0.28rem 0.15rem 0.28rem 1rem;
  border-bottom: 1px solid #e8dfd0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.3;
  text-align: left;
}
.menu-list-bullets li:last-child {
  border-bottom: none;
}
.menu-list-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.28rem;
  color: var(--gold-dark);
  font-size: 0.95rem;
  margin: 0;
  display: inline;
  line-height: 1.3;
}
#modal-menu .modal {
  max-height: min(92vh, 720px);
  overflow: hidden;
}
#modal-menu .guida-body.menu-body {
  padding: 0.7rem 1.1rem 0.35rem;
  overflow-y: auto;
  max-height: calc(92vh - 8rem);
}
#modal-menu .modal-head {
  padding: 0.75rem 1.1rem 0.55rem;
}
#modal-menu .modal-head h2 {
  font-size: 1.25rem;
  color: var(--gold-dark);
}
#modal-menu .modal-foot {
  padding: 0.55rem 1.1rem 0.85rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 44, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 1rem;
}
.modal-backdrop.open {
  display: flex;
}
.modal-backdrop[hidden] {
  display: none !important;
}
.modal {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 0;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid #e0d5c4;
  background: #ebe3d6;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--bg-soft);
}
.modal-close {
  border: none;
  background: transparent;
  color: var(--bg-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.modal-close:hover {
  background: rgba(20, 37, 58, 0.08);
}
.guida-body {
  padding: 1.15rem 1.25rem 0.5rem;
  overflow: visible;
}
.guida-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guida;
}
.guida-list li {
  counter-increment: guida;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.15rem 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #e0d5c4;
}
.guida-list li:last-child {
  border-bottom: none;
}
.guida-list li::before {
  content: counter(guida);
  grid-row: 1 / span 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.guida-list strong {
  color: var(--bg-soft);
  font-size: 1rem;
}
.guida-list span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  grid-column: 2;
}
.guida-note {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  background: #ebe3d6;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--bg-soft);
  line-height: 1.45;
}
.modal-foot {
  padding: 0.85rem 1.25rem 1.15rem;
  display: flex;
  justify-content: flex-end;
}
.modal-foot .btn {
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
}

.toast-confirm-backdrop {
  z-index: 50;
}
.toast-confirm {
  max-width: 380px;
  text-align: center;
}
.toast-confirm-body {
  padding: 1.5rem 1.35rem 0.5rem;
}
.toast-confirm-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--bg-soft);
  line-height: 1.35;
}
.toast-confirm-foot {
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.consents {
  margin: 0 0 1.25rem;
  padding: 1rem;
  background: #ebe3d6;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
}
.consents-link-wrap {
  margin: 0 0 1rem;
}
.link-btn {
  display: inline;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--bg-soft);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--gold-dark);
}
.consent-hint {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
}
.consent input {
  width: auto;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
}

.privacy-modal {
  max-width: 640px;
  max-height: min(90vh, 840px);
  overflow: hidden;
}
.privacy-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  max-height: min(70vh, 620px);
  -webkit-overflow-scrolling: touch;
}
.privacy-doc h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--bg-soft);
}
.privacy-doc h3 + h3,
.privacy-doc h4 + h3 {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e0d5c4;
}
.privacy-doc h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
  color: var(--bg-soft);
}
.privacy-doc p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.privacy-doc ul,
.privacy-doc ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.privacy-doc li {
  margin-bottom: 0.25rem;
}
.privacy-doc ol.privacy-letter {
  list-style-type: lower-alpha;
}
