/* =========================================================
   planner.css — Planning calendar (planner.js): month grid of planned-video cards, filter chips, split "+ New",
   drag ghost / drop line / marquee, popover menus, the centered card modal and "Plan many". Uses lab.css tokens;
   everything is prefixed pl- and scoped to body.lab (buttons/inputs override lab.css's !important defaults).
   ========================================================= */
body.lab .pl-s-idea { --c: #B3AC9F; --cb: rgba(140,133,122,.14); --cl: rgba(140,133,122,.34); }
body.lab .pl-s-scripted { --c: #7FB3FF; --cb: rgba(106,168,255,.12); --cl: rgba(106,168,255,.34); }
body.lab .pl-s-filmed { --c: #FFD84D; --cb: rgba(255,216,77,.12); --cl: rgba(255,216,77,.36); }
body.lab .pl-s-posted { --c: #7BD89F; --cb: rgba(123,216,159,.12); --cl: rgba(123,216,159,.34); }

/* ---- header ---- */
body.lab .pl-head { align-items: flex-end; margin-bottom: 14px; }
body.lab .pl-subt { margin: 6px 0 0; color: var(--lab-dim); font-size: 14px; }
body.lab .pl-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.lab .pl-nav { display: flex; align-items: center; gap: 6px; }
body.lab .pl-mlabel { min-width: 150px; text-align: center; font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.lab .pl-ib, body.lab .pl-btn, body.lab .pl-mini, body.lab .pl-rec {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 0; height: 34px; padding: 0 !important;
  border-radius: 10px !important; border: 1px solid var(--lab-line) !important; background: var(--panel2) !important; color: var(--lab-sub) !important;
  font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; box-shadow: none !important; transition: border-color .12s, color .12s, background .12s;
}
body.lab .pl-ib { width: 34px; font-size: 18px; }
body.lab .pl-btn { padding: 0 14px !important; }
body.lab .pl-ib:hover, body.lab .pl-btn:hover, body.lab .pl-mini:hover, body.lab .pl-rec:hover { border-color: #4A453E !important; color: var(--text) !important; }
body.lab .pl-btn:disabled { opacity: .45 !important; cursor: default; }
body.lab .pl-btn:disabled:hover { border-color: var(--lab-line) !important; color: var(--lab-sub) !important; }
body.lab .pl-new { display: inline-flex; }
body.lab .pl-newmain, body.lab .pl-newcaret, body.lab .pl-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 0; height: 38px; border: 0 !important; box-shadow: none !important;
  background: var(--accent) !important; color: #14120E !important; font-size: 14px; font-weight: 750; cursor: pointer; white-space: nowrap;
}
body.lab .pl-newmain { padding: 0 14px 0 16px !important; border-radius: 12px 0 0 12px !important; }
body.lab .pl-newcaret { width: 34px; padding: 0 !important; border-radius: 0 12px 12px 0 !important; border-left: 1px solid rgba(20,18,14,.22) !important; }
body.lab .pl-newcaret svg { width: 10px; height: 6px; }
body.lab .pl-newmain:hover, body.lab .pl-newcaret:hover, body.lab .pl-cta:hover { background: #FFE27A !important; color: #14120E !important; }
body.lab .pl-cta { height: 38px; padding: 0 18px !important; border-radius: 11px !important; font-size: 13.5px; }

/* ---- filter chips + month summary ---- */
body.lab .pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 14px; min-height: 30px; }
body.lab .pl-chips { display: flex; gap: 7px; flex-wrap: wrap; min-width: 0; }
body.lab .pl-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; min-height: 0; padding: 0 12px !important; max-width: 240px;
  border-radius: 999px !important; border: 1px solid var(--border) !important; background: var(--panel) !important; color: var(--lab-sub) !important;
  font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: none !important; transition: border-color .12s, color .12s;
}
body.lab .pl-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-chip:has(.pl-ci) { padding-left: 5px !important; }
body.lab .pl-chip:hover { color: var(--text) !important; border-color: var(--lab-line) !important; }
body.lab .pl-chip.on { background: rgba(255,216,77,.12) !important; border-color: rgba(255,216,77,.5) !important; color: var(--text) !important; }
body.lab .pl-ci { width: 20px; height: 20px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #14120E; background: var(--panel2); }
body.lab .pl-ci img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
body.lab .pl-stats { color: var(--lab-dim); font-size: 12.5px; white-space: nowrap; }
body.lab .pl-stats b { color: var(--text); font-weight: 750; }
body.lab .pl-empty { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 11px 16px; border: 1px dashed var(--lab-line); border-radius: 12px; color: var(--lab-sub); font-size: 13.5px; line-height: 1.45; }
body.lab .pl-empty b { color: var(--text); font-weight: 700; }
body.lab .pl-empty-i { color: var(--accent); font-size: 15px; flex: none; }
body.lab .pl-empty kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--lab-line); background: var(--panel2); font: 700 12px/1 inherit; color: var(--text); }

/* ---- month grid ---- */
body.lab .pl-scroll { overflow-x: auto; overflow-y: hidden; }
body.lab .pl-grid { min-width: 880px; user-select: none; -webkit-user-select: none; }
body.lab .pl-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--panel2); }
body.lab .pl-dow span { padding: 10px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--lab-dim); text-align: right; }
body.lab .pl-weeks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
body.lab .pl-day { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 138px; padding: 8px 8px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .12s; }
body.lab .pl-day:nth-child(7n) { border-right: 0; }
body.lab .pl-day:nth-last-child(-n+7) { border-bottom: 0; }
body.lab .pl-day.out { background: var(--lab-inner); }
body.lab .pl-day.out .pl-dn { color: var(--lab-faint); }
body.lab .pl-day.out .pl-card { opacity: .72; }
body.lab .pl-day.pl-drop, body.lab .pl-undated.pl-drop { background: rgba(255,216,77,.035); box-shadow: inset 0 0 0 1px rgba(255,216,77,.28); }
body.lab .pl-dh { display: flex; align-items: center; justify-content: space-between; height: 24px; }
body.lab .pl-dn { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--lab-sub); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
body.lab .pl-day.today .pl-dn { background: var(--accent); color: #14120E; font-weight: 800; box-shadow: 0 0 0 3px rgba(255,216,77,.18); }
body.lab .pl-add {
  width: 24px; height: 24px; min-height: 0; padding: 0 !important; display: grid; place-items: center; border: 0 !important; border-radius: 7px !important;
  background: transparent !important; color: var(--lab-dim) !important; font-size: 17px; font-weight: 500; line-height: 1; cursor: pointer; opacity: 0; box-shadow: none !important; transition: opacity .12s, color .12s, background .12s;
}
body.lab .pl-day:hover .pl-add, body.lab .pl-add:focus-visible { opacity: 1; }
body.lab .pl-add:hover { color: var(--accent) !important; background: rgba(255,216,77,.1) !important; }
body.lab .pl-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 16px; min-width: 0; }

/* ---- cards ---- */
body.lab .pl-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 9px 8px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--lab-line); color: var(--text); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: border-color .12s, background .12s, box-shadow .12s; touch-action: manipulation;
}
body.lab .pl-card:hover { border-color: #4A453E; background: #211E1A; }
body.lab .pl-card:focus-visible { outline: 0; border-color: var(--accent); }
body.lab .pl-t { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-meta, body.lab .pl-snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-meta { font-size: 11px; font-weight: 600; color: var(--lab-dim); }
body.lab .pl-meta i { font-style: normal; margin: 0 5px; opacity: .6; }
body.lab .pl-snip { font-size: 11.5px; color: var(--lab-sub); opacity: .85; line-height: 1.4; }
body.lab .pl-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
body.lab .pl-pill { display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--cl, var(--lab-line)); background: var(--cb, transparent); color: var(--c, var(--lab-sub)); font-size: 10.5px; font-weight: 700; white-space: nowrap; line-height: 1; }
body.lab .pl-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
body.lab .pl-pill.pl-clip { --c: var(--lab-sub); --cb: rgba(243,238,228,.05); --cl: var(--lab-line); }
body.lab .pl-pill.pl-sched { --c: #7BD89F; --cb: rgba(123,216,159,.08); --cl: rgba(123,216,159,.3); }
body.lab .pl-pill.pl-plan { --c: var(--lab-dim); --cb: transparent; --cl: var(--lab-line); border-style: dashed; }
body.lab .pl-card.sel { border-color: rgba(255,216,77,.7); background: rgba(255,216,77,.06); box-shadow: 0 0 0 1.5px rgba(255,216,77,.45); }
body.lab .pl-card.sel:hover { border-color: rgba(255,216,77,.85); background: rgba(255,216,77,.09); }
body.lab .pl-card.pl-ph { background: transparent !important; border: 1.5px dashed rgba(255,216,77,.32) !important; box-shadow: none !important; opacity: 1 !important; }
body.lab .pl-card.pl-ph > * { visibility: hidden; }
body.lab .pl-card.pl-ghost { position: fixed; left: 0; top: 0; z-index: 1300; margin: 0; pointer-events: none; opacity: .97; border-color: rgba(255,216,77,.55); background: #24211D; box-shadow: 0 22px 44px -14px rgba(0,0,0,.8), 0 0 0 1px rgba(255,216,77,.25); will-change: transform; }
body.lab .pl-gcount { position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #14120E; font-size: 11.5px; font-weight: 800; box-shadow: 0 0 0 2px var(--bg); }
body.lab .pl-line { position: fixed; z-index: 1290; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; box-shadow: 0 0 10px rgba(255,216,77,.55); display: none; }
body.lab .pl-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
body.lab.pl-dragging, body.lab.pl-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
body.lab.pl-selecting { user-select: none; -webkit-user-select: none; }
body.lab .pl-marq { position: fixed; z-index: 1290; pointer-events: none; border: 1px solid rgba(255,216,77,.6); border-radius: 4px; background: rgba(255,216,77,.08); }

/* quick add + inline rename */
body.lab .pl-qin, body.lab .pl-rin {
  width: 100%; min-height: 0; margin: 0; border-radius: 9px !important; border: 1px solid var(--accent) !important; background: var(--lab-inner) !important;
  color: var(--text) !important; box-shadow: 0 0 0 3px rgba(255,216,77,.12) !important; user-select: text; -webkit-user-select: text;
}
body.lab .pl-qin { height: 34px; padding: 0 10px !important; font-size: 12.5px !important; font-weight: 600; }
body.lab .pl-rin { height: 24px; padding: 0 6px !important; margin: -2px -4px 0; width: calc(100% + 8px); font-size: 12.5px !important; font-weight: 700; }
body.lab .pl-qin::placeholder { color: var(--lab-faint); font-weight: 500; }

/* undated tray */
body.lab .pl-undated { margin-top: 14px; padding: 14px 16px 16px; transition: background .12s; }
body.lab .pl-uh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
body.lab .pl-uh b { font-size: 13.5px; font-weight: 800; }
body.lab .pl-uh small { font-size: 12px; color: var(--lab-dim); }
body.lab .pl-ulist { flex-direction: row; flex-wrap: wrap; }
body.lab .pl-ulist .pl-card { width: 220px; }

/* selection badge */
body.lab .pl-selbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1000; display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 6px 0 16px; border-radius: 999px; background: #1F1C19; border: 1px solid rgba(255,216,77,.42);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.75); font-size: 13px; font-weight: 700; white-space: nowrap; animation: pl-rise .16s ease-out;
}
body.lab .pl-selbar[hidden] { display: none; }
body.lab .pl-selbar b { color: var(--accent); }
body.lab .pl-selbar small { color: var(--lab-dim); font-size: 12px; font-weight: 500; margin-left: 4px; }
body.lab .pl-selbar button { width: 26px; height: 26px; min-height: 0; padding: 0 !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: var(--lab-dim) !important; font-size: 16px; cursor: pointer; }
body.lab .pl-selbar button:hover { background: var(--lab-hover) !important; color: var(--text) !important; }

/* ---- popover menus ---- */
body.lab .pl-menu, body.lab .pl-submenu {
  position: fixed; z-index: 1400; min-width: 200px; padding: 5px; border-radius: 12px; background: #1B1916; border: 1px solid var(--lab-line);
  box-shadow: 0 20px 50px -14px rgba(0,0,0,.8); animation: pl-pop .12s ease-out;
}
body.lab .pl-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 3px; }
body.lab .pl-mi {
  position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 0; height: 32px; padding: 0 10px !important;
  border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--text) !important; font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer; box-shadow: none !important; white-space: nowrap; justify-content: flex-start; outline: 0;
}
body.lab .pl-mi:hover, body.lab .pl-mi.open { background: var(--lab-hover) !important; }
body.lab .pl-mi small { margin-left: auto; padding-left: 16px; color: var(--lab-faint); font-size: 11.5px; font-weight: 500; }
body.lab .pl-mi.pl-danger { color: var(--red) !important; }
body.lab .pl-mi.pl-danger:hover { background: rgba(255,107,129,.1) !important; }
body.lab .pl-caret { margin-left: auto; color: var(--lab-dim); font-size: 15px; }
body.lab .pl-submenu { display: none; position: absolute; left: calc(100% - 2px); top: -6px; min-width: 170px; }
body.lab .pl-hassub:hover > .pl-submenu, body.lab .pl-hassub.open > .pl-submenu { display: block; }
body.lab .pl-menu.pl-flip .pl-submenu { left: auto; right: calc(100% - 2px); }
body.lab .pl-mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
body.lab .pl-tick { margin-left: auto; color: var(--accent); font-size: 12px; }
body.lab .pl-mdate { display: flex; flex-direction: column; gap: 8px; padding: 8px; margin: 0; width: 230px; }
body.lab .pl-mdate label { margin: 0; font-size: 12px; font-weight: 600; color: var(--lab-dim); }
body.lab .pl-mdate input { height: 38px; padding: 0 10px !important; }

/* ---- modal (card + Plan many) ---- */
body.pl-lock { overflow: hidden; }
body.lab .pl-ov { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: start center; padding: 56px 16px; overflow-y: auto; background: rgba(5,4,3,.64); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: pl-fade .14s ease-out; }
body.lab .pl-modal { display: flex; flex-direction: column; width: min(740px, 100%); height: min(840px, calc(100vh - 112px)); min-height: 0; background: var(--panel); border: 1px solid var(--lab-line); border-radius: 18px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.85); outline: 0; animation: pl-rise .18s ease-out; overflow: hidden; }
body.lab .pl-mbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 24px; border-bottom: 1px solid var(--border); flex: none; min-width: 0; }
body.lab .pl-crumb { font-size: 12.5px; font-weight: 600; color: var(--lab-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.lab .pl-crumb i { font-style: normal; margin: 0 7px; opacity: .5; }
body.lab .pl-crumb span { color: var(--lab-sub); }
body.lab .pl-saved { font-size: 11.5px; color: var(--lab-faint); white-space: nowrap; }
body.lab .pl-saved.warn { color: var(--red); }
body.lab .pl-sp { flex: 1; }
body.lab .pl-mbar .pl-ib { font-size: 16px; color: var(--lab-sub) !important; }
body.lab .pl-mbody { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding: 26px 36px 28px; }
body.lab .pl-mtitle {
  flex: none; width: 100%; min-height: 0; margin: 0 0 18px; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important;
  color: var(--text) !important; font-size: 30px !important; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; resize: none; overflow: hidden; box-shadow: none !important;
}
body.lab .pl-mtitle::placeholder { color: var(--lab-faint); }
body.lab .pl-props { display: flex; flex-direction: column; gap: 3px; flex: none; }
body.lab .pl-prop { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; padding: 3px 0; }
body.lab .pl-pk { padding-top: 9px; font-size: 13px; font-weight: 600; color: var(--lab-dim); }
body.lab .pl-pv { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
body.lab .pl-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 36px; }
body.lab .pl-pv input:not([type=file]), body.lab .pl-pv select {
  width: 100%; height: 36px; min-height: 0; margin: 0; padding: 0 10px !important; border: 1px solid transparent !important; border-radius: 9px !important;
  background: transparent !important; color: var(--text) !important; font-size: 14px !important; box-shadow: none !important; transition: border-color .12s, background .12s;
}
body.lab .pl-pv input:not([type=file]):hover, body.lab .pl-pv select:hover { background: var(--lab-inner) !important; border-color: var(--border) !important; }
body.lab .pl-pv input:not([type=file]):focus, body.lab .pl-pv select:focus { background: var(--lab-inner) !important; border-color: var(--accent) !important; }
body.lab .pl-pv input::placeholder { color: var(--lab-faint); }
body.lab .pl-pv select option, body.lab .pl-pv select optgroup { background: var(--panel2); color: var(--text); }
body.lab .pl-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 11px; background: var(--lab-inner); border: 1px solid var(--border); }
body.lab .pl-seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; min-height: 0; padding: 0 12px !important; border: 1px solid transparent !important; border-radius: 8px !important;
  background: transparent !important; color: var(--lab-dim) !important; font-size: 12.5px; font-weight: 650; cursor: pointer; box-shadow: none !important; transition: color .12s, background .12s;
}
body.lab .pl-seg button i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); opacity: .55; }
body.lab .pl-seg button:hover { color: var(--text) !important; }
body.lab .pl-seg button.on { background: var(--cb) !important; border-color: var(--cl) !important; color: var(--c) !important; }
body.lab .pl-seg button.on i { opacity: 1; }
body.lab .pl-pnote { font-size: 12.5px; color: var(--lab-sub); }
body.lab .pl-link { min-height: 0; height: auto; padding: 0 !important; border: 0 !important; background: none !important; color: var(--accent) !important; font-size: 12.5px; font-weight: 700; cursor: pointer; }
body.lab .pl-link:hover { text-decoration: underline; text-underline-offset: 3px; }
body.lab .pl-mini { height: 30px; padding: 0 12px !important; font-size: 12px; font-weight: 700; color: var(--text) !important; flex: none; }
body.lab .pl-x { width: 26px; height: 26px; min-height: 0; flex: none; padding: 0 !important; display: grid; place-items: center; border: 0 !important; border-radius: 7px !important; background: transparent !important; color: var(--lab-dim) !important; font-size: 17px; line-height: 1; cursor: pointer; box-shadow: none !important; }
body.lab .pl-x:hover { color: var(--red) !important; background: rgba(255,107,129,.1) !important; }
body.lab .pl-refs, body.lab .pl-files { display: flex; flex-direction: column; gap: 6px; }
body.lab .pl-refs:empty, body.lab .pl-files:empty { display: none; }
body.lab .pl-ref, body.lab .pl-file { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--lab-inner); border: 1px solid var(--border); overflow: hidden; }
body.lab .pl-fav { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--panel2); border: 1px solid var(--lab-line); font-size: 11px; font-weight: 800; color: var(--lab-sub); }
body.lab .pl-ref a { display: flex; flex-direction: column; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
body.lab .pl-ref a b, body.lab .pl-ref a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-ref a b { font-size: 12.5px; font-weight: 700; }
body.lab .pl-ref a small { font-size: 11.5px; color: var(--lab-dim); }
body.lab .pl-ref a:hover b { color: var(--accent); }
body.lab .pl-refadd { display: flex; gap: 8px; align-items: center; }
body.lab .pl-refadd input { flex: 1; }
body.lab .pl-kind { flex: none; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--lab-line); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--lab-dim); line-height: 1; }
body.lab .pl-k-video { color: #7FB3FF; border-color: rgba(106,168,255,.4); background: rgba(106,168,255,.08); }
body.lab .pl-k-audio, body.lab .pl-k-voice { color: #C58CFF; border-color: rgba(197,140,255,.4); background: rgba(197,140,255,.08); }
body.lab .pl-k-gone { color: var(--red); border-color: rgba(255,107,129,.4); }
body.lab .pl-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
body.lab .pl-file small { color: var(--lab-faint); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.lab .pl-file .pl-mini { height: 26px; padding: 0 10px !important; font-size: 11.5px; }
body.lab .pl-up { padding-right: 12px; }
body.lab .pl-bar-i { position: absolute; left: 0; bottom: 0; height: 2px; width: 35%; background: var(--accent); animation: pl-load 1.1s ease-in-out infinite; }
body.lab .pl-player { border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--border); }
body.lab .pl-player video { display: block; width: 100%; max-height: 340px; background: #000; }
body.lab .pl-player audio { display: block; width: 100%; background: var(--lab-inner); }
body.lab .pl-dropzone { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 11px 14px; border: 1px dashed var(--lab-line); border-radius: 10px; cursor: pointer; transition: border-color .12s, background .12s; }
body.lab .pl-dropzone b { font-size: 13px; font-weight: 650; color: var(--lab-sub); }
body.lab .pl-dropzone small { font-size: 11.5px; color: var(--lab-faint); }
body.lab .pl-dropzone:hover, body.lab .pl-dropzone.over { border-color: rgba(255,216,77,.6); background: rgba(255,216,77,.05); }
body.lab .pl-dropzone.over b { color: var(--text); }
body.lab .pl-rec { align-self: flex-start; height: 32px; padding: 0 14px 0 12px !important; border-radius: 999px !important; font-size: 12.5px; font-weight: 700; color: var(--text) !important; }
body.lab .pl-rec.on { border-color: rgba(255,107,129,.55) !important; background: rgba(255,107,129,.08) !important; }
body.lab .pl-recdot { width: 9px; height: 9px; border-radius: 50%; background: var(--text); flex: none; }
body.lab .pl-recdot.on { background: var(--red); animation: pl-pulse 1.1s ease-in-out infinite; }
body.lab .pl-script {
  flex: 1 0 auto; width: 100%; min-height: 240px; margin: 20px 0 0; padding: 20px 0 0 !important; border: 0 !important; border-top: 1px solid var(--border) !important;
  border-radius: 0 !important; background: transparent !important; color: var(--text) !important; font-size: 14.5px !important; line-height: 1.65; resize: none; box-shadow: none !important;
}
body.lab .pl-script:focus { border-top-color: var(--border) !important; }
body.lab .pl-script::placeholder { color: var(--lab-faint); }

/* Plan many */
body.lab .pl-modal.pl-many { width: min(560px, 100%); height: auto; }
body.lab .pl-mhead { font-size: 15px; font-weight: 800; }
body.lab .pl-many .pl-mbody { padding: 20px 24px 22px; }
body.lab .pl-hint { margin: 0 0 16px; font-size: 13.5px; color: var(--lab-sub); }
body.lab .pl-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
body.lab .pl-fl { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--lab-dim); }
body.lab .pl-fl input, body.lab .pl-fl select { height: 40px; min-height: 0; margin: 0; padding: 0 12px !important; }
body.lab .pl-mprev { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--lab-inner); border: 1px solid var(--border); font-size: 13px; color: var(--lab-sub); line-height: 1.5; }
body.lab .pl-mprev b { color: var(--text); }
body.lab .pl-mact { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
body.lab .pl-mact .pl-btn { height: 38px; }

@keyframes pl-fade { from { opacity: 0; } }
@keyframes pl-rise { from { opacity: 0; transform: translateY(8px); } }
body.lab .pl-selbar { animation-name: pl-rise-c; }
@keyframes pl-rise-c { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes pl-pop { from { opacity: 0; transform: scale(.97); } }
@keyframes pl-load { from { left: -35%; } to { left: 100%; } }
@keyframes pl-pulse { 50% { opacity: .35; } }
@media (hover: none) { body.lab .pl-add { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.lab .pl-ov, body.lab .pl-modal, body.lab .pl-menu, body.lab .pl-selbar { animation: none; } body.lab .pl-recdot.on, body.lab .pl-bar-i { animation-duration: 3s; } }
@media (max-width: 760px) {
  body.lab .pl-tools { width: 100%; justify-content: flex-end; }
  body.lab .pl-nav { flex: 1 1 100%; justify-content: space-between; }
  body.lab .pl-mlabel { min-width: 0; font-size: 15px; }
  body.lab .pl-chip { max-width: 100%; }
  body.lab .pl-stats { white-space: normal; }
  body.lab .pl-day { min-height: 112px; }
  body.lab .pl-ov { padding: 12px 10px; }
  body.lab .pl-modal { height: calc(100vh - 24px); height: calc(100dvh - 24px); }
  body.lab .pl-mbar { padding-left: 16px; }
  body.lab .pl-mbody { padding: 18px 18px 20px; }
  body.lab .pl-mtitle { font-size: 24px !important; }
  body.lab .pl-prop { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 4px 0; }
  body.lab .pl-pk { padding-top: 0; font-size: 12px; }
  body.lab .pl-mgrid { grid-template-columns: minmax(0, 1fr); }
  body.lab .pl-selbar small { display: none; }
  body.lab .pl-ulist .pl-card { width: 100%; }
}
body.lab .pl-chev { width: 16px; height: 16px; }
body.lab .pl-ib .icon { width: 16px; height: 16px; }
body.lab .pl-acct .pl-pv { flex-direction: row; }
body.lab .pl-acct .pl-pv select { flex: 1 1 0; }
body.lab .pl-acct .pl-pv input { flex: 1 1 0; }
@media (max-width: 760px) { body.lab .pl-acct .pl-pv { flex-direction: column; } body.lab .pl-acct .pl-pv select, body.lab .pl-acct .pl-pv input { flex: none; } }

/* campaign-first cards, platforms, scheduling from the card */
body.lab .pl-pm { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; color: #fff; flex: none; vertical-align: -3px; margin-right: 4px; box-shadow: 0 0 0 1px rgba(243,238,228,.2); }
body.lab .pl-pm svg { width: 8px; height: 8px; display: block; }
body.lab .pl-card .pl-camp { display: flex; align-items: center; gap: 6px; min-width: 0; }
body.lab .pl-card .pl-camp .pl-ci { width: 16px; height: 16px; font-size: 9px; flex: none; }
body.lab .pl-card .pl-camp .pl-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-ci.none { background: #2A2723; color: var(--lab-dim); display: inline-grid; place-items: center; border-radius: 50%; }
body.lab .pl-card .pl-sub { display: block; font-size: 12px; color: var(--lab-sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab .pl-card .pl-where { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin-top: 4px; font-size: 11.5px; color: var(--lab-dim); }
body.lab .pl-card .pl-where i { font-style: normal; margin: 0 5px; color: var(--lab-faint); }
body.lab .pl-plats { display: flex; flex-wrap: wrap; gap: 6px; }
body.lab .pl-plat { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 10px !important; border-radius: 999px !important; border: 1px solid var(--border) !important; background: var(--lab-inner) !important; color: var(--lab-sub) !important; font-size: 12.5px; font-weight: 600; cursor: pointer; min-height: 0 !important; }
body.lab .pl-plat.on { border-color: rgba(255,216,77,.55) !important; background: rgba(255,216,77,.08) !important; color: var(--text) !important; }
body.lab .pl-fl.pl-wide { grid-column: 1 / -1; }
body.lab .pl-sch { display: flex; flex-direction: column; gap: 8px; width: 100%; }
body.lab .pl-sch .pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.lab .pl-sch input[type=time], body.lab .pl-sch select, body.lab .pl-sch textarea { min-height: 34px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--lab-inner); color: var(--text); font: inherit; font-size: 13px; }
body.lab .pl-sch select { max-width: 260px; }
body.lab .pl-sch textarea { width: 100%; resize: vertical; }
body.lab .pl-accs { display: flex; flex-wrap: wrap; gap: 6px; }
body.lab .pl-acc { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--lab-inner); color: var(--lab-sub); font-size: 12.5px; font-weight: 600; cursor: pointer; }
body.lab .pl-acc input { display: none; }
body.lab .pl-acc.on { border-color: rgba(255,216,77,.55); background: rgba(255,216,77,.08); color: var(--text); }
body.lab .pl-sch .pl-hint { color: var(--lab-dim); font-size: 12px; }
body.lab .pl-sch .pl-cta[disabled] { opacity: .45; cursor: not-allowed; }
body.lab .pl-sch input[type=time] { width: 130px !important; flex: none; }

/* Optional production direction and its editor handoff. */
body.lab .pl-brief { margin-top: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--lab-inner); }
body.lab .pl-brief summary { padding: 14px 16px; cursor: pointer; font-size: 13px; }
body.lab .pl-brief summary span { margin-left: 10px; color: var(--lab-sub); font-size: 12px; }
body.lab .pl-brief > p, body.lab .pl-brief > small { display: block; margin: 0; padding: 0 16px 14px; color: var(--lab-sub); font-size: 12px; line-height: 1.5; }
body.lab .pl-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 14px; }
body.lab .pl-brief-grid label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 12px; color: var(--text); }
body.lab .pl-brief-grid .wide { grid-column: 1 / -1; }
body.lab .pl-source .pl-brief-grid b { font-size: 12px; }
body.lab .pl-source .pl-brief-grid p { font-size: 12px; line-height: 1.6; white-space: pre-wrap; color: var(--lab-sub); margin: 5px 0 0; overflow-wrap: anywhere; }
body.lab .pl-brief-grid textarea { min-height: 70px; margin: 0; width: 100%; padding: 10px !important; border: 1px solid var(--border) !important; border-radius: 8px !important; background: var(--card) !important; color: var(--text); font: inherit; line-height: 1.5; resize: vertical; }
body.lab .pl-brief-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-top: 14px; padding: 16px 0 2px; }
body.lab .pl-brief-actions a { display: inline-flex; align-items: center; text-decoration: none; }
body.lab .pl-brief-actions small { color: var(--lab-sub); font-size: 12px; line-height: 1.5; flex: 1 1 100%; }
body.lab .pl-brief-actions .pl-send { background: var(--text) !important; color: var(--bg) !important; }
body.lab .pl-handoff { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
body.lab .pl-handoff-main, body.lab .pl-handoff-side { padding: 22px; }
body.lab .pl-handoff-main label { display: flex; flex-direction: column; gap: 7px; margin: 18px 0; font-size: 13px; font-weight: 600; }
body.lab .pl-handoff-main textarea { width: 100%; min-height: 300px; resize: vertical; line-height: 1.6; }
body.lab .pl-handoff-main input, body.lab .pl-handoff-main select, body.lab .pl-handoff-main textarea { font: inherit; border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: var(--text); background: var(--lab-inner); }
body.lab .pl-handoff-side { margin-bottom: 16px; }
body.lab .pl-handoff-side h2 { margin: 0 0 12px; font-size: 15px; }
body.lab .pl-handoff-side h2 small { color: var(--lab-sub); font-size: 12px; font-weight: 400; }
body.lab .pl-handoff-side > a { display: block; margin: 8px 0; color: var(--text); font-size: 13px; }
body.lab .pl-handoff-side summary { font-size: 12px; color: var(--lab-sub); cursor: pointer; padding: 12px 0; }
body.lab .pl-handoff-clip { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
body.lab .pl-handoff-clip label { display: flex; gap: 8px; align-items: center; margin: 0; flex: 1 1 100%; min-width: 0; font-size: 12px; }
body.lab .pl-handoff-clip label span { overflow-wrap: anywhere; }
body.lab .pl-handoff-clip input { width: 16px !important; min-height: 16px !important; height: 16px; flex: none; margin: 0; }
body.lab .pl-handoff-clip select { min-height: 30px; width: 100%; font-size: 12px; }
body.lab .pl-handoff-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
body.lab .pl-handoff-footer small { color: var(--lab-sub); }
@media (max-width: 760px) {
  body.lab .pl-brief-grid, body.lab .pl-handoff { grid-template-columns: minmax(0, 1fr); }
  body.lab .pl-brief summary span { display: block; margin: 5px 0 0 16px; }
  body.lab .pl-handoff-main, body.lab .pl-handoff-side { padding: 16px; }
}
