:root { --fern: #2e4a36; --leaf: #2f7a4a; --frond: #c9d8b6; --ink: #1f2b25; --ink-soft: #4a554d; --line: #dfe5dc; --paper: #f7f6f1; --card: #fff;
  --warn: #8a5a00; --warn-bg: #fff6e0; --bad: #b3261e; --bad-bg: #fdecea; --good-bg: #e9f4ec; --ask-bg: #eef1fb; --ask: #34418f;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif; --display: "Fraunces", "Iowan Old Style", Georgia, serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--body); color: var(--ink); background: var(--paper); }
a { color: var(--leaf); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; margin-top: 1.4rem; } h3 { font-size: 1.05rem; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem clamp(.8rem, 3vw, 2rem); background: var(--fern); color: #eef2ec; }
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-family: var(--display); font-size: 1.15rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--frond); }
#nav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
#nav a { color: #eef2ec; text-decoration: none; padding: .35rem .7rem; border-radius: 99px; font-size: .95rem; }
#nav a.on, #nav a:hover { background: rgba(255,255,255,.14); }
#nav details.more { position: relative; } #nav details.more > summary { list-style: none; cursor: pointer; color: #eef2ec; padding: .35rem .7rem; border-radius: 99px; font-size: .95rem; white-space: nowrap; }
#nav details.more > summary::-webkit-details-marker { display: none; } #nav details.more > summary::after { content: " ▾"; font-size: .75em; }
#nav details.more > summary.on, #nav details.more > summary:hover, #nav details.more[open] > summary { background: rgba(255,255,255,.14); }
#nav details.more .menu { position: fixed; z-index: 20; min-width: 220px; display: flex; flex-direction: column; gap: .1rem; padding: .4rem; border-radius: 12px; background: var(--fern); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
#nav details.more .menu a { border-radius: 8px; }
#who { font-size: .85rem; display: flex; gap: .6rem; align-items: center; }
#who button { background: none; border: 1px solid rgba(255,255,255,.35); color: inherit; border-radius: 99px; padding: .2rem .7rem; cursor: pointer; font: inherit; }
main { max-width: 1100px; margin: 0 auto; padding: 1.2rem clamp(.8rem, 3vw, 2rem) 4rem; }
.pad { padding: 1rem 0; } .muted { color: var(--ink-soft); } .small { font-size: .86rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
[hidden] { display: none !important; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: .7rem; }
label { display: block; font-size: .9rem; font-weight: 600; }
label > input, label > select, label > textarea { display: block; width: 100%; margin-top: .25rem; font-weight: 400; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid #c8d0c4; border-radius: 10px; background: #fff; color: var(--ink); min-height: 2.6rem; }
textarea { min-height: 5rem; }
input[type=checkbox] { min-height: auto; width: 1.1rem; height: 1.1rem; accent-color: var(--leaf); vertical-align: middle; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.form { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.form .wide { grid-column: 1 / -1; }
button, .btn { font: inherit; font-weight: 600; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--fern); background: var(--fern); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; min-height: 2.6rem; }
button.ghost, .btn.ghost { background: #fff; color: var(--fern); }
button.quiet { background: none; border-color: transparent; color: var(--leaf); padding: .3rem .5rem; min-height: auto; }
button.danger { background: #fff; color: var(--bad); border-color: #e3b8b4; }
button:disabled { opacity: .55; cursor: default; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
th { background: #f1f3ee; font-weight: 600; font-size: .85rem; color: var(--ink-soft); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chip { display: inline-block; padding: .05rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #eef0ec; color: var(--ink-soft); }
.chip.new, .chip.paid, .chip.now, .chip.added { background: var(--good-bg); color: var(--leaf); }
.chip.update, .chip.upcoming, .chip.due { background: #e8f0fa; color: #1f4f8a; }
.chip.ask, .chip.partly { background: var(--ask-bg); color: var(--ask); }
.chip.error, .chip.overdue { background: var(--bad-bg); color: var(--bad); }
.chip.skip, .chip.past { background: #f0f0ee; color: #6b6f6a; }
.note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: .6rem .8rem; font-size: .92rem; }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.good { background: var(--good-bg); color: var(--leaf); }
.note.ask { background: var(--ask-bg); color: var(--ask); }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
ul.notes { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-soft); }
.big { font-family: var(--display); font-size: 1.8rem; }
.cand { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.cand button { font-size: .86rem; padding: .3rem .7rem; min-height: auto; }
.home-card .who { margin: .4rem 0 0; padding: 0; list-style: none; }
.home-card .who li::before { content: "● "; color: var(--leaf); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--ink-soft); border: 2px dashed var(--line); border-radius: 14px; }
.auth { max-width: 420px; margin: 2rem auto; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; z-index: 20; }
#toast.on { opacity: 1; }
dialog { border: none; border-radius: 16px; padding: 0; max-width: min(560px, 94vw); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,30,25,.45); }
#dlg-body { padding: 1.2rem 1.3rem; }
.dlg-actions { display: flex; flex-direction: row-reverse; gap: .6rem; justify-content: flex-start; flex-wrap: wrap; margin-top: 1rem; }
.err { color: var(--bad); font-size: .9rem; min-height: 1.2em; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.tabs button { background: #fff; color: var(--fern); border-color: var(--line); font-weight: 500; }
.tabs button[aria-pressed=true] { background: var(--fern); color: #fff; border-color: var(--fern); }
/* life */
.photos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: #eef0ec; }
.prose p, .prose ul { margin: 0 0 .8rem; } .prose { line-height: 1.65; }
/* structure */
.st-wrap { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.board-card { padding: .4rem; }
svg.board:focus { outline: none; } svg.board:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
svg.board { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
svg.board.live { touch-action: manipulation; }
svg.board .shape { cursor: pointer; outline: none; }
svg.board.live .shape:hover > :first-child, svg.board .shape:focus-visible > :first-child { stroke-width: 3; }
svg.board .shape.picked > :first-child { stroke: #2f7a4a; stroke-width: 4; stroke-dasharray: 6 4; }
svg.board .shape.mine > :first-child { stroke: #2f7a4a; stroke-width: 3; }
svg.board .lbl { pointer-events: none; }
svg.board .link { cursor: pointer; }
svg.board .handle { cursor: nwse-resize; }
.st-bar { margin: 0 0 .8rem; gap: .4rem; } .st-bar button { min-height: 2.3rem; padding: .35rem .8rem; }
.st-bar button[aria-pressed=true] { background: var(--fern); color: #fff; }
.st-panel { position: sticky; top: 4.5rem; max-height: calc(100vh - 6rem); overflow: auto; }
.swatch { width: 2rem; height: 2rem; min-height: 2rem; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c8d0c4; }
.swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--fern); }
@media (max-width: 900px) { .st-wrap { grid-template-columns: 1fr; } .st-panel { position: static; max-height: none; } }
@media (max-width: 640px) {
  .top { gap: .4rem; } #nav { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; } #who span { display: none; } #nav a { white-space: nowrap; }
  h1 { font-size: 1.4rem; }
  table.cards thead { display: none; } table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border-bottom: 1px solid var(--line); padding: .4rem 0; } table.cards td { border: none; padding: .2rem .7rem; } table.cards td.num { text-align: left; }
  table.cards td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-soft); font-size: .8rem; }
}
@media print { .top, button { display: none !important; } body { background: #fff; } }
