:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --card: var(--tg-theme-secondary-bg-color, #f2f5f1);
  --text: var(--tg-theme-text-color, #1d2a22);
  --muted: var(--tg-theme-hint-color, #66736b);
  --accent: #2f7d4f;
  --accent-text: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 8px; }
h2 { font-size: 19px; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, video:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted, .wait { color: var(--muted); }
.wait { text-align: center; padding-top: 35vh; }
progress { width: 100%; height: 10px; accent-color: var(--accent); margin: 4px 0 16px; }
.main-button { display: block; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--accent-text); font-weight: 600; margin: 12px 0; }
.second-button { background: var(--card); color: var(--text); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; margin: 0 0 8px;
  border: 0; border-radius: 14px; background: var(--card); text-align: left; }
.row .name { flex: 1; overflow-wrap: anywhere; }
.row .time { color: var(--muted); font-size: 15px; white-space: nowrap; }
.mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center;
  font-size: 16px; line-height: 1; }
.mark.done { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
video { display: block; width: 100%; max-height: 75vh; background: #000; border-radius: 14px; margin: 12px 0 16px; }
.text { white-space: pre-line; overflow-wrap: anywhere; }
.closed { padding-top: 18vh; text-align: center; }
