:root {
  --bg: #f3f5f7;
  --surface: #fff;
  --surface-2: #eef1f4;
  --ink: #1a2332;
  --muted: #5b6678;
  --faint: #8b95a5;
  --line: #d9e0e8;
  --accent: #0f766e;
  --soft: rgba(15, 118, 110, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(15,118,110,.1), transparent 55%),
    linear-gradient(180deg, #f7f8fa, var(--bg));
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app { max-width: 430px; margin: 0 auto; min-height: 100dvh; padding-bottom: 92px; }
.guest { max-width: 430px; margin: 0 auto; padding: 48px 20px; }
.brand { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 2px 0 0; font-size: 22px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); background: rgba(243,245,247,.9); position: sticky; top: 0; z-index: 20; }
.main { padding: 16px; display: grid; gap: 12px; }
.branch-bar { display: block; padding: 12px 16px 0; }
.branch-bar span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
select, input, textarea {
  width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 16px;
  padding: 0 14px; background: var(--surface); outline: none;
}
textarea { height: auto; min-height: 88px; padding: 12px 14px; }
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border: 0; border-radius: 16px; padding: 0 16px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; width: 100%;
}
.btn.sec { background: var(--surface-2); color: var(--ink); }
.btn.out { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.danger { background: #e11d48; }
.btn.sm { height: 40px; font-size: 13px; width: auto; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 16px; background: transparent; font-size: 20px; }
.stat { position: relative; overflow: hidden; }
.stat p { margin: 0; }
.stat .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.stat .v { margin-top: 8px; font-size: 24px; font-weight: 800; }
.item { display: flex; gap: 12px; padding: 12px; }
.thumb { width: 80px; height: 80px; border-radius: 16px; background: var(--surface-2); object-fit: cover; flex-shrink: 0; display: grid; place-items: center; color: var(--faint); font-size: 12px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { background: var(--soft); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.warn { background: #fffbeb; border-color: #fde68a; }
.ok { background: #ecfdf5; color: #047857; }
.err { color: #e11d48; font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.faint { color: var(--faint); font-size: 12px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: 430px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tabbar a { text-align: center; font-size: 11px; font-weight: 700; color: var(--faint); padding: 8px 4px; border-radius: 14px; }
.tabbar a.on { color: var(--accent); background: var(--soft); }
.tabbar a.scan { transform: translateY(-10px); background: var(--accent); color: #fff; border-radius: 18px; padding: 14px 4px; }
.list { display: grid; gap: 10px; }
.spread { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
img.hero { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 18px 18px 0 0; background: var(--surface-2); }
.pad0 { padding: 0; overflow: hidden; }
.inner { padding: 16px; display: grid; gap: 12px; }
.chip { border-radius: 16px; background: var(--surface-2); padding: 12px; }
#reader { overflow: hidden; border-radius: 18px; background: #111; }
