/* Layout: a spreadsheet-style resource board (14-column bands, grey header cells) inside a quiet app shell; condensed signage type for headers, mono for job numbers and times. */
:root {
  --bg: #eef0ec;
  --surface: #ffffff;
  --sheet: #fbfcfa;
  --head: #cfd3cc;
  --head-ink: #22261f;
  --line: #d6d9d2;
  --line-strong: #8f958b;
  --ink: #1b1e19;
  --muted: #5d6459;
  --faint: #8b9187;
  --accent: #1d5a86;
  --accent-soft: #e2ecf4;
  --firmed: #d62839;
  --firmed-ink: #ffffff;
  --firm: #2f8f55;
  --firm-soft: #dcf1e2;
  --hold: #f08c00;
  --hold-ink: #3b2400;
  --hold2: #f5c84c;
  --pencil: #9aa196;
  --ooo: #ffe94a;
  --ooo-ink: #2d2a00;
  --warn: #b3125a;
  --warn-soft: #fbe3ee;
  --shadow: 0 8px 30px rgb(20 24 18 / .16);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111410; --surface: #1a1d18; --sheet: #161915; --head: #2b3029; --head-ink: #dfe4dc;
    --line: #2d322b; --line-strong: #59604f; --ink: #e5e9e2; --muted: #a0a89b; --faint: #737b6e;
    --accent: #79b6e3; --accent-soft: #1b2b38; --firmed: #e5485a; --firmed-ink: #ffffff;
    --firm: #5cc483; --firm-soft: #1b3324; --hold: #f5a12b; --hold-ink: #261700; --hold2: #d9b240;
    --pencil: #7b8376; --ooo: #e6d23c; --ooo-ink: #1f1c00; --warn: #f06aa5; --warn-soft: #3a1a29;
    --shadow: 0 8px 30px rgb(0 0 0 / .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111410; --surface: #1a1d18; --sheet: #161915; --head: #2b3029; --head-ink: #dfe4dc;
  --line: #2d322b; --line-strong: #59604f; --ink: #e5e9e2; --muted: #a0a89b; --faint: #737b6e;
  --accent: #79b6e3; --accent-soft: #1b2b38; --firmed: #e5485a; --firmed-ink: #ffffff;
  --firm: #5cc483; --firm-soft: #1b3324; --hold: #f5a12b; --hold-ink: #261700; --hold2: #d9b240;
  --pencil: #7b8376; --ooo: #e6d23c; --ooo-ink: #1f1c00; --warn: #f06aa5; --warn-soft: #3a1a29;
  --shadow: 0 8px 30px rgb(0 0 0 / .5); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.4; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.mono { font-family: var(--mono); font-size: .86em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-block: 8px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.brand small { font-weight: 500; color: var(--muted); letter-spacing: .08em; font-size: 13px; margin-left: 6px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tab { border: 0; background: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tab:hover { background: var(--bg); color: var(--ink); }
.tab[aria-current="page"] { background: var(--ink); color: var(--surface); }
.search { position: relative; margin-left: auto; flex: 1 1 200px; max-width: 320px; }
.search input { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); }
.results { position: absolute; right: 0; top: calc(100% + 4px); width: min(440px, 92vw); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); z-index: 40; }
.results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.results button:hover, .results button:focus-visible { background: var(--accent-soft); }
.results .k { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--muted); }
.banner { padding-block: 8px; font-size: 13px; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.banner[data-kind="info"] { background: var(--accent-soft); }

main { padding-block: 16px 60px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: .01em; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: grid; gap: 12px; }
.spacer { flex: 1; }
.btn { border: 1px solid var(--line-strong); background: var(--surface); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; }
.btn.danger { color: var(--firmed); border-color: var(--firmed); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: none; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); width: 34px; height: 34px; border-radius: 6px; cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 4px; font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.empty { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 8px; }

/* status colours (match the sheet: FIRMED red, HOLD orange, FIRM green) */
.s-firmed .st, .pill.s-firmed { background: var(--firmed); color: var(--firmed-ink); }
.s-firm .st, .pill.s-firm { background: var(--firm-soft); color: var(--firm); box-shadow: inset 0 0 0 1px var(--firm); }
.s-hold .st, .pill.s-hold { background: var(--hold); color: var(--hold-ink); }
.s-hold2 .st, .pill.s-hold2 { background: var(--hold2); color: var(--hold-ink); }
.s-pencil .st, .pill.s-pencil { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--pencil); border-style: dashed; }
.s-cancelled .st, .pill.s-cancelled, .s-rescheduled .st, .pill.s-rescheduled { background: var(--head); color: var(--muted); }
.pill.s-none { background: var(--bg); color: var(--muted); }
.pill.s-contacted { background: var(--accent-soft); color: var(--accent); }
.pill.s-released, .pill.s-na { background: var(--bg); color: var(--faint); box-shadow: inset 0 0 0 1px var(--line-strong); }
.crewrow.quiet { opacity: .62; }
.ans { font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 3px; white-space: nowrap; }
.ans.a-ok { background: var(--firm-soft); color: var(--firm); }
.ans.a-av { background: var(--accent-soft); color: var(--accent); }
.ans.a-no { background: var(--warn-soft); color: var(--warn); }
.ansbtns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ansbtns .btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.file { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--sheet); display: flex; flex-direction: column; min-width: 0; }
.file img { width: 100%; height: 96px; object-fit: cover; display: block; background: var(--bg); }
.file .ph { height: 96px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--muted); background: var(--bg); }
.file .fn { padding: 4px 6px; font-size: 12px; overflow-wrap: anywhere; }
.readlist { display: grid; gap: 2px; font-size: 13px; }
.dot.s-contacted { background: var(--accent); } .dot.s-released, .dot.s-na { background: var(--line); }

/* ---------- day board ---------- */
.dayhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.datebox { border: 2px solid var(--ink); padding: 6px 18px; background: var(--surface); }
.datebox h1 { font-size: 28px; }
.daymeta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.daymeta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.daymeta .warn b, .daymeta .warn { color: var(--warn); }
.daynote { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.daynote textarea { flex: 1; min-height: 38px; resize: vertical; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.daynote .static { flex: 1; padding: 8px 12px; background: var(--surface); border-left: 3px solid var(--accent); white-space: pre-wrap; }
.boardwrap { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; align-items: start; }
.scroller { overflow-x: auto; border: 1px solid var(--line-strong); background: var(--sheet); border-radius: 4px; }
.band { display: grid; grid-template-columns: repeat(14, minmax(112px, 1fr)); min-width: 1560px; }
.band + .band { border-top: 3px solid var(--line-strong); }
.col { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.col:last-child { border-right: 0; }
.col.wide { grid-column: span 2; }
.cell { display: flex; flex-direction: column; min-height: 150px; flex: 1; }
.col .cell + .cell { border-top: 1px solid var(--line-strong); min-height: 90px; flex: 0 0 auto; }
.cellhead { background: var(--head); color: var(--head-ink); font-family: var(--display); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; text-align: center; padding: 4px 6px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; gap: 4px; }
.cellhead.waithead { font-size: 11.5px; }
.cellbody { padding: 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cellbody.over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -3px; }
.add { margin-top: auto; border: 1px dashed transparent; background: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 4px; font-size: 12px; opacity: 0; }
.cell:hover .add, .add:focus-visible { opacity: 1; border-color: var(--line-strong); }
@media (hover: none) { .add { opacity: .7; } }
.flag { color: var(--warn); font-weight: 700; }

.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; font-size: 12.5px; line-height: 1.35; overflow: hidden; text-align: left; }
.chip:hover { border-color: var(--line-strong); }
.chip .st { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 5px; }
.chip .bd { padding: 3px 6px 4px; display: grid; gap: 1px; }
.chip .l1 { font-weight: 600; }
.chip .nt { white-space: pre-wrap; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.chip .nt.red { color: var(--firmed); }
.chip .ft { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.chip .tag { font-size: 10.5px; padding: 0 4px; border-radius: 3px; background: var(--bg); color: var(--muted); }
.chip .tag.cs { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.has-conflict { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.chip .cf { color: var(--warn); font-size: 11px; font-weight: 600; }
.chip.dim { opacity: .28; }
.chip.ooo { background: var(--ooo); color: var(--ooo-ink); border-color: transparent; }
.chip.ooo .nt { color: var(--ooo-ink); opacity: .8; }
.chip.dead { opacity: .7; }
.chip.dead .l1 { text-decoration: line-through; }
.chip.dragging { opacity: .4; }
.vehicle { border-top: 1px solid var(--line); padding: 3px 6px; font-size: 12px; font-style: italic; color: var(--muted); }

.crewband { margin-top: 18px; }
.crewband .titlerow { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.crewgrid { display: grid; grid-template-columns: repeat(8, minmax(150px, 1fr)); min-width: 1240px; }
.crewgrid .cell { min-height: 170px; }
.crewrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: pointer; font-size: 12.5px; }
.crewrow:hover { border-color: var(--line-strong); }
.crewrow .nm { font-weight: 600; }
.crewrow .jb { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.crewrow.has-conflict { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.crewrow.dim { opacity: .28; }

.resched { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; position: sticky; top: 70px; }
.resched .cellhead { font-size: 12.5px; }
.resched .cellbody { min-height: 120px; }

/* list mode (phones / crew) */
.listmode .section { margin-bottom: 16px; }
.listmode .section h3 { margin-bottom: 6px; }
.lm-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.lm-item .res { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; color: var(--muted); }

/* ---------- week ---------- */
.weekscroll { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--sheet); }
table.grid { border-collapse: collapse; width: 100%; }
table.grid th, table.grid td { border: 1px solid var(--line); vertical-align: top; padding: 4px; }
table.grid thead th { background: var(--head); color: var(--head-ink); font-family: var(--display); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: 13px; position: sticky; top: 0; }
table.grid thead th.today { background: var(--ink); color: var(--surface); }
table.grid th.rh { background: var(--head); font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: 12.5px; text-align: left; white-space: nowrap; position: sticky; left: 0; z-index: 1; }
table.grid td.out { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.wk { min-width: 1100px; }
.wk td { min-width: 130px; }
.mini { display: flex; gap: 5px; align-items: baseline; padding: 2px 4px; border-radius: 3px; cursor: pointer; font-size: 12px; line-height: 1.3; }
.mini:hover { background: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; background: var(--pencil); transform: translateY(1px); }
.dot.s-firmed { background: var(--firmed); } .dot.s-firm { background: var(--firm); } .dot.s-hold { background: var(--hold); } .dot.s-hold2 { background: var(--hold2); } .dot.s-none { background: var(--line-strong); } .dot.ooo { background: var(--ooo); box-shadow: inset 0 0 0 1px var(--ooo-ink); }
.mini.has-conflict { box-shadow: inset 2px 0 0 var(--warn); }

/* ---------- calendar ---------- */
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--surface); }
.cal .dow { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; background: var(--head); text-align: center; padding: 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .dc { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 92px; padding: 4px 5px; text-align: left; background: none; border-top: 0; border-left: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal .dc:hover { background: var(--accent-soft); }
.cal .dc.out { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--bg) 6px 8px); cursor: default; color: var(--faint); }
.cal .dc.today .n { background: var(--ink); color: var(--surface); padding: 0 5px; border-radius: 3px; }
.cal .dc.weekend { background: color-mix(in srgb, var(--bg) 50%, transparent); }
.cal .n { font-family: var(--display); font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.cal .bars { display: flex; gap: 1px; height: 5px; margin: 2px 0; }
.cal .bars span { flex: 1; border-radius: 1px; }
.cal .ln { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .cnt { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; }

/* ---------- tables / lists ---------- */
.tablewrap { overflow-x: auto; }
table.list { border-collapse: collapse; width: 100%; }
table.list th { text-align: left; font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid var(--line-strong); padding: 6px 8px; white-space: nowrap; }
table.list td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--accent-soft); }
.strip { display: grid; grid-template-columns: repeat(14, 12px); gap: 2px; }
.strip span { height: 14px; border-radius: 2px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.strip span.b { background: var(--firm); box-shadow: none; }
.strip span.h { background: var(--hold); box-shadow: none; }
.strip span.o { background: var(--ooo); box-shadow: inset 0 0 0 1px var(--ooo-ink); }
.strip span.x { background: var(--warn); box-shadow: none; }
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.meter i.on { background: var(--firm); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar select, .toolbar input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); }

/* ---------- call sheet ---------- */
.cs-head { display: grid; gap: 6px; margin-bottom: 14px; }
.cs-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.cs-title h1 { font-size: 32px; }
.daytabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.daytab { border: 1px solid var(--line-strong); background: var(--surface); padding: 5px 10px; border-radius: 6px; cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: .04em; }
.daytab[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 2px solid var(--ink); background: var(--surface); }
.times .sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.chip-tag.hot { background: var(--firmed); color: var(--firmed-ink); border-color: transparent; }
.chip-tag.ok { background: var(--firm-soft); color: var(--firm); border-color: transparent; }
.tagpick { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.house { color: var(--faint); font-style: italic; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; }
.checklist .done span { text-decoration: line-through; color: var(--muted); }
details.raw summary { cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
details.raw .pre { margin-top: 8px; font-size: 13px; max-height: 420px; overflow: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.subtabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.times > div { padding: 8px 10px; border-right: 1px solid var(--line); min-width: 0; }
.times > div:last-child { border-right: 0; }
.times .v { font-family: var(--display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.times .first .v { color: var(--firmed); }
dl.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
dl.kv dt { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; color: var(--muted); padding-top: 1px; }
dl.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.copyable { cursor: copy; border-bottom: 1px dotted var(--line-strong); }
.inline-form { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; margin-top: 10px; background: var(--sheet); }
.warnline { color: var(--warn); font-size: 12.5px; font-weight: 600; }
.okline { color: var(--firm); font-size: 12.5px; font-weight: 600; }

/* ---------- forms / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgb(10 12 9 / .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: max(24px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 24px max(12px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); width: min(640px, 100%); padding: 18px 18px 14px; display: grid; gap: 14px; }
.modal header { display: flex; align-items: center; gap: 10px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.fgrid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 3px; min-width: 0; }
.field > span { font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--sheet); min-width: 0; }
.field textarea { min-height: 70px; resize: vertical; }
.check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.statuspick { display: flex; flex-wrap: wrap; gap: 4px; }
.statuspick label { cursor: pointer; }
.statuspick input { position: absolute; opacity: 0; pointer-events: none; }
.statuspick .pill { padding: 4px 9px; font-size: 13px; outline: 2px solid transparent; outline-offset: 1px; }
.statuspick input:checked + .pill { outline-color: var(--ink); }
.statuspick input:focus-visible + .pill { outline-color: var(--accent); }
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.dpick { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; }
.dp-month { display: grid; grid-template-columns: repeat(7, 26px); gap: 2px; }
.dp-title { grid-column: 1 / -1; font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; color: var(--muted); }
.dp-dow { font-size: 10px; text-align: center; color: var(--faint); }
.dp-d { height: 26px; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; font-size: 12px; font-variant-numeric: tabular-nums; }
.dp-d:hover { border-color: var(--ink); }
.dp-d.we { background: var(--bg); }
.dp-d.today { box-shadow: inset 0 -2px 0 var(--firmed); }
.dp-d.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dp-d.locked { opacity: .5; cursor: default; }
.dp-out { font-size: 12px; text-align: center; line-height: 26px; color: var(--faint); opacity: .45; }
.dp-nav { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
.dp-sum { flex-basis: 100%; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dp-sum b { color: var(--ink); }
.rows { display: grid; gap: 6px; }
.rowedit { display: grid; gap: 6px; align-items: center; }
.rowedit input { padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--sheet); min-width: 0; width: 100%; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 16px; border-radius: 8px; z-index: 60; font-size: 13px; box-shadow: var(--shadow); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.attn li { margin-bottom: 6px; }
.attn { padding-left: 18px; margin: 6px 0 0; }
.feed { display: grid; gap: 0; }
.feed > div { padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.feed > div:first-child { border-top: 0; }

@media (max-width: 1100px) {
  .boardwrap { grid-template-columns: minmax(0, 1fr); }
  .resched { position: static; }
  .cs-grid, .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .times > div:nth-child(2n) { border-right: 0; }
  .times > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
  .datebox h1 { font-size: 22px; }
  .search { max-width: none; order: 5; flex-basis: 100%; }
  .lm-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
