/* ===========================================================================
   Tablero de inspiración (vision board) para una galería
   Se activa con "skin": "board" en un botón de tipo "gallery".
   Referencia: el tablero "INSPO" del estudio (corcho sobre pared blanca,
   fotos impresas encimadas, chinchetas de colores, cinta de pintor, notitas
   verde limón y parches de tela con el emblema).
   =========================================================================== */
#board-decor { display: none; }

#gallery.skin-board {
  --wall: #eeede8;
  --wall-strip: 150px; /* franja de pared a la derecha, donde van los parches */
  --lime: #e9f77d;
  --tape: rgba(236, 226, 196, 0.82);
  --board-hand: "Marker Felt", "Bradley Hand", "Chalkboard SE", cursive;
  --board-script: "Snell Roundhand", "Apple Chancery", "Zapfino", cursive;
}

/* Ventana un poco más pequeña que las demás */
body.gallery-windowed #gallery.skin-board {
  top: 22vh;
  width: min(60vw, 980px);
  height: min(58vh, 720px);
}

/* Tablero que se abre desde una foto ("links"): ventana aún más pequeña,
   con todas las fotos en una fila */
body.gallery-windowed #gallery.skin-board.board-sub {
  top: 26vh;
  width: min(52vw, 860px);
  height: min(50vh, 620px);
}
#gallery.skin-board.board-sub #gallery-grid,
#gallery.skin-board.board-sub #gallery-grid:has(button.tile ~ button.tile) {
  padding-top: 92px;
  grid-template-columns: repeat(auto-fit, 130px);
  gap: 24px 12px;
}
#gallery.skin-board.board-sub .board-labels,
#gallery-grid:has(button.tile ~ button.tile) .board-labels { flex-direction: row; align-items: center; gap: 28px; }
#gallery.skin-board.board-sub .pin-note { font-size: 17px; padding: 7px 12px 8px; bottom: -22px; }

/* Pared blanca con un panel de corcho. Las fotos van centradas en el corcho. */
#gallery.skin-board #gallery-grid {
  position: relative; /* para los letreros */
  margin: 6px;
  padding: 28px calc(var(--wall-strip) + 30px) 34px 40px;
  grid-template-columns: repeat(auto-fit, 300px);
  justify-content: center;
  align-content: safe center;
  gap: 30px 16px;
  background:
    linear-gradient(var(--wall), var(--wall)) right / var(--wall-strip) 100% no-repeat,
    radial-gradient(rgba(70, 40, 10, 0.4) 0.8px, transparent 1.3px) 0 0 / 5px 5px,
    radial-gradient(rgba(255, 225, 170, 0.35) 0.8px, transparent 1.4px) 2px 3px / 7px 7px,
    radial-gradient(rgba(60, 35, 10, 0.25) 1.2px, transparent 2px) 1px 1px / 13px 11px,
    #b98a4f;
  box-shadow:
    inset 0 0 0 14px var(--wall),
    inset 0 0 0 15px rgba(0, 0, 0, 0.12),
    inset 0 0 30px 14px rgba(0, 0, 0, 0.12);
}

/* Letreros: "INSPO" impreso y el nombre en cursiva, como en el tablero.
   Con una sola foto van uno debajo del otro a la izquierda, para que la foto
   pueda ocupar todo el alto; con varias, en fila arriba. */
.board-labels {
  position: absolute;
  top: 28px;
  left: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
#gallery.skin-board #gallery-grid:has(button.tile ~ button.tile) { padding-top: 90px; grid-template-columns: repeat(auto-fit, 250px); }
#gallery-grid:has(button.tile ~ button.tile) .board-labels { flex-direction: row; align-items: center; gap: 28px; }
.board-inspo {
  padding: 6px 18px;
  background: #fff;
  color: #111;
  font: 800 26px "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(-1deg);
}
.board-script {
  padding: 2px 22px 4px;
  background: #fff;
  color: #222;
  font: italic 26px var(--board-script);
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
  transform: rotate(0.6deg);
}

/* Foto impresa: borde blanco fino, encimada y algo torcida */
#gallery.skin-board .tile.pin {
  aspect-ratio: auto;
  overflow: visible;
  justify-self: center;
  align-self: start;
  width: var(--w);
  padding: 6px;
  background: #fdfdfb;
  border-radius: 0;
  outline: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 2px 5px 10px rgba(30, 15, 0, 0.35);
  transform: translate(var(--dx), var(--dy)) rotate(var(--tilt));
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  animation: pinIn 0.4s var(--ease) both; /* solo opacidad: la animación general fijaría el transform y quitaría el giro */
}
@keyframes pinIn { from { opacity: 0; } to { opacity: 1; } }
#gallery.skin-board .tile.pin.selected {
  transform: translate(var(--dx), calc(var(--dy) - 8px)) rotate(0deg) scale(1.1);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2), 8px 18px 26px rgba(30, 15, 0, 0.45);
  z-index: 3;
}
.pin-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #1a1a1a;
  overflow: hidden;
}
#gallery.skin-board .pin-photo img.thumb { width: 100%; height: 100%; object-fit: cover; }
#gallery.skin-board .pin-photo .fallback-icon { color: #fff; }
.pin-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 2px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
}

/* Notita verde limón con el nombre: solo en la foto seleccionada */
.pin-note {
  position: absolute;
  left: 50%;
  bottom: -26px;
  max-width: 120%;
  padding: 9px 18px 10px;
  background: var(--lime);
  color: #111;
  font: 700 21px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; /* como el logo "amisdunet." */
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%) rotate(-3deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.15s, transform 0.2s var(--ease);
}
#gallery.skin-board .tile.pin.selected .pin-note { opacity: 1; transform: translateX(-50%) rotate(-3deg) scale(1); }

/* Carpetas: papel kraft */
#gallery.skin-board .tile.pin.folder .pin-photo { background: #d9b98a; aspect-ratio: 4 / 3; }
#gallery.skin-board .tile.pin.folder .folder-icon { position: absolute; inset: 0; display: grid; place-items: center; color: #7a5326; }
#gallery.skin-board .tile.pin.folder .pin-note { opacity: 1; transform: translateX(-50%) rotate(-3deg) scale(1); }

/* Chincheta de mapa (cabeza redonda) y cinta de pintor */
.pin-tack {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), var(--pin) 45%, color-mix(in srgb, var(--pin) 55%, #000));
  box-shadow: 2px 3px 2px rgba(0, 0, 0, 0.35);
  z-index: 2;
}
.pin-tape {
  position: absolute;
  top: -9px;
  left: -14px;
  width: 52px;
  height: 18px;
  transform: rotate(-38deg);
  background: var(--tape);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
  clip-path: polygon(4% 0, 96% 6%, 100% 50%, 95% 100%, 3% 94%, 0 50%);
  z-index: 2;
}
.pin-tape-2 { left: auto; right: -14px; transform: rotate(38deg); }

/* Parches de tela y estrellas recortadas en la franja de pared (no se mueven con el scroll) */
#gallery.skin-board #board-decor {
  display: block;
  position: absolute;
  top: 36px;
  right: 9px;
  bottom: 9px;
  width: var(--wall-strip);
  pointer-events: none;
  overflow: hidden;
}
.decor-patch {
  position: absolute;
  top: 70px;
  left: 14px;
  width: 112px;
  height: 104px;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 4px),
    #161a2e;
  border-radius: 3px 8px 4px 6px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.35);
  transform: rotate(4deg);
}
.decor-patch img { width: 74%; filter: drop-shadow(0 0 1px #f3e9d6) drop-shadow(0 0 1px #f3e9d6); }
.decor-patch::before,
.decor-patch::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 14px;
  background: var(--tape);
}
.decor-patch::before { top: -5px; left: -8px; transform: rotate(-35deg); }
.decor-patch::after { top: -5px; right: -8px; transform: rotate(35deg); }

/* Estrella de cuatro puntas recortada en tela */
.decor-star {
  position: absolute;
  width: 110px;
  height: 110px;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.3));
}
.decor-plaid {
  top: -24px;
  left: 30px;
  transform: rotate(18deg);
  background:
    repeating-linear-gradient(45deg, rgba(40, 40, 40, 0.55) 0 3px, transparent 3px 14px),
    repeating-linear-gradient(-45deg, rgba(40, 40, 40, 0.55) 0 3px, transparent 3px 14px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 7px),
    #cfc6a8;
}
.decor-lilac {
  bottom: -20px;
  left: 18px;
  transform: rotate(-12deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0 1px, transparent 1px 4px),
    #b9a2d6;
}

/* Tablero vacío: notita verde limón escrita a mano */
#gallery.skin-board.empty #gallery-grid { display: block; }
#gallery.skin-board #gallery-empty {
  inset: 45% auto auto calc(50% - var(--wall-strip) / 2);
  transform: translate(-50%, -50%) rotate(-2deg);
  padding: 22px 30px;
  background: var(--lime);
  box-shadow: 3px 6px 12px rgba(30, 15, 0, 0.35);
  color: #222;
  font: 22px var(--board-hand);
  text-transform: none;
  letter-spacing: 0;
}

/* Pantallas angostas (teléfono): sin franja de pared ni parches */
@media (max-width: 700px) {
  #gallery.skin-board { --wall-strip: 0px; }
  #gallery.skin-board #board-decor { display: none; }
  #gallery.skin-board #gallery-grid { padding: 20px 24px 50px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* Recortes de tela con la forma del emblema (la silueta sale del propio logo) */
.decor-cut {
  position: absolute;
  filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.35)); /* va por fuera: la máscara recortaría la sombra */
}
.decor-cut-fabric {
  width: 100%;
  height: 100%;
  -webkit-mask: var(--emblem) center / contain no-repeat;
  mask: var(--emblem) center / contain no-repeat;
}
/* Fieltro rojo, como la pieza peluda del tablero */
.decor-cut-felt { top: 196px; left: 26px; width: 104px; height: 104px; transform: rotate(-14deg); }
.decor-cut-felt .decor-cut-fabric {
  background:
    radial-gradient(rgba(255, 255, 255, 0.12) 0.7px, transparent 1.2px) 0 0 / 3px 3px,
    radial-gradient(rgba(0, 0, 0, 0.25) 0.8px, transparent 1.4px) 1px 2px / 4px 4px,
    #b3171d;
}
/* Mezclilla azul claro */
.decor-cut-denim { top: 318px; left: 6px; width: 92px; height: 92px; transform: rotate(21deg); }
.decor-cut-denim .decor-cut-fabric {
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-30deg, rgba(20, 40, 70, 0.18) 0 1px, transparent 1px 4px),
    #8fb0cf;
}
/* Cuadritos (vichy) negros, como el papel de la parte de abajo del tablero */
.decor-cut-gingham { top: 422px; left: 72px; width: 70px; height: 70px; transform: rotate(8deg); }
.decor-cut-gingham .decor-cut-fabric {
  background:
    repeating-linear-gradient(0deg, rgba(110, 20, 30, 0.55) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(90deg, rgba(110, 20, 30, 0.55) 0 4px, transparent 4px 8px),
    #f4efe6;
}

/* Tablero del equipo: las fotos ya son polaroids, así que se muestran enteras,
   sin el borde blanco de foto impresa */
#gallery.skin-board.board-sub .tile.pin { padding: 0; background: transparent; }
#gallery.skin-board.board-sub .pin-photo { aspect-ratio: 5 / 8; background: transparent; }

/* ---------- Polaroid agrandada sobre el corcho ---------- */
#pin-zoom { display: none; }
#gallery.skin-board #pin-zoom.open {
  position: absolute;
  inset: 39px 9px 9px; /* el área del corcho, debajo de la barra de título */
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(20, 10, 0, 0.62);
  animation: zoomDim 0.3s ease both;
  cursor: zoom-out;
}
#gallery.skin-board #pin-zoom.closing { animation: zoomUndim 0.32s ease both; }
@keyframes zoomDim { from { background: rgba(30, 15, 0, 0); } }
@keyframes zoomUndim { to { background: rgba(30, 15, 0, 0); } }

.zoom-card {
  position: relative;
  padding: 10px; /* borde de foto impresa */
  background: #fdfdfb;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.25), 14px 28px 40px rgba(20, 10, 0, 0.55);
  transform-origin: center;
}
.zoom-card img {
  display: block;
  max-width: 70vw;
  max-height: calc(58vh - 110px);
  object-fit: contain;
}
/* Las fotos del equipo ya son polaroids: sin borde extra */
.zoom-card.zoom-polaroid { padding: 0; background: transparent; }
#gallery.board-sub .zoom-card img { max-height: calc(50vh - 95px); }
.zoom-note {
  position: absolute;
  left: 50%;
  bottom: -24px;
  padding: 9px 20px 10px;
  background: var(--lime);
  color: #111;
  font: 700 22px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.04em;
  white-space: nowrap;
  box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%) rotate(-3deg);
}
.zoom-note:empty { display: none; }
#gallery.skin-board .tile.pin.zoom-source { visibility: hidden; }

/* Nombres del equipo en mayúsculas, con la tipografía de la marca */
#gallery.skin-board.board-sub .pin-note,
#gallery.skin-board.board-sub .zoom-note { text-transform: uppercase; letter-spacing: -0.02em; }

/* ---------- Cosas de taller sobre el corcho (debajo de las fotos) ---------- */
#gallery.skin-board .tile.pin { z-index: 1; }
#gallery.skin-board .board-labels { z-index: 1; }
.board-notes {
  position: absolute;
  inset: 0;
  right: var(--wall-strip);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  font-family: var(--board-hand);
  color: #2a2a2a;
}
.board-notes > * { position: absolute; box-shadow: 1px 3px 5px rgba(30, 15, 0, 0.3); }

/* Cinta métrica amarilla */
.bn-tape {
  left: -30px;
  bottom: 34px;
  width: 420px;
  height: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 6px 3px;
  background:
    repeating-linear-gradient(90deg, #222 0 1px, transparent 1px 19px) left top / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, #222 0 1px, transparent 1px 3.8px) left top / 100% 4px no-repeat,
    #f4d23c;
  border-top: 1px solid #c9a400;
  border-bottom: 1px solid #c9a400;
  font: 700 9px "Helvetica Neue", Arial, sans-serif;
  transform: rotate(8deg);
  transform-origin: left bottom;
}

/* Papel de patrón con línea de corte punteada e hilo */
.bn-pattern {
  left: 34px;
  top: 172px;
  width: 168px;
  height: 128px;
  padding: 16px 14px;
  background:
    linear-gradient(rgba(120, 90, 50, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(120, 90, 50, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    #f2e9d4;
  clip-path: polygon(0 8%, 62% 0, 100% 14%, 96% 100%, 4% 94%);
  transform: rotate(-5deg);
  box-shadow: none;
  filter: drop-shadow(1px 3px 3px rgba(30, 15, 0, 0.3));
}
.bn-pattern::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px dashed #b0392f;
  clip-path: polygon(0 8%, 62% 0, 100% 14%, 96% 100%, 4% 94%);
}
.bn-grain { position: absolute; right: 18px; bottom: 16px; font: 30px/1 Arial, sans-serif; color: #555; }
.bn-pattern-text { margin-top: 22px; font-size: 13px; white-space: nowrap; }
.bn-pattern-small { margin-top: 6px; font-size: 11px; color: #666; }

/* Muestras de tela con orilla de tijera zigzag */
.bn-swatches { right: 30px; top: 26px; width: 150px; height: 110px; box-shadow: none; }
.bn-swatch {
  position: absolute;
  width: 74px;
  height: 74px;
  clip-path: polygon(0 0, 8% 4%, 16% 0, 24% 4%, 32% 0, 40% 4%, 48% 0, 56% 4%, 64% 0, 72% 4%, 80% 0, 88% 4%, 96% 0, 100% 8%, 96% 16%, 100% 24%, 96% 32%, 100% 40%, 96% 48%, 100% 56%, 96% 64%, 100% 72%, 96% 80%, 100% 88%, 96% 96%, 100% 100%, 0 100%);
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.3));
}
.bn-swatch-plaid {
  left: 0; top: 10px; transform: rotate(-9deg);
  background:
    repeating-linear-gradient(0deg, rgba(20, 30, 90, 0.55) 0 6px, transparent 6px 14px),
    repeating-linear-gradient(90deg, rgba(20, 30, 90, 0.55) 0 6px, transparent 6px 14px),
    repeating-linear-gradient(90deg, rgba(240, 200, 40, 0.8) 0 1px, transparent 1px 14px),
    #8fb4e0;
}
.bn-swatch-denim {
  left: 42px; top: 0; transform: rotate(7deg);
  background: repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 3px), #36507a;
}
.bn-swatch-felt {
  left: 70px; top: 34px; transform: rotate(-3deg);
  background: radial-gradient(rgba(0, 0, 0, 0.2) 0.8px, transparent 1.3px) 0 0 / 4px 4px, #b3171d;
}
.bn-size {
  position: absolute;
  left: 30px; top: 78px;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #999;
  font: 700 12px "Helvetica Neue", Arial, sans-serif;
  transform: rotate(-12deg);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.25);
}

/* Hoja de cuaderno con las frases del brainstorm */
.bn-lined {
  right: 30px;
  top: 158px;
  width: 168px;
  padding: 10px 12px 12px 26px;
  background:
    linear-gradient(90deg, transparent 18px, rgba(220, 60, 60, 0.5) 18px 19px, transparent 19px),
    repeating-linear-gradient(transparent 0 21px, rgba(70, 110, 190, 0.35) 21px 22px),
    #fbfbf7;
  background-position: 0 0, 0 9px, 0 0;
  font-size: 16px;
  line-height: 22px;
  transform: rotate(3deg);
}

/* Notita verde limón */
.bn-lime {
  left: 52px;
  bottom: 82px;
  padding: 10px 14px;
  background: var(--lime);
  font: 700 15px/1.25 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.03em;
  transform: rotate(-4deg);
}

/* Croquis de figurín a lápiz */
.bn-croquis {
  right: 52px;
  bottom: 18px;
  width: 92px;
  height: 196px;
  padding: 4px;
  background: #fff;
  transform: rotate(-4deg);
}
.bn-croquis svg { width: 100%; height: 100%; }

/* Imperdible, carrete de hilo y botón */
.bn-pin {
  left: 214px;
  top: 168px;
  width: 54px;
  height: 12px;
  border: 2px solid #9aa0a6;
  border-radius: 6px 10px 10px 6px;
  background: transparent;
  box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.3);
  transform: rotate(-28deg);
}
.bn-pin::after { content: ""; position: absolute; left: -6px; top: -2px; width: 10px; height: 12px; border-radius: 3px; background: #b8bec4; }
.bn-spool {
  left: 176px;
  bottom: 88px;
  width: 26px;
  height: 34px;
  background:
    linear-gradient(#c49a6c, #c49a6c) top / 100% 5px no-repeat,
    linear-gradient(#c49a6c, #c49a6c) bottom / 100% 5px no-repeat,
    repeating-linear-gradient(0deg, #b3171d 0 2px, #8e1015 2px 3px);
  border-radius: 2px;
  transform: rotate(14deg);
}
.bn-button {
  left: 226px;
  top: 300px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 40%, #222 1.6px, transparent 2px),
    radial-gradient(circle at 62% 40%, #222 1.6px, transparent 2px),
    radial-gradient(circle at 38% 62%, #222 1.6px, transparent 2px),
    radial-gradient(circle at 62% 62%, #222 1.6px, transparent 2px),
    #e9dfc9;
  border: 2px solid #cbbd9e;
}

/* Tablero del equipo: menos cosas, como una prueba de fitting */
.board-notes-sub .bn-tape { bottom: 18px; transform: rotate(-3deg); }
.board-notes-sub .bn-fitting { top: 16px; right: 8px; width: auto; font-size: 12px; line-height: 19px; padding: 6px 10px 8px 24px; background-position: 0 0, 0 5px, 0 0; transform: rotate(3deg); }
.bn-pin-sub { left: auto; right: 60px; top: auto; bottom: 26px; }
.bn-button-sub { left: auto; right: 190px; top: auto; bottom: 64px; }

@media (max-width: 700px) { .board-notes { display: none; } }

/* Todas las anotaciones con la tipografía de la marca (como el logo "amisdunet.") */
.board-notes,
.bn-lined,
.bn-pattern-text,
.bn-pattern-small,
#gallery.skin-board #gallery-empty {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.bn-lined { font-size: 14px; }
.board-notes-sub .bn-fitting { font-size: 12px; }
.bn-pattern-text { font-size: 12px; }
.bn-pattern-small { font-weight: 500; }
