.view--pc {
  --crt-black: #041008;
  --panel: #07200f;
  --phosphor: #33ff66;
  --phosphor-hi: #b8ffc9;
  --phosphor-dim: #1f9c47;
  --phosphor-faint: #0e4a22;
  --glow: rgba(51, 255, 102, .55);
  --hand: 'Patrick Hand', system-ui, sans-serif;
  --dots: rgba(40, 170, 20, .4);
  background: var(--green-soft);
  color: var(--phosphor);
  font-family: var(--hand);
}

.view--pc .view-close { --fill: var(--green); }

.crt {
  --fill: var(--green);
  --bw: 6px;
  --sh: 10px;
  --rad: 38px 42px 36px 40px / 42px 36px 40px 38px;
  position: absolute;
  inset: 8px 10px 6px 8px;
  padding: 10px;
  transform-origin: 50% 50%;
}
.crt--enter { will-change: transform, opacity; }

.crt-screen {
  position: relative;
  height: 100%;
  background: var(--crt-black);
  border: 5px solid var(--ink);
  border-radius: 28px 32px 26px 30px / 32px 26px 30px 28px;
  overflow: hidden;
}

.crt-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 1.8vmin, 22px);
  font-size: clamp(18px, 1.7vw, 24px);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 0 1px var(--phosphor), 0 0 8px var(--glow);
}

/* barra titolo stile finestra, come un adesivo verde */
.crt-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 56px clamp(10px, 1.8vmin, 20px) 0;
  padding: 4px 16px 4px 14px;
  background: var(--phosphor);
  color: var(--ink);
  text-shadow: none;
  border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px;
  box-shadow: 5px 5px 0 var(--phosphor-dim);
}
/* in schermata pulita (cartelle e progetti) gli effetti CRT non coprono piu le immagini */
/* gli effetti stanno in un contenitore che sfuma in 3 secondi (e ritorna entrando nella schermata iniziale) */
.crt-fxs {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 3s ease, visibility 0s linear 0s;
}
.crt--clean .crt-fxs { opacity: 0; visibility: hidden; transition: opacity 3s ease, visibility 0s linear 3s; }
.crt-content { transition: text-shadow 3s ease; }
.crt--clean .crt-content { text-shadow: none; }

.crt-head::before { content: none; }
.crt-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crt-cursor { animation: crt-blink 1s steps(1) infinite; }

/* corpo: indice a sinistra + contenuto */
.crt-body { flex: 1; min-height: 0; display: flex; gap: clamp(12px, 2vmin, 24px); position: relative; }
.crt-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  outline: none;
  padding: 6px 10px 12px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--phosphor-dim) transparent;
}
.crt-prompt { margin: 0 0 clamp(12px, 2.4vmin, 26px); color: var(--phosphor-dim); }

.crt-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 3px dashed var(--phosphor-faint);
  color: var(--phosphor-dim);
}
.crt-back { color: inherit; text-decoration: none; }
.crt-back:hover, .crt-back:focus-visible { color: var(--phosphor-hi); outline: none; }

.crt-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(16px, 3.4vmin, 36px);
}

/* schede cartella e progetto: bordo spesso, angoli a mano, ombra dura */
.crt-item {
  -webkit-touch-callout: none; /* niente menu della pressione lunga su iPhone (apri in un'altra scheda) */
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 4px solid var(--phosphor);
  border-radius: 20px 24px 18px 22px / 22px 18px 24px 20px;
  box-shadow: 6px 6px 0 var(--phosphor-dim);
  outline: none;
  cursor: pointer;
  text-shadow: none;
  transition: translate .12s ease, box-shadow .12s ease, background .12s ease;
}
.crt-item:nth-child(even) { rotate: .6deg; }
.crt-item:nth-child(odd) { rotate: -.6deg; }
.crt-item:hover, .crt-item:focus-visible {
  background: var(--phosphor);
  color: var(--crt-black);
  rotate: 0deg;
  translate: -2px -2px;
  box-shadow: 9px 9px 0 var(--phosphor-dim), 0 0 18px var(--glow);
}
.crt-item:active { translate: 3px 3px; box-shadow: 2px 2px 0 var(--phosphor-dim); }

.crt-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(18px, 4.4vmin, 44px) 12px;
  text-align: center;
}
.crt-folder { width: clamp(90px, 18vmin, 180px); height: auto; }
.crt-tile-label { font-family: var(--hand); font-size: 1.25em; letter-spacing: .02em; text-transform: none; }
.crt-tile-meta { color: var(--phosphor-dim); font-size: .85em; }
.crt-item:hover .crt-tile-meta, .crt-item:focus-visible .crt-tile-meta { color: var(--crt-black); }

.crt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(125px, 16vw, 250px), 1fr));
  gap: clamp(14px, 2.6vmin, 28px);
}
.crt-card { padding: 10px; }
.crt-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border: 3px solid var(--phosphor-dim);
  border-radius: 12px 14px 10px 13px / 13px 10px 14px 12px;
  background: repeating-linear-gradient(45deg, transparent 0 6px, var(--phosphor-faint) 6px 8px);
  color: var(--phosphor-dim);
  font-size: .85em;
}
.crt-thumb--img { background: #0b130d; overflow: hidden; }
/* anteprime intere e a colori: niente ritaglio, niente filtro */
.crt-thumb--img img { width: 100%; height: 100%; object-fit: contain; }
.crt-card-title { font-family: var(--hand); font-size: 1em; line-height: 1.1; text-transform: none; overflow-wrap: anywhere; }
.crt-card-meta { color: var(--phosphor-dim); font-size: .8em; }
.crt-card-blurb { margin-top: 4px; font-family: var(--hand); font-size: .68em; line-height: 1.2; text-transform: none; opacity: .85; overflow-wrap: anywhere; }
.crt-item:hover .crt-thumb, .crt-item:focus-visible .crt-thumb { border-color: var(--crt-black); color: var(--crt-black); }
.crt-item:hover .crt-card-meta, .crt-item:focus-visible .crt-card-meta { color: var(--crt-black); }

.crt-fx { position: absolute; pointer-events: none; }
.crt-scan {
  inset: 0;
  z-index: 3;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .28) 3px 4px);
}
.crt-roll {
  left: 0;
  right: 0;
  top: 0;
  height: 12%;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(51, 255, 102, .06), transparent);
  will-change: transform;
}
.crt-vig {
  inset: 0;
  z-index: 4;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, .72));
}
.crt-flick {
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  will-change: opacity;
}
/* animazioni decorative solo a transizione finita, cosi non competono con lo zoom */
.crt--live .crt-roll { animation: crt-roll 7s linear infinite; }
.crt--live .crt-flick { animation: crt-flicker 6s infinite; }

@keyframes crt-roll { from { transform: translateY(-100%); } to { transform: translateY(900%); } }
@keyframes crt-blink { 50% { opacity: 0; } }
@keyframes crt-flicker { 0%, 100% { opacity: 0; } 48% { opacity: .03; } 50% { opacity: .07; } 52% { opacity: 0; } }

/* ---------- indice laterale (apri / chiudi, cartelle a tendina) ---------- */
.crt-side {
  flex: none;
  width: clamp(200px, 19vw, 260px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 2px 8px 0 2px;
  border-right: 3px dashed var(--phosphor-faint);
  text-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: var(--phosphor-dim) transparent;
  transition: width .2s ease, padding .2s ease, opacity .2s ease;
}
/* comandi in alto all'indice: INDEX (apri / minimizza) e FULLSCREEN, ben visibili */
.crt-tools { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.crt-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 7px 12px;
  font: inherit;
  font-size: .85em;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--crt-black);
  background: var(--phosphor);
  border: 0;
  border-radius: 12px 14px 11px 13px / 13px 11px 14px 12px;
  box-shadow: 3px 3px 0 var(--phosphor-dim);
  cursor: pointer;
}
.crt-tool:hover, .crt-tool:focus-visible { background: var(--phosphor-hi); outline: none; }
.crt-tool:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--phosphor-dim); }
.crt-ico { flex: none; width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.crt-ico--side { transition: rotate .2s ease; }
.crt-tools { flex: none; }
a.crt-tool { text-decoration: none; }
.crt-tool.is-on { background: var(--phosphor-hi); }
/* il tasto che riduce l'indice sta in fondo */
.crt-side-foot { flex: none; margin-top: auto; padding-top: 8px; }
/* solo l'elenco scorre: i due pulsanti restano fermi in alto */
.crt-side-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--phosphor) var(--phosphor-faint);
}
.crt-side-scroll::-webkit-scrollbar { width: 9px; }
.crt-side-scroll::-webkit-scrollbar-track { background: var(--phosphor-faint); border-radius: 6px; }
.crt-side-scroll::-webkit-scrollbar-thumb { background: var(--phosphor); border-radius: 6px; }

/* indice minimizzato: restano solo i due pulsanti, in colonna sottile a sinistra */
.crt--side-shut .crt-side { width: 58px; padding: 2px 6px 8px 0; overflow: hidden; }
.crt--side-shut .crt-side-scroll { display: none; }
.crt--side-shut .crt-tool { justify-content: center; padding: 10px 0; }
.crt--side-shut .crt-tool-txt { display: none; }
.crt--side-shut .crt-ico--side { rotate: 180deg; }
.crt--side-shut .crt-ico { width: 1.5em; height: 1.5em; }
.crt-side-folder { margin-bottom: 12px; }
.crt-side-head { display: flex; align-items: center; gap: 6px; }
.crt-side-t {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 4px 8px;
  font: inherit;
  font-size: .74em;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  color: var(--phosphor-dim);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.crt-side-t { display: block; text-decoration: none; }
.crt-side-t:hover, .crt-side-t:focus-visible { background: var(--phosphor-faint); outline: none; }
.crt-side-t.is-on { background: var(--phosphor); color: var(--crt-black); }
.crt-side-chev { flex: none; margin: 0; padding: 4px 6px; font: inherit; font-size: .74em; color: var(--phosphor-dim); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.crt-side-chev:hover, .crt-side-chev:focus-visible { background: var(--phosphor-faint); outline: none; }
.crt-chev { display: inline-block; transition: rotate .15s ease; }
.is-shut .crt-chev { rotate: -90deg; }
.crt-side-all {
  flex: none;
  padding: 1px 8px;
  font-size: .7em;
  color: var(--phosphor);
  text-decoration: none;
  border: 2px solid var(--phosphor-dim);
  border-radius: 8px;
}
.crt-side-all:hover, .crt-side-all:focus-visible { background: var(--phosphor-faint); outline: none; }
.crt-side-all.is-on { background: var(--phosphor); color: var(--crt-black); border-color: var(--phosphor); }
.crt-side-list { display: grid; gap: 2px; margin-top: 2px; }
.is-shut .crt-side-list { display: none; }
.crt-side-p {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: .85em;
  line-height: 1.15;
  text-transform: none;
  color: var(--phosphor);
  text-decoration: none;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.crt-side-p:hover, .crt-side-p:focus-visible { background: var(--phosphor-faint); outline: none; }
.crt-side-p.is-on { background: var(--phosphor); color: var(--crt-black); }
.crt-side-p.is-wip { opacity: .45; }

/* ---------- elenco progetti ---------- */
.crt-card--wip { cursor: default; opacity: .8; }
.crt-card--wip:hover, .crt-card--wip:focus-visible { background: var(--panel); color: var(--phosphor); translate: 0 0; box-shadow: 6px 6px 0 var(--phosphor-dim); }
.crt-card--wip:hover .crt-thumb, .crt-card--wip:focus-visible .crt-thumb { border-color: var(--phosphor-dim); color: var(--phosphor-dim); }
.crt-card--wip:hover .crt-card-meta, .crt-card--wip:focus-visible .crt-card-meta { color: var(--phosphor-dim); }

/* ---------- scheda: carosello | testo + riquadro verde ---------- */
.crt--detail .crt-main { overflow: hidden; padding: 0 4px 0 0; }
.crt-detail {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(32px, 4.5vw, 64px);
  text-transform: none;
}
.crt-detail--solo { grid-template-columns: minmax(0, 760px); }

.crt-gallery { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 24px); padding-right: 8px; }
.crt-viewer {
  position: relative;
  flex: 1;
  min-height: 160px;
  background: #0b130d;
  border: 3px solid var(--phosphor);
  border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px;
  box-shadow: 5px 5px 0 var(--phosphor-dim);
  overflow: hidden;
}
.crt-stage { position: absolute; inset: 0; }
/* Homichi, App: al posto delle immagini "presto negli store" (js/views/pc.js, soon) */
.crt-viewer--soon { display: grid; place-items: center; }
.crt-soon-big { margin: 0; padding: 10px 22px; font: 800 clamp(18px, 2.4vw, 28px)/1.2 'Patrick Hand', system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #0b130d; background: #ffd23f; border-radius: 999px; rotate: -3deg; }
/* immagine sempre intera: contain, mai ritagliata */
/* riempiono il riquadro e l'immagine resta intera (contain), a ogni dimensione della finestra */
.crt-stage img, .crt-stage video, .crt-stage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0b130d; }
.crt-stage img { background: transparent; }
.crt-stage model-viewer { --poster-color: transparent; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at 50% 40%, #243428, #070c08); }
.crt-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  width: 46px;
  height: 68px;
  padding: 0;
  font: inherit;
  font-size: 1.4em;
  color: var(--phosphor);
  background: rgba(4, 16, 8, .78);
  border: 3px solid var(--phosphor);
  cursor: pointer;
}
.crt-nav--prev { left: 8px; border-radius: 12px 6px 6px 12px; }
.crt-nav--next { right: 8px; border-radius: 6px 12px 12px 6px; }
.crt-nav:hover, .crt-nav:focus-visible { background: var(--phosphor); color: var(--crt-black); outline: none; }

/* frecce sotto il riquadro: vicine, al centro, con contatore e didascalia centrati */
.crt-ctrl { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; text-align: center; }
.crt-ctrl-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.crt-cap-n { min-width: 5.5em; font-size: .85em; color: var(--phosphor-dim); text-align: center; }
.crt-ctrl .crt-cap { justify-content: center; margin: 0; max-width: 100%; }
.crt-ctrl .crt-nav, .crt-ctrl .crt-nav:hover, .crt-ctrl .crt-nav:focus-visible, .crt-ctrl .crt-nav:active {
  position: static; translate: none; flex: none; width: 46px; height: 34px; border-radius: 10px;
}
/* le diapositive sono per lo piu orizzontali: riquadro un po' meno alto, il resto resta centrato */
@media (min-width: 861px) {
  .crt-gallery { justify-content: center; }
  .crt-viewer:not(.crt-viewer--book):not(.crt-viewer--gal) { flex: 0 1 auto; aspect-ratio: 16 / 10; }
}
.crt-cap { display: flex; justify-content: space-between; gap: 12px; margin: 10px 4px 6px; font-size: .78em; color: var(--phosphor-dim); text-transform: uppercase; }
.crt-strip { position: relative; flex: none; display: flex; gap: 10px; padding: 4px 4px 12px; overflow-x: scroll; scrollbar-width: thin; scrollbar-color: var(--phosphor-dim) var(--phosphor-faint); }
.crt-th {
  position: relative;
  flex: none;
  width: clamp(64px, 7vw, 92px);
  aspect-ratio: 4 / 3;
  padding: 0;
  background: #0b130d;
  border: 3px solid var(--phosphor-dim);
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  overflow: hidden;
  cursor: pointer;
  opacity: .65;
}
.crt-th img { width: 100%; height: 100%; object-fit: contain; }
.crt-th:hover, .crt-th:focus-visible, .crt-th.is-on { opacity: 1; border-color: var(--phosphor); outline: none; }
.crt-badge { position: absolute; right: 3px; bottom: 3px; padding: 0 5px; font-size: .7em; line-height: 1.2; color: var(--crt-black); background: var(--phosphor); border-radius: 6px; }

/* visualizzatore 3D: una sola barra a pillola con icone, etichetta al passaggio */
.crt-mv-tools {
  position: absolute; left: 50%; bottom: 12px; translate: -50% 0; z-index: 2;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(4, 16, 8, .72); backdrop-filter: blur(6px);
  border: 2px solid var(--phosphor-dim); border-radius: 999px;
}
.crt-mv-tools i { width: 2px; align-self: stretch; margin: 6px 4px; background: var(--phosphor-dim); opacity: .6; }
.crt-mvb {
  position: relative; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  color: var(--phosphor); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.crt-mvb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.crt-mvb:hover, .crt-mvb:focus-visible { background: var(--phosphor); color: var(--crt-black); outline: none; }
.crt-mvb.is-off { color: var(--phosphor-dim); }
.crt-mvb::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); left: 50%; translate: -50% 4px;
  padding: 3px 8px; white-space: nowrap; font-size: .72em; color: var(--phosphor);
  background: rgba(4, 16, 8, .92); border: 2px solid var(--phosphor-dim); border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s;
}
.crt-mvb:hover::after, .crt-mvb:focus-visible::after { opacity: 1; translate: -50% 0; }
.crt-mv-hint, .crt-mv-toast {
  position: absolute; left: 50%; translate: -50% 0; z-index: 2; pointer-events: none;
  padding: 4px 12px; font-size: .74em; color: var(--phosphor);
  background: rgba(4, 16, 8, .72); border-radius: 999px;
}
.crt-mv-hint { top: 12px; animation: mvfade 5s .6s both; }
.crt-mv-toast { top: 12px; opacity: 0; }
.crt-mv-toast.is-on { animation: mvtoast 1.4s both; }
@keyframes mvfade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mvtoast { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* libro sfogliabile: pagine bianche, ombra e dorso come un libro vero */
.crt-viewer--book { background: radial-gradient(circle at 50% 45%, #1c2a20, #070c08); }
.crt-book { position: absolute; inset: 0; }
.crt-book-area { position: absolute; inset: 10px 10px 50px; }
.crt-book-pages { position: absolute; }
.is-book .crt-ctrl .crt-cap-text, .is-book .crt-cap-n { display: none; }
.is-book .crt-ctrl .crt-cap:not(:has(.crt-tag:not([hidden]))) { display: none; }
.crt-detail.is-book { grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); }
.crt-book-pages.is-fallback { position: static; display: flex; gap: 10px; overflow-x: auto; }
.crt-book-pages.is-fallback .bk-page { flex: none; height: 100%; aspect-ratio: 595 / 737; }
.bk-page { background: #fff; overflow: hidden; }
.crt-stage .bk-page img { width: 100%; height: 100%; object-fit: fill; background: #fff; display: block; }
.crt-book-ui { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: center; gap: 14px; }
.crt-bk {
  width: 40px;
  height: 34px;
  padding: 0;
  font: inherit;
  font-size: 1.1em;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--phosphor);
  background: rgba(4, 16, 8, .78);
  border: 3px solid var(--phosphor);
  border-radius: 10px;
  cursor: pointer;
}
.crt-bk:hover, .crt-bk:focus-visible { background: var(--phosphor); color: var(--crt-black); outline: none; }
.crt-bk-n { min-width: 9.5em; text-align: center; font-size: .8em; color: var(--phosphor-dim); text-transform: uppercase; }

/* testo che scorre, riquadro verde con le info sempre visibile sotto */
.crt-info { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: clamp(18px, 3vh, 30px); font-size: .78em; line-height: 1.45; text-shadow: none; color: var(--phosphor-hi); }
.crt-info-scroll { flex: 1; min-height: 0; overflow: auto; padding-right: 10px; scrollbar-width: thin; scrollbar-color: var(--phosphor-dim) transparent; }
.crt-info-scroll p { margin: 0 0 1em; }
.crt-h { margin: 0 0 .8em; font: inherit; font-size: 1.6em; line-height: 1.05; text-transform: uppercase; color: var(--phosphor); }
.crt-h span { color: var(--phosphor-dim); font-size: .7em; }
.crt-pin {
  flex: none;
  padding: 16px 20px;
  color: var(--crt-black);
  background: var(--phosphor);
  border: 3px solid var(--phosphor-hi);
  border-radius: 16px 20px 14px 18px / 18px 14px 20px 16px;
  box-shadow: 5px 5px 0 var(--phosphor-dim);
}
.crt-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.crt-facts dt { font-size: .85em; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }
.crt-facts dd { margin: 0; font-weight: 700; }
.crt-files { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.crt-btn {
  display: inline-block;
  padding: 3px 14px;
  font-size: 1.05em;
  color: var(--phosphor);
  background: var(--crt-black);
  text-decoration: none;
  border-radius: 12px 14px 10px 13px / 13px 10px 14px 12px;
}
.crt-btn:hover, .crt-btn:focus-visible { background: #000; color: var(--phosphor-hi); outline: none; }

/* ---------- telefono e schermi stretti ---------- */
@media (max-width: 860px) {
  /* su telefono i comandi stanno in una riga sopra il contenuto; l'indice si apre sotto di essi */
  .crt-body { flex-direction: column; gap: 8px; }
  .crt-side { width: 100%; max-height: 46%; padding: 0; border-right: 0; border-bottom: 3px dashed var(--phosphor-faint); display: flex; flex-direction: column; }
  .crt-tools { flex-direction: row; margin: 0 0 8px; }
  .crt-tool { flex: 1; justify-content: center; padding: 8px 6px; }
  .crt-side-scroll { overflow: auto; padding-bottom: 8px; }
  .crt--side-shut .crt-side { width: 100%; padding: 0; max-height: none; border-bottom: 0; overflow: visible; }
  .crt--side-shut .crt-tool-txt { display: inline; }
  .crt--side-shut .crt-tool { padding: 8px 6px; }
  .crt--side-shut .crt-ico { width: 1.25em; height: 1.25em; }
  .crt--side-shut .crt-ico--side { rotate: -90deg; }
  .crt-ico--side { rotate: 90deg; }
  .crt-detail.is-book { grid-template-columns: minmax(0, 1fr); }
  /* su telefono la pagina scorre intera: carosello, riquadro verde, poi il testo */
  .crt--detail .crt-main { overflow: auto; padding-right: 2px; }
  .crt-detail { height: auto; display: flex; flex-direction: column; gap: 14px; }
  /* altezze in dvh: seguono la barra del browser quando compare o sparisce (vh come ripiego) */
  .crt-viewer { flex: none; height: clamp(190px, 36vh, 380px); height: clamp(190px, 36dvh, 380px); }
  .crt-viewer--book { height: clamp(260px, calc(100dvh - 400px), 560px); }
  /* ordine su telefono e tablet: titolo e anno, slide, descrizione, riquadro con le informazioni.
     Il testo e il titolo stanno nello stesso contenitore: lo "sciogliamo" cosi ogni pezzo si ordina da solo. */
  .crt-info { display: contents; }
  .crt-info-scroll { display: contents; }
  .crt-info-scroll > .crt-up, .crt-info-scroll > .crt-h { order: 0; margin-bottom: 0; }
  .crt-gallery { order: 1; }
  .crt-info-scroll > :not(.crt-up):not(.crt-h) { order: 2; margin-top: 0; margin-bottom: 0; }
  .crt-pin { order: 3; }
  .crt-th { width: 70px; }
}

@media (max-width: 600px) {
  .crt-head { margin: 14px 56px 10px 0; flex-wrap: wrap; row-gap: 4px; }
  .crt-head .crt-title { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1; }
  .crt-cursor { display: none; }
  .crt-content { padding: 10px; font-size: 20px; }
  .crt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crt-card { padding: 8px; }
  .crt-strip { display: none; }   /* sul telefono si scorre con frecce o swipe */
  .crt-foot { font-size: .8em; }
}

/* icone accanto alle voci dell'indice */
.crt-side-ico2 { flex: none; width: 1.45em; height: 1.45em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.crt-side-ico2--none { display: block; }
.crt-side-p > span:last-child { min-width: 0; }

.crt-stage model-viewer.is-ready { opacity: 1; }

/* galleria di copertine: griglia 3x3, clic per ingrandire */
.crt-gal { position: absolute; inset: 0; background: #fff; }
.crt-gal-grid { position: absolute; inset: 8px; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 8px; }
.crt-gal-tile { position: relative; min-width: 0; min-height: 0; padding: 0; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--phosphor-dim); cursor: pointer; overflow: hidden; font: inherit; }
.crt-gal-tile img { position: static; flex: 1; min-height: 0; width: 100%; height: auto; object-fit: contain; background: #fff; }
.crt-gal-tile span { flex: none; padding: 2px 4px; font-size: .7em; line-height: 1.15; text-align: center; color: #000; background: #f2f2f2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crt-gal-tile:hover, .crt-gal-tile:focus-visible { border-color: var(--phosphor); outline: none; }
.crt-gal-big { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; }
.crt-gal-big[hidden] { display: none; }
.crt-gal-big img { position: static; flex: 1; min-height: 0; width: 100%; height: auto; object-fit: contain; background: #fff; }
.crt-gal-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #f2f2f2; border-top: 1px solid #ccc; font-size: .85em; color: #000; }
.crt-gal-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crt-gal-back, .crt-gal-step { padding: 4px 12px; font: inherit; color: var(--phosphor); background: transparent; border: 2px solid var(--phosphor); cursor: pointer; }
.crt-gal-back:hover, .crt-gal-step:hover, .crt-gal-back:focus-visible, .crt-gal-step:focus-visible { background: var(--phosphor); color: var(--crt-black); outline: none; }
@media (max-width: 600px) { .crt-gal-tile span { display: none; } }
/* le frecce delle slide restano libere ai lati */
.crt-viewer--gal .crt-gal-grid { inset: 8px 50px; }
.crt-viewer--gal .crt-gal-big img { width: calc(100% - 100px); margin: 0 auto; }

.crt-btn { display: inline-flex; align-items: center; gap: 8px; }
.crt-btn-ico { flex: none; width: 1.15em; height: 1.15em; }

/* galleria senza box: solo le immagini, senza bordo ne sfondo */
.crt-gal--plain .crt-gal-tile { border: 0; background: transparent; box-shadow: none; }
.crt-gal--plain .crt-gal-tile img { background: transparent; }
.crt-gal--plain .crt-gal-tile:hover, .crt-gal--plain .crt-gal-tile:focus-visible { border: 0; box-shadow: none; filter: brightness(1.04); }

/* galleria senza box: le immagini si toccano al centro, senza spazi (mosaico 2 x 2) */
.crt-gal--plain .crt-gal-grid { grid-template-columns: repeat(2, minmax(0, min(46%, 33vh))) !important; gap: 0 !important; justify-content: center; align-content: center; }
.crt-gal--plain .crt-gal-tile { aspect-ratio: 1 !important; }
.crt-gal--plain .crt-gal-tile img { object-fit: cover; }

/* Avviso sul lato del libro (tesi in inglese) */
.crt-book-note { position: absolute; left: 12px; top: 12px; z-index: 6; width: min(170px, 24%); padding: 8px 10px; font: 11px/1.35 system-ui, sans-serif; color: #e8efe9; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .35); pointer-events: none; }
.crt-book-note b { display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
@media (max-width: 760px) { .crt-book-note { width: auto; right: 12px; top: auto; bottom: 56px; } }

/* progetto ancora in lavorazione (wip: true nei dati): nastro da cantiere a meta della galleria */
.crt-wipbar {
  position: absolute;
  top: 50%; left: 0; right: 0;
  translate: 0 -50%;
  z-index: 6;
  display: flex;
  justify-content: center;
  padding: 7px 10px;
  background: repeating-linear-gradient(135deg, #ffd23f 0 18px, #161616 18px 36px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 -2px 0 rgba(0, 0, 0, .35);
  pointer-events: none;
}
.crt-wipbar span {
  padding: 3px 14px;
  background: #ffd23f;
  color: #161616;
  border: 2px solid #161616;
  font: 700 15px/1.1 'Trebuchet MS', Tahoma, sans-serif;
  letter-spacing: .14em;
  white-space: nowrap;
}
@media (max-width: 440px) { .crt-wipbar span { font-size: 12px; letter-spacing: .1em; } }

/* pattern infinito: il modulo ripetuto scorre in diagonale, un giro esatto per ciclo cosi il loop non salta */
.crt-pattern { position: absolute; inset: 0; background-color: #fff; background-repeat: repeat; background-size: 260px 260px; animation: crt-pattern-scroll 9s linear infinite; }
@keyframes crt-pattern-scroll { from { background-position: 0 0; } to { background-position: 260px 260px; } }
@media (prefers-reduced-motion: reduce) { .crt-pattern { animation: none; } }

/* lo stesso nastro da cantiere, in piccolo, sulla copertina del progetto nella griglia */
.crt-wipbar--thumb { padding: 4px 4px; }
.crt-wipbar--thumb span { padding: 2px 6px; border-width: 1px; font-size: 10px; letter-spacing: .06em; }

/* ---------- caccia alle figurine (js/hunt.js): il gatto rotondo, incollato storto ----------
   text: alla fine del testo, a destra; home: sotto le schede della pagina principale; photos: di lato alle foto, mezzo fuori
   dal riquadro (che taglia quello che esce: per questo sta nella colonna delle foto, .crt-gallery) */
.hunt { display: block; width: 72px; margin: 8px 6px 10px auto; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; rotate: var(--r, -8deg); -webkit-tap-highlight-color: transparent; transition: scale .15s ease; }
.hunt img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); pointer-events: none; }
.hunt:hover, .hunt:focus-visible { scale: 1.08; outline: none; }
.hunt:focus-visible img { filter: drop-shadow(0 0 0 #ffd23f) drop-shadow(0 0 3px #ffd23f); }
.hunt--home { margin: 18px 12px 6px auto; }
.crt-gallery { position: relative; }
.hunt--photos { position: absolute; z-index: 3; right: -28px; top: 14%; margin: 0; }
@media (max-width: 860px) { .hunt--photos { right: -4px; top: 6px; width: 60px; } }
.hunt--photo1 { position: absolute; z-index: 3; right: 12px; bottom: 12px; margin: 0; width: 64px; display: none; }
.crt-viewer.is-first .hunt--photo1 { display: block; }
