:root {
  --bg: var(--tg-theme-bg-color, #f4f6f8);
  --text: var(--tg-theme-text-color, #111827);
  --hint: var(--tg-theme-hint-color, #6b7280);
  --button: var(--tg-theme-button-color, #2481cc);
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  --card: var(--tg-theme-secondary-bg-color, #ffffff);
  --border: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.eyebrow {
  color: var(--hint);
  font-size: 13px;
  margin-bottom: 6px;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.content {
  display: grid;
  gap: 12px;
}

.muted {
  color: var(--hint);
  font-size: 14px;
  line-height: 1.45;
}

.button,
button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--button);
  color: var(--button-text);
  font-size: 16px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: rgba(127, 127, 127, 0.12);
  color: var(--text);
}

.button.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 18px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(127, 127, 127, 0.06);
}

.badge {
  color: var(--hint);
  font-size: 13px;
}

.codebox {
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.1);
  font-size: 12px;
  color: var(--hint);
}

.plan-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(127, 127, 127, 0.06);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}
