:root {
  font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:#243b34;
  background:#f6f7f4;
  font-synthesis:none;
  font-size:15px;
  line-height:1.5;
  --green:#1b483c;
  --muted:#68776e;
  --line:#e2e7df;
  --orange:#ad5939;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}
button,a {
  touch-action:manipulation;
}
button {
  cursor:pointer;
}
a {
  color:inherit;
}
button:disabled {
  opacity:.45;
  cursor:default;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #719e8d;
  outline-offset:3px;
}
h1,h2,h3,p {
  margin:0;
}
button,input,select {
  min-height:44px;
}
button {
  border:0;
}
a {
  text-decoration:none;
}
[hidden] {
  display:none!important;
}
.shell {
  max-width:1192px;
  margin:0 auto;
  padding:0 40px;
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:28px 0;
  border-bottom:1px solid var(--line);
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  font-size:19px;
  font-weight:650;
  letter-spacing:.03em;
}
.brand-icon {
  display:grid;
  place-items:center;
  background:var(--green);
  color:#fff;
  width:43px;
  height:43px;
  border-radius:13px;
  font-family:Georgia,serif;
  font-size:35px;
  font-weight:bold;
  line-height:1;
  padding-bottom:8px;
  letter-spacing:-2px;
}
.brand small {
  display:block;
  font-size:11px;
  font-weight:600;
  letter-spacing:.16em;
  color:var(--muted);
  margin-top:1px;
}
.topbar-actions {
  display:flex;
  align-items:center;
  gap:21px;
}
.public-label {
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:7px;
}
.public-label>span {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#6b8e70;
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 15px;
  border-radius:10px;
  font-weight:550;
  font-size:13px;
  white-space:nowrap;
  min-height:44px;
  transition:background .15s;
}
.button.secondary {
  background:#fff;
  border:1px solid var(--line);
}
.button.secondary:hover {
  background:#edf1eb;
}
.text-button {
  background:none;
  color:var(--green);
}
.text-button:hover {
  background:#e9eee7;
}
.page-heading {
  padding:45px 0 29px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.eyebrow {
  font-size:12px;
  letter-spacing:.1em;
  color:var(--muted);
  margin-bottom:8px;
}
h1 {
  font-size:30px;
  letter-spacing:-.03em;
  font-weight:600;
}
.workspace-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}
.tabs {
  display:flex;
  background:#e9ede6;
  padding:5px;
  border-radius:13px;
  gap:3px;
}
.tab {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:125px;
  padding:11px 22px;
  background:transparent;
  color:var(--muted);
  border-radius:9px;
  font-weight:550;
}
.tab>span {
  font-size:18px;
  font-weight:400;
}
.tab.active {
  background:#fff;
  color:var(--green);
  box-shadow:0 2px 5px #1b483c0a;
}
.sync-status {
  font-size:12px;
  color:var(--muted);
  text-align:right;
}
.filter-bar {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:23px;
  flex-wrap:wrap;
  font-size:12px;
  color:var(--muted);
}
select,input[type=date] {
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:#35463e;
  padding:8px 12px;
  min-width:0;
}
select {
  min-width:120px;
}
.filter-bar>.text-button {
  margin-left:auto;
}
.custom-dates {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
input[type=date] {
  width:155px;
}
.money-overview {
  display:grid;
  grid-template-columns:1.12fr 1fr;
  gap:22px;
}
.balance-card {
  position:relative;
  overflow:hidden;
  background:var(--green);
  color:#fff;
  padding:29px 32px;
  border-radius:20px;
  min-height:221px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.metric-label {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  font-weight:500;
}
.balance-card .metric-label {
  position:relative;
  z-index:1;
  color:#e3ede5;
}
.metric-label>span:not(.direction) {
  font-size:11px;
  letter-spacing:.1em;
  background:#ffffff17;
  padding:3px 6px;
  border-radius:4px;
}
.balance-value {
  font-size:clamp(26px,3.7vw,45px);
  font-weight:500;
  letter-spacing:-.04em;
  font-variant-numeric:tabular-nums;
  position:relative;
  z-index:1;
  overflow-wrap:anywhere;
  margin:16px 0;
}
.balance-caption {
  font-size:11px;
  color:#c4d7cb;
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  z-index:1;
}
.balance-dot {
  width:5px;
  height:5px;
  border-radius:50%;
  background:#a8c7ad;
}
.balance-decoration {
  position:absolute;
  right:0;
  top:14px;
  transform:rotate(-18deg);
  font-size:195px;
  line-height:1;
  color:#ffffff08;
  font-weight:600;
  pointer-events:none;
}
.flow-summary {
  border:1px solid var(--line);
  background:#fff;
  border-radius:20px;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  padding:26px 0;
  min-width:0;
}
.flow-summary article {
  padding:0 25px;
  min-width:0;
}
.flow-summary article+article {
  border-left:1px solid var(--line);
}
.direction {
  display:inline-grid;
  place-items:center;
  width:23px;
  height:23px;
  border-radius:7px;
  font-size:17px;
}
.direction.income {
  background:#edf3eb;
  color:#49724a;
}
.direction.expense {
  background:#f7eee7;
  color:#ab7248;
}
.summary-value {
  font-variant-numeric:tabular-nums;
  font-size:clamp(20px,2.2vw,29px);
  letter-spacing:-.04em;
  overflow-wrap:anywhere;
  margin:20px 0 8px;
  font-weight:550;
}
.metric-note {
  font-size:11px;
  color:var(--muted);
}
.record-section {
  margin-top:35px;
}
.section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.section-title h2 {
  font-size:16px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:9px;
}
.section-title p {
  font-size:12px;
  color:var(--muted);
}
.count {
  font-size:11px;
  font-weight:500;
  color:var(--muted);
  background:#e9ede6;
  border-radius:5px;
  padding:2px 6px;
  min-width:22px;
  text-align:center;
}
.records-box {
  background:#fff;
  border:1px solid var(--line);
  border-radius:15px;
  overflow:hidden;
}
.record-table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.record-table th {
  background:#fafbf9;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
  padding:15px 22px;
  text-align:left;
  border-bottom:1px solid var(--line);
}
.record-table td {
  padding:18px 22px;
  border-bottom:1px solid #edf0e9;
  font-size:13px;
  vertical-align:middle;
  overflow-wrap:anywhere;
}
.record-table tr:last-child td {
  border-bottom:0;
}
.record-table td:last-child,.record-table th:last-child {
  text-align:right;
}
.record-table .date-column {
  width:24%;
}
.record-table .amount-column {
  width:25%;
}
.date-cell {
  font-size:12px;
  color:#46584d;
}
.date-cell small {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}
.note-cell {
  display:flex;
  align-items:center;
  gap:11px;
}
.note-text {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  min-width:0;
}
.record-table .direction {
  flex-shrink:0;
  font-size:15px;
  width:24px;
  height:24px;
}
.amount {
  font-variant-numeric:tabular-nums;
  font-weight:550;
  white-space:normal;
  overflow-wrap:anywhere;
}
.amount.income {
  color:#49724a;
}
.amount.expense {
  color:#926347;
}
.empty-state {
  min-height:265px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px 22px;
  gap:10px;
}
.empty-symbol {
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  font-size:26px;
  background:#f1f4ed;
  color:#7a9078;
  border-radius:16px;
  margin-bottom:5px;
}
.empty-state h3 {
  font-size:15px;
  font-weight:550;
}
.empty-state p {
  font-size:12px;
  color:var(--muted);
  max-width:310px;
  line-height:1.9;
}
.error-banner {
  padding:15px 18px;
  margin:0 0 20px;
  background:#fff2ec;
  border:1px solid #efd6c9;
  border-radius:11px;
  color:#884c35;
  font-size:13px;
}
.fitness-layout {
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:28px;
}
.exercise-sidebar {
  border-right:1px solid var(--line);
  padding-right:24px;
}
.archive-toggle {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  margin:-5px 0 14px;
  min-height:32px;
  cursor:pointer;
}
.archive-toggle input {
  min-height:0;
  margin:0;
  accent-color:var(--green);
  width:15px;
  height:15px;
}
.exercise-list {
  display:flex;
  flex-direction:column;
  gap:9px;
}
.exercise-button {
  width:100%;
  padding:16px 15px;
  text-align:left;
  background:#fff;
  border:1px solid var(--line);
  border-radius:11px;
  color:inherit;
  position:relative;
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.exercise-button:hover {
  background:#f0f3eb;
}
.exercise-button[aria-pressed=true] {
  background:#edf2e8;
  border-color:#bdcdb4;
}
.exercise-name {
  font-weight:550;
  word-break:break-word;
  padding-right:15px;
}
.exercise-button[aria-pressed=true]:after {
  content:'›';
  position:absolute;
  right:12px;
  top:15px;
  color:#6a825c;
  font-size:21px;
}
.exercise-last {
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.archived {
  font-size:11px;
  color:var(--muted);
  font-weight:400;
}
.exercise-detail {
  min-width:0;
}
.detail-heading {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:18px;
}
.detail-heading h2 {
  font-size:24px;
  font-weight:550;
  overflow-wrap:anywhere;
  min-width:0;
}
.detail-heading>p {
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}
.training-stats {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
  margin-bottom:20px;
}
.training-stat {
  padding:23px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  min-width:0;
}
.training-stat:first-child {
  background:#f1eee6;
  border-color:#e7e1d5;
}
.training-stat .metric-label {
  color:#766a58;
  font-size:12px;
}
.training-stat:last-child .metric-label {
  color:var(--muted);
}
.training-stat .stat-value {
  margin:13px 0 7px;
  font-size:25px;
  letter-spacing:-.03em;
  font-weight:550;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.stat-value .stat-unit {
  font-size:12px;
  font-weight:400;
  letter-spacing:0;
  color:var(--muted);
}
.chart-box {
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px 22px 13px;
  margin-bottom:26px;
}
.chart-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.chart-header h3 {
  font-size:13px;
  font-weight:550;
}
.chart-header p {
  font-size:11px;
  color:var(--muted);
}
.chart-svg {
  display:block;
  width:100%;
  height:auto;
  overflow:visible;
  margin-top:18px;
}
.chart-svg text {
  font-family:inherit;
  font-size:11px;
  fill:#6c7a70;
}
.chart-description {
  font-size:11px;
  color:var(--muted);
  margin:9px 0 3px;
  line-height:1.7;
}
.fitness-layout .record-table th,.fitness-layout .record-table td {
  padding-left:18px;
  padding-right:18px;
}
.workout-metric {
  font-variant-numeric:tabular-nums;
  white-space:normal;
  overflow-wrap:anywhere;
}
.workout-metric small {
  font-size:11px;
  color:var(--muted);
  margin-left:5px;
}
.exercise-empty {
  font-size:12px;
  color:var(--muted);
  line-height:1.9;
  padding:8px 0;
}
.table-more {
  padding:14px;
  text-align:center;
  border-top:1px solid var(--line);
}
footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-end;
  border-top:1px solid var(--line);
  margin-top:48px;
  padding:22px 0 28px;
  color:var(--muted);
  font-size:11px;
  line-height:1.9;
}
footer>p:first-child {
  font-size:11px;
}
footer span {
  display:block;
}
#version-label {
  text-align:right;
  white-space:nowrap;
}
#version-label span {
  display:inline;
  margin:0 4px;
}
.skip-link {
  position:absolute;
  left:12px;
  top:8px;
  transform:translateY(-160%);
  padding:12px;
  background:var(--green);
  color:#fff;
  z-index:10;
  border-radius:8px;
}
.skip-link:focus {
  transform:translateY(0);
}
.noscript {
  margin:30px;
  text-align:center;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
@media(min-width:1400px) {
  .shell {
    max-width:1250px;
  }
  .page-heading {
    padding-top:52px;
  }
}
@media(max-width:900px) {
  .shell {
    padding:0 25px;
  }
  .money-overview {
    grid-template-columns:1fr 1fr;
    gap:16px;
  }
  .balance-card {
    padding:25px;
    min-height:213px;
  }
  .flow-summary article {
    padding:0 18px;
  }
  .fitness-layout {
    grid-template-columns:195px minmax(0,1fr);
    gap:20px;
  }
  .exercise-sidebar {
    padding-right:18px;
  }
  .training-stat {
    padding:18px;
  }
  .training-stat .stat-value {
    font-size:23px;
  }
}
@media(max-width:700px) {
  .shell {
    padding:0 20px;
  }
  .topbar {
    padding:20px 0;
  }
  .brand {
    font-size:17px;
    gap:10px;
  }
  .brand-icon {
    width:38px;
    height:38px;
    font-size:31px;
    border-radius:11px;
  }
  .brand small {
    font-size:11px;
  }
  .topbar-actions {
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .topbar .button {
    font-size:11px;
    padding:8px 10px;
  }
  .public-label {
    font-size:11px;
  }
  .page-heading {
    padding:32px 0 24px;
  }
  h1 {
    font-size:25px;
  }
  .page-heading .button {
    padding:8px 10px;
    font-size:12px;
  }
  .eyebrow {
    font-size:11px;
  }
  .workspace-toolbar {
    align-items:flex-start;
    flex-direction:column;
    gap:12px;
    margin-bottom:18px;
  }
  .tabs {
    width:100%;
  }
  .tab {
    flex:1;
    min-width:0;
  }
  .sync-status {
    text-align:left;
    font-size:11px;
  }
  .money-overview {
    grid-template-columns:1fr;
    gap:14px;
  }
  .balance-card {
    min-height:210px;
    padding:25px 27px;
  }
  .balance-value {
    font-size:42px;
  }
  .flow-summary {
    padding:20px 0;
    border-radius:15px;
  }
  .flow-summary article {
    padding:0 25px;
  }
  .summary-value {
    font-size:26px;
    margin:13px 0 5px;
  }
  .record-section {
    margin-top:28px;
  }
  .section-title p {
    display:none;
  }
  .record-table th {
    padding:13px 14px;
  }
  .record-table td {
    padding:17px 14px;
  }
  .record-table .date-column {
    width:28%;
  }
  .record-table .amount-column {
    width:31%;
  }
  .note-cell {
    gap:7px;
  }
  .record-table .direction {
    display:none;
  }
  .record-table .amount {
    font-size:12px;
  }
  .date-cell {
    font-size:11px;
  }
  .date-cell small {
    font-size:11px;
  }
  .fitness-layout {
    grid-template-columns:1fr;
    gap:24px;
  }
  .exercise-sidebar {
    border-right:0;
    padding:0;
  }
  .exercise-list {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .exercise-button {
    padding:13px;
    font-size:13px;
  }
  .exercise-button[aria-pressed=true]:after {
    top:11px;
  }
  .exercise-last {
    font-size:11px;
  }
  .archive-toggle {
    margin-top:-7px;
    margin-bottom:10px;
  }
  .detail-heading h2 {
    font-size:22px;
  }
  .training-stats {
    gap:12px;
  }
  .training-stat {
    padding:19px;
  }
  .training-stat .stat-value {
    font-size:24px;
  }
  .chart-box {
    padding:19px 17px 13px;
  }
  .fitness-layout .record-table th,.fitness-layout .record-table td {
    padding:14px;
  }
  .custom-dates {
    flex-basis:100%;
    order:2;
  }
  .filter-bar>.text-button {
    padding:8px 7px;
  }
  .filter-bar>label {
    font-size:11px;
  }
  footer {
    margin-top:36px;
    padding-top:20px;
    align-items:flex-start;
    flex-direction:column;
    gap:9px;
  }
  #version-label {
    text-align:left;
  }
}
@media(max-width:380px) {
  .brand small {
    display:none;
  }
  .shell {
    padding:0 14px;
  }
  .public-label {
    display:none;
  }
  .brand small {
    font-size:11px;
  }
  .page-heading {
    gap:10px;
  }
  h1 {
    font-size:22px;
  }
  .eyebrow {
    font-size:11px;
  }
  .balance-value {
    font-size:36px;
  }
  .flow-summary article {
    padding:0 20px;
  }
  .summary-value {
    font-size:23px;
  }
  .training-stat {
    padding:16px;
  }
  .training-stat .stat-value {
    font-size:21px;
  }
  .record-table td,.record-table th {
    padding-left:10px;
    padding-right:10px;
  }
  .record-table .date-column {
    width:29%;
  }
  .record-table .amount-column {
    width:34%;
  }
  input[type=date] {
    width:134px;
  }
  .chart-header p {
    font-size:11px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}
@media print {
  body {
    background:#fff;
  }
  .shell {
    max-width:none;
    padding:0;
  }
  .topbar-actions,.page-heading>.button,.filter-bar button,.tabs,.archive-toggle,.exercise-sidebar {
    display:none;
  }
  .fitness-layout {
    display:block;
  }
  .record-table tr {
    break-inside:avoid;
  }
  .money-overview {
    break-inside:avoid;
  }
  .balance-card {
    background:#fff;
    color:#243b34;
    border:1px solid #ddd;
  }
  .balance-card .metric-label,.balance-caption {
    color:#243b34;
  }
  .balance-decoration {
    display:none;
  }
  footer {
    margin-top:20px;
  }
  .skip-link {
    display:none;
  }
}
/* Account access uses the same quiet surfaces as the record dashboard. */
.auth-panel { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,420px); gap:72px; align-items:center; padding:64px 0 28px; min-height:540px; }
.auth-intro h1 { max-width:430px; font-size:34px; line-height:1.45; }
.auth-intro > p:last-child { margin-top:18px; max-width:350px; color:var(--muted); font-size:14px; line-height:1.9; }
.auth-card { padding:28px; border:1px solid var(--line); border-radius:18px; background:#fff; min-width:0; }
.auth-mode { display:flex; padding:4px; background:#edf1e9; border-radius:10px; margin-bottom:24px; }
.auth-mode .button { flex:1; background:transparent; color:var(--muted); }
.auth-mode .selected { background:#fff; color:var(--green); box-shadow:0 1px 3px #1b483c0a; }
.auth-card label, .legacy-panel form > label { display:block; font-size:13px; font-weight:550; margin:17px 0 7px; }
.auth-card input, #claim-code { display:block; width:100%; min-width:0; padding:11px 12px; border:1px solid #d6dfd2; border-radius:8px; background:#fcfdfb; color:var(--green); font-size:16px; }
.field-hint { color:var(--muted); font-size:11px; line-height:1.7; margin-top:7px; }
.auth-message { font-size:12px; color:var(--muted); line-height:1.7; margin-top:18px; }
.auth-error { font-size:12px; color:#a54830; line-height:1.7; margin-top:12px; }
.button.primary { background:var(--green); color:white; }
.button.primary:hover { background:#2a594b; }
#auth-submit, #logout-retry { width:100%; margin-top:18px; }
.account-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 0; border-bottom:1px solid var(--line); font-size:12px; }
.account-bar strong { margin-left:8px; font-weight:600; overflow-wrap:anywhere; }
.account-bar span { color:var(--muted); margin-left:14px; font-size:11px; }
.legacy-panel { margin:20px 0 0; border:1px solid var(--line); border-radius:12px; padding:16px 18px; background:#fff; font-size:12px; }
.legacy-panel summary { cursor:pointer; min-height:24px; color:var(--green); font-weight:550; }
.legacy-panel > p { margin-top:13px; color:var(--muted); line-height:1.8; }
.legacy-panel form { max-width:480px; }
.legacy-panel .claim-confirm { display:flex; align-items:center; gap:8px; min-height:44px; font-weight:400; }
.claim-confirm input { min-height:0; width:17px; height:17px; accent-color:var(--green); margin:0; }
#claim-message { margin-top:10px; color:var(--muted); line-height:1.8; }
@media(max-width:800px) { .auth-panel { gap:35px; grid-template-columns:1fr 1fr; } .auth-intro h1 { font-size:28px; } .auth-card { padding:23px; } }
@media(max-width:620px) { .auth-panel { grid-template-columns:1fr; gap:25px; padding:32px 0 5px; } .auth-intro h1 { font-size:25px; } .auth-intro > p:last-child { margin-top:11px; font-size:12px; } .auth-card { padding:22px; } .account-bar p { min-width:0; } .account-bar span { display:block; margin-left:0; margin-top:4px; } .account-bar strong { word-break:break-all; } .legacy-panel { padding:15px; } }
@media print { #auth-panel, .account-bar, .legacy-panel { display:none; } }
