/* Sezione Progetti in stile Windows XP (Luna). Carica dopo crt.css e ne ridisegna l'aspetto. */
.view--pc {
  --xp-blue: #0a53d6;
  --xp-blue-dk: #0831b0;
  --xp-link: #215dc6;
  --xp-sel: #316ac5;
  --xp-face: #ece9d8;
  --xp-line: #7f9db9;
  --crt-black: #000;
  --panel: #fff;
  --phosphor: #0a246a;
  --phosphor-hi: #000;
  --phosphor-dim: #55627a;
  --phosphor-faint: #c5d1ea;
  --glow: transparent;
  --xp-font: Tahoma, 'Segoe UI', Verdana, sans-serif;
  font-family: var(--xp-font);
  color: #000;
  /* sfondo "Bliss": cielo e collina */
  background:
    radial-gradient(130% 55% at 30% 112%, #62b21f 0 58%, transparent 59%),
    radial-gradient(120% 50% at 90% 118%, #4a9a14 0 58%, transparent 59%),
    linear-gradient(#2b6fd9 0%, #5b9be8 45%, #a9d0f5 78%, #d6ebfb 100%);
}
.view--pc::before { display: none; }
/* accensione (js/views/pc.js, is-booting): solo lo sfondo, niente finestra, X o lingue finche il pc non e acceso */
.view--pc.is-booting > *, .view--pc.is-booting .view-body > * { visibility: hidden; }

/* pulsante chiudi: rosso, come quello delle finestre XP */
.view--pc .view-close { top: 3px; right: 6px; width: 26px; height: 26px; font: 700 15px/1 var(--xp-font); color: #fff; z-index: 20; }
.view--pc .view-close::before {
  --fill: #e0472b; --sh: 0; --bw: 1px; --rad: 4px;
  filter: none; border-color: #fff;
  background: linear-gradient(#e98a73, #d9452a 55%, #b8280f);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.view--pc .view-close:hover, .view--pc .view-close:focus-visible { translate: 0 0; filter: brightness(1.12); }
.view--pc .view-close:hover::before, .view--pc .view-close:focus-visible::before { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.view--pc .view-close:active { translate: 0 1px; }

/* finestra */
.crt { inset: 0; padding: 0 3px 3px; }
.crt::before {
  --bw: 1px; --sh: 0; --rad: 9px 9px 3px 3px;
  filter: none;
  border-color: var(--xp-blue-dk);
  background: var(--xp-blue);
  box-shadow: 0 10px 34px rgba(0, 20, 80, .55);
}
.crt-screen { background: none; border: 0; border-radius: 0; overflow: visible; }
.crt-content {
  padding: 0;
  font-size: clamp(13px, 1.12vw, 16px);
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}
.crt-fxs { display: none; }

/* barra del titolo */
.crt-head {
  gap: 8px;
  margin: 0 -3px 0;
  min-height: 30px;
  padding: 3px 112px 3px 8px;
  color: #fff;
  font-family: 'Trebuchet MS', var(--xp-font);
  font-size: 1.05em;
  font-weight: 700;
  text-shadow: 1px 1px 0 #0a1f6e;
  background: linear-gradient(#3d95ff 0%, #0a5de6 12%, #0054e3 45%, #0050d8 85%, #0a3fb8 100%);
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}
.crt-head::before {
  content: '';
  flex: none;
  width: 18px; height: 18px;
  background: linear-gradient(135deg, #f7d86a, #e7a722);
  border: 1px solid #8a5a00;
  border-radius: 2px;
  clip-path: polygon(0 18%, 40% 18%, 50% 0, 100% 0, 100% 100%, 0 100%);
}
.crt-cursor { display: none; }

/* corpo: pannello laterale azzurro + area chiara */
.crt-body { gap: 0; background: var(--xp-face); border: 1px solid var(--xp-blue-dk); border-top: 0; }
.crt-main {
  margin: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--xp-line);
  scrollbar-color: #c1d2ee #ece9d8;
}
.crt--detail .crt-main { padding: 12px 14px; }
.crt-prompt { color: #444; }

.crt-side {
  width: clamp(190px, 18vw, 250px);
  padding: 12px 10px 0;
  color: #fff;
  background: linear-gradient(180deg, #7ba2e7 0%, #6375d6 100%);
  border-right: 0;
}
.crt-tools { gap: 6px; }
.crt-tool, .crt-btn, .crt-nav, .crt-bk {
  font-family: var(--xp-font);
  color: #000;
  letter-spacing: 0;
  text-transform: none;
  background: linear-gradient(#fff, #ece9d8 85%, #d6d0c0);
  border: 1px solid #003c74;
  border-radius: 3px;
  box-shadow: none;
}
.crt-tool { font-size: .95em; padding: 5px 10px; }
.crt-tool:hover, .crt-tool:focus-visible, .crt-btn:hover, .crt-btn:focus-visible, .crt-nav:hover, .crt-nav:focus-visible, .crt-bk:hover, .crt-bk:focus-visible {
  background: linear-gradient(#fff, #fff0cf 85%, #f8b330);
  color: #000;
  box-shadow: inset 0 0 0 1px #f9c864;
  outline: none;
}
.crt-tool:active, .crt-btn:active, .crt-nav:active, .crt-bk:active { background: #e2dccb; box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .3); }
.crt-tool:active, .crt-btn:active, .crt-bk:active { translate: 0; }
/* la freccia e centrata in verticale con translate: premuta deve restare dov'e, o scivola sotto il dito e il clic si perde */
.crt-nav, .crt-nav:hover, .crt-nav:focus-visible, .crt-nav:active { translate: 0 -50%; }
.crt-btn { padding: 4px 14px; font-size: 1em; }
.crt-nav--prev, .crt-nav--next { border-radius: 3px; width: 34px; height: 54px; }

.crt-side-scroll { scrollbar-color: #c1d2ee transparent; }
.crt-side-scroll::-webkit-scrollbar-track { background: transparent; }
.crt-side-scroll::-webkit-scrollbar-thumb { background: #c1d2ee; border-radius: 4px; }
.crt-side-folder { margin-bottom: 10px; background: #d6dff7; border-radius: 6px 6px 0 0; overflow: hidden; }
.crt-side-head { padding: 0 6px 0 0; background: linear-gradient(90deg, #fff, #c6d3f7); }
.crt-side-t { padding: 6px 8px; font-size: .92em; font-weight: 700; letter-spacing: 0; color: var(--xp-link); border-radius: 0; }
.crt-side-t:hover, .crt-side-t:focus-visible { background: none; color: #428eff; text-decoration: underline; }
.crt-side-t.is-on, .crt-side-t.is-on:hover { background: var(--xp-sel); color: #fff; text-decoration: none; }
.crt-side-chev { color: var(--xp-link); padding: 6px 4px 6px 8px; border-radius: 0; }
.crt-side-chev:hover, .crt-side-chev:focus-visible { background: none; color: #428eff; }
.crt-tool.is-on { background: linear-gradient(#fff, #ffe7a8 85%, #f8b330); box-shadow: inset 0 0 0 1px #f9c864; }
.crt-side-all { color: var(--xp-link); font-size: .75em; background: #fff; border: 1px solid #a6b5d8; border-radius: 3px; }
.crt-side-all:hover, .crt-side-all:focus-visible { background: #fff0cf; border-color: #f9c864; }
.crt-side-all.is-on { background: var(--xp-sel); color: #fff; border-color: var(--xp-sel); }
.crt-side-list { gap: 0; margin: 0; padding: 4px 0; }
.crt-side-p { padding: 4px 10px; font-size: .92em; color: var(--xp-link); border-radius: 0; }
.crt-side-p:hover, .crt-side-p:focus-visible { background: none; color: #428eff; text-decoration: underline; }
.crt-side-p.is-on { background: var(--xp-sel); color: #fff; text-decoration: none; }
.crt--side-shut .crt-side { width: 54px; padding: 12px 6px 0; }

/* icone e schede come file in Esplora risorse */
.crt-item {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: none;
  color: #000;
}
.crt-item:nth-child(even), .crt-item:nth-child(odd) { rotate: 0deg; }
.crt-item:hover, .crt-item:focus-visible { background: var(--xp-sel); color: #fff; translate: 0; box-shadow: none; border-color: #1c4aa8; }
.crt-item:active { translate: 0; box-shadow: none; }
.crt-tile-label { font-family: var(--xp-font); font-size: 1.05em; }
.crt-tile-meta, .crt-card-meta { color: #666; }
.crt-item:hover .crt-tile-meta, .crt-item:focus-visible .crt-tile-meta,
.crt-item:hover .crt-card-meta, .crt-item:focus-visible .crt-card-meta { color: #dbe6ff; }
.crt-card-title { font-family: var(--xp-font); font-weight: 700; }
.crt-card-blurb { font-family: var(--xp-font); opacity: 1; color: #444; }
.crt-item:hover .crt-card-blurb, .crt-item:focus-visible .crt-card-blurb { color: #fff; }
.crt-thumb { border: 1px solid var(--xp-line); border-radius: 2px; color: #666; background: repeating-linear-gradient(45deg, #f3f1e8 0 6px, #e6e2d2 6px 8px); }
.crt-thumb--img { background: #f4f4f4; }
.crt-item:hover .crt-thumb, .crt-item:focus-visible .crt-thumb { border-color: #fff; color: #333; }
.crt-card--wip:hover, .crt-card--wip:focus-visible { background: #fff; color: #000; box-shadow: none; }
.crt-card--wip:hover .crt-card-blurb { color: #444; }
.crt-card--wip:hover .crt-card-meta { color: #666; }

/* scheda progetto */
.crt-viewer { background: #ecebe8; border: 2px solid; border-color: #7f7f7f #fff #fff #7f7f7f; border-radius: 0; box-shadow: none; }
.crt-stage video, .crt-stage model-viewer { background: #ecebe8; }
.crt-stage img { background: transparent; }
.crt-stage model-viewer { background: radial-gradient(circle at 50% 40%, #46587d, #121826); }
.crt-viewer--book { background: radial-gradient(circle at 50% 45%, #3a4a6b, #121826); }
.crt-cap { color: #333; text-transform: none; font-size: .9em; }
.crt-ctrl .crt-nav, .crt-ctrl .crt-nav:hover, .crt-ctrl .crt-nav:focus-visible, .crt-ctrl .crt-nav:active { width: 48px; height: 28px; border-radius: 3px; }
.crt-cap-n { color: #333; }
.crt-th { background: #fff; border: 2px solid #c5d1ea; border-radius: 2px; opacity: .9; }
.crt-th:hover, .crt-th:focus-visible { border-color: #f9c864; opacity: 1; }
.crt-th.is-on { border-color: var(--xp-sel); opacity: 1; }
.crt-badge { color: #fff; background: var(--xp-sel); border-radius: 2px; }
.crt-bk-n { color: #dbe6ff; text-transform: none; }

.crt-info { color: #000; font-size: .95em; }
.crt-info-scroll { scrollbar-color: #c1d2ee #ece9d8; }
.crt-h { font-family: 'Trebuchet MS', var(--xp-font); font-weight: 700; text-transform: none; color: var(--xp-link); font-size: 1.5em; padding-bottom: 10px; border-bottom: 1px solid #c5d1ea; }
.crt-h span { color: #666; font-weight: 400; }
.crt-pin { color: #000; background: #fff; border: 1px solid #7f9db9; border-radius: 0; box-shadow: none; padding: 16px 20px; position: relative; }
.crt-facts dt { color: #555; opacity: 1; text-transform: none; letter-spacing: 0; }
.crt-facts dd { font-weight: 700; }

/* barra 3D: stile XP */
.crt-mv-tools { background: rgba(236, 233, 216, .94); backdrop-filter: none; border: 1px solid #003c74; border-radius: 4px; padding: 3px; gap: 2px; }
.crt-mv-tools i { background: #aca899; opacity: 1; width: 1px; }
.crt-mvb { color: #0a246a; border-radius: 3px; }
.crt-mvb:hover, .crt-mvb:focus-visible { background: var(--xp-sel); color: #fff; }
.crt-mvb.is-off { color: #8a8a8a; }
.crt-mvb::after { color: #000; background: #ffffe1; border: 1px solid #000; border-radius: 0; font-family: var(--xp-font); font-size: .8em; }
.crt-mv-hint, .crt-mv-toast { color: #000; background: #ffffe1; border: 1px solid #000; border-radius: 0; font-family: var(--xp-font); }

/* telefono */
@media (max-width: 860px) {
  .crt-side { width: 100%; border-bottom: 1px solid var(--xp-blue-dk); padding: 8px; }
  .crt--side-shut .crt-side { padding: 8px; }
  .crt-tool { padding: 6px; }
  /* su telefono: home e riduci indice affiancati in una riga, sopra l'elenco */
  .crt-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
  .crt-side .crt-tools { grid-column: 1; grid-row: 1; margin: 0 0 8px; }
  .crt-side .crt-side-foot { grid-column: 2; grid-row: 1; margin: 0 0 8px; padding: 0; }
  .crt-side .crt-side-scroll { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  .crt-head { margin: 0 -3px; padding: 4px 112px 4px 8px; flex-wrap: nowrap; }
  .crt-head .crt-title { flex: 1; white-space: nowrap; }
  .crt-content { padding: 0; font-size: 15px; }
  .crt-main { margin: 6px; padding: 8px; }
}

/* Esplora risorse: barra indirizzi, icone a griglia, barra di stato */
.crt--clean:not(.crt--detail) .crt-main { padding: 0; overflow: auto; }
.xp-exp { min-height: 100%; display: flex; flex-direction: column; }
.xp-addr { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: var(--xp-face); border-bottom: 1px solid #aca899; }
.xp-addr-l { color: #6d6a5c; font-size: .9em; }
.xp-addr-f { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 6px; background: #fff; border: 1px solid var(--xp-line); }
.xp-addr-f svg, .xp-addr-ico { flex: none; width: 16px; height: 16px; }
.xp-addr-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-go { display: flex; align-items: center; gap: 5px; padding: 1px 8px; font-size: .9em; }
.xp-go-ico { width: 16px; height: 16px; }
.xp-exp-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px; }
.xp-status { position: sticky; bottom: 0; padding: 3px 10px; font-size: .85em; color: #333; background: var(--xp-face); border-top: 1px solid #aca899; }

.crt-tiles { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 14px; }
.crt-tile { width: 128px; padding: 8px 4px 10px; gap: 4px; border: 1px solid transparent; background: transparent; }
.crt-tile .crt-folder { width: 64px; height: 64px; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .25)); }
.crt-tile-label { padding: 1px 4px; letter-spacing: 0; font-size: .95em; line-height: 1.2; color: #000; }
.crt-tile-meta { font-size: .8em; color: #7b7b7b; }
.crt-tile:hover, .crt-tile:focus-visible { background: transparent; color: #000; border-color: transparent; }
.crt-tile:hover .crt-folder, .crt-tile:focus-visible .crt-folder { filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .25)) brightness(.9) sepia(.2) hue-rotate(190deg) saturate(1.4); }
.crt-tile:hover .crt-tile-label, .crt-tile:focus-visible .crt-tile-label { background: var(--xp-sel); color: #fff; }
.crt-tile:hover .crt-tile-meta, .crt-tile:focus-visible .crt-tile-meta { color: #7b7b7b; }
.crt-tile:focus-visible .crt-tile-label { outline: 1px dotted #fff; outline-offset: -2px; }
.xp-exp .crt-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(125px, 15vw, 230px), 1fr)); }

.crt-gal-tile { border: 1px solid var(--xp-line); }
.crt-gal-tile:hover, .crt-gal-tile:focus-visible { border-color: var(--xp-sel); box-shadow: 0 0 0 2px var(--xp-sel); }
.crt-gal-tile span, .crt-gal-bar { font-family: var(--xp-font); background: var(--xp-face); }
.crt-gal-back, .crt-gal-step { color: #000; background: linear-gradient(#fff, #ece9d8 85%, #d6d0c0); border: 1px solid #003c74; border-radius: 3px; }
.crt-gal-back:hover, .crt-gal-step:hover, .crt-gal-back:focus-visible, .crt-gal-step:focus-visible { background: linear-gradient(#fff, #fff0cf 85%, #f8b330); color: #000; box-shadow: inset 0 0 0 1px #f9c864; }

/* banner pubblicitario da vecchio sito, solo per il download dell'app */
.xp-ad {
  position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px;
  padding: 8px 10px 8px 56px;
  font-family: 'Arial Black', Impact, Arial, sans-serif;
  text-decoration: none; text-align: center;
  background: repeating-linear-gradient(135deg, #fff200 0 14px, #ffd000 14px 28px);
  border: 4px ridge #ff2a2a;
  box-shadow: 3px 3px 0 #000;
  animation: xpad-border .6s steps(1) infinite;
  overflow: visible;
}
.xp-ad:hover { filter: brightness(1.08); }
.xp-ad-burst {
  position: absolute; left: -12px; top: -14px; width: 58px; height: 58px; display: grid; place-items: center;
  font: 900 .82em/1 'Arial Black', Impact, sans-serif; color: #fff; text-shadow: 1px 1px 0 #900;
  background: #e60012; transform: rotate(-14deg);
  clip-path: polygon(50% 0, 61% 18%, 80% 8%, 78% 30%, 100% 36%, 84% 52%, 98% 70%, 76% 72%, 74% 94%, 56% 82%, 40% 100%, 36% 78%, 14% 84%, 22% 62%, 0 50%, 20% 38%, 12% 16%, 34% 22%);
  animation: xpad-spin 1.2s steps(1) infinite;
}
.xp-ad-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xp-ad-top { font-size: .72em; color: #c00000; letter-spacing: .12em; animation: xpad-blink 1s steps(1) infinite; }
.xp-ad-main { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .92em; line-height: 1.1; color: #0000cc; text-shadow: 1px 1px 0 #fff; text-decoration: underline; }
.xp-ad-main .crt-btn-ico { width: 1.2em; height: 1.2em; color: #000; }
.xp-ad-click {
  flex: none; padding: 6px 8px; font-size: .7em; color: #000; line-height: 1.1;
  background: #d4d0c8; border: 2px outset #fff; border-color: #fff #404040 #404040 #fff;
}
.xp-ad:active .xp-ad-click { border-color: #404040 #fff #fff #404040; }
@keyframes xpad-border { 0%, 100% { border-color: #ff2a2a; } 50% { border-color: #2a2aff; } }
@keyframes xpad-blink { 50% { opacity: 0; } }
@keyframes xpad-spin { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(-4deg) scale(1.08); } }

/* adesivo piccolo in basso a destra del riquadro: segnala modello 3D o video */
.crt-tag {
  position: absolute; bottom: 10px; right: 10px; z-index: 3; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px;
  font: 900 .72em/1.2 'Arial Black', Impact, Arial, sans-serif; letter-spacing: .08em; color: #0000cc; white-space: nowrap;
  background: repeating-linear-gradient(135deg, #fff200 0 10px, #ffd000 10px 20px);
  border: 2px ridge #ff2a2a; box-shadow: 2px 2px 0 #000;
  animation: xpad-border .6s steps(1) infinite;
}
.crt-tag[hidden] { display: none; }
.crt-tag b { padding: 1px 5px; color: #fff; background: #e60012; text-shadow: 1px 1px 0 #900; transform: rotate(-6deg); animation: xpad-blink 1s steps(1) infinite; }
.crt-tag--red { color: #fff; text-shadow: 1px 1px 0 #7a0f0a; background: repeating-linear-gradient(135deg, #ff6a57 0 10px, #e8402f 10px 20px); border-color: #fff; animation-name: xpad-border-red; }
.crt-tag--red b { background: #7a0f0a; }

/* variante rossa (Homichi) */
.xp-ad--red {
  background: repeating-linear-gradient(135deg, #ff6a57 0 14px, #e8402f 14px 28px);
  border-color: #fff; animation-name: xpad-border-red;
}
.xp-ad--red .xp-ad-burst { background: #7a0f0a; color: #fff; text-shadow: 1px 1px 0 #000; }
.xp-ad--red .xp-ad-top { color: #fff; text-shadow: 1px 1px 0 #7a0f0a; }
.xp-ad--red .xp-ad-main { color: #fff; text-shadow: 2px 2px 0 #7a0f0a; text-decoration: underline; }
.xp-ad--red .xp-ad-main .crt-btn-ico { color: #fff; filter: drop-shadow(1px 1px 0 #7a0f0a); }
@keyframes xpad-border-red { 0%, 100% { border-color: #fff; } 50% { border-color: #8f1109; } }

/* barra di scorrimento delle miniature sempre visibile, in stile XP, anche con poche diapositive */
.crt-strip { scrollbar-color: #c1d2ee #ece9d8; }
@supports selector(::-webkit-scrollbar) {
  .crt-strip { scrollbar-width: auto; scrollbar-color: auto; }
  .crt-strip::-webkit-scrollbar { height: 14px; }
  .crt-strip::-webkit-scrollbar-track { background: #ece9d8; border: 1px solid #c5d1ea; border-radius: 7px; }
  .crt-strip::-webkit-scrollbar-thumb { background: linear-gradient(#e4ecfb, #b6caf0); border: 1px solid #7f9db9; border-radius: 7px; }
  .crt-strip::-webkit-scrollbar-thumb:hover { background: linear-gradient(#f3f7ff, #9fb9ec); }
}

/* scelta tra le sezioni di un progetto (Homichi): icone grandi come le cartelle */
.crt-tile--sec { width: 150px; }
.crt-up { display: inline-block; margin: 0 0 10px; color: var(--xp-link); font-size: .9em; text-decoration: none; }
.crt-up:hover, .crt-up:focus-visible { color: #428eff; text-decoration: underline; outline: none; }
.crt-soon { padding: 12px 14px; color: #333; background: #ffffe1; border: 1px solid #000; }


/* funzioni da segnalare nel testo: "Titolo:: testo" */
.crt-feat { padding-left: 10px; border-left: 3px solid var(--xp-sel); }
.crt-feat b { color: var(--xp-link); }

/* browser XP con il sito vero dentro (sezione Sito web di Homichi) */
.crt-gallery--site { justify-content: stretch; }
.xp-ie { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--xp-face); border: 1px solid #7f9db9; font-family: var(--xp-font); }
.xp-ie-bar { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #aca899; }
.xp-ie-addr-l { color: #6d6a5c; font-size: .85em; }
.xp-ie-addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 6px; font-size: .9em; background: #fff; border: 1px solid var(--xp-line); }
.xp-ie-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-ie-ico { flex: none; width: 16px; height: 16px; }
.xp-ie-btn { margin: 0; padding: 2px 10px; font: inherit; font-size: .85em; color: #000; text-decoration: none; white-space: nowrap; cursor: pointer;
  background: linear-gradient(#fff, #ece9d8 85%, #d6d0c0); border: 1px solid #003c74; border-radius: 3px; }
.xp-ie-btn:hover, .xp-ie-btn:focus-visible { background: linear-gradient(#fff, #fff0cf 85%, #f8b330); outline: none; box-shadow: inset 0 0 0 1px #f9c864; }
.xp-ie-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; border: 2px solid; border-color: #7f7f7f #fff #fff #7f7f7f; }
.xp-ie-view iframe { position: absolute; top: 0; left: 0; border: 0; background: #fff; transform-origin: 0 0; }
.xp-ie-status { flex: none; display: flex; align-items: center; gap: 10px; padding: 2px 8px; font-size: .8em; color: #333; border-top: 1px solid #aca899; }
.xp-ie-st { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-ie-prog { flex: none; width: 110px; height: 11px; background: #fff; border: 1px solid #7f9db9; }
.xp-ie-prog i { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, #2fd048 0 7px, transparent 7px 9px); }
.xp-ie-zone { flex: none; padding-left: 10px; border-left: 1px solid #aca899; }

/* schermata di caricamento da vecchio sito web */
.xp-ie-load { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #fff; transition: opacity .35s ease; }
.xp-ie-load.is-off { opacity: 0; pointer-events: none; }
.xp-ie-box { width: min(86%, 380px); text-align: center; color: #000; }
.xp-ie-msg { min-height: 1.4em; margin-bottom: 10px; font-size: .95em; }
.xp-ie-blocks { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; padding: 3px; background: #fff; border: 2px solid #7f9db9; border-radius: 4px; }
.xp-ie-blocks i { height: 14px; background: #e8eef8; border-radius: 1px; }
.xp-ie-blocks i.is-on { background: linear-gradient(#a7f0b4, #2fd048 55%, #1fa536); }
.xp-ie-sub { margin-top: 10px; font-size: .8em; color: #666; }

@media (max-width: 860px) {
  .xp-ie { flex: none; }
  .xp-ie-view { flex: none; height: 60vh; }
}

/* scorciatoie per saltare tra le sezioni di un libro: menu nella barra, si apre verso l'alto */
.crt-book-ui { flex-wrap: wrap; row-gap: 6px; }
.crt-jm { position: relative; }
.crt-jm-btn { margin: 0; height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font: inherit; font-size: .9em; color: #000; cursor: pointer;
  background: linear-gradient(#fff, #ece9d8 85%, #d6d0c0); border: 1px solid #003c74; border-radius: 3px; }
.crt-jm-btn:hover, .crt-jm-btn:focus-visible, .crt-jm-btn[aria-expanded="true"] { outline: none; background: linear-gradient(#fff, #fff0cf 85%, #f8b330); box-shadow: inset 0 0 0 1px #f9c864; }
.crt-jm-l { color: #6d6a5c; }
.crt-jm-cur { max-width: 15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.crt-jm-ar { font-size: .8em; }
.crt-jm-list {
  position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; z-index: 9; width: max-content; min-width: 270px; max-width: min(340px, 92vw);
  max-height: min(400px, calc(var(--jm-room, 380px))); overflow-y: auto; padding: 3px; background: #fff; border: 1px solid #7f9db9;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .45); text-align: left;
}
.crt-jm-list[hidden] { display: none; }
.crt-jm-item { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; width: 100%; margin: 0; padding: 5px 10px; font: inherit; font-size: .92em; color: #000; text-align: left; cursor: pointer; background: none; border: 0; }
.crt-jm-item b { flex: none; font-weight: 400; color: #6d6a5c; }
.crt-jm-item.is-sub { padding-left: 28px; font-size: .88em; }
.crt-jm-item.is-on > span { font-weight: 700; }
.crt-jm-item:hover, .crt-jm-item:focus-visible { outline: none; color: #fff; background: var(--xp-sel); }
.crt-jm-item:hover b, .crt-jm-item:focus-visible b { color: #dbe6ff; }

/* zoom nella barra del libro: meno, percentuale (clic = tutta la pagina), piu */
.crt-zm { display: inline-flex; align-items: center; gap: 4px; }
.crt-zm-pct { margin: 0; min-width: 52px; height: 34px; padding: 0 6px; font: inherit; font-size: .85em; color: #000; cursor: pointer;
  background: rgba(236, 233, 216, .94); border: 1px solid #aca899; border-radius: 3px; }
.crt-zm-pct:hover, .crt-zm-pct:focus-visible { outline: none; background: #fff0cf; border-color: #f9c864; }

/* pagine ingrandite: prendono il posto del libro, la barra sotto resta la stessa */
.crt-zoom { position: absolute; left: 0; right: 0; top: 0; bottom: 50px; z-index: 4; display: flex; }
.crt-zoom-scroll { flex: 1; min-height: 0; display: flex; overflow: auto; padding: 12px; cursor: grab; scrollbar-color: #c1d2ee #ece9d8; }
.crt-zoom-scroll.is-drag { cursor: grabbing; user-select: none; }
.crt-zoom-spread { display: flex; margin: auto; box-shadow: 0 4px 18px rgba(0, 0, 0, .55); }
.crt-zoom-spread img { display: block; flex: none; width: auto; max-width: none; background: #fff; }
/* nei libri l'adesivo sta in alto: in basso ci sono i comandi, e il contatore ha uno sfondo per leggersi sopra la pagina */
/* l'adesivo ora sta nella riga della didascalia, sopra le frecce */
.crt-cap .crt-tag { position: static; flex: none; }
.crt-ctrl .crt-cap { align-items: center; flex-wrap: wrap; gap: 8px; }
.crt-bk-n { color: #000; padding: 3px 8px; background: rgba(236, 233, 216, .94); border: 1px solid #aca899; border-radius: 3px; }
/* le immagini dello zoom stanno dentro .crt-stage: annulla la regola che le sovrappone a tutto il riquadro */
.crt-stage .crt-zoom-spread img { position: static; inset: auto; width: auto; height: auto; max-width: none; object-fit: fill; background: #fff; }
.crt-thumb--img { position: relative; }

/* comandi del video con tempo "vero" (velocita applicata): barra in basso, il tag sta in alto */
.crt-vc { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 18px 12px 8px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); font-size: .85em; }
.crt-vc-btn { margin: 0; width: 30px; height: 30px; padding: 5px; color: #fff; cursor: pointer; background: none; border: 0; border-radius: 3px; }
.crt-vc-btn svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.crt-vc-btn:hover, .crt-vc-btn:focus-visible { outline: none; background: rgba(255, 255, 255, .22); }
.crt-vc-time { flex: none; min-width: 7.2em; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.crt-vc-seek { flex: 1; min-width: 60px; height: 14px; margin: 0; cursor: pointer; accent-color: #3d95ff; }
.crt-stage:fullscreen { background: #000; }

/* timestamp del video: tacche sulla barra e menu dei capitoli con anteprime */
.crt-vc-seekw { position: relative; flex: 1; display: flex; align-items: center; min-width: 60px; }
.crt-vc-seekw .crt-vc-seek { width: 100%; }
.crt-vc-ticks { position: absolute; left: 7px; right: 7px; top: 50%; height: 0; }
.crt-vc-ticks i { position: absolute; top: -7px; width: 10px; height: 10px; margin-left: -5px; cursor: pointer; background: #ffd23f; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .7); transition: transform .12s ease; }
.crt-vc-ticks i:hover { transform: scale(1.35); background: #fff; }
.crt-vm { position: relative; flex: none; }
.crt-vm-btn { margin: 0; max-width: 15em; height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font: inherit; font-size: .95em; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap;
  background: linear-gradient(#5aa5ff, #1a62dc 55%, #0a46b5); border: 1px solid #fff; border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .55); text-shadow: 0 1px 1px #0a2a7a; }
.crt-vm-btn .crt-vm-cur { overflow: hidden; text-overflow: ellipsis; }
.crt-vm-btn:hover, .crt-vm-btn:focus-visible, .crt-vm-btn[aria-expanded="true"] { outline: none; filter: brightness(1.12); }
.crt-vm-list { position: absolute; right: -8px; bottom: calc(100% + 8px); z-index: 9; width: 330px; max-width: min(330px, 86vw); overflow-y: auto; padding: 0 0 4px;
  background: #fff; border: 1px solid #0a46b5; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); color: #000; }
.crt-vm-list[hidden] { display: none; }
.crt-vm-head { position: sticky; top: 0; z-index: 1; padding: 6px 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px #0a2a7a; background: linear-gradient(#3d95ff, #0a5de6 50%, #0a3fb8); }
.crt-vm-item { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 4px 10px; font: inherit; color: #000; text-align: left; cursor: pointer; background: none; border: 0; border-bottom: 1px solid #ece9d8; }
.crt-vm-item:last-child { border-bottom: 0; }
.crt-vm-th { position: relative; flex: none; width: 72px; height: 41px; overflow: hidden; background: #1b2233; border: 1px solid #7f9db9; border-radius: 3px; }
.crt-vm-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.crt-vm-th em { position: absolute; left: 3px; top: 3px; min-width: 18px; height: 18px; padding: 0 4px; font: 700 .8em/18px var(--xp-font); font-style: normal; text-align: center; color: #fff; background: #e0472b; border: 1px solid #fff; border-radius: 9px; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.crt-vm-name { flex: 1; min-width: 0; font-size: .95em; line-height: 1.2; }
.crt-vm-item b { flex: none; padding: 1px 7px; font-weight: 400; font-size: .85em; color: #1d4a99; background: #e8f0fd; border-radius: 9px; font-variant-numeric: tabular-nums; }
.crt-vm-item.is-on { background: #eaf2ff; }
.crt-vm-item.is-on .crt-vm-name { font-weight: 700; color: #0a46b5; }
.crt-vm-item.is-on .crt-vm-th { border-color: #0a46b5; box-shadow: 0 0 0 2px #7fb0ff; }
.crt-vm-item:hover, .crt-vm-item:focus-visible { outline: none; background: #fff0cf; }
.crt-vm-item:hover .crt-vm-th, .crt-vm-item:focus-visible .crt-vm-th { border-color: #f9c864; }

/* Homi animato: striscia trasparente con il palco dell'app Flutter, sopra il contenuto; i clic passano sotto */
.crt-homi-layer { position: absolute; z-index: 6; pointer-events: none; overflow: hidden; }
.crt-homi-box { position: absolute; overflow: hidden; pointer-events: none; }
.crt-homi-box iframe { position: absolute; left: 0; border: 0; background: transparent; color-scheme: light; transform-origin: 0 0; pointer-events: none; }
.homi-dragging, .homi-dragging * { user-select: none !important; cursor: grabbing !important; }

/* fumetto di Homi: balloon tooltip di Windows XP, con la codina verso la sua testa */
.crt-xtip { position: absolute; z-index: 2; pointer-events: auto; width: max-content; max-width: min(260px, 90%); padding: 6px 10px 8px 10px;
  font: 400 12px/1.35 var(--xp-font); color: #000; background: #ffffe1; border: 1px solid #000; border-radius: 8px; box-shadow: 3px 3px 5px rgba(0, 0, 0, .35); }
.crt-xtip[hidden] { display: none; }
.crt-xtip::before, .crt-xtip::after { content: ''; position: absolute; left: var(--tx, 50%); width: 0; height: 0; margin-left: -8px; }
.crt-xtip::before { bottom: -10px; border: 8px solid transparent; border-top: 10px solid #000; border-bottom: 0; }
.crt-xtip::after { bottom: -8px; border: 7px solid transparent; border-top: 9px solid #ffffe1; border-bottom: 0; margin-left: -7px; }
.crt-xtip.is-below::before { bottom: auto; top: -10px; border: 8px solid transparent; border-bottom: 10px solid #000; border-top: 0; }
.crt-xtip.is-below::after { bottom: auto; top: -8px; border: 7px solid transparent; border-bottom: 9px solid #ffffe1; border-top: 0; }
.crt-xtip-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 3px; }
.crt-xtip-h b { font-size: 12px; }
.crt-xtip-x { margin: -2px -6px 0 0; padding: 0 5px; font: 700 14px/1 var(--xp-font); color: #333; cursor: pointer; background: none; border: 0; }
.crt-xtip-x:hover, .crt-xtip-x:focus-visible { color: #c00; outline: none; }
.crt-xtip-t { overflow-wrap: anywhere; }
.crt-gal--plain .crt-gal-tile, .crt-gal--plain .crt-gal-tile:hover, .crt-gal--plain .crt-gal-tile:focus-visible { border: 0; box-shadow: none; background: transparent; }

/* tag NEW: sulle schede dei progetti nuovi e nella lista laterale (stessa stella rossa dei banner) */
.crt-new { position: absolute; left: -6px; top: -6px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; font: 900 .62em/1 'Arial Black', Impact, sans-serif; color: #fff; text-shadow: 1px 1px 0 #900; background: #e60012; transform: rotate(-14deg);
  clip-path: polygon(50% 0, 61% 18%, 80% 8%, 78% 30%, 100% 36%, 84% 52%, 98% 70%, 76% 72%, 74% 94%, 56% 82%, 40% 100%, 36% 78%, 14% 84%, 22% 62%, 0 50%, 20% 38%, 12% 16%, 34% 22%); animation: xpad-spin 1.2s steps(1) infinite; pointer-events: none; }
.crt-thumb--img { position: relative; overflow: visible; }
.crt-newtag { margin-left: auto; padding: 0 4px; font: 900 .62em/1.5 'Arial Black', Impact, sans-serif; font-style: normal; color: #fff; background: #e60012; border-radius: 2px; letter-spacing: .02em; flex: none; }
.crt-side-p { display: flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .crt-new, .crt-newtag { animation: none; } }
/* progetto protetto: fumetto di avviso di XP sopra la copertina, triangolo giallo che lampeggia */
.crt-warn { position: absolute; left: 50%; top: 8px; translate: -50% 0; z-index: 3; display: flex; align-items: center; gap: 6px; width: max-content; max-width: calc(100% - 12px);
  padding: 5px 8px; font: 11px/1.25 Tahoma, Verdana, sans-serif; color: #1d1b19; text-align: left; background: #ffffe1; border: 1px solid #1d1b19; border-radius: 6px; box-shadow: 2px 2px 4px rgba(0, 0, 0, .35); pointer-events: none; }
.crt-warn::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: #ffffe1; border: solid #1d1b19; border-width: 0 1px 1px 0; transform: translateX(-50%) rotate(45deg); }
.crt-warn-ico { width: 20px; height: 18px; flex: none; animation: crt-warn-blink 1s steps(1) infinite; }
@keyframes crt-warn-blink { 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .crt-warn-ico { animation: none; } }

/* Homi: la pagina resta coperta da una schermata di caricamento finche l'app animata e pronta */
.crt-homi-wait { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: #fff; pointer-events: auto; transition: opacity .35s ease; }
.crt-homi-wait.is-off { opacity: 0; pointer-events: none; }

/* torna indietro (dalle sottosezioni di Homichi): bottone XP ben visibile */
.crt-up { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 4px 12px 4px 8px; font-weight: 700; font-size: .95em; color: #000; text-decoration: none; background: linear-gradient(#fff, #ece9d8 85%, #d6d0c0); border: 1px solid #003c74; border-radius: 3px; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.crt-up-a { flex: none; width: 20px; height: 20px; display: grid; place-items: center; font-size: 9px; color: #fff; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8ee27a, #2fa530 70%); box-shadow: inset 0 0 0 1px rgba(0, 60, 0, .5); }
.crt-up:hover, .crt-up:focus-visible { color: #000; text-decoration: none; background: linear-gradient(#fff, #fff0cf 85%, #f8b330); box-shadow: inset 0 0 0 1px #f9c864; outline: none; }
.crt-up.crt-up--landing { align-self: flex-start; margin: 0 0 14px; }
/* schermata della password: il tasto indietro in alto a sinistra, sopra il monitor; l'avviso dentro la finestra, sotto Sblocca */
.crt-up.crt-up--lock { position: absolute; left: 14px; top: 14px; z-index: 2; margin: 0; }
.crt-warn.crt-warn--lock { position: static; translate: none; width: auto; max-width: none; margin: 14px 0 0; font-size: 12px; box-shadow: none; }
.crt-warn.crt-warn--lock::after { display: none; }   /* Homichi (progetto a sezioni): torna alla cartella */

/* ---------- progetto protetto da password: il monitor della home dietro una finestra XP ---------- */
.crt-lock {
  position: relative;
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 12px;
  background: #3a6ea5 no-repeat center / min(78%, 520px) auto;
  background-color: #3a6ea5;
}
.crt-lock-box {
  position: relative;
  width: min(420px, 100%);
  background: var(--xp-face, #ece9d8);
  border: 1px solid #0831d9;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color: #000;
  overflow: hidden;
}
.crt-lock-bar { padding: 5px 10px; color: #fff; font-weight: 700; background: linear-gradient(180deg, #0a5fe6, #0346c4 60%, #0a3fae); text-shadow: 1px 1px 0 #0b2b7a; }
.crt-lock-in { display: flex; gap: 14px; padding: 16px 16px 18px; align-items: flex-start; }
.crt-lock-ico { flex: none; width: 48px; height: 48px; }
.crt-lock-t { margin: 0 0 6px; font-size: 1.1em; }
.crt-lock-in p { margin: 0 0 10px; line-height: 1.35; }
.crt-lock-row { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.crt-lock-pw { flex: 1; min-width: 0; padding: 4px 6px; font: inherit; border: 1px solid #7f9db9; background: #fff; color: #000; user-select: text; -webkit-user-select: text; }
.crt-lock-pw:focus { outline: 1px solid #0a5fe6; }
.crt-lock-err { color: #c00; }
.crt-lock-ok { cursor: pointer; }
.crt-lock-box.is-shake { animation: crt-lock-shake .35s; }
@keyframes crt-lock-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
@media (max-width: 600px) { .crt-lock-in { flex-direction: column; align-items: center; text-align: center; } .crt-lock-row { width: 100%; } }
.crt-thumb--lock { background: #3a6ea5; }
.crt-thumb--lock img { padding: 8%; box-sizing: border-box; }
.crt-lock-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 34%; max-width: 72px; aspect-ratio: 1; display: grid; place-items: center; background: rgba(255, 255, 255, .88); border: 2px solid #0a3fae; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); pointer-events: none; }
.crt-lock-mark .crt-lock-ico { width: 62%; height: 62%; }
.crt-lock-mini { width: .9em; height: .9em; margin-right: .3em; vertical-align: -.08em; }

/* cartelle XP vere (Sleek XP Basic, Hopstarter): chiusa, aperta al passaggio del cursore */
.crt-folder--xp { position: relative; display: block; }
.crt-folder--xp svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crt-folder--xp .crt-folder-o { opacity: 0; }
.crt-tile:hover .crt-folder--xp .crt-folder-c, .crt-tile:focus-visible .crt-folder--xp .crt-folder-c { opacity: 0; }
.crt-tile:hover .crt-folder--xp .crt-folder-o, .crt-tile:focus-visible .crt-folder--xp .crt-folder-o { opacity: 1; }
.crt-tile:hover .crt-folder--xp, .crt-tile:focus-visible .crt-folder--xp { filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .25)); }
