:root { --bg:#f7f7f5; --card:#fff; --ink:#1c1c1a; --muted:#6b6b66; --line:#e3e3de; --brand:#14532d; --warn:#92400e; --warn-bg:#fef3c7; --ok:#166534; --ok-bg:#dcfce7; }
@media (prefers-color-scheme: dark) { :root { --bg:#141413; --card:#1f1f1d; --ink:#ececea; --muted:#a3a39e; --line:#34342f; --brand:#4ade80; --warn:#fcd34d; --warn-bg:#3a2e0b; --ok:#86efac; --ok-bg:#12321f; } }
* { box-sizing: border-box; }
body { margin:0; font:16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); }
.banner { background:var(--warn-bg); color:var(--warn); padding:6px 16px; font-size:13px; text-align:center; }
.top { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.top h1 { font-size:18px; margin:0; }
main { max-width:860px; margin:0 auto; padding:16px; }
h2 { font-size:20px; margin:24px 0 8px; } h3 { font-size:16px; margin:0 0 6px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; margin:10px 0; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.muted { color:var(--muted); font-size:14px; }
.pill { font-size:12px; padding:2px 8px; border-radius:99px; background:var(--line); }
.pill.draft { background:var(--warn-bg); color:var(--warn); } .pill.approved, .pill.reviewed { background:var(--ok-bg); color:var(--ok); }
button { font:inherit; padding:8px 14px; border-radius:8px; border:1px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; min-height:40px; }
button.primary { background:var(--brand); color:#fff; border-color:var(--brand); }
@media (prefers-color-scheme: dark) { button.primary { color:#08210f; } }
button.link { border:none; background:none; color:var(--brand); padding:4px; min-height:0; text-decoration:underline; }
input, textarea, select { font:inherit; padding:8px; border-radius:8px; border:1px solid var(--line); background:var(--bg); color:var(--ink); width:100%; }
input.num { width:72px; } label { font-size:14px; color:var(--muted); display:block; margin:6px 0 2px; }
table { border-collapse:collapse; width:100%; font-size:14px; } td, th { text-align:left; padding:6px 4px; border-bottom:1px solid var(--line); }
.tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; } .tabs button[aria-selected="true"] { border-color:var(--brand); color:var(--brand); font-weight:600; }
.notice { background:var(--ok-bg); color:var(--ok); padding:8px 12px; border-radius:8px; }
.error { background:#fee2e2; color:#991b1b; padding:8px 12px; border-radius:8px; }
.set-grid { display:grid; grid-template-columns:auto 1fr 1fr; gap:6px; align-items:center; }

.media { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:8px 0; }
.media video { width:100%; max-height:360px; background:#000; border-radius:8px; }
.pill.in_progress, .pill.submitted { background:var(--warn-bg); color:var(--warn); }
.rx { border-top:1px solid var(--line); padding:10px 0; }
.rx-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:6px 10px; }
.rx-grid .wide { grid-column:1 / -1; }
.set { display:grid; grid-template-columns:52px repeat(auto-fit, minmax(72px, 1fr)); gap:6px; align-items:center; margin:6px 0; }
label.check { display:flex; gap:6px; align-items:center; margin:0; color:var(--ink); }
label.check input { width:auto; }
.timers { margin:6px 0; } .timer { font-variant-numeric:tabular-nums; }
.photos { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:8px; }
.photos figure { margin:0; } .photos img { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:8px; background:var(--line); }
details > summary { cursor:pointer; display:flex; gap:8px; flex-wrap:wrap; align-items:baseline; }
h4 { margin:12px 0 4px; }
.activity { border-top:1px solid var(--line); padding:6px 0; }
.voice { padding:10px; } audio { width:100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.circuit { margin: 12px 0 4px; padding: 6px 10px; border-left: 3px solid currentColor; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 0.8em; text-align: center; }
.messages { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(127, 127, 127, 0.35); }
.msg.mine { align-self: flex-end; background: rgba(46, 125, 50, 0.12); }
.msg.auto { border-style: dashed; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.new-divider { text-align: center; border-top: 1px solid currentColor; padding-top: 4px; }
.highlight { outline: 3px solid #f0b400; outline-offset: -3px; }
.summary-out h4 { margin: 10px 0 4px; }
table.diff { margin: 4px 0 8px; }
.change-workout h4 { margin: 8px 0 4px; }
