:root {
  color-scheme: light;
  --background: #f2f7fb;
  --card: #fff;
  --ink: #172230;
  --muted: #536579;
  --blue: #176eb8;
  --blue-hover: #115d9f;
  --line: #d8e5ef;
  font: 16px / 1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--background);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0 16px;
}

main {
  display: grid;
  justify-items: center;
  padding: clamp(52px, 15vh, 124px) 0 24px;
}

.profile {
  width: min(100%, 372px);
  padding: 32px 16px 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  text-align: center;
}

.avatar {
  display: block;
  width: min(124px, 100%);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--background);
}

h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; }
.handle { margin: 4px 0 22px; color: var(--muted); overflow-wrap: anywhere; }

.start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .045em;
  text-decoration: none;
}

.start:hover { background: var(--blue-hover); }
:where(a, button, summary):focus-visible { outline: 2px solid #074b84; outline-offset: 3px; }

footer {
  width: min(100%, 372px);
  margin: auto auto 0;
  padding: 4px 0 max(12px, env(safe-area-inset-bottom));
  text-align: center;
}

.preferences {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-align: left;
}

.preferences h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.25; }
.preferences p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.choices { display: flex; gap: 8px; }

button {
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}

.choices button {
  flex: 1;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--background);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.choices button:hover { border-color: var(--blue); }
summary, .settings { color: var(--muted); font-size: 13px; cursor: pointer; }
summary { padding: 12px 0; }
.preferences details p:last-child { margin-bottom: 0; }
.preferences a { color: var(--blue); }
.settings { padding: 0 8px; border: 0; background: transparent; }
.settings:hover { text-decoration: underline; }

@media (max-height: 580px) {
  main { padding-top: 32px; }
}
