/* ===== Jack board — Trello-style, reuses app.css theme vars ===== */

#board-view {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 768px) {
  #board-view { grid-column: 1; }
}

.board-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 10px 10px 4px;
}

/* ---- project chips (per-project boards) ---- */
.board-projects {
  display: flex; gap: 7px; overflow-x: auto;
  padding: 2px 2px 10px; -webkit-overflow-scrolling: touch;
}
.board-projects::-webkit-scrollbar { display: none; }
.pchip {
  flex: 0 0 auto;
  padding: 7px 13px; border-radius: 20px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--bg-elev); color: var(--fg-muted);
  border: 1px solid var(--border-strong);
}
.pchip.active {
  background: var(--pc, var(--accent));
  color: #fff; border-color: transparent;
}

/* ---- brief banner ---- */
.brief-banner {
  display: block;
  width: 100%;
  text-align: left;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev));
  border: 1px solid var(--accent);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.brief-banner .brief-head {
  font-size: 12px; font-weight: 700; color: var(--accent);
  margin-bottom: 3px; letter-spacing: 0.01em;
}
.brief-banner .brief-text { font-size: 13px; line-height: 1.45; color: var(--fg); }

/* ---- lanes ---- */
.board-lanes {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 8px;
}
@media (max-width: 768px) {
  .board-lanes { overflow-x: visible; flex-direction: column; }
  .board-lanes .lane { width: 100%; }
}
@media (min-width: 769px) {
  .board-lanes { overflow-x: auto; }
  .board-lanes .lane { width: 270px; flex: 0 0 270px; }
}

.lane {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px;
}
.lane-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--fg);
  padding: 2px 4px 9px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.lane-head .lane-count { color: var(--fg-dim); font-weight: 600; }
.board-empty { padding: 24px 10px; color: var(--fg-dim); font-size: 13px; text-align: center; }

/* ---- card ---- */
.card {
  display: block; width: 100%; text-align: left;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 11px;
  padding: 9px 11px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.card:last-child { margin-bottom: 0; }
.card:active { transform: scale(0.99); }
.card.prio-urgent { border-left-color: #d1453b; }
.card.prio-high   { border-left-color: #e08a1e; }
.card.prio-normal { border-left-color: var(--border-strong); }
.card.prio-low    { border-left-color: var(--border); }

.card-title { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--fg); }
.card-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip {
  font-size: 10px; padding: 2px 7px; border-radius: 20px;
  font-weight: 600; white-space: nowrap;
}
.chip-prio { background: transparent; }
.chip-prio.urgent { color: #d1453b; }
.chip-prio.high { color: #c2680c; }
.chip-due { font-size: 10px; color: var(--fg-dim); }
.chip-blocked { background: color-mix(in srgb, #8b5cf6 18%, var(--bg-elev)); color: #7c3aed; }
.chip-check { font-size: 10px; color: var(--fg-dim); }

/* ---- ask-jack bar ---- */
.ask-jack-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 9px;
  margin: 4px 12px calc(10px + env(safe-area-inset-bottom));
  padding: 11px 14px;
  border-radius: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.ask-jack-mic { font-size: 15px; }
.ask-jack-text { flex: 1; font-size: 13px; color: var(--fg-dim); text-align: left; }
.ask-jack-go {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}

/* ---- "tap to hear" chip (autoplay-blocked fallback) ---- */
.hear-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 10px 16px;
  border-radius: 20px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 2px 10px rgba(124,92,252,0.35);
}
.hear-chip:active { transform: scale(0.97); }

/* ---- mic recording state ---- */
#jack-mic.rec {
  color: #d1453b;
  animation: micpulse 1.1s ease-in-out infinite;
}
@keyframes micpulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* ---- sheets (Jack chat + card modal) ---- */
.sheet {
  position: fixed; inset: 0;
  z-index: 40;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-panel {
  background: var(--bg);
  width: 100%; max-width: 640px;
  height: min(92vh, var(--app-height, 92vh));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.sheet .chat-head { border-bottom: 1px solid var(--border); }
.card-panel { height: min(80vh, var(--app-height, 80vh)); }

/* ---- card modal body ---- */
.card-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
.card-body .cb-project { font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.card-body .cb-section { font-size: 11px; font-weight: 700; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.04em; margin: 16px 0 7px; }
.card-body .cb-notes { font-size: 14px; line-height: 1.5; color: var(--fg); white-space: pre-wrap; }
.cb-check {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 7px 0; font-size: 14px; cursor: pointer;
}
.cb-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); }
.cb-check.done span { color: var(--fg-dim); text-decoration: line-through; }
.cb-lanes { display: flex; flex-wrap: wrap; gap: 7px; }
.cb-lane-btn {
  padding: 8px 13px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--fg); font-size: 13px; font-weight: 500;
}
.cb-lane-btn.active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.cb-jack-btn {
  margin-top: 18px; width: 100%; padding: 13px;
  border-radius: 11px; background: var(--grad); color: var(--accent-fg);
  font-weight: 600; font-size: 14px;
  box-shadow: 0 2px 10px rgba(124,92,252,0.32);
}
