/*
  Calibro per BÖLLHOFF, presentazione. Colori BÖLLHOFF: il blu del logo e i grigi delle curve
  dello sfondo del login di Calibro. L'app è desktop: le scene stanno su un monitor, col calibro davanti.
*/
:root {
  --blu: #006ab3;
  --blu-scuro: #004f86;
  --blu-notte: #0b2a45;
  --blu-chiaro: #4ba3e3;
  --tenue: #e8f1f9;
  --grigio-1: #f3f5f7;
  --grigio-2: #dfe4e9;
  --grigio-3: #b9c2cb;
  --ink: #16202b;
  --muted: #4f5b67;
  --soft: #7a8590;
  --line: #dde3e9;
  --carta: #fbfcfd;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
  color-scheme: light;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.story-guided { scroll-behavior: auto; }
body { margin: 0; background: var(--carta); color: var(--ink); overflow-x: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-weight: 650; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 84px); }
h2 { font-size: clamp(36px, 4.4vw, 68px); }
.soft { color: var(--soft); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .35; }
:where(button, a):focus-visible { outline: 3px solid var(--blu-chiaro); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; transform: translateY(-160%); background: #fff; color: var(--ink); padding: 12px 20px; font-weight: 700; border-radius: 8px; transition: transform .2s ease; }
.skip-link:focus { transform: none; }

/* Testata */
.masthead { position: fixed; inset: 0 0 auto; z-index: 40; height: 72px; padding: 0 clamp(16px, 4vw, 56px); display: flex; align-items: center; pointer-events: none; }
.brand { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(11, 42, 69, .08); font-weight: 650; font-size: 15px; backdrop-filter: blur(10px); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; }
.brand-mark img { width: 30px; height: 30px; }
.brand-client { width: 92px; height: auto; padding-left: 12px; border-left: 1px solid var(--line); }

/* Capitoli */
.chapter { position: relative; min-height: 100vh; min-height: 100svh; }
.lead { margin-top: 20px; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.button { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: 0; font-weight: 650; font-size: 15px; transition: background .2s ease, transform .2s ease; }
.button.primary { background: var(--blu); color: #fff; box-shadow: 0 12px 28px -8px rgba(0, 106, 179, .55); }
.button.primary:hover { background: var(--blu-scuro); transform: translateY(-2px); }
.text-link { font-size: 14px; font-weight: 600; color: var(--muted); }
.text-link:hover { color: var(--blu); }
.track { display: flex; gap: 8px; margin-bottom: 16px; }
.track span { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.track span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.track .is-now { background: #eef1f4; color: #4f5b67; border: 1px solid var(--grigio-3); }
.track .is-new { background: var(--tenue); color: var(--blu); border: 1px solid #b6d4ec; }

/* =========================================================================
   01 La misura
   ========================================================================= */
.intro { height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: linear-gradient(115deg, #ffffff 0%, var(--grigio-1) 45%, #e3e8ed 100%); }
/* Curve grigie come lo sfondo del login di Calibro */
.intro-curves { position: absolute; inset: 0; pointer-events: none; }
.intro-curves i { position: absolute; border-radius: 50%; }
.intro-curves i:nth-child(1) { width: 120vw; height: 150vh; left: 36vw; top: -30vh; background: linear-gradient(160deg, #d6dce2, #c5cdd5); }
.intro-curves i:nth-child(2) { width: 110vw; height: 140vh; left: 46vw; top: -12vh; background: linear-gradient(160deg, #bfc7cf, #aeb7c0); opacity: .75; }
.intro-curves i:nth-child(3) { width: 90vw; height: 120vh; left: 60vw; top: 4vh; background: rgba(255, 255, 255, .28); }
.intro-copy { position: absolute; z-index: 4; left: clamp(16px, 6vw, 110px); top: 50%; transform: translateY(-46%); width: min(36rem, 40vw); }
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow img { width: 150px; height: auto; }
.eyebrow span { padding-left: 14px; border-left: 1px solid var(--grigio-3); }
.intro-copy h1 { font-size: clamp(40px, min(5vw, 8vh), 84px); }
.intro-lead { margin-top: 22px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--muted); max-width: 44ch; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.intro-visual { position: absolute; z-index: 3; right: clamp(16px, 5vw, 90px); top: 50%; width: min(46vw, 760px); transform: translateY(-50%); }
.intro-cal { aspect-ratio: 640 / 230; transform: rotate(-8deg); filter: drop-shadow(0 30px 40px rgba(11, 42, 69, .28)); }
.intro-cells { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 72%; margin: 15% 0 0 24%; }
.intro-cell { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); box-shadow: 0 16px 34px -14px rgba(11, 42, 69, .35); transition: background .4s ease, border-color .4s ease, transform .4s ease; }
.intro-cell b { font-size: 13px; color: var(--muted); font-weight: 600; }
.intro-cell em { grid-row: span 2; font: 700 26px/1 "Consolas", "SFMono-Regular", Menlo, monospace; font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }
.intro-cell small { font-size: 12px; color: var(--soft); }
.intro-cell.is-ok { background: #e3f8e3; border-color: #7fd67f; }
.intro-cell.is-ok em { color: #1e7b34; }
.intro-cell.is-ko { background: #fde6e6; border-color: #f08080; }
.intro-cell.is-ko em { color: #b42318; }
.intro-cell.is-live { transform: translateY(-4px); }

/* =========================================================================
   Scene fissate: copia a sinistra, monitor a destra
   ========================================================================= */
.scene { background: radial-gradient(ellipse 80% 90% at 100% 50%, #e6ebf0 0 55%, transparent 55.4%), var(--grigio-1); }
.spread {
  min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1.46fr);
  align-items: center; gap: clamp(28px, 4vw, 72px); padding: 110px clamp(16px, 5vw, 96px) 110px; max-width: 1640px; margin: 0 auto;
}
.copy h2 { font-size: clamp(32px, min(3.6vw, 6.6vh), 60px); }
.step-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.step-choices button { padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: #fff; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.step-choices button:hover { border-color: var(--blu); }
.step-choices button[aria-pressed="true"] { background: var(--blu); border-color: var(--blu); color: #fff; }
.step-caption { margin-top: 18px; min-height: 4.6em; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 46ch; padding-left: 14px; border-left: 3px solid var(--blu-chiaro); }
.step-caption b { color: var(--blu); }
.step-caption .todo { display: inline-block; padding: 0 7px; border: 1.5px dashed #9aa5b0; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }

.stage { position: relative; width: 100%; padding-bottom: 6%; }
/* Monitor: schermo disegnato a 1120×630 e scalato */
.monitor { position: relative; width: 100%; }
.mon-screen { position: relative; z-index: 1; padding: 1.2%; background: #15191e; border: 1.5px solid #3a424b; border-radius: 14px; box-shadow: 0 40px 80px -24px rgba(11, 42, 69, .5); }
.mon-slot { aspect-ratio: 1120 / 630; overflow: hidden; border-radius: 3px; background: #9fb4c8; }
.mon-device { width: 1120px; height: 630px; }
.mon-neck { width: 14%; height: 34px; margin: 0 auto; background: linear-gradient(90deg, #9aa3ac, #d3d8dd 45%, #8b949d); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.mon-foot { width: 34%; height: 12px; margin: 0 auto; border-radius: 6px 6px 3px 3px; background: linear-gradient(#d8dde2, #a3acb5); box-shadow: 0 14px 24px -8px rgba(0, 0, 0, .35); }
.device-slot { position: relative; width: 100%; }
.device { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.device * { box-sizing: border-box; }
.mon-device .desk { position: absolute; inset: 0; }
/* Il calibro sta sulla scrivania, davanti al monitor */
.cal-dock { position: absolute; z-index: 5; left: -6%; bottom: -2%; width: 46%; transform: rotate(-6deg) translateY(30px); transform-origin: 20% 80%; opacity: 0; pointer-events: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(0 24px 30px rgba(11, 42, 69, .35)); }
.cal-slot { aspect-ratio: 640 / 230; }
.stage.with-cal .cal-dock { opacity: 1; transform: rotate(-6deg); }

/* Cambio di schermata dentro il monitor */
.swap-in { animation: swap-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* Schema del percorso (scena del ciclo): finestra nello stile di Calibro, non una vista dell'app */
.is-schema { z-index: 30; }
.sc { background: #f0f0f0; gap: 12px; }
.sc-head { display: flex; align-items: center; justify-content: space-between; }
.sc-tag { padding: 2px 10px; border: 1.5px dashed #7a8590; color: #4f5b67; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sc-sub { color: #444; font-size: 12px; margin-top: -6px; }
.sc-track { display: flex; align-items: stretch; gap: 0; margin-top: 8px; }
.sc-st { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 14px; border: 1px solid #adadad; background: #e1e1e1; text-align: center; transition: background .4s ease, border-color .4s ease; }
.sc-st .wf-ico { width: 30px; height: 30px; color: #696969; }
.sc-st b { font-size: 15px; font-weight: 700; }
.sc-st small { font-size: 11.5px; color: #444; line-height: 1.3; min-height: 2.6em; }
.sc-st.is-done { background: #90ee90; border-color: #5fbf5f; }
.sc-st.is-here { background: #cce4f7; border-color: #005499; box-shadow: 0 0 0 3px rgba(0, 106, 179, .35); }
.sc-st.is-skip { opacity: .5; }
.sc-st.is-todo { border-style: dashed; border-color: #7a8590; }
.sc-todo { padding: 1px 8px; border: 1.5px dashed #7a8590; font-size: 10.5px; font-weight: 700; color: #4f5b67; background: #fff; }
.sc-chip { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 2px 8px; background: #006ab3; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sc-arrow { flex: 0 0 30px; position: relative; }
.sc-arrow::before { content: ""; position: absolute; left: 4px; right: 9px; top: 50%; height: 3px; margin-top: -1.5px; background: #9aa3ac; }
.sc-arrow::after { content: ""; position: absolute; right: 3px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 8px solid #9aa3ac; border-right: 0; }
.sc-arrow.is-done::before { background: #2f9e44; } .sc-arrow.is-done::after { border-left-color: #2f9e44; }
.sc-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.sc-rows span { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; background: #fff; border: 1px solid #a0a0a0; font-size: 12px; }
.sc-rows b { font-weight: 700; }
/* =========================================================================
   06 Prova tu: desktop Windows a misura fissa (1280×720), scalato
   ========================================================================= */
.finale { background: radial-gradient(ellipse at 50% 0%, #0d4f80 0%, var(--blu-notte) 58%, #071a2b 100%); color: #fff; padding: 88px clamp(12px, 3vw, 48px) 100px; }
.finale-inner { width: min(1500px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.finale-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.finale-head h2 { font-size: clamp(28px, 3vw, 44px); }
.finale-note { font-size: 14px; color: rgba(255, 255, 255, .7); }
.missions { display: flex; flex-wrap: wrap; gap: 6px; counter-reset: mission; }
.missions li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; counter-increment: mission; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .85); transition: background .3s ease, border-color .3s ease; }
.missions li::before { content: counter(mission); display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: rgba(255, 255, 255, .16); font-size: 11px; font-weight: 800; }
.missions li.is-done { background: rgba(75, 163, 227, .28); border-color: var(--blu-chiaro); color: #fff; }
.missions li.is-done::before { content: "✓"; background: #fff; color: var(--blu); }
.proto-bar { display: flex; align-items: center; gap: 12px; }
.proto-label { flex: none; padding: 3px 10px; border-radius: 999px; border: 1.5px dashed #ff8a8a; color: #ffb3b3; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.proto-hint { flex: 1; font-size: 12.5px; color: rgba(255, 255, 255, .65); }
.proto-reset { flex: none; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; }
.proto-reset:hover { border-color: #fff; }
/* Monitor come nelle slide (schermo 1280×720) con il calibro sulla scrivania a destra: tutto disegnato a 1660×802 e scalato da fitProto() */
.proto-device { position: relative; width: 100%; aspect-ratio: 1660 / 802; }
.proto-screen { position: absolute; left: 0; top: 0; width: 1660px; height: 802px; transform: scale(var(--s, 1)); transform-origin: 0 0; }
.proto-screen > .pm-bezel, .proto-screen > .pm-neck, .proto-screen > .pm-foot { margin-left: 0; }
.proto-screen > .pm-neck { margin-left: 571px; }
.proto-screen > .pm-foot { margin-left: 446px; }
.pm-cal { position: absolute; left: 1330px; bottom: 6px; width: 330px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pm-bezel { width: 1312px; height: 752px; padding: 16px; background: #15191e; border-radius: 18px; box-shadow: inset 0 0 0 1.5px #3a424b, 0 40px 90px -30px rgba(0, 0, 0, .7); }
.pm-screen { position: relative; width: 1280px; height: 720px; overflow: hidden; border-radius: 3px; }
.pm-neck { width: 170px; height: 36px; margin: 0 auto; background: linear-gradient(90deg, #8b949d, #d3d8dd 45%, #7d868f); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.pm-foot { width: 420px; height: 14px; margin: 0 auto; border-radius: 7px 7px 3px 3px; background: linear-gradient(#d8dde2, #9aa3ac); }
@media (min-width: 901px) {
  /* La finestra occupa la slide: sopra solo la riga con titolo e missioni. */
  .finale { display: flex; height: 100vh; height: 100svh; min-height: 620px; padding: 78px 56px 76px 24px; }
  .finale-inner { flex: 1; width: 100%; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); gap: 10px 18px; align-items: center; }
  .finale .finale-head { flex-wrap: nowrap; align-items: center; gap: 12px; white-space: nowrap; }
  .finale .finale-head h2 { font-size: 22px; letter-spacing: -.01em; }
  .finale .finale-note { font-size: 12px; }
  .finale .missions { justify-content: flex-end; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .finale .missions::-webkit-scrollbar { display: none; }
  .finale .missions li { flex: none; font-size: 12px; }
  .proto-bar { gap: 8px; }
  .proto-hint { display: none; }
  .proto-device { grid-column: 1 / -1; align-self: stretch; aspect-ratio: auto; min-height: 0; }
}
@media (min-width: 901px) and (max-width: 1500px) { .finale .finale-note { display: none; } }

/* =========================================================================
   07 Alesca
   ========================================================================= */
.outro { display: grid; place-items: center; background: #fff; padding: 100px 16px 130px; }
.outro-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.outro-logo { width: clamp(180px, 26vw, 320px); height: auto; }
.outro-link { font-size: 14px; font-weight: 600; color: var(--soft); }
.outro-link:hover { color: var(--blu); }

/* =========================================================================
   Indice e player
   ========================================================================= */
.chapter-nav { position: fixed; right: 22px; top: 50%; z-index: 30; display: grid; gap: 14px; transform: translateY(-50%); }
.chapter-nav a { position: relative; display: block; width: 10px; height: 10px; }
.chapter-nav a::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(79, 91, 103, .35); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); transition: transform .25s ease, background .25s ease; }
.chapter-nav a[aria-current]::after { background: var(--blu); transform: scale(1.5); }
.chapter-nav a span { position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; pointer-events: none; padding: 6px 12px; border-radius: 999px; background: var(--blu-notte); color: #fff; font-size: 12.5px; font-weight: 600; opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.chapter-nav a:hover span, .chapter-nav a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

.player { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; overflow: hidden; background: rgba(11, 42, 69, .88); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(11, 42, 69, .3); color: #fff; }
.player > button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #fff; font-size: 16px; }
.player > button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.player > .chapter-jump { font-size: 20px; line-height: 1; padding-bottom: 3px; }
.player #play { background: var(--blu); color: #fff; }
.player #play:hover { background: var(--blu-chiaro); }
.player-counter { min-width: 60px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.player-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.player-progress i { display: block; height: 100%; background: var(--blu-chiaro); transform-origin: left; transform: scaleX(0); }

/* Stato della scena fissata */
.story-progress { display: none; }
.story-chapter .story-progress { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 12.5px; font-weight: 700; }
.story-chapter .story-progress + .step-choices { margin-top: 10px; }
.story-position { font-variant-numeric: tabular-nums; color: var(--blu); }
.story-hint { margin-left: auto; color: var(--soft); font-size: 12px; font-weight: 600; }
.story-chapter .spread { height: 100vh; height: 100svh; min-height: 0; }

@media (max-height: 800px) and (min-width: 901px) {
  .story-chapter .lead { display: none; }
  .story-chapter .spread { padding-top: 92px; padding-bottom: 100px; }
}

/* =========================================================================
   Smartphone e tablet stretti: il monitor resta un monitor, rimpicciolito
   ========================================================================= */
@media (max-width: 900px) {
  h2 { font-size: clamp(30px, 8vw, 46px); }
  .masthead { height: 60px; }
  .brand { font-size: 14px; padding: 4px 12px 4px 4px; }
  .brand-mark, .brand-mark img { width: 28px; height: 28px; }
  .brand-client { width: 74px; padding-left: 10px; }
  .chapter-nav { display: none; }

  .intro-curves i:nth-child(1) { left: 10vw; top: 30vh; }
  .intro-curves i:nth-child(2) { left: 24vw; top: 40vh; }
  .intro-curves i:nth-child(3) { display: none; }
  .intro-copy { left: 16px; right: 16px; top: auto; bottom: calc(96px + env(safe-area-inset-bottom)); width: auto; transform: none; }
  .intro-copy h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .eyebrow { margin-bottom: 14px; font-size: 11px; gap: 10px; }
  .eyebrow img { width: 110px; }
  .eyebrow span { padding-left: 10px; }
  .intro-lead { margin-top: 12px; font-size: 15px; }
  .intro-actions { margin-top: 16px; gap: 12px 18px; }
  .intro-actions .button { padding: 12px 18px; font-size: 14px; }
  .intro-visual { left: 16px; right: 16px; top: 76px; width: auto; transform: none; }
  .intro-cal { width: 92%; margin: 0 auto; }
  .intro-cells { width: 100%; margin: 4% 0 0; gap: 8px; }
  .intro-cell { padding: 8px 10px; }
  .intro-cell em { font-size: 18px; }
  .intro-cell b { font-size: 11.5px; }
  .intro-cell small { font-size: 10.5px; }
  .intro-cell:nth-child(n+3) { display: none; }

  .spread { grid-template-columns: 1fr; padding: 88px 16px 110px; gap: 28px; }
  .stage { padding-bottom: 8%; }
  .cal-dock { left: -2%; width: 50%; }

  /* Scena fissata: una colonna, il monitor riempie lo spazio che resta */
  .story-chapter .spread { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 12px; padding: 72px 16px calc(84px + env(safe-area-inset-bottom)); }
  .story-chapter .copy { display: contents; }
  .story-chapter .track { display: none; }
  .story-chapter h2 { order: 1; font-size: clamp(24px, 6.6vw, 34px); }
  .story-chapter .lead { display: none; }
  .story-chapter .story-progress { order: 2; margin: 0; }
  .story-chapter .story-hint { display: none; }
  .story-chapter .step-choices { order: 3; margin: 0; padding-top: 0; border: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .story-chapter .step-choices::-webkit-scrollbar { display: none; }
  .story-chapter .step-choices button { flex: none; padding: 7px 12px; font-size: 13px; }
  .story-chapter .step-caption { order: 4; min-height: 0; margin: 0; font-size: 13.5px; line-height: 1.45; padding-left: 10px; }
  .story-chapter .stage { order: 5; flex: none; margin-top: 6px; }

  .finale { padding: 72px 12px calc(84px + env(safe-area-inset-bottom)); }
  .finale-head { gap: 2px 12px; }
  .finale-head h2 { font-size: 26px; }
  .finale-note { font-size: 12.5px; }
  .missions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; }
  .missions::-webkit-scrollbar { display: none; }
  .missions li { flex: none; font-size: 12px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .story-chapter .step-caption { display: none; }
  .intro-lead { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px) { .chapter-nav { right: 10px; } }
@media (max-width: 600px) { .player-counter { min-width: 48px; } .player > button { width: 38px; height: 38px; } }
/* Telefono in orizzontale: il desktop del prototipo prende tutta l'altezza */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .finale { padding-top: 12px; padding-bottom: 12px; }
  .finale-head, .missions, .proto-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* Telefono: il calibro accanto al monitor lascia il posto a un pulsante sotto, a grandezza normale */
.proto-cal-mobile { display: none; }
@media (max-width: 900px) {
  .proto-device { aspect-ratio: 1312 / 802; }
  .proto-screen { width: 1312px; }
  .pm-cal { display: none; }
  .proto-cal-mobile { display: inline-flex; align-self: center; align-items: center; gap: 10px; margin-top: 4px; padding: 11px 20px 11px 12px; border: 0; border-radius: 999px; background: #d42020; color: #fff; font-size: 15px; font-weight: 650; box-shadow: 0 8px 20px rgba(212, 32, 32, .4); }
  .proto-cal-mobile span { width: 16px; height: 16px; border-radius: 50%; background: #ff5a5a; box-shadow: inset 0 0 0 3px #8f1010; }
  .intro-visual { top: 84px; }
  .intro-cells { margin-top: 12%; }
  .story-chapter .stage { margin-inline: -8px; }
}
