/* Beat board (2026-11-16), the Beats view of a script in the Scripts tab. CineClic look: charcoal ground, hairline rules, numbered index,
   photo first, selection as corner brackets, a plain word rail instead of pills. Shared tokens with fallbacks so it reads on both looks. */

/* the word rail: Script | Beats, and Matches | All archives | Search on the shelf */
.bb-mode { display: flex; gap: 22px; margin: 0 0 16px; }
.bb-mode button { background: none; border: 0; padding: 0 0 6px; cursor: pointer; font: 600 26px/1 var(--display, "Inter Tight", system-ui, sans-serif); letter-spacing: -.02em; color: var(--dim, #8a8a8a); border-bottom: 2px solid transparent; }
.bb-mode button:hover { color: var(--muted, #bdbdbd); }
.bb-mode button.on { color: var(--ink, #fff); border-bottom-color: var(--ink, #fff); }
.bb-mode.small { gap: 18px; margin: 0 0 14px; }
.bb-mode.small button { font-size: 14px; letter-spacing: 0; padding-bottom: 4px; }
.bb-mode button:focus-visible, .bb-link:focus-visible, .bb-find:focus-visible, .bb-still:focus-visible, .bb-x:focus-visible, .bb-ruler button:focus-visible { outline: 2px solid var(--ink, #fff); outline-offset: 3px; }

.bb-wrap { max-width: 1160px; }
.bb-err { color: var(--signal, #ff3b30); font-size: 14px; line-height: 1.5; max-width: 640px; margin: 0 0 18px; }
.bb-hint { color: var(--muted, #9c9c9c); font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; max-width: 640px; }
.bb-dim { color: var(--dim, #8a8a8a); font-size: 12.5px; }
.bb-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink, #fff); font: 500 12.5px var(--body, system-ui); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair, rgba(255,255,255,.3)); }
.bb-link:hover { text-decoration-color: var(--ink, #fff); }

/* head: who has it, the voiceover, the draft, and how much is covered */
.bb-head { display: grid; gap: 14px; padding: 0 0 22px; border-bottom: 1px solid var(--line, rgba(255,255,255,.14)); margin-bottom: 4px; }
.bb-title { font: 600 34px/1.05 var(--display, "Inter Tight", system-ui, sans-serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.bb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--muted, #9c9c9c); font-size: 13px; }
.bb-meta b { color: var(--ink, #fff); font-weight: 600; }
.bb-meta audio { height: 34px; max-width: 100%; }
.bb-status { color: var(--dim, #8a8a8a); font-size: 12px; min-width: 52px; }
.bb-status.bad { color: var(--signal, #ff3b30); }
.bb-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; }
.bb-draftlink { color: var(--ink, #fff); font-weight: 600; text-underline-offset: 3px; }
.bb-draftfield { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; flex: 1 1 360px; }
.bb-draftfield span { color: var(--muted, #9c9c9c); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.bb-draftfield input { flex: 1 1 280px; min-width: 0; margin: 0; }
.bb-cover { display: grid; gap: 8px; }
.bb-ruler { display: flex; gap: 3px; flex-wrap: wrap; }
.bb-ruler button { width: 14px; height: 22px; padding: 0; border: 1px solid var(--hair, rgba(255,255,255,.28)); background: transparent; cursor: pointer; border-radius: 1px; }
.bb-ruler button.on { background: var(--ink, #fff); border-color: var(--ink, #fff); }
.bb-ruler button:hover { border-color: var(--ink, #fff); }
.bb-count { font-size: 13px; color: var(--muted, #9c9c9c); }
.bb-count b { color: var(--ink, #fff); font-size: 15px; font-variant-numeric: tabular-nums; }
.bb-gaps { color: var(--ink, #fff); }
.bb-stale { padding: 12px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.14)); color: var(--muted, #9c9c9c); font-size: 13.5px; line-height: 1.5; }

/* a beat: index, the line, then the footage */
.bb-beat { display: grid; grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 22px; padding: 22px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.14)); align-items: start; }
.bb-idx { font: 500 13px var(--mono, ui-monospace, "SF Mono", Menlo, monospace); color: var(--dim, #8a8a8a); padding-top: 6px; letter-spacing: .04em; }
.bb-beat.has .bb-idx { color: var(--ink, #fff); }
.bb-line { font: 500 21px/1.3 var(--display, "Inter Tight", system-ui, sans-serif); letter-spacing: -.015em; margin: 0 0 14px; text-wrap: pretty; }
.bb-dir { display: grid; gap: 6px; margin: 0; }
.bb-dir span { color: var(--muted, #9c9c9c); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.bb-dir textarea { margin: 0; min-height: 56px; resize: vertical; }
.bb-shots { display: grid; gap: 12px; min-width: 0; }
.bb-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.bb-shot { margin: 0; position: relative; min-width: 0; }
.bb-shot a { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel2, #1a1a1a); border-radius: 2px; }
.bb-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.bb-shot a:hover img { transform: scale(1.05); }
.bb-shot figcaption { color: var(--muted, #9c9c9c); font-size: 12px; line-height: 1.35; margin-top: 6px; overflow-wrap: anywhere; }
.bb-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .72); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.bb-x:hover { background: #000; }
.bb-empty { position: relative; display: grid; gap: 4px; align-content: center; min-height: 92px; padding: 16px 18px; color: var(--muted, #9c9c9c); font-size: 13px; line-height: 1.4; }
.bb-empty b { color: var(--ink, #fff); font-weight: 600; font-size: 14px; }
/* corner brackets mark an empty slot and a picked still, the same sign as selection elsewhere */
.bb-empty::before, .bb-empty::after, .bb-still i::before, .bb-still i::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; }
.bb-empty::before { top: 0; left: 0; border-top: 1.5px solid var(--dim, #8a8a8a); border-left: 1.5px solid var(--dim, #8a8a8a); }
.bb-empty::after { bottom: 0; right: 0; border-bottom: 1.5px solid var(--dim, #8a8a8a); border-right: 1.5px solid var(--dim, #8a8a8a); }
.bb-find { justify-self: start; background: transparent; color: var(--ink, #fff); border: 1px solid var(--hair, rgba(255,255,255,.28)); border-radius: 999px; padding: 9px 20px; font: 600 12.5px var(--body, system-ui); cursor: pointer; }
.bb-find:hover, .bb-find.on { border-color: var(--ink, #fff); }
.bb-beat.gap .bb-find { background: #fff; color: #111; border-color: #fff; }

/* the shelf */
.bb-shelf { grid-column: 2 / -1; padding: 18px 0 4px; border-top: 1px solid var(--line, rgba(255,255,255,.14)); margin-top: 8px; }
.bb-search { width: 100%; max-width: 420px; margin: 0 0 14px; }
.bb-grp { margin: 0 0 22px; }
.bb-grph { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 10px; }
.bb-grph h4 { margin: 0; font: 600 15px var(--display, "Inter Tight", system-ui, sans-serif); letter-spacing: -.01em; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.bb-still { position: relative; display: block; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; min-width: 0; font: inherit; }
.bb-still img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel2, #1a1a1a); border-radius: 2px; transition: transform .2s, opacity .2s; }
.bb-still span { display: block; color: var(--muted, #9c9c9c); font-size: 12px; line-height: 1.35; margin-top: 6px; overflow-wrap: anywhere; }
.bb-still i { position: absolute; inset: 0 0 auto 0; aspect-ratio: 16 / 9; pointer-events: none; opacity: 0; }
.bb-still i::before { top: -5px; left: -5px; border-top: 2px solid #fff; border-left: 2px solid #fff; }
.bb-still i::after { bottom: -5px; right: -5px; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.bb-still.on i { opacity: 1; }
.bb-still.on span { color: var(--ink, #fff); }
.bb-still:not(.on) img { opacity: .9; }
@media (hover: hover) { .bb-still:hover { z-index: 3; } .bb-still:hover img { transform: scale(1.18); opacity: 1; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); } }

/* phone: one column, bigger touch targets */
@media (max-width: 860px) {
  .bb-beat { grid-template-columns: 34px minmax(0, 1fr); }
  .bb-shots, .bb-shelf { grid-column: 1 / -1; }
  .bb-title { font-size: 26px; }
  .bb-line { font-size: 18px; }
  .bb-mode button { font-size: 22px; }
  .bb-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bb-ruler button { width: 16px; height: 26px; }
  .bb-find { padding: 12px 22px; }
  .bb-x { width: 34px; height: 34px; }
}
