/* 둘리 프로젝트 · 1번 공통 밑판 — 화면 스타일 */
:root {
  --bg: #f5f7fb;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f7f9fc;
  --line: #e5e9f1;
  --line-2: #eef1f6;
  --text: #111621;
  --muted: #667085;
  --muted-2: #96a0b2;
  --ok: #0f9d58; --ok-soft: #e6f7ee;
  --warn: #b45309; --warn-soft: #fff3e2;
  --bad: #dc2626; --bad-soft: #fdecec;
  --info: #2563eb; --info-soft: #eaf1ff;
  --accent: #2f6df6;
  --accent-strong: #1e4fd0;
  --accent-soft: #eaf0ff;
  --accent-line: #c9d8ff;
  --accent-ink: #ffffff;
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 60px rgba(16, 24, 40, .18);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1180px;
}

[data-theme="dark"] {
  --bg: #0a0d12;
  --bg-2: #0f131a;
  --card: #121821;
  --card-2: #161d28;
  --line: #242d3b;
  --line-2: #1c2431;
  --text: #eaedf4;
  --muted: #9aa6b8;
  --muted-2: #6d798c;
  --ok: #3ecf8e; --ok-soft: #10281d;
  --warn: #f0b35a; --warn-soft: #2a1f10;
  --bad: #f87171; --bad-soft: #2c1516;
  --info: #7aa7ff; --info-soft: #111f38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
}

[data-theme="pastel"] {
  --bg: hsl(var(--hue, 222) 55% 97%);
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: hsl(var(--hue, 222) 55% 98.5%);
  --line: hsl(var(--hue, 222) 30% 91%);
  --line-2: hsl(var(--hue, 222) 35% 94%);
  --text: #232639;
  --muted: #6b7188;
  --muted-2: #9aa0b4;
  --ok-soft: #e9f9f0;
  --info-soft: hsl(var(--hue, 222) 80% 96%);
  --accent-soft: hsl(var(--hue, 222) 85% 96%);
  --accent-line: hsl(var(--hue, 222) 70% 88%);
  --shadow: 0 1px 2px rgba(60, 40, 90, .05), 0 12px 28px hsl(var(--hue, 222) 50% 60% / .1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.25; }
code, .mono { font-family: var(--mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.ta-r { text-align: right; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 9px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------------------------------------------------------------- 껍데기 */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.appbar-in {
  max-width: var(--max); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px;
  border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15.5px; letter-spacing: -0.03em; }
.brand-text small { font-size: 11px; color: var(--muted); }
.roles {
  display: flex; gap: 2px; padding: 3px; border-radius: 13px;
  background: var(--card-2); border: 1px solid var(--line); margin-left: 4px;
}
.role {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: background .15s, color .15s;
}
.role:hover { color: var(--text); }
.role.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.role.on svg { color: var(--accent); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lang-wrap {
  display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.lang-select { border: 0; background: transparent; font-size: 13px; font-weight: 600; padding: 0 2px; cursor: pointer; }
.tool-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.tool-btn:hover { color: var(--accent); border-color: var(--accent-line); }

.subnav {
  position: sticky; top: 59px; z-index: 35;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.subnav-in {
  max-width: var(--max); margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.subnav-in::-webkit-scrollbar { display: none; }
.subtab {
  padding: 7px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.subtab:hover { background: var(--card-2); color: var(--text); }
.subtab.on { background: var(--accent-soft); color: var(--accent-strong); }
[data-theme="dark"] .subtab.on { color: var(--text); }
.subtab .count {
  font-size: 10.5px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}
.subnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.small-link { font-size: 12.5px; color: var(--accent-strong); font-weight: 600; }
[data-theme="dark"] .small-link { color: var(--accent); }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.view { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 26px 20px 56px; }
.appfoot {
  max-width: var(--max); width: 100%; margin: 0 auto; padding: 16px 20px 30px;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 12px; border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 공통 */
.page { display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.page-title svg { color: var(--accent); }
.head-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow);
}
.card.soft { background: var(--card-2); box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16.5px; font-weight: 750; }
.card-head p { margin-top: 3px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 17px; font-weight: 750; }
.mini-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.note-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.note-line svg { color: var(--accent); flex-shrink: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.hint.bad { color: var(--bad); }
.req { color: var(--bad); font-style: normal; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 15px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); font-size: 13.5px; font-weight: 650; color: var(--text);
  white-space: nowrap; transition: transform .06s, background .15s, border-color .15s;
}
.btn:hover { border-color: var(--muted-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 12.5px; border-radius: 9px; gap: 5px; }
.btn.lg { padding: 13px 20px; font-size: 15px; border-radius: 13px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--card-2); color: var(--text); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-soft); }
.icon-btn.tiny { width: 22px; height: 22px; vertical-align: middle; margin-left: 4px; }

.input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input.select { padding-right: 30px; cursor: pointer; }
.input.sm { padding: 7px 9px; font-size: 12.5px; border-radius: 8px; max-width: 210px; }
textarea.input { resize: vertical; min-height: 66px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid.tight { gap: 10px; }
.form-grid .span2 { grid-column: span 2; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.later { background: var(--card-2); color: var(--muted); }
.pill.step2 { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.tiny { font-size: 10.5px; padding: 2px 7px; }
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.later { background: var(--card-2); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 650; color: var(--muted);
}
.chip:hover { border-color: var(--muted-2); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg-2); border-color: var(--text); }
.chip-n { font-size: 10.5px; opacity: .75; font-weight: 700; }

.search {
  display: flex; align-items: center; gap: 7px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); min-width: 210px;
}
.search .input { border: 0; background: transparent; padding: 9px 0; box-shadow: none; }
.search .input:focus { box-shadow: none; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 38px 16px;
  color: var(--muted); font-size: 13.5px; text-align: center;
}
.empty svg { color: var(--muted-2); }
.list { display: flex; flex-direction: column; }
.list-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 11px 2px; border-top: 1px solid var(--line-2);
}
.list-row:first-child { border-top: 0; }
.list-date { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.list-date b { color: var(--text); font-size: 13px; }
.list-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.list-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-right { display: flex; align-items: center; gap: 10px; }
.list-right b { font-size: 13px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.stat {
  display: flex; gap: 12px; align-items: center; padding: 15px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.stat-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); flex-shrink: 0;
}
[data-theme="dark"] .stat-ico { color: var(--accent); }
.stat-l { font-size: 12px; color: var(--muted); display: block; }
.stat-v { font-size: 19px; font-weight: 800; display: block; letter-spacing: -0.03em; }
.stat-s { font-size: 11px; color: var(--muted-2); display: block; }

.two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--line-2); }
.kv-row:last-child { border-bottom: 0; }
.mini-kv { display: flex; flex-direction: column; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }

.progress-row { display: flex; align-items: center; gap: 16px; }
.ring {
  --p: 0;
  width: 78px; height: 78px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0);
  position: relative;
}
.ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; z-index: 1; }
.ring.big { width: 96px; height: 96px; font-size: 19px; }
.tickline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.tickline.on { color: var(--text); }
.tick {
  width: 17px; height: 17px; border-radius: 5px; border: 1px solid var(--line);
  display: grid; place-items: center; flex-shrink: 0; color: var(--accent-ink); background: var(--card);
}
.tickline.on .tick { background: var(--ok); border-color: var(--ok); }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:hover td { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }
.table td b { font-weight: 700; }
.mapex {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px;
  background: var(--card); border: 1px dashed var(--line); font-family: var(--mono); font-size: 12.5px;
}
.mapex svg { color: var(--muted); }

/* 로그 */
.log-list { display: flex; flex-direction: column; }
.log-list.tall { max-height: 340px; overflow-y: auto; }
.log-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.log-row:first-child { border-top: 0; }
.log-at { color: var(--muted-2); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.log-act { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.log-act.ok { background: var(--ok-soft); color: var(--ok); }
.log-act.warn { background: var(--warn-soft); color: var(--warn); }
.log-act.bad { background: var(--bad-soft); color: var(--bad); }
.log-act.info { background: var(--info-soft); color: var(--info); }
.log-who { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.log-row b { font-weight: 650; }

/* 스위치 */
.sw { display: inline-flex; align-items: center; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-track { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .18s; }
.sw-dot { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.sw input:checked + .sw-track { background: var(--accent); }
.sw input:checked + .sw-track .sw-dot { transform: translateX(16px); }
.sw input:focus-visible + .sw-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw.big .sw-track { width: 46px; height: 26px; }
.sw.big .sw-dot { width: 20px; height: 20px; }
.sw.big input:checked + .sw-track .sw-dot { transform: translateX(20px); }
.lock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); }

/* ---------------------------------------------------------------- 손님 */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center;
  padding: 40px 38px; border-radius: 26px; overflow: hidden; position: relative;
  background:
    radial-gradient(700px 320px at 88% 12%, var(--accent-soft), transparent 70%),
    linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--line);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 750;
  border: 1px solid var(--accent-line); margin-bottom: 14px;
}
[data-theme="dark"] .eyebrow { color: var(--accent); }
.hero-title { font-size: 38px; font-weight: 850; letter-spacing: -0.045em; line-height: 1.18; }
.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent-strong); }
[data-theme="dark"] .hero-title .accent { color: var(--accent); }
.hero-sub { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 44ch; line-height: 1.6; }
.hero-cta { display: flex; gap: 9px; margin-top: 22px; flex-wrap: wrap; }
.hero-art { position: relative; min-height: 260px; display: grid; place-items: center; }
.mock-card {
  width: min(300px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); transform: rotate(-2deg);
}
.mock-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.dot.ok { background: var(--ok); }
.mock-line { height: 8px; border-radius: 6px; background: var(--line); margin-bottom: 8px; }
.mock-line.w70 { width: 70%; } .mock-line.w45 { width: 45%; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.mock-tile { border: 1px solid var(--line); border-radius: 9px; padding: 8px 6px; text-align: center; }
.mock-tile.hot { border-color: var(--accent-line); background: var(--accent-soft); }
.mock-tile .t { display: block; font-size: 11px; font-weight: 700; }
.mock-tile .s { display: block; font-size: 9.5px; color: var(--muted); }
.mock-btn { background: var(--accent); color: var(--accent-ink); text-align: center; border-radius: 10px; padding: 9px; font-size: 12.5px; font-weight: 750; }
.float-chip {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 11px; font-size: 11.5px; font-weight: 650; box-shadow: var(--shadow); white-space: nowrap;
}
.float-chip.c1 { top: 6px; left: 4%; }
.float-chip.c2 { bottom: 6px; right: 2%; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.store-card {
  display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .12s;
}
.store-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.store-top { display: flex; align-items: center; justify-content: space-between; }
.store-emoji { font-size: 22px; }
.store-name { font-size: 15px; font-weight: 750; }
.store-kind { font-size: 12px; color: var(--accent-strong); font-weight: 650; }
[data-theme="dark"] .store-kind { color: var(--accent); }
.store-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.store-go { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.guest-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; align-items: start; }
.book-card { border: 1px solid var(--accent-line); }
.book-card .btn.lg { margin-top: 4px; }
.done-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.done-check { width: 62px; height: 62px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.guest-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 12px; padding-top: 8px; }

/* ---------------------------------------------------------------- 포스 */
.device-tabs { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.device-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left;
}
.device-tab.on { border-color: var(--accent); background: var(--accent-soft); }
.device-no { font-size: 10.5px; font-weight: 800; color: var(--accent-strong); letter-spacing: .02em; }
[data-theme="dark"] .device-no { color: var(--accent); }
.device-name { font-size: 13px; font-weight: 700; }
.device-add {
  display: inline-flex; align-items: center; gap: 5px; padding: 9px 13px; border-radius: 12px;
  border: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; font-weight: 650;
}
.device-add:hover { border-color: var(--accent); color: var(--accent-strong); }
.pos-grid { display: grid; grid-template-columns: 1fr 350px; gap: 16px; align-items: start; }
.pos-list { display: flex; flex-direction: column; }
.pos-row {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; padding: 12px 2px;
  border-top: 1px solid var(--line-2); align-items: start;
}
.pos-row:first-child { border-top: 0; }
.pos-row.off { opacity: .5; }
.pos-time { font-family: var(--mono); font-size: 14px; font-weight: 700; padding-top: 2px; }
.pos-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.pos-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.pos-meta span { display: inline-flex; align-items: center; gap: 3px; }
.pos-amt { font-weight: 800; font-size: 14px; padding-top: 2px; }
.pos-acts { grid-column: 2 / -1; display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.checkline input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------------------------------------------------------------- 장부 */
.ledger-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tools-right { display: flex; align-items: center; gap: 8px; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-step {
  font-size: 12px; font-weight: 650; padding: 6px 10px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line);
}
.flow-step.arrow::before { content: "→"; margin-right: 8px; color: var(--muted-2); font-weight: 400; }
.flow-step.arrow { border: 0; background: transparent; padding: 0; gap: 0; }

/* ---------------------------------------------------------------- 설정 */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--card); text-align: left;
}
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.theme-preview { display: flex; height: 62px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.tp-side { width: 26%; background: #e9edf5; }
.tp-body { flex: 1; background: #fff; padding: 9px; display: flex; flex-direction: column; gap: 6px; }
.tp-line { height: 7px; border-radius: 4px; background: #dfe5ef; }
.tp-line.short { width: 55%; }
.theme-preview.dark .tp-side { background: #10151d; }
.theme-preview.dark .tp-body { background: #161d28; }
.theme-preview.dark .tp-line { background: #2b3546; }
.theme-preview.pastel { background: linear-gradient(120deg, #fdf2f8, #eef2ff); }
.theme-preview.pastel .tp-side { background: #e7e0ff; }
.theme-preview.pastel .tp-body { background: #fffafc; }
.theme-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.theme-card.on .theme-label { color: var(--text); }
.accent-row { display: flex; gap: 20px; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.swatch.on { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--card); }
.swatch.custom { display: grid; place-items: center; background: var(--card-2); border: 1px dashed var(--line); color: var(--muted); position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview-box { flex: 1; min-width: 220px; padding: 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--card-2); }
.lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lang-btn {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 12px;
  border-radius: 11px; border: 1.5px solid var(--line); background: var(--card); text-align: left;
}
.lang-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.lang-btn b { font-size: 13.5px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.danger-zone h2 { color: var(--bad); font-size: 16px; margin-bottom: 4px; }
.check-list { display: flex; flex-direction: column; margin-top: 8px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.check-row .grow { color: var(--muted); }
.check-row.on .grow { color: var(--text); }
.check-num {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted);
}
.check-row.on .check-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-top { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.setup-top h2 { font-size: 18px; }

/* ---------------------------------------------------------------- 블럭 창고 */
.wh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wh-stat { text-align: right; padding-left: 18px; border-left: 1px solid var(--line); }
.wh-stat-n { font-size: 42px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; color: var(--accent-strong); }
[data-theme="dark"] .wh-stat-n { color: var(--accent); }
.wh-stat-l { font-size: 12px; color: var(--muted); }
.wh-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 13px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); font-size: 13px;
}
.wh-note svg { color: var(--accent-strong); flex-shrink: 0; margin-top: 2px; }
[data-theme="dark"] .wh-note svg { color: var(--accent); }
.wh-slotline { font-weight: 750; font-size: 13.5px; letter-spacing: -0.02em; }
.wh-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wh-tools .search { flex: 1; min-width: 220px; max-width: 380px; }
.wh-tools .select { width: auto; min-width: 150px; max-width: 220px; }
.wh-tools .muted { margin-left: auto; white-space: nowrap; }
.wh-legend { font-size: 11.5px; color: var(--muted); margin-top: -6px; }
.wh-groups { display: flex; flex-direction: column; gap: 26px; }
.wh-cat-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.wh-cat-head h3 { font-size: 15px; font-weight: 800; }
.blk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 11px; }
.blk {
  display: flex; flex-direction: column; gap: 7px; padding: 13px 14px 12px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 13px; min-height: 168px; transition: border-color .15s, box-shadow .15s;
}
.blk:hover { box-shadow: var(--shadow); }
.blk.st-done { border-left-color: var(--ok); }
.blk.st-step2 { border-left-color: var(--warn); }
.blk.st-later { border-left-color: var(--muted-2); }
.blk.on { border-color: var(--accent-line); }
.blk.st-step2.on { border-left-color: var(--accent); }
.blk-top { display: flex; align-items: center; gap: 6px; }
.blk-no { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); font-weight: 700; }
.blk-tag {
  font-size: 10px; font-weight: 750; padding: 2px 7px; border-radius: 999px;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line);
}
.blk-top .pill { margin-left: auto; padding: 2px 7px; font-size: 10px; }
.blk-name { font-size: 14.5px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.3; }
.blk-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blk-file {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 8px; border-radius: 7px;
  background: var(--card-2); border: 1px solid var(--line-2); min-width: 0;
}
.blk-file code { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.blk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.screens { display: flex; gap: 3px; flex-wrap: wrap; }
.screen-dot { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); }
[data-theme="dark"] .screen-dot { color: var(--accent); }
.slot-mini { display: flex; gap: 7px; margin: 6px 0 2px; }
.slot-box {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px;
  border: 1.5px dashed var(--line); border-radius: 11px; background: var(--card);
}
.slot-emoji { font-size: 18px; }
.slot-name { font-size: 10.5px; font-weight: 650; color: var(--muted); }
.slot-plus { font-size: 12px; color: var(--accent); font-weight: 800; }

/* 본사 업체 */
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 11px; }
.tenant-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.tenant-card.active { border-color: var(--accent); background: var(--accent-soft); }
.tenant-top { display: flex; align-items: center; gap: 9px; }
.tenant-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); font-weight: 800; color: var(--accent-strong);
}
.tenant-top b { display: block; font-size: 14px; }
.tenant-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }
.tenant-meta span { display: inline-flex; align-items: center; gap: 3px; }
.tenant-acts { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.tenant-acts .btn { flex: 1; }
.fee-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.fee-row .field { max-width: 260px; }

/* 잠금 */
.lock-page { display: grid; place-items: center; min-height: 62vh; }
.lock-card {
  width: min(390px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  text-align: center;
}
.lock-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 4px; }
[data-theme="dark"] .lock-ico { color: var(--accent); }
.lock-card h1 { font-size: 19px; }
.pin-dots { display: flex; gap: 9px; margin: 12px 0; }
.pin-dots .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; }
.pin-dots .dot.on { background: var(--accent); border-color: var(--accent); }
.pin-dots.static .dot { width: 11px; height: 11px; }
.pin-wrap { display: flex; flex-direction: column; align-items: center; }
.pin-msg { font-size: 12.5px; min-height: 18px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 8px 0 4px; }
.pin-key {
  height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2);
  font-size: 19px; font-weight: 650;
}
.pin-key:hover { border-color: var(--accent); }
.pin-key.ghost { color: var(--muted); }
.pin-key.ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* 모달 · 토스트 */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(9, 12, 20, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fade .15s ease-out;
}
.dialog {
  width: 100%; background: var(--card); border-radius: 18px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .18s ease-out;
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.dialog-head h3 { font-size: 16px; font-weight: 750; }
.dialog-body { padding: 2px 18px 16px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line-2); }
.toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 120;
  display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px;
  background: var(--text); color: var(--bg-2); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: all .2s;
}
.toast.in { opacity: 1; transform: none; }
.toast.bad { background: var(--bad); color: #fff; }
.fatal { color: var(--bad); padding: 20px; white-space: pre-wrap; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* ---------------------------------------------------------------- 반응형 */
@media (max-width: 1020px) {
  .pos-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .guest-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 30px 26px; }
  .hero-art { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .appbar-in { flex-wrap: wrap; gap: 8px; padding: 9px 14px 10px; }
  .brand { order: 1; }
  .tools { order: 2; margin-left: auto; }
  .roles { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .roles::-webkit-scrollbar { display: none; }
  .role { flex: 1; justify-content: center; padding: 7px 6px; font-size: 12px; gap: 4px; }
  .role svg { width: 15px; height: 15px; }
  .subnav { top: 107px; }
  .subnav-in { padding: 7px 14px; gap: 2px; }
  .subnav-right { display: none; }
  .view { padding: 18px 14px 46px; }
  .page-title { font-size: 20px; }
  .hero { padding: 24px 18px; border-radius: 20px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 13.5px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; gap: 9px; }
  .stat-v { font-size: 16px; }
  .stat-ico { width: 34px; height: 34px; border-radius: 10px; }
  .theme-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
  .accent-row { flex-direction: column; }
  .blk-grid { grid-template-columns: 1fr; }
  .wh-stat { border-left: 0; padding-left: 0; text-align: left; }
  .wh-stat-n { font-size: 32px; }
  .wh-tools .muted { margin-left: 0; width: 100%; }
  .table { min-width: 520px; }
  .list-row { grid-template-columns: 54px 1fr; }
  .list-right { grid-column: 2; justify-content: flex-start; }
  .pos-row { grid-template-columns: 48px 1fr; }
  .pos-amt { grid-column: 2; }
  .pos-acts { grid-column: 2; }
  .card { padding: 15px; }
  .subnav { position: static; }
  .check-row .btn { padding: 6px 9px; }
  .fee-row { flex-direction: column; align-items: stretch; }
  .fee-row .field { max-width: none; }
}
@media (max-width: 365px) {
  .brand-text b { font-size: 14px; }
  .role span { display: none; }
  .role { padding: 9px; }
  .lang-wrap { padding: 5px 7px; }
  .lang-select { font-size: 12px; }
  .swatches { gap: 6px; }
  .swatch { width: 30px; height: 30px; }
  .slot-mini { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
