:root {
  --ink: #141414; --paper: #f5f5f1; --card: #fff; --line: #dcdcd4; --soft: #ecece6;
  --muted: #5b5954; --red: #e63141; --red-dark: #b71f2d;
  --green: #a9ddb4; --green-bg: #e9f6ec; --green-dark: #1f6b33;
  --amber: #c98a00; --amber-bg: #fdf3d7; --amber-dark: #7a5200;
  --yellow: #e9b53a; --teal: #2f8f94;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --display: Montserrat, var(--sans);
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--sans); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1 { font: italic 900 clamp(30px, 5vw, 44px)/1.08 var(--display); letter-spacing: -.02em; }
h2 { font-size: 21px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 10px; }
.num { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 17px var(--mono); }
.num--sm { width: 24px; height: 24px; font-size: 13px; margin-right: 8px; }
h1:focus, h2:focus { outline: none; }
.eyebrow { font: 700 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 15px; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.lead { color: var(--muted); margin-top: 8px; }

/* ---------- struttura ---------- */
.top, main, .foot { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.top { display: flex; justify-content: space-between; align-items: center; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { background: var(--ink); color: #fff; font: italic 900 18px/1 var(--display); padding: 8px 9px; letter-spacing: -.02em; }
.brand__name { font: 700 11px/1.15 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.top__link { font-size: 14px; text-decoration: none; color: var(--muted); padding: 8px 0; }
.top__link:hover { color: var(--ink); text-decoration: underline; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: center; padding-block: 8px 24px; }
.hero .eyebrow { margin-bottom: 10px; color: var(--red-dark); }
.hero__sub { color: var(--muted); margin-top: 10px; max-width: 46ch; }
.hero__photo { display: block; width: 100%; height: 190px; object-fit: cover; object-position: 55% 62%; border-radius: var(--radius); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px 40px; margin-top: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.block { padding: clamp(16px, 3vw, 26px); }
.block + .block { border-top: 1px solid var(--line); }
.block__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }

/* ---------- giorno ---------- */
.days { display: flex; gap: 8px; align-items: stretch; }
.days__list { display: flex; gap: 8px; overflow-x: auto; padding: 3px; margin: -3px; scrollbar-width: none; flex: 1; min-width: 0; scroll-snap-type: x proximity; }
.days__list::-webkit-scrollbar { display: none; }
.daychip { flex: none; scroll-snap-align: start; position: relative; display: grid; justify-items: center; min-width: 76px; padding: 10px 10px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); line-height: 1.15; }
.daychip span { font-size: 14px; color: var(--muted); text-transform: capitalize; }
.daychip strong { font: 700 24px/1.2 var(--mono); }
.daychip { background: var(--green-bg); border-color: #b9dcc1; }
.daychip.is-few { background: var(--amber-bg); border-color: #ecd28f; }
.daychip.is-full { background: #fbdfe2; border-color: #f3b6bc; }
.daychip.is-full strong { text-decoration: line-through; }
.daychip:hover:not(:disabled) { border-color: var(--ink); }
.daychip:disabled { opacity: .7; }
.daychip[aria-pressed=true] { border: 2.5px solid var(--ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); padding: 9px 9px 9px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 16px; min-height: 48px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.chip small { font: 500 12px var(--mono); color: var(--muted); margin-left: 4px; }
.chip:hover:not(:disabled) { border-color: var(--ink); }
.chip[aria-pressed=true], .chip[aria-expanded=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed=true] small { color: #d6d6d0; }
.chip:disabled { opacity: .4; }
.chip--cal { border-radius: 10px; flex: none; }

.cal { margin-top: 14px; max-width: 420px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal__head strong { text-transform: capitalize; }
.iconbtn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); font-size: 20px; line-height: 1; }
.iconbtn:hover:not(:disabled) { border-color: var(--ink); }
.iconbtn:disabled { opacity: .3; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__dow span { text-align: center; font: 700 11px var(--mono); text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal__dow .we { opacity: .55; }
.day { position: relative; height: 44px; width: 100%; border: 1.5px solid transparent; border-radius: 8px; background: var(--green-bg); font-weight: 600; padding: 0; }
.day--few { background: var(--amber-bg); }
.day--full { background: #fbdfe2; }
.day:hover:not(:disabled) { border-color: var(--ink); }
.day--today .day__n { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.day:disabled { background: transparent; color: #a3a19b; font-weight: 400; }
.day--full:disabled { background: #fbdfe2; color: #8c3a43; text-decoration: line-through; }
.day[aria-pressed=true] { border: 2.5px solid var(--ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); z-index: 1; }

/* ---------- orario ---------- */
.times { display: grid; grid-template-columns: 180px 180px 1fr; gap: 14px; align-items: end; }
.times__note { height: 52px; display: flex; align-items: center; font-size: 16px; font-weight: 600; color: var(--muted); }
.legend--days { margin: 10px 0 0; }
.legend .key--full { border-color: #f3b6bc; background: #fbdfe2; }
.field { display: block; font-size: 16px; font-weight: 600; }
.hint { display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.field input, .field select { display: block; width: 100%; margin-top: 5px; height: 52px; padding: 0 14px; border: 1.5px solid #8f8d86; border-radius: 8px; background: var(--card); font-size: 18px; font-weight: 400; }
.field select { font-family: var(--mono); font-weight: 700; font-size: 20px; appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.field input:hover, .field select:hover { border-color: var(--ink); }
.field input[aria-invalid=true] { border-color: var(--red); background: #fff6f6; }
.err { display: block; font-size: 15px; margin-top: 5px; color: var(--red-dark); font-weight: 600; }
.err:empty { display: none; }

/* ---------- planimetria ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 18px; height: 18px; border-radius: 3px; display: inline-block; border: 1.5px solid var(--green-dark); background: var(--green-bg); }
.key--soon { border-color: var(--amber); background: var(--amber-bg); }
.key--busy { border: 1.5px dashed #a9a7a0; background: var(--soft); }
.key--sel { border-color: var(--ink); background: var(--ink); }

.room { position: relative; aspect-ratio: 800 / 560; width: 100%; }
.room svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-floor { fill: #fafaf7; }
.r-wall { fill: none; stroke: var(--ink); stroke-width: 6; }
.r-window { fill: #9ed3e6; stroke: var(--ink); stroke-width: 1.5; }
.r-wood { fill: #e3c79a; stroke: #b99a66; stroke-width: 1; }
.r-pouf { fill: #f2b9bd; }
.r-gap { fill: #fafaf7; }
.r-door { fill: none; stroke: #8b8983; stroke-width: 2; stroke-dasharray: 5 4; }
.r-furn { fill: var(--soft); stroke: #b9b7b0; stroke-width: 1.5; }
.r-divider { fill: var(--yellow); }
.r-chair circle { fill: #d9d9d2; }
.r-label { font: 700 11px var(--mono); letter-spacing: .12em; fill: #8b8983; }
.room__note { margin-top: 8px; font-size: 14px; color: var(--muted); }
.assign { margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; background: var(--green-bg); border: 1px solid #b9dcc1; font-size: 16px; font-weight: 600; }
.assign--none { background: #fbdfe2; border-color: #f3b6bc; color: #7c1420; }

.desk { position: absolute; display: grid; place-content: center; justify-items: center; gap: 1px; padding: 2px; border: 2px solid var(--green-dark); border-radius: 7px; background: var(--green-bg); line-height: 1.15; text-align: center; }
.desk strong { font: 700 clamp(16px, 2.4vw, 26px)/1.1 var(--mono); }
.desk span { font-size: clamp(10px, 1.3vw, 14px); font-weight: 600; color: var(--green-dark); }
.desk:hover:not(:disabled) { background: var(--green); }
.desk.is-soon { border-color: var(--amber); background: var(--amber-bg); }
.desk.is-soon span { color: var(--amber-dark); }
.desk:disabled { cursor: default; }
.desk.is-busy { border: 2px dashed #a9a7a0; background: var(--soft); color: #8b8983; background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.06) 6px 8px); }
.desk.is-busy span { color: #8b8983; }
.desk[aria-pressed=true] { background: var(--ink); border-color: var(--ink); border-style: solid; color: #fff; box-shadow: 0 0 0 3px var(--green); }
.desk[aria-pressed=true] span { color: var(--green); }
.desk[aria-pressed=true].is-soon { box-shadow: 0 0 0 3px #f1c453; }
.desk[aria-pressed=true].is-soon span { color: #f1c453; }

/* ---------- prenotazione ---------- */
.book { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--ink); border-radius: var(--radius); padding: 22px 20px; scroll-margin-top: 12px; }
.book .eyebrow { color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; }
.book h2 { font: italic 900 26px/1.1 var(--display); letter-spacing: -.02em; }
.book__hint { margin-top: 10px; color: var(--muted); }
.book__auto { margin-top: 6px; font-size: 14px; color: var(--muted); }
.book__sum { margin: 14px 0 0; }
.book__sum div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.book__sum dt { color: var(--muted); font-size: 15px; }
.book__sum dd { margin: 0; font-weight: 600; text-align: right; }
.book__addr { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.warn { margin-top: 6px; padding: 12px; border-radius: 8px; background: var(--amber-bg); border: 1px solid #ecd28f; color: #4a3200; font-size: 14px; }
.warn .btn { margin-top: 10px; width: 100%; }
#form { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--ink); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.privacy { font-size: 13px; color: var(--muted); padding: 10px 12px; background: var(--soft); border-radius: 8px; }
.notice { padding: 10px 12px; border-radius: 8px; background: #fdecee; border: 1px solid #f3b6bc; color: #7c1420; font-size: 14px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 22px; border-radius: 8px; border: 1.5px solid var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; background: var(--card); text-align: center; }
.btn--wide { width: 100%; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #000; box-shadow: 0 0 0 3px var(--green); }
.btn--primary:disabled { background: #b9b7b0; border-color: #b9b7b0; }
.btn--light { min-height: 44px; font-size: 14px; border-color: #b08a2e; background: #fff; }
.btn--light:hover { background: #fff8e2; }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { border-color: var(--red); color: var(--red-dark); }
.btn--danger:hover { background: #fdecee; }
.btn--danger.is-armed { background: var(--red); color: #fff; }

.help { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 22px; font-size: 14px; color: var(--muted); }
.help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.help details p { margin-top: 6px; max-width: 46ch; }
.bar { display: none; }

/* ---------- conferma ---------- */
.ticketwrap { padding-block: 16px 8px; }
.ticket { max-width: 620px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--green-dark); border-radius: var(--radius); padding: clamp(22px, 5vw, 40px); }
.ticket.is-off { border-top-color: #b9b7b0; }
.ticket__badge { width: 52px; height: 52px; border-radius: 50%; background: var(--green); display: grid; place-items: center; font-size: 26px; font-weight: 700; margin-bottom: 16px; }
.ticket.is-off .ticket__badge { background: var(--soft); }
.ticket .eyebrow { color: var(--green-dark); margin-bottom: 8px; }
.ticket.is-off .eyebrow { color: var(--muted); }
.ticket__list { margin: 22px 0 0; }
.ticket__list div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ticket__list dt { color: var(--muted); font-size: 14px; }
.ticket__list dd { margin: 0; font-weight: 600; }
.ticket__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- tablet e telefono ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .book { position: static; }
  .bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 16px calc(-1 * clamp(16px, 4vw, 32px)) 0; padding: 10px clamp(16px, 4vw, 32px) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
  .bar__sum { flex: 1; min-width: 0; display: grid; font-size: 13px; color: var(--muted); }
  .bar__sum strong { color: var(--ink); font-size: 15px; }
  .bar__sum span, .bar__sum strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; gap: 14px; padding-block: 4px 16px; }
  .hero__photo { height: auto; aspect-ratio: 5 / 2; }
  .times { grid-template-columns: 1fr 1fr; }
  .times__note { grid-column: 1 / -1; height: auto; }
  .desk span, .r-label, .room__note { display: none; }
  .desk { border-radius: 5px; border-width: 1.5px; }
  .desk strong { font-size: 15px; }
  .ticket__actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .day, .desk, .chip, .daychip { transition: background-color .12s, border-color .12s, box-shadow .12s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Production integration: original brand and usable small-screen targets. */
.original-logo{display:block;width:150px;height:auto}.preview-note{padding:12px;background:#e9f6ec;margin-bottom:20px;font-size:14px}.server-error{margin-bottom:20px}.space-choice{margin-bottom:16px}.meeting-guests{margin-top:16px;max-width:200px}.desk-list{display:none}.daychip.is-unknown,.day.day--unknown{background:var(--soft);border-color:var(--line)}.days__list{min-height:88px}.room #desk-list{position:static}.notice:empty{display:none}.grecaptcha-badge{position:relative!important;right:auto!important;bottom:auto!important;margin:16px auto;box-shadow:none!important}.book{max-height:calc(100vh - 32px);overflow-y:auto}.cal__grid .day{font-size:16px}.assign{min-height:48px}
@media(max-width:900px){.book{max-height:none;overflow:visible}.bar{position:fixed;left:0;right:0;margin:0;bottom:0}.foot{padding-bottom:110px}.book{scroll-margin-top:18px}}
@media(max-width:640px){.room{aspect-ratio:auto;padding-top:70%;}.room>svg{height:auto;aspect-ratio:800/560}.room #desks{position:absolute;top:0;left:0;width:100%;aspect-ratio:800/560;pointer-events:none}.room #desks .desk{pointer-events:none}.desk-list{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding-top:12px}.desk-list .desk{position:static;width:auto;height:52px;font-size:16px}.desk-list .desk span{display:block;font-size:11px}.top__link{font-size:12px}.original-logo{width:130px}.row2{grid-template-columns:1fr}.field input,.field select{min-width:0;width:100%}.times{min-width:0}.times>*{min-width:0}.hero__sub{font-size:16px}.cal{padding:8px}.cal__grid{gap:2px}.cal__grid .day{height:40px}.daychip{min-width:66px}.chip--cal{font-size:14px;padding:10px}.foot{overflow-wrap:anywhere}.help{overflow-wrap:anywhere}.bar .btn{padding:0 18px;min-height:50px}input,select{scroll-margin-bottom:100px}.book .row2{gap:14px}}

/* Real booking receipt, using the prototype's typography, surfaces and palette. */
.booking-header{max-width:1160px;margin:auto;padding:16px 32px;display:flex;justify-content:space-between;align-items:center;gap:20px}.booking-header img{display:block;width:150px;height:auto}.back-site{font-size:14px}.receipt-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;padding-top:24px;padding-bottom:32px}.booking-ticket{background:var(--card);border:1px solid var(--line);border-top:5px solid var(--green-dark);border-radius:var(--radius);padding:clamp(22px,4vw,40px)}.ticket-status,.ticket-bottom>span,.ticket-space>span{font:12px var(--mono);color:var(--green-dark)}.booking-ticket h1{margin:16px 0 24px}.ticket-name{font-size:24px;font-weight:650}.ticket-time{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.ticket-time span{display:block;color:var(--muted);font-size:14px}.ticket-time strong{display:block;font-size:20px}.ticket-space{padding:20px 0;border-top:1px solid var(--line);border-bottom:1px dashed var(--line)}.ticket-space p{margin-top:12px}.ticket-bottom{padding-top:24px;display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between}.ticket-bottom p{font-size:14px;color:var(--muted)}.receipt-actions{padding:16px 0}.receipt-actions h2{font-size:26px;margin-bottom:12px}.receipt-actions p{margin:12px 0}.receipt-primary{display:block;padding:16px 22px;background:var(--red);color:white;border-radius:6px;text-decoration:none;text-align:center;font-weight:650;margin:24px 0 12px}.help-text,.receipt-mail{font-size:14px;color:var(--muted)}.calendar-link{display:block;margin:24px 0}.receipt-details{border-top:1px solid var(--line);padding:18px 0}.receipt-details summary{cursor:pointer;font-weight:600}.secret{overflow-wrap:anywhere;font-size:14px}.receipt-help{display:block;margin-top:24px;font-size:14px}.cancel-button{padding:12px 18px;border:1px solid var(--red-dark);color:var(--red-dark);background:white;border-radius:6px;margin-top:16px}.booking-receipt footer{max-width:1160px;margin:30px auto;padding:24px 32px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;font-size:13px;flex-wrap:wrap}.receipt-details .check{display:flex;gap:12px;align-items:flex-start}.receipt-details .check input{width:20px;height:20px;flex:none}
@media(max-width:700px){.receipt-layout{grid-template-columns:1fr;gap:12px}.booking-header{padding:16px}.booking-header img{width:125px}.back-site{font-size:12px}.ticket-time strong{font-size:18px}}
