body { color: var(--ink); min-height: 100vh; }

.logo-mask {
  display: block; aspect-ratio: 201.6 / 76; background: currentColor;
  -webkit-mask: url("../assets/img/logo.svg") center / contain no-repeat;
  mask: url("../assets/img/logo.svg") center / contain no-repeat;
}

/* ---------- layout */
.layout { min-height: 100vh; }
.hero { position: relative; height: 38vh; min-height: 250px; max-height: 360px; overflow: hidden; color: var(--carta-chiara); }
.hero-img { position: absolute; inset: 0; background: url("../assets/img/vetrata.jpg") center 58% / cover no-repeat; transform: scale(1.02); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,18,16,.30) 0%, rgba(42,18,16,.05) 40%, rgba(42,18,16,.72) 100%); }
.hero-brand { position: absolute; left: 0; right: 0; bottom: 26px; display: grid; justify-items: center; gap: 8px; }
.hero-logo { width: 170px; color: var(--carta-chiara); filter: drop-shadow(0 1px 8px rgba(0,0,0,.25)); }
.hero-claim { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; opacity: .92; }

.panel { position: relative; margin-top: -18px; border-radius: 20px 20px 0 0; padding: 6px 20px 0; background: inherit; }
.panel.paper { background-color: var(--avorio); }
.topbar { display: flex; justify-content: flex-end; align-items: center; height: 44px; }
.top-logo { display: none; width: 120px; color: var(--ink); }
.lang { display: inline-flex; border: 1px solid rgba(63,40,41,.22); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: .08em; color: var(--bordeaux-600); }
.lang button[aria-pressed="true"] { background: var(--bordeaux-600); color: var(--carta-chiara); }

form { max-width: 560px; margin: 0 auto; padding-bottom: 150px; }
.intro { padding: 4px 0 6px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1.08; margin: 6px 0 10px; color: var(--bordeaux-900); letter-spacing: -.005em; }
.lead { margin: 0; font-size: 16.5px; line-height: 1.45; color: rgba(63,40,41,.82); }

.step { padding: 26px 0 4px; border-bottom: 1px solid rgba(63,40,41,.12); }
.step:last-of-type { border-bottom: 0; }
h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-family: var(--font-ui); font-weight: 500; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--bordeaux-600); }
h2 .num { font-family: var(--font-display); font-size: 15px; letter-spacing: 0; color: rgba(111,47,47,.55); }

/* ---------- date */
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 10px; margin: 0 -20px; scroll-snap-type: x proximity; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date { flex: 0 0 auto; scroll-snap-align: start; width: 66px; height: 82px; display: grid; justify-items: center; align-content: center; gap: 1px;
  border: 1px solid rgba(63,40,41,.18); border-radius: var(--radius); background: rgba(255,255,255,.35); transition: background .2s var(--ease), border-color .2s, transform .15s; }
.date:active { transform: scale(.97); }
.date .wd { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.date .d { font-family: var(--font-display); font-size: 27px; line-height: 1.05; }
.date .m { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.date[aria-checked="true"] { background: var(--bordeaux-600); border-color: var(--bordeaux-600); color: var(--carta-chiara); }
.date[aria-checked="true"] .wd, .date[aria-checked="true"] .m { opacity: .85; }
.date:disabled { opacity: .38; cursor: not-allowed; background: transparent; }
.date:disabled .d { text-decoration: line-through; text-decoration-thickness: 1px; }
.other-date { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 14.5px; color: var(--bordeaux-600); }
.other-date input { border: 1px solid rgba(63,40,41,.2); border-radius: 10px; background: rgba(255,255,255,.4); padding: 6px 10px; min-height: 38px; }

/* ---------- turni */
.shifts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shift { text-align: left; padding: 14px 14px 13px; border: 1px solid rgba(63,40,41,.18); border-radius: var(--radius); background: rgba(255,255,255,.35); min-height: 96px; display: grid; align-content: start; gap: 3px; transition: background .2s var(--ease), border-color .2s; }
.shift .t { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--bordeaux-600); }
.shift .h { font-family: var(--font-display); font-size: 21px; color: var(--bordeaux-900); white-space: nowrap; }
.shift .s { font-size: 13px; line-height: 1.3; color: rgba(63,40,41,.7); }
.shift[aria-checked="true"] { border-color: var(--bordeaux-600); background: rgba(111,47,47,.07); box-shadow: inset 0 0 0 1px var(--bordeaux-600); }
.shift:disabled { opacity: .5; cursor: not-allowed; }
.shift:disabled .s { color: var(--bordeaux-600); font-weight: 500; }
.times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 0; }
.times:empty { margin: 0; }
.pill { border: 1px solid rgba(63,40,41,.2); border-radius: 999px; padding: 9px 16px; background: rgba(255,255,255,.35); font-size: 15px; font-variant-numeric: tabular-nums; min-height: 42px; }
.pill[aria-checked="true"] { background: var(--bordeaux-600); color: var(--carta-chiara); border-color: var(--bordeaux-600); }
.pill:disabled { opacity: .4; text-decoration: line-through; }

/* ---------- persone */
.people { display: flex; align-items: center; gap: 22px; }
.stepper { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(63,40,41,.25); background: rgba(255,255,255,.4); font-size: 26px; line-height: 1; color: var(--bordeaux-600); }
.stepper:disabled { opacity: .3; }
#peopleOut { min-width: 2ch; text-align: center; font-family: var(--font-display); font-size: 44px; color: var(--bordeaux-900); }
.hint { margin: 12px 0 0; font-size: 14.5px; line-height: 1.45; color: rgba(63,40,41,.8); }
.group-hint { padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(111,47,47,.07); }
.group-hint a { color: var(--bordeaux-600); font-weight: 500; }

/* ---------- aree */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .pill small { display: block; font-size: 11px; opacity: .8; }

/* ---------- campi */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--bordeaux-700); }
.field label em { font-style: normal; font-weight: 400; color: rgba(63,40,41,.5); margin-left: 4px; }
.field input, .field textarea { width: 100%; border: 1px solid rgba(63,40,41,.2); border-radius: var(--radius-sm); background: rgba(255,255,255,.55); padding: 13px 14px; font-size: 16px; min-height: 50px; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--bordeaux-600); box-shadow: 0 0 0 3px rgba(111,47,47,.14); }
.field small { font-size: 13px; color: rgba(63,40,41,.6); }
.field.invalid input { border-color: #a3322c; box-shadow: 0 0 0 3px rgba(163,50,44,.12); }
.welcome { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.4; color: rgba(63,40,41,.68); }
.welcome li { padding-left: 14px; position: relative; }
.welcome li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--oro); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; margin: 12px 0; font-size: 14.5px; line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bordeaux-600); }
.check.invalid span { color: #a3322c; }

.error { margin: 18px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: #f3dcd8; color: #7d2621; font-size: 14.5px; line-height: 1.4; }

/* ---------- invio */
.submit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: rgba(239,236,231,.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid rgba(63,40,41,.1); }
.summary { max-width: 560px; margin: 0 auto 8px; font-size: 13.5px; color: rgba(63,40,41,.75); min-height: 1.3em; text-align: center; }
.cta { display: block; width: 100%; max-width: 560px; margin: 0 auto; border: 0; border-radius: 999px; background: var(--bordeaux-600); color: var(--carta-chiara); font-size: 16px; font-weight: 500; letter-spacing: .06em; padding: 16px 20px; text-align: center; text-decoration: none; transition: background .2s, transform .15s; }
.cta:active { transform: scale(.985); }
.cta:hover { background: var(--bordeaux-700); }
.cta[disabled] { opacity: .55; }
.cta.ghost { background: transparent; color: var(--bordeaux-600); box-shadow: inset 0 0 0 1px var(--bordeaux-600); }
.link { display: block; margin: 16px auto 0; border: 0; background: none; color: var(--bordeaux-600); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }

/* ---------- conferma ricezione */
.done { max-width: 560px; margin: 0 auto; padding: 26px 0 60px; outline: none; }
.eyebrow { margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--bordeaux-600); }
.ticket { margin: 22px 0; padding: 18px 20px; border-radius: var(--radius); background: rgba(255,255,255,.45); border: 1px solid rgba(63,40,41,.14); display: grid; gap: 10px; }
.ticket div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.ticket dt, .ticket span:first-child { color: rgba(63,40,41,.6); }
.ticket strong { font-weight: 500; text-align: right; }

.foot { text-align: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(63,40,41,.45); padding: 10px 0 130px; }
.done:not([hidden]) ~ .foot { padding-bottom: 30px; }

.dlg { border: 0; border-radius: 18px; padding: 24px; max-width: 420px; background: var(--carta-chiara); color: var(--ink); }
.dlg::backdrop { background: rgba(42,18,16,.45); }
.dlg h2 { font-family: var(--font-display); text-transform: none; letter-spacing: 0; font-size: 24px; color: var(--bordeaux-900); }

/* ---------- desktop / tablet */
@media (min-width: 980px) {
  .layout { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
  .hero { position: sticky; top: 0; height: 100vh; max-height: none; }
  .hero-img { background-position: center; }
  .hero-brand { bottom: 48px; }
  .hero-logo { width: 220px; }
  .hero-claim { font-size: 20px; }
  .panel { margin: 0; border-radius: 0; padding: 18px 56px 0; }
  .submit-bar { position: sticky; bottom: 0; margin: 24px 0 0; padding: 26px 0 24px; border-top: 0; background: linear-gradient(rgba(230,227,222,0), var(--avorio) 28%); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .shift .h { font-size: 23px; }
  form { padding-bottom: 0; }
  h1 { font-size: 42px; }
  .foot { padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
