@import url("../fonts/pretendard.css");

/* ===== 토큰 ===== */
:root {
  --bg: #ececef;
  --card: #ffffff;
  --ink: #16161a;
  --ink-2: #3b3b42;
  --muted: #8b8b94;
  --line: #e7e7eb;
  --soft: #f4f4f6;
  --accent: #f26722;
  --accent-2: #ff8f52;
  --accent-soft: #fde6d8;
  --good: #18a058;
  --good-soft: #dcf5e6;
  --bad: #e5484d;
  --bad-soft: #fde4e4;
  --lav: #e6e0fb;
  --sky: #dde9fb;
  --mint: #dcf2d6;
  --peach: #fce4d4;
  --rose: #fadfe9;
  --lemon: #fbf1cb;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px -12px rgba(20, 20, 30, .10);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Hiragino Sans",
          "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans KR", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== 레이아웃 ===== */
.shell { max-width: 1320px; margin: 0 auto; padding: 18px 24px 64px; }

.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; background: var(--card);
  padding: 8px 18px 8px 8px; border-radius: 999px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow);
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent-2), var(--accent)); color: #fff;
}
.brand-mark .icon { width: 16px; height: 16px; }

.nav {
  margin: 0 auto; display: flex; gap: 2px; background: var(--card); padding: 5px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--soft); }
.nav a.active { background: var(--ink); color: #fff; }
.nav a .icon { width: 16px; height: 16px; }
.nav .lbl-short { display: none; }
.nav .count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center;
}

.top-right { display: flex; align-items: center; gap: 8px; }
.seg {
  display: inline-flex; background: var(--card); padding: 4px; border-radius: 999px; box-shadow: var(--shadow);
}
.seg a {
  min-width: 34px; height: 30px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.seg a.on { background: var(--ink); color: #fff; }
.circle-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card);
  box-shadow: var(--shadow); border: 0; cursor: pointer; position: relative;
}
.circle-btn:hover { background: #fafafa; }
.circle-btn.dark { background: var(--ink); color: #fff; }
.circle-btn.sm { width: 34px; height: 34px; box-shadow: none; background: var(--soft); }
.circle-btn.sm.dark { background: var(--ink); }
.dot-badge {
  position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  border: 2px solid #fff;
}
.store-pick { position: relative; }
.store-pick summary { list-style: none; cursor: pointer; }
.store-pick summary::-webkit-details-marker { display: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(150deg, #3a3a42, #121216); color: #fff; box-shadow: var(--shadow);
}
.menu-pop {
  position: absolute; right: 0; top: 48px; min-width: 220px; background: var(--card); border-radius: var(--r-md);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .25); padding: 8px; z-index: 30;
}
.menu-pop a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.menu-pop a:hover { background: var(--soft); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ===== 페이지 머리 ===== */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 6px 0 22px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
h1 { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; margin: 0; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.kpis { display: flex; gap: 44px; flex-wrap: wrap; }
.kpi .label { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.kpi .value { display: flex; align-items: center; gap: 10px; font-size: 42px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.kpi .value small { font-size: 20px; color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 600; line-height: 1.4; white-space: nowrap; word-spacing: .15em;
}
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--accent-soft); color: var(--accent); }
.pill.gray { background: var(--soft); color: var(--ink-2); }
.pill.dark { background: var(--ink); color: #fff; }
.pill.line { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.pill .icon { width: 13px; height: 13px; }

/* ===== 카드 ===== */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-top { grid-template-columns: 1.55fr .95fr 1fr 1.15fr; }
.grid-bottom { grid-template-columns: 1fr 1.9fr; }
.card {
  background: var(--card); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow);
  position: relative; min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { line-height: 1.3; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.card.accent {
  background: linear-gradient(165deg, #f8925a 0%, var(--accent) 55%, #e5560f 100%); color: #fff;
  display: flex; flex-direction: column; overflow: hidden;
}
.card.accent::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
}
.card.accent h2 { font-weight: 500; font-size: 20px; }
.card.accent .big { font-size: 68px; font-weight: 400; letter-spacing: -0.04em; line-height: 1; margin-top: auto; }
.card.accent .big small { font-size: 15px; opacity: .85; margin-left: 6px; letter-spacing: 0; }
.ghost-circle {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); color: #fff;
}
.btn-white {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; margin-top: 12px; align-self: flex-start;
}

.card.dark { background: #19191d; color: #fff; }
.card.dark .card-sub, .card.dark .muted { color: #a3a3ad; }

/* 게이지 */
.gauge-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gauge-num .label { font-size: 13px; color: var(--muted); }
.gauge-num .value { font-size: 48px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.gauge-num .value small { font-size: 22px; }
.gauge { width: 200px; max-width: 55%; }
.chips { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.chip-round {
  position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 13px; color: var(--ink-2);
}
.chip-round .ic {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft);
}
.chip-round .ic .icon { width: 15px; height: 15px; }
.chip-round b { font-weight: 700; color: var(--ink); }

/* 주목할 리뷰 */
.note {
  background: var(--soft); border-radius: var(--r-md); padding: 14px; margin-top: 10px;
  border-top: 5px solid var(--ink);
}
.note .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.note p { margin: 0 0 10px; font-size: 14px; font-weight: 500; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.positive { background: var(--accent); }
.dot.negative { background: var(--ink); }
.dot.neutral { background: #c4c4cc; }

/* 언어 */
.lang-row { display: grid; grid-template-columns: 30px 1fr 42px; align-items: center; gap: 10px; margin: 10px 0; }
.flag { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 16px; }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.lang-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px;
  background: var(--soft); border-radius: 999px; padding: 6px 6px 6px 16px;
}
.lang-foot b { font-size: 22px; font-weight: 600; }

/* 주간 막대 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 34px; position: relative; }
.bars::before {
  content: ""; position: absolute; inset: 34px 0 22px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 25%);
}
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; position: relative; z-index: 1; }
.bars .b {
  width: 100%; max-width: 38px; border-radius: 999px; min-height: 10px;
  background: repeating-linear-gradient(135deg, #dcdce2 0 5px, #f1f1f4 5px 10px);
}
.bars .col.now .b { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.bars .tip {
  position: absolute; top: -30px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.bars .col.now .b::before {
  content: ""; display: block; width: 10px; height: 10px; margin: 8px auto 0; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink);
}
.bars .wk { font-size: 11px; color: var(--muted); }

/* 메뉴 성적표 */
.board { display: grid; grid-template-columns: 1fr 250px; gap: 18px; }
.mrow { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 12px; padding: 7px 0; }
.mrow .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .pct { font-size: 13px; font-weight: 700; text-align: right; }
.stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--soft); gap: 2px; }
.stack .p { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.stack .u { background: #d6d6dc; }
.stack .n { background: repeating-linear-gradient(135deg, #1b1b20 0 4px, #3a3a42 4px 8px); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pop {
  background: #19191d; color: #fff; border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.pop h3 { margin: 0; font-size: 19px; font-weight: 500; line-height: 1.3; }
.pop .tag { background: var(--accent); color: #fff; }
.pop .btn { color: var(--ink); box-shadow: none; }
.pop q { color: #d0d0d8; font-size: 13px; quotes: "“" "”"; line-height: 1.5; }
.pop .best { margin-top: auto; display: flex; align-items: center; gap: 10px; background: #2a2a30; border-radius: 999px; padding: 6px 6px 6px 14px; font-size: 13px; }
.pop .best b { margin-left: auto; }

/* 긴급 확인 (위생·안전) */
.card.urgent { background: linear-gradient(160deg, #f0484e, #d92d34); color: #fff; margin-bottom: 16px; }
.card.urgent .card-sub { color: rgba(255, 255, 255, .85); }
.card.urgent .btn { color: var(--ink); box-shadow: none; }
.urgent-title { display: flex; gap: 12px; align-items: flex-start; }
.urgent-title > .icon { width: 26px; height: 26px; margin-top: 2px; }
.urgent-list { display: grid; gap: 8px; }
.urgent-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 14px; }
.urgent-item:hover { background: rgba(255, 255, 255, .22); }
.urgent-item .pill { background: #fff; color: #c8272d; justify-self: start; }
.urgent-item .u-text { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urgent-item .u-meta { font-size: 12px; opacity: .85; white-space: nowrap; }
.pill.bad .icon, .safety-pill .icon { width: 13px; height: 13px; }
.safety-pill { align-self: flex-start; }
.rc-urgent { box-shadow: 0 0 0 2px var(--bad), var(--shadow); }

/* 위생 의심 (노란 카드) */
.card.suspect { background: linear-gradient(160deg, #fff3c4, #ffe58a); color: #5c4300; margin-bottom: 16px; }
.card.suspect .card-sub { color: #7a5c00; }
.card.suspect .urgent-item { background: rgba(255, 255, 255, .55); }
.card.suspect .urgent-item:hover { background: rgba(255, 255, 255, .8); }
.card.suspect .urgent-item .pill { background: #5c4300; color: #fff3c4; }

/* 사장님 할 일 */
.card.todo { background: #19191d; color: #fff; margin-bottom: 16px; }
.card.todo .card-sub { color: #a3a3ad; }
.card.todo .ghost-circle { background: #2c2c33; }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-list a { display: grid; grid-template-columns: 34px minmax(0, 1.2fr) 24px minmax(0, 1fr); gap: 12px; align-items: center;
  background: #24242a; border-radius: 16px; padding: 12px 14px; transition: background .15s; }
.todo-list a:hover { background: #2e2e35; }
.todo-list .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: #3a3a42; }
.todo-list .num.star { background: var(--accent); }
.todo-list .what { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.todo-list .what b { font-size: 16px; font-weight: 600; }
.todo-list .why { color: #c4c4cc; font-size: 14px; }
.todo-list .arrow { color: var(--accent-2); font-weight: 700; text-align: center; }
.todo-list .action { justify-self: start; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
  padding: 6px 13px; border-radius: 999px; }
.todo-empty { margin: 0; color: #c4c4cc; }

/* ===== 공통 컨트롤 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer;
  border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px; background: var(--card);
  box-shadow: var(--shadow); transition: transform .08s, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #e45c18; }
.btn.soft { background: var(--soft); box-shadow: none; }
.btn.line { background: transparent; border: 1px solid var(--line); box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .spacer { flex: 1; }
.tabs { display: inline-flex; background: var(--card); padding: 5px; border-radius: 999px; box-shadow: var(--shadow); gap: 2px; flex-wrap: wrap; }
.tabs a { padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 7px; align-items: center; }
.tabs a.on { background: var(--ink); color: #fff; }
.tabs a .n { font-size: 12px; opacity: .65; }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  padding: 7px 13px; border-radius: 999px; font-size: 13px; background: var(--card); color: var(--ink-2);
  border: 1px solid transparent; display: inline-flex; align-items: center; gap: 6px;
}
.fchip.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }

input[type=text], input[type=password], input[type=file], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 11px 14px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 22, 26, .07); }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
label.field { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.field > span { display: block; margin-bottom: 6px; }

/* ===== 리뷰 카드 ===== */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.rv { background: var(--card); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.rv-top { display: flex; align-items: center; gap: 8px; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; }
.stars .off { color: #d9d9df; }
.rv p { margin: 0; font-size: 15px; line-height: 1.55; }
.rv-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.mtags { display: flex; gap: 6px; flex-wrap: wrap; }
.mtag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 600; }
.mtag.positive { background: var(--accent-soft); color: #b8480f; }
.mtag.negative { background: #26262c; color: #fff; }
.mtag.negative .dot { background: #fff; }

/* ===== 답글 카드 ===== */
.rc { background: var(--card); border-radius: var(--r-xl); padding: 18px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; margin-bottom: 14px; transition: opacity .2s; }
.rc.htmx-request { opacity: .55; }
.rc-review { background: var(--soft); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.rc-review p { margin: 0; line-height: 1.55; }
.rc-reply { display: flex; flex-direction: column; gap: 10px; }
.rc-reply .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-reply .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rc-reply .hint { font-size: 12px; color: var(--muted); }
.posted-text { background: var(--soft); border-radius: 14px; padding: 12px 14px; line-height: 1.55; white-space: pre-wrap; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: 9px 12px; font-size: 13px; }

/* ===== 메뉴 카드 (파스텔) ===== */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mc { border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; position: relative; }
.mc:nth-child(6n+1) { background: var(--lav); }
.mc:nth-child(6n+2) { background: var(--sky); }
.mc:nth-child(6n+3) { background: var(--mint); }
.mc:nth-child(6n+4) { background: var(--peach); }
.mc:nth-child(6n+5) { background: var(--rose); }
.mc:nth-child(6n+6) { background: var(--lemon); }
.mc .top { display: flex; justify-content: space-between; align-items: center; }
.mc .tagw { background: rgba(255, 255, 255, .75); }
.mc h3 { margin: 6px 0 0; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.mc .alias { font-size: 12px; color: rgba(22, 22, 26, .55); min-height: 18px; }
.mc .stack { background: rgba(255, 255, 255, .6); height: 10px; }
.mc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.mc li { display: flex; gap: 8px; align-items: baseline; }
.mc li .dot { transform: translateY(-1px); }
.mc .sect { font-size: 11px; font-weight: 700; color: rgba(22, 22, 26, .5); letter-spacing: .02em; margin-top: 4px; }
.mc .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc details summary { list-style: none; cursor: pointer; font-size: 12px; color: rgba(22, 22, 26, .6); }
.mc details summary::-webkit-details-marker { display: none; }
.mc details[open] { background: rgba(255, 255, 255, .7); border-radius: 14px; padding: 10px; }
.mc.add { background: transparent; border: 2px dashed #cfcfd6; justify-content: center; }

/* ===== 설정 ===== */
.set-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.set-grid .card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.codebox { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre; overflow-x: auto; margin-bottom: 12px; }
.status-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.qr svg { width: 100%; height: auto; display: block; }

/* ===== 도움말 ===== */
.circle-btn .q { font-weight: 700; font-size: 16px; }
.help { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.help-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 16px; }
.help-toc a { padding: 7px 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.help-toc a:hover { background: var(--soft); color: var(--ink); }
.doc { padding: 30px 34px; line-height: 1.75; font-size: 15.5px; max-width: 860px; }
.doc h1 { font-size: 28px; margin: 0 0 8px; }
.doc h2 { font-size: 22px; margin: 34px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 10px; }
.doc h3 { font-size: 17px; margin: 22px 0 6px; scroll-margin-top: 16px; }
.doc p { margin: 8px 0; color: var(--ink-2); }
.doc ul, .doc ol { margin: 8px 0; padding-left: 22px; color: var(--ink-2); }
.doc li { margin: 4px 0; }
.doc strong { color: var(--ink); }
.doc code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 13.5px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.callout { border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-size: 14.5px; }
.callout.tip { background: var(--accent-soft); color: #8a3a0c; }
.callout.warn { background: var(--bad-soft); color: #a3262b; }
.table-wrap { overflow-x: auto; margin: 10px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--soft); font-weight: 600; }

/* ===== 환영 ===== */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1000px 600px at 15% 0%, #e9e2ff 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 100%, #ffe1cf 0%, transparent 60%), var(--bg); }
.welcome .card { max-width: 520px; width: 100%; padding: 34px; border-radius: 32px; }
.welcome h1 { font-size: 32px; margin: 18px 0 8px; }
.welcome p { color: var(--ink-2); margin: 0 0 22px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ===== 빈 상태 / 토스트 ===== */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 50;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); display: flex; align-items: center; gap: 8px;
  animation: toast 4.5s ease forwards; max-width: calc(100vw - 32px);
}
.toast .icon { color: var(--accent-2); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -12px); visibility: hidden; } }

/* ===== 반응형 ===== */
@media (max-width: 1180px) {
  .grid-top { grid-template-columns: 1fr 1fr; }
  .grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { padding: 14px 14px 110px; }
  h1 { font-size: 28px; }
  .topbar { margin-bottom: 18px; }
  .nav {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; background: #18181c;
    padding: 6px; box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .5); margin: 0;
  }
  .nav a { color: #c9c9d1; padding: 11px 15px; flex-direction: column; gap: 2px; font-size: 10px; }
  .nav a.active { background: #34343b; color: #fff; }
  .nav a:hover { background: #2a2a30; }
  .nav .lbl-long { display: none; }
  .nav .lbl-short { display: inline; }
  .nav a span { white-space: nowrap; }
  .top-right { margin-left: auto; }
  .kpis { gap: 22px; width: 100%; justify-content: space-between; }
  .kpi .value { font-size: 30px; }
  .grid-top { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .rc { grid-template-columns: 1fr; }
  .todo-list a { grid-template-columns: 30px 1fr; }
  .todo-list .arrow { display: none; }
  .todo-list .action { grid-column: 2; }
  .urgent-item { grid-template-columns: 1fr; gap: 6px; }
  .card.urgent .card-head { flex-direction: column; }
  .card.urgent h2 { font-size: 17px; }
  .list { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
  .help { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .doc { padding: 20px 18px; }
  .grid[style] { grid-template-columns: 1fr !important; }
  .seg a { min-width: 30px; padding: 0 8px; }
}

/* v1.3 · 직접 읽기 확인 · 위생 표시 버튼 · AI 근거 */
.mustread { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--lemon); cursor: pointer; font-size: 14px; }
.mustread input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.mustread small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.safety-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; margin-top: 4px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--muted);
  text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
.ai-quote { font-size: 13px; color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 6px 10px; }

/* v1.4 · 번역 · 손님 나라 */
.rtext p { margin: 0; }
.rtext .rt-orig { color: var(--ink-2); }
.rt-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.rt-bar .pill .icon { width: 13px; height: 13px; }
.origin-pill { font-size: 12px; }
.otable { width: 100%; border-collapse: collapse; font-size: 14px; }
.otable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.otable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.otable tr:last-child td { border-bottom: 0; }
.otable .who { white-space: nowrap; font-weight: 600; }
.otable .est { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.otable .menus { display: flex; flex-wrap: wrap; gap: 6px; }
.ocard { background: var(--card); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow); margin-top: 18px; }
.ocard .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ocard h2 { margin: 0; font-size: 18px; }
.table-scroll { overflow-x: auto; }
.lang-code { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2);
  background: var(--soft); border-radius: 6px; padding: 2px 6px; }
.country-edit { font-size: 12px; margin-top: 4px; }
.country-edit summary { list-style: none; display: inline; }
.country-edit summary::-webkit-details-marker { display: none; }
.country-edit select { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); }

/* v1.5 · 로그인 · 매장 메뉴 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.store-btn { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--card);
  border-radius: 999px; box-shadow: var(--shadow); max-width: 220px; }
.store-btn .avatar { width: 32px; height: 32px; font-size: 14px; box-shadow: none; flex: none; }
.store-btn .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-btn .chev { color: var(--muted); font-size: 11px; }
.menu-pop .lbl { font-size: 11px; color: var(--muted); padding: 6px 12px 2px; }
.menu-pop button.item { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.menu-pop button.item:hover { background: var(--soft); }
.menu-pop .cur { font-weight: 700; }
.store-list { display: flex; flex-direction: column; gap: 8px; }
.store-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px;
  background: var(--soft); border-radius: 12px; }
@media (max-width: 720px) { .store-btn .nm { display: none; } .store-btn { padding: 4px; } }
.pw-rules { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.pw-rules li { padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pw-rules li.ok { background: var(--good-soft); color: var(--good); }
.pw-rules li.ok::before { content: "✓ "; }
.mc .price { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
details.adv { margin: -4px 0 10px; font-size: 13px; }
details.adv summary { list-style: none; display: inline; }
details.adv summary::-webkit-details-marker { display: none; }
