/* ----- Layout principale ----- */
.box-wrap {
  max-width: 670px;
  min-width: 300px;
  margin: 30px auto;
  padding: 0;
}

.box {
  background: white;
  border: 1px solid #98E;
  width: 330px;
  margin: 8px 0;
  padding: 0;
}

.box h2 {
  padding: 3px 7px;
  font-size: 12pt;
}

.box ul li {
  list-style: none;
  margin: 0;
}

.mainBox {
  background: transparent;
  border: 1px solid #008080;
  width: 100%;
  margin-bottom: 5px;
}

.mainBox h2 {
  background: #59A;
  color: white;
}

.box.image {
  background: transparent;
  border: none;
  width: 100%;
  min-height: 250px;
  max-height: 400px;
  overflow-x: hidden;
  overflow-y: auto;
}

.box img {
  float: left;
  margin: 5px;
  width: auto !important;
  height: 100px !important;
  border-radius: 10px;
}

.icon {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100px;
  height: auto;
}

.imageofnow {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 300px;
  height: auto;
}

.videoofnow {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 500px;
  max-height: 300px;
}

.quoteofnow {
  text-align: center;
  font-size: 20px;
  font-family: -WEBKIT-PICTOGRAPH;
}

.description {
  text-align: center;
  font-weight: bolder;
}

.boardlinksurl {
  float: left;
  margin-right: 100px;
}

/* ----- Stile Boardlist (tipo 4chan/Yotsuba) ----- */
.boardlist-wrap {
  border: 1px solid #CCC;
  background: #F8F8F8;
  padding: 6px 8px;
  margin: 10px auto;
  width: auto;
}

.boardlist-wrap legend {
  font-weight: bold;
  color: #800000;
  font-size: 18px; /* titolo leggermente più grande */
  padding: 2px 6px;
}

.boardlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px 12px; /* ridotto lo spazio tra righe e colonne */
}

.board-item {
  font-family: arial, helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.1em; /* più stretto */
  white-space: normal;
}

.board-item a {
  color: #800000 !important; /* rosso Yotsuba */
  text-decoration: none !important;
  font-weight: normal !important;
  font-size: 12px;
}

.board-item a:hover {
  text-decoration: underline !important;
  color: #DD0000 !important;
}

/* Eccezione: board Random (/b/) in bold */
/* Solo la board /b/ (Random) in grassetto */
.boardlist-wrap .boardlist-grid .board-item a.random-board {
  font-weight: bold !important;
}

/* Descrizione sotto il nome board */
.board-desc {
  font-size: 10px;
  color: #555;
  font-weight: normal;
  margin-top: 0px; /* niente spazio extra */
  line-height: 1.0em; /* super compatto */
}
/* ----- STILE INFOBOX (Description stile 4chan) ----- */
.infobox {
  border: 1px solid #AAA;
  background: #FFF;
  margin: 10px 0;
  padding: 6px;
}

.infobox legend {
  background: #800000;  /* rosso scuro tipo yotsuba */
  color: #FFF;
  font-weight: bold;
  padding: 2px 6px;
  font-size: 13px;
}

.infobox-text {
  font-size: 12px;
  color: #000;
  line-height: 1.4em;
}
footer {
  text-align: center;
}
