:root {
  color-scheme: light dark;
  --background: #f6f2ea;
  --surface: #ffffff;
  --foreground: #1d1612;
  --muted: rgba(29, 22, 18, 0.7);
  --border: rgba(29, 22, 18, 0.12);
  --primary: #8a5f24;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1d1612;
    --surface: #33261f;
    --foreground: #f6f2ea;
    --muted: rgba(246, 242, 234, 0.74);
    --border: rgba(246, 242, 234, 0.14);
    --primary: #c89f67;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  width: 100%;
  max-width: 420px;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-weight: 600;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.35;
}

p {
  margin: 0 0 20px;
  color: var(--muted);
}

a.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
  font-weight: 600;
  text-underline-offset: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  font-size: 0.875rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-underline-offset: 4px;
}

h1:focus:not(:focus-visible) {
  outline: none;
}
