:root {
  --bg: var(--tg-theme-bg-color, #f4f5f7);
  --card: var(--tg-theme-secondary-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #15171a);
  --muted: var(--tg-theme-hint-color, #6b7280);
  --accent: var(--tg-theme-button-color, #1c69d4);
  --ok: #16a34a;
  --warn: #dc2626;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--tg-theme-bg-color, #0f1115);
    --card: var(--tg-theme-secondary-bg-color, #191c22);
    --text: var(--tg-theme-text-color, #e7e9ee);
    --muted: var(--tg-theme-hint-color, #9aa1ad);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px 32px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
.card { background: var(--card); border-radius: 16px; padding: 16px; margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.hidden { display: none; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.bar { height: 12px; background: rgba(127,127,127,.18); border-radius: 999px; overflow: hidden; margin: 12px 0; }
.bar > div { height: 100%; background: var(--accent); border-radius: 999px; }
.bar.thin { height: 6px; margin: 4px 0 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.grid3 > div { display: flex; flex-direction: column; }
.grid3 b { font-size: 16px; }
.label { font-size: 12px; color: var(--muted); }
.list, .bars { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,.15); }
.list li.row { flex-direction: row; }
.list li:last-child { border-bottom: 0; }
.bars li { padding: 6px 0; }
.ok { color: var(--ok); }
.warn { color: var(--warn); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid rgba(127,127,127,.15); }
th { font-weight: 500; color: var(--muted); font-size: 12px; }
@media (max-width: 380px) { .grid3 { grid-template-columns: 1fr 1fr; } }
