:root {
  --bg: #f7f6f2; --fg: #1c1b19; --muted: #6b6a66; --card: #ffffff; --line: #e4e1d8;
  --gold: #d9a21b; --gold-ink: #5a4100; --red: #c0392b; --orange: #d97706; --blue: #2563eb; --green: #15803d;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141413; --fg: #ecebe6; --muted: #a3a19a; --card: #1f1e1c; --line: #34322e; --gold-ink: #ffe3a1; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; margin-right: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
nav a { color: var(--muted); text-decoration: none; padding: 2px 0; }
nav a.on { color: var(--fg); border-bottom: 2px solid var(--gold); }
nav .me { color: var(--muted); font-size: 13px; }
nav form { display: inline; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
main.wide { max-width: 1200px; }
h1 { font-size: 24px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 6px 0 2px; }
.card, .req { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 14px; }
.hero { border-color: var(--gold); }
.req.u-today { border-left: 4px solid var(--red); }
.req.u-this_week { border-left: 4px solid var(--orange); }
.req .head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ref { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--gold-ink); text-decoration: none; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.s-new { color: var(--blue); border-color: var(--blue); }
.chip.s-in_progress { color: var(--orange); border-color: var(--orange); }
.chip.s-done { color: var(--green); border-color: var(--green); }
.chip.s-rejected { color: var(--red); border-color: var(--red); }
.muted { color: var(--muted); font-size: 13px; }
.note { background: color-mix(in srgb, var(--gold) 18%, var(--card)); border: 1px solid var(--gold); border-radius: 8px; padding: 8px 12px; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.links { margin: 4px 0; padding-left: 18px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions form, .row { display: flex; gap: 8px; margin: 0; }
.row input { flex: 1; }
label { display: block; margin: 0 0 10px; font-weight: 600; font-size: 14px; }
label.inline { font-weight: 400; display: flex; gap: 6px; align-items: center; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
label.inline input { width: auto; display: inline; margin: 0; }
button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--gold); background: var(--gold); color: #1c1b19; cursor: pointer; }
button.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
button.claude { background: #c96442; border-color: #c96442; color: #fff; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 400; text-decoration: underline; }
table { width: 100%; border-collapse: collapse; }
td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 560px) { .actions button { width: 100%; } .actions form { flex: 1 1 100%; } }
.hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
.chip.s-ongoing { color: var(--orange); border-color: var(--orange); }
.chip.s-processing { color: var(--gold-ink); border-color: var(--gold); }
.chip.s-rejected { color: var(--red); border-color: var(--red); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .chip { text-decoration: none; padding: 3px 10px; }
.filters .chip.on { color: var(--fg); border-color: var(--gold); background: var(--card); }
.lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; margin: 0 0 18px; }
.lane { background: color-mix(in srgb, var(--line) 35%, transparent); border-radius: 10px; padding: 10px; min-width: 0; }
.lane h2 { font-size: 14px; margin: 0 0 8px; display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lane .count { font-variant-numeric: tabular-nums; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 0 0 8px; }
.tile.u-today { border-left: 4px solid var(--red); }
.tile.u-this_week { border-left: 4px solid var(--orange); }
.tile h3 { font-size: 14px; margin: 6px 0 2px; overflow-wrap: anywhere; }
.tile .head { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tile p { margin: 0; font-size: 12px; }
.tile .moves { display: flex; justify-content: space-between; margin-top: 6px; }
.tile .moves form:only-child { margin-left: auto; }
.tile .moves button { padding: 0 10px; }
@media (max-width: 760px) { .lanes { grid-template-columns: 1fr; } }
/* 0.2.0 board: drag and drop, source chips, Open ↗ */
.tile[draggable=true] { cursor: grab; transition: transform .12s, box-shadow .12s, opacity .12s; }
.tile[draggable=true]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile.dragging { opacity: .45; cursor: grabbing; }
.tile.saving { opacity: .7; }
.tile.moved { box-shadow: 0 0 0 2px var(--gold); }
.lane.over { outline: 2px dashed var(--gold); outline-offset: -2px; background: color-mix(in srgb, var(--gold) 10%, transparent); }
.lane { min-height: 120px; }
.tile .moves { align-items: center; gap: 6px; }
.tile .go { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--fg); border: 1px solid var(--gold); border-radius: 6px; padding: 1px 8px; margin: 0 auto; }
.tile .go:hover { background: var(--gold); color: #000; }
.chip.src-coach { border-color: #7fb6ff; }
.chip.src-board { border-color: var(--orange); }
.chip.src-hunt { border-color: var(--red); }
.hint { font-size: 12px; margin: 0 0 8px; }
@media (prefers-reduced-motion: reduce) { .tile[draggable=true] { transition: none; } }
