:root {
      --bg: #e8e4dc;
      --surface: #f7f5f0;
      --ink: #14120f;
      --muted: #6a655c;
      --line: #d4cec2;
      --accent: #1a4d3e;
      --accent-hover: #143d32;
      --accent-fg: #f4f1ea;
      --radius: 12px;
      --tap: 2.65rem;
      --safe-b: env(safe-area-inset-bottom, 0px);
      --safe-t: env(safe-area-inset-top, 0px);
    }
    html[data-theme="dark"] {
      --bg: #0c0d0f;
      --surface: #16181c;
      --ink: #ece8e1;
      --muted: #9a958c;
      --line: #2a2d33;
      --accent: #3d9b7a;
      --accent-hover: #4aaf8b;
      --accent-fg: #0c0d0f;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      min-height: 100dvh;
      font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--ink);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: calc(1.25rem + var(--safe-t)) 1.1rem calc(1.25rem + var(--safe-b));
      letter-spacing: -0.01em;
    }
    .box {
      width: 100%;
      max-width: 22.5rem;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 1.5rem 1.4rem 1.4rem;
    }
    .mark {
      width: 0.65rem;
      height: 0.65rem;
      border-radius: 2px;
      background: var(--accent);
      margin-bottom: 0.85rem;
    }
    h1 {
      margin: 0 0 0.25rem;
      font-size: 1.2rem;
      font-weight: 700;
      letter-spacing: -0.03em;
    }
    .sub {
      margin: 0 0 1.15rem;
      font-size: 0.88rem;
      color: var(--muted);
    }
    label {
      display: block;
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--muted);
      margin: 0.75rem 0 0.25rem;
    }
    input {
      width: 100%;
      min-height: var(--tap);
      padding: 0.55rem 0.75rem;
      border: 1px solid var(--line);
      background: var(--bg);
      color: var(--ink);
      font: inherit;
      font-size: 16px;
      border-radius: 8px;
      -webkit-appearance: none;
    }
    input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    }
    button {
      width: 100%;
      min-height: var(--tap);
      margin-top: 1.15rem;
      padding: 0.55rem;
      border: 1px solid var(--accent);
      background: var(--accent);
      color: var(--accent-fg);
      font: inherit;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      border-radius: 8px;
    }
    button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
    .flash {
      margin-bottom: 0.85rem;
      padding: 0.6rem 0.7rem;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 0.9rem;
      word-break: break-word;
      background: var(--bg);
    }
    .flash.error { font-weight: 600; color: #8b2e2e; border-color: #d4a5a5; }
    html[data-theme="dark"] .flash.error { color: #e07070; border-color: #5a3030; }
