:root {
  --bg: #050506;
  --panel: rgba(16, 16, 19, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eeeae3;
  --muted: #8f8b85;
  --accent: #d8ccb4;       /* champagne / perla del logo AURA */
  --accent-2: #f4efe6;
  --font-brand: 'Michroma', 'Inter', sans-serif;
  --book-w: 420px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.55) 100%);
}
#scroll-space { height: 1000vh; }

.logo-mark { width: 38px; height: 38px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
.logo-mark.big { width: 86px; height: 86px; animation: float 2.6s ease-in-out infinite; }

/* ---------- loader ---------- */
/* ---------- ingresso: animazione del logo ---------- */
#loader { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; transition: visibility 0s 1.2s; }
#loader.hide { visibility: hidden; pointer-events: none; }
#loader.hide .intro-bg, #loader.hide #load-txt, #loader.hide .intro-skip { opacity: 0; }
.intro-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, #1c1d21 0%, #08080a 55%, #030304 100%);
  transition: opacity 1.1s ease .15s;
}
.intro-bg::after {   /* grande Λ in filigrana, come negli sfondi del logo */
  content: ''; position: absolute; left: 50%; top: 50%; width: 120vmin; height: 120vmin; transform: translate(-50%, -46%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M8 104 L50 2 L92 104' fill='none' stroke='white' stroke-opacity='.04' stroke-width='11'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0; animation: introFade 2.4s ease .2s forwards;
}
.intro-logo { position: relative; display: grid; justify-items: center; gap: 22px; transition: transform 1.15s cubic-bezier(.7,0,.2,1), opacity .5s; will-change: transform; }
.intro-mark { width: clamp(84px, 13vmin, 130px); height: auto; overflow: visible; filter: drop-shadow(0 18px 40px rgba(0,0,0,.7)); }
.intro-mark .m-fill { opacity: 0; transform-origin: 20px 21px; animation: markFill 1s cubic-bezier(.2,.8,.2,1) 1.45s forwards; }
.intro-mark .m-ring, .intro-mark .m-chev, .intro-mark .m-tri { fill: none; stroke: #f4efe6; stroke-width: .55; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 3px rgba(255,236,200,.9)); }
.intro-mark .m-ring { animation: draw 1.3s cubic-bezier(.6,0,.2,1) .25s forwards, fadeOut .6s ease 1.9s forwards; }
.intro-mark .m-chev { animation: draw 1s cubic-bezier(.6,0,.2,1) .8s forwards, fadeOut .6s ease 1.9s forwards; }
.intro-mark .m-tri { animation: draw .7s cubic-bezier(.6,0,.2,1) 1.15s forwards, fadeOut .6s ease 1.9s forwards; }
.intro-word { display: flex; gap: .42em; padding-left: .42em; font-family: var(--font-brand); font-size: clamp(42px, 8vw, 104px); line-height: 1; }
.intro-word span {
  display: inline-block; opacity: 0;
  background: linear-gradient(100deg, #9c9486 0%, #f7f3ec 38%, #ffffff 46%, #d8ccb4 54%, #9c9486 100%);
  background-size: 300% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: letterIn 1.1s cubic-bezier(.2,.8,.2,1) forwards, sheen 2.4s ease-in-out 3.2s forwards;
}
.intro-word span:nth-child(1) { animation-delay: 1.9s, 3.1s; }
.intro-word span:nth-child(2) { animation-delay: 2.02s, 3.2s; }
.intro-word span:nth-child(3) { animation-delay: 2.14s, 3.3s; }
.intro-word span:nth-child(4) { animation-delay: 2.26s, 3.4s; }
.intro-tag { display: flex; align-items: center; gap: 16px; font-size: clamp(10px, 1.4vw, 15px); letter-spacing: .32em; color: #d9d1c3; }
.intro-tag span { opacity: 0; animation: introFade 1s ease 2.75s forwards; white-space: nowrap; }
.intro-tag i { position: relative; display: block; width: clamp(40px, 12vw, 170px); height: 1px; background: rgba(255,255,255,.12); transform: scaleX(0); animation: lineGrow 1.1s cubic-bezier(.6,0,.2,1) 2.55s forwards; }
.intro-tag i.l { transform-origin: right; }
.intro-tag i.r { transform-origin: left; }
.intro-tag i b { position: absolute; top: 0; height: 1px; width: 0; background: linear-gradient(90deg, #d8ccb4, #fff); box-shadow: 0 0 8px rgba(255,236,200,.8); transition: width .3s; }
.intro-tag i.l b { right: 0; }
.intro-tag i.r b { left: 0; }
#load-txt { position: absolute; bottom: 40px; font-size: 10px; color: var(--muted); letter-spacing: .3em; text-transform: uppercase; transition: opacity .4s; }
.intro-skip { position: absolute; right: 28px; bottom: 32px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); opacity: 0; animation: introFade .6s ease 1s forwards; transition: color .2s, border-color .2s; }
.intro-skip:hover { color: var(--text); border-color: var(--accent); }
/* uscita: il logo vola nell'intestazione, lo studio si apre */
#loader.exit .intro-bg { opacity: 0; }
#loader.exit .intro-word, #loader.exit .intro-tag { opacity: 0; transition: opacity .45s; }
#loader.exit #load-txt, #loader.exit .intro-skip { opacity: 0; }
/* cambio auto: solo un velo con la percentuale */
#loader.mini .intro-bg { background: rgba(5,5,6,.6); backdrop-filter: blur(10px); }
#loader.mini .intro-bg::after, #loader.mini .intro-logo, #loader.mini .intro-skip { display: none; }
#loader.mini #load-txt { position: static; font-size: 12px; color: var(--text); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes markFill { from { opacity: 0; transform: scale(.86); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes letterIn { from { opacity: 0; transform: translateY(.35em) scale(1.08); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sheen { to { background-position: 0 0; } }
@keyframes lineGrow { to { transform: scaleX(1); } }
@keyframes introFade { to { opacity: 1; } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 32px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand b {
  display: block; font-family: var(--font-brand); font-weight: 400; font-size: 17px; letter-spacing: .45em;
  background: linear-gradient(180deg, var(--accent-2), #a39b8c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand small { display: block; font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 30px; }
.nav a { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .2s; position: relative; }
.nav a:hover, .nav a.on { color: var(--text); }
.nav a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 1px; background: var(--accent); }

.cta {
  padding: 14px 22px; border-radius: 12px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: #17171a; background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #a89f8f);
  box-shadow: 0 8px 30px rgba(216, 204, 180, .22);
  transition: transform .15s, box-shadow .25s;
}
.cta:hover { box-shadow: 0 10px 40px rgba(216, 204, 180, .45); }
.cta:active { transform: scale(.96); }
.cta.small { padding: 10px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.cta.wide { width: 100%; margin-top: 8px; }

.top-right { display: flex; align-items: center; gap: 12px; }
.model-switch { display: flex; padding: 3px; border-radius: 999px; background: rgba(16,16,19,.7); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.model-switch button { padding: 7px 13px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); transition: background .25s, color .25s; }
.model-switch button.on { background: rgba(255,255,255,.1); color: var(--text); }
.model-switch .short { display: none; }
@media (max-width: 760px) {
  .model-switch .full { display: none; }
  .model-switch .short { display: inline; }
  .top-right .cta { display: none; }
  .brand > span { display: none; }
}
.ghost-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent);
  transition: background .2s, transform .15s;
}
.ghost-btn:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ghost-btn:active { transform: scale(.97); }
.ghost-btn.wide { width: 100%; }
.ghost-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ghost-btn.busy { opacity: .6; pointer-events: none; }

/* intro: le lettere si "stringono" mentre si accendono le luci */
.beat.intro h1, .beat.intro .kicker, .beat.intro .lead { opacity: 0; }
.beat.intro.play h1 { animation: introWord 2.6s cubic-bezier(.2,.8,.2,1) .5s both; }
.beat.intro.play .kicker { animation: introUp 1.2s ease 1.9s both; }
.beat.intro.play .lead { animation: introUp 1.2s ease 2.3s both; }
@keyframes introWord { from { opacity: 0; letter-spacing: 1.1em; filter: blur(14px) drop-shadow(0 18px 40px rgba(0,0,0,.6)); } to { opacity: 1; } }
@keyframes introUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- rail (avanzamento) ---------- */
.rail {
  position: fixed; z-index: 15; left: 32px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 16px;
}
.rail::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.rail .fill { position: absolute; left: 4px; top: 6px; width: 1px; background: var(--accent); height: 0; }
.rail button { display: flex; align-items: center; gap: 14px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); position: relative; transition: color .3s; }
.rail button i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); background: var(--bg); transition: all .35s cubic-bezier(.3,1.6,.5,1); }
.rail button span { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.rail:hover button span, .rail button.on span { opacity: 1; transform: none; }
.rail button.done i { background: var(--accent); border-color: var(--accent); }
.rail button.on { color: var(--text); }
.rail button.on i { transform: scale(1.5); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent); }

/* ---------- testi della storia ---------- */
.story { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.beat {
  position: absolute; right: 7vw; bottom: 13vh; max-width: 560px; text-align: right;
  opacity: 0; will-change: opacity, transform;
}
.beat h2, .beat h1 {
  font-family: var(--font-brand); font-weight: 400; line-height: 1.02; letter-spacing: .02em;
  font-size: clamp(38px, 5.6vw, 92px);
  text-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.beat h2 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--accent-2), var(--accent) 60%, #9c9486);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.beat p { margin-top: 18px; font-size: 15px; line-height: 1.6; color: #cfcac2; text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.beat-n { display: inline-block; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.beat.intro { left: 0; right: 0; bottom: auto; top: 13vh; max-width: none; text-align: center; }
.beat.intro h1 {
  font-size: clamp(56px, 10vw, 170px); letter-spacing: .4em; padding-left: .4em;
  background: linear-gradient(180deg, #fff, var(--accent) 70%, #8f877a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 18px 40px rgba(0,0,0,.6));
}
.beat .kicker { font-size: 13px; letter-spacing: .6em; padding-left: .6em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.beat .lead { font-size: 16px; color: #bdb8b0; margin-top: 10px; }

.scroll-hint {
  position: fixed; z-index: 15; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--muted);
  transition: opacity .5s;
}
.scroll-hint i { width: 22px; height: 36px; border: 1px solid var(--muted); border-radius: 12px; position: relative; }
.scroll-hint i::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
.scroll-hint.hide { opacity: 0; }

/* ---------- rotazione libera in configurazione ---------- */
.orbit-hint {
  position: fixed; z-index: 15; bottom: 28px; left: calc((100vw - var(--book-w) - 24px) / 2); transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px;
  background: rgba(16,16,19,.75); border: 1px solid var(--line); backdrop-filter: blur(14px);
  font-size: 12px; color: #cfcac2; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s cubic-bezier(.2,.9,.25,1);
}
.orbit-hint.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.orbit-hint svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: spinHint 2.8s ease-in-out infinite; }
.orbit-hint.used svg { animation: none; }
.orbit-hint .touch { display: none; }
.orbit-hint button { padding: 7px 13px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.08); transition: background .2s; }
.orbit-hint button:hover { background: rgba(255,255,255,.16); }
@keyframes spinHint { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-200deg); } }
@media (hover: none) { .orbit-hint .desk { display: none; } .orbit-hint .touch { display: inline; } }

/* ---------- prenotazione ---------- */
.book {
  position: fixed; z-index: 25; top: 88px; right: 24px; bottom: 24px; width: var(--book-w);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 40px 100px rgba(0,0,0,.55);
  transform: translateX(calc(100% + 40px)); opacity: 0;
  transition: transform .8s cubic-bezier(.2,.9,.25,1), opacity .5s;
}
.book.open { transform: none; opacity: 1; }
.book-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.book-head .beat-n { margin-bottom: 10px; }
.book-head h2 { font-family: var(--font-brand); font-weight: 400; font-size: 24px; line-height: 1.15; }
.book-head h2 em { font-style: normal; color: var(--accent); }
.book-body { flex: 1; overflow-y: auto; padding: 8px 26px 26px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.book h3 { font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; margin: 22px 0 10px; display: flex; justify-content: space-between; }
.book h3 span { color: var(--accent); letter-spacing: .04em; text-transform: none; }

.svc-list { display: grid; gap: 8px; margin-top: 16px; }
.svc {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 13px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  transition: border-color .2s, background .2s;
}
.svc input { display: none; }
.svc .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted); display: grid; place-items: center; transition: all .25s cubic-bezier(.3,1.6,.5,1); }
.svc .box::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #141414; border-bottom: 2px solid #141414; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .25s cubic-bezier(.3,1.8,.5,1); }
.svc b { display: block; font-size: 13.5px; font-weight: 600; }
.svc small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.svc em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.svc.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.svc.on .box { background: var(--accent); border-color: var(--accent); }
.svc.on .box::after { transform: rotate(-45deg) scale(1); }
.svc.on em { color: var(--accent); }

.opt { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .5s ease, opacity .4s; }
.opt.show { max-height: 420px; opacity: 1; }
#caliper-row[hidden] { display: none; }
.credit { position: fixed; z-index: 5; left: 32px; bottom: 14px; font-size: 10px; color: rgba(255,255,255,.32); letter-spacing: .03em; pointer-events: none; }
@media (max-width: 1024px), (orientation: portrait) { .credit { display: none; } }

.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw {
  width: 32px; height: 32px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 42%), var(--c);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.14);
  transition: transform .2s cubic-bezier(.3,1.8,.5,1);
}
.sw:hover { transform: scale(1.12); }
.sw.on::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); animation: ring .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes ring { from { transform: scale(.6); opacity: 0; } }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.seg button {
  padding: 9px 4px; border-radius: 10px; font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  display: grid; gap: 2px; justify-items: center; transition: border-color .2s, background .2s;
}
.seg button small { font-size: 9.5px; color: var(--muted); font-weight: 500; }
.seg button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 5px; outline: none;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), rgba(255,255,255,.1) var(--fill, 50%));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-2); border: 4px solid var(--accent); cursor: grab;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
}
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); border: 4px solid var(--accent); }

#book-form { display: grid; gap: 8px; }
#book-form h3 { margin-bottom: 2px; }
#book-form input:not([type=range]) {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); outline: none; color-scheme: dark;
}
#book-form input:focus { border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.book-total { display: flex; justify-content: space-between; align-items: baseline; }
.book-total span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.book-total strong { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.book-total strong.bump { animation: pop .45s cubic-bezier(.3,1.8,.5,1); color: var(--accent); }
.hint { font-size: 11px; color: var(--muted); text-align: center; margin-top: 6px; }

/* piede del pannello: totale e pulsanti sempre visibili */
.book-foot { padding: 14px 26px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; background: rgba(12,12,14,.5); border-radius: 0 0 20px 20px; }
.foot-btns { display: grid; grid-template-columns: 1fr; gap: 8px; }
.foot-btns .cta { order: -1; width: 100%; }
.book-grip, .book-tabs, .range-legend.hide { display: none; }
.range-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 8px; }

/* ---------- tablet e telefono: pannello basso a schede, l'auto resta visibile sopra ---------- */
@media (max-width: 1024px), (orientation: portrait) {
  :root { --sheet-h: 46vh; }
  body.sheet-expanded { --sheet-h: 82vh; }
  .book {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet-h);
    border-radius: 22px 22px 0 0; transform: translateY(105%);
    transition: transform .7s cubic-bezier(.2,.9,.25,1), opacity .5s, height .45s cubic-bezier(.2,.9,.25,1);
  }
  .book.open { transform: none; }
  .book-grip { display: grid; place-items: center; height: 18px; width: 100%; flex-shrink: 0; }
  .book-grip i { width: 42px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); }
  .book-head { padding: 0 14px; border: 0; }
  .book-head .beat-n, .book-head h2 { display: none; }
  .book-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
  .book-tabs::-webkit-scrollbar { display: none; }
  .book-tabs button {
    flex: 1 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted);
    background: rgba(255,255,255,.04); border: 1px solid transparent; position: relative; transition: all .25s;
  }
  .book-tabs button.on { color: #17171a; background: var(--accent); }
  .book-tabs button.off::after { content: ''; position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: .6; }
  .book-body { padding: 4px 16px 12px; }
  .pane { display: none; }
  .book:not([data-pane="dati"]) #book-form { display: none; }
  .book[data-pane="svc"] .pane[data-pane="svc"],
  .book[data-pane="wrap"] .pane[data-pane="wrap"],
  .book[data-pane="tint"] .pane[data-pane="tint"],
  .book[data-pane="rims"] .pane[data-pane="rims"],
  .book[data-pane="dati"] .pane[data-pane="dati"] { display: block; animation: slideUp .35s cubic-bezier(.2,.9,.3,1); }
  .book[data-pane="dati"] #book-form { display: grid; }
  .opt { max-height: none; opacity: 1; overflow: visible; }
  .book h3 { margin: 14px 0 10px; }
  .svc-list { margin-top: 10px; gap: 6px; }
  .svc { padding: 10px 12px; }
  .svc small { display: none; }
  /* colori in una riga che scorre col dito */
  .swatches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 8px; margin: 0 -4px; gap: 12px; }
  .swatches::-webkit-scrollbar { display: none; }
  .sw { width: 42px; height: 42px; flex-shrink: 0; }
  .seg button { padding: 11px 4px; }
  .book-foot { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; align-items: center; border-radius: 0; }
  .book-total { flex-direction: column; align-items: flex-start; gap: 2px; }
  .book-total span { font-size: 10px; }
  .book-total strong { font-size: 21px; }
  .foot-btns { grid-auto-flow: column; grid-template-columns: auto auto; }
  .foot-btns .cta { order: 0; padding: 13px 16px; font-size: 12.5px; }
  .ghost-btn { padding: 12px; }
  .ghost-btn span { display: none; }
  .orbit-hint { left: 50%; bottom: calc(var(--sheet-h) + 10px); font-size: 11px; }
  body:has(.book.open) .rail, body:has(.book.open) .scroll-hint { opacity: 0; pointer-events: none; }
}
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } }
.pop { animation: pop .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes pop { 35% { transform: scale(.9); } }

#toast {
  position: fixed; z-index: 70; left: 50%; top: 90px;
  padding: 11px 20px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(14,14,16,.92); border: 1px solid var(--accent);
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  transition: transform .4s cubic-bezier(.3,1.6,.5,1), opacity .3s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast b { color: var(--accent); }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .topbar { padding: 14px 16px; }
  .nav, .brand small { display: none; }
  .model-switch button { padding: 6px 9px; font-size: 10px; }
  .rail { left: 14px; }
  .rail button span { display: none; }
  .beat { right: 20px; left: 20px; bottom: 16vh; text-align: left; max-width: none; }
  .beat.intro { top: 20vh; text-align: center; }
  .beat p { font-size: 14px; }
}
