:root {
  --bg: #f4f2ec; --card: #ffffff; --ink: #1d1f2e; --muted: #6b6d7c; --line: #e3e0d6;
  --accent: #2b2f6b; --accent-ink: #ffffff; --lamp: #c98a12; --ok: #1f7a4d; --err: #b3261e; --err-bg: #fdecea;
  --field: #faf9f5; --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 8px 24px rgba(20, 20, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11121c; --card: #1a1c2a; --ink: #ecebf3; --muted: #9a9cb0; --line: #2c2f45;
    --accent: #f2b84b; --accent-ink: #1a1c2a; --lamp: #f2b84b; --ok: #5fd39a; --err: #ff8a80; --err-bg: #3a1d1d;
    --field: #141623; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #11121c; --card: #1a1c2a; --ink: #ecebf3; --muted: #9a9cb0; --line: #2c2f45;
  --accent: #f2b84b; --accent-ink: #1a1c2a; --lamp: #f2b84b; --ok: #5fd39a; --err: #ff8a80; --err-bg: #3a1d1d;
  --field: #141623; --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Sukhumvit Set", "Thonburi", "Noto Sans Thai", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wrap {
  max-width: 520px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); margin: 4px 2px 16px; }
.brand img { border-radius: 7px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; box-shadow: var(--shadow); }
.card.center { text-align: center; }
.eyebrow { margin: 0; color: var(--lamp); font-weight: 600; font-size: 15px; }
h1 { font-size: 24px; line-height: 1.35; margin: 4px 0 14px; overflow-wrap: anywhere; }
.facts { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.facts div { display: contents; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; }
.lock { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin: 0 0 18px; }
.who { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; }
.lbl { display: block; font-weight: 600; margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 112px; resize: vertical; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--field); color: var(--ink);
  font: 16px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
textarea:focus, .drop:focus-within { outline: none; border-color: var(--accent); }
textarea.masked { -webkit-text-security: disc; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; }
.drop {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 120px; padding: 16px;
  border: 1.5px dashed var(--line); border-radius: 12px; background: var(--field); cursor: pointer; overflow-wrap: anywhere;
}
.drop.has { border-style: solid; border-color: var(--accent); font-weight: 600; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
}
.btn.primary { width: 100%; margin-top: 14px; background: var(--accent); color: var(--accent-ink); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { min-height: 44px; padding: 0 14px; background: transparent; color: var(--ink); border-color: var(--line); }
.err { color: var(--err); background: var(--err-bg); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
.muted { color: var(--muted); }
.big { font-size: 44px; line-height: 1; margin: 6px 0 8px; color: var(--muted); }
.big.ok { color: var(--ok); }
.foot { text-align: center; font-size: 13px; margin-top: 18px; }
