:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--tg-theme-bg-color, #f5f7fa);
  color: var(--tg-theme-text-color, #17212b);
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 520px; min-height: 100vh; margin: auto; padding: calc(28px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); }
.eyebrow { color: var(--tg-theme-link-color, #2481cc); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
h1 { font-size: 30px; line-height: 1.12; margin: 12px 0; }
h2 { font-size: 23px; margin: 10px 0; }
p { line-height: 1.5; color: var(--tg-theme-hint-color, #64707d); }
header { margin-bottom: 34px; }
form, section { background: var(--tg-theme-secondary-bg-color, #fff); border-radius: 20px; padding: 22px; box-shadow: 0 8px 30px #17212b0d; }
label { display: block; margin: 0 0 9px; font-weight: 650; }
input[type=text] { display: block; width: 100%; margin-bottom: 24px; padding: 14px 16px; font: inherit; color: inherit; background: var(--tg-theme-bg-color, #f5f7fa); border: 1px solid #8e9ba44d; border-radius: 12px; }
input[type=file] { width: 100%; font: inherit; font-size: 14px; }
.avatar-row { display: flex; align-items: center; gap: 16px; min-height: 70px; }
#preview { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.hint { margin: 8px 0 25px; font-size: 13px; }
button { width: 100%; border: 0; border-radius: 12px; padding: 15px 18px; background: var(--tg-theme-button-color, #2481cc); color: var(--tg-theme-button-text-color, #fff); font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button.secondary { margin-top: 12px; background: transparent; color: var(--tg-theme-link-color, #2481cc); }
.status { color: var(--tg-theme-link-color, #2481cc); font-size: 13px; font-weight: 700; }
#error { margin-top: 16px; color: #c43e3e; }
