/* Hidden Pass 공통 토큰·컴포넌트. 상점은 shop.css, 관리 화면은 console.css */
:root {
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --bg: #f6f7f9; --surface: #fff; --subtle: #f1f3f5;
  --line: #e4e7eb; --line-soft: #eef0f3; --line-strong: #cfd4da;
  --ink: #121417; --text: #2a2e34; --sub: #5d646e; --weak: #8a919b; --faint: #b6bbc2;
  --brand: #ee3b6a; --brand-hover: #d92c5a; --brand-ink: #c81f4e; --brand-tint: #fdebf0;
  --ok: #0a7f6f; --ok-bg: #e3f4f1;
  --warn: #a35a00; --warn-bg: #fbf0e0;
  --danger: #cc2f3a; --danger-bg: #fbe9ea;
  --info: #2f5fd0; --info-bg: #e8eefb;
  --neutral-bg: #eef0f3;
  --r: 10px; --r-sm: 8px; --r-lg: 14px;
  --h: 40px; --h-sm: 32px;
  --shadow: 0 6px 24px rgba(18, 20, 23, .08), 0 1px 3px rgba(18, 20, 23, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--sub); } .weak { color: var(--weak); font-size: 13px; }
.strike { text-decoration: line-through; color: var(--weak); }
.hide { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 로고 */
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.035em; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo small { font-size: 12px; font-weight: 600; color: var(--weak); letter-spacing: 0; margin-left: 2px; }

/* 버튼 */
.btn { height: var(--h); padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--line-strong); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #2a2e34; }
.btn.soft { background: var(--brand-tint); border-color: transparent; color: var(--brand-ink); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--subtle); }
.btn.danger { color: var(--danger); }
.btn.sm { height: var(--h-sm); padding: 0 12px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.link { border: 0; background: none; color: var(--brand-ink); padding: 0; height: auto; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { position: relative; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--subtle); }
.dot-badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.dot-badge[hidden] { display: none; }
.ico { display: block; flex: none; }

/* 입력 */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; height: var(--h); border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; padding: 0 12px; outline: none; font-size: 15px; }
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 20, 23, .08); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.field { min-width: 0; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--weak); margin-top: 5px; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.form .wide { grid-column: 1 / -1; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }

/* 칩 */
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--neutral-bg); color: var(--sub); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.brand { background: var(--brand-tint); color: var(--brand-ink); }
.chip.dark { background: var(--ink); color: #fff; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }

/* 표 */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { height: 40px; font-size: 13px; font-weight: 600; color: var(--sub); text-align: left; padding: 0 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
.t tr:last-child td { border-bottom: 0; }
.t .r, .t th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #fafbfc; }
.t .title { font-weight: 600; color: var(--ink); }
.t .meta { font-size: 12px; color: var(--weak); margin-top: 2px; }
.t td.tight { width: 1%; white-space: nowrap; }

/* 모달·토스트 */
.overlay { position: fixed; inset: 0; background: rgba(18, 20, 23, .38); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 640px; box-shadow: var(--shadow); padding: 24px; }
.modal h3 { font-size: 18px; margin-bottom: 18px; }
.modal.narrow { max-width: 440px; }
.toast { position: fixed; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow); z-index: 60; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); }
.empty { color: var(--weak); padding: 36px 20px; text-align: center; }
.skeleton { color: var(--weak); padding: 48px 0; text-align: center; }

/* 사진 자리 */
.ph { background: var(--subtle); display: grid; place-items: center; color: var(--faint); font-weight: 800; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--subtle); flex: none; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }

@media (max-width: 720px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; padding: 22px 18px calc(22px + var(--safe-b)); }
}
