/* Hows mockup styles: mobile-first, warm paper + ink, status colours carry meaning. */
:root {
  --paper: #f7f4ee;
  --card: #fffdf9;
  --ink: #1d1b18;
  --ink-2: #57524a;
  --ink-3: #8b857a;
  --line: #e6e0d4;
  --accent: #2f5bea;
  --accent-soft: #e8eeff;
  --good: #1f8a4c;   --good-soft: #e3f4ea;
  --warn: #b86e00;   --warn-soft: #fbefd9;
  --bad:  #c2372b;   --bad-soft:  #fbe4e1;
  --idle: #8b857a;   --idle-soft: #efebe3;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(29,27,24,.04), 0 2px 10px rgba(29,27,24,.05);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.45; }
a { color: inherit; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }

/* ---------- app shell ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: rgba(247,244,238,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--good) 0 62%, var(--warn) 62% 85%, var(--bad) 85%); position: relative; }
.logo .dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.nav a.on { background: var(--ink); color: var(--paper); }
.nav .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; text-align: center; line-height: 18px; }
.topbar .spacer { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { text-decoration: none; text-align: center; font-size: 11px; color: var(--ink-3); padding: 4px 0; position: relative; }
.tabbar a .ico { display: block; font-size: 20px; line-height: 24px; }
.tabbar a.on { color: var(--ink); font-weight: 600; }
.tabbar .badge { position: absolute; top: 0; left: 55%; background: var(--bad); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; line-height: 16px; }
main { padding: 18px 16px 96px; max-width: 1240px; margin: 0 auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  main { padding: 28px 28px 60px; }
}

/* ---------- greeting ---------- */
.hello { margin-bottom: 18px; }
.hello h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.hello p { margin: 6px 0 0; color: var(--ink-2); }
.pulse { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- pills / chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.plain::before { display: none; }
.good { color: var(--good); background: var(--good-soft); }
.warn { color: var(--warn); background: var(--warn-soft); }
.bad  { color: var(--bad);  background: var(--bad-soft); }
.idle { color: var(--idle); background: var(--idle-soft); }
.blue { color: var(--accent); background: var(--accent-soft); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--idle-soft); color: var(--ink-2); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }

/* ---------- layout ---------- */
.grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .grid.dash { grid-template-columns: minmax(0, 1fr) 360px; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 10px; }
.section-head a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stack > * + * { margin-top: 10px; }

/* ---------- decision card ---------- */
.decision { padding: 14px 16px; }
.decision .meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.decision .meta b { color: var(--ink); }
.decision h3 { font-size: 16.5px; margin: 8px 0 4px; font-weight: 650; }
.decision .ctx { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.options { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font: inherit; color: inherit; cursor: pointer; }
.opt:hover { border-color: var(--ink-3); }
.opt .t { font-weight: 600; }
.opt .d { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.opt.rec { border-color: var(--accent); background: var(--accent-soft); }
.opt .rec-tag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.reply { display: flex; gap: 8px; margin-top: 10px; }
.reply input { flex: 1; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.btn { font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.blue { background: var(--accent); border-color: var(--accent); color: #fff; }
.due { font-weight: 600; }
.due.soon { color: var(--bad); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.alert .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 15px; }
.alert .t { font-weight: 600; }
.alert .s { font-size: 13px; color: var(--ink-2); }
.alert .when { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------- project cards ---------- */
.projects { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .projects { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .projects { grid-template-columns: 1fr 1fr 1fr; } }
.proj { padding: 14px 16px; text-decoration: none; display: block; position: relative; }
.proj:hover { border-color: var(--ink-3); }
.proj .top { display: flex; align-items: center; gap: 8px; }
.proj .name { font-weight: 700; font-size: 16px; }
.proj .top .pill { margin-left: auto; }
.proj .sum { color: var(--ink-2); font-size: 13.5px; margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj .domains { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.proj .foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 9px; }
.proj .foot .flags { margin-left: auto; display: flex; gap: 6px; }
.proj .flag { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.health { display: inline-flex; align-items: center; gap: 5px; }
.health i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-idea     { color: var(--idle); background: var(--idle-soft); }
.status-spec     { color: #7a4fd6; background: #efe8fd; }
.status-building { color: var(--accent); background: var(--accent-soft); }
.status-live     { color: var(--good); background: var(--good-soft); }
.status-parked   { color: var(--ink-3); background: transparent; border: 1px dashed var(--line); }
.filters { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.filters a { text-decoration: none; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.filters a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- agents ---------- */
.agent { display: flex; gap: 12px; align-items: center; padding: 11px 14px; }
.agent + .agent { border-top: 1px solid var(--line); }
.agent .av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; position: relative; }
.agent .av .live { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--card); }
.agent .n { font-weight: 650; }
.agent .w { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent .body { min-width: 0; flex: 1; }
.agent .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------- feed ---------- */
.feed { padding: 4px 0; }
.ev { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 14px; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .k { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; }
.ev .m { font-size: 14px; }
.ev .m b { font-weight: 650; }
.ev .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ev .s a { color: var(--accent); text-decoration: none; }

/* ---------- misc ---------- */
.muted { color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; font-size: 14px; padding: 14px 16px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
pre.snippet { margin: 0; padding: 14px 16px; background: #1d1b18; color: #f2ede3; border-radius: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; }
pre.snippet .c { color: #9b9486; }
pre.snippet .s { color: #b5e3a1; }
pre.snippet .k { color: #ffd479; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs span { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); background: var(--card); }
.tabs span.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.steps li.done::before { content: "✓"; background: var(--good); }
.mock-note { position: fixed; right: 12px; bottom: 76px; z-index: 20; background: #fff8c4; border: 1px solid #e8d76a; color: #5c5200; padding: 6px 10px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); }
.mock-note a { color: #5c5200; font-weight: 700; }
@media (min-width: 900px) { .mock-note { bottom: 12px; } }

/* ---------- project index ---------- */
.ptable { width: 100%; }
.prow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:hover { background: #fff; }
.prow .av { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--idle-soft); color: var(--ink-2); }
.prow .nm { font-weight: 700; font-size: 15.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prow .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .stats { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 330px; }
.prow .when { font-size: 12px; color: var(--ink-3); min-width: 76px; text-align: right; }
@media (max-width: 640px) { .prow { grid-template-columns: 38px minmax(0, 1fr); } .prow .stats { grid-column: 2; justify-content: flex-start; } .prow .when { text-align: left; min-width: 0; } }
.tier-head { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; }
.tier-head .n { font-size: 13px; color: var(--ink-3); }
.livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); display: inline-block; }
.search { width: 100%; font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin-bottom: 12px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.privacy b { color: var(--ink); }

/* ---------- features ---------- */
.feat { padding: 14px 16px; }
.feat + .feat { border-top: 1px solid var(--line); }
.feat .fh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feat .ft { font-weight: 650; font-size: 15px; }
.feat .ff { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.feat .sess { margin-top: 10px; display: grid; gap: 6px; }
.feat .s1 { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.feat .s1 .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.feat .s1 .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat .s1 .w { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.feat .acts { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.feat .acts .btn { padding: 6px 11px; font-size: 13px; }
.feat.close-me { background: linear-gradient(90deg, var(--warn-soft), transparent 60%); }
.feat.done { opacity: .6; }
.st-active { color: var(--good); background: var(--good-soft); }
.st-close  { color: var(--warn); background: var(--warn-soft); }
.st-open   { color: var(--accent); background: var(--accent-soft); }
.st-stale  { color: var(--idle); background: var(--idle-soft); }
.st-done   { color: var(--ink-3); background: transparent; border: 1px solid var(--line); }
details.older > summary { cursor: pointer; padding: 12px 16px; font-size: 13.5px; color: var(--accent); font-weight: 600; list-style: none; border-top: 1px solid var(--line); }

/* ---------- selection + prompt tray ---------- */
.pick { width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; margin: 0; }
.ref { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--ink-3); background: var(--idle-soft); padding: 1px 6px; border-radius: 5px; text-decoration: none; }
.ref:hover { color: var(--accent); }
.feat.picked, .bcard.picked, .closeitem.picked { box-shadow: inset 3px 0 0 var(--accent); background: #f6f8ff; }
body.has-tray main { padding-bottom: 170px; }
.tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(980px, calc(100% - 20px)); z-index: 40;
  background: var(--card); border: 1px solid var(--ink-3); border-radius: 16px; box-shadow: 0 18px 50px -12px rgba(29,27,24,.35); }
@media (max-width: 899px) { .tray { bottom: 70px; } }
.tray-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px 10px 16px; flex-wrap: wrap; }
.tray-bar .btn { padding: 7px 12px; font-size: 13px; }
.tray-body { max-height: 56vh; overflow: auto; border-top: 1px solid var(--line); padding: 12px 16px 16px; display: grid; gap: 16px; }
.tray-gh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tray-gh .btn { padding: 6px 11px; font-size: 12.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip.sel { background: var(--accent-soft); color: var(--accent); }
.chip.sel a { text-decoration: none; margin-left: 4px; font-weight: 700; }
pre.prompt { white-space: pre-wrap; font-size: 12px; }
.mock-note { display: none; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #efe9de; border-radius: 14px; padding: 10px; min-height: 200px; }
.col.over { outline: 2px dashed var(--accent); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.col-h b { font-size: 14px; }
.col-h .n { font-size: 12px; color: var(--ink-3); }
.col-h .auto { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.bcard .r1 { display: flex; gap: 8px; align-items: flex-start; }
.bcard .tt { font-weight: 600; font-size: 13.5px; line-height: 1.3; flex: 1; }
.bcard .r2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.bcard .pj { font-weight: 700; color: var(--ink-2); }
.bcard.dragging { opacity: .4; }
.bcard .kind { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.addtask { display: flex; gap: 6px; margin-bottom: 8px; }
.addtask input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.addtask .btn { padding: 6px 10px; font-size: 13px; }
.more { font-size: 12.5px; color: var(--accent); text-align: center; padding: 6px; cursor: pointer; font-weight: 600; }
.viewtabs { display: flex; gap: 4px; background: var(--idle-soft); padding: 3px; border-radius: 10px; width: max-content; }
.viewtabs a { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.viewtabs a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- app additions ---------- */
.flash { max-width: 1240px; margin: 12px auto 0; padding: 0 16px; }
.flash div { padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.flash .notice { background: var(--good-soft); color: var(--good); }
.flash .alert { background: var(--bad-soft); color: var(--bad); }
form.inline { display: inline; }
.btn[disabled] { opacity: .5; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.field input, .field textarea, .field select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field textarea { min-height: 110px; }
.empty { padding: 16px; color: var(--ink-3); font-size: 14px; }
.md { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox code { flex: 1; padding: 9px 11px; background: #fff; border: 1px solid #bfe3cc; border-radius: 8px; overflow-x: auto; white-space: nowrap; }
.bcard a.tt { text-decoration: none; color: inherit; }
.auth { max-width: 420px; margin: 12vh auto; padding: 0 20px; }
main.wide { max-width: none; }
.closeitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 14px; text-decoration: none; color: inherit; }
.closeitem + .closeitem { border-top: 1px solid var(--line); }
.closeitem .t { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.closeitem .s, a.closeitem.s { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.closeitem .btn { padding: 5px 10px; font-size: 12.5px; }
.reply input[type=text] { flex: 1; }
.reply input[type=submit] { flex: none; width: auto; }
.addtask input[type=text] { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.addtask input[type=submit] { flex: none; }

/* ---------- project colours ---------- */
.pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.pchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.pchip:hover { border-color: var(--pc); }
.pchip.on { background: var(--pc); border-color: var(--pc); color: #fff; }
.pchip.on .pdot { background: #fff !important; }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative;
          box-shadow: 0 0 0 2px var(--paper); transition: transform .1s; }
.swatch:hover { transform: scale(1.08); }
.field .swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; margin: 0; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.swatch:has(input:checked)::after { content: "✓"; color: #fff; font-weight: 800; font-size: 15px; }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Today: overview ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
.tile .v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.tile .l { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.tile.zero .v { color: var(--ink-3); }
.needs .row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 14px; text-decoration: none; color: inherit; }
.needs .row + .row { border-top: 1px solid var(--line); }
.needs .row .t { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.needs .row .s { font-size: 12.5px; color: var(--ink-3); }
.needs .kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; min-width: 62px; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ptile { padding: 14px 16px; text-decoration: none; color: inherit; display: block; border-left: 5px solid var(--pc); }
.ptile:hover { box-shadow: 0 0 0 1px var(--pc); }
.ptile .nm { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.ptile .now { font-size: 13px; color: var(--ink-2); margin: 6px 0 10px; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptile .nums { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.ptile .nums b { color: var(--ink); }

/* ---------- card images ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.gallery img { width: 100%; height: 120px; object-fit: cover; display: block; background: #fff; }
.gallery figcaption { font-size: 11.5px; color: var(--ink-3); padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery form { position: absolute; top: 4px; right: 4px; }
.gallery .x { padding: 1px 7px; font-size: 12px; border-radius: 6px; background: rgba(255,255,255,.9); border: 1px solid var(--line); cursor: pointer; }
.drop { border: 1px dashed var(--ink-3); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
details.report { margin-top: 6px; }
details.report > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
details.report > summary::-webkit-details-marker { display: none; }
details.report > summary::before { content: "▸"; color: var(--ink-3); font-size: 11px; }
details.report[open] > summary::before { content: "▾"; }
details.report > summary .hl { flex: 1 1 320px; min-width: 0; }
details.report .full { font-size: 13.5px; white-space: pre-line; color: var(--ink-2); margin: 6px 0 4px 18px; }
details.report > .s { margin-left: 18px; }
textarea.scratchpad { width: 100%; min-height: 180px; resize: vertical; font: 13.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffef6; color: var(--ink); }
textarea.scratchpad:focus { outline: none; border-color: var(--ink-3); }
.t3link { padding: 3px 9px; font-size: 12px; white-space: nowrap; }
/* ---------- check-in ---------- */
.ask { font-size: 16px; padding: 11px 18px; border-radius: 12px; }
.checkin .row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; padding: 11px 14px; align-items: start; }
.checkin .row + .row { border-top: 1px solid var(--line); }
.checkin .a { font-size: 14px; }
.checkin .s { font-size: 12.5px; color: var(--ink-3); }
