/* D&D Live: prenotazioni. Pensata prima per il telefono. */
@font-face { font-family: 'Geist'; src: url(/fonts/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/geist-mono.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/fonts/instrument-serif-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }

:root { --card: #FBF9F5; --white: #FFFFFF; --text: #2A2730; --soft: #6B6670; --rose: #FCE8EE; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ---------- impaginazione ---------- */
.bk { max-width: 1120px; margin: 0 auto; padding: 0 20px calc(28px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: space-between; align-items: center; height: 68px; border-bottom: 1px solid var(--line); }
.top img { height: 36px; display: block; }
.top .brand { font-size: 15px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 22px; }
.intro { min-width: 0; }
.panel { min-width: 0; }
.how { order: 3; }

@media (min-width: 900px) {
  .bk { padding: 0 32px 48px; }
  .top { height: 84px; }
  .top img { height: 42px; }
  .layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "intro panel" "how panel"; grid-template-rows: auto 1fr; column-gap: 56px; row-gap: 0; padding-top: 48px; align-items: start; }
  .intro { grid-area: intro; }
  .how { grid-area: how; }
  .panel { grid-area: panel; position: sticky; top: 24px; }
}

/* ---------- testata ---------- */
.kicker { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft); }
.intro h1 { font-size: 34px; line-height: 1; letter-spacing: -.04em; font-weight: 700; margin-top: 12px; }
.intro h1 .it { display: block; font-weight: 400; letter-spacing: -.01em; padding-bottom: 4px; }
.intro .sub { font-size: 16px; line-height: 1.45; color: var(--text); margin-top: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.facts span { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
@media (min-width: 900px) {
  .intro h1 { font-size: 60px; margin-top: 16px; }
  .intro .sub { font-size: 19px; margin-top: 22px; max-width: 26em; }
  .facts { margin-top: 22px; gap: 8px; }
  .facts span { font-size: 14px; padding: 8px 14px; }
}

.how { margin-top: 6px; }
.how ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.how li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; color: var(--text); }
.how li b { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 500; color: var(--pink); padding-top: 2px; }
@media (min-width: 900px) { .how { margin-top: 36px; } }

/* ---------- pannello ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px 16px 22px; box-shadow: 0 24px 60px rgba(7,7,10,.06); }
@media (min-width: 560px) { .card { padding: 28px; border-radius: 28px; } }
.demo { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #FFF4C7; border: 1px solid #F1D77A; font-size: 13px; line-height: 1.4; margin-bottom: 18px; }
.sec + .sec { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-head .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 500; background: #07070A; color: #F3EFE7; flex: none; }
.sec-head h2 { font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.sec-head .aside { margin-left: auto; font-size: 12px; color: var(--soft); white-space: nowrap; }

/* calendario: settimane da lunedì a venerdì */
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-head span { text-align: center; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.cal-week + .cal-week { margin-top: 6px; }
.cal-month { font-size: 13px; font-weight: 600; color: var(--soft); margin: 12px 0 8px; }
.cal-month:first-child { margin-top: 0; }
.dayb { position: relative; height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: background .15s, border-color .15s, transform .1s; }
.dayb .dn { font-size: 19px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.dayb .mo { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); line-height: 1; margin-bottom: -1px; }
.dayb.sel .mo { color: #B9B4BE; }
.dayb[disabled] .mo { color: #BDB6AB; }
.dayb .ct { font-size: 10.5px; color: var(--pink); font-weight: 600; line-height: 1; }
.dayb:active:not([disabled]) { transform: scale(.96); }
.dayb[disabled] { background: transparent; border-color: transparent; color: #BDB6AB; cursor: default; }
.dayb[disabled] .ct { visibility: hidden; }
.dayb.sel { background: #07070A; border-color: #07070A; color: #F3EFE7; }
.dayb.sel .ct { color: #FF9DBA; }
.dayb.today::after { content: ''; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }
@media (min-width: 560px) { .dayb { height: 66px; } .dayb .dn { font-size: 22px; } .dayb .ct { font-size: 11px; } .cal-head, .cal-week { gap: 8px; } .cal-week + .cal-week { margin-top: 8px; } }

/* orari */
.slot-group + .slot-group { margin-top: 14px; }
.slot-group p { font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 8px; }
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .times { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb { height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .15s, border-color .15s; }
.tb:hover { border-color: var(--violet); }
.tb.sel { background: #07070A; border-color: #07070A; color: #F3EFE7; }
.hint { font-size: 14px; color: var(--soft); line-height: 1.45; }

/* riepilogo */
.recap { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--rose); margin-bottom: 18px; }
.recap .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.recap .ic small { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); }
.recap .ic b { font-size: 18px; margin-top: 2px; }
.recap .t1 { font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 650; line-height: 1.25; }
.recap .t2 { font-size: 14px; color: var(--soft); margin-top: 2px; }
.recap button { font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px; background: var(--white); }

/* modulo */
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) { .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .fields .full { grid-column: 1 / -1; } }
.fl label.lab, .fl .lab { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.fl .opt-l { font-weight: 400; color: var(--soft); }
.inp { width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 16px; color: var(--paper); outline: none; -webkit-appearance: none; appearance: none; }
textarea.inp { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.4; }
.inp:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(123,92,255,.12); }
.inp.bad { border-color: #D2405A; }
.inp::placeholder { color: #A9A39A; }
.topics { display: grid; gap: 8px; }
.topic { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); text-align: left; font-size: 15px; line-height: 1.3; }
.topic .rd { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #B9B1A4; flex: none; display: grid; place-items: center; }
.topic.sel { border-color: var(--pink); background: var(--rose); }
.topic.sel .rd { border-color: var(--pink); }
.topic.sel .rd::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 0; accent-color: #E8336E; }
.consent a { color: inherit; text-underline-offset: 2px; }
.trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.go { width: 100%; height: 56px; margin-top: 18px; border-radius: 999px; background: var(--g); color: #07070A; font-weight: 700; font-size: 17px; }
.go[disabled] { opacity: .5; }
.fine { font-size: 12px; color: var(--soft); text-align: center; margin-top: 10px; }

/* stati */
.skeleton { border-radius: 14px; background: linear-gradient(90deg, #EEE8DE 0%, #F7F3EC 50%, #EEE8DE 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 18px 4px; text-align: center; color: var(--soft); font-size: 15px; line-height: 1.5; }
.empty b { color: var(--paper); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; color: inherit; text-decoration: none; white-space: nowrap; }
.btn.dark { background: #07070A; color: #F3EFE7; border-color: #07070A; }
.btn.warn { border-color: #E0A3AE; color: #B4233A; background: var(--white); }
.btn.warn.arm { background: #B4233A; color: #fff; border-color: #B4233A; }

.done { text-align: center; padding: 8px 0 4px; }
.done .rings { width: 140px; height: 140px; margin: 0 auto 18px; }
.done .rings b { inset: 56px; }
.done h2 { font-size: 30px; letter-spacing: -.035em; line-height: 1.05; }
.done h2 .it { display: block; }
.done p { font-size: 16px; line-height: 1.5; color: var(--text); margin: 12px auto 0; max-width: 26em; overflow-wrap: anywhere; }
.done .when { margin: 20px auto 0; padding: 16px 18px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); max-width: 340px; }
.done .when b { display: block; font-size: 17px; }
.done .when span { display: block; font-size: 14px; color: var(--soft); margin-top: 4px; }
.done .small { font-size: 13px; color: var(--soft); }

.toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(92vw, 440px); padding: 14px 16px; border-radius: 14px; background: #07070A; color: #F3EFE7; font-size: 14px; line-height: 1.4; text-align: center; box-shadow: 0 12px 40px rgba(7,7,10,.25); z-index: 10; }

/* ---------- area riservata ---------- */
.adm .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 22px 0 18px; }
@media (min-width: 900px) { .adm .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 0; }
.stat .kicker { font-size: 10px; }
.stat b { display: block; font-size: 34px; letter-spacing: -.04em; line-height: 1; margin-top: 8px; }
.stat b small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--soft); }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.4; margin-bottom: 14px; }
.alert.y { background: #FFF4C7; border: 1px solid #F1D77A; }
.alert.r { background: #FDE2E4; border: 1px solid #E0A3AE; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.seg button { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.seg button.sel { background: #07070A; color: #F3EFE7; }
.toolbar .sp { flex: 1; }
.list { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.row.off { opacity: .5; }
.row .d { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.row .d b { font-size: 16px; }
.row .d span { font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.row .host { flex-basis: 100%; margin-left: 0; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }
.row .who b { font-size: 16px; }
.row .who a, .row .who span { display: block; font-size: 14px; color: var(--soft); margin-top: 2px; overflow-wrap: anywhere; }
.row .what { font-size: 14px; line-height: 1.45; }
.row .tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--rose); margin-bottom: 4px; }
.row .act { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .row { grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 16px 20px; }
  .row .d { flex-direction: column; gap: 2px; }
  .row .host { margin-left: 0; flex-basis: auto; }
}
.login { max-width: 420px; margin: 10vh auto 0; }
.login h1 { font-size: 32px; letter-spacing: -.03em; line-height: 1.05; margin: 10px 0 18px; }
.login h1 .it { display: block; }
.login[hidden], [hidden] { display: none !important; }
