:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --border: #22304d;
  --text: #e6edf7;
  --text-dim: #8a98b3;
  --cyan: #22c3e6;
  --red: #ef4a5f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: 0.04em; }
.logo .shark { color: var(--cyan); }
.sub { color: var(--text-dim); font-size: 13px; margin: 6px 0 20px; }
label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
input {
  width: 100%;
  padding: 12px;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
button {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--cyan);
  color: #04121a;
  cursor: pointer;
}
button:disabled { opacity: 0.6; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 12px; }

/* ---- sign-up, sign-in steps, account page ---- */
:root { --green: #1fbf8f; --amber: #f0b429; }
.gap { margin-top: 12px; }
.hint { color: var(--text-dim); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.alt { text-align: center; font-size: 13px; color: var(--text-dim); margin: 14px 0 0; }
a { color: var(--cyan); }
.login-card.wide { max-width: 440px; }
.section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 13px; cursor: pointer; }
label.inline input { width: auto; }
.ok-msg { color: var(--text); font-size: 14px; line-height: 1.5; }
.btn-link { display: block; text-align: center; margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--cyan); color: #04121a; font-weight: 700; text-decoration: none; }
.btn-link.small, button.small { display: inline-block; width: auto; margin: 0; padding: 8px 12px; font-size: 13px; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.danger { color: var(--red); border-color: rgba(239,74,95,0.5); }
.dim { color: var(--text-dim); }
body.page { display: block; padding: 16px; }
.acct { max-width: 640px; margin: 0 auto; }
.acct-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.acct-actions { display: flex; gap: 8px; align-items: center; }
.acct h1 { font-size: 20px; margin: 12px 0 10px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-top: 14px; }
.card h2 { font-size: 15px; margin: 0 0 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.row button { width: auto; margin: 0; padding: 12px 16px; }
details > summary { cursor: pointer; color: var(--cyan); font-size: 13px; font-weight: 700; }
details[open] > summary { margin-bottom: 4px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.item.active { border-color: var(--cyan); }
.item small { display: block; color: var(--text-dim); font-size: 12px; margin-top: 3px; }
.item-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.badge { padding: 4px 10px; border-radius: 999px; background: rgba(34,195,230,0.15); color: var(--cyan); font-size: 12px; font-weight: 800; }
.msg { font-size: 13px; min-height: 18px; margin-top: 10px; }
.msg.ok { color: var(--green); }
.msg.bad { color: var(--red); }
.note { background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.4); color: var(--text); border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.5; }
.st-pending { color: var(--amber); font-weight: 700; }
.st-active { color: var(--green); font-weight: 700; }
.st-rejected { color: var(--red); font-weight: 700; }
@media (max-width: 520px) {
  .item { flex-direction: column; align-items: flex-start; }
}
[hidden] { display: none !important; }

/* ---- welcome, steps, guides, agreement ---- */
.logo.big { font-size: 28px; }
.welcome .sub { font-size: 14px; line-height: 1.55; margin-bottom: 18px; }
.choices { display: grid; gap: 10px; }
.choice { display: block; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-decoration: none; }
.choice b { display: block; font-size: 17px; }
.choice span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-dim); }
.choice.primary { background: var(--cyan); border-color: var(--cyan); }
.choice.primary b, .choice.primary span { color: #04121a; }
.choice:hover { border-color: var(--cyan); }
.howto { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.howto-h { font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.howto ol, .howto-steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.6; color: var(--text); }
.howto-steps li { margin: 6px 0; }
.back { display: inline-block; margin-bottom: 10px; color: var(--text-dim); font-size: 13px; text-decoration: none; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 16px; counter-reset: st; }
.steps li { flex: 1; counter-increment: st; font-size: 11px; color: var(--text-dim); text-align: center; padding-top: 30px; position: relative; }
.steps li::before { content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; line-height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); font-weight: 800; color: var(--text-dim); }
.steps li.on { color: var(--text); font-weight: 700; }
.steps li.on::before { border-color: var(--cyan); color: var(--cyan); }
.steps li.done::before { content: "✓"; background: var(--cyan); border-color: var(--cyan); color: #04121a; }
.guide { background: rgba(34,195,230,0.08); border: 1px solid rgba(34,195,230,0.35); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.guide > b { display: block; font-size: 14px; margin-bottom: 4px; }
.guide p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); }
form button.ghost { margin-top: 8px; }
code { font-family: Consolas, monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.copy-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.agreement { max-height: 420px; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-size: 13px; line-height: 1.6; }
.agreement h2, .agreement-page h2 { font-size: 16px; margin: 0 0 6px; }
.agreement h3, .agreement-page h3 { font-size: 14px; margin: 16px 0 6px; color: var(--cyan); }
.agreement ul, .agreement-page ul { padding-left: 20px; margin: 6px 0; }
.agreement li, .agreement-page li { margin: 4px 0; }
.ag-meta { color: var(--text-dim); font-size: 12px; }
.agreement-page { font-size: 14px; line-height: 1.65; }