/* 포스픽 모바일 — 한 손 조작, 큰 버튼. 색은 공개 사이트와 같은 계열 */
:root {
  --bg: #f6f7fb; --card: #ffffff; --text: #141a2e; --muted: #5b6478; --line: #e4e7ef;
  --brand: #ff5a1f; --brand-ink: #fff; --brand-soft: #fff1ea; --ok: #12a150; --ok-soft: #e6f6ec; --bad: #d93025; --bad-soft: #fde8e6;
  --req-bg: #fff6d6; --req-ink: #7a5600;
  --baemin: #19b5ae; --coupang: #2f6fe4; --yogiyo: #e8364f; --etc: #8a6cf0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320; --card: #1a2033; --text: #eef1f8; --muted: #a1a9bd; --line: #2b3350;
    --brand-soft: #34201a; --ok-soft: #12301f; --bad-soft: #3a1714; --req-bg: #3a3014; --req-ink: #f3d27a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.view { min-height: 100dvh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* 로그인 */
.login { max-width: 420px; margin: 0 auto; padding: calc(48px + env(safe-area-inset-top)) 20px 24px; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; margin-bottom: 8px; }
.logo img { width: 48px; height: 48px; border-radius: 12px; }
form { display: grid; gap: 14px; margin: 22px 0; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input { height: 52px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 17px; }
input:focus { outline: none; border-color: var(--brand); }
.msg { min-height: 20px; margin: 0; color: var(--bad); font-weight: 600; font-size: 14px; }

/* 버튼 */
.btn { min-height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.btn.primary { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn.ghost { box-shadow: none; background: transparent; color: var(--muted); }
.btn.big { min-height: 56px; font-size: 18px; }
.btn:disabled { opacity: .45; }
.link { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; padding: 8px; }
.icon { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text); display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.title { display: flex; flex-direction: column; min-width: 0; }
.title b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { font-size: 12.5px; color: var(--muted); }
.live.on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.live.off { color: var(--bad); font-weight: 700; }
.banner { margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: 14px; }
.banner.info { background: var(--brand-soft); color: var(--text); font-weight: 600; }

/* 목록 */
.sec { padding: 6px 14px 0; }
.sec h2 { font-size: 15px; margin: 14px 2px 8px; display: flex; align-items: center; gap: 8px; }
.count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--line); font-size: 13px; display: inline-grid; place-items: center; }
#newSec .count:not(:empty):not([data-zero]) { background: var(--brand); color: #fff; }
.list { display: grid; gap: 10px; }
.empty { padding: 18px; text-align: center; color: var(--muted); background: var(--card); border-radius: 14px; font-size: 14px; }
.card { background: var(--card); border-radius: 16px; padding: 14px; box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(0,0,0,.4); }
.card.new { box-shadow: inset 0 0 0 2px var(--brand), 0 10px 26px -16px rgba(255,90,31,.6); }
.card.flash { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { background: var(--brand-soft); } }
.head { display: flex; align-items: center; gap: 8px; }
.chip { padding: 4px 9px; border-radius: 8px; color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; background: var(--etc); }
.chip.BAEMIN { background: var(--baemin); } .chip.COUPANG_EATS { background: var(--coupang); } .chip.YOGIYO { background: var(--yogiyo); }
.no { font-size: 18px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ago { font-size: 13px; color: var(--muted); white-space: nowrap; }
.meta { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.items { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.items li { display: flex; gap: 8px; font-weight: 700; }
.items li b { margin-left: auto; }
.items li small { display: block; font-weight: 500; color: var(--muted); }
.req { margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: var(--req-bg); color: var(--req-ink); font-size: 14px; font-weight: 600; white-space: pre-wrap; }
.sum { margin-top: 8px; display: flex; justify-content: space-between; font-weight: 800; }
.acts { margin-top: 12px; display: flex; gap: 8px; }
.acts .btn { flex: 1; }
.state { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; font-weight: 700; color: var(--muted); }
.state.bad { background: var(--bad-soft); color: var(--bad); }
.done .card { padding: 10px 14px; }
.fold { width: 100%; margin: 14px 0 8px; padding: 12px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; text-align: left; display: flex; gap: 8px; align-items: center; }
.foot { text-align: center; margin: 24px 0 0; }

/* 탭: 주문 / 매출·메뉴 */
.tabs { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; padding: 8px 14px; background: var(--bg); }
.tabs button { min-height: 42px; border: 0; border-radius: 10px; background: var(--card); color: var(--muted); font: inherit; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.periods { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.periods button { flex: none; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.periods button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: none; }
.sales { padding: 0 14px; display: grid; gap: 10px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--card); border-radius: 14px; padding: 12px; }
.kpi span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 20px; }
.kpi.wide { grid-column: 1 / -1; }
.kpi.wide b { font-size: 26px; }
.box { background: var(--card); border-radius: 14px; padding: 12px 14px; }
.box h3 { margin: 0 0 8px; font-size: 15px; }
.bar { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.bar i { display: block; height: 10px; border-radius: 6px; background: var(--etc); min-width: 2px; }
.bar i.BAEMIN { background: var(--baemin); } .bar i.COUPANG_EATS { background: var(--coupang); } .bar i.YOGIYO { background: var(--yogiyo); }
.bar b { font-size: 13.5px; white-space: nowrap; }
.menu-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.menu-row:first-of-type { border-top: 0; }
.menu-row .n { font-weight: 700; }
.menu-row .q { font-weight: 800; text-align: right; }
.menu-row small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.menu-row .opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.menu-row .opts span { padding: 2px 8px; border-radius: 6px; background: var(--bg); font-size: 12.5px; color: var(--muted); }
.sortby { display: flex; gap: 6px; margin-bottom: 4px; }
.sortby button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 4px 6px; }
.sortby button[aria-pressed="true"] { color: var(--text); text-decoration: underline; }

/* 시트 */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheet-box { width: 100%; max-height: 85dvh; overflow: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.sheet-box h3 { margin: 0; font-size: 19px; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.times .btn { min-height: 58px; font-size: 18px; }
.times .btn.last { box-shadow: inset 0 0 0 2.5px var(--brand); }
.row { display: grid; gap: 6px; }
.row select { min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); }
.vol { display: flex; align-items: center; gap: 12px; }
.vol input { flex: 1; height: 32px; accent-color: var(--brand); }
.vol b { min-width: 48px; text-align: right; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.done-row { cursor: pointer; }
.head[data-act] { cursor: pointer; }
#installBanner .link { display: block; margin: 4px auto 0; }
.stores { display: grid; gap: 10px; padding: 14px; }
.stores .btn { text-align: left; min-height: 56px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; max-width: 92vw; padding: 12px 16px; border-radius: 12px; background: #141a2e; color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
