/* Layout: sticky job header with a hazard-tape edge over a day-by-day photo timeline; jobs as cover cards. */
:root {
  --bg: #E7EBEA;
  --surface: #FFFFFF;
  --surface-2: #F3F5F4;
  --ink: #182025;
  --muted: #59656C;
  --line: #C9D1D2;
  --accent: #C4481A;
  --accent-ink: #FFFFFF;
  --blue: #22578A;
  --danger: #B3261E;
  --ok: #2E7448;
  --chip: #DCE2E2;
  --chip-on: #182025;
  --chip-on-ink: #FFFFFF;
  --hazard: #F2B705;
  --scrim: rgba(12, 15, 17, 0.95);
  --on-scrim: #F2F4F4;
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101416; --surface: #1A1F22; --surface-2: #151a1c; --ink: #E6EBEB; --muted: #96A2A7;
    --line: #2B3337; --accent: #F0763F; --accent-ink: #160B05; --blue: #84B4E2; --danger: #F2867E; --ok: #6CC48F;
    --chip: #262D31; --chip-on: #E6EBEB; --chip-on-ink: #101416; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; padding-bottom: env(safe-area-inset-bottom, 0px); }
body.noscroll { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.topbar::after { content: ""; display: block; height: 5px; background: repeating-linear-gradient(-45deg, var(--hazard) 0 10px, #1d1d1b 10px 20px); }
.topbar-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1240px; margin: 0 auto; }
.brand { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; display: flex; align-items: baseline; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; }
.brand small { font-family: var(--f-body); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }
.topbar .spacer { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 520px) { .brand small { display: none; } .mebtn { max-width: 32vw; } }
.tabs { display: flex; gap: 2px; max-width: 1240px; margin: 0 auto; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); overflow-x: auto; }
.tabs a { padding: 8px 12px 9px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.search.pick { flex: 0 1 240px; }

.board { background: var(--surface); border: 2px solid var(--hazard); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.board-text { font-size: 18px; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-meta { margin-top: 6px; font-size: 13px; color: var(--muted); }
.board-form { display: grid; gap: 8px; }
.board-add { width: 100%; margin-bottom: 16px; border-style: dashed; color: var(--muted); }

.feed { display: grid; gap: 18px; }
.batch h2 { font-size: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.batch h2 a { color: var(--blue); }
.batch h2 small { font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.batch .who { font-size: 13px; }

.daynav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.daynav input[type="date"] { min-height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 10px; }
.tasklist { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.task.doing { border-left-color: var(--blue); }
.task.done { border-left-color: var(--ok); }
.task.done .ttitle { text-decoration: line-through; color: var(--muted); }
.ttime { font-family: var(--f-mono); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 2px; }
.ttime small { display: block; font-family: var(--f-body); font-size: 12px; color: var(--muted); }
.tmain { min-width: 0; display: grid; gap: 3px; }
.ttitle { font-family: var(--f-display); font-size: 21px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.tjob { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.tjob a { color: var(--blue); }
.tnotes { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tcrew { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.who { font-size: 12px; font-weight: 600; background: var(--chip); border-radius: 999px; padding: 2px 8px; }
.who.me { background: var(--chip-on); color: var(--chip-on-ink); }
.tact { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.stat { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.task.doing .stat { color: var(--blue); }
.task.done .stat { color: var(--ok); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); }
@media (max-width: 560px) {
  .task { grid-template-columns: minmax(0, 1fr); }
  .ttime { display: flex; gap: 8px; align-items: baseline; }
  .ttime small { display: inline; }
  .tact { flex-direction: row; flex-wrap: wrap; }
  .tact .btn { flex: 1 1 auto; min-height: 44px; }
}
.compact .task { grid-template-columns: 110px minmax(0, 1fr) auto; padding: 8px 12px; }
.compact .ttitle { font-size: 18px; }
.jobnotes { margin: 10px 0 0; max-width: 70ch; white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.jobtasks { margin-bottom: 22px; }
.jt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.jt-head h2 { font-size: 20px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .week { grid-template-columns: minmax(0, 1fr); } }
.wday { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: grid; gap: 6px; align-content: start; min-height: 120px; min-width: 0; }
.wday.today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.wday h3 { margin: 0; font-family: var(--f-display); font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.wday h3 small { font-family: var(--f-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.wcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 4px; padding: 6px 8px; cursor: pointer; display: grid; gap: 2px; min-width: 0; }
.wcard:hover { border-color: var(--muted); }
.wcard.doing { border-left-color: var(--blue); }
.wcard.done { border-left-color: var(--ok); opacity: 0.75; }
.wcard b { font-size: 14px; overflow-wrap: anywhere; }
.wcard span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.wcard .mono { font-family: var(--f-mono); }
.wadd { border: 1px dashed var(--line); background: none; color: var(--muted); border-radius: 4px; padding: 4px; cursor: pointer; font-size: 13px; }
.wadd:hover { color: var(--ink); border-color: var(--muted); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crewpick { border: 0; padding: 0; margin: 0; }
.crewpick legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 4px; }

.invite { display: grid; gap: 6px; margin-bottom: 16px; }
.claude { margin-top: 28px; display: grid; gap: 12px; }
.claude h2 { font-size: 24px; }
.ckform, .copyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.ckform input, .copyrow input { flex: 1 1 240px; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 0 10px; }
.copyrow input { font-family: var(--f-mono); font-size: 13px; }
.cknew { display: grid; gap: 6px; background: var(--surface-2); border: 1px solid var(--accent); border-radius: var(--r); padding: 12px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-block: 20px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; padding-left: 4px; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn.danger.armed { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.head h1 { font-size: 36px; line-height: 1.05; }
.sub { color: var(--muted); margin: 4px 0 0; max-width: 65ch; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.search { flex: 1 1 240px; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 0 14px; min-height: 38px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard { color: inherit; text-decoration: none; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--muted); }
.pcover { position: relative; aspect-ratio: 16 / 10; max-width: 100%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.pcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nocover { color: var(--muted); font-size: 13px; }
.pill { position: absolute; top: 8px; left: 8px; background: var(--chip-on); color: var(--chip-on-ink); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 3px; }
.pbody { padding: 12px 14px 14px; display: grid; gap: 2px; min-width: 0; }
.pname { font-family: var(--f-display); font-size: 21px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.paddr { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.pstats { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty { border: 2px dashed var(--line); border-radius: var(--r); padding: 40px 20px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty strong { color: var(--ink); font-family: var(--f-display); font-size: 22px; }

.proj-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); margin-top: 6px; font-size: 14px; }
.proj-meta a { color: var(--blue); }
.proj-meta .mono { font-family: var(--f-mono); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid transparent; background: var(--chip); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip small { font-family: var(--f-mono); font-weight: 400; opacity: 0.75; margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }

.bulk { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 66px); z-index: 15; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--chip-on); color: var(--chip-on-ink); padding: 10px 12px; border-radius: var(--r); margin-bottom: 16px; }
.bulk select, .bulk .btn { min-height: 36px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 10px; }
.bulk .count { font-weight: 600; margin-right: auto; }

.day { margin-bottom: 26px; }
.day h2 { font-size: 20px; display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.day h2 small { font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } .head h1 { font-size: 30px; } }
.tile { position: relative; padding: 0; border: 0; aspect-ratio: 1; max-width: 100%; background: var(--surface-2); cursor: pointer; overflow: hidden; border-radius: 3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ttags { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tnote { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; display: grid; place-items: center; }
.tile .tcheck { display: none; position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); }
.selecting .tile .tcheck { display: block; }
.tile.on { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.on .tcheck { background: var(--accent); border-color: var(--accent); }
.tile.on .tcheck::after { content: "✓"; color: var(--accent-ink); font-size: 14px; font-weight: 700; display: grid; place-items: center; height: 100%; }

.viewer { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; grid-template-columns: minmax(0, 1fr) 340px; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.v-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-nav, .v-close { position: absolute; border: 0; background: rgba(255,255,255,.12); color: var(--on-scrim); cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.v-nav:hover, .v-close:hover { background: rgba(255,255,255,.24); }
.v-nav.prev { left: max(12px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.v-nav.next { right: 12px; top: 50%; transform: translateY(-50%); }
.v-close { top: 12px; right: 12px; font-size: 26px; }
.v-panel { background: var(--surface); overflow: auto; padding: 20px; padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 14px; }
.v-time { font-family: var(--f-display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.v-by, .v-gps { color: var(--muted); font-size: 14px; }
.v-gps a { color: var(--blue); font-family: var(--f-mono); font-size: 13px; }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
textarea, .field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 9px 11px; }
textarea { resize: vertical; min-height: 80px; }
.v-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.v-foot .mono { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 55%) minmax(0, 45%); }
  .v-nav { width: 40px; height: 40px; }
}

.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(10, 13, 15, .55); display: flex; align-items: center; justify-content: center; padding: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sheet { background: var(--surface); border-radius: 10px; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; padding: 22px; display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.sheet h2 { font-size: 26px; }
.sheet.wide { max-width: 640px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 14px; margin: 0; }

.auth { min-height: 70vh; display: grid; place-items: center; padding: 24px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.auth .sheet { box-shadow: none; border: 1px solid var(--line); }
.auth input { font-size: 17px; }

.sortrows { display: grid; gap: 10px; }
.srow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.srow.matched { border-left: 4px solid var(--blue); }
.sthumbs { display: grid; grid-template-columns: repeat(2, 36px); gap: 3px; align-content: start; }
.sthumbs img { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; background: var(--chip); }
.sinfo { display: grid; gap: 2px; min-width: 0; }
.sinfo b { font-family: var(--f-display); font-size: 19px; }
.sinfo span { color: var(--muted); font-size: 13px; }
.sinfo .mono { font-family: var(--f-mono); font-size: 12px; }
.sinfo .match { color: var(--blue); font-weight: 600; }
.srow .pick { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.srow select, .srow input { flex: 1 1 200px; min-width: 0; min-height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 10px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.adduser { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; margin-bottom: 20px; }
.ulist { display: grid; gap: 8px; }
.urow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.urow.off { opacity: 0.6; }
.uname { flex: 1 1 200px; min-width: 0; }
.uname b { font-family: var(--f-display); font-size: 19px; }
.uname span { display: block; color: var(--muted); font-size: 13px; }
.uname .mono { font-family: var(--f-mono); }
.urow .pinbox { display: flex; gap: 6px; }
.urow .pinbox input { width: 130px; min-height: 32px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 0 8px; }
.role { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--chip); }

.tray { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(340px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); display: grid; gap: 8px; }
.tray b { font-family: var(--f-display); font-size: 18px; }
.bar { height: 6px; background: var(--chip); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.fails { font-size: 13px; color: var(--danger); max-height: 120px; overflow: auto; margin: 0; padding-left: 18px; }
.toast { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--chip-on); color: var(--chip-on-ink); padding: 10px 16px; border-radius: var(--r); font-weight: 500; max-width: calc(100vw - 32px); }
body.dragging::after { content: "Drop photos to upload"; position: fixed; inset: 10px; z-index: 80; border: 3px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--bg) 85%, transparent); display: grid; place-items: center; font-family: var(--f-display); font-size: 32px; font-weight: 700; color: var(--accent); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Job notes */
.jobnotes .lbl { display: block; margin-bottom: 4px; }
.jobnotes p { margin: 0; }
.jobnotes-list { margin-bottom: 22px; }
.notegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.notecard { text-align: left; display: grid; gap: 4px; align-content: start; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; color: inherit; min-width: 0; }
.notecard:hover { border-color: var(--muted); }
.notecard.pinned { border-color: var(--hazard); box-shadow: inset 0 3px 0 var(--hazard); }
.notecard b { font-family: var(--f-display); font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.notecard .ex { font-size: 14px; color: var(--ink); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.notecard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.notecard .meta { font-size: 12px; color: var(--muted); }
.notecard .kind { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.notegrid .empty-note { color: var(--muted); font-size: 14px; margin: 0; }
.note-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.note-drawing { width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 8px; }
.note-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.note-photos button, .note-pick button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 4px; background: var(--surface-2); cursor: pointer; width: 72px; height: 72px; overflow: hidden; }
.note-photos img, .note-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); margin-top: 6px; }
.note-pick button[aria-pressed="true"] { border-color: var(--accent); }
.note-pick button[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.rp-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
#vDraw { width: 100%; }

/* Drawing editor: full screen, works with a finger, mouse or Apple Pencil */
.draw { position: fixed; inset: 0; z-index: 65; background: #3a4146; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.draw-bar, .draw-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); padding: 8px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
.draw-bar input { flex: 1 1 140px; min-width: 0; min-height: 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 0 8px; }
.draw-stage { display: grid; place-items: center; overflow: hidden; min-height: 0; padding: 8px; }
.draw-stage canvas { background: #fff; touch-action: none; box-shadow: 0 4px 20px rgba(0,0,0,.4); max-width: 100%; max-height: 100%; cursor: crosshair; }
.tg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tg button { border: 0; background: var(--surface); min-height: 38px; min-width: 40px; padding: 0 10px; font-weight: 600; cursor: pointer; }
.tg button[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }
.tg button i { display: block; width: 18px; height: 18px; border-radius: 50%; margin: auto; }
.tg select { border: 0; min-height: 38px; background: var(--surface); padding: 0 8px; }
#dwColors button[aria-pressed="true"] { background: var(--surface); box-shadow: inset 0 0 0 3px var(--accent); }

/* ---------- finishing and sharing jobs ---------- */
.finstep { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.finstep > b { font-size: 15px; }
.carried { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); margin-left: 6px; }
.shared { font-size: 12px; color: var(--muted); }

/* ---------- accounts ---------- */
.authform { display: grid; gap: 12px; }
.authform h3, .card h2 { font-family: var(--f-display); font-weight: 700; font-size: 22px; margin: 0; }
.switchline { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.okmsg { margin: 0; font-size: 14px; color: var(--ink); background: var(--surface-2); border-left: 4px solid var(--blue); padding: 8px 10px; border-radius: var(--r); }
/* The sign-up form's bot trap: off-screen, never seen or tabbed to by people. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.choose { display: grid; gap: 8px; }
.choose button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.choose button:hover { border-color: var(--ink); }
.choose button[aria-current="true"] { border-color: var(--blue); cursor: default; }
.choose small { color: var(--muted); }
.notice { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: center; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 14px; }
.dangerzone { border-color: var(--danger); }
.dangerzone h2, .dangerzone h3 { color: var(--danger); }
.sheethead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mebtn { color: inherit; font-weight: 600; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addhead { display: grid; gap: 8px; grid-column: 1 / -1; }
.card.company, .dangerzone { display: grid; gap: 12px; }
.urow .how { font-size: 13px; color: var(--muted); }
.urow .how b { color: var(--ink); font-weight: 600; font-size: inherit; font-family: inherit; }
.card.company { margin-top: 20px; }
.dangerzone { margin-top: 20px; }
.copyrow input:not([readonly]) { font-family: inherit; font-size: 16px; }

/* ---------- guidance: get started, tips, install, help ---------- */
.guide { display: grid; gap: 10px; margin-bottom: 14px; border-left: 4px solid var(--hazard); }
.guide-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.guide .row { display: flex; gap: 8px; justify-content: flex-end; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.steps button:hover { border-color: var(--ink); }
.steps .dot { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.steps .done .dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.steps .done b { text-decoration: line-through; color: var(--muted); }
.steps small { display: block; color: var(--muted); font-size: 13px; }
.steps .go { margin-left: auto; color: var(--blue); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.help { display: grid; gap: 6px; }
.help details { border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; background: var(--surface); }
.help summary { cursor: pointer; font-weight: 600; min-height: 46px; display: flex; align-items: center; }
.help details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.help p { margin: 0 0 10px; line-height: 1.5; }
.listhead { margin: 20px 0 8px; }
.sinfo .tip { color: var(--muted); font-size: 13px; }
.urow .manage { flex: 1 1 100%; }
.urow .manage summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.urow .managebody { display: grid; gap: 8px; padding-top: 6px; }
.urow .managebody .row { display: flex; gap: 8px; flex-wrap: wrap; }
.urow .managebody .pinbox input { flex: 1 1 auto; width: auto; }

/* ---------- photo stages ---------- */
.upstage { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.upstage select { min-height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 8px; font: inherit; color: var(--ink); }
.stagebar { margin: 4px 0 8px; }
.stagehead { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 4px; padding-bottom: 6px; border-bottom: 3px solid var(--hazard); }
.stagehead h2 { font-size: 26px; }
.stagehead small { color: var(--muted); }
.stagehead .why { margin-left: auto; font-size: 12px; color: var(--muted); }
.role.ownerrole { background: var(--hazard); color: #182025; }

/* ---------- TrussLog logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brandmark { flex: 0 0 auto; }
.authlogo { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 4px; }
.authlogo span { font-family: var(--f-body); font-weight: 700; font-size: 28px; color: #0B1F45; letter-spacing: -0.01em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .authlogo span { color: var(--ink); } }
