:root {
  color-scheme: light dark;
  --background: #f7f6f2;
  --paper: #fffefa;
  --ink: #303e45;
  --muted: #586761;
  --line: #e8e9df;
  --accent: #476e82;
  --accent-hover: #395e72;
  --on-accent: #fff;
  --leaf: #71836c;
  --emblem: #e8eff0;
  --status: #805334;
  --shadow: #303e4510;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--background);
  color: var(--ink);
}

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

body {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
           max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 27%, var(--emblem), transparent 58%);
}

.entry { width: min(100%, 400px); margin: 0 auto; text-align: center; }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 23px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .13em;
}

.brand svg { width: 29px; height: 29px; color: var(--leaf); }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.card {
  padding: clamp(24px, 7vw, 38px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 14px 40px var(--shadow);
}

.emblem {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border-radius: 23px;
  background: var(--emblem);
  color: var(--accent);
}

.emblem svg { width: 43px; height: 43px; }
h1 { margin: 0; font-size: clamp(21px, 6vw, 26px); font-weight: 650; line-height: 1.4; }
.hint { margin: 7px 0 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.actions { display: grid; gap: 6px; }

button {
  padding: 10px 12px;
  min-height: 45px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .55; cursor: default; }
.primary { min-height: 50px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: transparent; color: var(--accent); }
.secondary:hover:not(:disabled) { background: var(--emblem); }
.status { margin: 8px 0 0; color: var(--status); font-size: 13px; line-height: 1.6; }
footer { margin-top: 20px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }

@media (prefers-color-scheme: dark) {
  :root {
    --background: #182226;
    --paper: #202c32;
    --ink: #ebf0ec;
    --muted: #b1c1bb;
    --line: #35464c;
    --accent: #adcddc;
    --accent-hover: #c6dfe9;
    --on-accent: #20343e;
    --leaf: #a3c5ab;
    --emblem: #2c3d44;
    --status: #f0c49d;
    --shadow: #070d1550;
  }
}
