/* Archivo variabile (larghezza 62–125, peso 400–900), SIL Open Font License: file in fonts/. Dentro il sito, così funziona anche senza rete e senza Google Fonts (editor, PDF e foglio del link troupe). */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Layout del foglio: "Call Sheet.dc.html" (Claude Design, design system Modernist), 21/09/2026 */
:root {
  --paper: #f3f2f2;
  --surface: #eae9e9;
  --ink: #201e1d;
  --accent: #e73925;
  --divider: color-mix(in srgb, #201e1d 40%, transparent);
  --n500: #9b9797;
  --n700: #605d5d;
  --desk: #e7e5e4;
  --font: 'Archivo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--desk); color: var(--ink); font: 13px/1.45 var(--font); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
button, select, input { font: inherit; }
.acc { color: var(--accent); }
.muted { color: var(--n700); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }

/* ── Barra strumenti ── */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 0 20px; min-height: 52px; background: var(--ink); color: #eae7e7; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.bar .grp, .bar .tabs { display: flex; align-items: center; align-self: stretch; gap: 8px; }
.bar .tabs { gap: 2px; flex-wrap: wrap; }
.bar .brand { font-weight: 800; font-size: 12px; letter-spacing: .2em; margin-right: 4px; }
.bar .sp { flex: 1; }
.bar .vr { width: 1px; height: 18px; background: #4a4747; margin: 0 8px; align-self: center; }
.bar .status { font-size: 11px; color: var(--n500); white-space: nowrap; }
.bar .status.bad { color: #ff9783; font-weight: 600; }
.tab, .btn { border: 1px solid transparent; background: none; color: inherit; padding: 5px 10px; cursor: pointer; font-size: 12.5px; }
/* i tab sono pannelli a filo: la voce attiva ha la linea rossa sul bordo basso della barra */
.tab { align-self: stretch; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent;
  color: #b9b5b5; font-weight: 500; }
.tab small { font-size: 10.5px; color: var(--n500); font-variant-numeric: tabular-nums; font-weight: 400; }
.tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.tab.on { color: #fff; font-weight: 700; border-bottom-color: var(--accent); background: rgba(255,255,255,.07); }
.tab.on small { color: #cfcbcb; }
.tab.icon { padding: 0 10px; font-size: 15px; }
.tab.add, .tab.del { font-size: 11.5px; color: var(--n500); margin-left: 2px; }
.tab.add { margin-left: 10px; }
.tab.del:hover { color: #ff9783; }
.btn { border-color: #4a4747; border-radius: 999px; align-self: center; padding: 5px 14px; color: #d9d6d6; }
.btn:hover { background: #2d2b2b; color: #fff; border-color: #6a6666; }
.btn.icon { width: 28px; padding: 5px 0; text-align: center; border-radius: 50%; }
.btn.acc { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.acc:hover { background: #f04a37; border-color: #f04a37; }
/* barra dell'editor: titolo | giorni centrati | menu */
.bar.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); gap: 16px; }
.bar.editor > .grp:first-child { justify-self: start; min-width: 0; }
.bar.editor > .grp:last-child { justify-self: end; }
.bar .ptitle.ed { padding: 3px 8px; margin-left: -4px; border-radius: 6px; cursor: text; }
.bar .ptitle.ed:hover { background: rgba(255,255,255,.07); }
.bar .ptitle.ed:focus { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--accent); text-overflow: clip; }
.bar .ptitle.ed:empty::before { color: var(--n500); }
.ptitle { font-weight: 700; font-size: 14px; letter-spacing: -.01em; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar.editor .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; justify-content: center; }
.bar.editor .tabs::-webkit-scrollbar { display: none; }
.bar.editor .tabs > * { flex: none; }
.tab.add { font-size: 17px; line-height: 1; padding: 0 12px; margin-left: 4px; color: var(--n500); }
.tab.add:hover { color: #fff; }
/* giorno: duplica ed elimina stanno sul giorno aperto, in uno spazio riservato (sugli altri non compaiono: coprirebbero la scheda) */
.dtab { position: relative; display: flex; align-self: stretch; }
.dtab .dact { display: none; }
.dtab.on .tab { padding-right: 8px; }
.dtab.on .dact { display: flex; align-items: center; padding-right: 8px; }
.dico { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: #a9a5a5; cursor: pointer; }
.dico:hover { background: rgba(255,255,255,.12); color: #fff; }
.dico.del:hover { background: var(--accent); }
.dico svg { width: 14px; height: 14px; }
/* menu delle azioni */
.menu { position: relative; align-self: center; }
.btn.menubtn { display: inline-flex; align-items: center; gap: 8px; }
.btn.menubtn.open { background: #2d2b2b; color: #fff; border-color: #6a6666; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px; background: #262423; border: 1px solid #4a4747; border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.menu-pop::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; } /* ponte: il mouse non esce dall'area andando dal bottone al menu */
.mi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: #e6e2e2; font-size: 13px; text-align: left; cursor: pointer; }
.mi:hover, .mi:focus-visible { background: rgba(255,255,255,.08); color: #fff; outline: none; }
.mi .mi-i { flex: none; opacity: .8; }
.mi small { margin-left: auto; color: var(--n500); font-size: 11px; }
.mi.acc { color: #ff8a78; font-weight: 600; }
.mi.acc:hover { background: var(--accent); color: #fff; }
.mi.danger { color: #ff9783; }
.mi.danger:hover { background: rgba(231,57,37,.25); color: #fff; }
.mini.danger:hover { background: var(--accent); color: #fff; }
.menu-sep { height: 1px; margin: 5px 6px; background: #4a4747; }
.clink { margin-left: 4px; color: var(--n500); text-decoration: none; font-size: 11px; }
.clink:hover { color: var(--accent); }
.t.crew td .ed { min-width: 3em; }
.t.crew td.nowrap .ed { white-space: nowrap; }
.headtag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 8px; letter-spacing: .12em; font-weight: 600; vertical-align: 1px; }
.bar input[type=file] { display: none; }
.sheet.login { width: 340px; min-height: 0; margin-top: 12vh; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--n700); }
.login input { font: inherit; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); padding: 7px 8px; border: 1px solid var(--divider); background: #fff; }
.login input:focus { outline: 1px solid var(--ink); }
.login .btn { align-self: flex-start; padding: 7px 18px; }
.alert { max-width: 210mm; margin: 16px auto 0; padding: 10px 14px; background: #fff2ef; border: 1px solid var(--accent); font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* avvisi dello schedule (solo editor): orari fissi non rispettati, esterni dopo il tramonto */
.warns { color: var(--accent); }
.warns b { color: var(--ink); }
.warns ul { flex-basis: 100%; margin: 0; padding-left: 22px; color: var(--ink); }
.anc { display: block; margin: 2px auto 0; padding: 0 2px; border: 0; background: none; font: 600 9px/1.3 var(--font); color: var(--n700); cursor: pointer; white-space: nowrap; }
.anc:not(.on) { opacity: 0; }
.t tr:hover .anc { opacity: 1; }
.anc.bad, .tmw { color: var(--accent); }
.tmw { display: flex; justify-content: center; gap: 2px; align-items: center; font-size: 9px; font-weight: 700; }
.tmw svg { width: 11px; height: 11px; }
/* "conta per il wrap" sulle attività dello schedule: si vede al passaggio, acceso resta in vista */
.wrapb { margin-left: 10px; padding: 0 6px; border: 1px solid var(--divider); border-radius: 999px; background: none; font: 600 8.5px/1.6 var(--font); letter-spacing: .04em; color: var(--n700); cursor: pointer; white-space: nowrap; opacity: 0; }
.t tr:hover .wrapb, .wrapb.on { opacity: 1; }
.wrapb.on { border-color: var(--accent); color: var(--accent); }

/* comandi dentro il foglio (mai stampati) */
.mini { border: 0; border-radius: 999px; background: rgba(32,30,29,.07); color: var(--ink); padding: 4px 12px; cursor: pointer; font-size: 11.5px; font-weight: 500; transition: background .12s, color .12s; }
.mini:hover { background: var(--ink); color: var(--paper); }
.x { border: none; background: none; color: var(--n500); cursor: pointer; padding: 0 3px; font-size: 13px; }
.x:hover { color: var(--accent); }
.rowctl { white-space: nowrap; text-align: right; width: 1%; }
.adders { display: flex; gap: 6px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.adders select { font-size: 11.5px; font-weight: 500; padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(32,30,29,.07); color: var(--ink); cursor: pointer; }
.adders select:hover { background: rgba(32,30,29,.12); }

/* ── Foglio A4 ── */
.sheet { width: 210mm; min-height: 297mm; margin: 24px auto; padding: 9mm 12mm 8mm; background: var(--paper);
  box-shadow: 0 2px 10px rgba(20,20,19,.12);
  font-size: 11px; line-height: 1.45; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sheet.wide { width: 300mm; min-height: 0; display: block; font-size: 13px; }
.doc { counter-reset: sec; }
/* intestazione e piè ripetuti su ogni pagina stampata: thead/tfoot, come doc-page.js del design */
.frame { width: 100%; border-collapse: collapse; }
.frame > * > tr > td { padding: 0; vertical-align: top; }

/* celle modificabili */
.ed { outline: none; min-width: 1em; display: inline-block; white-space: pre-wrap; }
.ed:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ed:focus { background: #fff; box-shadow: 0 0 0 1.5px var(--accent); }
.ed:empty::before { content: attr(data-ph); color: var(--n500); }
.ed.block { display: block; }

/* etichetta piccola spaziata, usata ovunque */
.lbl { font-size: 8px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--n700); }
.lbl.ink { color: var(--ink); font-size: 8.5px; }

/* intestazione e piè di pagina ripetuti */
.runhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 3mm; }
.runhead .rt { font-weight: 800; font-size: 13px; letter-spacing: -.01em; text-transform: uppercase; }
.runhead .rmeta { display: flex; gap: 14px; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--n700); }
.runfoot { padding-top: 6mm; }
.runhead { margin-bottom: 0; }
.runfoot > div { border-top: 2px solid var(--ink); padding-top: 4px; display: flex; justify-content: space-between; gap: 16px;
  font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--n700); }
.runfoot .ver { text-transform: none; }
/* in stampa il piè di pagina è fisso in fondo a ogni pagina, anche all'ultima quando è corta;
   quello nel tfoot resta invisibile a tenere lo spazio, così il testo non ci passa sotto */
.runfoot.pinned { display: none; }

/* testata: orari | titolo | riepilogo */
.hero { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-bottom: 2px solid var(--ink); padding: 6mm 0; }
/* orari a sinistra, dove e luce a destra: quattro righe alte uguali per parte, così le linee si guardano */
.times, .summary { display: grid; gap: 7px; grid-auto-rows: 26px; }
.trow .lbl, .bigtime { white-space: nowrap; }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline; align-content: end; border-bottom: 1px solid var(--divider); padding-bottom: 4px; }
.trow > :last-child { justify-self: end; }
.sv { font-weight: 700; font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.wx svg { flex: none; }
.wx svg + span { margin-right: 2px; }
.trow:last-child { border-bottom: 0; }
/* alba o tramonto nascosti nel giorno: la colonna tiene i suoi quattro posti, le righe che restano stanno in alto
   allineate agli orari e tengono tutte la linea; il posto libero resta in fondo */
.summary { grid-template-rows: repeat(4, 26px); }
.summary.short .trow { border-bottom: 1px solid var(--divider); }
.trow.acc .lbl, .trow.acc .bigtime { color: var(--accent); }
.bigtime { font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.center .kick { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.center h1 { font-weight: 800; font-size: 48px; line-height: .92; letter-spacing: -.03em; margin: 0 0 10px; text-transform: uppercase; max-width: 80mm; text-wrap: balance; }
.center .date { font-size: 12px; letter-spacing: .02em; font-weight: 600; }
.center .by { font-size: 11px; color: var(--n700); margin-bottom: 4px; }

/* regia / produzione / PM */
/* contatti: le colonne si dividono lo spazio fra chi c'è (un posto senza nessuno non esce nel PDF) */
.people { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 2px solid var(--ink); margin-bottom: 9mm; }
.people > div { padding: 8px 14px; }
.people > div ~ div { border-left: 1px solid var(--divider); }
.people > div:first-of-type { padding-left: 0; }
.people > div:last-of-type { padding-right: 0; }
.people:not(:has(> div)) { display: none; }
.people .lbl { font-size: 8.5px; }
.person { display: flex; justify-content: space-between; gap: 8px; }
.person .n { font-weight: 600; }

/* sezioni, numerate di seguito contando solo quelle stampate */
.sec { counter-increment: sec; margin-bottom: 9mm; }
/* intestazione di sezione: §, titolo e sottotitolo centrati fra loro e a metà fra la linea sopra e quella sotto (16/10/2026, #26;
   prima sulla riga di base: il § e il sottotitolo, più piccoli, stavano 2 px più in basso, e il titolo era più vicino alla linea di sopra) */
.sec-h { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding: 7px 0 6px; }
.sec-h::before, .sec-h h2, .sec-h .sub { line-height: 1; }
.sec-h::before { content: '§' counter(sec, decimal-leading-zero); font-weight: 800; font-size: 11px; letter-spacing: .1em; color: var(--accent); }
.sec-h h2 { font-weight: 800; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.sec-h .sub { margin-left: auto; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--n700); }
.sec.hidden > :not(.sec-h) { display: none; }
.sec.hidden .sec-h { opacity: .45; }
.sec.hidden .sec-h h2::after { content: ' - nascosta'; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 12px; }

/* location + fasce */
/* location come tabella (come i call sheet di StudioBinder): una riga per location, icone nell'intestazione;
   l'ospedale è del giorno, una cella sola alta quanto tutte le righe. Link neri, il rosso resta per §, constraint e crew call. */
.loct { margin-top: 3mm; }
.loct th svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 6px; color: var(--ink); }
.loct th.hcol svg { color: var(--accent); }
.loct td { padding-top: 9px; padding-bottom: 9px; font-size: 11px; }
.loct td + td { border-left: 1px solid var(--divider); padding-left: 10px; }
.loct .locname { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 3px; }
.loct .locname .big { font-weight: 800; font-size: 14px; letter-spacing: -.01em; margin-right: 6px; }
.loct .maplink { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
/* numeri di scena e plate: come nel resto dell'ODG, grassetto senza riquadro, separati da virgola */
.scn { font-weight: 800; font-size: 11px; font-variant-numeric: tabular-nums; }
.maplink { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.maps { font-weight: 600; white-space: nowrap; color: var(--accent); }
.band { border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); padding: 8px 0; display: flex; gap: 14px; align-items: baseline; }
.band .lbl { font-size: 8.5px; color: var(--accent); flex: none; }
/* constraint: fascia a tutta larghezza sotto la testata, così non allunga il riepilogo e non sposta il resto */
/* constraint: un blocco a sé fra testata e contatti, staccato da tutti e due, testo grande */
.band.constraint { justify-content: center; align-items: baseline; margin: 5mm 0; padding: 10px 16px; border: 0; background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.band.constraint { align-items: center; gap: 12px; }
.band.constraint svg { flex: none; width: 20px; height: 20px; }
.band.constraint > :last-child { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.band.constraint + .people { border-top: 2px solid var(--ink); }
.band.note { padding: 12px 0; margin-top: 3mm; font-weight: 800; font-size: 16px; letter-spacing: -.01em; display: block; }

/* tabelle */
table.t { width: 100%; border-collapse: collapse; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.t th { text-align: left; padding: 6px 8px; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--n700); border-bottom: 1px solid var(--divider); }
/* celle centrate in verticale nella riga (08/10/2026): indirizzi, parcheggi, ospedale alto quanto tutte le location; in orizzontale a sinistra */
.t td { padding: 7px 8px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.t th:first-child, .t td:first-child { padding-left: 0; }
.t th:last-child, .t td:last-child { padding-right: 0; }
.t tr.brk td { background: var(--surface); padding-top: 4px; padding-bottom: 4px; border-bottom: 0; font-size: 10px; }
/* luoghi di servizio del giorno (issue #13): righe sotto le location, il nome come etichetta */
.t.loct tr.fac td { vertical-align: middle; }
.t.loct tr.fac .lbl { margin-bottom: 2px; }
.t.loct .fnote { color: var(--n700); }
.t.loct td.facx { position: relative; }
.t.loct td.facx .x { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
@media screen { .t.loct tr.fac .x { opacity: 0; } .t.loct tr.fac:hover .x { opacity: 1; } }
.notepick { margin-left: 4px; border: 0; background: none; font: inherit; font-size: 10px; color: var(--n500); cursor: pointer; padding: 0; width: 1.6em; }
@media screen { .notepick { opacity: 0; } .crow:hover .notepick, .notepick:focus { opacity: 1; } }

/* stand-by del giorno (issue #15): scena di riserva in fondo allo schedule, fuori dagli orari */
.sbl { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--accent); white-space: nowrap; }
.t tr.sb td { border-top: 1px dashed var(--divider); }
.t tr.sb .sbgo { margin-left: 8px; }
/* pause e spostamenti: etichetta a sinistra nella colonna della descrizione, il luogo accanto */
.t tr.brk .brkl { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.t tr.brk .brkwhere { margin-left: 10px; color: var(--n700); }
/* orario: prima colonna, inizio grande e fine piccola sotto */
.t td.tm b { display: block; font-weight: 800; font-size: 13px; line-height: 1.1; }
.t td.tm span { display: block; font-size: 9px; color: var(--n700); }
.t tr.brk td.tm b { font-size: 11px; }
.t tfoot { display: table-row-group; } /* il totale chiude la tabella una volta, non si ripete a ogni pagina */
.t tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 8px; font-weight: 800; font-size: 14px; vertical-align: baseline; }
.t tfoot td.lbl { font-size: 8.5px; color: var(--ink); }
.t .sc { font-weight: 800; font-size: 16px; }
.t .num { font-weight: 800; font-size: 14px; }
.t .setline { font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.pill { display: inline-block; padding: 1px 6px; background: var(--ink); color: var(--paper); font-size: 8px; letter-spacing: .14em; font-weight: 600; border: 1px solid var(--ink); }
.pill.out { background: transparent; color: var(--ink); }
.pill.click { cursor: pointer; user-select: none; }
/* slugline: nell'editor INT/EXT e DAY/NIGHT si cambiano con un clic sulla parola */
.setline .click { cursor: pointer; }
@media screen { .setline .click:hover { color: var(--accent); } }
/* schedule in tre blocchi: quando e cosa | descrizione | dettagli, separati solo dallo spazio; ogni riga è centrata in verticale */
.t.sched td { vertical-align: middle; }
.t.sched .c, .t.sched td.sc, .t.sched .r { text-align: center; }
.t.sched .b2, .t.sched .b3 { padding-left: 14px; }
/* orario e scena: contenuto centrato */
.t.sched td.tm, .t.sched th:first-child { text-align: center; padding-left: 0; }
.t.sched th { white-space: nowrap; }
.pill.acc-bg { background: var(--accent); border-color: var(--accent); color: #fff; }
.omitted td { color: var(--n500); text-decoration: line-through; }
/* cast: quante comparse servono nel giorno ("Background · 10"), e la riga automatica dei minori sotto la tabella */
.bgn { font-weight: 800; }
.t td .sm { font-size: 9px; }
.minors { padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 10.5px; font-weight: 600; }
/* trasporti: una riga per mezzo con Out e Back (da sopra, partenza → arrivo sotto); i trasferimenti su una riga a parte */
.t.trans .sm { display: block; font-size: 9px; font-weight: 400; }
.t.trans td.leg .where { display: block; color: var(--n700); }
.t.trans .lt { white-space: nowrap; font-weight: 700; }
.t.trans tr.transfer td.leg .where { display: inline; }
.t.trans tr.transfer .lbl { margin-right: 6px; }
.paxn + .paxn::before, .paxn ~ .ed:not(:empty)::before { content: ', '; }
.paxn .x { display: none; }
.t tr:hover .paxn .x { display: inline; }
.seats { display: block; font-size: 9px; font-weight: 600; color: var(--n700); }
.seats.bad { color: var(--accent); }
.addpax { margin-left: 4px; padding: 0 6px; border: 0; border-radius: 999px; background: rgba(32,30,29,.07); font-size: 11px; cursor: pointer; opacity: 0; }
.t tr:hover .addpax, .addpax:focus { opacity: 1; }
.todo { color: var(--accent); font-weight: 600; font-size: 10px; }
/* Spoglio, colonna Days (issue #1): il trattino rosso mette la scena in attesa, la pillola grigia la toglie */
button.todo, .holdp { border: 0; background: none; padding: 0 4px; font-family: inherit; cursor: pointer; }
button.todo:hover { text-decoration: underline; }
.holdp { border-radius: 999px; padding: 1px 7px; background: rgba(32,30,29,.08); color: var(--n700); font-size: 10px; font-weight: 600; white-space: nowrap; }
.t.scenes tr.hold td:not(.rowctl) { color: var(--n700); }
.pmiss { align-self: flex-end; color: var(--accent); font-weight: 600; }

/* cast: l'orario di chiamata è quello che cercano, in grassetto */
.t td.ccall { font-weight: 800; font-size: 12px; }
/* crew list: una persona per riga, a tutta larghezza; orario solo per chi non segue il crew call, poi la nota (dove / perché).
   Nel PDF, se nessuno ha una nota, la colonna Note non esce (.nonote). */
.crewlist { margin-top: 2mm; }
.crow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 11mm minmax(0, 1.7fr); column-gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.crow.head { padding: 6px 0; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--n700); }
.crow .ccall { font-weight: 800; text-align: right; }
.crow .lbl, .crow .cnote { overflow-wrap: anywhere; }
.crow .cnote { position: relative; padding-left: 4mm; }
@media print { .crewlist.nonote .crow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 11mm; } .crewlist.nonote .cnote { display: none; } }
.crow .x { position: absolute; right: -18px; top: 5px; }
@media screen { .crow .x { opacity: 0; } .crow:hover .x { opacity: 1; } }
.crow .c, .t td.c { text-align: center; }
.telk { display: inline-grid; place-items: center; color: var(--ink); vertical-align: middle; }
.telk svg { width: 13px; height: 13px; }
@media screen { .telk:hover { color: var(--accent); } }
/* note generali: testo normale, il rosso resta al constraint */
.gnote { margin-top: 3mm; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }

/* note reparti */
.dept { display: grid; grid-template-columns: 110px 1fr; border-bottom: 1px solid var(--divider); }
.dept > div { padding: 8px 0 8px 8px; }
.dept > div:first-child { padding: 8px 8px 8px 0; }
.dept > div:last-child { border-left: 1px solid var(--divider); }
/* note reparti: prima gli elementi di spoglio delle scene ("· Stuffed cat (5, 6)"), poi la nota libera */
.elist { list-style: none; margin: 0; padding: 0; }
.elist li::before { content: '· '; }
/* Spoglio: elementi agganciati alla scena, e la vista per reparto */

/* pannello di lavoro (spoglio, elenco produzioni) */
.panel h2 { font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 4px; }
.panel .help { color: var(--n700); font-size: 12px; margin: 0 0 12px; max-width: 70ch; }
.panel section + section { margin-top: 28px; }
.panel .t .sc { font-size: 13px; }
.fields { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; align-items: baseline; }
.fields .lbl { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: 999px; background: rgba(32,30,29,.07); font-size: 12px; font-weight: 500; transition: background .12s; }
.chip:hover { background: rgba(32,30,29,.12); }
.chip .x { width: 18px; height: 18px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.chip .x:hover { background: var(--accent); color: #fff; }
.chips .mini { border: 1px dashed var(--n500); background: transparent; color: var(--n700); padding: 3px 12px; }
.chips .mini:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
/* tabelle dello Spoglio a tutta pagina; stesse colonne di telefono ed email per troupe e cast */
.panel table.t.crew { table-layout: fixed; }

/* ── Modifica sul foglio, alla Notion ──
   A schermo il foglio è quello del PDF: i comandi stanno nel margine esterno
   e compaiono solo passando col mouse sulla riga o sulla sezione. */
@media screen {
  .sec { position: relative; }
  .sec-h { position: relative; }
  .hide { border: 0; background: none; color: var(--n500); cursor: pointer; padding: 2px; line-height: 0; }
  .hide:hover { color: var(--accent); }
  .sec-h .hide { position: absolute; left: 100%; bottom: 4px; margin-left: 10px; opacity: 0; }
  .sec:hover .sec-h .hide, .sec.hidden .sec-h .hide { opacity: 1; }
  .t tr { position: relative; }
  /* comandi di riga: la cella copre la riga senza catturare i clic; i tre comandi stanno sui bordi */
  .rowctl.gutter { position: absolute; inset: 0; padding: 0 !important; border: 0 !important; background: none !important;
    width: auto; pointer-events: none; opacity: 0; }
  .t tr:hover .rowctl.gutter, .rowctl.gutter:focus-within, .rowctl.gutter.open { opacity: 1; }
  .rowctl.gutter > * { position: absolute; pointer-events: auto; }
  .rowctl .grip { right: 100%; top: 50%; transform: translateY(-50%); margin-right: 8px; font-size: 14px; }
  .rowctl .del { left: 100%; top: 50%; transform: translateY(-50%); margin-left: 8px; }
  .rowctl .addwrap { left: 50%; bottom: 0; transform: translate(-50%, 50%); z-index: 3; }
  .rowctl .add { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--divider); background: var(--paper);
    color: var(--n700); font-size: 13px; line-height: 15px; cursor: pointer; }
  .rowctl .add:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
  .addmenu { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); display: flex; gap: 4px;
    padding: 5px; background: var(--paper); box-shadow: 0 3px 10px rgba(45,43,43,.18); white-space: nowrap; }
  .addmenu::before { content: ''; position: absolute; left: -12px; right: -12px; bottom: 100%; height: 12px; } /* ponte: il mouse non esce dall'area mentre va dal + al menu */
  .addmenu .mini { background: var(--paper); }
  .addmenu .mini:hover { background: var(--ink); }
  /* aiuto: "?" con fumetto al passaggio */
  .q { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%;
    border: 1px solid var(--n500); color: var(--n700); font: 600 9px/1 var(--font); letter-spacing: 0; text-transform: none;
    cursor: help; position: relative; vertical-align: middle; margin-left: 6px; opacity: .55; }
  .q:hover, .q:focus { opacity: 1; border-color: var(--accent); color: var(--accent); outline: none; }
  .q:hover::after, .q:focus::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: -8px; z-index: 20;
    width: 280px; padding: 8px 10px; background: var(--ink); color: var(--paper); font: 400 11.5px/1.45 var(--font);
    letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
  .q.right:hover::after, .q.right:focus::after { left: auto; right: -8px; }
  .times, .summary, .people { position: relative; }
  .q.corner { position: absolute; top: -18px; left: -6px; margin: 0; }
  .q.corner.right { left: auto; right: 0; }
  .guide { position: fixed; top: 56px; right: 16px; z-index: 30; width: 420px; max-height: calc(100vh - 80px); overflow: auto;
    padding: 14px 18px; background: var(--paper); box-shadow: 0 12px 32px rgba(45,43,43,.25); font-size: 12.5px; }
  .guide h2 { font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
  .guide ol { padding-left: 18px; margin: 0 0 8px; }
  .guide li { margin-bottom: 6px; }
  .grip { cursor: grab; user-select: none; }
  .grip:active { cursor: grabbing; }
  tr.drop-up > td { box-shadow: inset 0 2px 0 var(--accent); }
  tr.drop-down > td { box-shadow: inset 0 -2px 0 var(--accent); }
  .adders { opacity: .4; transition: opacity .12s; } /* sempre trovabili, pieni al passaggio */
  .panel .adders { opacity: 1; } /* nello Spoglio si lavora: bottoni sempre pieni */
  .sec:hover .adders, .adders:focus-within, .sec.empty .adders { opacity: 1; }
  /* vuoto = non va nel PDF: si vede attenuato, per poterlo riempire */
  .sec.empty > :not(.adders), .center .empty, .band.empty, .dept.empty, .hosp.empty, .loct td.empty, .loct td > .empty { opacity: .45; }
  .sec.empty:hover > *, .center .empty:hover, .band.empty:hover, .dept.empty:focus-within, .hosp.empty:hover, .loct td.empty:hover, .loct td > .empty:hover { opacity: 1; }
  .skyb, .sunb { margin-left: 6px; vertical-align: -3px; opacity: 0; }
  .summary:hover .skyb, .summary:hover .sunb, .trow.off .sunb { opacity: 1; }
  .summary .trow.off .ed { opacity: .45; }
  .people > .off .lbl { opacity: .45; }
  .skymsg { position: absolute; top: calc(100% + 4px); right: 0; font-size: 10.5px; text-align: right; }
  .sv.ed:focus { text-overflow: clip; }
  /* data e scena dell'effetto: si clicca sul testo, il menu è invisibile sopra */
  .pick { position: relative; cursor: pointer; }
  .pick:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .overlay::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
  .center .date.pick { display: inline-block; }
}

/* ── Stampa ── */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: var(--paper); }
  .no-print, .bar, .alert { display: none !important; }
  .sheet { width: auto; min-height: 297mm; margin: 0; box-shadow: none; }
  .sheet + .sheet { break-before: page; }
  .loct .hcol.empty, .loct td.hosp.empty { display: none; }
  /* contatti: il posto vuoto e chi è assente quel giorno (.off) non escono; i bordi seguono chi resta */
  .people > .off { display: none; }
  .people > div, .people > div ~ div { padding: 8px 14px; border-left: 0; }
  .people > div:not(.off) ~ div:not(.off) { border-left: 1px solid var(--divider); }
  .people > div:not(.off):not(div:not(.off) ~ div) { padding-left: 0; }
  .people > div:not(.off):not(:has(~ div:not(.off))) { padding-right: 0; }
  .people:not(:has(> div:not(.off))) { display: none; }
  /* alba e tramonto nascosti: come .summary.short */
  .summary .trow.off { display: none; }
  .summary:has(> .trow.off) .trow { border-bottom: 1px solid var(--divider); }
  .sec.hidden, .sec.empty, .center .empty, .dept.empty, .band.empty, .hosp.empty { display: none; }
  .ed:empty::before { content: ''; }
  .t.trans .lt.none { display: none; } /* Out o Back senza orari: niente freccia sola */
  .ed.keep:empty::before { content: attr(data-ph); color: var(--ink); } /* orario crew: vuoto = crew call del giorno */
  .ed.slashes:empty::before { content: '///'; color: var(--ink); } /* cast vuoto: come nel call sheet */
  .ed:hover { background: none; }
  tr, .hero, .people, .band, .dept, .runhead, .crow { break-inside: avoid; }
  .sec-h { break-after: avoid; }
  .runfoot.pinned { display: block; position: fixed; left: 12mm; right: 12mm; bottom: 8mm; }
  .frame > tfoot .runfoot { visibility: hidden; }
  a { text-decoration: none; }
}
.btn.icon.menubtn { width: 34px; height: 34px; padding: 0; justify-content: center; }
.dtab.on { background: rgba(255,255,255,.07); box-shadow: inset 0 -2px 0 var(--accent); }
.dtab.on .tab { background: none; border-bottom-color: transparent; }

/* elenco delle produzioni: schede nello stile del foglio */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 14px; }
.pcard { position: relative; min-height: 92px; padding: 16px 18px 14px; background: #fafafa; border-top: 2px solid var(--ink); box-shadow: 0 1px 3px rgba(20,20,19,.08);
  cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.pcard:hover { transform: translateY(-2px); border-top-color: var(--accent); box-shadow: 0 8px 20px rgba(20,20,19,.14); }
.pt { display: block; padding-right: 64px; font-weight: 800; font-size: 17px; line-height: 1.15; letter-spacing: -.01em; text-transform: uppercase; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pstat { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--n700); }
.pstat b { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-right: 2px; }
.prange { margin-top: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pm { margin-top: 10px; font-size: 11.5px; color: var(--n700); font-variant-numeric: tabular-nums; }
.pact { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.pcard:hover .pact, .pcard:focus-within .pact { opacity: 1; }
@media (hover: none) { .pact { opacity: 1; } }
.pbtn { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(32,30,29,.07); color: var(--ink); cursor: pointer; }
.pbtn:hover { background: var(--ink); color: var(--paper); }
.pbtn.del:hover { background: var(--accent); color: #fff; }
.pbtn svg { width: 14px; height: 14px; }
@media screen { .sheet.wide { max-width: calc(100vw - 32px); } }

/* ── Movimento leggero: dissolvenze brevi su menu, bottoni, hover e pannelli ── */
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes pop-c { from { opacity: 0; transform: translate(-50%, -4px); } }
@media screen {
  .tab, .btn, .mini, .mi, .dico, .pbtn, .x, .clink, .chip, .hide, .add, .adders select {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease, transform .1s ease; }
  .tab:active, .btn:active, .mini:active, .mi:active, .dico:active, .pbtn:active, .add:active { transform: scale(.96); }
  .ed { transition: background-color .15s ease, box-shadow .15s ease; }
  .menu-pop, .alert, .guide { animation: pop .16s ease-out; }
  .addmenu { animation: pop-c .14s ease-out; }
  .q:hover::after, .q:focus::after { animation: pop .15s ease-out; }
  .pcard .pact { transition: opacity .16s ease; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* transizione fra pagine: dissolvenza incrociata con View Transitions (vedi vt() in app.js); la vista telefono ha già la sua */
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@media screen { .no-vt .doc, .no-vt .sheet.panel { animation: page-in .22s ease-out; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }

/* pannello "Link troupe" */
.sharebox { position: relative; max-width: 210mm; margin: 16px auto 0; padding: 20px 28px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; background: #fafafa;
  border-top: 2px solid var(--ink); box-shadow: 0 6px 18px rgba(20,20,19,.12); }
.sharebox section + section { padding-left: 32px; border-left: 1px solid var(--divider); }
.sharebox .shmsg { grid-column: 1 / -1; }
@media (max-width: 760px) { .sharebox { grid-template-columns: 1fr; gap: 20px; } .sharebox section + section { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--divider); } }
.sharebox h3 { min-height: 24px; display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sharebox .count { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--n700); padding: 2px 9px; border-radius: 999px; background: rgba(32,30,29,.07); }
.sharebox .hint { margin: 0 0 12px; min-height: 2.9em; font-size: 12px; line-height: 1.45; color: var(--n700); }
.sharebox .shrow { display: flex; gap: 8px; align-items: stretch; }
.sharebox input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--divider); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); }
.sharebox input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(32,30,29,.08); }
.sharebox input[readonly] { font-variant-numeric: tabular-nums; background: var(--surface); }
.sharebox .mini { padding: 0 18px; font-size: 12.5px; white-space: nowrap; }
.sharebox .mini.pri { background: var(--ink); color: var(--paper); font-weight: 600; }
.sharebox .mini.pri:hover:not(:disabled) { background: var(--accent); color: #fff; }
.sharebox .mini.pri.done { background: #2f7d4f; color: #fff; }
.sharebox .mini:disabled { opacity: .4; cursor: not-allowed; }
.sharebox .textbtn { margin-top: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--n700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sharebox .textbtn:hover { color: var(--accent); }
.sharebox .shmsg { margin: 14px 0 0; font-size: 12px; color: var(--n700); }
.sharebox .closebtn { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; }
.sharebox .closebtn:hover { background: rgba(32,30,29,.08); color: var(--ink); }
@media screen { .sharebox { animation: pop .16s ease-out; } }
/* pannello "Token per agenti" (issue #21): stessa scatola, una colonna */
.sharebox.one { grid-template-columns: 1fr; max-width: min(640px, calc(100% - 24px)); box-sizing: border-box; }
.sharebox.one .shrow { flex-wrap: wrap; }
.sharebox.one .shrow input { min-width: 180px; }
.sharebox select { padding: 0 10px; border: 1px solid var(--divider); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); }
.sharebox .tkfresh { margin-top: 14px; }
.sharebox .tklist { list-style: none; margin: 16px 0 0; padding: 0; font-size: 12.5px; }
.sharebox .tklist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--divider); }
.sharebox .tklist span { flex: 1; color: var(--n700); font-size: 12px; }
.sharebox .tklist .textbtn { margin: 0; }
.t tr.brk .brkwhere { margin-left: 10px; font-size: 10px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted, #666); }
.t tr.brk .brkwhere i { font-style: normal; margin: 0 2px; }
.t select.where { font: inherit; border: 0; background: transparent; color: inherit; appearance: none; padding: 0; margin: 0; cursor: pointer; }

/* ── Spoglio a tab (issue #8): una sezione alla volta, pagina a tutta larghezza ── */
.subnav { position: sticky; top: 52px; z-index: 9; background: var(--desk); border-bottom: 1px solid var(--divider); }
.subnav .in { max-width: 1480px; margin: 0 auto; padding: 0 44px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav .in::-webkit-scrollbar { display: none; }
.stab { display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px 10px; border: 0; border-bottom: 2px solid transparent; background: none;
  font: 500 13px var(--font); color: var(--n700); cursor: pointer; white-space: nowrap; }
.stab:hover { color: var(--ink); background: rgba(32,30,29,.04); }
.stab.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.stab.sep { margin-left: 16px; } /* prima lo spoglio (scene, elementi), poi l'anagrafica */
.nb { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; font: 700 10px/1 var(--font); }
.nb.miss { background: var(--accent); color: #fff; }
.nb.miss:hover { background: var(--ink); }
.nb.cnt { color: var(--n700); background: rgba(32,30,29,.07); font-weight: 600; }
/* i comandi di riga stanno nel margine: il padding laterale li tiene dentro il foglio */
.sheet.wide.panel.sp { width: calc(100vw - 48px); max-width: 1480px; margin-top: 20px; padding: 22px 44px 28px; }
.panel .h2gap { margin-top: 28px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 12px; background: rgba(32,30,29,.07); font: 500 11.5px var(--font); cursor: pointer; color: var(--ink); }
.fchip:hover { background: rgba(32,30,29,.12); }
.fchip.on { background: var(--ink); color: var(--paper); }
.fchip.warn:not(.on) { color: var(--accent); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip .dot { margin-right: 6px; }
.tools .search { margin-left: auto; border: 1px solid var(--divider); background: #fff; padding: 4px 12px; font: 12px var(--font); width: 240px; border-radius: 999px; outline: none; }
.tools .search:focus { border-color: var(--ink); }
.lockline { margin-left: 8px; font-size: 11.5px; color: var(--n700); }
.lockline.on { color: var(--ink); font-weight: 600; }
.lockline .mini { margin-left: 6px; font-weight: 500; }
.colpick { position: relative; }
.colpick .mini.on { background: var(--ink); color: var(--paper); }
.colpick .pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--paper); box-shadow: 0 6px 20px rgba(20,20,19,.2);
  padding: 8px 14px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; white-space: nowrap; }
.colpick .pop label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
/* scene: set e descrizione su una riga ciascuno (la descrizione intera quando la si scrive), elementi in un conteggio */
table.t.scenes { table-layout: fixed; font-size: 12px; }
.t.scenes td { padding: 6px 8px; vertical-align: middle; }
.t.scenes td.sc { font-size: 14px; }
.t.scenes .sl .ed, .t.scenes .ds .ed { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t.scenes .sl .ed { font-weight: 600; text-transform: uppercase; letter-spacing: .02em; font-size: 11px; }
.t.scenes .ds .ed { color: var(--n700); }
.t.scenes .sl .ed:focus, .t.scenes .ds .ed:focus { white-space: pre-wrap; overflow: visible; color: var(--ink); }
.t.scenes td.cut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t.scenes td.cut .pick { display: inline; }
.t.scenes tr.open > td { background: rgba(32,30,29,.035); border-bottom-color: transparent; }
.t.scenes tr.det > td { background: rgba(32,30,29,.035); padding: 2px 0 12px; }
.t.scenes tr.det > td:last-child { background: none; }
.epill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--divider); background: none; border-radius: 999px; padding: 2px 8px 2px 6px;
  font: 600 11px var(--font); cursor: pointer; color: var(--ink); }
.epill:hover, tr.open .epill { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.epill .dots { display: inline-flex; gap: 2px; }
.epill .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.epill.zero { color: var(--n500); border-style: dashed; padding: 1px 9px; }
.detgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 22px; padding: 4px 8px 0 60px; }
.detgrid h4 { margin: 0 0 4px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.detgrid h4 i { width: 7px; height: 7px; border-radius: 50%; }
.detgrid .elem { display: inline-block; margin: 0 6px 4px 0; padding: 1px 3px 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--divider); font-size: 11.5px; }
.detgrid .addel { max-width: 160px; font-size: 11px; border: 0; border-radius: 999px; padding: 1px 8px; background: rgba(32,30,29,.07); cursor: pointer; }
/* elementi: un'intestazione per reparto */
.t.els td { vertical-align: middle; font-size: 12px; }
.t.els tr.dh td { padding-top: 18px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--ink); }
.t.els tbody:first-of-type tr.dh td { padding-top: 4px; }
.t.els tr.dh td i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.t.els tr.dh .mini { float: right; letter-spacing: 0; text-transform: none; font-weight: 500; }
/* quello che manca: riga rossa sotto la cella, il segnaposto lo dice */
td.missing { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
td.missing .ed:empty::before { color: var(--accent); }
.warnbox { background: #fff2ef; border-left: 3px solid var(--accent); padding: 8px 12px; margin-bottom: 12px; font-size: 12px; }
.warnbox ul { margin: 4px 0 0; padding-left: 18px; }
.warnbox a, .panel .help a, .splink { color: var(--ink); font-weight: 600; }
.splink:hover, .warnbox a:hover, .panel .help a:hover { color: var(--accent); }
/* menu a scelta che si legge come le altre celle (contatti della produzione, location della scena) */
.fpick { display: inline-block; min-width: 4em; }
