:root {
  color-scheme: light dark;
  --bg: oklch(97% 0.018 246);
  --card: oklch(100% 0 0);
  --field: oklch(97.5% 0.012 250);
  --text: oklch(22% 0.045 258);
  --muted: oklch(50% 0.04 257);
  --line: oklch(88% 0.025 252);
  --brand: oklch(55% 0.22 258);
  --brand-strong: oklch(48% 0.24 260);
  --brand-soft: oklch(94% 0.035 255);
  --on-brand: oklch(99% 0 0);
  --danger: oklch(52% 0.22 28);
  --danger-soft: oklch(96% 0.03 28);
  --shadow: 0 18px 50px oklch(35% 0.07 255 / 12%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(18% 0.03 258); --card: oklch(22% 0.035 258); --field: oklch(26% 0.035 258);
    --text: oklch(95% 0.012 250); --muted: oklch(72% 0.03 255); --line: oklch(34% 0.04 258);
    --brand: oklch(68% 0.18 258); --brand-strong: oklch(74% 0.16 258); --brand-soft: oklch(30% 0.07 258);
    --on-brand: oklch(14% 0.03 258); --danger: oklch(72% 0.17 28); --danger-soft: oklch(28% 0.06 28);
    --shadow: 0 18px 50px oklch(5% 0.02 258 / 55%);
  }
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in oklch, var(--brand) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; color: var(--text); font-size: 17px; }
.brand:hover { text-decoration: none; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, oklch(62% 0.2 240), oklch(48% 0.24 262)); display: grid; place-items: center; }
.mark svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mobile-mark { display: none; }

main { flex: 1; display: grid; place-items: center; padding: 8px 20px 28px; }
.card { width: min(480px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 36px 36px 30px; }
h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
h2 { margin: 24px 0 8px; font-size: 14px; color: var(--muted); font-weight: 650; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

.btn { appearance: none; width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-size: 15.5px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.passkey { min-height: 54px; font-size: 16px; box-shadow: 0 8px 20px color-mix(in oklch, var(--brand) 32%, transparent); }
.btn.secondary { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.secondary:hover { background: var(--field); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.hint.center { text-align: center; }
.help { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; }
.help p { margin: 4px 0 0; color: var(--muted); }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin: 0 0 16px; background: var(--danger-soft); color: var(--danger); }
.notice.neutral { background: var(--field); color: var(--text); border: 1px solid var(--line); }
.notice strong { display: block; margin-bottom: 2px; }

.loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; color: var(--muted); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in oklch, currentColor 30%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); font-size: 14px; }
.list .meta { color: var(--muted); font-size: 12.5px; text-align: right; }
.list .tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--brand-soft); color: var(--brand); }
.actions { display: grid; gap: 10px; margin-top: 26px; }

footer { text-align: center; padding: 6px 20px max(22px, env(safe-area-inset-bottom)); font-size: 13px; }
footer nav { display: flex; gap: 18px; justify-content: center; }
footer a { color: var(--muted); }

@media (max-width: 760px) {
  .card { border: 0; box-shadow: none; background: transparent; padding: 8px 4px; }
  .top .brand { display: none; }
  .mobile-mark { display: grid; margin: 4px auto 14px; width: 64px; height: 64px; border-radius: 18px; }
  .mobile-mark svg { width: 34px; height: 34px; }
  h1 { font-size: 30px; text-align: center; }
  .sub { text-align: center; }
  .btn { min-height: 52px; border-radius: 999px; }
}
