/* =========================================================
   크빌 2026 QR오더 허브 — 화면 디자인
   와이어프레임 kv26-qrhub-wire-main-v1 기준
   글꼴은 폰에 이미 있는 것만 사용합니다(다운로드 0KB = LTE에서 빠름)
   ========================================================= */

:root {
  --brand:       #2A317C;  /* 브랜드 남색 */
  --brand-dark:  #1E2560;
  --brand-weak:  #EEF0FA;  /* 존 뱃지 배경 */
  --text:        #1A1A2E;
  --sub:         #6B6B75;
  --line:        #E5E7EB;
  --line-mid:    #D8DBE3;
  --photo:       #E5E7EB;
  --bg:          #FFFFFF;
  --notice-bg:   #FFFBEB;
  --notice-line: #F59E0B;
  --notice-text: #B45309;
  --maxw:        520px;    /* 본문 최대 폭 (PC에서도 폰처럼 보이게) */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
               "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: rgba(42,49,124,.12);
  overflow-x: hidden;
}

/* ---------- ① 헤더 (고정) ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hdr-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

.btn-map {
  flex: none;
  min-height: 34px;
  padding: 0 14px;
  border: 1.5px solid var(--brand);
  border-radius: 17px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-map:active { background: var(--brand-weak); }

/* ---------- 본문 폭 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 12px 16px 24px; }

/* ---------- ② 공지 ---------- */
.notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--notice-line);
  border-radius: 8px;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- ③ 검색 ---------- */
.search { position: relative; margin-bottom: 12px; }
.search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; pointer-events: none; opacity: .65;
}
.search-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line-mid);
  border-radius: 22px;
  background: #F3F4F6;
  color: var(--text);
  font: inherit;
  font-size: 16px;            /* 16px 미만이면 아이폰이 화면을 확대해버립니다 */
  -webkit-appearance: none;
  appearance: none;
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(42,49,124,.12);
}
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--sub);
  font-size: 14px; cursor: pointer;
}

/* ---------- ④ 카테고리 버튼 (가로 스크롤 · 단일 선택) ---------- */
/* 오른쪽에 버튼이 더 있다는 것을 알리려고 가장자리를 흐리게 덮습니다 */
.cats-wrap { position: relative; margin: 0 -16px 8px; }
.cats-wrap::before,
.cats-wrap::after {
  content: "";
  position: absolute; top: 0; bottom: 10px; width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 1;
}
.cats-wrap::before { left: 0;  background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)); }
.cats-wrap::after  { right: 0; background: linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)); }
.cats-wrap.can-left::before  { opacity: 1; }
.cats-wrap.can-right::after  { opacity: 1; }

.cats {
  display: flex;
  gap: 8px;
  padding: 2px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cats::-webkit-scrollbar { display: none; }

.cat {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cat[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* ---------- 개수 안내 ---------- */
.count { margin: 2px 2px 10px; color: var(--sub); font-size: 12.5px; }

/* ---------- ⑤ 부스 카드 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }

.card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-mid);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
a.card:active { background: #FAFAFC; border-color: var(--brand); }

/* 링크 없음 / 일시중지 / 마감 → 흐리게 + 탭 불가 */
.card.is-off { opacity: .55; }

.card-photo {
  flex: none;
  width: 72px; height: 72px;
  border-radius: 8px;
  background: var(--photo);
  object-fit: cover;
  display: block;
}
.card-photo.is-blank {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed #9CA3AF;
  color: var(--sub); font-size: 10px; text-align: center; line-height: 1.3;
}

.card-body { flex: 1 1 auto; min-width: 0; padding-right: 52px; }

.card-top { display: flex; align-items: center; gap: 6px; }
.card-name {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zone {
  flex: none;
  padding: 2px 8px;
  border: 0; border-radius: 9px;
  background: var(--brand-weak);
  color: var(--brand);
  font: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer;
}
.card-menu {
  margin-top: 3px; font-size: 13.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc {
  margin-top: 2px; font-size: 12px; color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.card-cta {
  position: absolute; right: 12px; bottom: 10px;
  font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap;
}
.card.is-off .card-cta { color: var(--sub); font-weight: 500; }

/* ---------- 결과 없음 ---------- */
.empty { padding: 48px 8px; text-align: center; color: var(--sub); font-size: 14px; line-height: 1.7; }

/* ---------- 푸터 ---------- */
.ftr {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 18px 16px 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.8;
}
.ftr-sub { margin-top: 8px; opacity: .7; }

/* ---------- ⑧ 지도 팝업 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(26,26,46,.55); }

.modal-box {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 520px; max-height: 88vh;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-x {
  width: 32px; height: 32px;
  border: 1px solid var(--line-mid); border-radius: 50%;
  background: #F3F4F6; color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
}
.modal-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 14px;
  touch-action: pinch-zoom pan-x pan-y;
}
.map-img { display: block; width: 100%; height: auto; border-radius: 8px; cursor: zoom-in; }
.map-img.is-zoom { width: 220%; max-width: none; cursor: zoom-out; }
.modal-tip { padding: 10px 14px 14px; text-align: center; color: var(--sub); font-size: 11.5px; }
