/* FFA Media v2 -- design tokens first, so every screen matches. */
:root {
  --bg: #0E1113;
  --surface: #171B1F;
  --surface-2: #13171A;
  --surface-3: #1E2428;
  --line: #222930;
  --line-2: #2A3238;
  --text: #E8ECEF;
  --muted: #9AA4AD;
  --muted-2: #B6BFC6;
  --faint: #5E6870;
  --lime: #D4FF3A;
  --lime-ink: #0E1113;
  --red: #E5484D;
  --amber: #FFB547;
  --blue: #7FB8FF;
  --green: #46D18A;
  --font: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 16px;
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
a { color: var(--lime); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.spread { justify-content: space-between; }
.right { margin-left: auto; }
.tiny { font-size: 12px; color: var(--muted); }
.small { font-size: 13px; color: var(--muted-2); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: 1fr; min-height: 100vh; padding-bottom: calc(64px + var(--safe-b)); }
.rail { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar a, .rail a {
  flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px;
  font-weight: 600; position: relative;
}
.tabbar a svg, .rail a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on, .rail a.on { color: var(--lime); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.main { min-width: 0; padding: 14px 14px 28px; max-width: 1320px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.topbar img { height: 28px; width: auto; display: block; }
.topbar h1 { font-size: 20px; font-weight: 800; }
@media (min-width: 820px) {
  .app { grid-template-columns: 92px 1fr; padding-bottom: 0; }
  .rail {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none;
    padding: 14px 6px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .rail a { flex: none; width: 100%; border-radius: var(--r-s); min-height: 62px; }
  .rail a:hover { background: var(--surface-3); }
  .rail img { height: 30px; align-self: center; margin-bottom: 10px; }
  .rail .badge { left: calc(50% + 8px); }
  .tabbar { display: none; }
  .main { padding: 20px 24px 40px; }
}

/* ---------------------------------------------------------------- bits */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; }
.card.flat { background: var(--surface-2); }
.card h2 { font-size: 17px; font-weight: 700; }
.section-title { font-size: 20px; font-weight: 700; }
.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface-3); color: var(--text); font-weight: 600; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 800; }
.btn.ghost { background: transparent; }
.btn.outline { background: transparent; border-color: var(--lime); color: var(--lime); }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 64px; font-size: 17px; border-radius: 14px; font-weight: 800; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: 12px; border: 1px solid var(--line-2); background: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted-2); font-size: 12px; font-weight: 600; border: 1px solid transparent;
}
.chip.lime { background: rgba(212,255,58,.14); color: var(--lime); }
.chip.red { background: rgba(229,72,77,.16); color: #FF8A8E; }
.chip.amber { background: rgba(255,181,71,.16); color: var(--amber); }
.chip.blue { background: rgba(127,184,255,.16); color: var(--blue); }
.chip.green { background: rgba(70,209,138,.16); color: var(--green); }
button.chip { cursor: pointer; min-height: 36px; }
button.chip.on { background: var(--lime); color: var(--lime-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tabs button {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--muted-2); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
}
.tabs button.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 800; }
.tabs .n { font-family: var(--mono); font-size: 12px; opacity: .8; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=month], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; min-height: 46px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg);
  color: var(--text); padding: 0 12px; font-size: 16px;
}
textarea { padding: 10px 12px; min-height: 84px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.error { color: #FF8A8E; font-size: 14px; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kv { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.star { font-size: 22px; line-height: 1; background: none; border: 0; padding: 4px; color: var(--line-2); min-width: 36px; min-height: 40px; }
.star.on { color: var(--lime); }
.dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #0E1113; background: var(--faint); flex: none; }
.dot.kept { background: var(--lime); } .dot.to_review { background: var(--amber); } .dot.binned { background: var(--red); color: #fff; }
.dot.A { background: var(--amber); } .dot.B { background: var(--blue); }
.sep { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------------------------------------------------------------- toasts, modal */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(76px + var(--safe-b)); z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; align-items: center; }
@media (min-width: 820px) { .toasts { bottom: 20px; } }
.toast { pointer-events: auto; max-width: 560px; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.toast.error { border-color: var(--red); }
.toast.ok { border-color: var(--lime); }
.toast button { background: none; border: 0; color: var(--lime); font-weight: 700; min-height: 36px; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.66); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px 20px 0 0; padding: 16px 16px calc(20px + var(--safe-b)); }
@media (min-width: 820px) { .scrim { align-items: center; } .sheet { border-radius: 20px; } }
.sheet h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }

/* ---------------------------------------------------------------- login */
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.login img { height: 54px; align-self: flex-start; }

/* ---------------------------------------------------------------- day view */
.day-layout { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .day-layout { grid-template-columns: 340px minmax(0, 1fr); align-items: start; } }
.resume .frame { aspect-ratio: 16/9; background: #000; border-radius: var(--r-m) var(--r-m) 0 0; position: relative; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; }
.resume .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--line-2); }
.resume .bar i { display: block; height: 100%; background: var(--lime); }
.hour { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
.hour .t { font-family: var(--mono); font-size: 15px; color: var(--muted); padding-top: 18px; }
.zone { border: 1px dashed var(--line-2); border-radius: var(--r-m); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); min-height: 76px; }
.zone.drop { border-color: var(--lime); background: rgba(212,255,58,.07); }
.zone.target { border-style: solid; border-color: var(--line-2); }
.cams { display: flex; flex-wrap: wrap; gap: 8px; }
.cam {
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-3);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none;
}
.cam.picked { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(212,255,58,.35); }
.cam .d { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ghost-cam { position: fixed; z-index: 80; pointer-events: none; opacity: .92; transform: translate(-50%, -50%); }

/* ---------------------------------------------------------------- watch */
.watch { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .watch { grid-template-columns: minmax(0,1fr) 340px; align-items: start; } }
.player-box { aspect-ratio: 16/9; background: #000; border-radius: var(--r-m); overflow: hidden; position: relative; }
.player-box iframe, .player-box > div { width: 100%; height: 100%; display: block; border: 0; }
.cam-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.timeline { position: relative; padding-top: 34px; margin: 0 6px; }
.pins { position: relative; height: 34px; }
.pin {
  position: absolute; top: 0; transform: translateX(-50%); min-width: 32px; height: 32px; border-radius: 16px 16px 16px 4px;
  border: 0; font-weight: 800; font-size: 13px; color: #0E1113; background: var(--amber); padding: 0 8px;
}
.pin.kept { background: var(--lime); } .pin.binned { background: var(--red); color: #fff; }
.pin.goal { background: #fff; border: 2px solid var(--lime); }
.pin.group { border-radius: 16px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); }
.bars { position: relative; height: 16px; background: var(--surface-2); border-radius: 4px; }
.bars i { position: absolute; top: 2px; height: 12px; border-radius: 3px; background: var(--amber); opacity: .85; }
.bars i.kept { background: var(--lime); } .bars i.binned { background: var(--red); opacity: .5; } .bars i.live { background: var(--red); opacity: 1; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; pointer-events: none; }
.big-btns { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seek-btns { display: grid; gap: 8px; grid-template-columns: repeat(5, minmax(0,1fr)); }
.seek-btns .btn { padding: 0; }
.pop { position: absolute; z-index: 20; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 230px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.clip-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 0; text-align: left; width: 100%; min-height: 54px; }
.clip-row .name { font-size: 14px; font-weight: 600; }
.clip-row .rng { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.side { background: var(--surface); border-radius: var(--r-m); padding: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 80vh; overflow-y: auto; }
.rec { background: var(--red); color: #fff; font-weight: 700; font-size: 12px; padding: 5px 12px; border-radius: 999px; }
.score { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; font-family: var(--mono); font-size: 20px; }

/* ---------------------------------------------------------------- sync */
.sync-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .sync-grid.two { grid-template-columns: 1fr 1fr; } }
.nudges { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.step { display: flex; gap: 10px; align-items: center; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.step.on .n { background: var(--lime); color: var(--lime-ink); }
.step.done .n { background: var(--green); color: #0E1113; }

/* ---------------------------------------------------------------- cards */
.clip-card { display: flex; flex-direction: column; gap: 8px; }
.clip-card .top { display: flex; gap: 10px; align-items: flex-start; }
.clip-card .name { font-weight: 700; font-size: 16px; }
.thumb { width: 96px; aspect-ratio: 16/9; border-radius: 8px; background: #000 center/cover no-repeat; flex: none; border: 1px solid var(--line); }
.progress { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lime); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; }
.table td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.big-num { font-family: var(--mono); font-size: 44px; font-weight: 500; line-height: 1; }
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.msg .who { font-size: 12px; color: var(--muted); }
.banner { background: rgba(255,181,71,.12); border: 1px solid rgba(255,181,71,.4); border-radius: var(--r-m); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; margin-bottom: 14px; }
.banner.info { background: rgba(127,184,255,.1); border-color: rgba(127,184,255,.35); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- added with the remaining views ---- */
.unread { border-color: var(--lime); }
.kpi-big { font-family: 'JetBrains Mono', monospace; font-size: 44px; font-weight: 700; color: var(--lime); line-height: 1; }
.clip-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
a.card { color: inherit; text-decoration: none; display: flex; }
button.card { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
select, input[type="date"], input[type="url"], input[type="search"] { background: var(--surface); color: inherit; border: 1px solid var(--line, #2a3036); border-radius: 10px; padding: 10px; min-height: 44px; font: inherit; }
@media (max-width: 600px) { .hide-phone { display: none; } }

/* ---- tighter tabs / controls on phones ---- */
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .tabs { gap: 4px; }
  .tabs button { flex: 1 1 auto; justify-content: center; min-height: 40px; padding: 0 10px; font-size: 14px; gap: 4px; }
  .tabs button .tiny { font-size: 11px; opacity: .75; }
  .main { font-size: 15px; }
  select, input[type="search"], input[type="url"], input[type="date"] { min-height: 44px; font-size: 16px; }
  .clip-card .name { font-size: 16px; }
}

/* ---- redesign pass: match the canvas ---- */
.page-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.page-head img { height: 30px; width: auto; }
.page-head .page-name { font-weight: 800; font-size: 16px; }
.page-head .right { margin-left: auto; }
@media (min-width: 820px) { .page-head img { display: none; } }
.thumb { aspect-ratio: 16/9; background: #0A0D0F; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.datenav { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.datenav .icon-btn { background: var(--surface); }
.datenav .title { flex: 1; text-align: center; margin: 0; font-size: 22px; font-weight: 800; background: none; border: 0; color: inherit; position: relative; }
.datenav .title input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; }
.datenav .today { display: block; font-size: 12px; font-weight: 600; color: var(--lime); }
.resume { padding: 0 !important; overflow: hidden; }
.resume .thumb { border-radius: 0; }
.resume .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--line-2); }
.resume .bar i { display: block; height: 100%; background: var(--lime); }
.resume .resume-btn { margin-top: 6px; text-align: center; padding: 14px 0; border-radius: 12px; background: var(--lime); color: var(--lime-ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.zone.target { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.camrow { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); }
.camrow .n { font-weight: 600; font-size: 14px; flex: 1; }
.camrow .d { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.camrow .mv { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 13px; }
.camrow.picked { border-color: var(--lime); }
.sess-title { font-weight: 700; font-size: 15px; }
.sess-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.target-btn { min-height: 52px; border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left; padding: 0 16px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); width: 100%; }
.target-btn.go { background: var(--lime); color: var(--lime-ink); border: 0; }
/* selected tab/filter = light, lime only for primary actions */
.tabs button.on, button.chip.on { background: #E8ECEF; border-color: #E8ECEF; color: #0E1113; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 4px; background: var(--surface); padding: 4px; border-radius: 10px; }
.seg button { height: 40px; border-radius: 7px; border: 0; background: transparent; color: var(--muted-2); font-weight: 500; }
.seg button.on { background: #E8ECEF; color: #0E1113; font-weight: 600; }
.watch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.watch-title { margin: 0; font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-head .score { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 14px; }
.mark-btn { border: 1px solid var(--lime); background: transparent; color: var(--lime); font-weight: 700; min-height: 48px; width: 100%; }
.show-phone { display: none; }
@media (max-width: 600px) { .show-phone { display: block; } .watch-head .score { order: 5; width: 100%; justify-content: center; } }
.status-line { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted-2); min-height: 26px; }
.status-line .rec { background: var(--red); color: #fff; font-weight: 700; font-size: 11px; padding: 4px 10px; border-radius: 999px; }
.clip-card-w { background: var(--surface); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.clip-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clip-btns.three { grid-template-columns: 1fr 1fr 1fr; }
.clip-btns .btn { height: 56px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.start-btn { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); }
.end-btn { background: var(--red); border: 0; color: #fff; }
.end-btn[disabled] { opacity: .45; }
.goal-btn { background: var(--lime); color: var(--lime-ink); border: 0; font-weight: 800; }
@media (min-width: 820px) { .clip-btns .btn { height: 64px; font-size: 17px; border-radius: 14px; } }
.clip-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (min-width: 820px) { .clip-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.clip-tile { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.clip-tile .thumb { border-radius: 0; width: 100%; }
.clip-tile .body { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.clip-tile .name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.clip-tile .sess { font-size: 12px; color: var(--muted); }
.clip-tile .st { font-size: 12px; color: var(--amber); letter-spacing: 1px; }
.clip-tile .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tg { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted-2); }
.tg.blue { border-color: var(--blue); color: var(--blue); } .tg.amber { border-color: var(--amber); color: var(--amber); }
.stage-badge { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: #0E1113; background: #9CC8FF; }
.stage-badge.kept { background: var(--lime); } .stage-badge.binned { background: #FF9A9D; }
.len-badge { position: absolute; bottom: 6px; right: 6px; font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.75); color: #fff; }
.rv-layout { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 12px; }
.rv-stage { order: -1; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .rv-layout { grid-template-columns: 300px minmax(0,1fr); align-items: start; } .rv-stage { order: 0; } }
.rv-queue { background: var(--surface); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.rv-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); text-align: left; min-height: 56px; font: inherit; }
.rv-row.on { border: 2px solid var(--lime); background: var(--surface-3); }
.rv-row .n { display: block; font-size: 14px; font-weight: 600; }
.rv-row .r { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rv-actions .btn { height: 64px; border-radius: 14px; font-size: 18px; font-weight: 800; gap: 10px; }
.rv-bin { background: transparent; border: 1px solid #FF9A9D; color: #FF9A9D; }
.rv-keep { background: var(--lime); border: 0; color: var(--lime-ink); }
.rv-actions .k { font-family: var(--mono); font-size: 11px; opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.rv-mark { width: auto; padding: 0 16px; }
@media (max-width: 600px) { .rv-mark { width: 100%; order: 5; } }
.sess-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sess-card { background: #1A1F23; border: 1px solid #262D33; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.sess-card .thumb { border-radius: 8px; width: 100%; }
.pbar { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--lime); }
.tg.lime { border-color: var(--lime); color: var(--lime); }
.day-sep { grid-column: 1 / -1; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin: 8px 0 0; }
.sess-card .stage-badge { left: auto; }
.board { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(240px, 1fr)); overflow-x: auto; align-items: start; }
.board-col { background: #13171A; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; }
.lanes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; align-items: start; }
.lane { background: #13171A; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.ldot { width: 10px; height: 10px; border-radius: 50%; }
.scard { background: #1A1F23; border: 1px solid #262D33; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.scard .name { font-size: 15px; font-weight: 700; }
.scard .origin { font-size: 12px; color: var(--muted); } .scard .origin a { color: var(--blue); }
.plat { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; border: 1px dashed var(--line-2); color: var(--muted); text-decoration: none; }
.plat.on { border: 0; background: #25301A; color: var(--lime); }
.qbtn { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.qbtn.p { background: var(--lime); color: var(--lime-ink); border: 0; }
.step { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.step.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.step.done { background: #25301A; color: var(--lime); border-color: #25301A; }
.cam-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cam-box.on { border: 2px solid var(--lime); }
.big-time { font-size: 18px; }
.nudges { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; }
.nudge { height: 48px; border-radius: 10px; font-weight: 700; font-size: 13px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); }
.sync-grid.two { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 820px) { .sync-grid.two { grid-template-columns: 1fr 1fr; } }
.reel-layout { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .reel-layout { grid-template-columns: 320px minmax(0,1fr); align-items: start; } }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.login { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }
.sess-card .quick { background: transparent; border: 1px dashed var(--line-2); color: var(--muted-2); }
/* rail stays the icon rail (Johnson prefers it) */
.rail .brand { display: flex; justify-content: center; margin-bottom: 10px; }
.rail .brand img { height: 30px; margin: 0; }
.rail .brand span, .rail .who { display: none; }

/* page heading = small mono eyebrow + big title, as in the canvas */
.page-head { margin-bottom: 2px; }
.page-head .page-name { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page-head + h1.section-title, .page-head + .row h1 { font-size: 30px !important; font-weight: 800; letter-spacing: -.01em; }
@media (min-width: 820px) { .page-head + h1.section-title { font-size: 40px !important; } }
.clip-group { display: flex; flex-direction: column; gap: 10px; }
.group-head { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.group-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 0; }
.gtoggle { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); }
/* Day, as in the canvas */
.dayhead { margin-bottom: 18px; }
.dtitle { display: flex; flex-direction: column; position: relative; cursor: pointer; }
.dtitle .big { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.dtitle input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; }
@media (min-width: 820px) { .dtitle { flex: none; } .dtitle .big { font-size: 40px; } }
.daypills { margin-left: auto; display: flex; gap: 8px; }
.daypill { height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted-2); font-weight: 500; }
.daypill.on { background: #E8ECEF; color: #0E1113; border-color: #E8ECEF; font-weight: 600; }
.dayhead .today { font-size: 13px; color: var(--lime); display: inline-block; margin-top: 6px; }
@media (min-width: 820px) {
  .resume { display: grid !important; grid-template-columns: 320px 1fr; align-items: center; padding: 14px !important; gap: 20px; }
  .resume .thumb { border-radius: 10px; }
  .resume .rbody { display: grid !important; grid-template-columns: 1fr auto; align-items: center; column-gap: 20px; padding: 0 !important; }
  .resume .rbody > :not(.resume-btn) { grid-column: 1; }
  .resume .resume-btn { grid-column: 2; grid-row: 1 / span 3; padding: 16px 28px; font-size: 18px; }
  .srow { display: grid; grid-template-columns: 220px minmax(0,1fr) auto; align-items: center; gap: 14px; }
  .srow .scams { display: flex; flex-wrap: wrap; gap: 8px; }
  .srow .scams .camrow { min-width: 200px; }
  .srow .sact { display: flex; align-items: center; gap: 8px; }
}
.srow .sact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scams { display: flex; flex-direction: column; gap: 6px; }
.empty-hour { min-height: 56px; justify-content: center; border-style: solid; border-color: var(--line); background: transparent; }
.camrow::before { content: '⠿'; color: var(--faint); margin-right: 2px; }
@media (min-width: 820px) {
  .filters { flex-direction: row !important; flex-wrap: wrap; align-items: center; }
  .filters input[type=search] { max-width: 340px; }
  .filters select { width: auto; min-width: 180px; }
  .filters .row { flex-wrap: nowrap; }
}
.kbd { font-weight: 500; opacity: .7; margin-left: 4px; }
.hints { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.hints kbd { font-family: var(--mono); background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 8px; color: var(--text); margin-left: 8px; }
.status-line a { color: var(--muted-2); }
.newclip { border: 1px solid var(--red); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.watch-head .seg { min-width: 220px; }
.qthumb { width: 96px !important; flex: none; border-radius: 6px; }
@media (max-width: 600px) { .qthumb { width: 72px !important; } }
.rv-detail { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .rv-detail { grid-template-columns: minmax(0,1fr) 380px; align-items: start; } }
.rv-bin { background: #2A1D1D; border: 1px solid #5A2A2C; color: #FF9A9D; }
.side h2 { font-size: 20px; }
@media (min-width: 980px) { .watch-title { font-size: 30px; } .watch-head .eyebrow { font-size: 12px; } }
@media (max-width: 600px) { .daypills { display: none; } }

.playhead { background: var(--lime); width: 2px; border-radius: 1px; }
.zone.loose { border-style: dashed; }
.camrow { user-select: none; -webkit-user-select: none; cursor: grab; } .ghost-cam { position: fixed; z-index: 50; pointer-events: none; transform: translate(-30%, -50%) rotate(-1.5deg); }

/* Day timeline visualiser */
.tl-scroll{overflow-x:auto;margin:0 -4px;padding:0 4px}
.tl-inner{min-width:max(100%,calc(150px + var(--slots)*54px))}
.tl-row{display:grid;grid-template-columns:150px 1fr;align-items:center;min-height:34px}
.tl-label{position:sticky;left:0;z-index:2;background:var(--surface);padding-right:8px;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-head .tl-label{padding-top:8px}
.tl-track{position:relative;height:28px;border-left:1px solid var(--line)}
.tl-head .tl-track{height:8px}
.tl-axis .tl-track{height:22px;border-left:0}
.tl-tick{position:absolute;top:0;font:11px/1 var(--mono,monospace);color:var(--muted);transform:translateX(-50%)}
.tl-tick::after{content:"";position:absolute;left:50%;top:14px;height:1000px;border-left:1px solid var(--line);opacity:.35}
.tl-tick.half::after{opacity:.15}
.tl-bar{position:absolute;top:3px;height:22px;border-radius:7px;background:color-mix(in srgb,var(--c) 28%,transparent);border:1.5px solid var(--c);display:flex;align-items:center;padding:0 7px;font:11px var(--mono,monospace);color:var(--text);overflow:hidden;white-space:nowrap;min-width:6px}
.tl-bar.loose{border-style:dashed}
.tl-bar.guess{border-right-style:dotted}
.tl-bar.flag{box-shadow:0 0 0 2px #FFB454}
.tl-hint{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:12px;background:var(--surface-3,#1f242a)}
.tl-hint .btn{flex:none}
@media (max-width:600px){.tl-row{grid-template-columns:110px 1fr}.tl-inner{min-width:max(100%,calc(110px + var(--slots)*38px))}.tl-hint{flex-direction:column;align-items:stretch}}

/* Sign-in */
.signin{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:1fr;background:#05070A;grid-column:1/-1;width:100%}
.li-hero{position:relative;display:flex;flex-direction:column;gap:26px;padding:28px 22px 20px;overflow:hidden;background:#05070A}
.li-hero::after{content:"";position:absolute;right:-30%;bottom:-8%;width:90%;aspect-ratio:1/1.1;border:2px solid #1b2110;border-radius:6px;background:
 radial-gradient(circle at 50% 50%,transparent 17%,#1b2110 17.4%,#1b2110 18.6%,transparent 19%) ,
 linear-gradient(#1b2110,#1b2110) 50% 0/2px 100% no-repeat;pointer-events:none;opacity:.8}
.li-hero>*{position:relative;z-index:1}
.li-brand{display:flex;align-items:center;gap:14px;font-weight:700;font-size:18px}
.li-brand img{height:34px}
.li-eyebrow{font:600 12px var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--lime);margin-bottom:12px}
.li-copy h1{font-size:clamp(34px,10vw,46px);line-height:.98;letter-spacing:-.03em;margin:0 0 14px;font-weight:800}
.li-copy p{color:var(--muted-2);margin:0;max-width:34ch;font-size:15px;line-height:1.5}
.li-stats{display:flex;gap:22px;flex-wrap:wrap}
.li-stat b{display:block;font-size:22px;font-weight:800}
.li-stat span{font-size:12px;color:var(--muted)}
.li-panel{background:#111418;padding:26px 22px 40px;display:flex;align-items:flex-start;justify-content:center}
.li-form{width:100%;max-width:420px;display:flex;flex-direction:column;gap:14px}
.li-form h2{font-size:30px;margin:0;font-weight:800}
.li-sub{margin:-8px 0 4px;color:var(--muted)}
.li-form .field input{height:54px;background:#181c21;border:1px solid var(--line-2);border-radius:14px;font-size:16px;padding:0 16px;color:var(--text);width:100%;box-sizing:border-box}
.li-form .field input:focus{outline:2px solid var(--lime);outline-offset:1px}
.li-keep{display:flex;align-items:center;gap:12px;color:var(--muted-2);font-size:15px;cursor:pointer;min-height:44px}
.li-keep input{appearance:none;width:26px;height:26px;border-radius:7px;border:1.5px solid var(--line-2);background:#181c21;display:grid;place-items:center;flex:none;margin:0}
.li-keep input:checked{background:var(--lime);border-color:var(--lime)}
.li-keep input:checked::after{content:"";width:12px;height:6px;border:solid #0E1113;border-width:0 0 3px 3px;transform:rotate(-45deg) translate(1px,-1px)}
.li-go{height:58px;border:0;border-radius:14px;background:var(--lime);color:var(--lime-ink);font:800 18px var(--font);cursor:pointer}
.li-go:active{transform:translateY(1px)}
.li-forgot{text-align:center;color:var(--lime);margin:4px 0;font-size:15px}
.li-form hr{border:0;border-top:1px solid var(--line);width:100%;margin:6px 0}
.li-old{font-size:13px;color:var(--muted);margin:0}
.li-old a{color:var(--lime)}
@media (min-width:900px){
 .signin{grid-template-columns:minmax(0,1fr) 480px}
 .li-hero{padding:56px 64px 48px;justify-content:space-between}
 .li-hero::after{right:-6%;bottom:-14%;width:58%}
 .li-brand img{height:46px}
 .li-copy{margin-top:auto}
 .li-copy h1{font-size:clamp(56px,6.2vw,92px)}
 .li-copy p{font-size:19px;max-width:40ch}
 .li-stats{margin-top:60px;gap:36px}
 .li-stat b{font-size:34px}
 .li-panel{align-items:center;padding:40px}
}

/* Home */
.home{display:flex;flex-direction:column;gap:22px}
.hm-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap}
.hm-date{font:500 12px var(--mono);letter-spacing:.16em;color:var(--muted)}
.hm-head h1{margin:4px 0 0;font-size:clamp(30px,8vw,44px);letter-spacing:-.02em;font-weight:800}
.hm-kpi{text-align:right;color:var(--muted-2);text-decoration:none;font-size:14px}
.hm-kpi b{font-size:34px}.hm-kpi b.ok{color:var(--lime)}.hm-kpi b.warn{color:var(--amber)}
.hm-top{display:grid;grid-template-columns:1fr;gap:14px}
.hm-resume,.hm-needs,.hm-team,.hm-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-l)}
.hm-resume{display:grid;grid-template-columns:1fr;overflow:hidden}
.hm-rthumb{position:relative;background:#000;aspect-ratio:16/9}
.hm-rthumb .thumb,.hm-rthumb img{width:100%;height:100%;object-fit:cover;display:block}
.hm-rthumb .bar{position:absolute;left:0;right:0;bottom:0;height:5px;background:#2a3238}
.hm-rthumb .bar i{display:block;height:100%;background:var(--lime)}
.hm-rbody{padding:16px 18px 18px;display:flex;flex-direction:column;gap:6px}
.hm-rbody h2{margin:0;font-size:clamp(20px,5vw,28px);line-height:1.15;font-weight:800}
.hm-meta{margin:0;color:var(--muted-2)}
.hm-clock{margin:0;color:var(--amber);font-weight:700}
.hm-resume-btn{margin-top:10px;align-self:flex-start;background:var(--lime);color:var(--lime-ink);font-weight:800;font-size:18px;padding:0 28px;height:56px;display:inline-flex;align-items:center;border-radius:14px;text-decoration:none}
.hm-needs{padding:16px}
.hm-needs h3,.hm-qhead h3,.hm-team h3{margin:0;font-size:20px;font-weight:800}
.hm-needs h3{margin-bottom:12px}
.hm-need{display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:12px;padding:14px;color:var(--text);text-decoration:none;min-height:48px}
.hm-need .chev{color:var(--faint);font-size:20px}
.dot{width:10px;height:10px;border-radius:50%;flex:none;background:var(--faint)}
.dot.red{background:#FF6B6B}.dot.blue{background:var(--blue)}.dot.amber{background:var(--amber)}
.hm-qhead{align-items:baseline;gap:12px}
.hm-link{color:var(--lime);font-weight:700;text-decoration:none;white-space:nowrap}
.hm-cards{display:grid;grid-template-columns:1fr;gap:12px}
.hm-card{display:flex;flex-direction:column;gap:6px;padding:12px;text-decoration:none;color:var(--text)}
.hm-card.late{border-color:#5a2a2a}
.hm-cthumb{aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}
.hm-cthumb .thumb,.hm-cthumb img{width:100%;height:100%;object-fit:cover;display:block}
.hm-ctime{font:500 12px var(--mono);letter-spacing:.1em;color:var(--muted);margin-top:6px}
.hm-ctitle{font-weight:800;font-size:17px}
.hm-tags{display:flex;gap:6px;flex-wrap:wrap}
.hm-tag{font-size:12px;font-weight:700;border-radius:99px;padding:3px 10px;border:1px solid var(--line-2);color:var(--muted-2)}
.hm-tag.red{color:#FF7B7B;border-color:#6a2d2d;background:#2a1517}.hm-tag.lime{color:var(--lime);border-color:#55641a}.hm-tag.amber{color:var(--amber);border-color:#6b4d1a}
.hm-team{padding:16px;display:flex;flex-direction:column;gap:12px}
.hm-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.hm-tile{display:flex;flex-direction:column;gap:2px;background:var(--surface-2);border-radius:14px;padding:14px;color:var(--muted-2);text-decoration:none;border-top:3px solid var(--line-2)}
.hm-tile b{font-size:30px;color:var(--text);font-weight:800}
.hm-tile.blue{border-top-color:var(--blue)}.hm-tile.lime{border-top-color:var(--lime)}
.hm-tile:last-child{grid-column:1/-1}
@media (min-width:700px){.hm-cards{grid-template-columns:repeat(3,1fr)}.hm-tiles{grid-template-columns:repeat(5,1fr)}.hm-tile:last-child{grid-column:auto}}
@media (min-width:980px){
 .hm-top{grid-template-columns:minmax(0,2.1fr) minmax(0,1fr)}
 .hm-resume{grid-template-columns:minmax(0,5fr) minmax(0,6fr)}
 .hm-resume.none{grid-template-columns:1fr}
 .hm-rthumb{aspect-ratio:auto;min-height:260px}
 .hm-rbody{padding:26px 28px;justify-content:center}
 .hm-resume-btn{margin-top:auto}
}
.hm-qhead h3{white-space:nowrap}
@media (max-width:600px){.hm-qhead .small{display:none}}
.tl-track{margin-right:34px}
.rail .signout{margin-top:auto}
.rail .who{display:none}


/* ---- camera type, placement tray, paste-a-link */
.tg.pov, .chip.pov { background: rgba(127,184,255,.16); color: var(--blue); }
.tray { border: 1px solid var(--amber); background: rgba(255,181,71,.07); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.tray b { color: var(--amber); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.hm-addbox { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.hm-paste { gap: 10px; flex-wrap: wrap; }
.hm-paste input { min-height: 52px; flex: 1; min-width: 240px; }
.hm-recent { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hm-recent:empty { display: none; }
.hm-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12px; text-decoration: none; max-width: 100%; }
.hm-pill b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.hm-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.hm-pill.working .dot { background: var(--blue); } .hm-pill.ready .dot { background: var(--amber); }
.hm-pill.done .dot { background: var(--lime); } .hm-pill.failed .dot { background: var(--red); }
.camrow .n { white-space: nowrap; }
.camrow .mv { padding: 0 10px; }
input[type=time] { color-scheme: dark; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; min-height: 44px; padding: 0 10px; font: inherit; }

/* iPad: swipes scroll, never zoom; images can't be dragged */
html,body{touch-action:pan-x pan-y}
img{-webkit-user-drag:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}

/* iPad portrait: session rows were overlapping. Info + cameras on top, actions underneath. */
.srow .scams, .srow .sinfo { min-width: 0; }
.srow .scams .camrow { min-width: 0; flex-wrap: nowrap; }
@media (min-width: 820px) and (max-width: 1279px) {
  .srow { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); }
  .srow .sact { grid-column: 1 / -1; flex-wrap: wrap; }
  .srow .scams .camrow { min-width: 0; flex: 0 0 auto; }
}
@media (min-width: 600px) and (max-width: 1100px) {
  .dayhead .row { flex-wrap: wrap; }
  .dayhead .daypills { flex: 1 0 100%; overflow-x: auto; justify-content: flex-start; }
}

.sess-card.picked { border-color: var(--lime); }
.mergebar { position: sticky; bottom: 0; margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2, #1A1F23); border: 1px solid var(--lime); border-radius: 14px; z-index: 20; }
.mergebar[hidden] { display: none; }
.mergebar .small { flex: 1; }
.sheet .camrow::before { content: none; }
.sess-card .thumb { position: relative; }
.tick { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 9px; background: rgba(0,0,0,.55); border: 2px solid #9AA4AD; color: #0E1113; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 3; }
.tick.on { background: var(--lime); border-color: var(--lime); }
.mergebar { flex-wrap: wrap; }

/* Phone: the selection bar sits above the bottom tab bar, one tidy row that scrolls sideways if needed. */
@media (max-width: 819px) {
  .mergebar { position: fixed; left: 12px; right: 12px; bottom: calc(64px + var(--safe-b, 0px)); margin: 0; flex-wrap: nowrap; overflow-x: auto; z-index: 40; }
  .mergebar .btn, .mergebar b { white-space: nowrap; flex: none; }
  .mergebar b { padding-right: 6px; }
}
@media (max-width: 819px) { .sess-grid { padding-bottom: 96px; } }

.mergebar .sel-acts { display: flex; gap: 10px; margin-left: auto; }
@media (max-width: 819px) {
  .mergebar { flex-wrap: wrap; overflow: visible; }
  .mergebar .sel-acts { flex: 1 1 100%; margin-left: 0; }
  .mergebar .sel-acts .btn { flex: 1; }
}

/* Hold-down / right-click menu */
.ctx-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.35); -webkit-touch-callout: none; }
.ctx-menu { position: fixed; min-width: 230px; max-width: calc(100vw - 16px); background: #1A1F23; border: 1px solid #2A3238; border-radius: 16px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; }
.ctx-title { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-item { min-height: 48px; padding: 0 14px; border: 0; background: transparent; color: var(--text); font-size: 16px; font-weight: 600; text-align: left; border-radius: 10px; }
.ctx-item:hover, .ctx-item:focus-visible { background: #242B31; outline: none; }
.ctx-item.danger { color: #FF9A9D; }
.ctx-sep { height: 1px; background: #2A3238; margin: 4px 8px; }
.ctx-stars { display: flex; justify-content: space-between; padding: 4px 8px; }
.ctx-stars button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 26px; color: #4A545C; }
.ctx-stars button.on { color: #FFB547; }
.clip-tile, .sess-card, .camrow { -webkit-touch-callout: none; }
/* Phone: camera rows with Type / Move / ⋯ must fit */
@media (max-width: 599px) {
  .camrow { gap: 4px; padding: 0 4px 0 8px; min-width: 0; }
  .camrow .n { white-space: normal; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
  .camrow .d { font-size: 11px; }
  .camrow .mv { padding: 0 8px; font-size: 12px; flex: none; }
}

.camtype { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.camtype:empty { display: none; }

.camchip { display: inline-flex; }
.camchip-btn { min-height: 30px; padding: 0 10px; font-size: 12px; text-transform: none; letter-spacing: 0; }
.camchip-btn.pov { border-color: var(--amber, #FFB547); color: var(--amber, #FFB547); }
.camchip-label { font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* My day session card (decluttered) */
.scard { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.scard-head { display: flex; align-items: flex-start; gap: 8px; }
.scard-head .sinfo { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.scard .sess-title { font-size: 17px; font-weight: 800; }
.scard .sess-sub { font-size: 13px; margin-top: 2px; }
.scard .scams { display: flex; flex-direction: column; gap: 6px; }
.scard .camrow::before { content: none; }
.scard .watch-go { min-height: 48px; justify-content: center; font-size: 16px; font-weight: 800; }
.camdot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.camdot.pov { background: var(--amber, #FFB547); }
.twin { text-align: left; background: transparent; border: 0; padding: 0; color: var(--amber, #FFB547); font-size: 13px; text-decoration: underline; min-height: 32px; }
@media (min-width: 820px) { .scard .watch-go { align-self: flex-start; padding: 0 40px; } }
.empty-hour { min-height: 44px; border-style: dashed; }
.clip-row.picked { border-color: var(--lime); outline: 1px solid var(--lime); }

/* tap tags on Watch */
.tag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tag-btn { min-height: 52px; border-radius: 12px; border: 1px solid var(--line, #2A3238); background: var(--card2, #1E2428); color: inherit; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.tag-btn .dot { width: 8px; height: 8px; border-radius: 50%; }
.tag-btn.on { border-width: 2px; }
.tag-pending { border: 1px solid; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--card, #171B1F); }
.tag-pending input { height: 44px; border-radius: 8px; padding: 0 10px; font-size: 16px; }
@media (min-width: 820px) { .tag-grid { grid-template-columns: repeat(7, 1fr); } }

/* iPad: a finger on a thumbnail must scroll the page, never lift/zoom the image */
img, a, .thumb, .hm-rthumb, .hm-cthumb { -webkit-user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
img { pointer-events: none; }
.thumb, .hm-rthumb, .hm-cthumb { touch-action: pan-x pan-y; }
.hm-rthumb { max-height: 46vh; }

/* clip length editor */
.trim2-bar { height: 56px; border-radius: 8px; position: relative; margin: 10px 8px; touch-action: none; background: repeating-linear-gradient(135deg, #2E3842 0 6px, #262F38 6px 12px); }
.trim2-dim { position: absolute; top: 0; bottom: 0; background: rgba(12,15,19,.65); pointer-events: none; border-radius: 8px; }
.trim2-range { position: absolute; top: 0; bottom: 0; box-sizing: border-box; background: rgba(255,255,255,.10); border-top: 2px solid #fff; border-bottom: 2px solid #fff; pointer-events: none; }
.trim2-handle { position: absolute; top: -4px; bottom: -4px; width: 18px; margin-left: -9px; background: #fff; border-radius: 6px; cursor: ew-resize; }
.trim2-handle::after { content: ''; position: absolute; top: 35%; bottom: 35%; left: 50%; width: 2px; margin-left: -1px; background: #888; border-radius: 1px; }
.trim2-handle::before { content: ''; position: absolute; top: -8px; bottom: -8px; left: -14px; right: -14px; }
.trim2-save { position: sticky; bottom: 0; padding: 8px 0 2px; background: var(--surface, #171B1F); }
.clip-tile { position: relative; }
.clip-tile.picked { outline: 2px solid var(--lime); }


/* session pipeline: reject note, posting progress, upload folder rows */
.sess-card .reject-note { color: #FF8A8E; }
.sess-card .post-line { color: var(--muted-2); }
.upl { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px; }
.upl-row { display: flex; align-items: center; gap: 8px; }
.upl-tick { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--lime-ink); font-weight: 700; flex: none; padding: 0; }
.upl-tick.on { background: var(--green); border-color: var(--green); }
.upl-tick:disabled { opacity: .6; }
.sess-card .rework-note { color: var(--amber); }
/* Watch: tap-sized transport row under the video */
.transport { gap: 8px; }
.tr-btn { flex: 1; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 0 10px; }
.tr-ic { display: inline-flex; }
.tr-play { flex: 1.4; }
.tr-fs { flex: 0 0 56px; }

/* Clip sheet: close button pinned top-right, stays visible while the sheet scrolls */
.sheet-x { position: sticky; top: 0; float: right; z-index: 3; width: 40px; height: 40px; margin: -4px -4px 8px 8px; background: var(--surface-2); color: var(--text, inherit); }
.sheet:has(.sheet-x) > h2 { padding-right: 52px; }

/* ---- v2 QA batch 1 ---- */
/* D8 contrast (WCAG AA 4.5:1) */
.badge { background: #C93439; }
.end-btn { background: #C93439; }
.end-btn .kbd { opacity: 1; }
.tabs button.on .tiny { color: #3D474E; opacity: 1; }
.hm-need .chev { color: var(--muted); }
/* D10 selection tick must not cover the stage badge */
.clip-tile:has(.tick) .stage-badge { left: auto; right: 6px; }
/* D7 no iOS focus zoom: inputs >= 16px on touch-size screens */
@media (max-width: 1024px) {
  input, select, textarea { font-size: 16px; }
}
/* D6 44px touch targets on phone/iPad */
@media (max-width: 1024px) {
  .btn.small, button.chip, .tabs button, .star { min-height: 44px; }
  .star { min-width: 44px; }
  .tick { width: 44px; height: 44px; }
  .sheet-x { width: 44px; height: 44px; }
  .camrow .mv { height: 44px; min-width: 44px; }
  .nudge { min-width: 44px; min-height: 44px; }
}

/* Board: Mercy's watch progress */
.watch-prog { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.watch-bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.watch-bar > span { display: block; height: 100%; background: var(--blue); }

/* My day: Back to today + Check for new videos line */
.day-sub { margin-top: 10px; align-items: center; }
.day-sub .today { margin-top: 0; }

/* Board drag to move a video to the next stage */
.board .sess-card { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.board .sess-card.dragging { opacity: .35; }
.board-ghost { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -30%) rotate(-1.5deg); box-shadow: 0 12px 30px rgba(0,0,0,.5); opacity: .95; }
.board-col.drop { outline: 2px dashed var(--lime); outline-offset: -2px; background: rgba(212,255,58,.06); }

/* ---------------------------------------------------------------- report issue, to-do, shorts */
.fb-fab {
  position: fixed; right: 12px; bottom: calc(72px + var(--safe-b)); z-index: 25;
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--muted-2);
  box-shadow: 0 4px 16px rgba(0,0,0,.45); opacity: .9;
}
.fb-fab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fb-fab:active { transform: translateY(1px); }
body:has(.scrim) .fb-fab { display: none; }
@media (min-width: 820px) { .fb-fab { display: none; } }
.rail a.report { margin-top: auto; }
.fb-files { display: flex; flex-direction: column; gap: 6px; }
.fb-file { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.fb-file img, .fb-vid { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); }
.fb-vid { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.fb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }

.td-item { display: flex; flex-direction: column; gap: 8px; }
.td-item.done { opacity: .7; }
.td-top { display: flex; align-items: flex-start; gap: 10px; }
.td-top .td-what { flex: 1; min-width: 0; }
.td-what .name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.td-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--muted); }
.td-desc { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.td-ctx { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.td-files { display: flex; flex-wrap: wrap; gap: 8px; }
.td-files a { display: block; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); color: var(--muted-2); text-decoration: none; font-size: 12px; }
.td-files img, .td-files video { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-files .vid { display: flex; align-items: center; justify-content: center; height: 100%; gap: 4px; }
.td-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.flag-strip { display: flex; flex-direction: column; gap: 8px; }
.flag-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.flag-row .grow { min-width: 160px; }

.sh-list { display: flex; flex-direction: column; gap: 10px; }
.sh-row { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 10px; color: var(--text); text-decoration: none; }
.sh-thumb { width: 72px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.sh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-title { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.sh-nums { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.sh-num b { font-family: var(--mono); font-size: 17px; display: block; color: var(--text); }
.sh-num span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sh-up { color: var(--green); font-size: 12px; font-family: var(--mono); }
.sh-spark { width: 100%; height: 28px; margin-top: 6px; display: block; }
.sh-spark path { fill: none; stroke: var(--lime); stroke-width: 1.6; }
@media (min-width: 820px) {
  .sh-row { grid-template-columns: 72px minmax(0,1fr) 280px; }
  .sh-nums { margin-top: 0; justify-content: flex-end; }
}
.ang-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ang-row .grow { min-width: 0; }
.rail a.report + .signout { margin-top: 0; }
.flash { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (max-width: 819px) { .sh-row > .sh-nums { grid-column: 1 / -1; justify-content: space-around; border-top: 1px solid var(--line); padding-top: 8px; } .sh-num { text-align: center; } }
.fb-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); }
.fb-cat b { font-size: 14px; font-weight: 700; }
.fb-cat span { font-size: 12px; color: var(--muted); }
.fb-cat.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.fb-cat.on span { color: #3D474E; }
.fb-about { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.chip.cat-broken { background: rgba(229,72,77,.16); color: #FF8A8E; }
.chip.cat-video { background: rgba(127,184,255,.16); color: var(--blue); }
.chip.cat-idea { background: rgba(212,255,58,.14); color: var(--lime); }
.chip.cat-other { background: var(--surface-3); color: var(--muted-2); }

/* ---------------------------------------------------------------- watch stage + league players */
/* Keep video, play controls and Start/End/Goal inside one screen on wide, short windows. */
.watch .stage { gap: 10px; width: min(100%, max(420px, calc((100dvh - 450px) * 16 / 9))); margin-inline: auto; }
.watch .stage .transport { margin: 0; }
.side .goal-btn { min-height: 40px; padding: 0 18px; }
.lp-add { display: flex; flex-direction: column; gap: 10px; }
.lp-add textarea { min-height: 96px; }
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px 0 14px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.lp-chip button { width: 36px; height: 36px; border-radius: 18px; border: 0; background: transparent; color: var(--muted); font-size: 18px; }

/* ---------------------------------------------------------------- watch: full screen with controls, clip delete */
body.fs-lock { overflow: hidden; }
.fs-x { display: none; }
.watch .stage.fs { position: fixed; inset: 0; z-index: 300; width: auto; margin: 0; padding: 8px; gap: 8px; background: #000; overflow-y: auto; }
.watch .stage.fs > div:first-child { flex: 1 1 0; min-height: 160px; }
.watch .stage.fs .player-box { height: 100%; aspect-ratio: auto; border-radius: 10px; }
.watch .stage.fs .fs-x { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; z-index: 5; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; }
.watch .stage.fs .transport .tr-btn { min-height: 44px; }
.watch .stage.fs .clip-btns .btn { height: 52px; }
.watch .stage.fs > .col > .field, .watch .stage.fs > .col > .btn.ghost { display: none; }
.watch .stage.fs > .col { padding: 0; color: #fff; }
@media (max-height: 520px) { .watch .stage.fs .transport { display: none; } .watch .stage.fs > .col .small { display: none; } }
.clip-row .clip-del { min-width: 44px; padding: 0 10px; color: var(--red); }

/* ---------------------------------------------------------------- admin account switcher */
.rail a.report + .switch { margin-top: 0; }
.sw-list { display: flex; flex-direction: column; gap: 8px; }
.sw-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 16px; text-align: left; }
.sw-user span { font-size: 13px; color: var(--muted); }
.sw-user.on { border-color: var(--lime); }
.acting-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 250; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--amber); color: #1a1200; font-size: 14px; }
.acting-bar .btn { min-height: 36px; }
.acting-bar .btn.primary { background: #1a1200; color: var(--amber); }
body.acting { padding-top: 48px; }
body.acting .rail { top: 48px; height: calc(100vh - 48px); }
.rail a.switch + .signout { margin-top: 0; }

/* clip rows in the Watch side panel: name and time on top, tag + actions underneath */
.clip-row.cr-clip { flex-wrap: wrap; row-gap: 8px; }
.cr-clip .cr-main { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.cr-clip .cr-acts { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; }
.cr-clip .cr-open { margin-left: auto; }

/* Watch side panel: rows keep their height and the panel scrolls (rows were shrinking and clipping their buttons) */
.side > * { flex-shrink: 0; }
.side { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* league: who is playing, and goal clips to sort */
.teams-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .teams-grid { grid-template-columns: 1fr 1fr 1fr; } }
.teams-col { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 14px; padding: 10px; gap: 6px; min-height: 90px; }
.teams-col.a { border: 2px solid var(--amber); background: rgba(255,181,71,.07); }
.teams-col.b { border: 2px solid var(--blue); background: rgba(127,184,255,.07); }
.sort-box { background: var(--surface-2); border-radius: 12px; padding: 10px; gap: 8px; }
.sort-row { background: var(--surface-3); border-radius: 12px; padding: 4px 4px 4px 10px; min-height: 52px; gap: 8px; }
.sort-row .btn { min-width: 48px; height: 44px; font-weight: 800; font-size: 17px; background: transparent; }
.sort-row .sort-a { border: 2px solid var(--amber); color: var(--amber); background: rgba(255,181,71,.14); }
.sort-row .sort-b { border: 2px solid var(--blue); color: var(--blue); background: rgba(127,184,255,.14); }
.sort-drop { height: 46px; border-radius: 12px; border: 2px dashed; display: grid; place-items: center; font-weight: 800; }
.sort-drop.A { border-color: var(--amber); color: var(--amber); } .sort-drop.B { border-color: var(--blue); color: var(--blue); }
.sort-drop.over { background: rgba(212,255,58,.12); outline: 2px solid var(--lime); }

/* Watch header on a tablet: one tidy row (back, title, menu) and the score on its own line */
.show-tablet { display: none; }
@media (min-width: 601px) and (max-width: 979px) {
  .show-tablet { display: inline-flex; }
  .hide-tablet { display: none !important; }
  .watch-head .score { order: 5; width: 100%; justify-content: center; }
  .watch-head .eyebrow { white-space: nowrap; }
  .watch-head .watch-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .head-more { min-width: 48px; min-height: 48px; font-size: 20px; }
}
