/* ==========================================================
   BASE LIMPIA RETRO — Lista para construir poco a poco
   Edita estas variables cuando quieras cambiar colores o fuentes
   ========================================================== */
:root {
  --fondo-pagina: #efefef;
  --fondo-trama: #e6e6e6;
  --fondo-marco: #f2f2f2;
  --fondo-caja: #ffffff;
  --fondo-hd: #e6e6e6;
  --color-texto: #222222;
  --color-suave: #666666;
  --color-acento: #111111;
  --borde-fuerte: #555555;
  --borde-suave: #c4c4c4;
  --fuente-titulo: Georgia, "Times New Roman", serif;
  --fuente-texto: Verdana, Tahoma, "MS Sans Serif", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--fondo-pagina);
  background-image: url("img/fondos/papel-seamless.jpg");
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
  color: var(--color-texto);
  font-family: var(--fuente-texto);
  font-size: 11px;
  line-height: 1.6;
}

a {
  color: var(--color-texto);
  text-decoration: underline;
}

a:hover {
  background: #e6e6e6;
  text-decoration: none;
}

p {
  margin: 0 0 8px 0;
}

p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   CONTENEDOR DE ESCENA + FILIGRANA ANCLADA DINÁMICAMENTE
   ========================================================== */
#stage {
  position: relative;
  width: 740px;
  max-width: 100%;
  margin: 0 auto;
}

.bottom-ornament {
  display: block;
  width: 120px;
  height: auto;
  margin: 18px auto 0 auto;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.88;
}

/* ==========================================================
   MARCO PRINCIPAL CENTRADO (740px)
   position: relative permite pegar recortes de collage encima
   ========================================================== */
#wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  background-color: rgba(244, 244, 244, 0.66);
  border: 1px solid var(--borde-fuerte);
  padding: 8px;
}

/* ==========================================================
   1. HEADER / BANNER
   ========================================================== */
#site-header {
  background-color: rgba(255, 255, 255, 0.94);
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 0.75px, transparent 0.75px);
  background-size: 6px 6px;
  border: 1px solid var(--borde-fuerte);
  padding: 20px 18px;
  margin-bottom: 8px;
  /* Cuando pongas un banner de imagen:
     background-image: url("img/tu-banner.jpg");
     background-size: cover; */
}

#site-header h1 {
  margin: 0;
  font-family: var(--fuente-titulo);
  font-size: 26px;
  font-weight: normal;
  font-style: italic;
  color: var(--color-acento);
}

#site-header h1 a {
  color: inherit;
  text-decoration: none;
}

#site-header h1 a:hover {
  background: none;
}

#site-header .subtitle {
  margin: 4px 0 0 0;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 10px;
  color: var(--color-suave);
  letter-spacing: 0.4px;
}

/* ==========================================================
   LAYOUT DE 2 COLUMNAS (IZQUIERDA + PRINCIPAL)
   ========================================================== */
#layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 8px;
  align-items: start;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* ==========================================================
   CAJAS BASE RETRO NEUTRAS
   ========================================================== */
.box {
  background-color: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--borde-fuerte);
}

.box-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px;
  background-color: var(--fondo-hd);
  border-bottom: 1px solid var(--borde-suave);
  box-shadow: inset 0 1px 0 #ffffff;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--color-texto);
}

.hd-mark {
  font-family: "Courier New", monospace;
  font-size: 9px;
  color: var(--color-suave);
}

.box-bd {
  padding: 9px 10px;
}

/* ==========================================================
   2. MENÚ
   ========================================================== */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  border-bottom: 1px dotted #d4d4d4;
}

.nav-list li:last-child {
  border-bottom: 0;
}

.nav-list a {
  display: block;
  padding: 4px 5px;
  text-decoration: none;
  color: var(--color-texto);
  font-size: 11px;
}

.nav-list a:hover {
  background: #ececec;
  padding-left: 8px;
}

.nav-list a.current {
  font-weight: bold;
  background: #efefef;
}

/* ==========================================================
   3. IMAGEN EN LA BARRA LATERAL
   ========================================================== */
#side-art {
  height: 280px;
  overflow: hidden;
  background-color: #dcdcdc;
}

#side-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  color: #666666;
}

.art-placeholder small {
  font-size: 10px;
  color: #888888;
}

/* ==========================================================
   WIDGETS LATERALES: CALENDARIO Y FASE LUNAR
   ========================================================== */
.cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: normal;
  color: var(--color-suave);
}

.cal-nav button {
  background: none;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  color: var(--color-texto);
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 1;
}

.cal-nav button:hover {
  background: #d8d8d8;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-align: center;
}

.cal-table th {
  font-weight: normal;
  color: var(--color-suave);
  padding: 0 0 3px 0;
  border-bottom: 1px dotted var(--borde-suave);
}

.cal-table td {
  padding: 2px 0;
  color: var(--color-texto);
}

.cal-table td.cal-today {
  background: #ececec;
  outline: 1px solid var(--borde-fuerte);
  outline-offset: -1px;
  font-weight: bold;
}

.cal-table td.cal-has-post a {
  display: block;
  font-weight: bold;
  text-decoration: underline;
  color: var(--color-acento);
}

.cal-table td.cal-has-post a:hover {
  background: #e2e2e2;
  text-decoration: none;
}

.moon-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moon-svg {
  display: block;
  flex: 0 0 auto;
}

.moon-info {
  min-width: 0;
}

.moon-name {
  font-family: var(--fuente-titulo);
  font-size: 12px;
  font-style: italic;
  color: var(--color-acento);
  line-height: 1.25;
}

.moon-meta {
  font-family: "Courier New", monospace;
  font-size: 9px;
  color: var(--color-suave);
  margin-top: 2px;
}

/* Reproductor de música */
.player-widget {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.player-track {
  font-family: var(--fuente-titulo);
  font-size: 12px;
  font-style: italic;
  color: var(--color-acento);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-status {
  font-family: "Courier New", monospace;
  font-size: 9px;
  color: var(--color-suave);
  margin-top: -3px;
}

.player-bar {
  height: 5px;
  background: #ececec;
  border: 1px solid var(--borde-suave);
  cursor: pointer;
}

.player-fill {
  height: 100%;
  width: 0%;
  background: var(--borde-fuerte);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.player-btns {
  display: inline-flex;
  gap: 3px;
}

.player-btns button {
  width: 22px;
  height: 19px;
  padding: 0;
  background: #f5f5f5;
  border: 1px solid var(--borde-suave);
  color: var(--color-texto);
  font-family: Tahoma, sans-serif;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.player-btns button:hover {
  background: #e6e6e6;
  border-color: var(--borde-fuerte);
}

.player-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 78px;
  height: 5px;
  margin: 0;
  background: #ececec;
  border: 1px solid var(--borde-suave);
  border-radius: 0;
  cursor: pointer;
}

.player-vol::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border: 0;
}

.player-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 7px;
  height: 13px;
  margin-top: -5px;
  background: #f5f5f5;
  border: 1px solid var(--borde-fuerte);
  border-radius: 0;
  cursor: pointer;
}

.player-vol::-webkit-slider-thumb:hover {
  background: #e2e2e2;
}

.player-vol::-moz-range-track {
  height: 5px;
  background: #ececec;
  border: 1px solid var(--borde-suave);
  border-radius: 0;
}

.player-vol::-moz-range-thumb {
  width: 7px;
  height: 13px;
  background: #f5f5f5;
  border: 1px solid var(--borde-fuerte);
  border-radius: 0;
  cursor: pointer;
}

/* ==========================================================
   4. BIENVENIDA Y 5. ENTRADAS
   ========================================================== */
.welcome-heading {
  font-family: var(--fuente-titulo);
  font-size: 15px;
  font-style: italic;
  font-weight: normal;
  color: var(--color-acento);
  margin: 0 0 6px 0;
  border-bottom: 1px dotted var(--borde-suave);
  padding-bottom: 3px;
}

.welcome-quote {
  margin: 0;
  padding: 2px 0;
  font-family: var(--fuente-titulo);
  font-size: 13px;
  font-style: italic;
  line-height: 1.65;
  color: var(--color-acento);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dotted var(--borde-suave);
  padding: 0 0 3px 0;
  margin-bottom: 6px;
}

.entry-title {
  font-family: var(--fuente-titulo);
  font-size: 13px;
  font-weight: bold;
  color: var(--color-acento);
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
  background: none;
}

.entry-date {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: var(--color-suave);
  white-space: nowrap;
}

.entry-sep {
  border: 0;
  border-top: 1px dotted var(--borde-suave);
  margin: 12px 0;
}

/* Variantes preparadas de preview con imagen en portada:
   - .entry-preview              (miniatura 80px a la izquierda)
   - .entry-preview.thumb-right  (miniatura 80px a la derecha)
   - .entry-preview.thumb-top    (imagen arriba a la izquierda, tope 140px alto)
   - .entry-preview.thumb-center (imagen arriba centrada, tope 140px alto)
   - .entry-preview.thumb-banner (tira panorámica 100% × 90px para capturas anchas) */
.entry-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.entry-preview.thumb-right {
  flex-direction: row-reverse;
  justify-content: space-between;
}

.entry-preview.thumb-top,
.entry-preview.thumb-center,
.entry-preview.thumb-banner {
  flex-direction: column;
  gap: 7px;
}

.entry-preview.thumb-center .entry-thumb {
  align-self: center;
}

.entry-preview.thumb-banner .entry-thumb {
  width: 100%;
}

.entry-thumb {
  flex: 0 0 auto;
  display: block;
  padding: 2px;
  background: #ffffff;
  border: 1px solid var(--borde-suave);
}

.entry-thumb:hover {
  border-color: var(--borde-fuerte);
  background: #ffffff;
}

.entry-thumb img {
  display: block;
  width: 80px;
  height: auto;
  image-rendering: pixelated;
}

.entry-preview.thumb-top .entry-thumb img,
.entry-preview.thumb-center .entry-thumb img {
  width: auto;
  max-width: 100%;
  max-height: 140px;
}

.entry-preview.thumb-banner .entry-thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  image-rendering: auto;
}

/* ==========================================================
   VISTA INDIVIDUAL DE ENTRADA
   ========================================================== */
.box-hd .back-link {
  color: var(--color-texto);
  text-decoration: none;
}

.box-hd .back-link:hover {
  text-decoration: underline;
  background: none;
}

.entry-full-title {
  font-family: var(--fuente-titulo);
  font-size: 16px;
  font-weight: bold;
  color: var(--color-acento);
  margin: 0 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px dotted var(--borde-suave);
}

.entry-body p {
  margin: 0 0 10px 0;
}

.entry-body p:last-child {
  margin-bottom: 0;
}

.entry-figure {
  margin: 12px 0;
  text-align: center;
}

.entry-figure img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  padding: 3px;
  background: #ffffff;
  border: 1px solid var(--borde-suave);
  image-rendering: pixelated;
}

.entry-figure figcaption {
  margin-top: 4px;
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: var(--color-suave);
}

.entry-foot {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dotted var(--borde-suave);
  font-size: 10px;
}

/* ==========================================================
   KIT DE COLLAGE (listo para cuando pegues recortes)
   ========================================================== */
.recorte {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.22));
}

.tinta {
  mix-blend-mode: multiply;
}

/* Filtro SVG de rugosidad/tinta (aplicar solo a las imágenes que tú digas) */
.tinta-grano {
  filter: url(#tinta-zine);
}

.polaroid {
  display: inline-block;
  background: #ffffff;
  padding: 5px 5px 16px 5px;
  border: 1px solid #cccccc;
  box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.2);
}

.cinta {
  position: absolute;
  width: 54px;
  height: 15px;
  background: rgba(240, 232, 198, 0.65);
  border-left: 1px dotted rgba(160, 150, 120, 0.5);
  border-right: 1px dotted rgba(160, 150, 120, 0.5);
  z-index: 12;
}

/* ==========================================================
   ADAPTACIÓN MOBILE (sin alterar el layout de escritorio)
   ========================================================== */
@media (max-width: 680px) {
  body {
    align-items: flex-start;
    padding: 16px 14px 28px 14px;
    font-size: 11.5px;
  }

  #wrapper {
    padding: 6px;
  }

  #site-header {
    padding: 14px 12px;
    margin-bottom: 6px;
  }

  #site-header h1 {
    font-size: 22px;
  }

  #layout {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* Contenido principal primero al abrir en teléfono */
  main.col {
    order: 1;
  }

  /* Barra lateral en mini-grilla editorial: conserva la proporción vertical de lateral.jpg */
  aside.col {
    order: 2;
    display: grid;
    grid-template-columns: 122px 1fr;
    gap: 6px;
    align-items: stretch;
  }

  aside.col #side-art {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
    min-height: 174px;
  }

  aside.col > nav.box {
    grid-column: 2;
    grid-row: 1;
  }

  aside.col .box-player {
    grid-column: 2;
    grid-row: 2;
  }

  aside.col .box-cal {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .col {
    gap: 6px;
  }

  .box-bd {
    padding: 9px 10px;
  }

  .welcome-quote {
    font-size: 12.5px;
  }

  .entry-head {
    gap: 8px;
  }

  .entry-title {
    font-size: 13.5px;
  }

  .entry-thumb img {
    width: 72px;
  }

  .nav-list a {
    padding: 5px 5px;
    font-size: 11.5px;
  }

  .cal-table {
    font-size: 10.5px;
  }

  .cal-table td {
    padding: 4px 0;
  }

  .cal-nav button {
    padding: 2px 6px;
    font-size: 12px;
  }

  .player-btns button {
    width: 24px;
    height: 22px;
    font-size: 9px;
  }

  .player-vol {
    flex: 1;
    min-width: 56px;
    max-width: 110px;
  }

  .bottom-ornament {
    width: 100px;
    margin-top: 14px;
  }
}
