/* ==========================================================================
   Portfolio di Amir — stili
   Indice:
     1. Base e colori
     2. Camera (foto della stanza) e pin
     3. Barra di navigazione, bordi, cursore e finestra "Chi sono"
     4. Scena a schermo intero e scene a lista (libreria, giradischi, disegni)
     5. Schermi verdi (pc e iPad)
     6. Quaderno (feedback e disegno)
     7. Layout mobile (classe body.mob / .fit.m)
   Classi di stato sul <body>: z = camera in zoom, so = scena aperta,
   mob = layout mobile, fc = mouse preciso, dr = si sta disegnando
   ========================================================================== */
/* ---------- 1. Base e colori ---------- */
:root {
  --blue: #0a35ff;
  --pink: #ffb3d9;
  --cream: #fff3e6;
  --red: #ff4a3d;
  --ink: #14101c;
  box-sizing: border-box;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #070416;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* ---------- 2. Camera e pin ---------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
#stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 45%,
    transparent 50%,
    rgba(10, 20, 110, 0.55)
  );
}
#world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transition:
    transform 0.7s ease-out,
    filter 0.8s;
}
#world.drag {
  transition: none;
}
.z #world {
  filter: blur(9px);
  transition:
    transform 1s cubic-bezier(0.65, 0, 0.25, 1),
    filter 0.8s;
}
#world > img,
#world > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  filter: saturate(1.15) contrast(1.05);
}
.pin {
  position: absolute;
  transform: translate(
    calc(-50% + var(--mx, 0px)),
    calc(-50% + var(--my, 0px))
  );
  background: none;
  border: 0;
  padding: 0;
  line-height: 0;
}
.sb {
  width: 46px;
  height: 46px;
  animation: spin 14s linear infinite;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
    drop-shadow(0 3px 8px rgba(10, 53, 255, 0.5));
  transition: transform 0.3s;
}
.pl {
  display: none;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
  background: #fff;
  color: var(--blue);
  border: 3px solid var(--blue);
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--pink);
  animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.pl img {
  width: 22px;
  height: 22px;
}
@keyframes pop {
  from {
    transform: scale(0.6) rotate(-6deg);
  }
  to {
    transform: none;
  }
}
.pin:hover .sb,
.pin:focus-visible .sb {
  display: none;
}
.pin:hover .pl,
.pin:focus-visible .pl {
  display: flex;
  border-width: 4.5px;
}
@media (hover: none) {
  .pin .sb {
    display: none;
  }
  .pin .pl {
    display: flex;
    padding: 0;
    width: 44px;
    height: 44px;
    justify-content: center;
    border-width: 3px;
    animation: none;
  }
  .pin .pl span {
    display: none;
  }
  .pin .pl img {
    width: 24px;
    height: 24px;
  }
}
.z .pin {
  opacity: 0;
  pointer-events: none;
}
.pin:hover {
  z-index: 2;
}
/* ---------- 3. Navigazione, bordi, cursore, "Chi sono" ---------- */
#nav {
  position: fixed;
  z-index: 40;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 4px 4px 0 var(--blue);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition:
    opacity 0.4s,
    transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
}
body.so #nav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
#nav .sep {
  width: 2px;
  height: 22px;
  background: var(--ink);
  opacity: 0.25;
  margin: 0 3px;
}
#back {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  margin-top: -19px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--blue);
  display: grid;
  place-items: center;
  padding: 0;
  transition:
    transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1),
    background 0.2s;
}
#back:hover {
  transform: translateX(-3px) scale(1.08);
  background: #fff;
}
.np {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-width: 36px;
  justify-content: center;
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.2s;
}
.np img {
  width: 20px;
  height: 20px;
}
.np span {
  display: none;
}
.np:hover {
  background: var(--pink);
  transform: translateY(-1px);
}
.np.on {
  background: var(--blue);
  color: #fff;
  padding: 0 13px 0 9px;
}
.np.on img {
  filter: brightness(0) invert(1);
}
.np.on span {
  display: inline;
}
#brand {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  padding: 6px 10px;
  color: #fff;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  transition:
    transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1),
    text-shadow 0.3s,
    opacity 0.4s;
}
#brand:hover {
  transform: translateX(-50%) translateY(2px) rotate(-3deg) scale(1.1);
  text-shadow:
    0 3px 0 var(--blue),
    0 2px 14px rgba(0, 0, 0, 0.4);
}
#dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 98;
  pointer-events: none;
  border-radius: 50%;
  display: none;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(20, 16, 28, 0.5);
}
.dr #dot {
  display: block;
}
.dr #c2 {
  opacity: 0 !important;
}
.fc #cv {
  cursor: none !important;
}
.z #brand,
.z #grad {
  opacity: 0;
  pointer-events: none;
}
.edge {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s;
}
.edge.l {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 53, 255, 0.3),
    rgba(10, 53, 255, 0)
  );
}
.edge.r {
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(10, 53, 255, 0.3),
    rgba(10, 53, 255, 0)
  );
}
.eb {
  position: absolute;
  top: 50%;
  margin-top: -22px;
  left: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(10, 53, 255, 0.7);
  pointer-events: none;
  transition: transform 0.15s;
}
.edge.r .eb {
  left: auto;
  right: 6px;
}
.eb:active {
  background: rgba(255, 255, 255, 0.4);
}
body.mob:not(.z) .edge.on {
  opacity: 1;
}
body.mob:not(.z) .edge.on .eb {
  pointer-events: auto;
}
body.mob:not(.z) .edge.l.on .eb {
  animation: nl 2.4s ease-in-out infinite;
}
body.mob:not(.z) .edge.r.on .eb {
  animation: nr 2.4s ease-in-out infinite;
}
@keyframes nl {
  50% {
    transform: translateX(-4px);
  }
}
@keyframes nr {
  50% {
    transform: translateX(4px);
  }
}
#grad {
  position: fixed;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    62deg,
    rgba(10, 53, 255, 0.7) 0%,
    rgba(10, 53, 255, 0.28) 16%,
    rgba(10, 53, 255, 0) 38%
  );
  transition: opacity 0.4s;
}
#c2 {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 99;
  margin: -23px 0 0 -23px;
  width: 46px;
  height: 46px;
  border: 2.5px solid var(--blue);
  border-radius: 50%;
  opacity: 0;
  transition:
    width 0.25s,
    height 0.25s,
    margin 0.25s,
    background 0.25s,
    opacity 0.3s;
}
.fc.mv #c2 {
  opacity: 1;
}
.ch #c2 {
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  background: rgba(255, 179, 217, 0.45);
}
.ttl {
  display: none !important;
}
#sc {
  transition: opacity 0.25s;
}
#scene.sw #sc {
  opacity: 0;
}
#me {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  background: rgba(7, 4, 22, 0.55);
  backdrop-filter: blur(6px);
  padding: 16px;
}
#me.on {
  display: grid;
}
#me .cd {
  position: relative;
  width: min(600px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: 10px 10px 0 var(--blue);
  padding: 26px 28px 24px;
  animation: pop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1);
}
#me .x {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--pink);
  font-size: 16px;
  padding: 0;
}
#me h2 {
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 44px;
  line-height: 1;
}
#me h2 img {
  width: 36px;
  height: 36px;
}
#me .tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
#me .tags b {
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  padding: 4px 13px;
  transform: rotate(-2deg);
  font-size: 15px;
}
#me .tags span {
  color: var(--blue);
  font-weight: 900;
  font-size: 22px;
}
#me p {
  line-height: 1.45;
  margin: 0 0 6px;
}
#me h3 {
  margin: 18px 0 8px;
  color: var(--blue);
  font-size: 19px;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 3px;
}
#me ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
#me li {
  margin: 0 0 9px;
  padding-left: 24px;
  position: relative;
  line-height: 1.25;
}
#me li::before {
  content: "✦";
  color: var(--blue);
  position: absolute;
  left: 2px;
  top: 0;
}
#me li b,
#me p b {
  display: block;
  color: var(--ink);
}
#me li small {
  color: var(--blue);
  font-size: 13px;
}
#me .ch2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  align-items: center;
}
#me .ch2 em {
  flex: 0 0 100%;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  color: var(--blue);
}
#me .ch2 span {
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 11px;
  font-size: 13px;
  font-weight: 700;
}
#me .ch2.soft span {
  background: #fff;
  border-color: var(--blue);
  color: var(--blue);
}
#me .lk {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#me .lk a {
  background: #fff;
  color: var(--blue);
  border: 3px solid var(--blue);
  border-radius: 999px;
  padding: 5px 15px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--pink);
}
.cta {
  display: inline-block;
  margin-top: 1em;
  background: var(--pink);
  color: var(--ink);
  border: 0.14em solid var(--ink);
  border-radius: 999px;
  padding: 0.4em 1.1em;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0.2em 0.2em 0 var(--blue);
  font-size: 0.9em;
  transition: transform 0.2s;
}
.cta:hover {
  transform: rotate(-2deg) scale(1.05);
}
.fr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
/* scena */
/* ---------- 4. Scena a schermo intero e scene a lista ---------- */
#scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #070416;
  clip-path: circle(0 at 50% 50%);
  transition: clip-path 0.9s cubic-bezier(0.6, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
}
#scene.on {
  clip-path: circle(150% at 50% 50%);
  pointer-events: auto;
}
.bd {
  position: absolute;
  inset: 0;
  transition:
    filter 0.9s,
    transform 0.9s;
}
.bd.bl {
  filter: blur(16px);
  transform: scale(1.08);
}
.bd img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.b {
  opacity: 0;
  transition: opacity 1.1s;
}
.b.on {
  opacity: 1;
}
.veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 53, 255, 0.5),
    rgba(255, 179, 217, 0.38)
  );
  opacity: 0;
  transition: opacity 0.9s;
}
.veil.on {
  opacity: 1;
}
.fit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1456px;
  height: 819px;
  color: var(--ink);
}
.fit.fade {
  opacity: 0;
  transform-origin: 50% 50%;
  transition: opacity 0.7s;
}
.fit.in {
  opacity: 1;
}
.fit > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ttl {
  position: absolute;
  left: 428px;
  top: 22px;
  width: 600px;
  text-align: center;
  font-size: 50px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
  text-shadow:
    0 4px 0 var(--blue),
    0 0 24px rgba(0, 0, 0, 0.4);
}
.ttl i {
  font-weight: 400;
  color: var(--pink);
}
.list {
  position: absolute;
  left: 30px;
  top: 112px;
  width: 390px;
  height: 560px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 30px;
  box-shadow: 9px 9px 0 var(--blue);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lh {
  flex: none;
  padding: 18px 18px 10px;
  background: var(--cream);
  border-bottom: 2.5px solid var(--ink);
  z-index: 2;
}
.search {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  height: 46px;
  padding: 0 16px;
}
.search input {
  border: 0;
  outline: 0;
  flex: 1;
  font: inherit;
  font-size: 15px;
  background: none;
  min-width: 0;
  color: var(--ink);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chip {
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 11px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.2s;
}
.chip:hover {
  transform: rotate(-3deg) scale(1.06);
}
.chip.on {
  background: var(--blue);
  color: #fff;
}
#items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 8px;
}
#items::-webkit-scrollbar {
  width: 8px;
}
#items::-webkit-scrollbar-thumb {
  background: var(--ink);
  border-radius: 8px;
}
.item {
  display: flex;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 8px;
  margin-bottom: 8px;
  transition:
    transform 0.2s,
    background 0.2s;
}
.item:hover {
  transform: translateX(5px) rotate(-0.6deg);
  background: rgba(255, 179, 217, 0.45);
}
.item.sel {
  background: #fff;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
}
.th {
  flex: 0 0 100px;
  height: 136px;
  background: var(--pink);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
}
.gir .th {
  flex-basis: 112px;
  height: 112px;
}
.tx {
  min-width: 0;
  flex: 1;
}
.tx b {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.tx small {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}
.tx em {
  font-style: normal;
  font-size: 13px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover {
  position: absolute;
  display: grid;
  place-items: center;
  background: var(--pink);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: 11px 11px 0 var(--blue);
  left: 508px;
  top: 112px;
  width: 440px;
  height: 590px;
  overflow: hidden;
}
.gir .cover {
  left: 493px;
  top: 150px;
  width: 470px;
  height: 470px;
}
.cover img {
  width: 46%;
  animation: spin 18s linear infinite;
}
.cover::after {
  content: "copertina";
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 14px;
  font-weight: 700;
  transform: rotate(4deg);
}
.player {
  position: absolute;
  left: 493px;
  top: 644px;
  width: 470px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
  box-shadow: 6px 6px 0 var(--blue);
}
.player #pl {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--pink);
  padding: 0;
}
.player #pl img {
  width: 100%;
  height: 100%;
  display: block;
}
.player .vb {
  flex: none;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  padding: 0;
}
.player .vb img {
  width: 100%;
  display: block;
}
.player input {
  flex: 1;
  accent-color: var(--blue);
}
.dt {
  position: absolute;
  left: 1000px;
  top: 210px;
  width: 424px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 22px 24px;
  box-shadow: 9px 9px 0 var(--pink);
}
.dt h2 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -0.03em;
}
.rt {
  display: flex;
  gap: 2px;
  flex: none;
  align-items: center;
}
.rt img {
  width: 22px;
  height: 22px;
}
.fit.m .rt img {
  width: 18px;
  height: 18px;
}
.dt h2 b {
  color: var(--blue);
  white-space: nowrap;
}
.dt p {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
/* ---------- 5. Schermi verdi (pc e iPad) ---------- */
.gs {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  overflow: hidden;
  color: #fff;
  container-type: inline-size;
}
.u {
  position: absolute;
  inset: 0;
  font-size: var(--fs);
  font-weight: 700;
}
.wall {
  background:
    radial-gradient(circle at 85% 15%, var(--pink), transparent 50%),
    linear-gradient(155deg, var(--blue), #4d6bff 60%, #ff9fcf);
}
.desk {
  width: 100%;
  height: 100%;
  padding: 3.2em 1.4em 1em;
  display: flex;
  gap: 1.4em;
  align-content: flex-start;
  flex-wrap: wrap;
  position: relative;
}
@container (min-width:900px) {
  .desk {
    padding: 3.6em 3.6em;
    gap: 2em;
  }
}
.menubar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.3em;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.3em;
  font-size: 0.75em;
}
.fo,
.app {
  background: none;
  border: 0;
  display: grid;
  justify-items: center;
  gap: 0.5em;
  color: #fff;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.fo:hover,
.app:hover {
  transform: translateY(-6px) rotate(-3deg) scale(1.06);
}
.fo {
  width: 5.6em;
  font-size: 0.9em;
}
.fi {
  position: relative;
  width: 4.7em;
  height: 4.7em;
  display: block;
}
.fi img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s;
}
.fi .o {
  opacity: 0;
}
.fo:hover .c {
  opacity: 0;
}
.fo:hover .o {
  opacity: 1;
}
.win {
  position: absolute;
  inset: 2.3em 0 0;
  background: #fff;
  color: var(--ink);
  overflow: auto;
  animation: win 0.4s cubic-bezier(0.3, 1.3, 0.5, 1);
  font-weight: 400;
}
@keyframes win {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
}
.dots {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 0.4em;
  padding: 0.4em 0.6em;
  background: #fff;
  z-index: 2;
  border: 0;
  border-radius: 0 0 0.6em 0;
}
.dots i {
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background: #f25c54;
}
.dots i + i {
  background: #f7b731;
}
.dots i + i + i {
  background: #5ac846;
}
.pf {
  background: var(--blue);
}
.pf .top {
  position: absolute;
  top: 2.1em;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 1em;
  justify-content: center;
  padding: 0 0.5em;
  font-size: max(0.55em, 9px);
  color: #fff;
  opacity: 0.9;
}
.pf .card {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 5.6em;
  bottom: -1em;
  background: #f5f8ff;
  border-radius: 0.7em;
  text-align: center;
  padding-top: 1.2em;
  overflow: hidden;
}
.pf .card a {
  margin: 0 0.35em;
  color: var(--blue);
  text-decoration: underline;
  font-size: 0.7em;
}
.pf h1 {
  margin: 2.4em 0 0;
  font-size: 3.4em;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #0f1426;
  font-weight: 900;
}
.pf h1 i {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}
.pf p {
  margin: 0.2em 0 0;
  font-weight: 800;
  font-size: 0.8em;
  color: #0f1426;
}
@container (min-width:900px) {
  .pf .top {
    top: 0.5em;
    padding-left: 5em;
  }
  .pf .card {
    left: 19%;
    right: 19%;
    top: 2.2em;
  }
  .pf h1 {
    margin: 1.6em 0 0;
    font-size: 5.45em;
  }
  .pf p {
    font-size: 1em;
  }
}
.it {
  background: linear-gradient(#fff 70%, #fbe3df);
  padding: 3em 1.1em 1em;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}
.it h3 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 400;
}
.it em {
  position: absolute;
  right: 1em;
  top: 2.6em;
  font-style: normal;
  font-size: 0.8em;
}
.it h1 {
  margin: 0;
  font-size: 3em;
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 800;
}
.it .pics {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  margin-top: 0.8em;
}
.it .ph {
  flex: 1 1 9em;
  height: 7em;
  border-radius: 1em;
  background: #d9d9d9;
}
@container (min-width:900px) {
  .it {
    padding: 3.4em 2.5em 1em;
  }
  .it h1 {
    font-size: 8em;
  }
  .it .ph {
    height: 11.8em;
    border-radius: 1.4em;
  }
  .it em {
    top: 4.4em;
    font-size: 0.9em;
  }
  .it h3 {
    font-size: 2em;
  }
}
.ed {
  padding: 3.2em 1.2em;
}
.ed h1 {
  margin: 0 0 0.3em;
  font-size: 2.4em;
}
.ed p {
  margin: 0;
}
@container (min-width:900px) {
  .ed {
    padding: 4em 3.6em;
  }
  .ed h1 {
    font-size: 2.9em;
  }
}
.pad {
  width: 100%;
  height: 100%;
  padding: 3em 1.4em 1em;
  display: flex;
  gap: 1.4em;
  align-content: flex-start;
  flex-wrap: wrap;
  position: relative;
}
@container (min-width:900px) {
  .pad {
    padding: 3.2em 2.6em;
    gap: 2em;
  }
}
.app {
  width: 5.6em;
  font-size: 0.9em;
  text-align: center;
}
.app i {
  width: 4.7em;
  height: 4.7em;
  border-radius: 1.1em;
  background: linear-gradient(#ff4a3d, #ffb3d9);
  border: 0.14em solid var(--ink);
  box-shadow: 0.23em 0.23em 0 var(--ink);
  display: grid;
  place-items: center;
}
.app i::after {
  content: "✿";
  font-size: 2.2em;
  font-style: normal;
}
.sbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.2em;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.3em;
  font-size: 0.75em;
}
.rd {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #000;
}
.rd div {
  display: grid;
  place-items: center;
  font-size: 1.3em;
  color: #999;
}
.rd div:first-child {
  background: #fff;
  color: #bbb;
}
.rd div + div {
  background: #15122a;
}
@container (max-width:700px) {
  .rd {
    grid-template-columns: 1fr;
  }
  .rd div + div {
    display: none;
  }
}
.bar {
  position: absolute;
  left: 50%;
  bottom: 2em;
  transform: translateX(-50%);
  width: min(560px, 88%);
  display: flex;
  gap: 0.6em;
  align-items: center;
  background: rgba(10, 53, 255, 0.92);
  border-radius: 999px;
  padding: 0.45em 1em;
  color: #fff;
  font-size: 0.8em;
}
.bar input {
  flex: 1;
  accent-color: var(--pink);
}
.nv {
  position: absolute;
  top: 50%;
  left: 0.5em;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  border: 0.14em solid var(--ink);
  background: var(--pink);
  font-size: 1.4em;
  line-height: 1;
  transform: translateY(-50%);
  padding: 0;
}
.nv.r {
  left: auto;
  right: 0.5em;
}
.hm {
  position: absolute;
  left: 50%;
  bottom: 0.5em;
  transform: translateX(-50%);
  width: 6em;
  height: 0.5em;
  border-radius: 8px;
  border: 0;
  background: #fff;
  opacity: 0.85;
  padding: 0;
}
.side {
  position: absolute;
  left: 1100px;
  top: 235px;
  width: 320px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}
.side h2 {
  margin: 0 0 8px;
  font-size: 38px;
  letter-spacing: -0.03em;
}
/* ---------- 6. Quaderno ---------- */
.ov {
  position: absolute;
  color: var(--ink);
}
.fb {
  left: 330px;
  top: 338px;
  width: 268px;
  height: 245px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 7px 7px 0 var(--blue);
}
.fb textarea {
  width: 100%;
  height: 170px;
  border: 0;
  outline: 0;
  resize: none;
  font: inherit;
  font-size: 15px;
  background: none;
  color: var(--ink);
}
#send {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--pink);
  font-size: 18px;
}
.fbt {
  left: 330px;
  top: 290px;
  font-size: 32px;
  font-weight: 900;
  margin: 0;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 0 var(--blue);
}
#ok {
  left: 330px;
  top: 604px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 0 var(--blue);
}
#cv {
  position: absolute;
  left: 622px;
  top: 172px;
  width: 296px;
  height: 498px;
  touch-action: none;
}
.ov,
#cv,
.ar {
  opacity: 0;
  transition: opacity 0.7s;
}
.in2 .ov,
.in2 #cv,
.in2 .ar {
  opacity: 1;
}
.ar {
  position: absolute;
  left: 0;
  top: 0;
  width: 1456px;
  height: 819px;
  pointer-events: none;
}
#tl {
  left: 1190px;
  top: 300px;
  width: 225px;
  height: 280px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 7px 7px 0 var(--pink);
}
#tl > * {
  position: absolute;
}
#tl .ic {
  font-size: 30px;
  background: none;
  border: 0;
  padding: 0;
  line-height: 1;
  transform: translateX(-50%);
  top: 14px;
}
#tl .ic img {
  width: 30px;
  height: 30px;
  display: block;
}
#tl .ic.on {
  outline: 3px solid var(--blue);
  border-radius: 8px;
}
#tl input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 128px;
  width: 20px;
  top: 57px;
  transform: translateX(-50%);
  accent-color: var(--blue);
}
#tl .c {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  padding: 0;
  top: 222px;
  transform: translateX(-50%);
}
#tl .c.on {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
/* ---------- 7. Layout mobile ---------- */
.fit .nd {
  display: none;
}
.gbd {
  display: none;
}
body.mob .gbd {
  display: block;
}
body.mob .fit > img {
  display: none;
}
.fit.m {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none !important;
  padding: calc(env(safe-area-inset-top, 0px) + 76px) 14px
    calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.fit.m .nd {
  display: block;
}
.fit.m .ttl {
  position: absolute;
  left: 88px;
  right: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  width: auto;
  text-align: left;
  font-size: 30px;
  transform: rotate(-2deg);
}
.fit.m .list {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  flex: 1 1 0;
  min-height: 0;
  box-shadow: 6px 6px 0 var(--blue);
}
.cw {
  display: contents;
}
.arw,
.cnt {
  display: none;
}
#sx img {
  width: 18px;
  height: 18px;
  display: block;
}
#sx {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #444;
  min-width: 20px;
}
.fit.m .cw {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 0;
  min-height: 0;
}
.fit.m .cover {
  display: grid;
  position: relative;
  left: auto;
  top: auto;
  height: 100%;
  width: auto;
  max-width: calc(100% - 108px);
  aspect-ratio: 3/4;
  flex: 0 1 auto;
  min-width: 0;
  box-shadow: 7px 7px 0 var(--blue);
}
.fit.m.gir .cover {
  aspect-ratio: 1;
}
.fit.m .arw {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--blue);
  place-items: center;
  padding: 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.fit.m .arw:active {
  transform: scale(0.9);
}
.fit.m .cnt {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 2px;
}
.fit.m:not(.lm) .list {
  flex: none;
  height: auto;
}
.fit.m:not(.lm) .lh {
  border-bottom: 0;
}
.fit.m:not(.lm) #items {
  display: none;
}
.fit.m.lm .cw,
.fit.m.lm .dt,
.fit.m.lm .player {
  display: none;
}
.fit.m .dt {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  flex: none;
  max-height: 30vh;
  overflow: auto;
  padding: 14px 18px;
  box-shadow: 6px 6px 0 var(--pink);
}
.fit.m .dt h2 {
  font-size: 22px;
}
.fit.m .dt p {
  font-size: 14px;
}
.fit.m .player {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  flex: none;
  box-shadow: 5px 5px 0 var(--blue);
}
.fit.m .th {
  flex-basis: 76px;
  height: 100px;
}
.fit.m.gir .th {
  flex-basis: 76px;
  height: 76px;
}
.fit.m .tx b {
  font-size: 18px;
}
.fit.m .gs {
  position: relative;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  flex: 1 1 0;
  min-height: 0;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 7px 7px 0 var(--blue);
}
.fit.m .side {
  position: static;
  width: auto;
  flex: none;
  font-size: 14px;
  max-height: 20vh;
  overflow: auto;
  text-shadow: 0 2px 0 var(--blue);
}
.fit.m .side h2 {
  font-size: 24px;
  margin: 0 0 4px;
}
.fit.m .fbt {
  position: static;
  font-size: 24px;
  flex: none;
}
.fit.m .fb {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: 150px;
  flex: none;
  box-shadow: 5px 5px 0 var(--blue);
}
.fit.m .fb textarea {
  height: 96px;
}
.fit.m #ok {
  position: static;
  flex: none;
  margin: 0;
}
.fit.m #tl {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  order: 3;
  box-shadow: 5px 5px 0 var(--pink);
}
.fit.m #tl > * {
  position: static !important;
  transform: none !important;
}
.fit.m #tl input[type="range"] {
  writing-mode: horizontal-tb;
  direction: ltr;
  width: 84px;
  height: 24px;
}
.fit.m #tl .c {
  width: 34px;
  height: 34px;
}
.fit.m #cv {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  flex: 1 1 0;
  min-height: 140px;
  order: 4;
  background: #fffdf8;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--blue);
}
.fit.m .ar {
  display: none;
}
body.mob #nav {
  max-width: calc(100vw - 20px);
}
body.mob .np.on span {
  display: none;
}
body.mob .np.on {
  padding: 0 9px;
}
body.mob #brand {
  font-size: 24px;
}
body.mob .pl {
  font-size: 13px;
}
body.mob input,
body.mob textarea {
  font-size: 16px !important;
}
#items {
  touch-action: pan-y;
}
button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
}


/* ==========================================================================
   Caricamento (aggiunto): segnaposto sfocato, dissolvenza della foto, loader
   ========================================================================== */
#stage::before {
  content: "";
  position: absolute;
  inset: -5%;
  background: #0c0a1c url("data:image/webp;base64,UklGRgwBAABXRUJQVlA4IAABAAAwBgCdASooABYAPu1orlCppaQiqrgKATAdiUAY5gRXcuXWebs0jnk2INBdQGprrWAEpUooLUDnjukAAP7a1QvWbwsmGJek5c+Dq8TFBfAhCrwqoM9qnK6zDPYeNS1RS4jF53Gx3ZYIS2t2X/zZUwJBTCsMXdu20lTbsilOyhbleF/U6B4XZNxAQoQico6sSFRgRXYu+UZZtmSNQw54VPPndRCOPOJ4iNer9d5ckJhpPGvtMrVQxOj2rt/uGZMSrWsZgCJWepZHVGcxEQJ779fFZRUKHD48piXm2oHzua2HBPeVse/kS3OEz20YNjjANCOKhdXAmgq0bkjQWpAcBAAA") center / cover no-repeat;
  filter: blur(22px);
}
#photo {
  opacity: 0;
  transition: opacity 0.6s ease;
}
#photo.ok {
  opacity: 1;
}
/* Stella che gira al centro se una sezione ci mette più di un attimo a caricarsi */
#loader {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 45;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#loader img {
  width: 100%;
  height: 100%;
  animation: spin 1.4s linear infinite;
}
body.wait #loader {
  opacity: 1;
  transition-delay: 0.9s; /* appare solo se l'attesa si prolunga */
}
#world picture {
  display: contents;
}
