:root {
  --bg: #f3f4f6; --card: #ffffff; --ink: #111827; --ink2: #4b5563; --ink3: #9ca3af; --line: #e5e7eb;
  --bar: #111827; --bar-ink: #f9fafb;
  --earn: #1d4ed8; --earn-bg: #dbeafe;
  --deduct: #dc2626; --deduct-bg: #fee2e2;
  --wonple: #c2410c; --wonple-bg: #ffedd5;
  --cancel: #6b7280; --ok: #15803d; --ok-bg: #dcfce7;
  --focus: #f59e0b;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 16px; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
input, select { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); }
.row { display: flex; align-items: center; gap: 8px; } .grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 10px; }
.hidden { display: none !important; }

/* ---------- 상단/하단 바 ---------- */
.shell { display: flex; flex-direction: column; height: 100dvh; }
.topbar { background: var(--bar); color: var(--bar-ink); display: flex; align-items: center; gap: 10px; padding: 7px 14px; min-height: 48px; }
.topbar .store { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 4px; }
.topbar .store.switch::after { content: "▾"; font-size: 12px; opacity: .7; }
.topbar .who { margin-left: auto; text-align: right; font-size: 13px; line-height: 1.25; }
.topbar .who b { font-size: 15px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.admin { background: #fde68a; color: #78350f; } .badge.sub { background: #bfdbfe; color: #1e3a8a; } .badge.staff { background: #e5e7eb; color: #374151; }
.lockbtn { background: #374151; color: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.main { flex: 1; overflow-y: auto; padding: 14px 14px 20px; -webkit-overflow-scrolling: touch; }
.tabs { display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs button { flex: 1; padding: 7px 0 9px; font-size: 13px; font-weight: 700; color: var(--ink3); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tabs button .ic { font-size: 20px; line-height: 1; }
.tabs button.on { color: var(--ink); }
.tabs button.on .ic { transform: scale(1.1); }
.datebar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.datebar input { width: auto; flex: 1; padding: 10px 12px; }
.datebar .arrow { background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; font-size: 18px; }

/* ---------- 카드/리스트 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card + .card { margin-top: 12px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.list { background: #fff; border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
.item:active { background: #f9fafb; }
.item .t1 { font-weight: 700; } .item .t2 { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.item .right { margin-left: auto; text-align: right; flex-shrink: 0; }
.pt { font-weight: 800; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--ink3); padding: 36px 10px; }
.sectiontitle { font-size: 13px; color: var(--ink2); font-weight: 700; margin: 18px 4px 8px; }

.btn { border-radius: 12px; padding: 14px 16px; font-weight: 800; font-size: 16px; background: #e5e7eb; color: var(--ink); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.earn { background: var(--earn); color: #fff; } .btn.deduct { background: var(--deduct); color: #fff; } .btn.wonple { background: var(--wonple); color: #fff; }
.btn.buy { background: #0f766e; color: #fff; } .btn.move { background: #6d28d9; color: #fff; }
.btn.ghost { background: #fff; border: 1px solid var(--line); }
.btn.danger { background: var(--deduct-bg); color: var(--deduct); }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }

.chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.chip { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.tag.earn { background: var(--earn-bg); color: var(--earn); } .tag.deduct { background: var(--deduct-bg); color: var(--deduct); }
.tag.wonple { background: var(--wonple-bg); color: var(--wonple); }
.tag.buy { background: #ccfbf1; color: #0f766e; } .tag.move_out, .tag.move_in { background: #ede9fe; color: #6d28d9; } .tag.cancel, .tag.adjust { background: #e5e7eb; color: #374151; }
.strike { text-decoration: line-through; opacity: .5; }
.plus { color: var(--earn); } .minus { color: var(--deduct); }

/* ---------- 로그인 ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px calc(24px + var(--safe-b)); background: var(--bar); color: #fff; }
.login h1 { font-size: 22px; margin: 0 0 4px; }
.login .sub { color: #9ca3af; font-size: 14px; margin-bottom: 26px; text-align: center; }
.dots { display: flex; gap: 14px; margin-bottom: 14px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #6b7280; }
.dots i.on { background: #fbbf24; border-color: #fbbf24; }
.dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.login .err { min-height: 22px; color: #fca5a5; font-size: 14px; margin-bottom: 10px; text-align: center; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 320px; }
.pad button { height: 64px; border-radius: 16px; font-size: 26px; font-weight: 700; background: #1f2937; color: #fff; }
.pad button:active { background: #374151; }
.pad button.fn { font-size: 16px; background: transparent; color: #9ca3af; }
.login .device { margin-top: 26px; font-size: 13px; color: #9ca3af; text-align: center; }
.login .device button { color: #fbbf24; text-decoration: underline; font-size: 13px; }

/* ---------- 포스 (회원 처리) ---------- */
.search { position: sticky; top: -14px; background: var(--bg); padding-bottom: 10px; z-index: 2; display: flex; gap: 8px; }
.search input { font-size: 18px; padding: 14px; }
.member-head { background: var(--bar); color: #fff; border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.member-head .name { font-size: 20px; font-weight: 800; }
.member-head .phone { color: #9ca3af; font-size: 13px; }
.member-head .point { margin-left: auto; text-align: right; }
.member-head .point b { font-size: 24px; font-variant-numeric: tabular-nums; }
.member-head .point small { display: block; color: #fbbf24; font-size: 12px; font-weight: 700; }
.back { color: #fff; font-size: 22px; padding: 4px 8px 4px 0; }
.pos-wrap { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "fields" "quick" "keys" "actions" "pending" "recent"; }
.a-pending { grid-area: pending; }
.pending { display: flex; gap: 8px; align-items: stretch; background: #fff; border-radius: 14px; padding: 6px; border: 2px solid var(--line); min-height: 58px; }
.pchips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; align-content: center; max-height: 72px; overflow-y: auto; scrollbar-width: none; }
.pchip { display: flex; align-items: center; gap: 2px; padding: 3px 2px 3px 7px; border-radius: 8px; font-size: 13px; white-space: nowrap; background: #f3f4f6; }
.pchip.earn { background: var(--earn-bg); } .pchip.deduct { background: var(--deduct-bg); } .pchip.wonple { background: var(--wonple-bg); }
.pchip.buy { background: #ccfbf1; } .pchip.move_out { background: #ede9fe; }
.pchip .x { font-size: 17px; color: var(--ink2); padding: 0 5px; line-height: 1; }
.btn.done { background: #16a34a; color: #fff; min-width: 116px; font-size: 19px; padding: 6px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.btn.done small { font-size: 12px; font-weight: 700; opacity: .9; }
.btn.done:disabled { background: #d1d5db; color: #6b7280; opacity: 1; }
.member-head .point small.after { color: #93c5fd; }
.member-head .point small.after.minus { color: #fca5a5; }
.a-head { grid-area: head; } .a-fields { grid-area: fields; } .a-quick { grid-area: quick; }
.a-keys { grid-area: keys; } .a-actions { grid-area: actions; } .a-recent { grid-area: recent; margin-top: 4px; }
.fields { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.field { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; text-align: left; }
.field.on { border-color: var(--focus); box-shadow: 0 0 0 3px #fef3c7; }
.field label { font-size: 12px; color: var(--ink2); font-weight: 700; display: block; }
.field .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; min-height: 34px; }
.field .v:empty::after { content: attr(data-ph); color: var(--ink3); font-weight: 600; font-size: 18px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick button { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 0; font-weight: 800; font-size: 17px; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { background: #fff; border-radius: 14px; height: clamp(50px, 7dvh, 74px); font-size: 30px; font-weight: 800; box-shadow: 0 2px 0 var(--line); }
.keys button.wide { grid-column: span 2; }
.keys button:active { background: #e5e7eb; }
.keys button.fn { font-size: 15px; color: var(--ink2); }
.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.actions .btn { padding: 16px 0; font-size: 18px; }
.actions.two { grid-template-columns: 1fr 1fr; }
.actions.two .btn { padding: 12px 0; font-size: 16px; }
.field .sub { font-size: 12px; color: var(--ink2); min-height: 15px; }
.actions .btn small { display: block; font-size: 11px; opacity: .85; font-weight: 600; }
.queue .q { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.queue .q:last-child { border-bottom: 0; }
.queue .q .x { color: var(--ink3); font-size: 20px; padding: 0 6px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 2px solid var(--ink); margin-top: 6px; font-weight: 800; }
.total .big { font-size: 22px; }
.exec { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(transparent, var(--bg) 30%); }
.exec .btn { width: 100%; font-size: 20px; padding: 18px; }
@media (min-width: 820px) and (orientation: portrait) {
  .pos-wrap { max-width: 760px; margin: 0 auto; }
}

/* ---------- 리포트 ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 12px; }
.kpi .l { font-size: 12px; color: var(--ink2); font-weight: 700; }
.kpi .v { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi .v small { font-size: 13px; font-weight: 700; color: var(--ink2); }
.kpi.wonple { background: var(--wonple-bg); } .kpi.wonple .v { color: var(--wonple); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.mcell { background: #fff; border-radius: 10px; padding: 6px 4px; text-align: center; border: 1px solid var(--line); }
.mcell .n { font-size: 11px; color: var(--ink3); font-weight: 700; }
.mcell .k { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mcell.has { background: var(--earn-bg); border-color: #93c5fd; }
.mcell.has .k { color: var(--earn); }
.mcell.zero .k { color: var(--ink3); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--ink2); font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.t td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.t td.r, table.t th.r { text-align: right; }

/* ---------- 모달 ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fade .15s; padding: 16px; }
.modal { background: #fff; width: 100%; max-width: 480px; border-radius: 20px; padding: 20px 18px; max-height: 88dvh; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow-y: auto; animation: up .2s; }

.modal h2 { margin: 0 0 14px; font-size: 19px; }
.modal .btns { display: flex; gap: 8px; margin-top: 16px; }
.modal .btns .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: scale(.94); opacity: .5; } }
.result { text-align: center; }
.result .lines { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; text-align: left; margin: 14px 0; font-size: 17px; }
.result .lines b { text-align: right; font-variant-numeric: tabular-nums; }
.result .now { font-size: 30px; font-weight: 900; }
.codebox { font-size: 40px; font-weight: 900; letter-spacing: 8px; text-align: center; background: #fef3c7; border-radius: 14px; padding: 16px 0; margin: 10px 0; font-variant-numeric: tabular-nums; }
.seg { display: flex; background: #f3f4f6; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 10px 0; border-radius: 9px; font-weight: 700; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.form label.l { font-size: 13px; font-weight: 700; color: var(--ink2); margin: 12px 0 6px; display: block; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row input[type=number], .switch-row input[type=time] { width: 110px; text-align: right; padding: 8px 10px; }
.switch-row input[type=checkbox] { width: 24px; height: 24px; }

#toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%) translateY(-20px); background: #111827; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--deduct); }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid #fff6; border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }

#updbar { position: fixed; left: 12px; right: 12px; top: 60px; z-index: 90; background: #f59e0b; color: #111827; font-weight: 800; padding: 12px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* ================= 가로 모드 ================= */
@media (orientation: landscape) {
  /* 상단바와 메뉴를 한 줄(38px)로 합쳐서 작업 화면을 최대로 */
  .shell { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 38px minmax(0, 1fr); grid-template-areas: "top tabs" "main main"; }
  .topbar { grid-area: top; min-height: 0; height: 38px; padding: 0 10px 0 12px; gap: 8px; }
  .topbar .store { font-size: 15px; }
  .topbar .who { margin-left: 4px; font-size: 12px; white-space: nowrap; } .topbar .who b { font-size: 13px; }
  .topbar .who br, .topbar .who .faint { display: none; }
  .topbar .badge { font-size: 11px; padding: 1px 6px; }
  .lockbtn { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
  .main { grid-area: main; min-height: 0; }
  .tabs { grid-area: tabs; background: var(--bar); border-top: 0; padding: 0 6px 0 0; height: 38px; justify-content: flex-end; }
  .tabs button { flex: 0 1 120px; flex-direction: row; justify-content: center; gap: 5px; padding: 0; font-size: 13px; color: #9ca3af; border-radius: 0; }
  .tabs button .ic { font-size: 15px; }
  .tabs button.on { color: #fff; box-shadow: inset 0 -3px 0 #f59e0b; }
  .tabs button.on .ic { transform: none; }
  .main { padding: 10px 14px 14px; }
  .main > :not(.pos-wrap) { max-width: 1100px; margin-left: auto; margin-right: auto; }
  .main.pos-main { overflow: hidden; display: flex; flex-direction: column; }

  /* 포스: 왼쪽(숫자칸+키패드) / 오른쪽(손님+빠른버튼+처리버튼+내역) */
  .pos-wrap { flex: 1; min-height: 0; gap: 8px 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    grid-template-areas: "fields head" "keys quick" "keys actions" "keys pending" "keys recent"; }
  .a-keys { grid-auto-rows: 1fr; align-self: stretch; height: 100%; }
  .keys button { height: auto; min-height: 40px; font-size: clamp(22px, 5.5dvh, 34px); }
  .a-recent { overflow-y: auto; min-height: 0; margin-top: 0; }
  .member-head { padding: 10px 14px; }
  .member-head .point b { font-size: 22px; }
  .field { padding: 6px 12px; }
  .field .v { font-size: 24px; min-height: 30px; }
  .quick button { padding: 9px 0; }
  .actions .btn { padding: 11px 0; font-size: 17px; }
  .actions.two .btn { padding: 9px 0; font-size: 15px; }
  .actions .btn small { font-size: 10px; }

  /* 로그인: 왼쪽 안내 / 오른쪽 숫자판 */
  .login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "info pad" "foot pad";
    align-content: center; justify-items: center; column-gap: 32px; padding: 16px 24px; }
  .login-info { grid-area: info; display: flex; flex-direction: column; align-items: center; align-self: end; }
  .login-foot { grid-area: foot; align-self: start; }
  .login .pad { grid-area: pad; }
  .login .sub { margin-bottom: 18px; }
  .login .device { margin-top: 10px; }
}
/* 가로 + 화면 높이가 낮은 폰: 더 촘촘하게 */
@media (orientation: landscape) and (max-height: 520px) {
  .pending { min-height: 46px; padding: 4px; } .btn.done { font-size: 16px; min-width: 96px; }
  .tabs button .ic { display: none; }
  .main { padding: 8px 12px 10px; }
  .pos-wrap { gap: 6px 12px; }
  .member-head { padding: 6px 12px; } .member-head .name { font-size: 17px; } .member-head .phone { display: none; }
  .member-head .point b { font-size: 19px; }
  .field label { font-size: 11px; } .field .v { font-size: 20px; min-height: 26px; } .field .sub { min-height: 0; font-size: 11px; }
  .quick button { padding: 7px 0; font-size: 15px; }
  .actions .btn { padding: 8px 0; font-size: 16px; } .actions .btn small { display: none; }
  .actions.two .btn { padding: 7px 0; font-size: 14px; }
  .login .pad button { height: 52px; }
  .modal { padding: 14px 16px; }
  .modal .lines { margin: 8px 0 !important; gap: 6px 16px !important; }
}

/* ================= 포스 화면 v2 (기존 유포스 배치 참고) ================= */
:root { --pad: #1f2a3a; --pad2: #334155; }
.pos-wrap { grid-template-areas: "info" "keys" "actions" "list"; gap: 8px; }
.a-info { grid-area: info; } .a-list { grid-area: list; }
.pinfo { background: #fff; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.prow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lab { font-size: 13px; color: #374151; font-weight: 800; white-space: nowrap; }
.val { background: var(--pad); color: #fff; border-radius: 8px; padding: 6px 10px; flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val.name { font-size: 19px; } .val.phone { font-size: 15px; flex: 1.3; }
.val.pt { color: #f87171; font-size: 28px; text-align: right; line-height: 1.15; }
.val.pt .after { display: block; font-size: 12px; color: #93c5fd; font-weight: 700; }
.val.pt .after.lack { color: #fca5a5; } .val.pt .after:empty { display: none; }
.pback { font-size: 26px; font-weight: 800; color: var(--ink); padding: 0 6px 0 2px; line-height: 1; }
.pmenu { font-size: 22px; font-weight: 900; color: var(--ink2); padding: 0 6px; line-height: 1; }
.ibox { flex: 1; min-width: 0; border-radius: 8px; background: var(--pad); color: #fff; padding: 4px 10px; border: 3px solid transparent;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-height: 54px; }
.ibox .v { font-size: 28px; font-weight: 900; line-height: 1.1; }
.ibox .sub { font-size: 11px; color: #cbd5e1; min-height: 0; }
.ibox.on { background: #1d4ed8; border-color: #fbbf24; }
.pkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pkeys button { background: var(--pad); color: #fff; border-radius: 10px; font-size: 30px; font-weight: 800; height: clamp(48px, 6.6dvh, 72px); }
.pkeys button:active { background: #475569; }
.pkeys button.q { font-size: 20px; background: var(--pad2); color: #fde68a; }
.pacts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pbtn { grid-column: span 2; color: #fff; font-weight: 900; font-size: 18px; border-radius: 10px; padding: 14px 2px; }
.pbtn.buy, .pbtn.move { grid-column: span 3; font-size: 15px; padding: 9px 2px; }
.pbtn.earn { background: #1d4ed8; } .pbtn.deduct { background: #dc2626; } .pbtn.wonple { background: #16a34a; }
.pbtn.buy { background: #0f766e; } .pbtn.move { background: #6d28d9; }
.pbtn:disabled { opacity: .35; font-size: 13px; }
.pbtn:active { filter: brightness(1.2); }
.qlist { background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); min-height: 0; }
.qhead { background: var(--pad); color: #fff; text-align: center; font-weight: 800; padding: 6px; font-size: 14px; }
.qcards { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; min-height: 0; max-height: 132px; }
.qcard { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-left: 5px solid #9ca3af; border-radius: 8px; padding: 4px 2px 4px 8px; background: #f9fafb; }
.qcard.earn { border-left-color: #1d4ed8; } .qcard.deduct { border-left-color: #dc2626; } .qcard.wonple { border-left-color: #16a34a; }
.qcard.buy { border-left-color: #0f766e; } .qcard.move { border-left-color: #6d28d9; }
.ql { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 700; line-height: 1.2; }
.qt { font-size: 11px; font-weight: 800; color: var(--ink2); }
.qcard b { font-size: 15px; white-space: nowrap; }
.qx { font-size: 20px; color: var(--ink3); padding: 0 8px; }
.qempty { white-space: pre-line; text-align: center; color: var(--ink3); font-size: 13px; padding: 10px 4px; }
.qfoot { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.qtotal { display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 900; background: var(--pad); color: #fff; border-radius: 8px; padding: 4px; }
.qtotal.plus { color: #93c5fd; } .qtotal.minus { color: #fca5a5; }
.qclear { background: #dc2626; color: #fff; font-weight: 800; border-radius: 8px; padding: 10px 0; font-size: 14px; }
.qdone { background: #1d4ed8; color: #fff; font-weight: 900; font-size: 20px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; min-height: 50px; }
.qdone small { font-size: 11px; font-weight: 700; opacity: .9; }
.qdone:disabled { background: #9ca3af; }

@media (orientation: landscape) {
  .pos-wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .85fr);
    grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "info keys list" "actions keys list"; gap: 8px 10px; }
  .pinfo { justify-content: space-around; }
  .pkeys { grid-auto-rows: 1fr; height: 100%; }
  .pkeys button { height: auto; min-height: 0; font-size: clamp(22px, 6dvh, 36px); }
  .qcards { max-height: none; }
  .qfoot { grid-template-columns: 1fr 1fr; }
  .qtotal { grid-column: span 2; }
  .qdone { min-height: 0; padding: 8px 0; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pinfo { padding: 6px; gap: 4px; }
  .val { padding: 4px 8px; } .val.name { font-size: 16px; } .val.phone { font-size: 13px; } .val.pt { font-size: 22px; }
  .ibox { min-height: 44px; } .ibox .v { font-size: 22px; }
  .lab { font-size: 12px; }
  .pbtn { padding: 10px 2px; font-size: 16px; } .pbtn.buy, .pbtn.move { padding: 7px 2px; font-size: 13px; }
  .qtotal { font-size: 16px; } .qclear { padding: 7px 0; } .qdone { font-size: 17px; }
}

.val.name { display: flex; align-items: baseline; gap: 8px; }
.val.name b { flex-shrink: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.val.name small { font-size: 13px; color: #cbd5e1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (orientation: landscape) and (max-height: 520px) { .val.name small { font-size: 11px; } }

/* v2.1: 가로 — 리스트를 가운데(좁게), 키패드를 오른쪽 / 리스트 전체적으로 작게 */
.qhead { padding: 4px; font-size: 13px; }
.qcards { padding: 4px; gap: 4px; max-height: 96px; }
.qcard { padding: 2px 0 2px 6px; border-left-width: 4px; }
.ql { font-size: 13px; } .qt { font-size: 10px; }
.qcard b { font-size: 13px; }
.qx { font-size: 18px; padding: 0 6px; }
.qempty { font-size: 12px; padding: 6px 2px; }
.qfoot { padding: 4px; gap: 4px; }
.qtotal { font-size: 16px; }
.qclear { padding: 8px 0; font-size: 13px; }
.qdone { font-size: 18px; min-height: 44px; }
@media (orientation: landscape) {
  .pos-wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, .62fr) minmax(0, 1fr);
    grid-template-areas: "info list keys" "actions list keys"; }
  .qcards { max-height: none; }
  .qfoot { grid-template-columns: 1fr; }
  .qtotal { grid-column: auto; }
  .qdone { min-height: 0; padding: 10px 0; font-size: 19px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .qdone { padding: 6px 0; font-size: 16px; } .qclear { padding: 5px 0; }
  .qtotal { font-size: 14px; padding: 2px; }
}

/* v2.2: 리스트 카드 한 줄 */
.qcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 5px; white-space: nowrap; }
.qcard .qt { font-size: 12px; font-weight: 900; color: var(--ink); }
.qcard.earn .qt { color: #1d4ed8; } .qcard.deduct .qt { color: #dc2626; } .qcard.wonple .qt { color: #16a34a; }
.qcard.buy .qt { color: #0f766e; } .qcard.move .qt { color: #6d28d9; }
.qcard .ql { display: block; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.qcard b { font-size: 14px; }
.qx { padding: 0 5px; }

/* v2.3: 전체 글씨 굵게 + 회원명·기계번호·입력포인트 칸 크게 */
body { font-weight: 600; }
b, strong, h1, h2, h3, .t1, .pt, .btn, .tabs button, .chip, .kpi .v, .lab { font-weight: 800; }
.btn, .pbtn, .qdone, .qclear, .pkeys button, .pad button, .val, .ibox .v, .qtotal, .kpi .v { font-weight: 900; }
.t2, .faint, .muted, small { font-weight: 600; }
input { font-weight: 700; }
.lab { font-size: 14px; color: #1f2937; }
.val.name { padding: 8px 12px; } .val.name b { font-size: 22px; } .val.name small { font-size: 14px; }
.val.pt { font-size: 30px; }
.ibox { min-height: 66px; } .ibox .v { font-size: 34px; } .ibox .sub { font-size: 12px; }
@media (orientation: landscape) {
  .pinfo { justify-content: space-between; gap: 8px; }
  .pinfo .prow { flex: 1; align-items: stretch; }
  .pinfo .prow > .lab, .pinfo .prow > .pback, .pinfo .prow > .pmenu { align-self: center; }
  .val.name { display: flex; align-items: center; }
  .val.pt { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; font-size: clamp(24px, 6.5dvh, 38px); }
  .ibox { min-height: 0; } .ibox .v { font-size: clamp(26px, 7.5dvh, 44px); }
  .val.name b { font-size: clamp(18px, 5dvh, 26px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .val.name small { font-size: 12px; }
  .lab { font-size: 12px; }
}

/* v2.4: 버튼 배치 — 위: 적립·차감 / 아래: 원플·코인구매·코인이동 */
.pbtn.earn, .pbtn.deduct { grid-column: span 3; font-size: 22px; }
.pbtn.wonple, .pbtn.buy, .pbtn.move { grid-column: span 2; font-size: 16px; padding: 10px 2px; }
@media (orientation: landscape) and (max-height: 520px) {
  .pbtn.earn, .pbtn.deduct { font-size: 18px; } .pbtn.wonple, .pbtn.buy, .pbtn.move { font-size: 14px; padding: 7px 2px; }
}

/* 시간 내역 */
.ttime { flex-shrink: 0; width: 52px; text-align: center; font-size: 17px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.ttime small { display: block; font-size: 11px; color: var(--ink3); }
.mfilter { display: flex; gap: 8px; margin-bottom: 10px; }
.mfilter .minp { flex: 1; padding: 10px 12px; font-size: 17px; }
.histsum { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); margin: 0 4px 8px; font-weight: 700; }
.histsum b { font-size: 16px; }
button.mcell { font: inherit; cursor: pointer; }
.mcell.has:active, .mcell.zero:active { filter: brightness(.92); }

.xcancel { margin-top: 4px; padding: 2px 8px; font-size: 12px; font-weight: 800; color: #b91c1c; background: #fee2e2; border-radius: 6px; }

.histsum { flex-wrap: wrap; }
.sumline { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; color: var(--ink2); }
.sumline b { font-size: 16px; }

/* v2.5: 이름·포인트 칸 낮게, 적립·차감 버튼 높게 */
.val.name { padding: 4px 10px; }
.val.pt { padding: 4px 10px; font-size: 26px; }
.pbtn.earn, .pbtn.deduct { padding: 22px 2px; font-size: 24px; }
@media (orientation: landscape) {
  .pos-wrap { grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); }
  .pinfo .prow:nth-child(1), .pinfo .prow:nth-child(2) { flex: 0 0 auto; }
  .pinfo .prow:nth-child(3) { flex: 1; }
  .val.name { min-height: 0; }
  .val.name b { font-size: clamp(16px, 4.2dvh, 22px); }
  .val.pt { font-size: clamp(20px, 5.5dvh, 30px); }
  .pacts { height: 100%; grid-template-rows: 1.6fr 1fr; }
  .pbtn { padding: 0 2px; }
  .pbtn.earn, .pbtn.deduct { font-size: clamp(20px, 6dvh, 30px); padding: 0 2px; }
  .pbtn.wonple, .pbtn.buy, .pbtn.move { padding: 0 2px; }
}

/* v2.6: 완료 버튼 2배 높이, 리스트는 넘치면 안에서 스크롤 */
.qcards { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.qdone { min-height: 76px; font-size: 22px; }
.qdone small { font-size: 13px; }
@media (orientation: landscape) {
  .qlist { height: 100%; }
  .qcards { flex: 1 1 0; min-height: 0; max-height: none; }
  .qdone { min-height: 0; padding: 0; height: clamp(64px, 20dvh, 150px); font-size: clamp(20px, 6dvh, 30px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .qdone { height: clamp(58px, 19dvh, 90px); font-size: 20px; }
}

.unpaid-inp { padding: 8px; font-size: 18px; font-weight: 800; min-width: 0; }
.kpi .btn.sm { white-space: nowrap; flex-shrink: 0; }

.srow { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 2px; font-weight: 800; }
.srow.big b { font-size: 22px; }
.srow.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 10px; font-size: 17px; }
.srow.total b { font-size: 26px; }
.ssub { font-size: 12px; color: var(--ink2); padding: 0 2px 4px; font-weight: 700; }

/* v2.7 외상 O/X + 특이사항 */
.credit { display: inline-flex; align-items: center; flex-shrink: 0; font-size: 11px !important; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 6px; white-space: nowrap; vertical-align: middle; }
.credit.o { background: #dcfce7; color: #15803d; }
.credit.x { background: #e5e7eb; color: #6b7280; }
.val.name .credit { align-self: center; }
.val.name .credit.o { background: #16a34a; color: #fff; }
.val.name .credit.x { background: rgba(255,255,255,.14); color: #cbd5e1; }
.val.name small.pmemo { color: #fde68a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.oxpick { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid #d1d5db; }
.oxpick .ox { min-width: 52px; height: 38px; border: 0; background: #f3f4f6; color: #9ca3af; font-size: 18px; font-weight: 800; }
.oxpick .ox.o.on { background: #16a34a; color: #fff; }
.oxpick .ox.x.on { background: #6b7280; color: #fff; }
.val.name .memodot { flex-shrink: 0; align-self: center; font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 6px; background: #f59e0b; color: #111827; line-height: 1; }
.val.name.hasmemo { cursor: pointer; }
.form.reg > div > .l { display: block; }
@media (orientation: landscape) and (max-height: 600px) {
  .form.reg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; align-items: end; }
  .form.reg .switch-row { margin: 0; }
}

/* v2.8 취소 내역: 누가·언제·왜 */
.t2.cline { color: #b91c1c; font-weight: 700; }
.t2 .cwho { color: #b91c1c; }
.tag.cancel { background: #fee2e2; color: #b91c1c; }

/* v2.9 가로모드: 메뉴 줄을 화면 맨 아래로 */
@media (orientation: landscape) {
  .shell { grid-template-rows: minmax(0, 1fr) calc(40px + env(safe-area-inset-bottom)); grid-template-areas: "main main" "top tabs"; }
  .topbar, .tabs { height: auto; padding-bottom: env(safe-area-inset-bottom); }
  .topbar { border-top: 1px solid rgba(255,255,255,.08); }
  .tabs { border-top: 1px solid rgba(255,255,255,.08); }
  .tabs button.on { box-shadow: inset 0 3px 0 #f59e0b; }
  #toast { top: 12px; }
  #updbar { top: 12px; }
}

/* v2.10 포스 손님칸: 1줄 이름+전화번호(항상 전부), 2줄 외상+특이사항(그대로) */
.val.name.two { display: flex !important; flex-direction: column; align-items: stretch !important; justify-content: center; gap: 3px; white-space: normal; overflow: visible; }
.val.name.two .nl1 { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.val.name.two .nl1 b { flex: 0 1 auto; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val.name.two .nl1 .ph { flex: 0 0 auto; margin-left: auto; font-size: clamp(14px, 3.4dvh, 18px); color: #e5e7eb; font-weight: 800; white-space: nowrap; letter-spacing: .2px; }
.val.name.two .nl2 { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.val.name.two .nl2 .credit { flex: 0 0 auto; margin-top: 1px; }
.val.name.two .pmemo { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; color: #fde68a; font-weight: 700; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.val.name.two .pmemo.none { color: #6b7280; font-weight: 600; }
@media (orientation: landscape) { .pinfo .prow:first-child { flex: 0 0 auto; } }
.val.name.two .pmemo { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pinfo { min-height: 0; }
.pinfo .prow:nth-child(3) { min-height: 0; }
@media (orientation: landscape) and (max-height: 420px) { .val.name.two .pmemo { font-size: 12px; } .val.name.two { gap: 1px; padding-top: 3px; padding-bottom: 3px; } }

/* v3.0 메뉴바 없앰 → 메인 화면 타일 */
.shell.nomenu .tabs { display: none; }
.homebtn { background: #f59e0b; color: #111827; font-weight: 900; border-radius: 10px; padding: 7px 12px; font-size: 14px; white-space: nowrap; }
.curtab { color: #e5e7eb; font-weight: 800; font-size: 14px; white-space: nowrap; }
.main.home-main, .main.quick-main { display: flex; flex-direction: column; }
.home { flex: 1; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(96px, 1fr); max-width: none !important; width: 100%; }
.home .htile.big { grid-column: 1 / -1; }
.htile { background: #fff; border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.htile .hic { font-size: 34px; line-height: 1; }
.htile b { font-size: 20px; font-weight: 900; }
.htile small { font-size: 12px; color: var(--ink3); font-weight: 700; text-align: center; }
.htile.big { background: linear-gradient(135deg, #1d4ed8, #b91c1c); color: #fff; border: 0; }
.htile.big b { font-size: 30px; } .htile.big .hic { font-size: 44px; } .htile.big small { color: #e5e7eb; font-size: 14px; }
.htile:active { transform: scale(.98); }

.qview { flex: 1; min-height: 0; display: grid; gap: 14px; grid-template-rows: auto minmax(0, 1fr); max-width: none !important; width: 100%; }
.qleft { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.qtitle { font-size: 18px; font-weight: 900; text-align: center; }
.qdigits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; width: 100%; margin: 0 auto; }
.qd { height: 76px; border-radius: 14px; background: var(--pad); color: #fff; font-size: 44px; font-weight: 900; display: flex; align-items: center; justify-content: center; border: 3px solid transparent; }
.qd.on { border-color: #f59e0b; }
.qresult { display: flex; flex-direction: column; gap: 8px; min-height: 0; align-items: stretch; }
.qhint { text-align: center; color: var(--ink3); font-weight: 800; font-size: 15px; }
.qhint.err { color: var(--deduct); }
.qlist { overflow-y: auto; min-height: 0; flex: 1; }
.qview .qpad { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(56px, 1fr); gap: 10px; min-height: 0; }
.qpad button { background: var(--pad); color: #fff; border-radius: 16px; font-size: 40px; font-weight: 900; }
.qpad button.fn { background: #374151; font-size: 22px; }
.qpad button:active { filter: brightness(1.3); }

@media (orientation: landscape) {
  .shell.nomenu { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) calc(40px + env(safe-area-inset-bottom)); grid-template-areas: "main" "top"; }
  .shell.nomenu .topbar { padding-right: 10px; }
  .homebtn { padding: 4px 12px; font-size: 13px; }
  .home { grid-template-columns: 1.6fr 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; grid-auto-rows: 1fr; }
  .home .htile.big { grid-column: 1; grid-row: 1 / span 2; }
  .home.n5 { grid-template-columns: 1.6fr 1fr 1fr; } .home.n4 { grid-template-columns: 1.6fr 1fr 1fr; } .home.n3 { grid-template-columns: 1.6fr 1fr; }
  .qview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr); }
  .qleft { justify-content: flex-start; padding-top: 4px; }
  .qd { height: clamp(56px, 18dvh, 110px); font-size: clamp(36px, 12dvh, 72px); }
  .qpad { grid-template-rows: repeat(4, 1fr); }
  .qpad button { font-size: clamp(28px, 8dvh, 52px); }
  .htile .hic { font-size: clamp(24px, 6dvh, 40px); } .htile b { font-size: clamp(16px, 4.5dvh, 24px); }
  .htile.big b { font-size: clamp(24px, 7dvh, 40px); } .htile.big .hic { font-size: clamp(32px, 10dvh, 64px); }
}
@media (orientation: portrait) {
  .qpad { grid-template-rows: repeat(4, 1fr); }
  .home .htile.big { min-height: 160px; }
}
@media (orientation: landscape) { .shell.nomenu .topbar .who { margin-left: auto; } }
.qview { grid-template-columns: minmax(0, 1fr); }
@media (orientation: portrait) { .qview .qpad { grid-template-columns: repeat(3, 1fr); } .shell.nomenu .curtab { display: none; } .qview .qd { height: 80px; } }
@media (orientation: landscape) { .qview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.shell.nomenu .topbar .store, .lockbtn { white-space: nowrap; }
@media (orientation: portrait) { .shell.nomenu .topbar .who .faint, .shell.nomenu .topbar .who br { display: none; } .shell.nomenu .topbar { gap: 8px; } }

/* v3.1 회원조회 */
.main.lookup-main { display: flex; flex-direction: column; }
.lookup { flex: 1; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); max-width: none !important; width: 100%; }
.lkcard { background: var(--pad); color: #fff; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.lkhead { display: flex; align-items: center; gap: 6px; }
.lkhead .pback { color: #fff; }
.lkname { font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.lkname .credit.o { background: #16a34a; color: #fff; } .lkname .credit.x { background: rgba(255,255,255,.14); color: #cbd5e1; }
.lkphone { font-size: 18px; font-weight: 800; color: #e5e7eb; }
.lkmemo { background: rgba(253,230,138,.12); color: #fde68a; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 14px; line-height: 1.4; white-space: pre-wrap; }
.lkmemo.none { color: #9ca3af; background: rgba(255,255,255,.06); }
.lkstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lkstats > div { background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lkstats small { color: #9ca3af; font-weight: 700; font-size: 12px; }
.lkstats b { font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lkstats > div:first-child b { color: #f87171; font-size: 20px; }
.lkbtns { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.lkbtns .btn.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
.lkright { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.lklist { flex: 1; min-height: 0; overflow-y: auto; }
@media (orientation: landscape) {
  .lookup { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); }
  .lkcard { min-height: 0; overflow-y: auto; }
}
.lkstats { grid-template-columns: 1fr 1fr; }
.lkstats > div:first-child { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; }
.lkstats > div:first-child b { font-size: 26px; overflow: visible; }
.lkbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lkbtns .btn { padding: 10px 8px; font-size: 15px; }
.lkbtns .btn.primary { grid-column: 1 / -1; background: #2563eb; padding: 12px 8px; font-size: 17px; }
@media (orientation: landscape) and (max-height: 520px) {
  .lkcard { gap: 7px; padding: 10px 12px; } .lkname { font-size: 20px; } .lkphone { font-size: 16px; }
  .lkmemo { font-size: 13px; padding: 6px 8px; } .lkstats > div { padding: 5px 8px; } .lkstats b { font-size: 15px; } .lkstats > div:first-child b { font-size: 22px; }
  .lkbtns .btn { padding: 7px 6px; font-size: 14px; } .lkbtns .btn.primary { padding: 9px 6px; font-size: 16px; }
}

/* v3.2 회원조회 내역: 촘촘하게 */
.lklist .item { padding: 5px 10px; gap: 8px; min-height: 0; }
.lklist .ttime { width: 42px; font-size: 14px; }
.lklist .ttime small { display: none; }
.lklist .t1 { font-size: 14px; line-height: 1.25; }
.lklist .t1 .tag { font-size: 11px; padding: 1px 5px; }
.lklist .t2 { font-size: 11.5px; line-height: 1.25; }
.lklist .right .pt { font-size: 15px; }
.lklist .right .t2 { font-size: 11px; }
.lklist .xcancel { margin-top: 2px; padding: 1px 6px; font-size: 11px; }
.lkright .datebar { margin-bottom: 0; }
.lkright .histsum { margin: 0; font-size: 13px; }
.lkright .datebar .arrow { width: 36px; height: 34px; font-size: 15px; }
.lkright .datebar input { padding: 5px 10px; font-size: 14px; }
.lklist .item { padding: 4px 10px; }
.lklist .item .grow { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; min-width: 0; }
.lklist .item .grow .t2 { color: var(--ink3); }
.lklist .item .right { display: flex; flex-direction: row; align-items: center; gap: 8px; text-align: right; flex-shrink: 0; }
.lklist .item .right .t2 { min-width: 92px; }
.lklist .item .right .xcancel { margin-top: 0; }
@media (max-width: 600px) {
  .lklist .item { padding: 7px 10px; }
  .lklist .item .right { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; }
  .lklist .item .right .pt { grid-column: 1; grid-row: 1; font-size: 16px; }
  .lklist .item .right .t2 { grid-column: 1; grid-row: 2; min-width: 0; font-size: 12px; display: block; }
  .lklist .item .right .xcancel { grid-column: 2; grid-row: 1 / span 2; padding: 4px 8px; font-size: 12px; }
}

/* v3.3 근무표 */
.main.sched-main { display: flex; flex-direction: column; }
.sched { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; max-width: none !important; width: 100%; }
.schedtop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.schedseg { margin: 0; flex: 0 0 auto; min-width: 280px; }
.schedrange { font-weight: 800; color: var(--ink2, #374151); font-size: 15px; }
.schedgrid { flex: 1; min-height: 0; display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sday { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 0; }
.sday.today { border: 3px solid #f59e0b; }
.sdh { display: flex; align-items: baseline; gap: 6px; justify-content: center; }
.sdh b { font-size: 18px; font-weight: 900; } .sdh span { font-size: 13px; color: var(--ink3); font-weight: 700; }
.sdh em { font-style: normal; font-size: 11px; background: #f59e0b; color: #111827; border-radius: 6px; padding: 1px 5px; font-weight: 900; }
.sday.wkend .sdh b { color: #dc2626; }
.scell { flex: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; min-height: 54px; min-width: 0; }
.scell.am { background: #fef3c7; } .scell.pm { background: #dbeafe; }
.scell small { font-size: 11px; font-weight: 800; color: #6b7280; }
.scell b { font-size: 17px; font-weight: 900; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.scell.empty b { color: #9ca3af; }
.scell:disabled { opacity: 1; cursor: default; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.pickgrid .btn small { font-size: 11px; opacity: .7; }
@media (orientation: portrait) {
  .schedgrid { grid-template-columns: 1fr; overflow-y: auto; }
  .sday { flex-direction: row; align-items: stretch; }
  .sdh { flex-direction: column; align-items: center; justify-content: center; width: 54px; flex-shrink: 0; gap: 0; }
  .schedseg { min-width: 0; width: 100%; }
}
@media (orientation: landscape) {
  .home, .home.n3, .home.n4, .home.n5, .home.n6, .home.n7, .home.n8 { grid-template-columns: 1.5fr repeat(var(--cols, 3), minmax(0, 1fr)); grid-template-rows: 1fr 1fr; }
  .htile small { font-size: 11px; }
}
.sdh em { white-space: nowrap; }
.pickgrid .btn { white-space: nowrap; padding: 12px 6px; }
/* 근무표·관리: 한 칸을 반씩 */
.hpair { display: flex; flex-direction: column; gap: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.05); min-height: 0; }
.hpair .htile.half { flex: 1; border: 0; border-radius: 0; box-shadow: none; flex-direction: row; gap: 10px; padding: 6px 10px; min-height: 0; }
.hpair .htile.half + .htile.half { border-top: 1px solid var(--line); }
.hpair .htile.half .hic { font-size: clamp(22px, 5dvh, 32px); }
.hpair .htile.half b { font-size: clamp(16px, 4.2dvh, 22px); }

/* v3.4 바: 오늘 근무자 + 세로는 항상 위 */
.shiftnow { display: inline-flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.shiftnow > span { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.08); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.shiftnow i { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: 5px; }
.shiftnow > span:first-child i { background: #fde68a; color: #92400e; }
.shiftnow > span:last-child i { background: #bfdbfe; color: #1e40af; }
.shiftnow b { font-size: 13px; font-weight: 800; color: #fff; }
html.port .shell.nomenu { display: flex !important; flex-direction: column; }
html.port .shell.nomenu .topbar { order: 0; height: auto; min-height: 48px; padding-bottom: 7px; border-top: 0; flex-wrap: wrap; row-gap: 6px; }
html.port .shell.nomenu .main { order: 1; flex: 1; min-height: 0; }
html.port .shell.nomenu .shiftnow { order: 10; flex-basis: 100%; }
html.port .shell.nomenu .shiftnow:empty { display: none; }
html.port .shell.nomenu .shiftnow > span { flex: 1; justify-content: center; }

/* v3.5 공지사항 바 */
.noticebar { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; background: rgba(245,158,11,.16); color: #fde68a; border-radius: 8px; padding: 4px 10px; font-weight: 800; font-size: 13px; text-align: left; }
.noticebar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.noticebar i { font-style: normal; }
.noticebar.none { background: rgba(255,255,255,.06); color: #9ca3af; flex: 0 0 auto; }
.noticebar.hide { display: none; }
.noticefull { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 700; line-height: 1.5; white-space: pre-wrap; color: #78350f; }
.modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 15px; resize: vertical; }
html.land .shell.nomenu .topbar .who { margin-left: auto; }
.chkline { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-top: 6px; }
.chkline input { width: 20px; height: 20px; flex: 0 0 auto; }
html.port .shell.nomenu .noticebar { order: 11; flex-basis: 100%; }
@media (orientation: landscape) and (max-height: 520px) { .modal textarea { height: 64px; } .noticefull { padding: 8px 10px; font-size: 15px; } }

/* v3.6 가로모드도 바를 맨 위로 */
.shell.nomenu { display: flex !important; flex-direction: column; }
.shell.nomenu .topbar { order: 0; border-top: 0; }
.shell.nomenu .main { order: 1; flex: 1; min-height: 0; }
html.land .shell.nomenu .topbar { height: 42px; min-height: 42px; padding-top: 0; padding-bottom: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
@media (orientation: landscape) { #toast { top: 54px; } #updbar { top: 50px; } }
.shell.nomenu .topbar .shiftnow { flex: 0 0 auto; }
.shell.nomenu .topbar .noticebar { flex: 1 1 0; }
.shell.nomenu .topbar .noticebar.none { flex: 0 0 auto; }
@media (orientation: landscape) and (max-width: 900px) { html.land .shell.nomenu .curtab { display: none; } }
.badge.audit { background: #ddd6fe; color: #5b21b6; }

/* v3.7 회원조회: 전체 회원 목록 */
.main.mlist-main { display: flex; flex-direction: column; }
.mlist { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; max-width: none !important; width: 100%; }
.mltop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mlpad { padding: 10px 18px; font-size: 17px; background: #2563eb; }
.mlhead { display: flex; gap: 14px; font-weight: 800; font-size: 15px; color: #374151; }
.mlhead b { font-size: 17px; }
.mlist .chips { margin: 0; flex-wrap: nowrap; overflow-x: auto; }
.mlist .chip { white-space: nowrap; }
.mllist { flex: 1; min-height: 0; overflow-y: auto; }
.mlrow { padding: 7px 12px; }
.mlrow .t1 { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mlphone { font-size: 13px; color: var(--ink3); font-weight: 700; margin-left: 4px; }
.mlrow .t2 { font-size: 12px; }
.mlmemo { color: #b45309; font-weight: 700; }
.mlrow .right .pt { font-size: 16px; }
.mlmore { width: 100%; padding: 12px; font-weight: 800; color: #2563eb; background: #eff6ff; }
.qback { font-size: 14px; font-weight: 800; color: #2563eb; background: #eff6ff; border-radius: 8px; padding: 4px 10px; margin-right: 8px; vertical-align: middle; }
.mlpad.btn.primary { background: #2563eb; }
@media (orientation: landscape) and (max-height: 520px) { .mlist .chip { padding: 5px 12px; font-size: 13px; } .mlpad { padding: 7px 14px; font-size: 15px; } .mlist { gap: 6px; } }

/* v3.8 리스트 합계: +적립 / -차감 / 합계 */
.qtotal { gap: 10px; flex-wrap: nowrap; white-space: nowrap; }
.qtotal .qp { color: #93c5fd; } .qtotal .qm { color: #fca5a5; }
.qtotal .qs { color: #fff; } .qtotal .qs.plus { color: #bfdbfe; } .qtotal .qs.minus { color: #fecaca; }
.qtotal .qs { border-left: 1px solid rgba(255,255,255,.25); padding-left: 10px; }
.qtotal { flex-direction: column; gap: 0; line-height: 1.15; padding: 3px 6px; }
.qtotal .qpm { display: flex; gap: 10px; font-size: 12px; font-weight: 800; }
.qtotal .qs { border-left: 0; padding-left: 0; }

/* v3.9 근무 횟수 */
.statsbtn { margin-left: auto; }
.stseg { margin: 0; min-width: 180px; }
.stnav { display: flex; align-items: center; gap: 10px; }
.stnav .arrow { background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 40px; font-size: 18px; }
.stlabel { flex: 1; text-align: center; font-size: 16px; }
.stlabel b { font-size: 19px; font-weight: 900; margin-right: 4px; }
.stfill { color: var(--ink3); font-size: 13px; font-weight: 700; }
.stbody { flex: 1; min-height: 0; overflow-y: auto; }
.stlist { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.strow { display: grid; grid-template-columns: minmax(70px, 140px) 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.strow:last-child { border-bottom: 0; }
.stname { font-weight: 900; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stbar { display: flex; height: 16px; background: #f3f4f6; border-radius: 8px; overflow: hidden; }
.stbar .am { background: #fbbf24; } .stbar .pm { background: #60a5fa; }
.stnum { text-align: right; display: flex; flex-direction: column; }
.stnum b { font-size: 20px; font-weight: 900; } .stnum small { font-size: 12px; color: var(--ink3); font-weight: 700; }

/* v3.10 근무표: 휴무칸 + 주 이동 */
.schednav { display: flex; align-items: center; gap: 8px; }
.schednav .arrow { background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 40px; font-size: 18px; }
.schednav .arrow:disabled { opacity: .35; }
.wkname { min-width: 84px; text-align: center; font-weight: 900; font-size: 18px; }
.scell.off { background: #fce7f3; flex: .8; }
.scell.off b { font-size: 14px; white-space: normal; line-height: 1.25; text-align: center; color: #9d174d; }
.scell.off.empty b { color: #9ca3af; }
.btn.off-on { background: #db2777; color: #fff; border-color: #db2777; }
@media (orientation: landscape) and (max-height: 520px) {
  .strow { padding: 6px 12px; } .stname { font-size: 15px; } .stnum b { font-size: 17px; }
  .scell { min-height: 0; padding: 3px 4px; } .scell b { font-size: 15px; } .sday { gap: 4px; padding: 6px; } .sdh b { font-size: 16px; }
}
.strow { grid-template-columns: minmax(70px, 140px) 1fr 170px; }

/* v3.11 내역 촘촘하게 (가로·세로 공통) */
.list .item.txi { padding: 3px 10px; gap: 8px; min-height: 0; align-items: center; }
.list .item.txi .ttime { width: 40px; font-size: 14px; line-height: 1.1; }
.list .item.txi .ttime small { display: none; }
.list .item.txi .grow { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; }
.list .item.txi .t1 { font-size: 14px; line-height: 1.25; }
.list .item.txi .t1 .tag { font-size: 11px; padding: 0 5px; }
.list .item.txi .t2 { font-size: 11.5px; line-height: 1.25; margin-top: 0; color: var(--ink3); }
.list .item.txi .t2.cline { color: #b91c1c; }
.list .item.txi .right .pt { font-size: 15px; }
.list .item.txi .right .t2 { font-size: 11.5px; }
.list .item.txi .xcancel { margin-top: 0; padding: 1px 7px; font-size: 11.5px; }
.histsum { margin: 0 2px 4px; font-size: 13px; }
.histsum b { font-size: 14px; }
.histctl .datebar, .histctl .mfilter { margin-bottom: 6px; }
.histctl .datebar { gap: 6px; } .histctl .datebar .arrow { width: 38px; height: 38px; font-size: 16px; }
.histctl .datebar input { padding: 7px 10px; }
.histctl .mfilter .minp { padding: 7px 10px; font-size: 15px; } .histctl .mfilter .btn.sm { padding: 6px 10px; }
.histctl + .chips { margin-bottom: 6px; } .histctl + .chips .chip { padding: 5px 12px; font-size: 13px; }
@media (orientation: landscape) {
  /* 가로: 날짜·기계번호 한 줄, 내역은 한 줄짜리 행 */
  .histctl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 6px; }
  .histctl .datebar, .histctl .mfilter { margin-bottom: 0; }
  .list .item.txi { padding: 2px 10px; }
  .list .item.txi .right { display: flex; flex-direction: row; align-items: center; gap: 10px; }
  .list .item.txi .right .t2 { min-width: 96px; }
  .lklist .item.txi .right .xcancel { grid-column: auto; grid-row: auto; }
}
@media (orientation: portrait) {
  .list .item.txi { gap: 6px; padding: 3px 8px; }
  .list .item.txi .ttime { width: 36px; font-size: 13px; }
  .list .item.txi .t1 { font-size: 13.5px; }
  .list .item.txi .right { display: grid; grid-template-columns: auto auto; column-gap: 6px; row-gap: 0; align-items: center; justify-items: end; line-height: 1.15; }
  .list .item.txi .right .pt { grid-column: 1; grid-row: 1; font-size: 14.5px; }
  .list .item.txi .right .t2 { grid-column: 1; grid-row: 2; min-width: 0; font-size: 11px; display: block; }
  .list .item.txi .right .xcancel { grid-column: 2; grid-row: 1 / span 2; padding: 3px 7px; font-size: 11.5px; }
  .lookup { gap: 6px; } .lkright { gap: 4px; }
}

/* v3.12 적립·차감 완료 결과 창 */
.modal .rchead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.modal .rchead b { font-size: 22px; font-weight: 900; }
.modal .rchead .num { color: var(--ink2); font-weight: 700; }
.modal .rcdone { margin-left: auto; background: #dcfce7; color: #15803d; border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 14px; }
.rclist { max-height: 40dvh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.rcrow { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 17px; }
.rcrow:last-child { border-bottom: 0; }
.rcrow .rct { font-weight: 800; font-size: 14px; padding: 1px 8px; border-radius: 6px; background: #f3f4f6; }
.rcrow.earn .rct, .rcrow.buy .rct, .rcrow.wonple .rct { background: #dbeafe; color: #1d4ed8; }
.rcrow.deduct .rct, .rcrow.transfer .rct { background: #fee2e2; color: #b91c1c; }
.rcrow .rcl { font-weight: 800; }
.rcrow b { margin-left: auto; font-size: 18px; font-weight: 900; }
.rcsum { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin-top: 10px; }
.rcsum > div { background: #f9fafb; border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.rcsum span { font-size: 13px; color: var(--ink2); font-weight: 700; }
.rcsum b { font-size: 19px; font-weight: 900; }
.rcsum .rctot { background: #eef2ff; }
.rcbal { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 10px; background: var(--pad, #111827); color: #fff; border-radius: 12px; padding: 10px 14px; }
.rcbal > span { color: #9ca3af; font-weight: 700; font-size: 14px; }
.rcbal > div { display: flex; flex-direction: column; align-items: flex-end; }
.rcbal small { color: #9ca3af; font-weight: 700; font-size: 12px; }
.rcbal b { font-size: 28px; font-weight: 900; color: #fbbf24; line-height: 1.1; }
.modal .rcok { width: 100%; margin-top: 12px; padding: 14px; font-size: 19px; }
@media (orientation: landscape) and (max-height: 520px) {
  .rclist { max-height: 30dvh; } .rcrow { padding: 4px 12px; font-size: 15px; }
  .modal .rchead { margin-bottom: 6px; } .modal .rchead b { font-size: 19px; }
  .rcsum { margin-top: 6px; } .rcsum > div { padding: 4px 10px; } .rcsum b { font-size: 16px; }
  .rcbal { margin-top: 6px; padding: 6px 12px; } .rcbal b { font-size: 22px; }
  .modal .rcok { margin-top: 8px; padding: 10px; font-size: 17px; }
}



/* v3.13 원플 외상 체크 */
.wprow .grow { cursor: pointer; }
.wcchk { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 800; font-size: 14px; color: var(--ink2); flex-shrink: 0; }
.wcchk .box { width: 22px; height: 22px; border: 2px solid #9ca3af; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; }
.wcchk.on { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.wcchk.on .box { background: #f59e0b; border-color: #f59e0b; }
.wcchk:disabled { opacity: .5; }

/* v3.14 세로모드: 모든 내역 2줄 고정 (시간 | 내용 | 금액 | 취소) */
@media (orientation: portrait) {
  .list .item.txi { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; column-gap: 6px; row-gap: 0; padding: 3px 8px; align-items: center; }
  .list .item.txi .grow, .list .item.txi .right { display: contents; }
  .list .item.txi .ttime { grid-column: 1; grid-row: 1 / span 3; width: auto; font-size: 13px; }
  .list .item.txi .grow > .t1 { grid-column: 2; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; line-height: 1.25; }
  .list .item.txi .grow > .t2 { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; line-height: 1.2; }
  .list .item.txi .right > .pt { grid-column: 3; grid-row: 1; text-align: right; font-size: 14.5px; line-height: 1.25; }
  .list .item.txi .right > .t2 { grid-column: 3; grid-row: 2; text-align: right; font-size: 11px; line-height: 1.2; min-width: 0; white-space: nowrap; }
  .list .item.txi .right > .xcancel { grid-column: 4; grid-row: 1 / span 2; align-self: center; padding: 3px 7px; font-size: 11.5px; margin: 0; }
  .list .item.txi .t2.cline, .list .item.txi .t2.faint { white-space: normal; }
  /* 위쪽 조작칸도 한 줄로 */
  .histctl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px; margin-bottom: 4px; }
  .histctl .datebar, .histctl .mfilter { margin-bottom: 0; }
  .histctl .datebar { gap: 4px; } .histctl .datebar .arrow { width: 30px; height: 36px; font-size: 14px; flex-shrink: 0; }
  .histctl .datebar input { padding: 6px 6px; font-size: 13px; min-width: 0; }
  .histctl .mfilter { gap: 4px; } .histctl .mfilter .minp { padding: 6px 8px; font-size: 13px; min-width: 0; }
  .histctl .mfilter .btn.sm { padding: 4px 6px; font-size: 12px; white-space: nowrap; }
  .histctl + .chips { margin-bottom: 4px; } .histctl + .chips .chip { padding: 4px 10px; font-size: 12.5px; }
  .histsum { font-size: 12px; margin: 0 2px 3px; } .histsum b { font-size: 13px; }
  .sumline { gap: 8px; }
  /* 회원조회 상세: 손님 카드 줄이기 */
  .lkcard { padding: 8px 10px; gap: 6px; border-radius: 12px; }
  .lkname { font-size: 18px; } .lkphone { font-size: 14px; }
  .lkhead { gap: 4px; }
  .lkmemo { padding: 4px 8px; font-size: 12.5px; } .lkmemo.none { display: none; }
  .lkstats { grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; }
  .lkstats > div:first-child { grid-column: auto; flex-direction: column; align-items: flex-start; }
  .lkstats > div { padding: 4px 8px; }
  .lkstats small { font-size: 11px; } .lkstats b { font-size: 14px; } .lkstats > div:first-child b { font-size: 18px; }
  .lkbtns { grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; }
  .lkbtns .btn, .lkbtns .btn.primary { grid-column: auto; padding: 8px 4px; font-size: 13px; }
  .lkright .datebar .arrow { width: 32px; height: 32px; } .lkright .datebar input { padding: 4px 8px; font-size: 13px; }
  .lkright .datebar { gap: 4px; }
}
/* 세로: 근무자 + 공지를 한 줄로 (바 높이 줄이기) */
html.port .shell.nomenu .topbar { row-gap: 5px; padding-top: 6px; padding-bottom: 6px; min-height: 0; }
html.port .shell.nomenu .topbar::after { content: ''; order: 9; flex-basis: 100%; height: 0; }
html.port .shell.nomenu .shiftnow { order: 10; flex: 0 0 auto; flex-basis: auto; gap: 4px; }
html.port .shell.nomenu .shiftnow > span { flex: 0 0 auto; padding: 2px 6px; }
html.port .shell.nomenu .noticebar { order: 11; flex: 1 1 0; flex-basis: 0; padding: 3px 8px; }
html.port .shell.nomenu .noticebar.none { flex: 1 1 0; }

/* v3.14 회원목록·원플 목록 촘촘하게 (가로·세로 공통) */
/* 회원 목록 */
.mlrow { padding: 4px 10px; }
.mlrow .t1 { font-size: 14px; gap: 4px; } .mlrow .t2 { font-size: 11px; margin-top: 0; }
.mlrow .right .pt { font-size: 15px; } .mlrow .right .t2 { display: none; }
.mlist { gap: 6px; } .mlist .chips { margin: 0; } .mlist .chip { padding: 4px 10px; font-size: 12.5px; }
.mlpad { padding: 7px 12px; font-size: 14px; } .mlhead { font-size: 13px; gap: 10px; } .mlhead b { font-size: 14px; }
/* 원플 탭 */
.wprow { padding: 5px 10px; } .wprow .t1 { font-size: 14px; } .wprow .t2 { font-size: 11px; margin-top: 0; }
.wcchk { padding: 4px 8px; margin-left: 8px; font-size: 13px; } .wcchk .box { width: 18px; height: 18px; }
.kpis { gap: 6px; } .kpi { padding: 8px 10px; }
.sectiontitle { margin: 10px 4px 4px; }

.kpi .v { font-size: 22px; } .kpi .l { font-size: 12px; }
@media (orientation: portrait) {
  .lookup { grid-template-rows: auto minmax(0, 1fr); align-content: start; }
  .lkcard { overflow: visible; }
  .lkbtns { margin-top: 0; }
}
.datebar { margin-bottom: 6px; gap: 6px; } .datebar .arrow { width: 38px; height: 38px; font-size: 16px; } .datebar input { padding: 7px 10px; }
/* 회원목록·원플 목록: 한 줄로 */
.mlrow .grow, .wprow .grow { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; min-width: 0; }
.mlrow .t1 .mlphone { font-size: 13px; }
.mlrow { padding: 6px 12px; } .wprow { padding: 5px 12px; }
.wprow .right { display: flex; align-items: baseline; gap: 8px; }
.wprow .right .pt { font-size: 16px; }
.noticebar .nby { font-style: normal; flex: 0 0 auto; margin-left: auto; padding-left: 8px; font-size: 12px; font-weight: 800; color: #fbbf24; opacity: .85; white-space: nowrap; }
.noticebar .nby::before { content: '— '; }

/* v3.15 1달 방문 횟수 */
.visits { flex: 0 0 auto; display: inline-flex; align-items: center; font-size: 11px !important; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 6px; white-space: nowrap; background: rgba(147,197,253,.18); color: #bfdbfe; margin-left: 4px; }
.lkstats { grid-template-columns: repeat(3, 1fr); }
.lkstats > div:first-child { grid-column: 1 / -1; }
@media (orientation: portrait) {
  .lkstats { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .lkstats > div:first-child { grid-column: auto; }
}
@media (orientation: portrait) {
  .lkstats { grid-template-columns: 1.4fr 0.9fr 0.9fr 1.1fr; gap: 5px; }
  .lkstats > div { padding: 4px 6px; }
  .lkstats > div:last-child b { font-size: 13px; }
  .lkstats small { white-space: nowrap; }
}

/* v3.16 로그인: 매장 고르기 */
.storepick { justify-content: center; gap: 22px; }
.spick { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; width: 100%; max-width: 720px; }
.spick button { flex: 1 1 240px; min-height: 120px; border-radius: 18px; background: #1d4ed8; color: #fff; font-size: 28px; font-weight: 900; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.spick button:nth-child(2) { background: #b45309; }
.spick button:active { filter: brightness(1.15); }
.spback { color: #9ca3af; font-weight: 800; font-size: 16px; padding: 10px 16px; }
@media (orientation: landscape) and (max-height: 520px) { .spick button { min-height: 96px; font-size: 24px; } .storepick { gap: 14px; } }

/* v3.17 이름 옆 휴대폰 뒷자리 */
.l4 { display: inline-block; margin-left: 3px; font-size: .78em; font-weight: 800; color: var(--ink3, #9ca3af); vertical-align: baseline; }
.l4::before { content: '('; } .l4::after { content: ')'; }

/* v3.18 기계별: 배출(+) 파랑 / 차감(-) 빨강 */
.mcell .k { font-size: 16px; line-height: 1.15; }
.mcell .d { font-size: 15px; font-weight: 900; color: #dc2626; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mcell.has .k { color: #1d4ed8; }
.mcell.zero .k { color: var(--ink3); }
.mcell.ded { background: #fef2f2; border-color: #fca5a5; } .mcell.ded .d { font-size: 16px; }

/* v3.19 회원조회: 이름·초성 검색 */
.mltop .mlsearch { flex: 1 1 220px; min-width: 0; max-width: 420px; padding: 9px 12px; font-size: 15px; border-radius: 10px; }
@media (orientation: portrait) { .mltop .mlsearch { flex-basis: 100%; max-width: none; order: 3; } }

/* v3.20 인수인계 · 청소 */
.hpair.three .htile.half .hic { font-size: clamp(18px, 4dvh, 28px); }
.hpair.three .htile.half b { font-size: clamp(14px, 3.4dvh, 20px); }
.hpair .htile.half .dutyinfo { font-size: 12px; font-weight: 800; color: var(--ink3); white-space: nowrap; }
.dutyinfo .ok { color: #16a34a; } .dutyinfo .warn { color: #dc2626; }
.duty { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (orientation: landscape) { .duty { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; } }
.dcol { background: #fff; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dhead { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.dprog { font-weight: 900; font-size: 16px; padding: 2px 10px; border-radius: 999px; background: #fee2e2; color: #b91c1c; }
.dprog.ok { background: #dcfce7; color: #15803d; }
.clist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.citem { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #f9fafb; text-align: left; position: relative; min-height: 64px; }
.citem .cbox { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 7px; border: 2px solid #9ca3af; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.citem .cname { font-size: 17px; font-weight: 900; padding-right: 30px; }
.citem small { font-size: 12px; color: #15803d; font-weight: 800; }
.citem.on { border-color: #22c55e; background: #f0fdf4; }
.citem.on .cbox { background: #22c55e; border-color: #22c55e; }
.citem:disabled { opacity: 1; cursor: default; }
.dnote { font-size: 12px; }
.hadd { display: flex; gap: 8px; align-items: stretch; }
.hadd textarea { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; resize: vertical; }
.hadd .btn { flex: 0 0 auto; padding: 0 18px; }
.hnote { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; }
.hnote .htext { grid-column: 1; font-size: 15px; font-weight: 800; white-space: pre-wrap; word-break: break-all; }
.hnote .hmeta { grid-column: 1; font-size: 12px; color: var(--ink3); font-weight: 700; }
.hnote .hdone { color: #15803d; }
.hnote .hbtns { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 4px; }
.hnote .hbtns .btn { padding: 4px 10px; font-size: 13px; }
.hnote.old { border-color: #fca5a5; background: #fef2f2; }
.hnote .olddate { color: #b91c1c; }
.hnote.done { background: #f9fafb; }
.hnote.done .htext { color: var(--ink3); text-decoration: line-through; }
@media (orientation: landscape) and (max-height: 520px) {
  .citem { min-height: 52px; padding: 7px 10px; } .citem .cname { font-size: 15px; }
  .duty-main .datebar { margin-bottom: 6px; }
}
.hpair .htile.half .dt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.hpair .htile.half .dt b { white-space: nowrap; }
.hpair .htile.half .dt .dutyinfo { font-size: clamp(11px, 2.6dvh, 13px); }

/* v3.21 기계관리 */
.care-main { display: flex; flex-direction: column; gap: 8px; }
.carehead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carehead .chips { margin: 0; flex: 0 1 auto; }
.carehead .carenew { padding: 8px 16px; font-size: 16px; background: #2563eb; }
.carecount { font-weight: 800; color: var(--ink2); font-size: 14px; margin-left: auto; }
.chip.m-keep.on { background: #16a34a; border-color: #16a34a; } .chip.m-call.on { background: #dc2626; border-color: #dc2626; }
.chip.m-text.on { background: #d97706; border-color: #d97706; } .chip.m-wait.on { background: #6b7280; border-color: #6b7280; }
.carelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; align-content: start; }
.ccard { background: #fff; border-radius: 12px; padding: 8px 10px; border-left: 6px solid #9ca3af; display: flex; flex-direction: column; gap: 3px; }
.ccard.m-keep { border-left-color: #16a34a; } .ccard.m-call { border-left-color: #dc2626; } .ccard.m-text { border-left-color: #d97706; } .ccard.m-wait { border-left-color: #6b7280; }
.ccard.ended { opacity: .6; }
.cc1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmode { color: #fff; font-weight: 900; font-size: 14px; padding: 2px 8px; border-radius: 7px; background: #6b7280; }
.cmode.m-keep { background: #16a34a; } .cmode.m-call { background: #dc2626; } .cmode.m-text { background: #d97706; } .cmode.m-wait { background: #6b7280; }
.ccard .cname { font-size: 17px; font-weight: 900; }
.cmach { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.mchip { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 7px; padding: 1px 7px; font-weight: 900; font-size: 15px; }
.cmemo { font-size: 14px; font-weight: 700; color: #92400e; background: #fffbeb; border-radius: 7px; padding: 3px 7px; }
.cmeta { font-size: 11.5px; color: var(--ink3); font-weight: 700; }
.cbtns { display: flex; gap: 6px; justify-content: flex-end; }
.cbtns .btn { padding: 4px 12px; font-size: 13px; }
.cbtns .cend { background: #111827; color: #fff; }
.cform input { font-size: 16px; }
.cpicked { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; font-size: 17px; }
.cpicked .btn { margin-left: auto; }
.cres { max-height: 30dvh; overflow-y: auto; margin-top: 4px; }
.cres .item { padding: 7px 10px; }
.cmodes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cmodebtn { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.cmodebtn b { font-size: 18px; font-weight: 900; } .cmodebtn small { font-size: 11px; color: var(--ink3); font-weight: 700; }
.cmodebtn.on.m-keep { border-color: #16a34a; background: #f0fdf4; color: #15803d; } .cmodebtn.on.m-call { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.cmodebtn.on.m-text { border-color: #d97706; background: #fffbeb; color: #b45309; } .cmodebtn.on.m-wait { border-color: #6b7280; background: #f3f4f6; color: #374151; }
.mltop .mlreg { padding: 7px 12px; font-size: 14px; }
@media (orientation: portrait) { .carelist { grid-template-columns: 1fr; } .carecount { margin-left: 0; } }
.care-main { overflow-x: hidden; }
.carehead { min-width: 0; }
.carehead .chips { flex-wrap: wrap; overflow: visible; min-width: 0; }
.carelist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cfoot { display: flex; align-items: center; gap: 8px; }
.cfoot .cmeta { flex: 1; min-width: 0; }
.cfoot .cbtns { flex: 0 0 auto; }
.care-main > .carehead, .care-main > .carelist { max-width: none !important; width: 100%; margin-left: 0; margin-right: 0; min-width: 0; }
/* 회원 등록 버튼 크게 (포스 칸이 없어져서) */
.mltop .btn.mlreg { padding: 10px 18px; font-size: 17px; background: #16a34a; color: #fff; border: 0; font-weight: 900; }
@media (orientation: landscape) and (max-height: 520px) { .mltop .btn.mlreg { padding: 7px 14px; font-size: 15px; } }
@media (orientation: portrait) { .mltop .btn.mlreg { padding: 7px 12px; font-size: 14px; } .mltop .head, .mltop .mlhead { flex-basis: 100%; order: 4; } }

/* v3.22 내역·회원조회 목록 1.2배 (글씨·칸) */
html body .list .item.txi { padding: 5px 12px; gap: 10px; }
html body .list .item.txi .ttime { width: 48px; font-size: 17px; }
html body .list .item.txi .t1 { font-size: 17px; line-height: 1.3; }
html body .list .item.txi .t1 .tag { font-size: 13px; padding: 1px 6px; }
html body .list .item.txi .t2 { font-size: 14px; line-height: 1.3; }
html body .list .item.txi .right .pt { font-size: 18px; }
html body .list .item.txi .right .t2 { font-size: 14px; min-width: 112px; }
html body .list .item.txi .xcancel { font-size: 14px; padding: 3px 10px; }
html body .list .item.txi .l4 { font-size: .8em; }
html body .mlrow { padding: 8px 14px; }
html body .mlrow .t1 { font-size: 17px; gap: 6px; }
html body .mlrow .t1 .mlphone { font-size: 15.5px; }
html body .mlrow .t2 { font-size: 13.5px; }
html body .mlrow .right .pt { font-size: 18px; }
html body .mlrow .credit { font-size: 13px !important; padding: 3px 7px; }
html body .histsum { font-size: 15px; } html body .histsum b { font-size: 16px; }
@media (orientation: portrait) {
  html body .list .item.txi { padding: 5px 10px; gap: 8px; grid-template-columns: 44px minmax(0, 1fr) auto auto; }
  html body .list .item.txi .ttime { font-size: 16px; width: auto; }
  html body .list .item.txi .grow > .t1 { font-size: 16.5px; }
  html body .list .item.txi .grow > .t2 { font-size: 13.5px; }
  html body .list .item.txi .right > .pt { font-size: 17.5px; }
  html body .list .item.txi .right > .t2 { font-size: 13px; min-width: 0; }
  html body .list .item.txi .right > .xcancel { font-size: 13.5px; padding: 4px 9px; }
  html body .mlrow .t1 { font-size: 16.5px; } html body .mlrow .t1 .mlphone { font-size: 14.5px; }
  html body .histsum { font-size: 14px; } html body .histsum b { font-size: 15px; }
}
@media (orientation: portrait) {
  html body .list .item.txi .grow > .t1 { white-space: normal; overflow: visible; text-overflow: clip; word-break: keep-all; }
  html body .list .item.txi .right > .t2 { white-space: nowrap; }
}

/* v3.23 기계번호 하나씩 추가 */
.machadd { display: flex; flex-direction: column; gap: 6px; }
.machrow { display: flex; gap: 8px; }
.machrow .minp1 { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; text-align: center; letter-spacing: 1px; }
.machrow .btn { flex: 0 0 auto; padding: 0 18px; font-size: 16px; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.mchip.big { font-size: 17px; padding: 3px 4px 3px 10px; display: inline-flex; align-items: center; gap: 4px; }
.mchip .mx { width: 24px; height: 24px; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font-weight: 900; font-size: 16px; line-height: 1; }
.spick button:nth-child(3) { background: #15803d; } .spick button:nth-child(4) { background: #7c3aed; } .spick button:nth-child(5) { background: #0f766e; } .spick button:nth-child(6) { background: #be123c; }

/* v3.24 정산 메뉴 */
.btn.settlebtn { background: #fff7e6; border: 2px solid #f0b232; color: #8a5a00; font-weight: 900; font-size: 16px; margin: 4px 0 8px; }
.ssrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line, #e5e7eb); }
.ssrow .ssl { font-weight: 900; font-size: 17px; display: flex; flex-direction: column; }
.ssrow .ssl small { font-weight: 600; font-size: 11.5px; color: #8a8f98; }
.ssrow .ssin { width: 42%; max-width: 180px; text-align: right; font-size: 20px; font-weight: 800; padding: 8px 10px; }
.ssrow .ssauto { font-size: 22px; padding-right: 10px; }

/* v3.25 정산 계·총계 */
.sssum span, .ssgrand span { display: flex; flex-direction: column; }
.sssum small, .ssgrand small { font-size: 11.5px; font-weight: 600; color: #8a8f98; }
.srow.total.sssum { margin-top: 4px; }
.srow.total.ssgrand { background: #fff7e6; border-radius: 10px; padding: 10px 10px; border-top: 2px solid #f0b232; }
.srow.total.ssgrand b { color: #8a5a00; }
