:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #1a1a19;
  --muted: #6b6b66;
  --border: #e2e2dd;
  --input: #ffffff;
  --accent: #1a1a19;
  --accent-text: #ffffff;
  --focus: #3b82f6;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success: #067647;
  --success-bg: #ecfdf3;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --surface: #1b1b1a;
    --text: #ededea;
    --muted: #9b9b95;
    --border: #2e2e2c;
    --input: #141413;
    --accent: #ededea;
    --accent-text: #111110;
    --danger: #f97066;
    --danger-bg: #2a1614;
    --success: #47cd89;
    --success-bg: #0f2419;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font:
    15px / 1.5 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.card {
  width: 100%;
  max-width: 400px;
  margin: auto 0 0;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.card.wide {
  max-width: 560px;
}

@media (min-width: 480px) {
  body {
    padding: 32px 16px;
  }
  .card {
    padding: 36px 32px;
  }
}

footer {
  margin: 20px 0 auto;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

p {
  margin: 0;
}

a {
  color: inherit;
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
  margin-top: 20px;
}

.heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  text-align: center;
}

.app-icon,
.avatar {
  flex: none;
  border-radius: 12px;
  object-fit: cover;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 22px;
}

.avatar.mark {
  width: 56px;
  height: 56px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

label small {
  font-weight: 400;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

input:disabled {
  opacity: 0.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.button.secondary {
  width: 100%;
}

.button.danger {
  color: var(--danger);
  margin-top: 14px;
}

.button.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 4px;
}

.alert[data-kind="success"] {
  background: var(--success-bg);
  color: var(--success);
}

.alert[hidden] {
  display: none;
}

.heading + .alert {
  margin-bottom: 16px;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.account-head > div {
  flex: 1;
  min-width: 0;
}

.account-head p {
  overflow-wrap: anywhere;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: 0;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
