:root {
      font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --bg: #f5f6f8;
      --panel: #ffffff;
      --text: #17191c;
      --muted: #6b7280;
      --line: #e5e7eb;
      --accent: #2563eb;
      --mine: #dbeafe;
      --other: #f3f4f6;
      --danger: #b91c1c;
      --ok: #15803d;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: #0e1013;
        --panel: #16191e;
        --text: #f3f4f6;
        --muted: #9ca3af;
        --line: #30343b;
        --accent: #60a5fa;
        --mine: #17345f;
        --other: #252a31;
        --danger: #f87171;
        --ok: #4ade80;
      }
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
    }
    main {
      width: min(900px, 100%);
      margin: 0 auto;
      padding: 18px;
    }
    h1 { margin: 0 0 6px; font-size: 22px; }
    .sub {
      color: var(--muted);
      font-size: 13px;
      margin-bottom: 16px;
      line-height: 1.55;
    }
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 16px;
      margin-bottom: 14px;
    }
    .grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    @media (max-width: 640px) {
      .grid { grid-template-columns: 1fr; }
    }
    label {
      display: block;
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 5px;
    }
    input, button {
      width: 100%;
      min-height: 42px;
      border-radius: 9px;
      border: 1px solid var(--line);
      font: inherit;
    }
    input {
      padding: 9px 11px;
      background: var(--panel);
      color: var(--text);
    }
    button {
      cursor: pointer;
      padding: 9px 12px;
      background: var(--panel);
      color: var(--text);
      font-weight: 650;
    }
    button.primary {
      background: var(--accent);
      color: white;
      border-color: transparent;
    }
    button:disabled { opacity: .5; cursor: default; }
    .actions {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }
    @media (max-width: 640px) {
      .actions { grid-template-columns: 1fr; }
    }
    .checkrow {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-top: 11px;
      font-size: 13px;
      color: var(--muted);
    }
    .checkrow label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin: 0;
    }
    .checkrow input {
      width: auto;
      min-height: auto;
    }
    .status-line {
      margin-top: 10px;
      font-size: 13px;
      color: var(--muted);
      min-height: 20px;
    }
    .status-line:empty {
      display: none;
    }
    .status-line.ok { color: var(--ok); }
    .status-line.error { color: var(--danger); }
