/* Motore dei terminali (terminale.js): pannello in basso che divide la pagina. Usa i token di style.css con un
   ripiego, cosi' funziona anche da solo. La pagina tiene libero lo spazio sotto con --term-h (body.term-aperto). */
#term { position: fixed; left: 0; right: 0; bottom: 0; height: 52vh; background: var(--term, #0d1117); border-top: 1px solid var(--border, #334155);
  z-index: 40; display: flex; flex-direction: column; box-shadow: 0 -10px 30px rgba(0,0,0,.5); }
#term.grande { top: 0; height: auto !important; }           /* tutto schermo */
#term.mini { height: auto !important; }                      /* ridotto: resta la barra */
#term.mini #termBox, #term.mini .term-keys, #term.mini .term-resize { display: none; }
#term.mini .term-bar { cursor: pointer; }
.term-resize { position: absolute; left: 0; right: 0; top: -3px; height: 7px; cursor: ns-resize; z-index: 2; }
.term-resize:hover, body.term-trascina .term-resize { background: var(--blue, #60a5fa); opacity: .5; }
#term.grande .term-resize { display: none; }
body.term-trascina, body.term-trascina * { cursor: ns-resize !important; user-select: none !important; }
body.term-trascina .xterm { pointer-events: none; }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .5rem;
  background: var(--surface2, #172033); border-bottom: 1px solid var(--border, #334155); min-height: 2.4rem; }
/* desktop [2026-10-16]: in alto una barra sottile di navigazione (linguette, ⌂, ☰, ▁ ⤢ ✕);
   i comandi (＋ $_, Esc, Ctrl+C, ↻, Txt, Buf) stanno in una barra sotto il terminale (.term-cmd),
   come la riga dei tasti sul telefono */
body:not(.is-mobile) .term-bar { min-height: 0; padding: .2rem .45rem; }
.term-cmd { display: flex; gap: .3rem; align-items: center; flex: none; padding: .25rem .5rem;
  background: var(--surface2, #172033); border-top: 1px solid var(--border, #334155); }
.term-cmd .term-stato { margin-right: auto; }
#term.mini .term-cmd { display: none; }
.term-bar .btn svg { width: 15px; height: 15px; display: block; }
.term-tabs { display: flex; gap: .25rem; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; scrollbar-width: thin; }
.term-tab { font-family: var(--font, system-ui, sans-serif); font-size: .78rem; padding: .3em .55em .3em .7em; border-radius: 6px; cursor: pointer; background: transparent;
  color: var(--muted, #8391a7); border: 1px solid transparent; display: flex; align-items: center; gap: .4rem; white-space: nowrap; max-width: 16rem; user-select: none; }
.term-tab:hover { color: var(--text, #e2e8f0); }
.term-tab.on { background: var(--surface, #1e293b); color: var(--text, #e2e8f0); border-color: var(--border, #334155); }
.term-tab.has-new:not(.on) .tab-label { color: var(--blue, #60a5fa); }
.term-tab .tab-label { overflow: hidden; text-overflow: ellipsis; }
.term-tab .x { opacity: .55; padding: 0 .2em; border-radius: 4px; }
.term-tab .x:hover { opacity: 1; color: var(--red, #f87171); background: rgba(248,113,113,.15); }
.term-tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #8391a7); flex: none; display: inline-block; }
.term-tab .dot.on, .term-tab .dot.att { background: var(--green, #4ade80); }
.term-tab .dot.lav { background: var(--blue, #60a5fa); animation: term-lav 1.2s ease-in-out infinite; }
.term-tab .dot.off { background: var(--red, #f87171); }
.term-tab .dot.perm { background: var(--orange, #fb923c); }
.term-tab .dot.dorme { background: #facc15; }   /* a riposo sul bridge: riparte quando si apre la scheda */
@keyframes term-lav { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.term-actions { display: flex; gap: .3rem; align-items: center; flex: none; }
.term-plus { flex: none; }
.term-tabs { flex: 0 1 auto; }   /* le linguette non si allargano: il «+» resta attaccato all'ultima (anche sul PC, 2026-10-17) */
.term-actions { margin-left: auto; }   /* ☰ resta a destra, «+» accanto alle tab */
body:not(.is-mobile) .term-plus { font-size: .95rem; line-height: 1; padding: .12em .5em; }
body.is-mobile .term-plus { min-width: 38px; min-height: 36px; font-size: 1.35rem; line-height: 1; padding: 0 .3em; }
.term-stato { font-size: .78rem; color: var(--muted, #8391a7); white-space: nowrap; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
#termBox { flex: 1; position: relative; min-height: 0; background: var(--term, #0d1117); }
.xt-pane { position: absolute; inset: 0; display: none; overflow: hidden; background: var(--term, #0d1117); }
.xt-pane.active { display: block; }
.xt-pane .xt { position: absolute; inset: 4px 0 0 8px; }
.xt-pane .xterm { height: 100%; }
.xt-pane:not(.active) .xterm-cursor-layer { display: none !important; }
.xt-pane .xterm .xterm-viewport { scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.term-vuoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem;
  color: var(--muted, #8391a7); font-size: .95rem; line-height: 1.8; }
.term-vuoto .btn { margin-top: .6rem; }
.pane-banner { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: .6rem;
  background: var(--surface, #1e293b); border: 1px solid var(--border, #334155); border-radius: 8px; padding: .45rem .55rem .45rem .9rem; font-size: .88rem;
  color: var(--text2, #cbd5e1); box-shadow: 0 6px 24px rgba(0,0,0,.5); white-space: nowrap; }
.pane-text { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; background: var(--term, #0d1117); }
.pt-bar { display: flex; align-items: center; gap: .4rem; flex: none; padding: .4rem .5rem; background: var(--surface2, #172033); border-bottom: 1px solid var(--border, #334155); }
.pt-bar .pt-tit { font: .78rem/1.2 var(--font, system-ui, sans-serif); color: var(--muted, #8391a7); margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-bar .btn { flex: none; font-size: .8rem; padding: .3em .6em; }
.pt-body { margin: 0; padding: .6rem .8rem; overflow: auto; flex: 1; min-height: 0; color: var(--text, #e2e8f0);
  font: .82rem/1.4 var(--mono, monospace); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
.pt-body a { color: var(--accent, #60a5fa); text-decoration: underline; word-break: break-all; }
/* «Buf»: textarea del prompt con salvataggio (pane-buf riusa pane-text e pt-bar). Sta in fondo e il terminale
   si restringe sopra (.con-buf): Claude continua a scrivere e il suo prompt resta in vista [2026-10-17] */
.xt-pane { --buf-h: clamp(120px, 36%, 280px); }
.xt-pane.con-buf .xt { bottom: var(--buf-h); }
.pane-text.pane-buf { top: auto; height: var(--buf-h); border-top: 1px solid var(--border, #334155); }
.pane-buf .buf-body { margin: 0; padding: .6rem .8rem; border: 0; outline: 0; resize: none; flex: 1; min-height: 0;
  background: transparent; color: var(--text, #e2e8f0); font: .9rem/1.45 var(--font, system-ui, sans-serif); }
.pane-buf .buf-body::placeholder { color: var(--muted, #8391a7); }
body.is-mobile .pt-bar .btn { min-height: 34px; }
/* barra dei tasti (telefono): una riga fissa di 10 tasti (Esc incolla tastiera ← ↑ ↓ → spazio ⏎ ⋯), «⋯» apre la seconda */
.term-keys { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; background: var(--surface2, #172033); border-top: 1px solid var(--border, #334155);
  padding: 4px 5px calc(4px + env(safe-area-inset-bottom, 0px)); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.keys-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.keys-row.keys-extra { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.keys-row[hidden] { display: none; }
.key-btn { font: 600 .8rem var(--mono, monospace); background: var(--surface, #1e293b); color: var(--text, #e2e8f0); border: 1px solid var(--border, #334155); border-radius: 6px;
  padding: 0 1px; min-width: 0; height: 42px; cursor: pointer; white-space: nowrap; overflow: hidden; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: none; }
.keys-extra .key-btn { font-size: .8rem; height: 38px; }
.key-btn svg { width: 19px; height: 19px; flex: none; }
.keys-extra .key-btn svg { width: 18px; height: 18px; }
.key-btn:active, .key-btn.premuto { background: var(--blue, #60a5fa); color: #fff; border-color: var(--blue, #60a5fa); }
.key-btn.key-danger { color: var(--red, #f87171); }
.key-btn.key-danger:active, .key-btn.key-danger.premuto { background: var(--red, #f87171); color: #fff; border-color: var(--red, #f87171); }
.key-btn.attivo { background: var(--green, #4ade80); color: #0d1117; border-color: var(--green, #4ade80); }
/* pillola per riaprire */
#termPill { position: fixed; right: 16px; bottom: 16px; z-index: 39; box-shadow: 0 6px 20px rgba(0,0,0,.45); display: inline-flex; align-items: center; gap: .35rem; }
.term-badge { background: var(--orange, #fb923c); color: #000; font: 800 11px var(--font, sans-serif); border-radius: 10px; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
/* la pagina lascia lo spazio sotto */
body.term-aperto:not(.term-pieno) #app, body.term-aperto:not(.term-pieno) main.wrap { padding-bottom: calc(var(--term-h, 52vh) + 12px); }
body.term-aperto.term-mini:not(.term-pieno) #app, body.term-aperto.term-mini:not(.term-pieno) main.wrap { padding-bottom: 60px; }
/* vista piena (/terminali, ?term=1): il pannello e' la pagina */
body.term-pieno #term { top: 0; height: auto !important; border-top: 0; box-shadow: none; }
body.term-pieno #term { top: var(--term-top, 0); }
body.term-pieno #termPill { display: none !important; }
/* telefono: tutto schermo (top e altezza li segue terminale.js con visualViewport, per la tastiera) */
body.is-mobile #term { top: 0; height: auto !important; }
body.is-mobile #term.mini { top: auto; }
body.is-mobile.term-pieno #term { top: var(--term-top, 0); }
body.is-mobile .term-resize { display: none; }
body.is-mobile .term-bar { padding: .35rem .4rem; padding-top: calc(.35rem + env(safe-area-inset-top, 0px)); gap: .35rem; min-height: 0; }
body.is-mobile.term-pieno .term-bar { padding-top: .35rem; }
body.is-mobile .term-actions .btn { min-height: 36px; min-width: 36px; justify-content: center; font-size: 1.05rem; padding: 0 .4em; }
body.is-mobile .term-actions .term-menu-btn { min-width: 42px; font-size: 1.3rem; line-height: 1; }
body.is-mobile .term-tabs { scrollbar-width: none; }
body.is-mobile .term-tabs::-webkit-scrollbar { display: none; }
body.is-mobile .term-tab { font-size: .72rem; padding: .35em .4em .35em .5em; max-width: 8.5rem; }
body.is-mobile .term-tab .dot { width: 6px; height: 6px; }
body.is-mobile .term-tab .x { padding: .1em .35em; }
body.is-mobile .term-tab:not(.on) .x { display: none; }   /* la ✕ solo sulla linguetta attiva: niente chiusure per sbaglio */
body.is-mobile .pane-banner { white-space: normal; max-width: calc(100% - 24px); }
body.is-mobile.term-aperto:not(.term-mini) { overflow: hidden; overscroll-behavior: none; }
body.is-mobile.term-aperto.term-mini #app { padding-bottom: 60px; }
body.is-mobile #termPill { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
/* iPhone: sotto i 16px Safari ingrandisce la pagina quando il campo nascosto di xterm prende il fuoco */
body.is-mobile .xterm .xterm-helper-textarea { font-size: 16px !important; }
/* foglio «Incolla a mano» (quando il browser non lascia leggere gli appunti) */
.term-foglio { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; padding: 12px; }
.foglio-box { width: 100%; max-width: 520px; background: var(--surface, #1e293b); border: 1px solid var(--border, #334155); border-radius: 10px; padding: .7rem;
  display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.foglio-tit { font-size: .85rem; color: var(--muted, #8391a7); }
.foglio-box textarea { width: 100%; box-sizing: border-box; background: var(--term, #0d1117); color: var(--text, #e2e8f0); border: 1px solid var(--border, #334155);
  border-radius: 6px; padding: .5rem; font: 16px/1.35 var(--mono, monospace); resize: vertical; }
.foglio-az { display: flex; gap: .5rem; justify-content: flex-end; }
.foglio-az .btn { min-height: 38px; }
/* telefono: il dito scorre la .xterm-viewport con lo scroll nativo (inerzia di iOS); lo schermo disegnato non intercetta i tocchi */
body.is-mobile .xt-pane .xterm-screen { pointer-events: none; }
body.is-mobile .xt-pane .xterm .xterm-viewport { touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
body.is-mobile .xt-pane .xterm .xterm-viewport::-webkit-scrollbar { display: none; }
/* telefono: si scrive qui (contenteditable, non un campo di modulo: niente barra con le frecce ne' password) */
.term-input { position: absolute; left: 0; top: 0; width: 2px; height: 24px; opacity: .01; overflow: hidden; z-index: 3; font-size: 16px; line-height: 24px; pointer-events: none;
  color: transparent; caret-color: transparent; background: transparent; white-space: pre; outline: none; -webkit-user-select: text; user-select: text; }
/* iPhone (Safari 26): con la tastiera aperta, sotto il pannello resta una fascia (la barra degli indirizzi galleggiante) in cui
   si vedeva la pagina: la copre il colore della barra dei tasti */
body.is-mobile #term:not(.mini)::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--surface2, #172033); }
/* tastiera nostra (telefono): nessuna tastiera di sistema, quindi nessuna barra sopra */
.term-kb { position: relative; flex-shrink: 0; background: #0b1220; border-top: 1px solid var(--border, #334155); padding: 6px 3px calc(6px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 9px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.term-kb[hidden] { display: none; }
#term.kb-aperta .term-keys { padding-bottom: 5px; }
.kb-row { display: flex; gap: 5px; }
.kb-row.kb-rientro { padding: 0 5%; }
.kb-k { flex: 1 1 0; min-width: 0; height: 44px; border-radius: 6px; background: #3b4252; color: #f1f5f9; display: flex; align-items: center; justify-content: center;
  font: 400 1.3rem -apple-system, system-ui, sans-serif; box-shadow: 0 1px 0 rgba(0,0,0,.6); -webkit-tap-highlight-color: transparent; }
.kb-k.kb-sp { background: #252c3a; font-size: .95rem; }
.kb-k.kb-15 { flex-grow: 1.45; }
.kb-k.kb-spazio { flex-grow: 5; }
.kb-k.kb-invio { flex-grow: 1.9; background: var(--blue, #3b82f6); color: #fff; }
.kb-k svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kb-k.kb-giu { background: #64748b; }
.kb-k.kb-sp.kb-giu { background: #3b4252; }
.kb-k.kb-on { background: #e2e8f0; color: #0b1220; }
.kb-k.kb-lock { background: #e2e8f0; color: #0b1220; box-shadow: inset 0 -3px 0 var(--blue, #3b82f6); }
.kb-pop { position: absolute; z-index: 5; display: flex; background: #475569; border-radius: 8px; padding: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.kb-pop span { width: 42px; height: 44px; display: flex; align-items: center; justify-content: center; font: 400 1.35rem -apple-system, system-ui, sans-serif; color: #fff; border-radius: 6px; }
.kb-pop span.on { background: var(--blue, #3b82f6); }
/* menu ☰ del terminale (telefono) */
.term-menu { position: absolute; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 50px); z-index: 30; width: min(320px, calc(100% - 16px)); max-height: calc(100% - 70px);
  overflow-y: auto; background: var(--surface, #1e293b); border: 1px solid var(--border, #334155); border-radius: 10px; padding: .35rem; box-shadow: 0 12px 32px rgba(0,0,0,.6); }
body.term-pieno .term-menu { top: 50px; }
/* le voci col carattere del terminale [2026-10-17]; le voci href sono <a> (tasto destro: apri in una nuova scheda) */
.term-menu .tm-voce { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 7px; color: var(--text, #e2e8f0);
  font: 500 .86rem/1.35 'JetBrains Mono','Cascadia Code',SFMono-Regular,Menlo,Consolas,monospace; padding: .55rem .7rem; cursor: pointer; text-decoration: none; }
a.tm-voce:hover, a.tm-voce:visited { color: var(--text, #e2e8f0); }
.term-menu .tm-voce small { display: block; color: var(--muted, #8391a7); font-size: .7rem; font-weight: 400; }
.term-menu .tm-voce:hover, .term-menu .tm-voce:active { background: rgba(96,165,250,.15); }
.term-menu .tm-voce.attuale { color: var(--green, #4ade80); }
.term-menu .tm-tit { padding: .45rem .7rem .15rem; color: var(--muted, #8391a7); font: 700 .68rem 'JetBrains Mono',Menlo,Consolas,monospace; letter-spacing: .06em; text-transform: uppercase; }
.term-menu .tm-voce.rosso { color: var(--red, #f87171); }
.term-menu .tm-sep { height: 1px; background: var(--border, #334155); margin: .3rem .2rem; }
.term-menu .tm-riga { display: flex; gap: .35rem; padding: .2rem .3rem; align-items: center; }
.term-menu .tm-riga .tm-voce { flex: none; width: 52px; text-align: center; font-weight: 700; background: var(--surface2, #172033); border: 1px solid var(--border, #334155); }
.term-menu .tm-info { flex: 1; background: none; border: 0; color: var(--muted, #8391a7); font: .82rem 'JetBrains Mono',Menlo,Consolas,monospace; text-align: center; }
/* schermata senza sessioni: un blocco unico (testo e bottone uno sotto l'altro) */
.term-vuoto .tv-box { max-width: 420px; }
.term-vuoto .tv-box > div { margin-top: .9rem; }
body.is-mobile .term-vuoto .tv-box button, body.is-mobile .term-vuoto .tv-box .btn { width: 100%; justify-content: center; padding: .8em 1em !important; font-size: 1rem !important; }
#term.senza-sessioni .term-keys, #term.senza-sessioni .term-kb { display: none; }
/* voce con interruttore (Tastiera iPhone) */
.term-menu .tm-con-switch { display: flex; align-items: center; gap: .6rem; }
.term-menu .tm-testo { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.term-menu .tm-testo small { color: var(--muted, #8391a7); font-size: .7rem; font-weight: 400; }
.term-menu .tm-switch { flex: none; width: 42px; height: 24px; border-radius: 12px; background: #475569; position: relative; transition: background .15s; }
.term-menu .tm-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.term-menu .tm-switch.on { background: var(--green, #4ade80); }
.term-menu .tm-switch.on i { left: 21px; }
.term-vuoto .tv-tit { color: var(--text, #e2e8f0); font-size: 1rem; font-weight: 600; }
.term-vuoto .tv-nota { font-size: .82rem; line-height: 1.5; }
.term-vuoto .tv-nuova { font-size: .9rem; padding: .6em 1.4em; }
/* fumetto sopra il tasto premuto, come sull'iPhone: si vede subito cosa si e' toccato */
.kb-k[data-p] { position: relative; }
.kb-k.kb-giu[data-p]::after { content: attr(data-p); position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); min-width: 46px; height: 54px;
  padding: 0 6px; border-radius: 8px; background: #64748b; color: #fff; font: 400 1.9rem -apple-system, system-ui, sans-serif; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.55); pointer-events: none; z-index: 6; }
.term-kb .kb-row:first-child .kb-k.kb-giu[data-p]::after { height: 46px; }
/* popup «Allega» [2026-10-19] */
.term-allega { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 12px; }
.al-box { width: min(480px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface, #1e293b); border: 1px solid var(--border, #334155); border-radius: 12px;
  padding: .8rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: 0 16px 40px rgba(0,0,0,.6); color: var(--text, #e2e8f0);
  font: .85rem/1.4 'JetBrains Mono','Cascadia Code',SFMono-Regular,Menlo,Consolas,monospace; }
.al-tit { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .95rem; }
.al-drop { border: 2px dashed var(--border, #334155); border-radius: 10px; padding: .8rem; text-align: center; color: var(--muted, #8391a7); display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.al-drop.sopra { border-color: var(--blue, #60a5fa); background: rgba(96,165,250,.08); }
.al-drop .al-file { color: var(--text, #e2e8f0); font: inherit; max-width: 100%; }
.al-lista { display: flex; flex-direction: column; gap: .35rem; }
.al-lista:empty { display: none; }
.al-voce { display: flex; align-items: center; gap: .55rem; background: var(--surface2, #172033); border-radius: 8px; padding: .3rem .4rem; }
.al-voce img, .al-voce .al-ico { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.al-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-nome small, .al-dove small { display: block; color: var(--muted, #8391a7); font-size: .72rem; }
.al-nota, .al-dir { background: var(--term, #0d1117); color: var(--text, #e2e8f0); border: 1px solid var(--border, #334155); border-radius: 7px; padding: .45rem .55rem; font: inherit; width: 100%; resize: vertical; }
.al-dove { display: flex; flex-direction: column; gap: .45rem; }
.al-dove label { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; cursor: pointer; }
.al-dove .al-dir { flex: 1; min-width: 12rem; width: auto; }
.al-az { display: flex; justify-content: flex-end; gap: .5rem; }
.al-az .btn:disabled { opacity: .5; cursor: default; }
body.is-mobile .al-nota, body.is-mobile .al-dir { font-size: 16px; }   /* iOS: sotto i 16px fa lo zoom sul campo */
/* ⌨ pila di tasti (PC): sale in verticale sopra il bottone, un tasto dopo l'altro, come le Pile del Dock del Mac [2026-10-19] */
.pila-wrap { position: relative; display: inline-flex; }
.pila { position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 35; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.pila.aperta { pointer-events: auto; }
.pila-k { min-width: 3.4em; padding: .3em .7em .2em; transform: translate(-50%, calc(28px + var(--i) * 8px)) scale(.6); opacity: 0;
  transition: transform .22s cubic-bezier(.2,.9,.3,1.3), opacity .16s; transition-delay: calc(var(--i) * 28ms);
  font: 700 .95rem 'JetBrains Mono','Cascadia Code',SFMono-Regular,Menlo,Consolas,monospace; color: #f1f5f9; cursor: pointer;
  background: linear-gradient(#334155, #1e293b); border: 1px solid #475569; border-bottom: 3px solid #0b1220; border-radius: 7px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 16px rgba(0,0,0,.5); }
.pila.aperta .pila-k { transform: translate(-50%, 0) scale(1); opacity: 1; }
.pila:not(.aperta) .pila-k { transition-delay: 0s; }
.pila-k:hover { border-color: #64748b; border-bottom-color: #0b1220; color: #fff; background: linear-gradient(#3b4b63, #243146); }
.pila-k:active { transform: translate(-50%, 2px) scale(1); border-bottom-width: 1px; }
#tPila svg { width: 16px; height: 16px; display: block; }
#tPila.attivo { border-color: var(--blue, #60a5fa); color: var(--blue, #60a5fa); }
