body.board-page {
  overflow: hidden;
  height: 100vh;
  background: var(--bg);
}
body.board-page > header {
  position: fixed;
  top: 0; right: 0;
  left: 64px;
  z-index: 30;
  background: var(--overlay-bg-faint);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 46px;
}
.tabs { display: none; }
body.board-page > header > h1 { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--fg); }

.tabs {
  display: flex; gap: 0.35rem;
  flex: 1; justify-content: center;
}
.tab {
  color: var(--muted); text-decoration: none;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tab:hover { background: var(--row-hover-bg); color: var(--fg); }
.tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.tab-disabled { opacity: 0.4; cursor: not-allowed; }

.toolbar { display: flex; gap: 0.6rem; align-items: center; }
.toolbar button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 0.9rem;
  width: 30px; height: 30px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.toolbar button:hover { background: var(--row-hover-bg); border-color: var(--muted); }
.toolbar .stat { display: flex; flex-direction: column; align-items: flex-end;
  font-size: 0.68rem; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.toolbar .stat label { font-size: 0.6rem; }
.toolbar .stat b { font-size: 0.95rem; color: var(--fg); font-variant-numeric: tabular-nums; }

.board-main {
  position: absolute;
  top: 46px; left: 64px; right: 0; bottom: 0;
}
.board-hint {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  background: var(--overlay-bg);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
  animation: hint-fade 6s ease-out forwards;
}
@keyframes hint-fade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}
.board-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  /* patrón de grid sutil */
  background-image:
    radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 50% 50%;
}
.board-canvas.panning { cursor: grabbing; }

.board-world {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.sticky {
  position: absolute;
  min-width: 180px;
  max-width: 240px;
  padding: 0.6rem 0.7rem 0.55rem;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #1a1a1a;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.18);
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.12s, transform 0.12s;
  border: 1px solid rgba(0,0,0,0.08);
  word-break: break-word;
}
.sticky:hover {
  box-shadow:
    0 2px 4px rgba(0,0,0,0.25),
    0 8px 20px rgba(0,0,0,0.25);
  transform: translate(-50%, -50%) scale(1.02);
  z-index: 10;
}
.sticky.dragging { cursor: grabbing; z-index: 100; opacity: 0.92; }
.sticky-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.35rem;
  opacity: 0.6;
}
.sticky-body { white-space: pre-wrap; }
.sticky-footer {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
  font-size: 0.6rem;
  opacity: 0.55;
}

/* colores por categoría (post-it classic palette) */
.sticky.cat-idea     { background: #FEF3BD; }
.sticky.cat-order    { background: #FFD0C3; }
.sticky.cat-strategy { background: #D4C5F9; }
.sticky.cat-question { background: #C7EEFF; }
.sticky.cat-other    { background: #E8E8E8; }

/* En dark mode, subir ligeramente la saturación para no molestar */
[data-theme="dark"] .sticky.cat-idea     { background: #E4D574; }
[data-theme="dark"] .sticky.cat-order    { background: #E6A593; }
[data-theme="dark"] .sticky.cat-strategy { background: #B4A3DF; }
[data-theme="dark"] .sticky.cat-question { background: #99CDE3; }
[data-theme="dark"] .sticky.cat-other    { background: #BDBDBD; }

.theme-toggle-btn::before { content: "🌙"; }
[data-theme="light"] .theme-toggle-btn::before { content: "☀️"; }

/* Panel lateral */
.detail-panel {
  position: fixed;
  right: 0; top: 60px; bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--overlay-bg-strong);
  border-left: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 25;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  overflow-y: auto;
  padding: 1rem 1.1rem;
}
.detail-panel.open { transform: translateX(0); }
.detail-panel h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.detail-panel p { font-size: 0.85rem; line-height: 1.5; white-space: pre-wrap; }
.detail-panel .meta { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.detail-panel .chip {
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}
.detail-panel .actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.detail-panel button {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
}
.detail-panel button:hover { background: var(--accent); color: var(--btn-save-fg); }
.detail-panel button.secondary { background: transparent; color: var(--muted); border-color: var(--border); }
.detail-panel button.secondary:hover { color: var(--fg); }
.detail-close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); width: 28px; height: 28px;
  border-radius: 4px; cursor: pointer;
}
