:root {
  --bg: var(--tg-theme-bg-color, #f4f6f8);
  --text: var(--tg-theme-text-color, #1a1a1a);
  --btn: var(--tg-theme-button-color, #2563eb);
  --btn-text: var(--tg-theme-button-text-color, #fff);
  --hint: var(--tg-theme-hint-color, #6b7280);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header { margin-bottom: 20px; }

.badge {
  font-size: 14px;
  color: var(--hint);
  margin: 0 0 8px;
}

h1 { margin: 0 0 8px; font-size: 28px; }

.steps { margin: 0; font-size: 16px; color: var(--hint); }

.progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.progress > div {
  height: 100%;
  width: 33%;
  background: var(--btn);
  transition: width 0.2s;
}

.panel { display: none; flex: 1; }
.panel.active { display: block; }

.panel h2 { margin: 0 0 8px; font-size: 22px; }

.panel p { margin: 0 0 16px; color: var(--hint); }

.upload {
  display: block;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  background: #fff;
}

.upload input { display: none; }

.upload span { font-size: 17px; line-height: 1.4; }

.upload.has-file {
  border-color: var(--btn);
  background: #eff6ff;
}

#litersInput {
  width: 100%;
  font-size: 28px;
  padding: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  text-align: center;
}

.hint { font-size: 15px; margin-top: 8px !important; }

.error {
  color: #dc2626;
  font-size: 16px;
  min-height: 24px;
  margin: 8px 0;
}

footer {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.btn {
  flex: 1;
  font-size: 18px;
  padding: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--btn);
  color: var(--btn-text);
}

.btn.secondary {
  background: #e5e7eb;
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
