:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; background: #101516; color: #f0f3ef; font-size: 17px; --muted: #abb8b1; --border: #35423c; --accent: #bfdfaa; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
main { width: min(100% - 32px, 1120px); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 0 calc(130px + env(safe-area-inset-bottom)); }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 25px; }
h1 { font-size: 29px; letter-spacing: -.8px; margin: 3px 0; } h2 { font-size: 21px; margin: 0 0 16px; } h3 { margin: 0; font-size: 19px; }
p { line-height: 1.65; } .eyebrow { color: var(--accent); font-size: 13px; letter-spacing: 2px; margin: 0; }
button, input, textarea, select { font: inherit; }
button, .button, input, select { min-height: 46px; }
button, .button { border: 1px solid var(--border); border-radius: 12px; color: inherit; background: #202a25; padding: 11px 15px; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:disabled { cursor: not-allowed; opacity: .48; } button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #d8e9a5; outline-offset: 3px; }
button.primary { background: var(--accent); color: #172310; font-weight: 650; border-color: transparent; } button[aria-pressed=true] { border-color: var(--accent); background: #31432b; color: #e3f6d6; }
.muted, small { color: var(--muted); } small { display: block; line-height: 1.6; } .warning { color: #f1ce80; } .error { color: #ffac9f; } .good { color: #b8dfa8; }
nav, .row, .choices, .actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; } nav { margin-bottom: 20px; } nav button { flex: 1; min-width: 0; padding: 10px 6px; }
section.panel, article.card { background: #19211d; border: 1px solid var(--border); border-radius: 18px; padding: 22px; margin: 16px 0; overflow-wrap: anywhere; }
label { display: block; margin: 16px 0 7px; line-height: 1.5; } input, textarea, select { width: 100%; border: 1px solid #536158; border-radius: 10px; color: #f7faf5; background: #111814; padding: 12px; min-width: 0; font-size: 17px; }
input[type=checkbox], input[type=radio] { width: 22px; min-height: 22px; margin: 0 9px 0 0; } label.check { display: flex; align-items: center; min-height: 46px; }
textarea { min-height: 140px; resize: vertical; line-height: 1.6; } .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid > * { min-width: 0; }
.step-number { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: #34452c; color: #d6ebc7; align-items: center; justify-content: center; margin-right: 8px; font-size: 16px; }
.dock { position: fixed; bottom: 0; left: 0; right: 0; z-index: 4; background: #101816f5; border-top: 1px solid var(--border); padding: 12px max(16px, calc((100% - 1120px) / 2)) calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; }
.dock button { flex: 1; } .dock .primary { flex: 2; } footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 22px 0; } footer a { min-height: 44px; color: var(--muted); display: inline-flex; align-items: center; } .text-link { color: var(--accent); }
.pill { display: inline-block; border-radius: 6px; background: #2b352e; padding: 4px 8px; font-size: 14px; margin: 5px 5px 5px 0; } .history { padding: 10px 0; border-bottom: 1px solid var(--border); line-height: 1.7; }
.status { border-left: 3px solid #b4ce9e; padding: 10px 13px; background: #243025; margin: 12px 0; line-height: 1.65; white-space: pre-line; } .status:empty { display: none; } .result-text { white-space: pre-wrap; word-break: break-all; user-select: all; font-size: 16px; background: #111814; padding: 14px; border-radius: 10px; }
[hidden] { display: none !important; } dialog { color: inherit; background: #1a241e; border: 1px solid var(--border); border-radius: 18px; width: min(94vw, 580px); max-height: 86dvh; padding: 18px; overflow: auto; } dialog::backdrop { background: #000b; } dialog img { width: 100%; height: auto; border-radius: 9px; } .qr-sandbox { position: absolute; left: -10000px; top: 0; } .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 650px) { .grid { grid-template-columns: 1fr; gap: 0; } main { width: calc(100% - 28px); } section.panel, article.card { padding: 18px 16px; } h1 { font-size: 26px; } .choices > button { flex: 1 1 28%; } .actions > button { flex: 1 1 42%; } nav button { font-size: 15px; } }
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s; } }
summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
nav button, .choices > button, .dock button { white-space: nowrap; overflow-wrap: normal; }
#mode-choices > button { flex: 1 1 40%; }
.feedback { position: fixed; z-index: 5; left: 16px; right: 16px; width: fit-content; max-width: min(560px, calc(100% - 32px)); margin: auto; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 12px; background: #243025; box-shadow: 0 4px 20px #0008; line-height: 1.5; }
#feedback:empty, #qr-image:not([src]) { display: none; }
.dock.inline-dock { position: static; padding: 12px 0; margin: 12px 0; background: transparent; border-top: 0; }
#bulk #copy-qr-sheet { flex-basis: 100%; white-space: nowrap; }

.hint { color: var(--muted); margin: 8px 0 16px; line-height: 1.65; }
#mode-choices { align-items: stretch; }
.mode-option { flex: 1 1 40%; min-width: 0; }
.mode-option button { width: 100%; white-space: nowrap; }
.mode-option .hint { margin-bottom: 12px; }
#how-to { flex-basis: 100%; }
#how-to summary { color: var(--accent); }
#how-to ol { padding-left: 24px; line-height: 1.7; }
@media (max-width: 650px) { .mode-option { flex-basis: 100%; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: start; gap: 12px; } .mode-option .hint { margin: 0; } }

.passbook-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; } .passbook-row input[type=text], .passbook-row input:not([type]) { flex: 1 1 160px; } .passbook-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; } .passbook-item .label { flex: 1 1 120px; }
