/* =========================================================
   CSS Cinemático Tema Hogwarts: "#sec-buzon" scope
========================================================= */

/* Tokens de diseño: colores, sombras y transiciones globales */
:root {
  --color-gold:        #c9a84c;              /* Dorado mágico principal */
  --color-gold-soft:   rgba(201,168,76,0.25);/* Dorado translúcido para glow */
  --color-ice:         #7bb3d4;              /* Azul hielo secundario */
  --color-ice-soft:    rgba(123,179,212,0.25);/* Azul hielo translúcido */
  --color-parchment:   #f3e6c8;              /* Color de pergamino (fondo claros) */
  --color-stone:       rgba(16,24,40,0.9);   /* Color oscuro tipo piedra para paneles */
  --bg-void:           #060913;              /* Fondo muy oscuro (cielo profundo) */

  --shadow-light:      rgba(0,0,0,0.35);     /* Sombra suave */
  --shadow-deep:       rgba(0,0,0,0.75);     /* Sombra profunda */
  --radius:           0.65rem;               /* Radio general de bordes */
  --ease:             cubic-bezier(0.16, 1, 0.3, 1); /* Curva genérica de animación */
}

/* =========================
   CONTENEDOR PRINCIPAL
========================= */
#sec-buzon {
  position: relative;
  padding: clamp(32px, 5vw, 64px);
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #1a2d52 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-void) 0%, #0d1f3a 60%);
  color: #d8e0ee;
  font-family: "Cinzel", serif;
  isolation: isolate;
  overflow: hidden;
}

/* Grid sutil de fondo para textura */
#sec-buzon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* =========================
   CAPAS DE FONDO
========================= */

/* Sigilo dorado giratorio (reliquia mágica) */
.bz-bg-sigil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.06;
  pointer-events: none;
  animation: sigil-spin 220s linear infinite;
}
@keyframes sigil-spin {
  to { transform: rotate(360deg); }
}

/* Partículas flotantes (polvo estelar) */
#bz-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

/* Animación de flotación para polvo */
@keyframes dust-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-50px); }
}
canvas {
  /* (JavaScript dibuja partículas; se aplica un filtro de movimiento) */
  filter: blur(1px);
  animation: dust-float 30s linear infinite;
}

/* =========================
   CABECERA CINEMÁTICA
========================= */
.bz-hero {
  position: relative;
  z-index: 5;
  text-align: center;
  margin-bottom: 40px;
}

.bz-hero-eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.bz-eyebrow-text {
  font-family: var(--f-display, "Cinzel");
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--color-gold);
  opacity: 0.7;
}

.bz-hero-title {
  font-family: var(--f-display, "Cinzel");
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(120deg, #f2de98, var(--color-gold), #9c7520);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(201,168,76,0.18));
}

.bz-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.bz-divider-line {
  width: 100px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
  opacity: 0.5;
}
.bz-divider-crest {
  fill: var(--color-gold);
  opacity: 0.85;
}

/* =========================
   ÁREA PRINCIPAL (GRID)
========================= */
.bz-owlery-room {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .bz-owlery-room {
    grid-template-columns: 1fr;
  }
  .bz-hero-title {
    font-size: 2.4rem;
  }
}

/* =========================
   TABLONES (PANELES)
========================= */
.bz-board {
  position: relative;
  background: var(--color-stone);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 70px var(--shadow-light);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.bz-board:hover {
  transform: translateY(-4px);
  box-shadow: 0 35px 100px var(--shadow-deep);
}

/* Acento decorativo lateral dorado/hielo */
.bz-board-accent {
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  background: linear-gradient(to bottom,
    transparent, var(--color-gold) 40%, var(--color-gold-soft) 60%, transparent);
  opacity: .6;
}
.bz-board-accent--ice {
  background: linear-gradient(to bottom,
    transparent, var(--color-ice) 40%, var(--color-ice-soft) 60%, transparent);
}

/* Sello/monograma en esquina */
.bz-board-seal {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  opacity: .2;
  pointer-events: none;
  transform: scale(1.1);
}
.bz-board-seal svg {
  stroke: var(--color-gold);
}

/* Contenido interno del tablero */
.bz-board-inner {
  position: relative;
  z-index: 2;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}

/* Título del tablero con icono */
.bz-board-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display, "Cinzel");
  font-size: 1.1rem;
  letter-spacing: .1em;
  color: var(--color-gold);
  margin-bottom: 14px;
}
.bz-board-title--ice {
  color: var(--color-ice);
}
.bz-board-icon {
  width: 28px; height: 28px;
  stroke: currentColor;
}
.bz-board-title svg {
  stroke-width: 1.2;
}

/* =========================
   PESTAÑAS (TABS)
========================= */
.bz-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
}
.bz-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 4px;
  font-family: var(--f-display, "Cinzel");
  font-size: .58rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #6f849e;
  cursor: pointer;
  transition: .2s;
}
.bz-tab:hover:not(.bz-tab--active) {
  background: rgba(255,255,255,0.07);
  color: #9fbdd4;
}
.bz-tab--active {
  background: var(--color-gold-soft);
  color: var(--color-gold);
}
.bz-tabs--ice .bz-tab--active {
  background: var(--color-ice-soft);
  color: var(--color-ice);
}

/* =========================
   LISTA DE CARTAS
========================= */
.bz-letters-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

/* Tarjeta de carta */
.bz-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.bz-card:hover {
  transform: translateX(6px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(201,168,76,0.22);
  box-shadow: -4px 0 12px rgba(201,168,76,0.05), 0 4px 12px var(--shadow-light);
}

/* Borde lateral según estado */
.bz-card-edge {
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 4px;
  border-radius: 2px;
}
.bz-card.unread .bz-card-edge {
  background: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold-soft);
}
.bz-card.draft .bz-card-edge {
  background: #60a5fa;
}
.bz-card.sched .bz-card-edge {
  background: #fbbf24;
}

/* Icono de carta */
.bz-card-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  color: #4a5e78;
  display: flex; align-items: center; justify-content: center;
  stroke: currentColor;
  stroke-width: 1.5;
}
.bz-card.unread .bz-card-icon {
  background: var(--color-gold-soft);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--color-gold);
}
.bz-card.draft .bz-card-icon {
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.3);
  color: #60a5fa;
}
.bz-card.sched .bz-card-icon {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
}

/* Contenido de la carta */
.bz-card-info {
  min-width: 0;
  flex: 1;
}
.bz-card-subject {
  font-family: var(--f-body, "Cormorant Garamond");
  font-size: .95rem;
  font-weight: 600;
  color: #e7eef9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bz-card.unread .bz-card-subject {
  color: #f0f5ff;
}
.bz-card-date {
  font-family: var(--f-display, "Cinzel");
  font-size: .6rem;
  letter-spacing: .08em;
  color: #67809b;
  margin-top: 2px;
  text-transform: uppercase;
}

/* =========================
   BOTÓN REDACTAR / ENVIAR
========================= */
.bz-board-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}
.bz-compose-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--color-gold-soft);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 8px;
  color: var(--color-gold);
  font-family: var(--f-display, "Cinzel");
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.bz-compose-btn:hover {
  transform: translateY(-2px);
  background: rgba(201,168,76,0.2);
}
.bz-compose-btn--ice {
  background: var(--color-ice-soft);
  border-color: rgba(123,179,212,0.28);
  color: var(--color-ice);
}
.bz-compose-btn--ice:hover {
  background: rgba(123,179,212,0.2);
}

/* =========================
   OVERLAY DEL PERGAMINO (CARTA)
========================= */
/* Overlay completo oculto por defecto */
#letter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,7,18,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}
#letter-overlay.open {
  display: flex;
}

/* Ventana de la carta */
.ltr-window {
  width: min(800px, 90vw);
  background: #f3e6c8;
  border-radius: 16px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
  color: #2a1b0f;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Encabezado del pergamino */
.ltr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(30,18,8,0.1);
}
.ltr-header-glyph svg {
  stroke: var(--color-gold);
  opacity: .85;
}
.ltr-window-title {
  font-family: var(--f-display, "Cinzel");
  font-size: 1rem;
  letter-spacing: .08em;
  color: #8b6540;
}
.ltr-close-btn {
  background: transparent;
  border: none;
  color: #8b0f0f;
  cursor: pointer;
  font-size: 1rem;
  transition: color .2s;
}
.ltr-close-btn:hover {
  color: #cf2a2a;
}

/* Cuerpo desplazable de contenido */
.ltr-body-scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding: 18px 20px;
  -webkit-overflow-scrolling: touch;
}

/* ── PANEL DE COMPOSICIÓN ── */
#letter-pane-compose {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ltr-tool-selector {
  display: flex;
  gap: 8px;
}
.ltr-tool-btn {
  background: transparent;
  border: 1px solid rgba(30,18,8,0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--f-display, "Cinzel");
  font-size: .65rem;
  color: #4a2e08;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.ltr-tool-btn[aria-pressed="true"] {
  background: rgba(139,100,40,0.12);
  color: #4a2e08;
}
.ltr-tool-btn:hover {
  background: rgba(30,18,8,0.1);
}

.ltr-paper {
  position: relative;
  background: var(--color-parchment);
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.08),
    inset 0 4px 8px rgba(0,0,0,0.1),
    0 0 0 1px rgba(201,168,76,0.18),
    0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.ltr-paper-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(30,18,8,0.05) 1px, transparent 1px);
  background-size: 100% 30px;
  border-radius: 12px;
  pointer-events: none;
}

/* Área de texto */
#paper-text-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ltr-subject-input {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(30,18,8,0.1);
  font-family: var(--f-display, "Cinzel");
  font-size: 1rem;
  color: #5a4323;
}
.ltr-subject-input::placeholder {
  color: rgba(30,18,8,0.4);
  font-style: italic;
}
.ltr-subject-rule {
  height: 1px;
  width: 100%;
  background: rgba(30,18,8,0.1);
  pointer-events: none;
}
.ltr-body-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--f-body, "Cormorant Garamond");
  font-size: 1rem;
  line-height: 1.6;
  color: #5a4323;
}
.ltr-body-textarea::placeholder {
  color: rgba(30,18,8,0.3);
  font-style: italic;
}

/* Área de dibujo */
#paper-canvas-area {
  display: none; /* Oculto hasta seleccionar herramienta "draw" */
}

/* Herramientas de dibujo */
.ltr-canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ltr-ink-palette {
  display: flex;
  gap: 6px;
}
.ltr-ink-palette button {
  width: 20px; height: 20px;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.ltr-ink-palette button:hover {
  transform: scale(1.15);
}
.ltr-ink-palette button.active {
  border-color: rgba(30,18,8,0.6);
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}
.ltr-toolbar-divider {
  width: 1px; height: 24px;
  background: rgba(30,18,8,0.1);
}
.ltr-brush-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: #5a4323;
}
.ltr-brush-range {
  flex: 1;
}

/* Botón Limpiar lienzo */
.ltr-clear-btn {
  background: transparent;
  border: 1px solid rgba(30,18,8,0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--f-display, "Cinzel");
  font-size: .65rem;
  color: #5a4323;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.ltr-clear-btn:hover {
  background: rgba(30,18,8,0.1);
  color: #3a2e27;
}

/* Opciones de publicación */
.ltr-publish-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ltr-field-label {
  font-family: var(--f-display, "Cinzel");
  font-size: .6rem;
  letter-spacing: .08em;
  color: #5a4323;
}
.ltr-select, .ltr-input {
  padding: 6px 8px;
  border: 1px solid rgba(30,18,8,0.1);
  border-radius: 6px;
  background: white;
  font-family: var(--f-body, "Cormorant Garamond");
  font-size: .9rem;
  color: #5a4323;
}

/* =========================
   PANEL DE LECTURA
========================= */
#letter-pane-read {
  display: none;
}
.ltr-wax-container {
  position: relative;
  text-align: center;
  padding: 20px 0;
}
.ltr-wax-ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(220,38,38,0.15) 0%, transparent 60%);
  opacity: .6;
  pointer-events: none;
  animation: wax-glow 2.5s ease-in-out infinite;
}
@keyframes wax-glow {
  0%,100% { transform: scale(1); opacity: .5; }
  50%      { transform: scale(1.2); opacity: 1; }
}
.ltr-wax-seal {
  width: 68px; height: 68px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.35) 0%, transparent 10%),
    radial-gradient(circle at 35% 30%, #f05050 0%, #a01010 55%, #500606 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.5),
    0 0 20px rgba(220,38,38,0.18),
    inset 0 3px 4px rgba(255,255,255,0.25),
    inset 0 -6px 10px rgba(0,0,0,0.55);
  position: relative;
  transform: rotate(-7deg);
  transition: transform .25s var(--ease), box-shadow .25s;
}
/* Anillo grabado alrededor del sello, como cera prensada con un molde */
.ltr-wax-seal::before {
  content: "";
  position: absolute; inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(255,220,200,0.3);
  box-shadow: inset 0 0 0 1px rgba(80,6,6,0.5), inset 0 2px 3px rgba(0,0,0,0.4);
  pointer-events: none;
}
/* Goterones de cera irregulares en el borde, para que no sea un círculo perfecto */
.ltr-wax-seal::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 46% 54% 51% 49% / 53% 47% 53% 47%;
  background: radial-gradient(circle at 35% 30%, #8a1414 0%, transparent 55%);
  z-index: -1;
  opacity: .8;
  pointer-events: none;
}
.ltr-wax-seal:hover {
  transform: rotate(0) scale(1.1);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.5),
    0 0 30px rgba(220,38,38,0.28),
    inset 0 3px 4px rgba(255,255,255,0.3),
    inset 0 -6px 10px rgba(0,0,0,0.5);
}
.ltr-wax-hint {
  margin-top: 12px;
  font-family: var(--f-display, "Cinzel");
  font-size: .6rem;
  letter-spacing: .12em;
  color: #6b6060;
  animation: wax-hint-blink 2.5s ease-in-out infinite;
}
@keyframes wax-hint-blink {
  0%,100% { opacity: .3; }
  50%      { opacity: .9; }
}

/* Libro abierto: texto de la carta */
.ltr-read-paper {
  position: relative;
  background: var(--color-parchment);
  border-radius: 12px;
  padding: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(30,18,8,0.1),
    inset 0 2px 6px rgba(44,24,8,0.1),
    0 32px 80px rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
}
.ltr-read-meta {
  font-family: var(--f-display, "Cinzel");
  font-size: .6rem;
  color: #83694f;
  margin-bottom: 10px;
}
.ltr-read-rule {
  width: 100%;
  height: 1px;
  background: rgba(30,18,8,0.1);
  margin: 10px 0;
}
.ltr-read-text {
  white-space: pre-wrap;
  font-family: var(--f-body, "Cormorant Garamond");
  font-size: 1rem;
  line-height: 1.6;
  color: #5a4323;
}
.ltr-read-canvas {
  max-width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(30,18,8,0.15);
  border-radius: 8px;
}

/* =========================
   PIE DE VENTANA (botones)
========================= */
.ltr-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid rgba(30,18,8,0.1);
  background: rgba(210,190,148,0.2);
}
.lf-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--f-display, "Cinzel");
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.lf-btn-cancel {
  background: transparent;
  border: 1px solid rgba(139,100,40,0.3);
  color: #8b6540;
}
.lf-btn-cancel:hover {
  background: rgba(139,100,40,0.08);
}
.lf-btn-save {
  background: linear-gradient(135deg, #a07828, #7a5416);
  border: 1px solid rgba(139,100,40,0.5);
  color: #f0d98a;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}
.lf-btn-save:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.4), 0 0 16px rgba(201,168,76,0.2);
  transform: translateY(-1px);
}
.lf-btn-close {
  background: transparent;
  border: 1px solid rgba(139,32,0,0.3);
  color: #8b2000;
}
.lf-btn-close:hover {
  background: rgba(139,32,0,0.08);
}

/* =========================
   ANIMACIONES REDUCIDAS
========================= */
@media (prefers-reduced-motion: reduce) {
  .bz-bg-sigil,
  #bz-particle-canvas,
  .ltr-window,
  .ltr-wax-ambient {
    animation: none !important;
  }
}

/* Plantillas editables para cartas y postales */
.ltr-design-tools {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(201,168,76,.22);
  border-radius: 12px;
  background: rgba(15,24,39,.62);
}
.ltr-template-picker {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px;
}
.ltr-template-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 5px;
  border: 1px solid rgba(243,230,200,.2);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
  color: #d8e0ee;
  font: 600 .65rem "Nunito",sans-serif;
  cursor: pointer;
  transition: background .16s ease,border-color .16s ease,transform .16s ease;
}
.ltr-template-option:hover { transform: translateY(-1px); border-color:rgba(201,168,76,.5); }
.ltr-template-option.active {
  border-color: #c9a84c;
  background: rgba(201,168,76,.14);
  box-shadow: 0 0 0 2px rgba(201,168,76,.12);
  color: #f3e6c8;
}
.ltr-template-swatch {
  display: block;
  width: 100%;
  height: 35px;
  border: 1px solid rgba(40,25,15,.15);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.ltr-template-swatch--classic { background:repeating-linear-gradient(0deg,#f3e6c8 0 7px,#e7d5b2 8px); }
.ltr-template-swatch--floral { background:radial-gradient(circle at 20% 20%,#e8a6ac 0 3px,transparent 4px),radial-gradient(circle at 80% 75%,#c88a79 0 4px,transparent 5px),linear-gradient(135deg,#fff8f4,#f3e4df); }
.ltr-template-swatch--scrapbook { background:linear-gradient(135deg,transparent 45%,rgba(179,116,84,.2) 46% 52%,transparent 53%),linear-gradient(45deg,#f7e1d3,#fff7e7 52%,#e5edf0); }
.ltr-template-swatch--postcard { background:linear-gradient(90deg,transparent 49%,#8bb9c5 50% 52%,transparent 53%),linear-gradient(135deg,#e9f4f4,#dcecf2); }
.ltr-art-upload { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.ltr-art-upload-btn,.ltr-art-remove {
  display:inline-flex;
  min-height:34px;
  align-items:center;
  justify-content:center;
  padding:7px 11px;
  border:1px solid rgba(201,168,76,.4);
  border-radius:999px;
  background:rgba(201,168,76,.11);
  color:#f3e6c8;
  font:700 .65rem "Nunito",sans-serif;
  cursor:pointer;
}
.ltr-art-remove { border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06); }
.ltr-art-remove[hidden] { display:none; }
.ltr-art-help { color:rgba(216,224,238,.64);font:500 .62rem "Nunito",sans-serif; }
.ltr-art-frame {
  position:relative;
  z-index:1;
  width:min(100%,390px);
  margin:12px auto;
  padding:7px;
  border:1px solid rgba(122,82,50,.22);
  border-radius:10px;
  background:rgba(255,255,255,.72);
  box-shadow:0 6px 16px rgba(47,30,17,.15);
  transform:rotate(-.5deg);
}
.ltr-art-frame[hidden] { display:none; }
.ltr-art-frame img { display:block;width:100%;max-height:250px;object-fit:cover;border-radius:5px; }
.ltr-paper[data-template="floral"],.ltr-read-paper[data-template="floral"] {
  background-color:#fff8f4;
  background-image:radial-gradient(ellipse at 0 0,rgba(218,147,153,.22),transparent 35%),radial-gradient(ellipse at 100% 100%,rgba(196,145,112,.2),transparent 34%);
  box-shadow:inset 0 0 0 2px rgba(190,130,124,.35),inset 0 0 0 7px rgba(255,255,255,.65),0 20px 60px rgba(0,0,0,.35);
}
.ltr-paper[data-template="floral"] .ltr-paper-lines,.ltr-read-paper[data-template="floral"] .ltr-paper-lines { background-image:linear-gradient(rgba(156,92,95,.055) 1px,transparent 1px); }
.ltr-paper[data-template="floral"]::after,.ltr-read-paper[data-template="floral"]::after {
  position:absolute;top:8px;right:13px;content:"✿  ❀";color:#c98c91;font-size:19px;letter-spacing:5px;opacity:.7;pointer-events:none;
}
.ltr-paper[data-template="floral"] .ltr-subject-input,.ltr-read-paper[data-template="floral"] .ltr-read-meta { color:#8d5360; }
.ltr-paper[data-template="floral"] .ltr-body-textarea,.ltr-read-paper[data-template="floral"] .ltr-read-text { color:#57433c;font-style:italic; }
.ltr-paper[data-template="scrapbook"],.ltr-read-paper[data-template="scrapbook"] {
  background-color:#fff8e9;
  background-image:linear-gradient(135deg,rgba(255,255,255,.7),transparent 55%),repeating-linear-gradient(0deg,transparent 0 28px,rgba(120,157,164,.12) 29px);
  box-shadow:inset 0 0 0 2px #c99473,inset 0 0 0 7px rgba(255,255,255,.66),0 20px 60px rgba(0,0,0,.35);
}
.ltr-paper[data-template="scrapbook"] .ltr-subject-input,.ltr-read-paper[data-template="scrapbook"] .ltr-read-meta { color:#87583d; }
.ltr-paper[data-template="scrapbook"] .ltr-body-textarea,.ltr-read-paper[data-template="scrapbook"] .ltr-read-text { color:#3e4d50; }
.ltr-paper[data-template="postcard"],.ltr-read-paper[data-template="postcard"] {
  background-color:#eff7f8;
  background-image:linear-gradient(90deg,transparent 49.5%,rgba(73,141,166,.24) 50%,transparent 50.5%),linear-gradient(135deg,rgba(255,255,255,.7),transparent 55%);
  box-shadow:inset 0 0 0 2px #6ca9ba,inset 0 0 0 7px rgba(255,255,255,.65),0 20px 60px rgba(0,0,0,.35);
}
.ltr-paper[data-template="postcard"] .ltr-subject-input,.ltr-read-paper[data-template="postcard"] .ltr-read-meta { color:#326d81; }
.ltr-paper[data-template="postcard"] .ltr-body-textarea,.ltr-read-paper[data-template="postcard"] .ltr-read-text { color:#294c5b; }
#paper-text-area,#paper-canvas-area { position:relative;z-index:1; }
.ltr-scheduled-lock {
  margin:18px 0;
  padding:24px 18px;
  border:1px solid rgba(201,168,76,.38);
  border-radius:14px;
  background:linear-gradient(145deg,rgba(201,168,76,.13),rgba(255,255,255,.04));
  color:#f3e6c8;
  font:600 .85rem/1.7 "Nunito",sans-serif;
  text-align:center;
}
.ltr-scheduled-lock strong { display:block;margin-bottom:5px;color:#f2de98;font-size:1rem; }

@media(max-width:600px) {
  .ltr-design-tools { padding:11px; }
  .ltr-template-picker { grid-template-columns:repeat(4,minmax(62px,1fr));overflow-x:auto; }
  .ltr-template-option { font-size:.58rem; }
  .ltr-template-swatch { height:30px; }
  .ltr-art-frame img { max-height:190px; }
}


/* =========================================================
   REDISEÑO — LECHUZARIO 3D + RESPONSIVE COMPLETO
   (Solo CSS — no se toca Buzon.js ni la estructura HTML)
========================================================= */

/* =========================================================
   ATMÓSFERA PROFUNDA — capas de fondo tipo Hogwarts Legacy
   (sin emojis: niebla, antorchas, torres, polvo mágico — todo
   con gradientes y formas, en capas para dar sensación de
   profundidad real)
========================================================= */

/* Capa 1: niebla lenta + polvo de estrellas, a media altura */
#sec-buzon::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* motas de polvo mágico, repetidas */
    radial-gradient(circle, rgba(201,168,76,0.55) 0%, transparent 70%) 6% 22% / 3px 3px,
    radial-gradient(circle, rgba(123,179,212,0.5) 0%, transparent 70%) 18% 68% / 2px 2px,
    radial-gradient(circle, rgba(201,168,76,0.4) 0%, transparent 70%) 34% 12% / 2.5px 2.5px,
    radial-gradient(circle, rgba(201,168,76,0.5) 0%, transparent 70%) 52% 78% / 2px 2px,
    radial-gradient(circle, rgba(123,179,212,0.45) 0%, transparent 70%) 67% 30% / 3px 3px,
    radial-gradient(circle, rgba(201,168,76,0.4) 0%, transparent 70%) 81% 58% / 2px 2px,
    radial-gradient(circle, rgba(201,168,76,0.55) 0%, transparent 70%) 93% 15% / 2.5px 2.5px,
    /* niebla difusa en capas */
    radial-gradient(ellipse 60% 40% at 15% 85%, rgba(90,120,180,0.18), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 15%, rgba(201,168,76,0.10), transparent 70%);
  background-repeat: no-repeat;
  animation: bz-motes-drift 26s ease-in-out infinite alternate;
  opacity: .9;
}
@keyframes bz-motes-drift {
  0%   { transform: translate3d(0,0,0); opacity: .75; }
  50%  { transform: translate3d(-6px,-10px,0); opacity: 1; }
  100% { transform: translate3d(4px,6px,0); opacity: .8; }
}

/* Capa 2: luces de antorcha a ambos lados, parpadeando de forma independiente */
.bz-hero { position: relative; }
.bz-hero::before,
.bz-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  width: clamp(140px, 22vw, 260px);
  height: clamp(140px, 22vw, 260px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,176,84,0.32) 0%, rgba(201,168,76,0.12) 45%, transparent 72%);
  filter: blur(2px);
  z-index: -1;
  pointer-events: none;
}
.bz-hero::before { left: -6%;  animation: bz-torch-flicker 3.4s ease-in-out infinite; }
.bz-hero::after   { right: -6%; animation: bz-torch-flicker 4.1s ease-in-out infinite reverse; }
@keyframes bz-torch-flicker {
  0%, 100% { opacity: .55; transform: scale(1); }
  30%      { opacity: .85; transform: scale(1.06); }
  55%      { opacity: .4;  transform: scale(.96); }
  78%      { opacity: .75; transform: scale(1.03); }
}

/* Capa 3: silueta de torres al fondo, tras los tablones — perspectiva/profundidad */
.bz-owlery-room { position: relative; }
.bz-owlery-room::before {
  content: "";
  position: absolute;
  left: -5%; right: -5%; bottom: -28px;
  height: 92px;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background: linear-gradient(180deg, transparent 0%, rgba(6,9,19,0.7) 55%, var(--bg-void) 100%);
  clip-path: polygon(
    0% 100%, 0% 58%, 5% 58%, 5% 30%, 9% 30%, 9% 58%, 15% 58%, 15% 44%,
    19% 44%, 19% 58%, 26% 58%, 26% 18%, 29% 18%, 29% 58%, 35% 58%, 35% 48%,
    39% 48%, 39% 58%, 46% 58%, 46% 28%, 49% 28%, 49% 58%, 55% 58%, 55% 46%,
    59% 46%, 59% 58%, 65% 58%, 65% 20%, 68% 20%, 68% 58%, 74% 58%, 74% 50%,
    78% 50%, 78% 58%, 84% 58%, 84% 34%, 87% 34%, 87% 58%, 93% 58%, 93% 46%,
    97% 46%, 97% 58%, 100% 58%, 100% 100%
  );
}

/* Viñeta profunda en los bordes, para dar sensación de sala iluminada por el centro */
#sec-buzon { box-shadow: inset 0 0 min(180px,18vw) 40px rgba(2,4,10,0.65); }

/* =========================================================
   TABLONES — de caja plana a placa tallada con luz real
========================================================= */

/* Arregla el vacío: mensaje "sin cartas" con icono y texto,
   antes sin ningún estilo (por eso se veía un hueco enorme) */
.bz-empty {
  flex: 1;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
  color: rgba(216,224,238,0.38);
  text-align: center;
}
.bz-empty-icon {
  width: 40px; height: 40px;
  opacity: .5;
  stroke: var(--color-gold);
}
.bz-empty-text {
  font-family: var(--f-display, "Cinzel");
  font-size: .74rem;
  font-style: italic;
  letter-spacing: .04em;
  max-width: 220px;
  line-height: 1.5;
}

/* Textura y luz real sobre el tablón: ya no es una caja de color plano */
.bz-board {
  background:
    /* veta/grano sutil, como madera o piedra pulida */
    repeating-linear-gradient(115deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 4px),
    /* luz que entra desde arriba-izquierda, como si la iluminara una antorcha cercana */
    radial-gradient(ellipse 140% 90% at 8% -10%, rgba(255,196,120,0.10), transparent 55%),
    /* sombra de profundidad hacia la esquina opuesta */
    radial-gradient(ellipse 120% 100% at 100% 120%, rgba(0,0,0,0.55), transparent 60%),
    linear-gradient(160deg, rgba(30,42,68,0.92) 0%, rgba(10,15,28,0.96) 55%, rgba(4,6,14,0.98) 100%);
  border: 1px solid rgba(201,168,76,0.16);
  border-radius: calc(var(--radius) + 6px);
}
/* Marco doble tallado: un borde interior más fino separado del exterior */
.bz-board::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: calc(var(--radius) + 1px);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 0 40px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 1;
}
/* Brillo de canto superior, como metal o madera pulida cogiendo la luz */
.bz-board::after {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,225,170,0.5), transparent);
  z-index: 1;
  pointer-events: none;
}
#board-bubu { border-color: rgba(123,179,212,0.18); }
#board-bubu::after { background: linear-gradient(90deg, transparent, rgba(170,215,240,0.5), transparent); }

/* Pestañas: de botones planos a un carril tallado con la activa en relieve */
.bz-tabs {
  background: rgba(0,0,0,0.28);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.bz-tab--active {
  background: linear-gradient(180deg, rgba(201,168,76,0.28), rgba(201,168,76,0.14));
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12), inset 0 0 0 1px rgba(201,168,76,0.35);
}
.bz-tabs--ice .bz-tab--active {
  background: linear-gradient(180deg, rgba(123,179,212,0.28), rgba(123,179,212,0.14));
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12), inset 0 0 0 1px rgba(123,179,212,0.35);
}

/* ── PROFUNDIDAD 3D EN LOS TABLONES: inclinados como colgados de una pared ── */
.bz-owlery-room { perspective: 1800px; }
.bz-board {
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateY(-1.4deg) rotateX(.6deg);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
#board-dudu { transform: rotateY(1.4deg) rotateX(.6deg); }
.bz-board:hover {
  transform: translateY(-6px) rotateX(3deg) rotateY(-3deg) translateZ(10px);
  box-shadow: 0 44px 120px var(--shadow-deep), 0 4px 22px rgba(201,168,76,0.14);
}
#board-dudu:hover { transform: translateY(-6px) rotateX(3deg) rotateY(3deg) translateZ(10px); }
.bz-board-seal { transition: transform .3s var(--ease); }
.bz-board:hover .bz-board-seal { transform: scale(1.25) rotate(8deg) translateZ(6px); }

/* Cartas: pequeño giro 3D al pasar el ratón, como si se levantaran del tablón */
.bz-letters-list { perspective: 900px; }
.bz-card { transform-style: preserve-3d; }
.bz-card:hover {
  transform: translateX(6px) rotateY(-4deg) translateZ(6px);
}

/* Botón de redactar con lift 3D */
.bz-compose-btn:hover {
  transform: translateY(-2px) rotateX(6deg);
}

/* ── EL PERGAMINO SE DESPLIEGA EN 3D AL ABRIRSE ── */
#letter-overlay { perspective: 1800px; }
#letter-overlay.open .ltr-window {
  transform-origin: top center;
  animation: ltr-unfold .5s var(--ease) both;
}
@keyframes ltr-unfold {
  0%   { transform: rotateX(-85deg) translateY(-30px); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: rotateX(0) translateY(0); opacity: 1; }
}

/* Lacre de cera: hundimiento 3D al pulsar */
.ltr-wax-container { perspective: 700px; }
.ltr-wax-seal:hover { transform: rotate(0) scale(1.12) translateZ(12px); }
.ltr-wax-seal:active { transform: rotate(0) scale(.94) translateZ(-4px); }

/* =========================================================
   RESPONSIVE — MÓVIL (≤780px, en línea con el resto de la app)
========================================================= */
@media (max-width: 780px) {

  #sec-buzon { padding: 20px 14px 32px; overflow-x: hidden; }

  .bz-hero { margin-bottom: 24px; }
  .bz-hero-title { font-size: clamp(1.7rem, 8vw, 2.1rem); letter-spacing: .08em; }
  .bz-eyebrow-text { font-size: .58rem; letter-spacing: .25em; }
  .bz-hero-eyebrow { gap: 8px; }
  .bz-divider-line { width: 56px; }

  .bz-owlery-room { gap: 16px; }
  .bz-board:hover { transform: none; } /* el hover 3D no aplica bien al tacto */
  .bz-board-inner { padding: 16px 15px; }
  .bz-board-title { font-size: 1rem; }
  .bz-board-seal { width: 36px; height: 36px; top: 8px; right: 8px; }

  /* Pestañas más cómodas al dedo */
  .bz-tabs { padding: 3px; gap: 4px; }
  .bz-tab { padding: 10px 4px; font-size: .56rem; letter-spacing: .1em; }

  /* Cartas: área de toque más grande */
  .bz-card { padding: 13px 12px; gap: 10px; }
  .bz-card:hover { transform: none; }
  .bz-card:active { background: rgba(255,255,255,0.06); }
  .bz-card-icon { width: 30px; height: 30px; }
  .bz-card-subject { font-size: 1rem; }

  /* Botón redactar: ancho completo, fácil de tocar */
  .bz-board-actions { margin-top: 14px; }
  .bz-compose-btn {
    width: 100%; justify-content: center; padding: 13px 18px; font-size: .72rem;
  }
  .bz-compose-btn:hover { transform: none; }
  .bz-compose-btn:active { transform: scale(.97); }

  /* ── El pergamino se convierte en hoja inferior, como el resto de la app ── */
  #letter-overlay {
    align-items: flex-end; padding: 0; backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .ltr-window {
    width: 100%; max-width: none; max-height: 94dvh;
    border-radius: 22px 22px 0 0;
  }
  #letter-overlay.open .ltr-window { animation: ltr-unfold-up .38s var(--ease) both; }
  @keyframes ltr-unfold-up {
    0%   { transform: translateY(100%); opacity: .4; }
    100% { transform: translateY(0);    opacity: 1;  }
  }
  .ltr-corner { display: none; } /* ornamento de esquinas de escritorio, sobra en hoja inferior */

  .ltr-header { padding: 16px 16px 12px; position: relative; }
  .ltr-header::before {
    content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px;
    margin-left: -19px; border-radius: 99px; background: rgba(30,18,8,0.18);
  }
  .ltr-window-title { font-size: .9rem; }

  .ltr-body-scroll { padding: 14px 16px; max-height: 68vh; }
  .ltr-paper { padding: 16px 13px; }
  .ltr-body-textarea { font-size: 1.05rem; }

  .ltr-tool-selector { gap: 6px; }
  .ltr-tool-btn { flex: 1; text-align: center; padding: 9px 6px; }

  .ltr-canvas-toolbar { flex-wrap: wrap; gap: 10px; }

  .ltr-wax-seal { width: 74px; height: 74px; }

  .ltr-footer {
    flex-wrap: wrap; gap: 8px; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  .ltr-footer .lf-btn { flex: 1; text-align: center; padding: 11px 12px; font-size: .62rem; }
}

@media (max-width: 360px) {
  .bz-hero-title { font-size: 1.5rem; }
  .bz-board-title { font-size: .92rem; }
  #sec-buzon::after { font-size: 1.2rem; }
}

/* Respeta "movimiento reducido" también para las nuevas animaciones */
@media (prefers-reduced-motion: reduce) {
  #sec-buzon::after,
  .bz-hero-eyebrow::before,
  #letter-overlay.open .ltr-window {
    animation: none !important;
  }
}


/* =========================================================================
   REDISEÑO DEFINITIVO — "TABLÓN DE MADERA Y PERGAMINO"
   Se abandona la estética de panel oscuro con brillos fríos tipo interfaz
   mágica de videojuego, y se sustituye por algo más fiel a Hogwarts:
   madera oscura de verdad, pergamino envejecido, cera y tinta.
   Todo lo de abajo tiene prioridad sobre lo anterior (va al final del
   archivo) y no toca el HTML ni el JS.
========================================================================= */

#sec-buzon {
  --ink: #3c2a18;
  --ink-soft: rgba(60,42,24,0.62);
  --parchment-1: #ecdcb2;
  --parchment-2: #dcc48c;
  --wax-red: #7a1f1f;
  --wood-1: #3c2812;
  --wood-2: #1c1208;
  --wood-deep: #100a05;
}

/* ── PARED DE MADERA (sustituye el cielo azul de fondo) ── */
#sec-buzon {
  background:
    /* vetas verticales de madera */
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0.16) 0px, transparent 3px, transparent 85px, rgba(0,0,0,0.10) 88px, transparent 92px, transparent 170px),
    repeating-linear-gradient(90deg,
      rgba(255,196,120,0.025) 0px, transparent 2px, transparent 150px),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255,176,84,0.10), transparent 60%),
    linear-gradient(180deg, var(--wood-1) 0%, var(--wood-2) 55%, var(--wood-deep) 100%);
}
#sec-buzon::before { opacity: 0; } /* la rejilla azulada ya no encaja aquí */
.bz-bg-sigil { opacity: .045; filter: sepia(1) saturate(2) hue-rotate(-10deg); }

/* ── CABECERA: tinta y oro sobre madera, no cian ── */
.bz-hero-title { color: var(--color-gold); text-shadow: 0 2px 10px rgba(0,0,0,.6), 0 0 26px rgba(201,168,76,0.22); }
.bz-eyebrow-text { color: rgba(233,214,168,0.75); }

/* ── TABLÓN: marco de madera con el pergamino pinchado encima ── */
.bz-board {
  background: linear-gradient(160deg, #4a3018 0%, #2a1a0c 100%);
  border: 1px solid rgba(0,0,0,0.5);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,220,170,0.08),
    inset 0 0 0 1px rgba(0,0,0,0.4);
}
.bz-board::before {
  /* veta de madera del marco + sombra tallada perimetral */
  content: "";
  position: absolute; inset: 0;
  border-radius: 14px;
  background: repeating-linear-gradient(100deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 22px rgba(0,0,0,0.6);
  opacity: .5;
  z-index: 0;
}
.bz-board::after { content: none; } /* fuera el filo brillante frío de antes */
#board-bubu, #board-dudu { border-color: rgba(0,0,0,0.5); }
#board-bubu::after, #board-dudu::after { content: none; }

/* El pergamino: el panel interior real, pinchado al tablón con una leve rotación */
.bz-board-inner {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(circle at 18% 12%, rgba(120,80,30,0.16), transparent 40%),
    radial-gradient(circle at 88% 85%, rgba(120,80,30,0.14), transparent 45%),
    radial-gradient(circle at 60% 50%, transparent 60%, rgba(90,60,25,0.12) 100%),
    linear-gradient(165deg, var(--parchment-1) 0%, var(--parchment-2) 100%);
  border-radius: 4px;
  padding: 22px 20px 20px;
  color: var(--ink);
  box-shadow:
    0 14px 30px rgba(0,0,0,.45),
    inset 0 0 26px rgba(90,55,20,0.35),
    inset 0 2px 3px rgba(255,255,255,0.35);
  transform: rotate(-0.6deg);
}
#board-bubu .bz-board-inner { transform: rotate(0.6deg); }

/* Puntilla / clavo que sujeta el pergamino al tablón */
.bz-board-inner::before {
  content: "";
  position: absolute; top: -9px; left: 50%; margin-left: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8d49a 0%, #a9863f 55%, #6b4f1f 100%);
  box-shadow: 0 3px 6px rgba(0,0,0,.55), inset 0 1px 1px rgba(255,255,255,.5);
  z-index: 3;
}
/* Borde rasgado del pergamino (deckle edge), simulado con sombras suaves repetidas */
.bz-board-inner::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(90,55,20,0.25),
    0 0 0 1px rgba(0,0,0,0.06);
  pointer-events: none;
}

/* Título: tinta oscura sobre pergamino, no dorado sobre azul */
.bz-board-title,
.bz-board-title--ice {
  color: var(--ink);
  text-shadow: none;
}
.bz-board-icon, .bz-board-title svg { stroke: var(--ink); }
.bz-board-seal svg { stroke: var(--ink-soft); }
.bz-board-seal { opacity: .28; }
.bz-board-accent, .bz-board-accent--ice { display: none; } /* ya no hace falta con el pergamino */

/* Pestañas: pasan a ser lengüetas de cuero/cinta sobre el pergamino */
.bz-tabs {
  background: rgba(60,42,24,0.08);
  box-shadow: inset 0 1px 4px rgba(60,42,24,0.28);
  border-radius: 7px;
}
.bz-tab { color: var(--ink-soft); }
.bz-tab:hover:not(.bz-tab--active) { background: rgba(60,42,24,0.08); color: var(--ink); }
.bz-tab--active,
.bz-tabs--ice .bz-tab--active {
  background: linear-gradient(180deg, var(--wax-red), #4a0f0f);
  color: #f3e6c8;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Vacío: tinta suave, no gris frío */
.bz-empty { color: rgba(60,42,24,0.45); }
.bz-empty-icon { stroke: var(--ink-soft); opacity: .7; }

/* Cartas: pequeños sobres de papel sobre el pergamino, no tarjetas de cristal */
.bz-card {
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(90,55,20,0.16);
  box-shadow: 0 1px 2px rgba(90,55,20,0.12);
}
.bz-card:hover {
  background: rgba(255,255,255,0.5);
  border-color: rgba(122,31,31,0.3);
  box-shadow: -3px 0 10px rgba(90,55,20,0.1), 0 3px 10px rgba(90,55,20,0.16);
}
.bz-card.unread .bz-card-edge { background: var(--wax-red); box-shadow: 0 0 8px rgba(122,31,31,0.35); }
.bz-card-icon { background: rgba(90,55,20,0.08); color: var(--ink-soft); }
.bz-card.unread .bz-card-icon { background: rgba(122,31,31,0.12); border-color: rgba(122,31,31,0.3); color: var(--wax-red); }
.bz-card-subject { color: var(--ink); }
.bz-card.unread .bz-card-subject { color: #1f1409; font-weight: 700; }
.bz-card-date { color: var(--ink-soft); }

/* Botón redactar: cera y tinta, no "chip" translúcido */
.bz-compose-btn,
.bz-compose-btn--ice {
  background: linear-gradient(180deg, var(--wax-red) 0%, #4a0f0f 100%);
  border: 1px solid rgba(0,0,0,0.35);
  color: #f3e6c8;
  box-shadow: 0 6px 16px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,0.14);
}
.bz-compose-btn:hover,
.bz-compose-btn--ice:hover {
  background: linear-gradient(180deg, #8a2626 0%, #551212 100%);
  transform: translateY(-2px);
}

/* Los tablones ya no se inclinan en 3D como paneles de cristal:
   ahora el que se inclina un pelín es el propio pergamino (arriba) */
.bz-board, #board-dudu, #board-bubu {
  transform: none;
}
.bz-board:hover, #board-dudu:hover, #board-bubu:hover {
  transform: translateY(-5px);
  box-shadow: 0 40px 100px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,220,170,0.1), inset 0 0 0 1px rgba(0,0,0,0.4);
}
.bz-board:hover .bz-board-inner { transform: rotate(0deg) scale(1.01); }
.bz-board:hover .bz-board-seal { transform: none; }

@media (max-width: 780px) {
  .bz-board-inner { padding: 18px 15px 16px; }
  .bz-board-inner::before { width: 12px; height: 12px; margin-left: -6px; top: -7px; }
}
