:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --section: var(--tg-theme-section-bg-color, #f4f4f5);
  --text: var(--tg-theme-text-color, #111827);
  --hint: var(--tg-theme-hint-color, #6b7280);
  --accent: var(--tg-theme-accent-text-color, #2563eb);
  --button: var(--tg-theme-button-color, #2563eb);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  padding: 16px 16px calc(24px + var(--tg-safe-area-inset-bottom, 0px));
}

main { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.t-title {
  font-family: inherit; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: 0;
}
.t-value {
  font-family: inherit; font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: 0;
}
.t-text {
  font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1.4; letter-spacing: 0;
}
.t-caption {
  font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0;
  color: var(--hint);
}

.section {
  background: var(--section);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.progress {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--hint) 25%, transparent);
  overflow: hidden;
}
.progress > div { height: 100%; background: var(--accent); border-radius: 3px; }

.history-row { padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--hint) 20%, transparent); }
.history-row:first-of-type { border-top: none; }

button.more {
  appearance: none; border: none; border-radius: 10px;
  background: var(--button); color: var(--button-text);
  padding: 12px; width: 100%; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: 0;
}
button.more:disabled { opacity: 0.5; cursor: default; }

.error { text-align: center; padding: 32px 0; }
