/* ==========================================================================
   CHI HA UCCISO IL CAPO? - Design System "La Scrivania del Detective"
   Token ufficiali da identita_grafica.md e caso01_spread.html
   ========================================================================== */

:root {
  --navy: #2E3A59;
  --ink: #1d2438;
  --coral: #D95D45;
  --coral-light: #FADFDA;
  --teal: #2A6F77;
  --teal-light: #DFEAEA;
  --mustard: #E8B84B;
  --postit: #FBEBC2;
  --cream: #F5EFE0;
  --desk-bg: #FAF8F3;
  --white: #FFFFFF;
  --muted: #6a7188;
  --muted-light: #9aa0b0;
  --shadow: 3px 3px 0 rgba(46, 58, 89, 0.18);
  --shadow-lg: 4px 5px 0 rgba(29, 36, 56, 0.22);
  --border: 1.5px solid #1d2438;
  --font-sans: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Charter, Georgia, 'Times New Roman', serif;
  --font-script: 'Snell Roundhand', 'Apple Chancery', 'Brush Script MT', cursive;
  --font-hand: 'Chalkboard SE', 'Bradley Hand', 'Comic Sans MS', cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background: #E7E3D8;
  color: var(--navy);
  font-family: var(--font-serif);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Cornice smartphone su desktop, schermo pieno su mobile/Capacitor */
.app-shell {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 45px rgba(29, 36, 56, 0.25);
}

@media (min-width: 500px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
  }
  .app-shell {
    height: min(94dvh, 896px);
    border-radius: 34px;
    border: 6px solid var(--ink);
  }
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 24px;
  background:
    radial-gradient(circle at 85% -5%, rgba(232, 184, 75, 0.14) 0%, rgba(232, 184, 75, 0) 52%),
    var(--white);
}

.screen.game-screen {
  padding: 10px 14px 14px;
  justify-content: space-between;
}

/* ---------- COMPONENTI COMUNI ---------- */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.08s ease;
}

.icon-btn:active, .btn-primary:active, .btn-secondary:active, .tool-btn:active {
  transform: translate(1.5px, 1.5px);
}

.kicker {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--coral);
}

.page-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.btn-primary {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--coral);
  color: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn-teal {
  background: var(--teal);
}

.btn-navy {
  background: var(--navy);
}

.btn-secondary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  border: var(--border);
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

/* ---------- HOME ("LA SCRIVANIA") ---------- */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-badge {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--teal);
  overflow: visible;
  cursor: pointer;
}

.avatar-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-level {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.streak-pill {
  position: absolute;
  top: -6px;
  right: -18px;
  background: var(--postit);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 1px 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--ink);
}

.brand-hero {
  text-align: center;
  margin: 6px 0 14px;
}

.brand-logo-wrap {
  width: 82px;
  height: 82px;
  margin: 0 auto 8px;
  border-radius: 20px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 27px;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--coral);
}

.brand-payoff {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
}

.brand-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.35;
}

/* Card "Continua l'indagine" */
.continue-card {
  background: var(--white);
  border: 2px solid var(--coral);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.continue-info {
  flex: 1;
}

.continue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.continue-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: #EFE7DC;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(29, 36, 56, 0.2);
}

.progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.progress-label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
}

.play-square-btn {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--coral);
  color: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Griglia azioni secondarie in Home */
.home-grid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.desk-card-mini {
  background: var(--white);
  border: var(--border);
  border-radius: 13px;
  padding: 11px 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.desk-card-mini .mini-tag {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
}

.desk-card-mini .mini-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}

.desk-card-mini .mini-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.25;
}

/* Banner Libro Amazon su Home e Store */
.book-promo-card {
  margin-top: 12px;
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--ink);
  border-radius: 15px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.book-promo-card .book-badge {
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 3px;
}

.book-promo-card h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.2;
}

.book-promo-card p {
  font-size: 11.5px;
  color: #D7DCE8;
  margin-top: 2px;
  line-height: 1.3;
}

.book-promo-card .book-cta {
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 11.5px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--white);
  white-space: nowrap;
}

/* ---------- STAGIONI E DIFFICOLTÀ (Cartelle Fascicolo) ---------- */
.folder-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.folder-card {
  position: relative;
  background: var(--white);
  border: var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 13px;
}

.folder-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 16px;
  width: 68px;
  height: 8px;
  background: var(--white);
  border-top: var(--border);
  border-left: var(--border);
  border-right: var(--border);
  border-radius: 6px 6px 0 0;
}

.folder-card.locked {
  background: #F6F3EC;
}

.folder-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 5px;
  box-shadow: 2px 2px 0 rgba(46, 58, 89, 0.14);
}

.cups-box-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}

.cups-box-grid.level-1 .cup-svg {
  width: 24px;
  height: 24px;
}

.cups-box-grid.level-2 .cup-svg {
  width: 18px;
  height: 18px;
}

.cups-box-grid.level-3,
.cups-box-grid.level-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: center;
  gap: 2px;
  padding: 2px;
}

.cups-box-grid.level-3 .cup-svg:first-child {
  grid-column: 1 / -1;
}

.cups-box-grid.level-3 .cup-svg,
.cups-box-grid.level-4 .cup-svg {
  width: 17px;
  height: 17px;
}

.folder-body {
  flex: 1;
}

.folder-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
  margin: 2px 0;
}

.folder-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.price-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--postit);
  border: 1.5px solid var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
}

/* ---------- LISTA CASI ---------- */
.filter-pills {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 99px;
  border: var(--border);
  background: var(--white);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink);
  cursor: pointer;
}

.filter-pill.active {
  background: var(--teal);
  color: var(--white);
}

.case-row-card {
  background: var(--white);
  border: var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 10px;
}

.case-num-box {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--desk-bg);
  border: var(--border);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.case-row-card.solved .case-num-box {
  background: var(--teal);
  color: var(--white);
}

.case-status-tag {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- TAZZINE DI CAFFÈ SVG ---------- */
.cups-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cup-svg {
  width: 14px;
  height: 14px;
}

.cup-svg.off {
  opacity: 0.22;
}

/* ---------- FASCICOLO DEL CASO (APERTURA LIBRO) ---------- */
.dossier-sheet {
  background: var(--white);
  border: var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.dossier-intro {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--navy);
  margin-top: 8px;
}

.dossier-kick {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-top: 8px;
}

.victim-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  justify-content: center;
}

.polaroid-card {
  background: var(--white);
  border: var(--border);
  padding: 5px 5px 4px;
  box-shadow: var(--shadow);
  width: 92px;
  position: relative;
  flex-shrink: 0;
}

.polaroid-card.tilt-l { transform: rotate(-2deg); }
.polaroid-card.tilt-r { transform: rotate(1.8deg); }

.polaroid-card img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  display: block;
  background: var(--cream);
}

.polaroid-card .pname {
  font-family: var(--font-script);
  font-size: 15px;
  text-align: center;
  line-height: 1.1;
  padding-top: 3px;
  color: var(--ink);
}

.polaroid-card .prole {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted-light);
}

.victim-x-overlay {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  height: 76px;
  pointer-events: none;
}

.victim-pink-note {
  background: var(--coral-light);
  border: var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
}

.victim-pink-note b {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--coral);
  display: block;
  margin-bottom: 3px;
}

.nadia-postit {
  background: var(--postit);
  padding: 10px 13px;
  transform: rotate(-1deg);
  box-shadow: 3px 4px 0 rgba(46, 58, 89, 0.15);
  position: relative;
  font-family: var(--font-hand);
  font-size: 12.5px;
  line-height: 1.38;
  color: #4a4126;
  margin: 10px auto 4px;
}

.nadia-postit::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 48px;
  height: 10px;
  background: rgba(210, 200, 170, 0.65);
}

.nadia-postit .from {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #a08b45;
  display: block;
  margin-bottom: 2px;
}

/* ---------- SCHERMATA DI PARTITA (ISPIRAZIONE + LIBRO) ---------- */
.game-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.timer-pill {
  background: var(--ink);
  color: var(--white);
  padding: 6px 13px;
  border-radius: 99px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.timer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.board-container {
  position: relative;
  margin: 4px auto;
  width: 100%;
  max-width: 348px;
}

.board-col-labels {
  display: flex;
  padding-left: 22px;
  margin-bottom: 2px;
}

.board-col-labels span {
  flex: 1;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted-light);
}

.board-row-wrap {
  display: flex;
  align-items: stretch;
}

.board-row-labels {
  width: 22px;
  display: flex;
  flex-direction: column;
}

.board-row-labels span {
  flex: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-board-box {
  flex: 1;
  aspect-ratio: 1 / 1;
  position: relative;
  box-shadow: var(--shadow);
}

.svg-board-box svg.map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Griglia interattiva sovrapposta esattamente alla mappa SVG */
.interactive-grid {
  position: absolute;
  inset: 0;
  display: grid;
}

.grid-3x3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.grid-4x4 {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.grid-cell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 14%;
}

.grid-cell:active {
  background: rgba(217, 93, 69, 0.14);
}

/* Croci di esclusione */
.cell-cross {
  width: 54%;
  height: 54%;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.85));
  animation: popIn 0.14s ease-out;
}

/* Pedina Sospettato Piazzato */
.cell-suspect-token {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  border: 2.5px solid var(--white);
  box-shadow: 0 3px 6px rgba(29, 36, 56, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 20px;
  color: var(--white);
  position: relative;
  animation: popIn 0.16s ease-out;
}

/* Appunti a matita nella casella */
.cell-notes {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
}

.note-chip {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0 4px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 10px;
  color: var(--ink);
}

@keyframes popIn {
  from { transform: scale(0.6); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

/* Barra 5 Strumenti (Appunti, Croci, Piazza, Cancella, Aiuto) */
.tools-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 4px 0;
}

.tool-btn {
  background: var(--white);
  border: var(--border);
  border-radius: 12px;
  padding: 6px 2px 5px;
  box-shadow: 2px 2px 0 rgba(46, 58, 89, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  color: var(--ink);
}

.tool-btn .t-icon {
  font-size: 16px;
  line-height: 1;
}

.tool-btn .t-lbl {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10px;
}

.tool-btn.active {
  background: var(--ink);
  color: var(--white);
}

.hint-badge-count {
  position: absolute;
  top: -5px;
  right: -4px;
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 10px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Banner Aiuto Contestuale */
.hint-banner {
  background: var(--postit);
  border: var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: var(--font-serif);
  font-size: 11.5px;
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(46, 58, 89, 0.14);
  margin-bottom: 4px;
}

/* Fascicolo Sospettati + Indizi in basso */
.suspects-clues-tray {
  background: var(--desk-bg);
  border: var(--border);
  border-radius: 15px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
}

.polaroid-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.polaroid-carousel::-webkit-scrollbar {
  display: none;
}

.mini-polaroid {
  background: var(--white);
  border: 1.5px solid var(--ink);
  padding: 3px 3px 2px;
  width: 64px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s ease;
}

.mini-polaroid.selected {
  border: 2.5px solid var(--coral);
  box-shadow: 0 0 0 2px rgba(217, 93, 69, 0.25);
  transform: translateY(-2px);
}

.mini-polaroid.placed {
  opacity: 0.52;
}

.mini-polaroid img {
  width: 100%;
  height: 46px;
  object-fit: cover;
  display: block;
}

.mini-polaroid .mp-name {
  font-family: var(--font-script);
  font-size: 12px;
  text-align: center;
  line-height: 1.05;
  color: var(--ink);
}

.mini-polaroid .mp-init {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clues-scroll {
  max-height: 82px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.clue-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 2px 2px 0 rgba(46, 58, 89, 0.12);
}

.clue-card .num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- MODALI (Fascicolo, Store, Ispettore/Detective) ---------- */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 36, 56, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 12px;
}

.modal-sheet {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.tier-card {
  background: var(--desk-bg);
  border: var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.tier-card.featured {
  border: 2px solid var(--mustard);
  background: #FFFDF6;
}

.stamp-closed {
  display: inline-block;
  border: 3px solid var(--coral);
  color: var(--coral);
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 6px;
  transform: rotate(-3deg);
  margin: 4px auto 8px;
}
