/* PROTOTYPE. Darkroom tokens from apps/web/tailwind.config.ts and apps/mobile/styles/colors.ts. Dark only. */
@font-face { font-family: Geist; src: url(./assets/Geist-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(./assets/Geist-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(./assets/Geist-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --canvas: #0d0b09; --panel: rgb(16 13 10 / .78); --panel-2: rgb(255 255 255 / .06); --raised: rgb(255 255 255 / .14);
  --overlay: #1a1612; --nav: #120f0c;
  --fg: #fff; --fg-muted: rgb(255 255 255 / .78); --fg-faint: rgb(255 255 255 / .55);
  --line: rgb(255 255 255 / .1); --line-strong: rgb(255 255 255 / .22);
  --accent: #f59e0b; --accent-soft: #fbbf24; --on-accent: #1c1917;
  --danger: #fca5a5; --ok: #4ade80;
  /* Locations: one cool colour, so they never read as a document category. */
  --loc: #7dd3fc; --loc-soft: rgb(56 189 248 / .15); --loc-line: rgb(56 189 248 / .45); --loc-fg: #e0f2fe;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); }
body { font-family: Geist, ui-sans-serif, system-ui, sans-serif; color: var(--fg); -webkit-font-smoothing: antialiased; font-size: 14px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
svg { display: block; flex-shrink: 0; }
.mi { width: 16px; height: 16px; }
.loc-ic { color: var(--loc); }
.muted { color: var(--fg-faint); }
.sp { flex: 1; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-strong); background: rgb(255 255 255 / .06); white-space: nowrap; min-height: 36px; }
.btn:hover:not(:disabled) { background: var(--raised); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.btn.sm:has(> .mi:first-child) { padding-left: 9px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-soft); }
.btn.danger { color: var(--danger); border-color: transparent; background: none; padding-left: 0; }
.btn.danger:hover { background: none; text-decoration: underline; }
.btn:disabled { opacity: .45; }
.btn .cnt { background: rgb(0 0 0 / .2); border-radius: 9px; min-width: 18px; height: 18px; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; }
.ibtn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--fg-muted); flex: none; }
.ibtn:hover { background: var(--panel-2); color: var(--fg); }
.link { color: var(--accent-soft); font-weight: 500; font-size: 13px; }
.link:hover { text-decoration: underline; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; flex: none; }
.seg button { padding: 4px 12px; font-size: 13px; font-weight: 500; color: var(--fg-muted); border-radius: 999px; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--raised); color: var(--fg); }
.seg.wide { display: flex; margin-bottom: 10px; }
.seg.wide button { flex: 1; text-align: center; }
.dot { width: 7px; height: 7px; border-radius: 4px; display: inline-block; flex: none; }
.dot.published { background: var(--ok); }
.dot.draft { box-shadow: inset 0 0 0 1.5px var(--fg-muted); }
.dot.changed { background: var(--accent); }
.dot.none { visibility: hidden; }
.spin { width: 11px; height: 11px; border-radius: 6px; border: 2px solid currentColor; border-top-color: transparent; animation: s 1s linear infinite; display: inline-block; vertical-align: -1px; }
@keyframes s { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* ---------- Web shell ---------- */
.w-photo { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.w-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.w-photo::after { content: ''; position: absolute; inset: 0; background: rgb(13 11 9 / .55); }
.w-side { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--nav); border-right: 1px solid var(--line); z-index: 5; }
.w-side img { height: 26px; width: auto; align-self: flex-start; margin: 6px 10px 26px; }
.w-nav { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--fg-muted); text-decoration: none; }
.w-nav:hover { background: var(--panel-2); color: var(--fg); }
.w-nav.on { background: var(--raised); color: var(--fg); }
.w-user { margin-top: 8px; border-top: 1px solid var(--line); padding: 12px 6px 0; display: flex; gap: 10px; align-items: center; }
.w-avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--raised); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.w-user b { display: block; font-weight: 500; }
.w-user span { font-size: 12px; color: var(--fg-faint); }
.w-col { margin-left: 232px; min-width: 0; }
.w-col.has-panel { margin-right: 380px; }
.w-bar { position: sticky; top: 0; z-index: 4; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgb(13 11 9 / .6); backdrop-filter: blur(12px); }
.w-bar .ib { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--fg-muted); }
.w-bar .vr { width: 1px; height: 20px; background: var(--line); }
.w-crumb { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; white-space: nowrap; }
.w-crumb .mark { width: 22px; height: 22px; border-radius: 6px; background: #14b8a6; color: #042f2e; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.w-crumb .sep { color: var(--fg-faint); }
.w-search { margin-left: auto; display: flex; gap: 22px; align-items: center; font-size: 13px; color: var(--fg-muted); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgb(255 255 255 / .04); }
.w-search kbd { font: inherit; font-size: 11px; color: var(--fg-faint); }
.w-main { padding: 18px 24px 80px; }
@media (max-width: 1180px) {
  .w-side { display: none; }
  .w-col { margin-left: 0; }
  .w-search { display: none; }
  .w-bar .ib:last-child { margin-left: auto; }
}

/* ---------- Toolbar ---------- */
.tb { display: flex; min-height: 36px; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tb h1 { font-size: 20px; font-weight: 600; margin: 0 14px 0 0; }
.tb-nav { display: flex; align-items: center; gap: 2px; }
.tb .rng { font-size: 15px; font-weight: 600; margin: 0 10px 0 6px; white-space: nowrap; }

/* ---------- Calendar ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(16px); }
.cal { overflow-x: auto; }
.cal.wk { --lw: 244px; --rh: 32px; --ah: 28px; }
.cal.mo { --lw: 220px; --rh: 24px; --ah: 22px; }
.cal.mo .cal-in { min-width: 860px; }
.row, .grp { display: grid; grid-template-columns: var(--gc); position: relative; }
.lb { grid-column: 1; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 0 8px 0 10px; position: relative; }
.bg { border-left: 1px solid var(--line); position: relative; }
/* Days after the release line: only managers see them. */
.bg.dr, .dh.dr { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .035) 0 6px, transparent 6px 12px); }
/* The release line, on the right edge of the last day that is out. */
.bg.edge::after, .dh.edge::after { content: ''; position: absolute; top: 0; bottom: 0; right: -1px; width: 2px; background: var(--accent); z-index: 4; pointer-events: none; }
.grp .bg.edge::after { top: -1px; bottom: -1px; }
.dh { position: relative; }
.dh .edge-tag { position: absolute; top: 6px; right: 4px; font-size: 10.5px; font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 1px 6px; z-index: 5; }
.mo .dh .edge-tag { display: none; }
.bg.no { background-color: rgb(255 255 255 / .025); }
.bg.tod { background-color: rgb(245 158 11 / .07); }

.row.hd { border-bottom: 1px solid var(--line); }
.dh { grid-row: 1; padding: 8px 8px 7px; font-size: 12px; color: var(--fg-muted); border-left: 1px solid var(--line); min-width: 0; white-space: nowrap; overflow: hidden; }
.dh b { display: block; font-size: 14px; color: var(--fg); font-weight: 600; margin: 1px 0 2px; }
.dh.no { background-color: rgb(255 255 255 / .025); }
.dh.no b { color: var(--fg-faint); font-weight: 500; }
.dh.tod b { color: var(--accent-soft); }
.dh i { font-style: normal; display: flex; align-items: center; gap: 5px; font-size: 11.5px; }
.dh i.sent-tag { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 1px 7px; }
.dh .chg { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--fg-muted); margin: 0 -5px; padding: 1px 5px; border-radius: 6px; }
.dh .chg:hover { background: var(--panel-2); color: var(--fg); }
.dh.over { outline: 2px dashed var(--accent); outline-offset: -3px; }
.mo .dh { text-align: center; padding: 6px 0 5px; font-size: 10.5px; display: flex; flex-direction: column; align-items: center; }
.mo .dh b { font-size: 12.5px; }
.mo button.dh:hover { background: var(--panel-2); }

.row.cr { grid-auto-rows: 40px; }
.row.cr .lb, .grp .lb { font-weight: 600; }
.row.cr .lb .nm { padding-left: 4px; }
.cc { grid-row: 1; align-self: stretch; padding: 0 9px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; position: relative; z-index: 1; min-width: 0; }
.mo .cc { font-size: 10.5px; font-weight: 500; padding: 0; justify-content: center; }
.cc:hover { background: var(--panel-2); }
.cc .plus { color: var(--fg-faint); opacity: 0; }
.cc:hover .plus, .cc:focus-visible .plus { opacity: 1; }
.cc-edit { grid-row: 1; align-self: center; padding: 0 4px; position: relative; z-index: 3; }
.cci { width: 100%; min-width: 64px; background: var(--overlay); border: 1px solid var(--accent); border-radius: 8px; padding: 5px 7px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; }
.cci.bad { border-color: #f87171; }

.grp { border-top: 1px solid var(--line); grid-auto-rows: var(--rh); padding: 2px 0; }
.grp .bg { margin: -2px 0; }
.grp > .lb { align-self: start; height: var(--rh); z-index: 2; }
.gt { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; height: 28px; padding: 0 4px; border-radius: 7px; font-weight: 600; }
.gt:hover { background: var(--panel-2); }
.gt .car { color: var(--fg-faint); }
.gt .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt .n { color: var(--fg-faint); font-weight: 400; }
.gm { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--fg-faint); flex: none; }
.gm:hover, .gm[aria-expanded="true"] { background: var(--panel-2); color: var(--fg); }
.ren { flex: 1; min-width: 0; background: var(--overlay); border: 1px solid var(--accent); border-radius: 7px; padding: 4px 8px; font-weight: 600; outline: none; }
.sum { grid-column: 2 / -1; grid-row: 1; align-self: center; padding: 0 10px; color: var(--fg-faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }

/* The one mark: a bar. Locations are blue, documents are neutral. */
.bar { position: relative; z-index: 1; margin: 3px 3px; border-radius: 7px; padding: 0 8px 0 6px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; background: rgb(255 255 255 / .09); border: 1px solid var(--line-strong); display: flex; align-items: center; gap: 5px; min-width: 0; cursor: grab; }
.bar:hover { background: rgb(255 255 255 / .15); }
.bar .mi { width: 13px; height: 13px; color: var(--fg-faint); }
.bar .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar em { font-style: normal; color: var(--fg-faint); font-weight: 400; margin-left: auto; padding-left: 8px; flex: none; display: flex; align-items: center; gap: 5px; }
.bar.loc { background: var(--loc-soft); border-color: var(--loc-line); color: var(--loc-fg); }
.bar.loc:hover { background: rgb(56 189 248 / .24); }
.bar.loc .mi { color: var(--loc); }
.bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; border-left-style: dashed; }
.bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; border-right-style: dashed; }
.bar.every { cursor: pointer; }
.bar.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.bar.drag { border-color: var(--accent); background: rgb(245 158 11 / .2); color: #fff; z-index: 3; }
.bar .h { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; }
.bar .h::after { content: ''; position: absolute; right: 3px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0; }
.bar:hover .h::after { opacity: .5; }
.mo .bar { margin: 2px 1px; padding: 0 4px; font-size: 10.5px; border-radius: 5px; }
.mo .bar.cl { margin-left: 0; }
.mo .bar.cr { margin-right: 0; }
.mo .bar .h { width: 6px; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
body.dragging.resize, body.dragging.resize * { cursor: ew-resize !important; }

/* A free place in a category on a day. Hover shows "+". */
.slot { position: relative; z-index: 1; margin: 3px 3px; border-radius: 7px; display: grid; place-items: center; container-type: inline-size; min-width: 0; }
.slot span { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--fg-muted); opacity: 0; white-space: nowrap; }
.slot:hover, .slot:focus-visible, .slot.over { background: rgb(255 255 255 / .05); outline: 1px dashed var(--line-strong); outline-offset: -1px; }
.slot:hover span, .slot:focus-visible span, .slot.over span { opacity: 1; }
.locs .slot:hover, .locs .slot.over { outline-color: var(--loc-line); background: rgb(56 189 248 / .06); }
.locs .slot span { color: var(--loc-fg); }
.slot.over { outline: 2px dashed var(--accent); }
@container (max-width: 74px) { .slot b { display: none; } }
.mo .slot { margin: 2px 1px; border-radius: 5px; }
.mo .slot .mi { width: 12px; height: 12px; }
body.dragging .slot { pointer-events: none; }

/* Heading menu */
.menu { position: fixed; z-index: 60; background: var(--overlay); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px; width: 230px; box-shadow: 0 14px 34px rgb(0 0 0 / .55); font-weight: 400; }
.menu button { display: block; width: 100%; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.menu button:hover:not(:disabled) { background: var(--panel-2); }
.menu button:disabled { color: var(--fg-faint); }
.menu .bad:not(:disabled) { color: var(--danger); }
.menu small { display: block; font-size: 12px; font-weight: 400; color: var(--fg-faint); margin-top: 2px; }
.menu.flat { position: static; width: auto; border: 0; box-shadow: none; padding: 0; background: none; }
.menu.flat button { padding: 12px 4px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }

/* ---------- Panel (web) and sheet (phone): one body ---------- */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; background: var(--overlay); border-left: 1px solid var(--line-strong); z-index: 10; display: flex; flex-direction: column; }
.ph-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.ph-head h2 { font-size: 17px; font-weight: 600; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-body { flex: 1; overflow-y: auto; padding: 4px 18px 18px; }
.ph-foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); display: flex; }
.ph-foot .btn { flex: 1; }


.f { padding: 12px 0; border-bottom: 1px solid var(--line); }
.f.last { border-bottom: 0; }
.f .k { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-muted); font-weight: 500; margin-bottom: 7px; }
.f .k span { color: var(--fg-faint); font-weight: 400; }
.f input:not([type=checkbox]), .f textarea, .pick select, .newcat input { width: 100%; background: rgb(255 255 255 / .05); border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 10px; outline: none; resize: vertical; }
.f input:focus, .f textarea:focus, .pick select:focus, .newcat input:focus { border-color: var(--accent); }
.pick { display: grid; grid-template-columns: 1fr 32px; }
.pick select { grid-column: 1 / -1; grid-row: 1; appearance: none; padding-right: 32px; cursor: pointer; }
.pick select option { background: var(--overlay); }
.pick .mi { grid-column: 2; grid-row: 1; place-self: center; pointer-events: none; color: var(--fg-faint); }
.newcat { display: flex; gap: 8px; margin-top: 8px; }
.newcat input { flex: 1; min-width: 0; }
.file { display: flex; align-items: center; gap: 12px; }
.file .thumb { width: 34px; height: 44px; border-radius: 4px; background: linear-gradient(#f5f5f4 0 0) 6px 8px / 22px 2px no-repeat, linear-gradient(#d6d3d1 0 0) 6px 14px / 18px 2px no-repeat, linear-gradient(#d6d3d1 0 0) 6px 20px / 20px 2px no-repeat, #fafaf9; flex: none; }
.file .t { flex: 1; min-width: 0; }
.file .t b { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .t small { color: var(--fg-faint); font-size: 12px; }
.tg { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; }
.tog { position: relative; width: 38px; height: 22px; flex: none; }
.tog input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tog span { position: absolute; inset: 0; border-radius: 11px; background: rgb(255 255 255 / .16); pointer-events: none; }
.tog span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 8px; background: #fff; transition: transform .15s; }
.tog input:checked + span { background: var(--accent); }
.tog input:checked + span::after { transform: translateX(16px); background: var(--on-accent); }
.tog input:focus-visible + span { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.warn { color: var(--accent-soft); font-size: 12.5px; margin: 8px 0 0; }

.mc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mc-h b { font-weight: 600; }
.mc-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mc-g .w { text-align: center; font-size: 11px; color: var(--fg-faint); padding: 2px 0; }
.mc-g button { height: 34px; border-radius: 9px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.mc-g button:hover { background: var(--panel-2); }
.mc-g button.no { color: var(--fg-faint); }
.mc-g button.tod { box-shadow: inset 0 0 0 1px var(--accent); }
.mc-g button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.drop { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 30px 16px; margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.drop .mi { color: var(--fg-faint); }
.drop.over { border-color: var(--accent); background: rgb(245 158 11 / .06); }
.upf { padding: 12px 0; border-bottom: 1px solid var(--line); }
.upf-h { display: flex; align-items: center; gap: 8px; }
.upf-h b { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upf-h .ibtn { width: 26px; height: 26px; }
.upf-m { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-top: 8px; }
.upf-m select { font-size: 13px; padding: 6px 30px 6px 9px; }
.ver { margin: 4px 0 0; color: var(--accent-soft); font-size: 12.5px; }
.ph-body > .link { display: block; margin-top: 12px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100vw - 24px); }
.toast { background: var(--overlay); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
.toast button { color: var(--accent-soft); font-weight: 600; }
body.phone #toast-root { bottom: 84px; }

/* ---------- Phone and mobile web ---------- */
.m { min-height: 100dvh; display: flex; flex-direction: column; font-size: 16px; }
.m-head { position: sticky; top: 0; z-index: 4; background: rgb(13 11 9 / .92); backdrop-filter: blur(12px); padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.m-r1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-r1 h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.m-st { display: flex; align-items: center; gap: 7px; color: var(--fg-muted); font-size: 14px; min-height: 36px; margin: 4px 0 6px; }
.m-strip { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.m-strip > button:not(.ibtn) { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 6px; border-radius: 14px; font-size: 12px; color: var(--fg-faint); text-align: center; }
.m-strip > button b { font-size: 15px; color: var(--fg); font-weight: 600; }
.m-strip > button.tod b { color: var(--accent-soft); }
.m-strip > button.on { background: var(--accent); color: var(--on-accent); }
.m-strip > button.on b { color: var(--on-accent); }
.m-strip > button.on .dot.published { background: var(--on-accent); }
.m-strip > button.on .dot.draft { box-shadow: inset 0 0 0 1.5px var(--on-accent); }
.m-body { flex: 1; padding: 6px 16px 96px; }
.m-call { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--fg-muted); font-weight: 500; }
.m-call b { font-size: 22px; color: var(--fg); font-variant-numeric: tabular-nums; }
.m-call .cci { width: 110px; flex: none; font-size: 20px; }
.m-g { padding-top: 10px; }
.m-gh { display: flex; align-items: center; position: relative; }
.m-gh .gt { height: 40px; font-size: 16px; padding: 0; }
.m-gh .gt:hover { background: none; }
.m-gh .gm { width: 40px; height: 40px; }
.m-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.m-row .mi { color: var(--fg-faint); }
.m-row.loc .mi { color: var(--loc); }
.m-row .t { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-row .d { color: var(--fg-faint); font-size: 14px; white-space: nowrap; }
.m-add { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--fg-faint); font-size: 15px; }
.locs .m-add .mi { color: var(--loc); }
.m-fab { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgb(13 11 9 / .95) 30%); }
.m-fab .btn { flex: 1; min-height: 44px; font-size: 15px; background: var(--overlay); }
.m-mnav { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 10px; }
.m-mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.m-mg .w { text-align: center; font-size: 12px; color: var(--fg-faint); }
.m-mg button { min-height: 62px; border-radius: 10px; border: 1px solid var(--line); padding: 5px 4px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 0; }
.m-mg button b { font-size: 14px; font-weight: 600; display: flex; }
.m-mg button.no { border-color: transparent; color: var(--fg-faint); }
.m-mg button.no b { color: var(--fg-faint); font-weight: 500; }
.m-mg button.tod b { color: var(--accent-soft); }
.m-mg button.dr { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / .035) 0 5px, transparent 5px 10px); }
.m-mg button.on { border-color: var(--accent); background: rgb(245 158 11 / .1); }
.m-mg button i { font-style: normal; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dim { position: fixed; inset: 0; background: rgb(0 0 0 / .55); z-index: 20; }
.bsheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88dvh; z-index: 21; background: var(--overlay); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.bsheet .ph-head { border-bottom: 0; padding-top: 8px; }
.bsheet .ph-head h2 { font-size: 19px; }
body.phone .f .k, body.phone .tg { font-size: 15px; }
body.phone .f input:not([type=checkbox]), body.phone .f textarea, body.phone .pick select, body.phone .newcat input { font-size: 16px; padding: 10px 12px; }
body.phone .upf-m { grid-template-columns: 1fr; }
body.phone .mc-g button { height: 40px; font-size: 15px; }
body.phone .seg button { padding: 6px 14px; font-size: 14px; }

/* ---------- Send to crew panel ---------- */
.sx { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.sx-r { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.sx-r:has(input:not(:checked)) { background: none; }
.sx-r:has(input:not(:checked)) b, .sx-r:has(input:not(:checked)) span { color: var(--fg-faint); }
.sx-r input { width: 18px; height: 18px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.sx-r div { flex: 1; min-width: 0; }
.sx-r b { display: block; font-size: 14px; font-weight: 600; }
.sx-r span { display: block; font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.sx-t { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; background: rgb(255 255 255 / .1); color: var(--fg-muted); }
.sx-t.new { background: rgb(245 158 11 / .18); color: #fbbf24; }
.sx-pv { border-bottom: 0; }
.sx-p { border-radius: 16px; background: rgb(255 255 255 / .1); padding: 11px 13px; display: flex; gap: 10px; }
.sx-p i { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); flex: none; }
.sx-p b { display: block; font-size: 13px; font-weight: 600; }
.sx-p span { font-size: 13px; color: var(--fg-muted); }
.sx-none { margin: 4px 0; color: var(--fg-faint); font-size: 13px; }

/* Crew call choices */
.cc-pop { position: absolute; top: calc(100% + 4px); left: 4px; z-index: 6; width: 200px; background: var(--overlay); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px; box-shadow: 0 14px 34px rgb(0 0 0 / .55); }
.cc-pop.r { left: auto; right: 4px; }
.cc-pop:empty { display: none; }
.cc-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.cc-pop button:hover { background: var(--panel-2); }
.cc-pop .bad { color: var(--danger); }
.cc-pop.m { position: static; width: auto; margin: 8px 0 4px; box-shadow: none; }
.cc .tba { font-size: 13px; color: var(--fg-muted); }
.mo .cc .tba { font-size: 10px; }
.m-call b.tba { font-size: 16px; color: var(--fg-muted); }
.sx-r:has(input:disabled) { cursor: default; }

/* Production dates */
.bg.out, .dh.out { background-color: rgb(0 0 0 / .55); background-image: none; }
.dh.out { color: var(--fg-faint); }
.dh.out b { color: var(--fg-faint); font-weight: 500; }
.btn.dates { color: var(--fg-muted); }
.btn.dates svg { flex: none; }
.err { color: var(--danger); font-size: 13px; margin: 10px 0 0; }
.f input[type=date] { color-scheme: dark; }
.m-st.out { color: var(--fg-faint); }
.m-strip button.out, .m-mg button.out { opacity: .35; }
.m-dates { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 2px; margin-bottom: 8px; color: var(--fg-muted); font-size: 14px; border-bottom: 1px solid var(--line); }
.m-dates b { margin-left: auto; color: var(--fg); font-weight: 600; }
@media (max-width: 1500px) { .w-col.has-panel .btn.dates { display: none; } }
