:root {
  --bg: #faf7f2; --card: #fff; --ink: #231f1c; --muted: #7a716a; --line: #e8e1d8;
  --brand: #c2410c; --brand-dark: #9a3412; --ok: #15803d; --warn: #b45309; --bad: #dc2626;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 18px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; -webkit-text-size-adjust: 100%; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-size: 1.4rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 20px 0 10px; }
.muted { color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
button, .btn { font: inherit; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
button.primary:active { background: var(--brand-dark); }
button.danger { color: var(--bad); border-color: #f3c4c4; }
button.small { min-height: 38px; padding: 0 12px; font-size: .9rem; }
button:disabled { opacity: .5; }
button.big { width: 100%; min-height: 96px; font-size: 1.6rem; border-radius: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: #f1ece5; color: var(--muted); margin-left: 4px; }
.badge.bad { background: #fde2e2; color: var(--bad); }
.badge.warn { background: #fdefd8; color: var(--warn); }
.badge.ok { background: #dcf3e3; color: var(--ok); }
.bad-text { color: var(--bad); }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tabs button { white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
nav.menu { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; overflow-x: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 4px; z-index: 5; }
nav.menu button { border: 0; min-height: 52px; font-size: .85rem; white-space: nowrap; padding: 0 10px; position: relative; }
nav.menu button.on { color: var(--brand); font-weight: 800; }
nav.menu .count { position: absolute; top: 2px; right: 0; background: var(--bad); color: #fff; border-radius: 999px;
  font-size: .7rem; padding: 0 6px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; max-width: 90vw; z-index: 20; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 10; display: flex; align-items: flex-end; }
.sheet { background: var(--bg); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.sheet .actions { display: flex; gap: 8px; margin-top: 20px; }
.sheet .actions button { flex: 1; }
.status-big { font-size: 1.5rem; font-weight: 800; margin: 8px 0; }
.msg { padding: 14px; border-radius: 12px; margin: 12px 0; font-weight: 600; }
.msg.ok { background: #dcf3e3; color: var(--ok); }
.msg.bad { background: #fde2e2; color: var(--bad); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pinpad button { min-height: 64px; font-size: 1.5rem; }
.pindots { display: flex; justify-content: center; gap: 14px; margin: 16px 0; }
.pindots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.pindots span.on { background: var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
[hidden] { display: none !important; }
.row > .grow { min-width: 0; }
.shift { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.shift input { flex: 1; min-width: 0; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 14px 0; }
label.check input { width: 22px; height: 22px; min-height: 0; flex: none; }
button { line-height: 1.3; padding-top: 8px; padding-bottom: 8px; }
.tabs { flex-wrap: wrap; } .tabs button { flex: 1; padding: 0 8px; }
