:root {
  --blue: #3B82F6;
  --blue-dark: #1D4ED8;
  --red: #DC2626;
  --bg: #0F172A;
  --card: #1E293B;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #334155;
  --success: #22C55E;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

/* Header */
.header {
  padding: 16px 0 20px;
  text-align: center;
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.logo {
  max-height: 48px;
  width: auto;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Cards & steps */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.step.hidden {
  display: none;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Inputs */
.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0F172A;
  color: var(--text);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: var(--blue);
}

.input::placeholder {
  color: #64748B;
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 10px;
}

.btn.choice {
  background: #0F172A;
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 10px;
}

.btn.choice:hover,
.btn.choice.active {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
}

.btn.choice small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-group.vertical .btn {
  margin-bottom: 0;
}

/* Volume grid */
.grid-volume {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.grid-volume .btn {
  padding: 12px 6px;
  font-size: 0.9rem;
}

/* Result */
#result-content {
  font-size: 0.92rem;
}

.result-block {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.result-block:last-child {
  border-bottom: none;
}

.result-title {
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  gap: 12px;
}

.result-row span:last-child {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.total-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
}

.total-row span:last-child {
  color: var(--success);
}

.result-actions {
  margin-top: 20px;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 28px;
  padding-bottom: 20px;
}

.group-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.btn-order-footer {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer a {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer a:hover {
  text-decoration: underline;
}

/* Telegram safe area */
body {
  padding-bottom: env(safe-area-inset-bottom);
}


.field-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 13px;
  color: #94a3b8;
}
.btn.secondary {
  background: transparent;
  border: 1px solid #334155;
  color: #e2e8f0;
  text-align: center;
  text-decoration: none;
}
.btn.secondary:active { background: #1e293b; }
.btn.small { padding: 10px 8px; font-size: 13px; }
.logo {
  background: transparent !important;
  object-fit: contain;
}
.logo-area {
  background: transparent;
}
