/* Kit interattivo — libro aperto (motore condiviso per le proposte grafiche) */
.kit-stage {
  position: relative;
  width: 100%;
  padding-top: 74.6667%; /* 896 / 1200 */
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 43, .28);
}
.kit-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kit-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.kit-stage .sheet { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><g fill='%23ffffff' stroke='%231c2b52' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'><path d='M11 15V6.6a1.6 1.6 0 0 1 3.2 0V14'/><path d='M14.2 14V5.4a1.6 1.6 0 0 1 3.2 0V14'/><path d='M17.4 14V6.8a1.6 1.6 0 0 1 3.2 0V15'/><path d='M20.6 15V9.4a1.6 1.6 0 0 1 3.2 0V18'/><path d='M11 14.5 8.9 12.3a1.6 1.6 0 0 0-2.3 2.3l4.6 5.6a6.2 6.2 0 0 0 4.8 2.4h2.1a6.2 6.2 0 0 0 6.2-6.2v-2.5'/></g></svg>") 14 5, grab; }
.kit-stage .sheet:active { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><g fill='%23ffffff' stroke='%231c2b52' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'><path d='M8.6 14.6 6.9 12.9a1.6 1.6 0 0 0-2.3 2.3l4.6 5.6a6.2 6.2 0 0 0 4.8 2.4h2.4a6.2 6.2 0 0 0 6.2-6.2v-1.4a1.7 1.7 0 0 0-3.4 0v-1.6a1.7 1.7 0 0 0-3.4 0v-2a1.7 1.7 0 0 0-3.4 0v-1.7a1.7 1.7 0 0 0-3.4 0z'/></g></svg>") 8 16, grabbing; }
.kit-stage .sheet .sheet-hot { fill: transparent; }
.kit-stage .sheet .sheet-label {
  display: none; fill: #1c2b52; font-weight: 800; font-size: 26px; letter-spacing: 1px;
  paint-order: stroke; stroke: #fff; stroke-width: 5px; pointer-events: none;
}
.kit-stage .sheet:hover .sheet-label,
.kit-stage .sheet.active .sheet-label { display: block; }

.kit-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.kit-legend .chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: transform .15s ease, background .2s;
}
.kit-legend .chip:hover { transform: translateY(-1px); }
.kit-legend .chip .dot { width: 9px; height: 9px; border-radius: 50%; }

.kit-modal {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center;
  background: rgba(15, 23, 43, 0); pointer-events: none;
}
.kit-modal.open { display: flex; }
.kit-modal.dim { background: rgba(15, 23, 43, .72); pointer-events: auto; transition: background .3s ease; }
.kit-modal-card {
  width: 100%; height: 100vh; background: #fff;
  display: flex; flex-direction: column; overflow: hidden; will-change: transform;
}
.kit-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: #1c2b52; color: #fff; font-size: 14px; font-weight: 700;
}
.kit-modal-head .actions { display: flex; gap: 8px; }
.kit-modal-head a, .kit-modal-head button {
  background: #fff; color: #1c2b52; border: none; border-radius: 7px; padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none; font-family: inherit;
}
.kit-modal-head button { background: #c9d6f5; }
.kit-modal-card .kit-flip {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #0f1b2d; min-height: 0; position: relative; overflow: hidden;
}
.kit-flip .pf-loading, .pf-lb .pf-loading {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: #c3ccd8; font-size: 14px; font-weight: 600;
}
.kit-flip .pf-spin, .pf-lb .pf-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #2b3d5c; border-top-color: #8fd3ff; animation: pf-rot 0.9s linear infinite;
}
@keyframes pf-rot { to { transform: rotate(360deg); } }
.kit-flip .pf-book { box-shadow: 0 24px 70px rgba(0, 0, 0, .55); flex-shrink: 0; cursor: grab; }
.kit-flip .pf-book:active { cursor: grabbing; }
.kit-flip .pf-page img { width: 100%; height: 100%; display: block; background: #fff; }
.kit-flip .pf-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 30;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #334967;
  background: rgba(16, 29, 48, .88); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; padding: 0;
}
.kit-flip .pf-btn:hover { background: #2a3d6e; }
.kit-flip .pf-prev { left: 14px; }
.kit-flip .pf-next { right: 14px; }
.kit-flip .pf-zoom {
  top: calc(50% - 77px); bottom: auto; right: 127px; transform: none;
  width: auto; height: auto; padding: 10px 18px 10px 38px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.6 15.6 21 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 15px 15px;
}
.pf-lb { position: fixed; inset: 0; z-index: 10010; background: rgba(7, 13, 24, .96); display: flex; overflow: auto; }
.pf-lb-in { margin: auto; }
.pf-lb-book { background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.pf-lb-book .pf-page img { width: 100%; height: 100%; display: block; background: #fff; }
.pf-lb-nav, .pf-lb-x {
  position: fixed; z-index: 10011; border-radius: 50%; border: 1px solid #334967;
  background: rgba(16, 29, 48, .88); color: #fff; cursor: pointer; padding: 0;
}
.pf-lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 28px; line-height: 1; }
.pf-lb-nav:hover, .pf-lb-x:hover { background: #2a3d6e; }
.pf-lb-prev { left: 16px; }
.pf-lb-next { right: 16px; }
.pf-lb-x { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 15px; }
.pf-lb-op {
  position: fixed; bottom: 13px; z-index: 10011; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #334967; background: rgba(16, 29, 48, .88); color: #fff;
  font-size: 19px; font-weight: 700; cursor: pointer; padding: 0;
}
.pf-lb-op:hover { background: #2a3d6e; }
.pf-lb-op:disabled { opacity: .35; cursor: default; }
.pf-lb-minus { left: calc(50% - 74px); }
.pf-lb-plus { left: calc(50% + 42px); }
.pf-lb-count {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 10011;
  background: rgba(16, 29, 48, .88); border: 1px solid #334967; border-radius: 999px;
  padding: 5px 14px; color: #fff; font-size: 12.5px; font-weight: 700;
}
.kit-flip .pf-count {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(16, 29, 48, .88); border: 1px solid #334967; border-radius: 999px;
  padding: 5px 14px; color: #fff; font-size: 12.5px; font-weight: 700;
}

.kit-star {
  position: fixed; width: 3px; height: 3px; background: #FFD700; border-radius: 50%;
  box-shadow: 0 0 6px #FFD700; z-index: 10000; pointer-events: none;
}

/* Telefono: il libro è già a pagina intera, il tasto Ingrandisci non serve e coprirebbe la pagina */
@media(max-width:700px){
  .kit-flip .pf-zoom { display: none; }
}
