/* ==========================================================================
   멍마르트 — 운영자 페이지 스타일
   매장에서 휴대폰으로도 쓸 수 있도록 터치 영역을 넉넉히 잡았습니다.
   ========================================================================== */

:root {
  --a-bg:      #F6F5F2;
  --a-panel:   #FFFFFF;
  --a-ink:     #1F2126;
  --a-ink-2:   #565A63;
  --a-ink-3:   #8A8F99;
  --a-line:    #E5E3DE;
  --a-line-2:  #CFCCC5;
  --a-wine:    #8E3B4E;
  --a-wine-bg: #FBF0F2;
  --a-gold:    #B08A3E;
  --a-green:   #2E7D5B;
  --a-green-bg:#EBF6F1;
  --a-red:     #C0392B;
  --a-red-bg:  #FDF0EE;
  --a-blue:    #2C5AA0;
  --a-blue-bg: #EEF3FB;

  --a-radius: 12px;
  --a-shadow: 0 1px 2px rgba(31,33,38,.05), 0 6px 20px -12px rgba(31,33,38,.2);
  --a-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
            system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --sidebar: 236px;
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  font-family: var(--a-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--a-ink);
  background: var(--a-bg);
  letter-spacing: -0.01em;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; letter-spacing: -0.02em; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--a-line); margin: 24px 0; }

/* ── 레이아웃 ────────────────────────────────────── */
.a-shell { display: flex; min-height: 100vh; }

.a-side {
  width: var(--sidebar);
  flex: none;
  background: #23252B;
  color: #B9B4AB;
  padding: 22px 14px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.a-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 0 8px 20px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(185,180,171,.16);
}
.a-brand strong { color: #F6EFE4; font-size: 17px; letter-spacing: -0.02em; }
.a-brand span { font-size: 10px; letter-spacing: .16em; color: #7E7970; display: block; }

.a-nav { display: flex; flex-direction: column; gap: 2px; }
.a-nav-label {
  font-size: 10.5px; letter-spacing: .14em; color: #6E6A62;
  padding: 16px 10px 6px; font-weight: 700;
}
.a-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500;
  transition: background .14s, color .14s;
}
.a-nav a:hover { background: rgba(255,255,255,.06); color: #F6EFE4; }
.a-nav a.on { background: var(--a-wine); color: #FFF3E8; font-weight: 600; }
.a-nav a svg { flex: none; opacity: .85; }

.a-side-foot { margin-top: auto; padding-top: 20px; font-size: 12.5px; color: #6E6A62; }
.a-side-foot a { display: block; padding: 5px 10px; }
.a-side-foot a:hover { color: #F6EFE4; }

.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.a-top {
  background: var(--a-panel);
  border-bottom: 1px solid var(--a-line);
  padding: 0 26px;
  min-height: 64px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.a-top h1 { font-size: 19px; }
.a-top .a-top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.a-burger { display: none; }

.a-body { padding: 26px; flex: 1; }
/* 좁게 쓰는 화면(설정 · 폼 · 목록)은 가운데로 모은다.
   왼쪽에 사이드바가 있는데 본문까지 왼쪽에 붙으면
   넓은 화면에서 오른쪽이 크게 비어 자리가 안 맞아 보인다. */
.a-narrow { max-width: 900px; margin-inline: auto; }

/* ── 알림 ────────────────────────────────────────── */
.a-flash {
  background: var(--a-green-bg);
  border: 1px solid #BFE0D0;
  color: #1F5C43;
  padding: 12px 16px;
  border-radius: var(--a-radius);
  margin-bottom: 18px;
  font-size: 14.5px;
  display: flex; align-items: center; gap: 9px;
}
.a-error {
  background: var(--a-red-bg); border: 1px solid #F0C4BC; color: #93291D;
  padding: 12px 16px; border-radius: var(--a-radius); margin-bottom: 18px; font-size: 14.5px;
}

/* ── 카드 / 패널 ─────────────────────────────────── */
.card {
  background: var(--a-panel);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--a-line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h2 { font-size: 16px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

/* ── 통계 타일 ───────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--a-panel); border: 1px solid var(--a-line);
  border-radius: var(--a-radius); padding: 16px 18px; box-shadow: var(--a-shadow);
}
.stat .lb { font-size: 12.5px; color: var(--a-ink-3); margin-bottom: 4px; }
.stat .vl { font-size: 25px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .vl small { font-size: 14px; font-weight: 500; color: var(--a-ink-3); margin-left: 3px; }
.stat.accent .vl { color: var(--a-wine); }

/* ── 버튼 ────────────────────────────────────────── */
/* hidden 을 붙였는데 안 숨는 일을 막는다.
   .btn { display: inline-flex } 처럼 display 를 정한 규칙이
   [hidden] 의 기본 display:none 을 이기기 때문이다. */
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 17px; border-radius: 9px;
  border: 1px solid transparent;
  font-family: var(--a-sans); font-size: 14.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--a-wine); color: #FFF3E8; }
.btn-primary:hover { background: #74303F; }
.btn-line { background: var(--a-panel); border-color: var(--a-line-2); color: var(--a-ink); }
.btn-line:hover { border-color: var(--a-ink-3); background: #FBFAF8; }
.btn-soft { background: var(--a-bg); border-color: var(--a-line); color: var(--a-ink-2); }
.btn-soft:hover { background: #EDEBE6; }
.btn-danger { background: var(--a-panel); border-color: #E8C4BE; color: var(--a-red); }
.btn-danger:hover { background: var(--a-red-bg); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; font-weight: 500; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── 폼 ──────────────────────────────────────────── */
.field { margin-bottom: 17px; }
.field > label,
.field-label {
  display: block; font-size: 13.5px; font-weight: 600;
  color: var(--a-ink-2); margin-bottom: 6px;
}
.field .hint { font-size: 12.5px; color: var(--a-ink-3); margin-top: 5px; line-height: 1.5; }

input[type=text], input[type=password], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=number], input[type=search],
input[type=email], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--a-line-2);
  border-radius: 9px;
  background: var(--a-panel);
  font-family: var(--a-sans);
  font-size: 15px;
  color: var(--a-ink);
  transition: border-color .14s, box-shadow .14s;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23565A63' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--a-wine);
  box-shadow: 0 0 0 3px rgba(142,59,78,.12);
}
input[type=file] {
  width: 100%; font-size: 14px; padding: 9px;
  border: 1px dashed var(--a-line-2); border-radius: 9px; background: var(--a-bg);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

.check { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 7px 0; font-size: 14.5px; }
.check input { width: 19px; height: 19px; accent-color: var(--a-wine); flex: none; margin: 0; }

.form-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--a-line);
}
.form-actions .spacer { margin-left: auto; }

/* ── 검색 바 ─────────────────────────────────────── */
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.searchbar input[type=search], .searchbar input[type=text] { max-width: 280px; }
.searchbar input[type=date] { max-width: 165px; }

/* ── 표 ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th {
  text-align: left; font-size: 12.5px; font-weight: 700; color: var(--a-ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--a-line); white-space: nowrap;
  background: #FBFAF8;
}
table.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--a-line); vertical-align: middle; }
table.tbl tbody tr:hover { background: #FBFAF8; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl .strong { font-weight: 600; }
table.tbl a.link { color: var(--a-wine); font-weight: 600; }
table.tbl a.link:hover { text-decoration: underline; }

/* ── 표 안에서 바로 고치는 입력칸 ────────────────── */
.cell-input { padding: 8px 10px; font-size: 14px; }
.td-check { text-align: center; }
.td-check input[type=checkbox] {
  width: 19px; height: 19px; accent-color: var(--a-wine); margin: 0;
}

/* ── 일정 표 ─────────────────────────────────────── */
.sched-time {
  font-variant-numeric: tabular-nums;
  color: var(--a-wine);
  font-weight: 700;
  margin-right: 8px;
}
.sched-status {
  padding: 5px 26px 5px 8px;
  font-size: 12.5px;
  border-radius: 7px;
  width: auto;
  min-width: 78px;
}

/* ── 배지 ────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--a-bg); color: var(--a-ink-2); border: 1px solid var(--a-line);
}
.badge.g { background: var(--a-green-bg); color: var(--a-green); border-color: #C5E3D4; }
.badge.r { background: var(--a-red-bg); color: var(--a-red); border-color: #F0C9C2; }
.badge.b { background: var(--a-blue-bg); color: var(--a-blue); border-color: #C9D9F0; }
.badge.w { background: var(--a-wine-bg); color: var(--a-wine); border-color: #EFD2D8; }
.badge.y { background: #FBF3E0; color: var(--a-gold); border-color: #EBDBB5; }

/* ── 리스트 아이템 ───────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.row-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--a-line);
}
.row-item:last-child { border-bottom: 0; }
.row-item:hover { background: #FBFAF8; }
.row-item .ri-main { flex: 1; min-width: 0; }
.row-item .ri-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-item .ri-sub { font-size: 13px; color: var(--a-ink-3); margin-top: 2px; }
.row-item .ri-side { text-align: right; flex: none; display: flex; gap: 6px; align-items: center; }
.row-item .ri-time {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px;
  min-width: 52px; flex: none; color: var(--a-wine);
}

/* ── 아바타 ──────────────────────────────────────── */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  background: var(--a-bg); flex: none; border: 1px solid var(--a-line);
}
.avatar.ph { display: grid; place-items: center; color: var(--a-ink-3); font-weight: 700; font-size: 16px; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }

/* ── 사진 그리드 ─────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.photo-cell {
  border: 1px solid var(--a-line); border-radius: 10px; overflow: hidden; background: var(--a-panel);
}
.photo-cell .ph-img { aspect-ratio: 1; background: var(--a-bg); }
.photo-cell .ph-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-cell .ph-meta { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.photo-cell select, .photo-cell input[type=text] { padding: 6px 8px; font-size: 12.5px; border-radius: 7px; }
.photo-cell .ph-acts { display: flex; gap: 5px; }
.photo-cell .ph-acts form { flex: 1; }
.photo-cell .ph-acts .btn { width: 100%; }

/* ── 공유 링크 상자 ──────────────────────────────── */
.sharebox {
  background: var(--a-wine-bg); border: 1px solid #EFD2D8;
  border-radius: var(--a-radius); padding: 16px 18px;
}
.sharebox .url {
  display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap;
}
.sharebox input {
  flex: 1; min-width: 200px; font-size: 13.5px; background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── 메시지 (문자 · 카카오톡) ─────────────────────── */
.msg-to {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--a-wine-bg); border: 1px solid #EFD2D8;
  border-radius: var(--a-radius); padding: 14px 16px; margin-bottom: 18px;
}
.msg-to-main { flex: 1; min-width: 190px; font-size: 15.5px; }
.msg-to-main strong { font-size: 16.5px; }
.msg-to-sub { color: var(--a-ink-2); font-size: 13.5px; margin-top: 2px; }
.msg-to-acts { display: flex; gap: 7px; flex-wrap: wrap; }
.msg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.msg-pick .form-actions { grid-column: 1 / -1; }

.msg-item { padding: 16px 18px; border-bottom: 1px solid var(--a-line); }
.msg-item:last-child { border-bottom: 0; }
.msg-head {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 9px;
}
.msg-title { font-weight: 600; font-size: 15.5px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.msg-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.msg-text {
  width: 100%; font-size: 14.5px; line-height: 1.75; resize: vertical;
  font-family: var(--a-sans); background: #FCFCFB;
}
.msg-item .hint { margin: 6px 0 0; }

/* 자주 쓰는 링크 */
.linkrows { display: flex; flex-direction: column; }
.linkrow {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  padding: 11px 18px; border-bottom: 1px solid var(--a-line);
}
.linkrow:last-child { border-bottom: 0; }
.lr-label { width: 128px; flex: none; font-size: 13.5px; color: var(--a-ink-3); }
.linkrow input {
  flex: 1; min-width: 180px; font-size: 13px; background: #FCFCFB;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 자리표시 안내 · 넣기 */
.varlist { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.varitem { display: flex; gap: 7px; align-items: baseline; font-size: 13.5px; color: var(--a-ink-2); }
.varitem code {
  background: var(--a-wine-bg); color: var(--a-wine); border-radius: 6px;
  padding: 2px 7px; font-size: 13px; font-weight: 600;
}
.varpick { display: flex; flex-wrap: wrap; gap: 6px; }
.varchip {
  border: 1px solid var(--a-line); background: var(--a-panel); color: var(--a-wine);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  font-family: var(--a-sans); cursor: pointer;
}
.varchip:hover { border-color: var(--a-wine); background: var(--a-wine-bg); }

@media (max-width: 720px) {
  .msg-pick { grid-template-columns: 1fr; }
  .lr-label { width: 100%; }
}

/* ── 정의 목록 ───────────────────────────────────── */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; font-size: 14.5px; }
.dl dt { color: var(--a-ink-3); font-size: 13.5px; }
.dl dd { margin: 0; }
.dl dd.empty { color: var(--a-line-2); }

/* ── 빈 상태 ─────────────────────────────────────── */
.a-empty {
  text-align: center; padding: 52px 20px; color: var(--a-ink-3); font-size: 14.5px;
}
.a-empty strong { display: block; color: var(--a-ink-2); font-size: 16px; margin-bottom: 6px; }

/* ── 설정 탭 ─────────────────────────────────────── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a {
  padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--a-panel); border: 1px solid var(--a-line); color: var(--a-ink-2);
}
.tabs a:hover { border-color: var(--a-line-2); }
.tabs a.on { background: var(--a-ink); border-color: var(--a-ink); color: #F6EFE4; font-weight: 600; }

.setting-img {
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
}
.setting-img .preview {
  width: 148px; border-radius: 9px; overflow: hidden; border: 1px solid var(--a-line); flex: none;
}
.setting-img .fields { flex: 1; min-width: 220px; }

/* ── 로그인 ──────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(160deg, #F3EBDE, #F6F5F2);
}
.login-card {
  width: 100%; max-width: 384px; background: var(--a-panel);
  border: 1px solid var(--a-line); border-radius: 18px;
  padding: 38px 32px; box-shadow: 0 24px 60px -30px rgba(31,33,38,.4);
}
.login-card .lg-brand { text-align: center; margin-bottom: 26px; }
.login-card .lg-brand svg { margin: 0 auto 12px; color: var(--a-wine); }
.login-card .lg-brand h1 { font-size: 21px; margin-bottom: 4px; }
.login-card .lg-brand p { font-size: 13px; color: var(--a-ink-3); }

/* ── 라이트박스 ──────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(24,25,29,.92);
  display: none; place-items: center; padding: 24px;
}
.lightbox.on { display: grid; }
.lightbox img { max-width: min(1100px, 94vw); max-height: 88vh; border-radius: 8px; object-fit: contain; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; background: none; border: 0;
  color: #F6EFE4; font-size: 34px; cursor: pointer; line-height: 1;
}

/* ── 반응형 ──────────────────────────────────────── */
@media (max-width: 900px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
}


/* ══════════════════════════════════════════════════
   휴대폰 화면 (매장에서 폰으로 쓰는 것을 기준으로 맞춤)
   ══════════════════════════════════════════════════ */
@media (max-width: 780px) {
  .a-shell { flex-direction: column; }
  .a-side {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: min(84vw, 300px);
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 60px rgba(0,0,0,.4);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  body.nav-open .a-side { transform: translateX(0); }
  body.nav-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(24,25,29,.5); z-index: 55;
  }
  .a-nav a { padding: 13px 12px; font-size: 15.5px; }

  .a-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--a-line-2);
    background: var(--a-panel); border-radius: 9px; cursor: pointer; flex: none; padding: 0;
  }
  .a-top {
    padding: 0 14px; min-height: 56px;
    padding-top: env(safe-area-inset-top);
  }
  .a-top h1 { font-size: 17px; }
  /* 상단 버튼이 제목을 밀어내지 않도록 줄바꿈 허용 */
  .a-top .a-top-actions { gap: 6px; }
  .a-top .a-top-actions .btn { padding: 7px 12px; font-size: 13px; }

  .a-body {
    padding: 14px;
    /* 하단 탭바에 가리지 않도록 */
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 92px 1fr; gap: 8px 12px; font-size: 14.5px; }
  .card { margin-bottom: 14px; }
  .card-head { padding: 13px 15px; }
  .card-body { padding: 15px; }
  .card-head h2 { font-size: 15.5px; }
  .row-item { padding: 13px 15px; gap: 12px; }

  /* iOS 는 글자가 16px 보다 작은 입력칸을 누르면 화면을 확대해버린다 */
  input[type=text], input[type=password], input[type=tel], input[type=url],
  input[type=date], input[type=time], input[type=number], input[type=search],
  input[type=email], select, textarea {
    font-size: 16px;
    padding: 12px 13px;
  }
  .check input { width: 22px; height: 22px; }
  .btn { padding: 11px 16px; }
  .btn-sm { padding: 9px 14px; }

  .searchbar { gap: 6px; }
  .searchbar input[type=search], .searchbar input[type=text] { max-width: none; flex: 1 1 100%; }
  .searchbar input[type=date] { flex: 1; max-width: none; }

  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .vl { font-size: 22px; }

  .tabs { gap: 5px; }
  .tabs a { padding: 8px 13px; font-size: 13.5px; }

  /* ── 표를 카드로 바꿔 옆으로 밀리지 않게 한다 ── */
  .table-wrap { overflow-x: visible; }
  table.tbl { display: block; }
  table.tbl thead { display: none; }
  table.tbl tbody { display: block; }
  table.tbl tr {
    display: block;
    background: var(--a-panel);
    border: 1px solid var(--a-line);
    border-radius: 11px;
    padding: 6px 14px 10px;
    margin-bottom: 10px;
  }
  table.tbl tbody tr:hover { background: var(--a-panel); }
  table.tbl tbody tr:last-child { margin-bottom: 0; }
  table.tbl td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--a-line);
    text-align: right;
    white-space: normal;
  }
  table.tbl td:last-child { border-bottom: 0; padding-bottom: 0; }
  table.tbl td::before {
    content: attr(data-label);
    flex: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--a-ink-3);
    text-align: left;
  }
  /* 이름처럼 대표가 되는 칸은 제목처럼 크게 */
  table.tbl td.td-main {
    display: block;
    text-align: left;
    font-size: 16px;
    padding: 8px 0 10px;
    border-bottom: 1px solid var(--a-line);
  }
  table.tbl td.td-main::before { display: none; }
  /* 내용이 없는 칸과 라벨 없는 칸은 숨기거나 펼침 */
  table.tbl td:empty { display: none; }
  table.tbl td.td-actions {
    display: flex; justify-content: flex-end; gap: 6px;
    padding-top: 10px; text-align: right;
  }
  table.tbl td.td-actions::before { display: none; }
  table.tbl .num { text-align: right; }

  /* 입력칸이 든 칸은 라벨을 위에 두고 칸을 가로로 꽉 채운다 */
  table.tbl td.td-input { display: block; text-align: left; padding: 8px 0; }
  table.tbl td.td-input::before {
    display: block; margin-bottom: 5px; font-size: 12.5px;
  }
  .cell-input { width: 100%; font-size: 16px; padding: 11px 12px; }
  table.tbl td.td-check { justify-content: space-between; }
  table.tbl td.td-check input[type=checkbox] { width: 24px; height: 24px; }

  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .form-actions { position: sticky; bottom: 0; }
}

/* ── 하단 탭바 (휴대폰 전용) ─────────────────────── */
.a-tabbar { display: none; }

@media (max-width: 780px) {
  .a-tabbar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(160%) blur(12px);
    border-top: 1px solid var(--a-line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .a-tabbar a, .a-tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 2px 8px;
    font-family: var(--a-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--a-ink-3);
    background: none;
    border: 0;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .a-tabbar a.on { color: var(--a-wine); }
  .a-tabbar svg { display: block; }
  body.nav-open .a-tabbar { z-index: 40; }
}

/* ── 가격표 표 편집기 ─────────────────────────────
   행렬을 그대로 편집하는 화면이라 휴대폰에서도 표 모양을 유지하고
   가로로 밀어서 본다. (카드로 펼치면 행렬 관계가 보이지 않음) */
@media (max-width: 780px) {
  .grid-editor { overflow-x: auto; }
  .grid-editor table.tbl { display: table; min-width: 460px; }
  .grid-editor table.tbl thead { display: table-header-group; }
  .grid-editor table.tbl tbody { display: table-row-group; }
  .grid-editor table.tbl tr { display: table-row; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .grid-editor table.tbl td,
  .grid-editor table.tbl th {
    display: table-cell; padding: 6px; text-align: left;
    border-bottom: 1px solid var(--a-line);
  }
  .grid-editor table.tbl td::before { display: none; }
  .grid-editor .cell-input { min-width: 88px; font-size: 16px; padding: 9px 10px; }
}


/* ── 검색되는 선택 상자 ─────────────────────────────
   원래 select 는 뒤에 투명하게 깔아 둔다.
   그래야 required 검사 메시지가 제자리에 뜬다. */
.sselect { position: relative; }
.sselect select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.sselect-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--a-line-2);
  border-radius: 9px;
  background: var(--a-panel);
  font-family: var(--a-sans);
  font-size: 15px;
  color: var(--a-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.sselect-btn:hover { border-color: var(--a-ink-3); }
.sselect-btn:focus-visible,
.sselect.is-open .sselect-btn {
  outline: none;
  border-color: var(--a-wine);
  box-shadow: 0 0 0 3px rgba(142,59,78,.12);
}
.sselect-btn.is-empty .sselect-label { color: var(--a-ink-3); }
.sselect-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sselect-btn svg { flex: none; color: var(--a-ink-2); }
.sselect.is-open .sselect-btn svg { transform: rotate(180deg); }

/* 카드의 overflow:hidden 이 목록을 자르지 않도록 열려 있는 동안만 풀어준다 */
.card.has-open-select { overflow: visible; }

.sselect-panel {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  background: var(--a-panel);
  border: 1px solid var(--a-line-2);
  border-radius: 11px;
  box-shadow: 0 12px 32px -12px rgba(31,33,38,.35);
  overflow: hidden;
}
/* 아래에 자리가 없으면 위로 펼친다 */
.sselect-panel.up { top: auto; bottom: calc(100% + 5px); }

.sselect-search { padding: 9px; border-bottom: 1px solid var(--a-line); }
.sselect-search input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--a-line-2);
  border-radius: 8px;
  font-family: var(--a-sans);
  font-size: 15px;
}
.sselect-search input:focus {
  outline: none;
  border-color: var(--a-wine);
  box-shadow: 0 0 0 3px rgba(142,59,78,.12);
}

.sselect-list {
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 5px;
}
.sselect-opt {
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 14.5px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sselect-opt.dim { color: var(--a-ink-3); }
.sselect-opt.active { background: var(--a-bg); }
.sselect-opt.on { color: var(--a-wine); font-weight: 700; }
.sselect-opt.on.active { background: var(--a-wine-bg); }
.sselect-none {
  padding: 20px 12px;
  text-align: center;
  color: var(--a-ink-3);
  font-size: 14px;
  margin: 0;
}

@media (max-width: 780px) {
  /* 손가락으로 고르기 좋게 넉넉히, 글자는 16px 이상 (iOS 확대 방지) */
  .sselect-btn { padding: 12px 13px; font-size: 16px; }
  .sselect-search input { font-size: 16px; padding: 11px 12px; }
  .sselect-opt { padding: 13px 12px; font-size: 15.5px; }
  .sselect-list { max-height: 50vh; }
}

/* ==================================================
   일정 — 보기 전환 · 달력 · 주별 · 목록
   ================================================== */

/* 구분(미용·픽업·목욕·호텔)별 색 */
.k-groom  { --k: #8E3B4E; --k-bg: #FBF0F2; }
.k-pickup { --k: #2C5AA0; --k-bg: #EEF3FB; }
.k-bath   { --k: #2E7D5B; --k-bg: #EBF6F1; }
.k-hotel  { --k: #B08A3E; --k-bg: #FBF3E0; }
.k-etc    { --k: #6B7078; --k-bg: #F1F1EF; }

.sched-bar { gap: 10px 14px; }
.viewswitch {
  display: inline-flex;
  background: var(--a-bg);
  border: 1px solid var(--a-line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.viewswitch a {
  padding: 7px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600;
  color: var(--a-ink-2); white-space: nowrap;
}
.viewswitch a:hover { background: #EDEBE6; }
.viewswitch a.on { background: var(--a-wine); color: #FFF3E8; }

.periodnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.periodnav .btn { padding: 6px 12px; min-width: 34px; }
.period-label {
  font-size: 15.5px; font-weight: 700; letter-spacing: -0.02em;
  min-width: 120px; text-align: center;
}

/* ── 작은 표시 (구분 · 상태) ─────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 5px; white-space: nowrap;
}
.tag.kind { background: var(--k-bg, var(--a-bg)); color: var(--k, var(--a-ink-2)); }
.tag.st { background: var(--a-green); color: #fff; }
.off .tag.st { background: var(--a-red); }
.tag .sm { display: none; }
.tag i { font-style: normal; }

/* ── 월별 달력 ───────────────────────────────────── */
.calendar {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px; background: var(--a-line);
  border: 1px solid var(--a-line); border-radius: 10px; overflow: hidden;
}
.cal-head {
  background: #FBFAF8; text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--a-ink-3); padding: 9px 0;
}
.cal-head.sat, .cal-cell .sat { color: var(--a-blue); }
.cal-head.sun, .cal-cell .sun { color: var(--a-red); }

.cal-cell {
  background: var(--a-panel); min-height: 112px; padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.cal-cell.out { background: #FAF9F7; }
.cal-cell.out .cal-day { opacity: .38; }
.cal-cell.today { background: var(--a-wine-bg); }

.cal-day {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; padding: 2px 3px; border-radius: 6px;
}
.cal-day:hover { background: rgba(0,0,0,.05); }
.cal-cell.today .cal-day { color: var(--a-wine); }
.cal-day em {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  background: var(--a-ink); color: #F6EFE4; border-radius: 999px; padding: 1px 6px;
}

.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; line-height: 1.4; padding: 3px 5px; border-radius: 5px;
  background: var(--k-bg); color: var(--a-ink);
  border-left: 3px solid var(--k);
  min-width: 0;
}
.cal-item .ci-kind {
  flex: none; font-weight: 800; font-size: 10.5px;
  color: var(--k); width: 13px; text-align: center;
}
.cal-item b { font-variant-numeric: tabular-nums; flex: none; font-size: 11px; }
.cal-item .ci-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item .ci-st {
  flex: none; margin-left: auto; font-size: 10px; font-weight: 800;
  background: var(--a-green); color: #fff; border-radius: 4px; padding: 1px 4px;
}
.cal-item.done { opacity: .82; }
.cal-item.off { opacity: .55; }
.cal-item.off .ci-name { text-decoration: line-through; }
.cal-item.off .ci-st { background: var(--a-red); }
.cal-more { font-size: 11px; color: var(--a-ink-3); padding: 1px 6px; }
.cal-more:hover { color: var(--a-wine); }

/* ── 주별 ────────────────────────────────────────── */
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week-col {
  border: 1px solid var(--a-line); border-radius: 10px; overflow: hidden;
  background: var(--a-panel); display: flex; flex-direction: column;
}
.week-col.today { border-color: var(--a-wine); box-shadow: 0 0 0 1px var(--a-wine); }
.week-head {
  display: flex; align-items: baseline; gap: 6px; padding: 9px 10px;
  background: #FBFAF8; border-bottom: 1px solid var(--a-line);
}
.week-col.today .week-head { background: var(--a-wine-bg); }
.week-head .wd { font-size: 12px; font-weight: 700; color: var(--a-ink-3); }
.week-head strong { font-size: 16px; }
.week-head em { font-style: normal; margin-left: auto; font-size: 11.5px; color: var(--a-wine); font-weight: 700; }
.week-items { padding: 8px; display: flex; flex-direction: column; gap: 5px; min-height: 70px; }
.week-empty { color: var(--a-line-2); font-size: 13px; text-align: center; margin: 8px 0 0; }

.week-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 6px 8px; border-radius: 7px;
  background: var(--k-bg); border-left: 3px solid var(--k);
  min-width: 0;
}
.week-item .wi-top { display: flex; align-items: center; gap: 5px; }
.week-item b { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--k); flex: none; }
.week-item .wi-name {
  font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.week-item.done { opacity: .82; }
.week-item.off { opacity: .55; }
.week-item.off .wi-name { text-decoration: line-through; }

/* ── 일별 · 목록 ─────────────────────────────────── */
.slist { display: flex; flex-direction: column; }

.slist-date {
  display: flex; align-items: baseline; gap: 10px;
  padding: 13px 20px 9px;
  background: #FBFAF8;
  border-top: 1px solid var(--a-line);
  border-bottom: 1px solid var(--a-line);
  font-size: 14.5px; font-weight: 700;
  position: sticky; top: 64px; z-index: 5;
}
.slist-date:first-child { border-top: 0; }
.slist-date em { font-style: normal; font-size: 12.5px; color: var(--a-wine); font-weight: 700; }
.slist-date a { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--a-ink-3); }
.slist-date a:hover { color: var(--a-wine); }

.slist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "time title act"
    "time main  act";
  gap: 2px 14px;
  align-items: start;
  padding: 14px 20px 14px 17px;
  border-bottom: 1px solid var(--a-line);
  border-left: 4px solid var(--k);
}
.slist-item:last-child { border-bottom: 0; }
.slist-item:hover { background: #FBFAF8; }
.slist-item.done { background: #FCFDFC; }
.slist-item.off { opacity: .62; }

.si-time {
  grid-area: time; align-self: center; min-width: 58px;
  font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--k);
  padding-top: 1px;
}
.slist-item.off .si-time { text-decoration: line-through; }

.si-main { grid-area: main; min-width: 0; }
.si-mtitle { grid-area: title; }
.si-title {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 15.5px; font-weight: 700;
}
.si-title .link { color: var(--a-wine); }
.si-owner { font-weight: 400; color: var(--a-ink-3); font-size: 14px; }
.slist-item.off .si-title .link { text-decoration: line-through; }

.si-sub { font-size: 14px; color: var(--a-ink-2); margin-top: 3px; }
.si-meta {
  display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap;
  margin-top: 5px; font-size: 12.5px; color: var(--a-ink-3);
}
.si-tel { display: inline-flex; align-items: center; gap: 4px; color: var(--a-ink-2); font-weight: 600; }
.si-tel:hover { color: var(--a-wine); }
.si-src { color: var(--a-ink-3); }

.si-act { grid-area: act; align-self: center; display: flex; align-items: center; gap: 6px; }
.sched-status {
  padding: 6px 26px 6px 9px; font-size: 12.5px; border-radius: 7px;
  width: auto; min-width: 78px;
}

/* ── 좁은 화면 ───────────────────────────────────── */
@media (max-width: 1000px) {
  /* 버튼을 아래줄로 내려 이름과 내용이 눌리지 않게 한다 */
  .slist-item {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "time title"
      "time main"
      "act  act";
  }
  .si-act { margin-top: 9px; }
}

@media (max-width: 900px) {
  /* 태블릿에서는 두 칸씩 — 한 칸이면 너무 성기다 */
  .weekgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .sched-bar { flex-direction: column; align-items: stretch; }
  .viewswitch { justify-content: space-between; }
  .viewswitch a { flex: 1; text-align: center; padding: 10px 4px; }
  .periodnav { justify-content: center; }
  .period-label { flex: 1; min-width: 0; font-size: 15px; }
  .sched-bar .right { margin-left: 0; justify-content: center; }

  /* 달력: 이름은 줄이되 구분·상태 표시는 남긴다 */
  .calendar { border-radius: 8px; }
  .cal-cell { min-height: 66px; padding: 4px 3px; }
  .cal-head { font-size: 11.5px; padding: 7px 0; }
  .cal-day { font-size: 12.5px; padding: 1px 2px; }
  .cal-day em { font-size: 9.5px; padding: 1px 5px; }
  .cal-items { gap: 2px; }
  .cal-item { font-size: 10px; padding: 2px 3px; border-left-width: 2px; gap: 2px; }
  .cal-item b { display: none; }
  .cal-item .ci-kind { width: 11px; font-size: 9.5px; }
  .cal-item .ci-st { font-size: 9px; padding: 0 3px; }
  .cal-more { font-size: 10px; padding: 0 4px; }

  .week-items { min-height: 0; }

  /* 목록: 시간 옆에 이름, 아래에 내용, 맨 아래 버튼 */
  .slist-date { padding: 11px 15px 8px; top: 56px; font-size: 14px; }
  .slist-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "time title"
      "main main"
      "act  act";
    gap: 3px 11px;
    padding: 13px 14px 12px 12px;
    align-items: center;
    flex-wrap: nowrap;
  }
  .si-time { grid-area: time; font-size: 19px; min-width: 0; padding-top: 0; }
  .si-mtitle { grid-area: title; }
  .si-main { grid-area: main; }
  .si-act {
    grid-area: act; width: auto; margin-top: 9px; gap: 8px; padding-left: 0;
  }
  .si-act .btn { padding: 8px 14px; font-size: 13px; }
  .sched-status { min-width: 96px; padding: 8px 28px 8px 10px; font-size: 14px; }

  .si-sub { margin-top: 0; font-size: 13.5px; }
  .si-meta { margin-top: 4px; font-size: 12px; }
  .tag .lg { display: none; }
  .tag .sm { display: inline; }
}

@media (max-width: 560px) {
  .weekgrid { grid-template-columns: 1fr; gap: 8px; }
}

/* ── 매출 ────────────────────────────────────────── */
.sales-hero {
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--a-line);
  margin-bottom: 20px;
}
.sh-label { font-size: 13px; color: var(--a-ink-3); margin: 0 0 4px; }
.sh-value {
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--a-wine);
  font-variant-numeric: tabular-nums;
  margin: 0 0 8px;
}
.sh-value span { font-size: .45em; font-weight: 600; color: var(--a-ink-3); margin-left: 4px; }
.sh-sub {
  display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap;
  font-size: 14px; color: var(--a-ink-2); margin: 0;
}
.sh-diff {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--a-ink-3);
}
.sh-diff.up { color: var(--a-green); }
.sh-diff.down { color: var(--a-red); }
.sh-diff em { font-style: normal; font-weight: 500; color: var(--a-ink-3); font-size: 12.5px; }

/* 일별 막대 — 한 계열이므로 범례 없이 제목이 대신한다 */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;                 /* 막대 사이 2px 바탕 틈 */
  height: 190px;
  padding-top: 22px;        /* 가장 높은 날 금액이 들어갈 자리 */
}
.bar-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.bar-track {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar-fill {
  width: 100%;
  max-width: 34px;
  background: var(--a-wine);
  border-radius: 4px 4px 0 0;   /* 바닥에 붙고 위쪽만 둥글게 */
  min-height: 2px;
  transition: filter .12s;
}
.bar-col.zero .bar-fill { background: var(--a-line); }
.bar-col:hover .bar-fill { filter: brightness(1.15); }
.bar-col.today .bar-fill { outline: 2px solid var(--a-gold); outline-offset: 1px; }

.bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--a-ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bar-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}
.bar-label.sat { color: var(--a-blue); }
.bar-label.sun { color: var(--a-red); }
.bar-col.today .bar-label { color: var(--a-wine); font-weight: 700; }

.sales-amt {
  font-size: 15.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--a-ink);
  white-space: nowrap;
}
.sales-amt.none { color: var(--a-line-2); font-weight: 500; font-size: 13.5px; }

.si-est {
  color: var(--a-gold);
  font-weight: 600;
}

@media (max-width: 780px) {
  .sh-sub { font-size: 13.5px; }
  .bars { height: 150px; gap: 1px; }
  .bar-fill { max-width: 20px; border-radius: 3px 3px 0 0; }
  /* 한 달치 날짜가 다 들어가지 않으므로 5일 간격만 적는다 */
  .bar-label { font-size: 9.5px; }
  .bars.dense .bar-label { visibility: hidden; }
  .bars.dense .bar-col:nth-child(5n+1) .bar-label { visibility: visible; }
  .bar-value { font-size: 10.5px; top: -18px; }
}

.stat-link { display: block; transition: border-color .14s, transform .12s; }
.stat-link:hover { border-color: var(--a-wine); transform: translateY(-1px); }
.stat-link .lb { color: var(--a-wine); font-weight: 600; }

/* ═════════ 내 사이트 (주소 · 색 테마 · 도메인) ═════════ */

.site-url-now {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--a-wine-bg);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 12px 14px;
  margin: 0 0 10px;
  word-break: break-all;
  color: var(--a-wine);
}

.hint.warn { color: var(--a-red); }

.form-error {
  background: var(--a-red-bg);
  border: 1px solid var(--a-red);
  color: var(--a-red);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  margin: 10px 0 0;
}

.themegrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.themecard {
  position: relative;
  display: block;
  border: 1.5px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 14px;
  cursor: pointer;
  background: var(--a-panel);
  transition: border-color .14s, transform .12s, box-shadow .14s;
}
.themecard:hover { transform: translateY(-1px); box-shadow: var(--a-shadow); }
.themecard.on { border-color: var(--a-wine); box-shadow: 0 0 0 3px var(--a-wine-bg); }

/* 라디오는 화면에서 숨기되 키보드로는 잡히게 둔다 */
.themecard input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.themecard:focus-within { border-color: var(--a-wine); box-shadow: 0 0 0 3px var(--a-wine-bg); }

.themecard .swatch {
  display: flex;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--a-line);
  margin-bottom: 10px;
}
.themecard .swatch i { flex: 1; }

.themecard strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.themecard em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--a-ink-3);
  line-height: 1.5;
}

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--a-ink-2); font-size: 14px; }
.kv dd { margin: 0; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .themegrid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .site-url-now { font-size: 13.5px; }
}

/* ═════════ 요금제 · 제한 안내 ═════════ */

.plan-hero {
  border-radius: var(--a-radius);
  padding: 16px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--a-line);
}
.plan-hero strong { display: block; font-size: 17px; margin-bottom: 5px; }
.plan-hero p { margin: 0; font-size: 14px; color: var(--a-ink-2); line-height: 1.65; }
.plan-hero.trial { background: var(--a-blue-bg); border-color: var(--a-blue); }
.plan-hero.trial strong { color: var(--a-blue); }
.plan-hero.pro { background: var(--a-green-bg); border-color: var(--a-green); }
.plan-hero.pro strong { color: var(--a-green); }
.plan-hero.free { background: var(--a-bg); }

.usebars { display: grid; gap: 15px; margin-bottom: 16px; }
.useline-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; margin-bottom: 6px;
}
.useline-top b { font-variant-numeric: tabular-nums; }
.useline.full .useline-top b { color: var(--a-red); }

.usetrack {
  height: 7px; border-radius: 4px; background: var(--a-line);
  overflow: hidden;
}
.usetrack i { display: block; height: 100%; background: var(--a-wine); border-radius: 4px; }
.useline.full .usetrack i { background: var(--a-red); }
.usetrack.unlimited i { background: var(--a-green); opacity: .35; }

.plantable { width: 100%; border-collapse: collapse; font-size: 14px; }
.plantable th, .plantable td {
  padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--a-line);
}
.plantable thead th {
  font-size: 12.5px; color: var(--a-ink-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.plantable th:not(:first-child), .plantable td:not(:first-child) {
  text-align: center; width: 96px; white-space: nowrap;
}
.plantable td.off { color: var(--a-ink-3); }
.plantable td.on { color: var(--a-green); font-weight: 600; }

.limit-card { text-align: center; }
.limit-card .card-body { padding: 34px 26px 30px; }
.limit-icon {
  width: 62px; height: 62px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--a-wine-bg); color: var(--a-wine);
}
.limit-card h2 { font-size: 19px; margin: 0 0 10px; }
.limit-msg { font-size: 14.5px; color: var(--a-ink-2); line-height: 1.7; margin: 0 auto 18px; max-width: 400px; }
.limit-safe {
  font-size: 13.5px; color: var(--a-ink-2); line-height: 1.7;
  background: var(--a-green-bg); border-radius: var(--a-radius);
  padding: 13px 16px; margin: 0 auto 22px; max-width: 430px;
}
.limit-card .form-actions { justify-content: center; }

/* 체험 남은 기간 띠 */
.trialbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--a-blue-bg); border: 1px solid var(--a-blue);
  color: var(--a-blue); border-radius: var(--a-radius);
  padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px;
}
.trialbar.warn { background: var(--a-red-bg); border-color: var(--a-red); color: var(--a-red); }
.trialbar strong { font-weight: 700; }
.trialbar a { margin-left: auto; color: inherit; text-decoration: underline; white-space: nowrap; }

@media (max-width: 560px) {
  .plantable th:not(:first-child), .plantable td:not(:first-child) { width: 66px; font-size: 13px; }
  .plantable th, .plantable td { padding: 9px 7px; }
  .trialbar a { margin-left: 0; width: 100%; }
}

/* ═════════ 가게 정보 자동 입력 (플레이스 캡처) ═════════ */

.pi-lead { font-size: 14.5px; color: var(--a-ink-2); line-height: 1.7; margin: 0 0 18px; }

.pi-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--a-ink-2);
  line-height: 1.9;
}
.pi-steps strong { color: var(--a-ink); }

.pi-fields { display: grid; gap: 16px; margin-bottom: 20px; }

.pi-field {
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 13px 15px;
  background: var(--a-panel);
}

.pi-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
  margin-bottom: 8px;
}
.pi-check input { width: 17px; height: 17px; accent-color: var(--a-wine); flex-shrink: 0; }
.pi-label { font-size: 13.5px; font-weight: 600; }

.pi-warn {
  font-style: normal;
  font-size: 12px;
  color: var(--a-red);
  background: var(--a-red-bg);
  border-radius: 5px;
  padding: 2px 7px;
}

.pi-field input[type=text], .pi-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  padding: 9px 11px;
  border: 1px solid var(--a-line-2);
  border-radius: 8px;
  background: var(--a-bg);
  color: var(--a-ink);
  resize: vertical;
}
.pi-field input:focus, .pi-field textarea:focus {
  outline: none;
  border-color: var(--a-wine);
  box-shadow: 0 0 0 3px var(--a-wine-bg);
}

/* 체크를 풀면 그 항목은 저장되지 않으므로 흐리게 보여준다 */
.pi-field:has(input[name=apply]:not(:checked)) { opacity: .5; }

.pi-before {
  font-size: 12.5px;
  color: var(--a-ink-3);
  margin: 6px 0 0;
  word-break: break-all;
}

.pi-missed {
  background: var(--a-bg);
  border: 1px dashed var(--a-line-2);
  border-radius: var(--a-radius);
  padding: 13px 15px;
  margin-bottom: 18px;
}
.pi-missed strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.pi-missed p { margin: 0; font-size: 13px; color: var(--a-ink-2); line-height: 1.6; }

/* 대시보드 맨 위 "캡처로 채우기" 안내 */
.placehint {
  display: block;
  border-color: var(--a-wine);
  background: var(--a-wine-bg);
  transition: transform .12s, box-shadow .14s;
}
.placehint:hover { transform: translateY(-1px); box-shadow: var(--a-shadow); }
.placehint .card-body { display: flex; align-items: center; gap: 15px; }
.ph-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px; background: var(--a-panel); color: var(--a-wine);
}
.ph-text { flex: 1; min-width: 0; }
.ph-text strong { display: block; font-size: 15.5px; color: var(--a-ink); margin-bottom: 3px; }
.ph-text p { margin: 0; font-size: 13.5px; color: var(--a-ink-2); line-height: 1.6; }
.ph-go { color: var(--a-wine); font-weight: 600; font-size: 14px; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 620px) {
  .placehint .card-body { flex-wrap: wrap; gap: 12px; }
  .ph-go { width: 100%; text-align: right; }
}

/* ═════════ 재방문 안내 ═════════ */

.navcount {
  margin-left: auto;
  background: var(--a-wine);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
}

.fulist { display: flex; flex-direction: column; }
.fu-item {
  padding: 14px 16px;
  border-top: 1px solid var(--a-line);
  border-left: 3px solid transparent;
}
.fu-item:first-child { border-top: none; }
.fu-item.t-now  { border-left-color: var(--a-gold); }
.fu-item.t-late { border-left-color: var(--a-red); }
.fu-item.t-soon { border-left-color: var(--a-line-2); }

.fu-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

.fu-name { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.fu-name .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--a-line);
}
.fu-name .avatar.ph {
  display: grid; place-items: center;
  background: var(--a-wine-bg); color: var(--a-wine);
  font-weight: 700; font-size: 15px;
}
.fu-name strong { display: block; font-size: 15px; }
.fu-name em { font-style: normal; font-size: 12.5px; color: var(--a-ink-3); }

.fu-when { text-align: right; flex-shrink: 0; }
.fu-when b { display: block; font-size: 14px; }
.fu-when b.over { color: var(--a-red); }
.fu-when b.soon { color: var(--a-ink-2); }
.fu-when span { font-size: 12px; color: var(--a-ink-3); }

.fu-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.fu-tag {
  font-size: 12px; color: var(--a-ink-2);
  background: var(--a-bg); border: 1px solid var(--a-line);
  border-radius: 999px; padding: 2px 9px;
}
.fu-tag b { font-weight: 700; color: var(--a-ink); }

.fu-msg { margin-bottom: 10px; }
.fu-msg summary {
  font-size: 13px; color: var(--a-wine); cursor: pointer;
  padding: 3px 0; user-select: none;
}
.fu-msg textarea {
  width: 100%; margin-top: 7px;
  font-family: inherit; font-size: 13.5px; line-height: 1.65;
  padding: 10px 12px; border: 1px solid var(--a-line);
  border-radius: 9px; background: var(--a-bg); color: var(--a-ink-2);
  resize: vertical;
}

.fu-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fu-act .fu-done { margin-left: auto; }
.fu-act .btn.ok { background: var(--a-green-bg); border-color: var(--a-green); color: var(--a-green); }

@media (max-width: 560px) {
  .fu-head { flex-wrap: wrap; }
  .fu-when { text-align: left; width: 100%; display: flex; gap: 8px; align-items: baseline; }
  .fu-when b { display: inline; }
  .fu-act .fu-done { margin-left: 0; width: 100%; }
  .fu-act .fu-done .btn { width: 100%; }
}

/* ═════════ 정보 문의 문구 카드 ═════════ */

.askcard { margin-top: 18px; }
.ask-lead { font-size: 14px; color: var(--a-ink-2); line-height: 1.7; margin: 0 0 12px; }
.ask-lead strong { color: var(--a-ink); }

.ask-msg { margin-bottom: 12px; }
.ask-msg summary {
  font-size: 13.5px; color: var(--a-wine); cursor: pointer;
  padding: 3px 0; user-select: none;
}
.ask-msg textarea {
  width: 100%; margin-top: 8px;
  font-family: inherit; font-size: 13.5px; line-height: 1.7;
  padding: 12px 14px; border: 1px solid var(--a-line);
  border-radius: 9px; background: var(--a-bg); color: var(--a-ink-2);
  resize: vertical;
}

.ask-act { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ask-act .btn.ok { background: var(--a-green-bg); border-color: var(--a-green); color: var(--a-green); }

@media (max-width: 560px) {
  .ask-act .btn { flex: 1 1 auto; }
}

/* ═════════ 손님이 채우는 정보 링크 ═════════ */

.ask-link { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--a-line); }
.ask-linkbox {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; padding: 9px 11px;
  border: 1px solid var(--a-line); border-radius: 8px;
  background: var(--a-wine-bg); color: var(--a-wine);
}
.ask-link .ask-act form { display: inline; }

.irows { display: grid; gap: 14px; }
.irow {
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 12px 14px;
}
.irow.over { border-color: var(--a-gold); background: #FEFBF3; }
.irow.same { opacity: .6; }

.irow-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; margin-bottom: 8px; }
.irow-check input { width: 17px; height: 17px; accent-color: var(--a-wine); flex-shrink: 0; }
.irow-label { font-size: 13.5px; font-weight: 600; }

.irow-tag { font-style: normal; font-size: 11.5px; border-radius: 5px; padding: 2px 7px; }
.irow-tag.over { color: var(--a-gold); background: #FBF3E2; }
.irow-tag.same { color: var(--a-ink-3); background: var(--a-bg); }

.irow-input { display: flex; align-items: center; gap: 8px; }
.irow-input input {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 14.5px; padding: 9px 11px;
  border: 1px solid var(--a-line-2); border-radius: 8px;
  background: var(--a-bg); color: var(--a-ink);
}
.irow-input input:focus { outline: none; border-color: var(--a-wine); box-shadow: 0 0 0 3px var(--a-wine-bg); }
.irow-note { font-size: 12.5px; color: var(--a-ink-3); white-space: nowrap; }

.irow-before { font-size: 12.5px; color: var(--a-ink-3); margin: 7px 0 0; word-break: break-all; }

/* 픽업 준비물 */
.prepbox {
  background: var(--a-blue-bg);
  border: 1px solid var(--a-blue);
  border-radius: var(--a-radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.prep-title { font-size: 12.5px; font-weight: 700; color: var(--a-blue); margin-bottom: 7px; }
.prep-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.prep-tag {
  font-size: 13px; border-radius: 999px; padding: 3px 11px;
  background: var(--a-panel); border: 1px solid var(--a-line);
}
.prep-tag.need { border-color: var(--a-red); color: var(--a-red); font-weight: 600; }
.prep-tag.ok { color: var(--a-ink-2); }
.prep-note { font-size: 13px; color: var(--a-ink-2); margin: 8px 0 0; line-height: 1.6; }

/* ═════════ 메시지 갈래 탭 ═════════ */

.msgtabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.msgtabs::-webkit-scrollbar { display: none; }

.msgtabs button {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 13.5px;
  padding: 7px 14px;
  border: 1px solid var(--a-line);
  border-radius: 999px;
  background: var(--a-panel);
  color: var(--a-ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.msgtabs button:hover { border-color: var(--a-line-2); }
.msgtabs button.on {
  background: var(--a-wine);
  border-color: var(--a-wine);
  color: #fff;
  font-weight: 600;
}
.msgtabs button em {
  font-style: normal;
  font-size: 11.5px;
  opacity: .7;
  margin-left: 3px;
}

/* ═════════ 대시보드 · 미용할 때가 된 아이 ═════════ */

.duelist { display: flex; flex-direction: column; }
.due-item { padding: 13px 16px; border-top: 1px solid var(--a-line); }
.due-item:first-child { border-top: none; }

.due-top { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.due-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.due-who .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--a-line);
}
.due-who .avatar.ph {
  display: grid; place-items: center;
  background: var(--a-wine-bg); color: var(--a-wine);
  font-weight: 700; font-size: 14px;
}
.due-who strong { display: block; font-size: 14.5px; }
.due-who em { font-style: normal; font-size: 12.5px; color: var(--a-ink-3); }

.due-when { text-align: right; flex-shrink: 0; }
.due-when b { display: block; font-size: 13.5px; color: var(--a-red); }
.due-when span { font-size: 11.5px; color: var(--a-ink-3); }

.due-msg { margin-bottom: 9px; }
.due-msg summary {
  font-size: 12.5px; color: var(--a-wine); cursor: pointer;
  padding: 2px 0; user-select: none;
}
.due-msg textarea {
  width: 100%; margin-top: 7px;
  font-family: inherit; font-size: 13px; line-height: 1.65;
  padding: 10px 12px; border: 1px solid var(--a-line);
  border-radius: 9px; background: var(--a-bg); color: var(--a-ink-2);
  resize: vertical;
}

.due-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.due-act .due-done { margin-left: auto; }
.due-act .btn.ok { background: var(--a-green-bg); border-color: var(--a-green); color: var(--a-green); }

@media (max-width: 560px) {
  .due-top { flex-wrap: wrap; }
  .due-when { text-align: left; width: 100%; display: flex; gap: 8px; align-items: baseline; }
  .due-when b { display: inline; }
  .due-act .due-done { margin-left: 0; width: 100%; }
  .due-act .due-done .btn { width: 100%; }
}

/* ═════════ 처음 오시는 손님 링크 · 등록 ═════════ */

.newlink {
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.newlink.fresh { border-color: var(--a-wine); background: var(--a-wine-bg); }
.newlink .ask-act form { margin-left: auto; }

.ifield-a { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.ifield-a:last-child { margin-bottom: 0; }
.ifield-a label {
  flex: 0 0 132px;
  font-size: 13.5px;
  color: var(--a-ink-2);
  font-weight: 600;
}
.ifield-a input {
  flex: 1; min-width: 0;
  font-family: inherit; font-size: 14.5px; padding: 9px 11px;
  border: 1px solid var(--a-line-2); border-radius: 8px;
  background: var(--a-bg); color: var(--a-ink);
}
.ifield-a input:focus { outline: none; border-color: var(--a-wine); box-shadow: 0 0 0 3px var(--a-wine-bg); }

.newdog-use { display: flex; align-items: center; gap: 9px; cursor: pointer; margin: 0; }
.newdog-use input { width: 17px; height: 17px; accent-color: var(--a-wine); }
.newdog-use h2 { margin: 0; }
.newdog:has(input[name$="_use"]:not(:checked)) { opacity: .5; }

@media (max-width: 560px) {
  .ifield-a { flex-direction: column; align-items: stretch; gap: 5px; }
  .ifield-a label { flex: none; }
}

/* ═════════ 홈 화면에 앱 깔기 안내 ═════════ */

.installbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  animation: ib-up .28s ease;
}
@keyframes ib-up { from { transform: translateY(14px); opacity: 0; } }

.ib-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
  padding: 13px 15px;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08), 0 18px 40px -14px rgba(0,0,0,.32);
}

.ib-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
}

.ib-text { flex: 1; min-width: 0; }
.ib-text p { margin: 0; font-size: 13.5px; line-height: 1.55; }
.ib-text b { font-weight: 700; }

/* 어떤 안내를 보일지는 install.js 가 data-mode 로 정한다 */
.ib-prompt, .ib-ios, .ib-inapp { display: none; }
.installbar[data-mode="prompt"] .ib-prompt,
.installbar[data-mode="ios"] .ib-ios,
.installbar[data-mode="inapp"] .ib-inapp { display: block; }

.ib-ios strong, .ib-inapp strong { display: block; margin-bottom: 2px; }

.ib-acts { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.ib-only-prompt, .ib-only-inapp { display: none; }
.installbar[data-mode="prompt"] .ib-only-prompt,
.installbar[data-mode="inapp"] .ib-only-inapp { display: inline-flex; }

.ib-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .ib-inner { flex-wrap: wrap; gap: 10px; }
  .ib-icon { display: none; }
  .ib-text { flex: 1 1 100%; }
  .ib-acts { width: 100%; }
  .ib-acts .btn { flex: 1; justify-content: center; }
}

.ib-inner { background: var(--a-panel); border: 1px solid var(--a-line-2); color: var(--a-ink); }
.ib-icon { background: var(--a-wine-bg); color: var(--a-wine); }
.ib-text p { color: var(--a-ink-2); }
.ib-text strong { color: var(--a-ink); }
.ib-close { color: var(--a-ink-3); }
.ib-close:hover { background: var(--a-bg); color: var(--a-ink); }

/* 또렷한 색 표시 */
.tc-high {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--a-green);
  background: var(--a-green-bg);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 5px;
  vertical-align: 1px;
}

/* ═════════ 설정 탭 (두 단) ═════════ */

.setnav { margin-bottom: 18px; }

.setnav-top {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--a-line);
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.setnav-top::-webkit-scrollbar { display: none; }

.setnav-top a {
  flex: 0 0 auto;
  padding: 9px 15px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--a-ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.setnav-top a:hover { color: var(--a-ink-2); }
.setnav-top a.on { color: var(--a-wine); border-bottom-color: var(--a-wine); }

.setnav-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.setnav-sub a {
  font-size: 13.5px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--a-line);
  background: var(--a-panel);
  color: var(--a-ink-2);
  white-space: nowrap;
}
.setnav-sub a:hover { border-color: var(--a-line-2); }
.setnav-sub a.on {
  background: var(--a-wine);
  border-color: var(--a-wine);
  color: #fff;
  font-weight: 600;
}

/* ═════════ 미용 진행 화면 ═════════ */

.jobhead .card-body { padding: 16px 18px; }

.jh-top { display: flex; align-items: center; gap: 13px; }
.jh-photo {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--a-line);
}
.jh-photo.ph {
  display: grid; place-items: center;
  background: var(--a-wine-bg); color: var(--a-wine);
  font-weight: 700; font-size: 20px;
}
.jh-who { flex: 1; min-width: 0; }
.jh-who strong { display: block; font-size: 19px; line-height: 1.3; }
.jh-who em { font-style: normal; font-size: 13.5px; color: var(--a-ink-3); }
.jh-when { text-align: right; flex-shrink: 0; }
.jh-when b { display: block; font-size: 18px; }
.jh-when span { font-size: 12px; color: var(--a-ink-3); }

.jh-warn {
  margin-top: 12px; padding: 10px 13px;
  background: var(--a-red-bg); border: 1px solid var(--a-red);
  border-radius: var(--a-radius);
  font-size: 14.5px; color: var(--a-ink); line-height: 1.6;
}
.jh-warn strong { color: var(--a-red); margin-right: 5px; }

.jh-note { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.jh-note span {
  font-size: 12.5px; color: var(--a-ink-2);
  background: var(--a-bg); border: 1px solid var(--a-line);
  border-radius: 999px; padding: 3px 10px;
}
.jh-note b { color: var(--a-ink-3); font-weight: 600; margin-right: 3px; }

.jh-prep {
  margin-top: 10px; padding: 9px 12px;
  background: var(--a-blue-bg); border: 1px solid var(--a-blue);
  border-radius: var(--a-radius); font-size: 13px;
}
.jh-prep strong { color: var(--a-blue); margin-right: 6px; }
.jh-prep span { margin-right: 8px; color: var(--a-ink-2); }
.jh-prep span.need { color: var(--a-red); font-weight: 600; }

.jh-acts { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* 어디까지 왔나 */
.stepbar {
  display: flex;
  gap: 3px;
  margin: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.stepbar::-webkit-scrollbar { display: none; }

.step {
  flex: 1 0 auto;
  min-width: 78px;
  text-align: center;
  position: relative;
  padding-top: 16px;
}
.step i {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--a-panel); border: 2px solid var(--a-line-2);
}
.step::before {
  content: ''; position: absolute; top: 5px; left: 0; right: 50%;
  height: 2px; background: var(--a-line);
}
.step::after {
  content: ''; position: absolute; top: 5px; left: 50%; right: 0;
  height: 2px; background: var(--a-line);
}
.step:first-child::before, .step:last-child::after { display: none; }

.step span { display: block; font-size: 11.5px; color: var(--a-ink-3); line-height: 1.35; }
.step em { display: block; font-style: normal; font-size: 10.5px; color: var(--a-ink-3); }

.step.done i { background: var(--a-green); border-color: var(--a-green); }
.step.done::before, .step.done::after { background: var(--a-green); }
.step.done span { color: var(--a-ink-2); }

.step.now i {
  background: var(--a-wine); border-color: var(--a-wine);
  box-shadow: 0 0 0 4px var(--a-wine-bg);
}
.step.now::before { background: var(--a-green); }
.step.now span { color: var(--a-wine); font-weight: 700; font-size: 12.5px; }

/* 지금 할 일 */
.jobnow { border-color: var(--a-wine); }
.jobnow .card-head { background: var(--a-wine-bg); border-color: var(--a-wine); }
.jobnow .card-head h2 { color: var(--a-wine); }
.jobnow .card-head form { display: inline; }

.jobnext { margin-top: 16px; }
.jobnext .btn { width: 100%; justify-content: center; }

.jobdone {
  margin-top: 14px; text-align: center;
  padding: 16px; background: var(--a-green-bg);
  border-radius: var(--a-radius);
}
.jobdone strong { display: block; color: var(--a-green); margin-bottom: 8px; }

/* 추가 항목 · 계산서 */
.extra-list { display: grid; gap: 7px; margin-bottom: 14px; }
.extra {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  border: 1.5px solid var(--a-line); border-radius: var(--a-radius);
  padding: 11px 13px; cursor: pointer; margin: 0;
}
.extra.on { border-color: var(--a-wine); background: var(--a-wine-bg); }
.extra input { width: 18px; height: 18px; accent-color: var(--a-wine); flex-shrink: 0; }
.ex-label { font-size: 14.5px; font-weight: 600; }
.ex-price { margin-left: auto; font-size: 14px; color: var(--a-wine); font-weight: 700; }
.extra em {
  flex: 1 1 100%; font-style: normal; font-size: 12px;
  color: var(--a-ink-3); padding-left: 27px;
}

.billbox {
  background: var(--a-bg); border: 1px solid var(--a-line);
  border-radius: var(--a-radius); padding: 12px 15px; margin-bottom: 12px;
}
.bill-row { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.bill-row.sub { color: var(--a-ink-2); font-size: 13.5px; padding-left: 10px; }
.bill-row.total {
  border-top: 1px solid var(--a-line); margin-top: 6px; padding-top: 8px;
  font-size: 16px; font-weight: 700;
}
.bill-row.total b { color: var(--a-wine); }

/* 문구 */
.jobmsg { margin-top: 16px; }
.jobmsg summary {
  font-size: 14px; font-weight: 600; color: var(--a-wine);
  cursor: pointer; padding: 4px 0; user-select: none;
}
.jobmsg summary em { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--a-ink-3); }
.jobmsg textarea {
  width: 100%; margin-top: 8px;
  font-family: inherit; font-size: 13.5px; line-height: 1.7;
  padding: 12px 14px; border: 1px solid var(--a-line);
  border-radius: 9px; background: var(--a-bg); color: var(--a-ink-2);
  resize: vertical;
}

.jobmore { margin-top: 16px; }
.jobmore > summary {
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  color: var(--a-ink-2); cursor: pointer; user-select: none;
}

@media (max-width: 560px) {
  .jh-top { flex-wrap: wrap; }
  .jh-when { text-align: left; width: 100%; display: flex; gap: 8px; align-items: baseline; }
  .jh-when b { font-size: 16px; }
  .step { min-width: 66px; }
  .step span { font-size: 10.5px; }
}
