:root {
  color-scheme: light dark;
  --fallback-bg: #f3f4f0; --fallback-surface: #fff; --fallback-text: #151714; --fallback-hint: #72786f;
  --fallback-accent: #2f7d58;
  --bg: var(--tg-theme-bg-color, var(--fallback-bg));
  --surface: var(--tg-theme-section-bg-color, var(--tg-theme-secondary-bg-color, var(--fallback-surface)));
  --text: var(--tg-theme-text-color, var(--fallback-text));
  --hint: var(--tg-theme-hint-color, var(--fallback-hint));
  --accent: var(--tg-theme-button-color, var(--fallback-accent));
  --accent-text: var(--tg-theme-button-text-color, #fff);
  --danger: var(--tg-theme-destructive-text-color, #c6463e);
  --warn: #b17a12; --line: color-mix(in srgb, var(--text) 10%, transparent);
  --soft: color-mix(in srgb, var(--accent) 9%, var(--surface));
  --tabs-h: 66px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --fallback-bg: #111610; --fallback-surface: #1b211a; --fallback-text: #edf1e9; --fallback-hint: #a0aa9b; --fallback-accent: #73c59a; --accent-text: var(--tg-theme-button-text-color, #102b1d); --danger: var(--tg-theme-destructive-text-color, #ff8c80); --warn: #e2b956; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; padding: max(16px, env(safe-area-inset-top), var(--tg-safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right), var(--tg-content-safe-area-inset-right, 0px)) calc(var(--tabs-h) + max(16px, env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px))) max(14px, env(safe-area-inset-left), var(--tg-content-safe-area-inset-left, 0px)); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .46; cursor: default; }
button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { border: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 21px; letter-spacing: -.035em; line-height: 1.2; }
h2 { font-size: 18px; letter-spacing: -.025em; font-weight: 720; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
h4 { font-size: 14px; margin: 10px 0 6px; }
p, h3, h4, label, .path { overflow-wrap: anywhere; }
.top, main, body > .banner { max-width: 620px; margin-left: auto; margin-right: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0 20px; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.eyebrow { font-size: 9px; letter-spacing: .16em; font-weight: 750; color: var(--accent); margin-bottom: 3px; }
#who { font-size: 11px; margin-top: 3px; }
.orb { width: 39px; height: 39px; flex: none; border-radius: 13px; background: #111510; display: grid; place-items: center; box-shadow: 0 6px 14px #0002; }
.orb span { width: 17px; height: 17px; border: 3px solid #99ffbd; border-top-color: transparent; border-radius: 50%; transform: rotate(28deg); }
.page-head, .section-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.page-head { margin: 0 2px 12px; flex-wrap: wrap; }
.row > *, .section-head > * { min-width: 0; }
.section-head { margin-bottom: 10px; }
.section-title { margin: 20px 2px 10px; }
.panel, .card { padding: 15px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 5px 18px #0000000a; }
.stack > * + * { margin-top: 12px; }
.small { font-size: 12px; }
.hint { color: var(--hint); }
.footnote { font-size: 11px; color: var(--hint); text-align: center; margin: 14px 0; }
.pill { display: inline-block; flex: none; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--accent); font-size: 11px; }
.pill.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.pill.ok { color: var(--accent); }
.banner, .notice { font-size: 13px; padding: 11px 13px; border-radius: 12px; background: var(--soft); color: var(--text); }
.banner { margin-bottom: 12px; }
.banner.err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); color: var(--accent); display: grid; place-items: center; flex: none; border: 1px solid var(--line); }
.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { width: 100%; min-height: 47px; padding: 11px 14px; border-radius: 15px; background: var(--accent); color: var(--accent-text); font-weight: 650; box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 16%, transparent); }
.btn.ghost { background: var(--soft); color: var(--accent); box-shadow: none; }
.btn.danger { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); color: var(--danger); box-shadow: none; }
.btn.small { width: auto; min-height: 37px; padding: 8px 12px; font-size: 12px; border-radius: 11px; }
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.segment { min-width: 0; min-height: 43px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font-size: 13px; font-weight: 650; padding: 8px; overflow-wrap: anywhere; }
.segment.selected { color: var(--accent-text); background: var(--accent); border-color: var(--accent); box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 20%, transparent); }
.effort-caption { font-size: 13px; color: var(--accent); }
.effort-control { padding: 0 23px; }
.effort-slider { position: relative; height: 38px; display: flex; align-items: center; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.effort-slider.dragging { cursor: grabbing; }
.effort-track { position: relative; width: 100%; height: 2px; border-radius: 99px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.effort-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; pointer-events: none; }
.effort-dot { position: absolute; top: 50%; width: 6px; height: 6px; border: 1.5px solid var(--surface); border-radius: 50%; background: color-mix(in srgb, var(--text) 30%, var(--surface)); transform: translate(-50%, -50%); pointer-events: none; }
.effort-dot.passed { background: var(--accent); }
.effort-dot.selected { opacity: 0; }
.effort-thumb { position: absolute; top: 50%; width: 20px; height: 20px; border: 1px solid color-mix(in srgb, var(--text) 24%, transparent); border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px #0003; transform: translate(-50%, -50%); pointer-events: none; }
.effort-slider.dragging .effort-thumb { transform: translate(-50%, -50%) scale(1.08); }
.effort-scale { position: relative; height: 32px; }
.effort-tick { position: absolute; transform: translateX(-50%); width: 48px; min-height: 32px; padding: 2px 0; border: 0; background: transparent; color: var(--hint); font-size: 9px; line-height: 1.15; overflow-wrap: anywhere; }
.effort-tick.selected { color: var(--accent); font-weight: 750; }
.limit-card { display: grid; gap: 12px; }
.limit-card .section-head { margin-bottom: 0; }
.limit-window { display: grid; gap: 5px; }
.limit-window + .limit-window { border-top: 1px solid var(--line); padding-top: 11px; }
.limit-window-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--hint); }
.limit-window-head strong { font-size: 25px; letter-spacing: -.045em; color: var(--text); font-weight: 720; }
.limit-track { height: 6px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.limit-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.limit-window.warn .limit-track span { background: var(--warn); }
.limit-window.bad .limit-track span { background: var(--danger); }
.big { font-size: 34px; line-height: 1.1; letter-spacing: -.04em; font-weight: 750; font-variant-numeric: tabular-nums; }
.total { margin-bottom: 13px; color: var(--accent); }
.account-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.account-line > div { min-width: 0; }
.balance, .account-line strong { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.chart { display: flex; align-items: end; gap: 6px; height: 106px; margin-top: 8px; }
.chart-day { flex: 1; min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 6px; font-size: 9px; color: var(--hint); }
.chart-bar { width: 100%; max-width: 28px; display: block; border-radius: 4px 4px 1px 1px; background: var(--accent); opacity: .8; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.toggle .sw { flex: none; width: 39px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--text) 16%, var(--surface)); position: relative; transition: background .15s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px #0002; }
.toggle.on .sw { background: var(--accent); }
.toggle.on .sw::after { transform: translateX(15px); }
.project summary { list-style: none; cursor: pointer; }
.project summary::-webkit-details-marker { display: none; }
.project summary h3 { padding-bottom: 4px; }
.chevron { color: var(--accent); flex: none; font-size: 22px; }
.project[open] .chevron { transform: rotate(180deg); }
.project-body { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.project-body section + section { border-top: 1px solid var(--line); padding-top: 8px; }
.path { font-size: 12px; color: var(--hint); }
.board { padding: 10px 0; }
.board > p { font-size: 13px; font-weight: 600; }
.feature { padding-bottom: 14px; }
.feature-choice { margin: 0 0 0 8px; padding: 4px 0 0 12px; border-left: 2px solid var(--line); }
.choice-disabled { padding: 0 0 0 8px; }
.button-row { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; }
.button-row > * { min-width: 0; flex: 1 1 130px; }
.board-form { border-top: 1px solid var(--line); padding-top: 8px; }
.account-meta { display: block; margin-top: 3px; }
.code-routes summary { cursor: pointer; font-weight: 650; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; min-height: 38px; }
input[type=checkbox] { width: 19px; height: 19px; flex: none; accent-color: var(--accent); }
input:not([type=checkbox]), select { display: block; width: 100%; min-width: 0; padding: 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-size: 16px; }
label { display: block; font-size: 13px; }
.inline-editor { margin-top: 12px; }
.account-form { margin-top: 12px; }
.text-link { display: inline; padding: 0; background: none; color: var(--accent); text-decoration: underline; font-size: inherit; overflow-wrap: anywhere; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.code { font: 700 24px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .1em; text-align: center; padding: 14px; border-radius: 12px; background: var(--bg); user-select: all; overflow-wrap: anywhere; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding: 0 max(6px, env(safe-area-inset-right)) max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px)); z-index: 5; }
.tabs button { flex: 1; max-width: 124px; min-width: 0; appearance: none; background: transparent; color: var(--hint); display: grid; justify-items: center; gap: 4px; padding: 10px 0 8px; font-size: 10px; min-height: var(--tabs-h); align-content: center; }
.tabs button.on { color: var(--accent); }
.tabs button.on svg { background: var(--soft); box-shadow: 0 0 0 6px var(--soft); border-radius: 5px; }
.tabs svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px)) + 14px); background: var(--text); color: var(--surface); padding: 11px 16px; border-radius: 13px; font-size: 13px; z-index: 9; width: max-content; max-width: calc(100% - 28px); text-align: center; box-shadow: 0 4px 20px #0003; }
.empty { text-align: center; padding: 24px 12px; color: var(--hint); font-size: 14px; }
.skeleton { height: 160px; border-radius: 17px; background: var(--surface); margin-bottom: 10px; }
@media (min-width: 700px) { .top { padding-top: 14px; padding-bottom: 25px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
