/* Theme: pure black, lime accent, serif display headings (DM Serif Text) + Poppins body */
:root {
  --bg: #000;
  --surface: #111;
  --surface-2: #1a1a1a;
  --surface-3: #232323;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #a6f13f;
  --accent-ink: #0b0b0b;              /* text on lime */
  --accent-soft: rgba(166, 241, 63, .12);
  --accent-line: rgba(166, 241, 63, .45);
  --good: var(--accent);
  --good-soft: var(--accent-soft);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .12);
  --radius: 18px;
  --serif: "DM Serif Text", Georgia, "Times New Roman", serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 var(--sans);
  min-height: 100dvh;
  padding-bottom: calc(96px + var(--safe-b));
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 640px; margin: 0 auto; padding: 0 18px 24px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.pad { padding: 32px 0; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.small { font-size: 12.5px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: .005em; }

/* Header: circle button · serif title · action */
.top {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 14px;
}
.top.simple { grid-template-columns: 1fr auto; }
.top h1 { margin: 0; font-size: 30px; line-height: 1.1; }
.top .title { text-align: center; min-width: 0; }
.top .title b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; }
.top .title span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--text); position: relative; transition: background .15s;
}
.icon-btn:active { background: var(--surface-3); }
.icon-btn.plain { width: 40px; height: 40px; }
.ex .icon-btn.plain, .list-item .icon-btn.plain { border: 0; background: none; width: 36px; height: 36px; }
.icon-btn small { position: absolute; bottom: -18px; font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Buttons: pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 500; font-size: 15px;
  background: var(--surface-2); color: var(--text); transition: transform .08s, opacity .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.outline { background: none; border: 1px solid var(--accent); color: var(--accent); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.btn.danger { background: none; color: var(--bad); }
.btn.block { width: 100%; height: 58px; font-size: 17px; }
.btn.sm { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.outline svg, .btn.primary svg { width: 20px; height: 20px; }
.stack { display: grid; gap: 12px; margin-top: 28px; }

/* Forms */
label.field { display: grid; gap: 7px; margin-bottom: 14px; }
label.field > span, .field > span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input, textarea.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); outline: none; font-size: 15px;
}
textarea.input { height: 90px; padding: 12px 16px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; }

/* Auth */
.auth { min-height: 90dvh; display: flex; flex-direction: column; justify-content: center; max-width: 400px; margin: 0 auto; }
.auth h1 { font-size: 40px; line-height: 1.1; margin: 0 0 6px; }
.auth .logo { width: 56px; height: 56px; margin-bottom: 22px; border-radius: 16px; }
.auth .switch { margin-top: 18px; text-align: center; color: var(--muted); }
.auth .switch a { color: var(--accent); font-weight: 600; }

/* Workout editor: each exercise is a card */
.ex { margin: 14px 0; background: var(--surface); border: 1px solid #1c1c1c; border-radius: var(--radius); padding: 16px 14px 8px; }
.ex-head { display: flex; align-items: center; gap: 8px; }
.ex-head h2 { margin: 0; font-size: 21px; line-height: 1.2; flex: 1; min-width: 0; }
.ex-meta { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 4px; gap: 8px; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.rest-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.rest-tag svg { width: 15px; height: 15px; color: var(--muted); }
.goal { font-size: 12.5px; color: var(--muted); margin: 8px 0 2px; }
.goal b { color: var(--text); font-weight: 600; }
.bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .2s; }

.sets { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 4px; }
.sets th { font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .08em; padding: 4px 0; }
.sets th svg { width: 15px !important; height: 15px !important; }
.sets td { text-align: center; padding: 0; }
.sets td.n { width: 28px; font-size: 16px; font-weight: 500; }
.sets td.prev { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.sets td.chk { width: 42px; }
.sets col.c-in { width: 25%; }
.cell {
  width: calc(100% - 8px); height: 44px; border-radius: 14px; text-align: center; font-size: 16px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); outline: none; font-variant-numeric: tabular-nums;
}
.cell:focus { border-color: var(--accent); }
.cell::placeholder { color: #5f5f5f; font-weight: 400; }
.chk-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
tr.done .cell { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
tr.done .chk-btn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
tr.done td.n, tr.done td.prev { color: var(--accent); }
.setctl { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 2px 0 6px; font-size: 14px; color: var(--muted); }
.setctl button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); border-radius: 50%; }
.setctl svg { width: 22px; height: 22px; }
.empty-ex { text-align: center; padding: 48px 12px 24px; color: var(--muted); }

/* Lists / cards */
.card { background: var(--surface); border: 1px solid #1c1c1c; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; display: block; }
button.card { font: inherit; }
.card h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.25; }
.card .lines { font-size: 13px; color: var(--muted); margin-top: 8px; }
.card .lines div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.stats b { color: var(--accent); font-weight: 500; }
.section-title { font-family: var(--serif); font-size: 22px; color: var(--text); margin: 28px 0 12px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid #1c1c1c; border-radius: 16px; }
.list-item .name { font-family: var(--serif); font-size: 17px; }
.list-item.sel { border-color: var(--accent); background: var(--accent-soft); }
.chev { color: var(--muted); }
.search { position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 2; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.delta { font-weight: 500; font-size: 12.5px; }
.delta.up { color: var(--accent); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--muted); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.badge.ok { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.badge.miss { background: var(--bad-soft); color: var(--bad); }
table.hist { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.hist td { padding: 8px 0; border-bottom: 1px solid var(--surface-3); vertical-align: top; }
table.hist tr:last-child td { border-bottom: 0; }
table.hist td:last-child { text-align: right; }
.chart { width: 100%; height: 150px; background: var(--surface); border: 1px solid #1c1c1c; border-radius: var(--radius); padding: 14px; }
.chart svg { width: 100%; height: 100%; stroke-width: 2.5; }

/* Bottom tabs: floating capsule, active item is a lime pill */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 10;
  width: calc(100% - 32px); max-width: 420px;
  display: flex; justify-content: space-between; gap: 4px; padding: 6px;
  background: rgba(17, 17, 17, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px;
}
.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.tabs a.on { background: var(--accent); color: var(--accent-ink); }

/* Rest timer bar */
.rest {
  position: fixed; left: 16px; right: 16px; bottom: calc(80px + var(--safe-b)); z-index: 11;
  max-width: 608px; margin: 0 auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 8px 8px 20px; display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.6); overflow: hidden;
}
.rest .t { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; flex: 1; color: var(--accent); }
.rest .rb { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }

/* Bottom sheet */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet {
  background: #0b0b0b; border: 1px solid var(--line); border-bottom: 0; width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto;
  border-radius: 26px 26px 0 0; padding: 8px 18px calc(20px + var(--safe-b)); animation: up .2s ease-out;
}
.sheet.full { height: 92dvh; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet .sheet-head h2 { margin: 0; font-size: 24px; }
.menu button { display: block; width: 100%; text-align: left; padding: 16px 4px; font-size: 16px; border-bottom: 1px solid var(--surface-2); }
.menu button.red { color: var(--bad); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); z-index: 30;
  background: var(--accent); color: var(--accent-ink); padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
  max-width: 90vw;
}
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.shake { animation: shake .2s 2; border-color: var(--bad) !important; }

/* Templates */
.card.tpl.today { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line); }
.card.tpl h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tDays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; overflow: visible; }
#tDays .chip { padding: 0; height: 40px; }

@media (min-width: 700px) { main { padding-top: 12px; } }

/* ───────── Bottom tabs with 4 items: inactive tabs show the icon only ───────── */
.tabs a { flex: 1 1 auto; font-size: 13px; min-width: 46px; padding: 0 10px; }
.tabs a:not(.on) { font-size: 0; gap: 0; }
.tabs a svg { width: 21px; height: 21px; }

/* ───────── Levels (skill tree) ───────── */
.alt-score { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; white-space: nowrap; }
.alt-score b { color: var(--accent); font-weight: 600; font-size: 14px; }
.seg { display: grid; grid-template-columns: repeat(4, auto); gap: 4px; background: var(--surface); border: 1px solid #1c1c1c; border-radius: 999px; padding: 5px; margin: 2px 0 14px; }
.seg a { text-align: center; padding: 9px 6px; border-radius: 999px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Category tabs */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.cat { display: grid; justify-items: center; gap: 2px; padding: 10px 2px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cat-icon svg { width: 22px; height: 22px; stroke-width: 1.9; display: block; }
.cat-name { font-size: 12.5px; font-weight: 600; }
.cat-count { font-size: 10.5px; color: var(--muted); }
.cat.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cat.on .cat-count { color: var(--accent-ink); opacity: .7; }
.cat-progress { background: var(--surface); border: 1px solid #1c1c1c; border-radius: 16px; padding: 12px 14px; font-size: 13.5px; }
.cat-progress b { font-family: var(--serif); font-weight: 400; font-size: 17px; }

/* Section heading inside a category (e.g. Push-ups / Overhead / Dips) */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 4px; }
.sec-head span:first-child { font-family: var(--serif); font-size: 22px; }

/* Level path */
.path { position: relative; margin: 6px 0 20px; }
.path-line { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: none; }
.path-line path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pl-todo { stroke: #222; stroke-width: 12; }
.pl-done { stroke: var(--accent); stroke-width: 12; opacity: .85; }
.lvl-wrap { position: absolute; width: 150px; transform: translate(-50%, -36px); text-align: center; }
.lvl {
  position: relative; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; border: 3px solid var(--line); background: var(--surface);
  font-family: var(--serif); font-size: 28px; color: var(--text); transition: transform .12s;
}
.lvl:active { transform: scale(.94); }
.lvl:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
.lvl svg { width: 30px; height: 30px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lvl .num { position: relative; z-index: 1; }
.lvl.locked { background: #121212; border-color: #222; color: #4a4a4a; }
.lvl.locked .lock { stroke: #4a4a4a; stroke-width: 2; width: 24px; height: 24px; }
.lvl.unlocked { border-color: var(--accent); }
.lvl.in_progress { border: 0; background: conic-gradient(var(--accent) var(--p), #262626 0); }
.lvl.in_progress::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.lvl.summited { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lvl.summited .tick { stroke: var(--accent-ink); stroke-width: 3.2; }
.lvl.current { width: 86px; height: 86px; box-shadow: 0 0 0 7px var(--accent-soft), 0 0 34px rgba(166, 241, 63, .35); animation: bob 2.2s ease-in-out infinite; }
.lvl-wrap:has(.current) { transform: translate(-50%, -43px); }
@keyframes bob { 50% { transform: translateY(-4px); } }
.lvl .go { position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--accent); color: var(--accent-ink); font: 700 10.5px var(--sans); letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; }
.lvl .flag { position: absolute; top: -6px; right: -6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); border: 2px solid var(--bg); }
.lvl .flag svg { width: 16px; height: 16px; stroke-width: 2.2; }
.lvl .stale { position: absolute; top: 2px; left: 2px; z-index: 2; width: 12px; height: 12px; border-radius: 50%; background: #e9b949; border: 2px solid var(--bg); }
.lvl-name { font-family: var(--serif); font-size: 15px; line-height: 1.2; margin-top: 10px; }
.lvl-name, .lvl-sub { position: relative; text-shadow: 0 0 4px #000, 0 0 8px #000, 0 0 12px #000; }
.lvl-wrap:has(.locked) .lvl-name { color: #6a6a6a; }
.lvl-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lvl-wrap:has(.summited) .lvl-sub, .lvl-wrap:has(.current) .lvl-sub { color: var(--accent); }

/* Level cleared: bubble pops, newly unlocked levels appear (< 1.5 s, skippable, off for reduced motion) */
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes appear { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: scale(1); } }
.celebrating .lvl.pop { animation: pop .55s ease-out both; }
.celebrating .lvl.new { animation: appear .45s .6s ease-out both; }

/* Node sheet */
.ns-title { margin: 0; font-size: 28px; line-height: 1.15; }
.st { display: inline-block; font-size: 11.5px; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.st-summited, .st-in_progress, .st-unlocked { color: var(--accent); border-color: var(--accent-line); }
.st-summited { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.st-self { border-style: dashed; }
.st-act { color: var(--text); border-style: dashed; }
.ns-gate { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid #1c1c1c; }
.ns-gate b { font-size: 18px; color: var(--accent); font-weight: 600; }
.ns-note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--accent-line); padding-left: 10px; margin: 10px 0; }
.ns-missing { margin: 12px 0; }
.ns-stale { font-size: 12.5px; color: var(--r-amber); background: rgba(233, 185, 73, .08); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.ladder, .cues { margin: 0; padding: 0; list-style: none; }
.ladder li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--surface-2); font-size: 13.5px; color: var(--muted); }
.ladder li b { font-weight: 500; white-space: nowrap; }
.ladder li em { font-style: normal; font-size: 10px; letter-spacing: .1em; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
.ladder li.reached { color: var(--text); }
.ladder li.best { color: var(--accent); }
.rung { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--line); }
.ladder li.reached .rung { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.ladder li.best .rung { background: var(--accent); color: var(--accent-ink); }
.cues li { position: relative; padding: 6px 0 6px 18px; font-size: 14px; }
.cues li::before { content: ''; position: absolute; left: 2px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rx { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 12px; }
.rx b { font-size: 16px; color: var(--accent); font-weight: 600; }
.hchart { margin: 0; }
.hchart svg { fill: none; stroke: none; stroke-width: 1; width: 100%; height: auto; background: var(--surface); border: 1px solid #1c1c1c; border-radius: 14px; }
.hchart .h-reps { fill: none; stroke-width: 2; }
.hchart .h-load { fill: none; stroke: #8a8a8a; stroke-width: 1.5; stroke-dasharray: 4 3; }
.hchart .att-line { stroke: #555; stroke-dasharray: 2 3; }
.hchart .att-line.pass { stroke: var(--accent); }
.hchart .ax { fill: #666; font-size: 8px; }
.hchart figcaption { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hchart .k { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-left: 6px; }
.hchart .k.load { background: repeating-linear-gradient(90deg, #8a8a8a 0 4px, transparent 4px 7px); }
.hchart .k.att { width: 2px; height: 10px; background: #777; }

/* Attempt day */
.countdown { text-align: center; padding: 24px 16px; display: grid; gap: 4px; }
.countdown b { font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--accent); }
fieldset { border: 0; margin: 14px 0; padding: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.rung-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; font-size: 13px; cursor: pointer; }
.rung-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rung-opt b { font-weight: 500; white-space: nowrap; color: var(--muted); }
.rung-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rung-opt:has(input:checked) .rung { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rung-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.feel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.feel legend { width: 100%; }
.feel label { position: relative; }
.feel input { position: absolute; opacity: 0; }
.feel span:not(.feel-hint) { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; }
.feel input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.feel input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.feel-hint { margin-left: 4px; }
.att-form h3 { margin-bottom: 2px; }
.result { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; display: grid; gap: 6px; }
.result.good { background: var(--accent-soft); border: 1px solid var(--accent-line); }
.result.good > b:first-child { color: var(--accent); font-size: 16px; }

/* Log */
.unit-toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.unit-toggle label { position: relative; }
.unit-toggle input { position: absolute; opacity: 0; }
.unit-toggle span { display: block; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.unit-toggle input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.unit-toggle input:focus-visible + span { outline: 2px solid var(--accent); }
.tl-row { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.tl-row .n { text-align: center; font-weight: 500; }
.tl-row .cell { width: 100%; }

/* Inline icons inside badges and stats */
.bi { width: 13px; height: 13px; vertical-align: -2px; stroke-width: 2.4; }
.badge .bi { margin-right: 2px; }
.stats .si { display: inline-flex; align-items: center; gap: 4px; }
.stats .si .bi { color: var(--muted); }
#tl-hist .icon-btn svg { width: 16px; height: 16px; }
