*, *::before, *::after { box-sizing: border-box; }
:root { --blue: #004482; --green: #00660a; --amber: #8a5a00; --amber-bg: #fff4dc; --red: #b00020; --ink: #1a1a1a; --muted: #5f6670; --line: #d9dee5; }
html, body { margin: 0; padding: 0; background: #fff; color: var(--ink); color-scheme: light; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 17px; line-height: 1.4; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.bar { background: var(--blue); color: #fff; padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; }
.wordmark { font-size: 20px; letter-spacing: .5px; font-weight: 700; }
.wordmark b { font-weight: 400; }
main { max-width: 480px; margin: 0 auto; padding: 20px 16px calc(env(safe-area-inset-bottom) + 24px); }
h1 { font-size: 24px; margin: 4px 0 16px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input { width: 100%; min-height: 56px; font-size: 20px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-family: inherit; }
input:focus { outline: none; border-color: var(--blue); }
.btn { display: block; width: 100%; min-height: 56px; border: 0; border-radius: 12px; font-size: 20px; font-weight: 700; color: #fff; cursor: pointer; font-family: inherit; touch-action: manipulation; }
.btn:disabled { opacity: .6; }
.btn-blue { background: var(--blue); margin-top: 20px; }
.btn-green { background: var(--green); }
.btn-huge { min-height: 120px; font-size: 30px; letter-spacing: 1px; margin: 20px 0 12px; border-radius: 18px; }
.btn-small { display: inline-block; width: auto; min-height: 44px; padding: 0 18px; font-size: 16px; background: #fff; color: var(--red); }
.error { color: var(--red); min-height: 1.4em; margin: 10px 0 0; font-weight: 600; }
.muted { color: var(--muted); }
.center { text-align: center; }
.greeting { font-size: 22px; font-weight: 600; margin: 4px 0 14px; }
.card { border: 2px solid var(--line); border-radius: 14px; padding: 18px 16px; }
.card.on { border-color: var(--green); background: #eef7ef; }
.status { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.elapsed { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); margin-top: 8px; }
.result { border-radius: 12px; padding: 12px 14px; font-weight: 600; margin-bottom: 8px; background: #eef7ef; color: var(--green); overflow-wrap: anywhere; }
.result.warn { background: var(--amber-bg); color: var(--amber); }
.gps { color: var(--muted); font-size: 15px; margin: 10px 0; }
.gps.bad { color: var(--red); font-weight: 600; }
.note { font-size: 15px; color: var(--blue); background: #eaf1f8; border-radius: 10px; padding: 10px 12px; }
.link { display: block; margin: 36px auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 15px; min-height: 44px; padding: 0 16px; font-family: inherit; cursor: pointer; }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); max-width: 456px; margin: 0 auto; background: var(--red); color: #fff; border-radius: 12px; padding: 12px 44px 12px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast span { flex: 1 1 180px; }
.toast-x { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }
.block { border: 2px solid var(--red); background: #fdecee; color: var(--red); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; overflow-wrap: anywhere; }
.block-title { font-size: 19px; font-weight: 700; }
.block p { margin: 8px 0 0; color: var(--ink); font-size: 16px; }
.block .btn { margin-top: 14px; }
.btn-outline { background: #fff; color: var(--blue); border: 2px solid var(--blue); margin-top: 10px; }
.banner-amber { background: var(--amber-bg); color: var(--amber); border: 2px solid #e8b44c; border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 12px; }
.banner-red { background: #fdecee; color: var(--red); border: 2px solid var(--red); border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 12px; }
.reqform { border: 2px solid var(--line); border-radius: 14px; padding: 6px 16px 12px; margin: 20px 0 8px; }
.reqform .link { margin-top: 8px; }
.reqform .btn-green { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip { min-height: 44px; padding: 0 14px; border: 2px solid var(--blue); border-radius: 22px; background: #fff; color: var(--blue); font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; }
textarea { width: 100%; font-size: 17px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; font-family: inherit; color: var(--ink); background: #fff; resize: vertical; }
textarea:focus { outline: none; border-color: var(--blue); }


.pin-label { text-align: center; font-size: 20px; font-weight: 600; margin: 8px 0 12px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; min-height: 22px; margin-bottom: 8px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--blue); }
.pin-dot.on { background: var(--blue); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 340px; margin: 12px auto 0; }
.keypad button { min-height: 72px; font-size: 30px; font-weight: 600; border-radius: 14px; border: 2px solid var(--line); background: #f5f7fa; color: var(--ink); font-family: inherit; touch-action: manipulation; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.keypad button:active { background: #e3e8ef; }
.keypad .key-fn { font-size: 26px; color: var(--muted); }
.keypad .key-go { background: var(--green); border-color: var(--green); color: #fff; font-size: 24px; font-weight: 800; }
.keypad .key-go:disabled { opacity: .6; }
