:root {
  --bg: #0b0f17;
  --card: #141b27;
  --card2: #1c2535;
  --track: #222c3d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f6fb;
  --muted: #98a4bb;
  --lime: #c8ff3e;
  --ink: #0b0f17;
  --danger: #ff8a8a;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", Inter, system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100dvh; display: flex; justify-content: center; }
#app { width: 100%; max-width: 480px; min-height: 100dvh; position: relative; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
button { font-family: inherit; }

/* Screens */
.screen { min-height: 100dvh; padding: calc(24px + env(safe-area-inset-top)) 16px 24px; }
.screen-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.app { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

/* Type */
.display { margin: 0; font-family: var(--font-head); font-size: 40px; font-weight: 700; color: var(--lime); letter-spacing: -0.02em; }
.title { margin: 0; font-family: var(--font-head); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.lead { margin: 0; max-width: 300px; color: var(--muted); line-height: 1.5; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--lime); letter-spacing: 0.06em; text-transform: uppercase; }
.muted { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.meta { font-size: 13px; color: var(--muted); }
.fine { margin: 8px 0 0; max-width: 300px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.error { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--danger); max-width: 320px; }

/* Cards and forms */
.card { margin-top: 12px; padding: 18px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.card-title { margin: 0; font-size: 18px; font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--card2); color: var(--text);
  font-family: inherit; font-size: 16px; font-weight: 500;
}

/* Buttons */
.btn {
  height: 52px; padding: 0 24px; border: 0; border-radius: 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-light { background: #ffffff; color: #1a1a1a; margin-top: 8px; }
.btn-ghost { background: var(--card2); color: var(--text); }
.btn-link { margin-top: 16px; padding: 10px; background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.g-badge { width: 24px; height: 24px; border-radius: 50%; background: #4285f4; color: #fff; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }

/* Avatars and colour swatches */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--ink); background: var(--lime);
}
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.avatar-btn { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch[aria-checked="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.preview { display: flex; align-items: center; gap: 14px; }
.preview-name { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 12px; }
.topbar-text { min-width: 0; }
.topbar-text .title { overflow-wrap: anywhere; }

/* Checklist */
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.steps li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--track);
}
.steps li.done::before { background: var(--lime); border-color: var(--lime); }
.steps li.todo { color: var(--muted); }

/* Bottom navigation */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 452px);
  display: flex; gap: 4px; padding: 8px; border-radius: 30px;
  background: var(--card); border: 1px solid var(--line);
}
.nav-item {
  flex: 1; height: 56px; border: 0; border-radius: 24px; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer;
}
.nav-item.is-active { background: rgba(200, 255, 62, 0.14); color: var(--lime); font-weight: 700; }

/* Bottom sheet */
dialog.sheet {
  margin: auto auto 0 auto; padding: 0; border: 0;
  width: 100%; max-width: 480px; max-height: 92dvh;
  background: transparent; color: var(--text); overflow: visible;
}
dialog.sheet::backdrop { background: rgba(5, 8, 13, 0.72); }
.sheet-body {
  display: flex; flex-direction: column; gap: 16px;
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0; background: var(--card); border-top: 1px solid var(--line);
  max-height: 92dvh; overflow-y: auto;
}
.sheet-body .btn-link { align-self: center; margin-top: 0; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: #3a465c; align-self: center; }
.sheet-title { margin: 0; font-family: var(--font-head); font-size: 22px; font-weight: 700; }
