/* =========================================================
   The UGC Lab — planner.css · PAGE-SCOPED styles for /planner
   Month grid of planned-video cards + a brand/account chip bar
   + a "+ New" split button + a CENTERED card modal (the Notion
   page feel) + the "Plan many" bulk dialog. Everything scoped
   under #planx so nothing leaks (and ui.css light !important
   fills never reach these components — the page ships its own
   dark-native buttons/inputs/dialogs, same policy as
   campaigns.css).

   Tokens from variables.css + theme-dark.css (canvas #0a0e13,
   yellow --violet #ffd84d accent with dark ink, green #3ce0a3,
   blue #4f9dff, red #ff6b81). Amber is page-local. Status pills
   use the .12 background / .24 border tint recipe. Dates and
   counts are tabular-nums.
   ========================================================= */

#planx {
  --px-amber: #f5c451;
  --px-ink: #0a0e13;
  --px-r: 16px;
  --px-r-sm: 10px;
}
#planx .num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---- header row ---------------------------------------------------------- */
#planx .pxtop {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
#planx .pxtop h1 { margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
#planx .pxtop .sub { font-size: 13px; color: var(--text-mute); margin-top: 3px; }
#planx .pxtop .sp { flex: 1; }
#planx .pxmonthnav { display: flex; align-items: center; gap: 8px; }
#planx .pxmonthnav .label {
  min-width: 148px; text-align: center; font-size: 15px; font-weight: 700;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
#planx .pxnavbtn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border-lt);
  background: var(--bg-elev); color: var(--text-mute); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .12s;
  font: inherit;
}
#planx .pxnavbtn:hover { color: var(--text); border-color: #39485a; }
#planx .pxnavbtn--today { width: auto; padding: 0 12px; font-size: 12.5px; font-weight: 600; }

/* ---- "+ New" split button (Notion-style, top right) ----------------------- */
#planx .pxnew { position: relative; display: inline-flex; }
#planx .pxnew-main { border-radius: 999px 0 0 999px; padding-right: 13px; }
#planx .pxnew-caret {
  border-radius: 0 999px 999px 0; padding: 0 11px 0 9px; font-size: 10px;
  border-left: 1px solid rgba(10, 14, 19, .25);
}
#planx .pxmenu.pxnewmenu { top: 42px; left: auto; right: 0; min-width: 160px; }

/* ---- brand / account filter chips ----------------------------------------- */
#planx .pxchips {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 14px;
}
#planx .pxchips[hidden] { display: none; }
#planx .pxchip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev);
  color: var(--text-mute); font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: .12s; max-width: 220px; white-space: nowrap;
}
#planx .pxchip:hover { color: var(--text); border-color: var(--border-lt); }
#planx .pxchip.on {
  background: rgba(255, 216, 77, .12); border-color: rgba(255, 216, 77, .45);
  color: var(--text);
}
#planx .pxchip:has(.ic) { padding-left: 5px; }
#planx .pxchip .ic {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 750; color: #fff; background: var(--bg-soft);
}
#planx .pxchip .ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
#planx .pxchip .tx { overflow: hidden; text-overflow: ellipsis; }

/* ---- buttons (dark-native) ----------------------------------------------- */
#planx .pxbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-lt); cursor: pointer; transition: .15s;
}
#planx .pxbtn:hover { border-color: #39485a; }
#planx .pxbtn--primary { background: var(--violet); color: var(--px-ink); border-color: transparent; font-weight: 700; }
#planx .pxbtn--primary:hover { filter: brightness(1.06); border-color: transparent; }
#planx .pxbtn--ghost { background: transparent; border-color: var(--border); }
#planx .pxbtn--danger {
  background: rgba(255, 107, 129, .1); color: var(--red);
  border-color: rgba(255, 107, 129, .3);
}
#planx .pxbtn--danger:hover { background: rgba(255, 107, 129, .18); border-color: rgba(255, 107, 129, .5); }
#planx .pxbtn--sm { min-height: 31px; padding: 0 12px; font-size: 12.5px; }
#planx .pxbtn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- month grid ----------------------------------------------------------- */
#planx .pxgrid {
  border: 1px solid var(--border); border-radius: var(--px-r);
  overflow: hidden; background: var(--bg-card);
}
#planx .pxdow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border); background: var(--bg-soft);
}
#planx .pxdow span {
  padding: 9px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-dim); text-align: right;
}
#planx .pxweeks { display: grid; grid-template-columns: repeat(7, 1fr); }
#planx .pxday {
  min-height: 126px; padding: 8px 8px 26px; position: relative;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
#planx .pxday:nth-child(7n) { border-right: 0; }
#planx .pxday--out { background: rgba(6, 9, 13, .35); }
#planx .pxday--out .pxdaynum { color: var(--text-dim); opacity: .6; }
#planx .pxday--drop { background: rgba(255, 216, 77, .04); box-shadow: inset 0 0 0 1px rgba(255, 216, 77, .22); }
#planx .pxdayhead { display: flex; align-items: center; justify-content: flex-end; }
#planx .pxdaynum {
  font-size: 12.5px; font-weight: 650; color: var(--text-mute);
  font-variant-numeric: tabular-nums; line-height: 1;
  min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
}
#planx .pxday--today .pxdaynum {
  background: var(--violet); color: var(--px-ink); font-weight: 750;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, .18);
}

/* the "+ quick add" affordance — visible on cell hover (always on touch) */
#planx .pxquick {
  position: absolute; left: 8px; right: 8px; bottom: 6px;
  height: 20px; border: 0; border-radius: 7px; background: none;
  color: var(--text-dim); font: inherit; font-size: 11px; font-weight: 600;
  text-align: left; padding: 0 4px; cursor: pointer; opacity: 0; transition: .12s;
}
#planx .pxday:hover .pxquick, #planx .pxquick:focus-visible { opacity: 1; }
#planx .pxquick:hover { color: var(--violet); background: rgba(255, 216, 77, .07); }
@media (hover: none) { #planx .pxquick { opacity: 1; } }

/* ---- planned-video cards -------------------------------------------------- */
#planx .pxcard {
  border: 1px solid var(--border); border-radius: var(--px-r-sm);
  background: var(--bg-elev); padding: 6px 8px 7px; cursor: pointer;
  min-width: 0; transition: border-color .12s, background .12s;
  text-align: left; font: inherit; color: var(--text); width: 100%;
  display: block;
}
#planx .pxcard:hover { border-color: var(--border-lt); background: #1b2430; }
#planx .pxcard .t {
  display: block; font-size: 12px; font-weight: 650; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#planx .pxcard .pxpill { margin-top: 4px; }

/* property hints — account / client / first-line script snippet */
#planx .pxcard .pxmeta {
  display: block; margin-top: 2px; font-size: 10.5px; font-weight: 600;
  color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#planx .pxcard .pxmeta .d { margin: 0 4px; opacity: .6; }
#planx .pxcard .pxsnip {
  display: block; margin-top: 2px; font-size: 11px; color: var(--text-mute);
  line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* multi-select — marquee-hit (or shift/ctrl-clicked) cards wear a yellow ring */
#planx .pxcard.sel {
  border-color: rgba(255, 216, 77, .65);
  box-shadow: 0 0 0 1.5px rgba(255, 216, 77, .45);
  background: rgba(255, 216, 77, .05);
}
#planx .pxcard.sel:hover { border-color: rgba(255, 216, 77, .8); background: rgba(255, 216, 77, .08); }

/* the marquee rectangle itself (fixed overlay, appended to <body>) */
.pxmarq {
  position: fixed; z-index: 40; pointer-events: none;
  border: 1px solid rgba(255, 216, 77, .55); border-radius: 4px;
  background: rgba(255, 216, 77, .08);
}

/* selected-count badge — small dark pill, bottom center */
#planx .pxselbadge {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 39;
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 13px;
  background: var(--bg-elev); border: 1px solid rgba(255, 216, 77, .4); border-radius: 999px;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
  font-size: 12px; font-weight: 700; color: var(--text);
}
#planx .pxselbadge[hidden] { display: none; }
#planx .pxselbadge button {
  width: 22px; height: 22px; border: 0; border-radius: 999px; background: none;
  color: var(--text-dim); font: inherit; font-size: 11px; line-height: 1; cursor: pointer;
}
#planx .pxselbadge button:hover { color: var(--text); background: var(--bg-soft); }

/* right-click context menu — dark, at the pointer, with a status flyout */
#planx .pxctx {
  position: fixed; z-index: 60; min-width: 190px;
  background: var(--bg-elev); border: 1px solid var(--border-lt); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); padding: 5px; display: none;
}
#planx .pxctx.open { display: block; }
#planx .pxctx > button, #planx .pxctx .pxctx-subbtn {
  display: block; width: 100%; text-align: left; padding: 8px 11px;
  border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px;
  color: var(--text); cursor: pointer;
}
#planx .pxctx > button:hover, #planx .pxctx .pxctx-subbtn:hover { background: var(--bg-soft); }
#planx .pxctx button.danger { color: var(--red); }
#planx .pxctx button.danger:hover { background: rgba(255, 107, 129, .1); }
#planx .pxctx-hr { height: 1px; background: var(--border); margin: 5px 6px; }
#planx .pxctx-sub { position: relative; }
#planx .pxctx-subbtn { display: flex !important; align-items: center; }
#planx .pxctx-subbtn .ar { margin-left: auto; color: var(--text-dim); font-size: 14px; line-height: 1; }
#planx .pxctx-fly {
  position: absolute; left: calc(100% + 2px); top: -5px; min-width: 130px; display: none;
  background: var(--bg-elev); border: 1px solid var(--border-lt); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); padding: 5px;
}
#planx .pxctx-sub:hover .pxctx-fly, #planx .pxctx-sub.open .pxctx-fly { display: block; }
#planx .pxctx-fly button {
  display: block; width: 100%; text-align: left; padding: 7px 11px;
  border: 0; border-radius: 8px; background: none; font: inherit; font-size: 12.5px;
  color: var(--text); cursor: pointer;
}
#planx .pxctx-fly button:hover { background: var(--bg-soft); }
#planx .pxctx-date {
  display: flex; align-items: center; gap: 8px; padding: 4px 11px 6px; min-width: 0;
}
#planx .pxctx-date label { font-size: 12px; font-weight: 650; color: var(--text-dim); flex: none; }
#planx .pxctx-date .pxinput { min-height: 30px; padding: 4px 8px; font-size: 12px; }

/* drag states — the origin slot becomes a dashed placeholder, the pointer
   carries a lifted ghost, and a yellow drop-line marks the landing spot */
#planx .pxcard.dragging {
  opacity: .45; background: transparent;
  border-style: dashed; border-color: var(--border-lt);
}
#planx .pxcard.dragging > * { visibility: hidden; }
#planx .pxghost {
  position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none;
  transform: scale(1.04) rotate(1.5deg);
  background: #1b2430; border-color: rgba(255, 216, 77, .4);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .65);
}
/* multi-drag: how many cards are riding along (kept inside the card box so
   the drag-image snapshot can never clip it) */
#planx .pxghost .gcnt {
  position: absolute; top: 4px; right: 4px; min-width: 21px; height: 21px;
  padding: 0 5px; border-radius: 999px; background: var(--violet); color: var(--px-ink);
  font-size: 11px; font-weight: 750; display: grid; place-items: center;
}
#planx .pxdropline {
  position: relative; height: 0; border-top: 2px solid var(--violet);
  border-radius: 2px; margin: 1px 2px; pointer-events: none; flex: none;
}
#planx .pxdropline::before {
  content: ""; position: absolute; left: -4px; top: -5px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--violet);
}

/* inline title rename (double-click) — sits in the card, same type as .t */
#planx .pxtedit {
  display: block; width: 100%; padding: 0; border: 0; outline: none;
  background: transparent; color: var(--text); font: inherit;
  font-size: 12px; font-weight: 650; line-height: 1.3;
  border-bottom: 1px solid rgba(255, 216, 77, .5); border-radius: 0;
}

/* quick add's in-place input — a card-shaped shell you type the title into */
#planx .pxquickedit {
  border: 1px solid rgba(255, 216, 77, .5); border-radius: var(--px-r-sm);
  background: var(--bg-elev); padding: 6px 8px 7px;
}
#planx .pxquickedit input {
  display: block; width: 100%; padding: 0; border: 0; outline: none;
  background: transparent; color: var(--text); font: inherit;
  font-size: 12px; font-weight: 650; line-height: 1.3;
}
#planx .pxquickedit input::placeholder { color: var(--text-dim); }

@media (prefers-reduced-motion: reduce) {
  #planx .pxghost { transform: none; }
  #planx .pxcard, #planx .pxbtn, #planx .pxnavbtn, #planx .pxchip { transition: none; }
}

/* status pills — the .12 bg / .24 border tint recipe */
#planx .pxpill {
  display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 8px;
  border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  background: var(--bg-soft); color: var(--text-mute); border: 1px solid var(--border);
  white-space: nowrap;
}
#planx .pxpill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
#planx .pxpill--scripted { background: rgba(79, 157, 255, .12); color: var(--blue); border-color: rgba(79, 157, 255, .24); }
#planx .pxpill--filmed { background: rgba(245, 196, 81, .12); color: var(--px-amber); border-color: rgba(245, 196, 81, .24); }
#planx .pxpill--posted { background: rgba(60, 224, 163, .12); color: var(--green); border-color: rgba(60, 224, 163, .24); }

/* ---- empty state ----------------------------------------------------------- */
#planx .pxempty {
  padding: 72px 40px; text-align: center; display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--border); border-radius: var(--px-r); background: var(--bg-card);
}
#planx .pxempty .ill {
  width: 78px; height: 78px; border-radius: 22px; background: var(--bg-elev);
  border: 1px solid var(--border-lt); display: grid; place-items: center;
  color: var(--violet); margin-bottom: 20px;
}
#planx .pxempty h2 { margin: 0; font-size: 20px; font-weight: 750; }
#planx .pxempty p { color: var(--text-mute); max-width: 460px; margin: 10px 0 22px; font-size: 14px; line-height: 1.6; }
#planx .pxemptyrow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---- centered card modal (the Notion page feel) --------------------------- */
#planx .pxpageback {
  position: fixed; inset: 0; z-index: 41; padding: min(7vh, 64px) 16px 16px;
  background: rgba(6, 9, 13, .62); backdrop-filter: blur(6px);
  display: grid; place-items: start center;
  opacity: 0; pointer-events: none; transition: opacity .16s;
}
#planx .pxpageback.open { opacity: 1; pointer-events: auto; }
#planx .pxpage {
  width: min(720px, 100%); max-height: calc(100dvh - min(7vh, 64px) - 16px);
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border-lt); border-radius: 20px;
  overflow: hidden; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .65);
  transform: translateY(8px) scale(.985); transition: transform .16s ease;
}
#planx .pxpageback.open .pxpage { transform: none; }
@media (prefers-reduced-motion: reduce) {
  #planx .pxpageback, #planx .pxpage { transition: none; }
  #planx .pxpage { transform: none; }
}
#planx .pxpage-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#planx .pxpage-head .saved {
  font-size: 11.5px; font-weight: 600; color: var(--text-dim);
  opacity: 0; transition: opacity .25s;
}
#planx .pxpage-head .saved.on { opacity: 1; }
#planx .pxpage-head .saved.ok { color: var(--green); }
#planx .pxpage-head .sp { flex: 1; }
#planx .pxpage-body {
  padding: 22px 34px 26px; overflow-y: auto; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
/* the big page title */
#planx .pxpagetitle {
  width: 100%; border: 0; outline: none; background: transparent; color: var(--text);
  font: inherit; font-size: 25px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25;
  padding: 0 0 6px; flex-shrink: 0;
}
#planx .pxpagetitle::placeholder { color: var(--text-dim); }
/* property rows under the title */
#planx .pxprops { margin: 8px 0 14px; flex-shrink: 0; }
#planx .pxprop {
  display: grid; grid-template-columns: 128px 1fr; gap: 10px; align-items: center;
  padding: 3px 6px; margin: 0 -6px; min-width: 0;
  border-radius: 8px; transition: background .1s;
}
/* Notion-style property rows: quiet until hovered (Nickolai, 2026-09-02) */
#planx .pxprop:hover { background: var(--bg-soft); }
#planx .pxprop > label {
  font-size: 12px; font-weight: 650; color: var(--text-dim);
}
#planx .pxprop .pxinput:not(:focus):not(:hover) { border-color: transparent; background: transparent; }
#planx .pxprop--refs { align-items: start; }
#planx .pxprop--refs > label { align-self: start; padding-top: 9px; }
#planx .pxprop .pxinput { min-height: 34px; padding: 6px 10px; }
#planx .pxprop .pxseg { max-width: 380px; }
#planx .pxprop .pxseg button { height: 27px; font-size: 11.5px; }
#planx .pxrefwrap { min-width: 0; }
/* the script fills the rest of the page */
#planx .pxscript {
  width: 100%; flex: 1; min-height: 280px; resize: vertical;
  border: 0; border-top: 1px solid var(--border); border-radius: 0; outline: none;
  background: transparent; color: var(--text);
  font: inherit; font-size: 14px; line-height: 1.6; padding: 16px 0 4px;
}
#planx .pxscript::placeholder { color: var(--text-dim); }
/* mobile: the card is a full-screen sheet */
@media (max-width: 700px) {
  #planx .pxpageback { padding: 0; }
  #planx .pxpage {
    width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0;
  }
  #planx .pxpage-body { padding: 16px 18px 20px; }
  #planx .pxpagetitle { font-size: 21px; }
  #planx .pxprop { grid-template-columns: 104px 1fr; }
}
#planx .pxiconbtn {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text-mute); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font: inherit; transition: .12s;
  position: relative;
}
#planx .pxiconbtn:hover { color: var(--text); border-color: #39485a; }

/* overflow menu */
#planx .pxmenu {
  position: absolute; top: 38px; right: 0; z-index: 5; min-width: 150px;
  background: var(--bg-elev); border: 1px solid var(--border-lt); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); padding: 5px; display: none;
}
#planx .pxmenu.open { display: block; }
#planx .pxmenu button {
  display: block; width: 100%; text-align: left; padding: 8px 11px;
  border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px;
  color: var(--text); cursor: pointer;
}
#planx .pxmenu button:hover { background: var(--bg-soft); }
#planx .pxmenu button.danger { color: var(--red); }
#planx .pxmenu button.danger:hover { background: rgba(255, 107, 129, .1); }

/* fields (dark-native — never the shared .field, ui.css paints it light) */
#planx .pxfield { margin-bottom: 14px; min-width: 0; }
#planx .pxfield > label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px;
}
#planx .pxinput {
  width: 100%; min-height: 38px; padding: 8px 12px; font: inherit; font-size: 13.5px;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 11px; outline: none;
  transition: border-color .12s; color-scheme: dark;
}
#planx .pxinput:focus { border-color: rgba(255, 216, 77, .5); }
#planx .pxrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* status segmented control — one tap to mark posted */
#planx .pxseg {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 11px; padding: 4px;
}
#planx .pxseg button {
  height: 30px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 650; color: var(--text-mute); transition: .12s;
}
#planx .pxseg button:hover:not(.on) { color: var(--text); }
#planx .pxseg button.on { background: var(--bg-elev); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-lt); }
#planx .pxseg button.on[data-status="scripted"] { color: var(--blue); box-shadow: inset 0 0 0 1px rgba(79, 157, 255, .35); background: rgba(79, 157, 255, .1); }
#planx .pxseg button.on[data-status="filmed"] { color: var(--px-amber); box-shadow: inset 0 0 0 1px rgba(245, 196, 81, .35); background: rgba(245, 196, 81, .1); }
#planx .pxseg button.on[data-status="posted"] { color: var(--green); box-shadow: inset 0 0 0 1px rgba(60, 224, 163, .35); background: rgba(60, 224, 163, .1); }

/* reference links list */
#planx .pxrefs { display: grid; gap: 6px; }
#planx .pxref {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 8px 7px 11px;
}
#planx .pxref a {
  flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--violet-light);
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#planx .pxref a:hover { text-decoration: underline; }
#planx .pxref .x {
  flex: none; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none;
  color: var(--text-dim); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; transition: .12s;
}
#planx .pxref .x:hover { color: var(--red); background: rgba(255, 107, 129, .08); }
#planx .pxrefadd { display: flex; gap: 6px; margin-top: 6px; }
#planx .pxrefadd .pxinput { min-height: 34px; font-size: 12.5px; }
#planx .pxrefadd .pxbtn { min-height: 34px; }

/* ---- bulk dialog ----------------------------------------------------------- */
#planx .pxmodalback {
  position: fixed; inset: 0; padding: 18px; z-index: 50;
  background: rgba(6, 9, 13, .62); backdrop-filter: blur(6px);
  display: none; place-items: center;
}
#planx .pxmodalback.open { display: grid; }
#planx .pxmodal {
  width: min(460px, calc(100vw - 28px)); max-height: calc(100dvh - 36px);
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border-lt); border-radius: 20px;
  overflow: hidden; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
}
#planx .pxmodal-head {
  padding: 17px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
#planx .pxmodal-head h2 { margin: 0; font-size: 16.5px; font-weight: 700; }
#planx .pxmodal-head .sq {
  width: 32px; height: 32px; border-radius: 9px; background: var(--violet);
  color: var(--px-ink); display: grid; place-items: center; flex-shrink: 0;
}
#planx .pxmodal-head .close {
  margin-left: auto; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); color: var(--text-mute); font-size: 16px; cursor: pointer;
}
#planx .pxmodal-head .close:hover { color: var(--text); }
#planx .pxmodal-body { padding: 20px 22px; overflow-y: auto; min-height: 0; }
#planx .pxmodal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#planx .pxmodal-foot .hint { flex: 1; font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* per-day stepper in the bulk dialog (1-5) */
#planx .pxperday { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
#planx .pxperday button {
  height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft);
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-mute); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: .12s;
}
#planx .pxperday button:hover:not(.on) { color: var(--text); border-color: var(--border-lt); }
#planx .pxperday button.on { background: var(--violet); color: var(--px-ink); border-color: transparent; }

/* ---- card content (0037) --------------------------------------------------- */
/* "N with content to post" chip in the month nav */
#planx .pxreadychip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 999px; border: 1px solid rgba(255, 216, 77, .35);
  background: rgba(255, 216, 77, .08); color: var(--violet-light);
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
/* clip-count chip on a grid card */
#planx .pxcard .pxclips {
  display: inline-flex; align-items: center; height: 17px; padding: 0 7px;
  margin: 4px 0 0 5px; border-radius: 999px;
  border: 1px solid rgba(255, 216, 77, .3); background: rgba(255, 216, 77, .1);
  color: var(--violet-light); font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
/* file rows in the card modal */
#planx .pxfilewrap { min-width: 0; }
#planx .pxfiles { display: grid; gap: 6px; }
#planx .pxfile {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 8px 7px 11px; min-width: 0;
}
#planx .pxfile .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
#planx .pxfile .k {
  flex: none; font-size: 10px; font-weight: 750; letter-spacing: .05em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 6px;
  background: var(--bg-elev); color: var(--text-dim); border: 1px solid var(--border);
}
#planx .pxfile .k--video { color: var(--blue); border-color: rgba(79, 157, 255, .3); }
#planx .pxfile .k--image { color: var(--green); border-color: rgba(60, 224, 163, .3); }
#planx .pxfile .k--audio, #planx .pxfile .k--voice { color: var(--px-amber); border-color: rgba(245, 196, 81, .3); }
#planx .pxfile .nm {
  flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#planx .pxfile .sz { flex: none; font-size: 11px; color: var(--text-dim); }
#planx .pxfile .dl {
  flex: none; font-size: 12px; font-weight: 650; color: var(--violet-light);
  text-decoration: none; padding: 3px 8px; border-radius: 7px;
  border: 1px solid rgba(255, 216, 77, .3);
}
#planx .pxfile .dl:hover { background: rgba(255, 216, 77, .1); }
#planx .pxfile .x {
  flex: none; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none;
  color: var(--text-dim); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; transition: .12s;
}
#planx .pxfile .x:hover { color: var(--red); background: rgba(255, 107, 129, .08); }
#planx .pxfile audio { width: 100%; height: 34px; margin-top: 6px; display: block; }
/* in-flight upload progress rows */
#planx .pxups:not(:empty) { display: grid; gap: 6px; margin-top: 6px; }
#planx .pxup {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--bg-soft); border: 1px dashed var(--border-lt);
  border-radius: 10px; padding: 7px 11px;
}
#planx .pxup .nm {
  flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#planx .pxup .pct { flex: none; font-size: 11px; font-weight: 700; color: var(--violet-light); }
#planx .pxup .bar {
  flex: none; width: 90px; height: 5px; border-radius: 999px;
  background: var(--bg-elev); overflow: hidden;
}
#planx .pxup .bar .fill { display: block; height: 100%; background: var(--violet); transition: width .2s; }
#planx .pxup.err { border-color: rgba(255, 107, 129, .4); }
#planx .pxup.err .pct { color: var(--red); }
/* the drop zone */
#planx .pxdrop {
  margin-top: 6px; padding: 7px 12px; text-align: left; cursor: pointer;
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  border: 1px dashed var(--border-lt); border-radius: 10px;
  background: var(--bg-soft); transition: border-color .12s, background .12s; outline: none;
}
#planx .pxdrop:hover, #planx .pxdrop:focus-visible, #planx .pxdrop.on {
  border-color: rgba(255, 216, 77, .5); background: rgba(255, 216, 77, .05);
}
#planx .pxdrop .big { display: inline; font-size: 12px; font-weight: 650; color: var(--text-mute); white-space: nowrap; }
#planx .pxdrop .small {
  display: inline; font-size: 11px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
#planx .pxdrop.on .big { color: var(--text); }
/* pipeline placeholder: where the finished cut lands */
#planx .pxeditwait {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 8px; padding: 22px 12px;
  border: 1.5px dashed var(--border-lt); border-radius: 11px;
  color: var(--text-dim); font-size: 12px;
}
#planx .pxeditwait .ic { font-size: 15px; opacity: .6; }
/* brand picker with logos (Nickolai, 2026-09-02) */
#planx .pxacctpick { position: relative; min-width: 0; }
#planx .pxacctbtn {
  display: flex; align-items: center; gap: 7px; width: 100%;
  text-align: left; cursor: pointer;
}
#planx .pxacctbtn .cur { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#planx .pxacctbtn .ar { color: var(--text-dim); font-size: 10px; }
#planx .pxacctmenu {
  position: absolute; z-index: 32; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 260px; overflow: auto; padding: 5px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 11px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; gap: 1px;
}
#planx .pxacctmenu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text); font: inherit; font-size: 12.5px;
  text-align: left;
}
#planx .pxacctmenu button:hover { background: var(--bg-soft); }
#planx .pxacctmenu button.on { background: rgba(255, 216, 77, .12); }
#planx .pxacctinit {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev); color: var(--text-mute);
  font-size: 9.5px; font-weight: 700;
}
/* voice note preview: compact native player, full row width */
#planx .pxfile audio { width: 100%; height: 30px; margin-top: 6px; border-radius: 8px; display: block; }
/* the Scheduled pill + its popup (0041 rework) */
#planx .pxprop--status { position: relative; }
#planx .pxsegsched {
  height: 27px; padding: 0 11px; border-radius: 999px; cursor: pointer;
  font-size: 11.5px; font-weight: 650; font-family: inherit;
  background: transparent; color: var(--text-mute);
  border: 1px dashed var(--border-lt); margin-left: 4px;
  transition: color .12s, border-color .12s, background .12s;
}
#planx .pxsegsched:hover { color: var(--text); border-color: rgba(167, 139, 250, .5); }
#planx .pxsegsched.sched-on {
  background: rgba(167, 139, 250, .16); color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, .45);
}
#planx .pxschedpop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 90px;
  width: min(340px, 78vw); padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; gap: 7px;
}
/* schedule badge on grid cards (0041) */
#planx .pxschedchip {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 3px;
  margin-top: 3px; padding: 1px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 650; letter-spacing: .01em; line-height: 1.7;
  background: rgba(255, 216, 77, .13); color: #d9b93f;
  border: 1px solid rgba(255, 216, 77, .28);
}
#planx .pxmavatar {
  width: 14px; height: 14px; border-radius: 50%; object-fit: cover;
  vertical-align: -3px; margin-right: 4px;
}
#planx .pxschedchip--on { background: rgba(53, 174, 135, .14); color: var(--green, #35ae87); border-color: rgba(53, 174, 135, .3); }
#planx .pxschedchip--miss { background: rgba(224, 166, 63, .13); color: var(--amber, #e0a63f); border-color: rgba(224, 166, 63, .3); }
/* schedule after completion (0041) */
#planx .pxschedwrap { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
#planx .pxschedrow { display: flex; gap: 8px; align-items: center; min-width: 0; }
#planx .pxschedrow .pxinput { flex: 1; min-width: 0; }
#planx .pxschedchk {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-mute); cursor: pointer; user-select: none;
}
#planx .pxschedchk input { accent-color: var(--violet, #ffd84d); }
#planx .pxschedhint { font-size: 11px; color: var(--text-dim); line-height: 1.45; }
#planx .pxschedline { font-size: 12px; color: var(--text-mute); line-height: 1.5; }
#planx .pxschedline a { color: inherit; text-decoration: underline; }
#planx .pxschedline--ok { color: var(--green, #35ae87); }
#planx .pxschedline--warn { color: var(--amber, #e0a63f); }
/* voice note recorder line */
#planx .pxvoice { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-width: 0; }
#planx .pxvoice .state {
  flex: 1; min-width: 0; font-size: 12px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 860px) and (min-width: 701px) {
  #planx .pxgridwrap { overflow-x: auto; }
  #planx .pxgrid { min-width: 700px; }
}
/* ===== phone layout (Nickolai, 2026-09-02: "optimize it for mobile hard") =====
   The 7-column month grid becomes a vertical agenda: one card-sized section
   per day, full date labels, other-month filler and (where :has is supported)
   empty days hidden. Cards get thumb-sized touch targets. */
#planx .pxdaylabel { display: none; }
@media (max-width: 700px) {
  #planx .pxgridwrap { overflow-x: visible; }
  #planx .pxgrid { min-width: 0; }
  #planx .pxdow { display: none; }
  #planx .pxweeks { display: flex; flex-direction: column; gap: 8px; }
  #planx .pxday { min-height: 0; border-radius: 12px; padding: 10px 12px; }
  #planx .pxday--out { display: none; }
  #planx .pxday:not(.pxday--today):not(:has(.pxcard)) { display: none; }
  #planx .pxdaynum { display: none; }
  #planx .pxdaylabel {
    display: block; font-size: 12px; font-weight: 750; color: var(--text-mute);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px;
  }
  #planx .pxday--today .pxdaylabel { color: var(--violet, #ffd84d); }
  #planx .pxcard { padding: 11px 12px; }
  #planx .pxcard .t { font-size: 14px; }
  #planx .pxquick { min-height: 34px; }
  #planx .pxschedpop { left: 0; right: 0; width: auto; }
  /* the header controls stack instead of overflowing */
  #planx .pxmonthnav { flex-wrap: wrap; }
}

/* ===== edited video (content jobs, 0039) ===== */
/* pipeline chip on a grid card */
#planx .pxcard .pxeditchip {
  display: inline-flex; align-items: center; height: 17px; padding: 0 7px;
  margin: 4px 0 0 5px; border-radius: 999px;
  border: 1px solid rgba(79, 157, 255, .3); background: rgba(79, 157, 255, .1);
  color: var(--blue); font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
#planx .pxcard .pxeditchip--delivered {
  border-color: rgba(255, 216, 77, .35); background: rgba(255, 216, 77, .12);
  color: var(--violet-light);
}
#planx .pxcard .pxeditchip--approved {
  border-color: rgba(60, 224, 163, .3); background: rgba(60, 224, 163, .1);
  color: var(--green);
}
/* the review block in the card modal */
#planx .pxeditwrap { min-width: 0; display: grid; gap: 8px; }
#planx .pxeditvid {
  width: 100%; max-height: 340px; border-radius: 10px;
  border: 1px solid var(--border); background: #000;
}
#planx .pxeditrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#planx .pxeditrow .pxbtn { text-decoration: none; }
#planx .pxeditline { font-size: 12.5px; color: var(--text-dim); }
#planx .pxeditline--ok { color: var(--green); font-weight: 650; }
#planx .pxeditnote {
  font-size: 12.5px; color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px;
  white-space: pre-wrap;
}
