:root { --brand: #1f4e79; --bg: #f6f5f1; --ink: #16181d; --muted: #5d6470; --line: #dedad2; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
label { display: grid; gap: 4px; margin: 12px 0; color: var(--muted); }
input, select, textarea { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
button { font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.big { width: 100%; padding: 16px; font-size: 1.1rem; background: var(--brand); color: #fff; border: 0; }
.ship { background: #1b7a3a; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.row .big { grid-column: 1 / -1; }
.linkbar { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; margin-bottom: 12px; }
.qr svg { width: 140px; height: 140px; background: #fff; border-radius: 8px; }
#link { display: block; word-break: break-all; margin: 4px 0 8px; font-weight: 600; }
.mode { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.notice { background: #fff4d6; border-radius: 10px; padding: 10px; margin: 0; }
.error { color: #b3261e; }
.status { color: var(--muted); min-height: 1.5em; }
.link-btn { border: 0; background: none; color: var(--muted); text-decoration: underline; padding: 0; }
.danger { color: #b3261e; border-color: #e7c3bf; }
.reveal { position: fixed; inset: 0; z-index: 10; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; overflow: hidden; }
.reveal[hidden] { display: none; }
.reveal { height: 100vh; height: 100dvh; }
.reveal-qr svg {
  display: block;
  width: min(80vw, 80vh, calc(100vh - 190px));
  height: min(80vw, 80vh, calc(100vh - 190px));
  width: min(80vw, 80dvh, calc(100dvh - 190px));
  height: min(80vw, 80dvh, calc(100dvh - 190px));
}
.reveal-url { margin: 0; font-weight: 700; font-size: 1.05rem; text-align: center; word-break: break-all; }
.reveal-status { margin: 0; min-height: 1.5em; color: var(--muted); font-size: .9rem; text-align: center; }
.reveal-actions { display: flex; gap: 8px; }
