/* =========================================================
   pages.css — 메뉴별 내부 페이지 공통 스타일 + 이미지 정렬 규칙
   home-vector.css 다음에 로드된다.
   ========================================================= */

/* ---------- 1. 이미지 프레임: 모든 이미지는 같은 규격 + 같은 여백 ---------- */
:root {
  --img-pad: 10px;          /* 칸 안쪽 여백 */
  --img-radius: 10px;       /* 이미지 모서리 */
  --img-ratio: 16 / 10;     /* 기본 카드 이미지 비율 */
  --card-radius: 14px;
}

/* 이미지를 감싸는 칸: 비율 고정 + 균일한 안쪽 여백 */
.img-box {
  position: relative;
  width: 100%;
  aspect-ratio: var(--img-ratio);
  padding: var(--img-pad);
  background: #eef2f5;
  border-radius: calc(var(--img-radius) + var(--img-pad));
  overflow: hidden;
}
/* 이미지 자체는 여백 안쪽 영역을 정확히 채운다 (비율 왜곡 없음) */
.img-box > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--img-radius);
  background: #e4e9ee;
}
.img-box.ratio-square { --img-ratio: 1 / 1; }
.img-box.ratio-portrait { --img-ratio: 4 / 5; }
.img-box.ratio-wide { --img-ratio: 16 / 9; }
/* 로고처럼 잘리면 안 되는 이미지 */
.img-box.fit-contain > img { object-fit: contain; background: #fff; }

/* 이미지가 아직 없는 칸 */
.img-box.is-empty {
  display: grid;
  place-items: center;
  border: 1px dashed #cdd7df;
  background: #f6f9fb;
  color: #93a0aa;
  font-size: 12px;
  font-weight: 800;
}
.img-box.is-empty svg { width: 30px; height: 30px; }

/* ---------- 2. 홈 템플릿 카드: 같은 크기 + 같은 여백으로 통일 ---------- */
.template-card {
  padding: var(--img-pad);
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.template-photo {
  position: relative;
  width: 100%;
  height: auto !important;
  aspect-ratio: var(--img-ratio) !important;
  padding: 0;
  border-radius: var(--img-radius) !important;
  overflow: hidden !important;
  background: #eef2f5;
  flex: 0 0 auto;
}
.template-photo img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: inherit;
}
.template-card > b {
  height: auto !important;
  padding: 0 2px 2px !important;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal !important;
}

/* ---------- 3. 홈 히어로 이미지: 좌우 빈 공간 없이 칸을 채운다 ---------- */
/* 배너 사진은 어떤 화면 폭에서도 잘리거나 늘어나지 않게 한다.
   contain 이라 비율이 유지되고, 남는 자리는 배너 배경(그라데이션)이 채운다. */
.hero-photo img {
  position: absolute !important;
  inset: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: right bottom !important;
}

/* ---------- 4. 내부 페이지 공통 레이아웃 ---------- */
.home-content { padding-bottom: 34px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 16px;
}
.page-head h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.055em;
  color: #17242e;
}
.page-head p { margin: 7px 0 0; color: #7e8a95; font-size: 13px; font-weight: 650; }
.page-head .page-head-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid #dbe3e9;
  border-radius: 999px;
  background: #fff;
  color: #35424d;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: .18s ease;
}
.pill-btn:hover { border-color: #c7d2da; box-shadow: 0 4px 12px rgba(41,55,67,.06); }
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7317, #ff4e14);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 83, 20, .2);
}
.pill-btn.primary:hover { box-shadow: 0 10px 22px rgba(255, 83, 20, .28); }
.pill-btn.ghost { background: transparent; }
.pill-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
/* 나란히 놓는 버튼 묶음 — 두 버튼의 폭·높이를 같게 맞춘다. */
.btn-pair { display: flex; align-items: center; gap: 8px; }
.btn-pair .pill-btn { min-width: 96px; justify-content: center; padding: 0 14px; }
/* 설정 화면의 하단 단독 버튼도 같은 폭으로 맞춘다. */
/* 보조 동작용 작은 버튼 (탈퇴하기 등) */
.pill-btn.sm { height: 32px; padding: 0 13px; font-size: 11.5px; min-width: 0; }
/* 설정 화면의 항목 오른쪽 버튼은 글자 수와 상관없이 같은 폭으로 맞춘다. */
body[data-page="settings"] .row-right .pill-btn { min-width: 96px; justify-content: center; }
body[data-page="settings"] .panel-foot .pill-btn { min-width: 96px; justify-content: center; }
body[data-page="settings"] .panel-foot .pill-btn.sm { min-width: 0; }

/* 계정 항목 인라인 편집 영역 (프로필 · 비밀번호) */
.edit-box { margin-top: 10px; padding: 16px; border: 1px solid #e2e8ed; border-radius: 14px; background: #f8fbfd; }
.edit-box .field { margin-bottom: 0; }
.edit-box .field-row { margin-top: 12px; }
.edit-avatar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.edit-avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-actions { display: flex; gap: 8px; margin-top: 14px; }
.edit-actions .pill-btn { min-width: 84px; justify-content: center; }

/* 회원 탈퇴 확인 영역 */
.withdraw-box { margin-top: 12px; padding: 14px 16px; border: 1px solid #f3d3cb; border-radius: 14px; background: #fff8f6; }
.withdraw-box > b { display: block; font-size: 13.5px; font-weight: 900; color: #c73a22; }
.withdraw-box p { margin: 6px 0 12px; font-size: 12.5px; font-weight: 650; line-height: 1.55; color: #7e8a95; }
.withdraw-box p a { color: #ff6618; font-weight: 850; }
.withdraw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.withdraw-row .input { flex: 1 1 200px; min-width: 0; height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid #dbe3e9; color: #212c36; }
.withdraw-row .pill-btn { flex: 0 0 auto; min-width: 88px; justify-content: center; }

/* 매장 선택 바 — 비즈니스 요금제는 매장을 여러 개 등록할 수 있다. (명령서 16항)
   버튼 높이·반경·글꼴은 .pill-btn 과 같은 눈금을 쓴다. */
.store-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid #eef2f5;
}
.store-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 8px 0 16px;
  border: 1px solid #dbe3e9;
  border-radius: 999px;
  background: #fff;
  color: #35424d;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: .18s ease;
}
.store-tab:hover { border-color: #c7d2da; }
.store-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7317, #ff4e14);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 83, 20, .2);
}
.store-tab .store-tab-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 36, 46, .08);
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.store-tab.is-active .store-tab-del { background: rgba(255, 255, 255, .26); }
.store-tab .store-tab-del:hover { background: rgba(255, 83, 20, .3); }
.store-bar .store-count { margin-left: auto; color: #7e8a95; font-size: 12px; font-weight: 800; }
/* 콘텐츠 만들기에서 쓰는 선택 전용 매장 바 — 삭제 버튼이 없으므로 좌우 여백을 같게 준다. */
.store-bar.is-picker { padding-bottom: 0; border-bottom: 0; margin-bottom: 10px; }
.store-bar.is-picker .store-tab { padding: 0 16px; }

/* 매장 사진 — 각 사진 위의 삭제 버튼과 클릭 가능한 추가 칸 */
.img-box.is-clickable { cursor: pointer; }
.img-box.is-clickable:hover { border-color: #ff7317; color: #ff7317; }
.photo-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 36, 46, .62);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: .16s ease;
}
.img-box:hover .photo-del, .photo-del:focus-visible { opacity: 1; }
.photo-del:hover { background: #ff4e14; }
/* 지금 위 큰 화면에 보이는 사진 */
.img-box.is-previewing { outline: 2px solid #ff7317; outline-offset: -2px; }
.photo-cover-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 36, 46, .62);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

/* 카드 */
.panel {
  border: 1px solid #e2e8ed;
  border-radius: var(--card-radius);
  background: #fff;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(41, 55, 67, .04);
}
.panel + .panel { margin-top: 14px; }
.panel > h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.045em;
  color: #1b2732;
}
.panel > h2 + p { margin: 0 0 16px; color: #8a959f; font-size: 12px; font-weight: 650; }
.panel-foot { margin-top: 18px; display: flex; gap: 8px; justify-content: flex-end; }

.panel-grid { display: grid; gap: 14px; align-items: start; }
/* 그리드의 칸으로 나란히 놓인 패널은 위아래로 쌓인 게 아니므로 윗여백을 주지 않는다.
   (이 여백 때문에 오른쪽 칸이 왼쪽보다 14px 내려가 있었다.) */
.panel-grid > .panel + .panel { margin-top: 0; }
/* equal: 좌우 칸의 높이를 같게 맞춘다. 어느 쪽이 길어지든 아래 테두리가 같은 줄에 놓인다. */
.panel-grid.equal { align-items: stretch; }
.panel-grid.equal > .panel { display: flex; flex-direction: column; }
.panel-grid.equal > div,
.panel-grid.equal > aside {
  display: flex;
  flex-direction: column;
  /* 남는 높이는 패널 안쪽이 아니라 패널 사이로 보낸다.
     그래야 모든 패널의 위/아래 안쪽 여백이 똑같이 유지된다. */
  justify-content: space-between;
}
.panel-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-grid.side { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }

/* 폼 */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  color: #45525c;
  font-size: 12px;
  font-weight: 850;
}
.field > span em { font-style: normal; color: #ff5b18; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=url],
.field input[type=number],
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #dbe3e9;
  border-radius: 10px;
  background: #fbfdfe;
  color: #212c36;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  outline: 0;
  transition: .16s ease;
}
.field textarea { min-height: 118px; line-height: 1.6; }
/* 펼침 목록(select)은 브라우저 기본 모양 대신 사이트 공통 모양으로 통일한다.
   (고객센터 문의 유형 / 가게 정보 업종 / 콘텐츠 만들기 말투 등 전부 같은 모양) */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237e8a95' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 17px 17px;
}
.field select:hover { border-color: #ffc39a; }
.field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6618' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.field select option { color: #212c36; background: #fff; }
/* 입력칸은 드래그로 크기를 바꿀 수 없도록 고정한다. */
textarea { resize: none; }
.field :focus { border-color: #ff8a3d; background: #fff; box-shadow: 0 0 0 3px rgba(255, 120, 30, .12); }
.field small { display: block; margin-top: 6px; color: #97a2ab; font-size: 11px; font-weight: 650; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-hint { display: block; margin: -6px 0 15px; color: #97a2ab; font-size: 11px; font-weight: 650; }

/* 선택 카드(칩) */
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 15px;
  border: 1.5px solid #e0e7ec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: .16s ease;
}
.choice:hover { border-color: #ffc39a; }
.choice svg { width: 26px; height: 26px; margin-bottom: 4px; color: #ff6618; }
.choice b { color: #1e2933; font-size: 13.5px; font-weight: 900; }
.choice small { color: #8a959f; font-size: 11px; font-weight: 650; }
.choice.selected { border-color: #ff6618; background: #fff7f2; box-shadow: 0 6px 16px rgba(255, 98, 23, .1); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

/* 태그/상태 */
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3f7;
  color: #55636e;
  font-size: 11px;
  font-weight: 850;
}
.tag.orange { background: #fff0e6; color: #e2570f; }
.tag.green { background: #e7f8ec; color: #1a9a48; }
.tag.blue { background: #e9f3ff; color: #1a72c7; }
.tag.gray { background: #eef1f4; color: #6c7883; }

/* 통계 타일 */
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-tile {
  border: 1px solid #e2e8ed;
  border-radius: var(--card-radius);
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(41, 55, 67, .04);
}
.stat-tile span { display: block; color: #8a959f; font-size: 11.5px; font-weight: 800; }
.stat-tile strong {
  display: block;
  margin-top: 7px;
  color: #17222c;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -.04em;
}
.stat-tile small { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; color: #1a9a48; }
.stat-tile small.down { color: #e2452b; }

/* 콘텐츠 카드 목록 */
.asset-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asset-card {
  display: block;
  border: 1px solid #e2e8ed;
  border-radius: var(--card-radius);
  background: #fff;
  padding: var(--img-pad);
  box-shadow: 0 4px 14px rgba(41, 55, 67, .04);
  transition: .18s ease;
}
.asset-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(41, 55, 67, .09); }
.asset-card .img-box { padding: 0; border-radius: var(--img-radius); }
.asset-body { padding: 10px 4px 2px; }
.asset-body b { display: block; color: #1e2933; font-size: 13px; font-weight: 900; }
.asset-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.asset-meta small { color: #97a2ab; font-size: 11px; font-weight: 700; margin-left: auto; }
.content-image-actions { margin-top: 10px; }
.content-image-create, .content-image-download { width: 100%; min-height: 34px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.content-image-create { color: #fff; border: 0; background: #f36d21; }
.content-image-create:disabled { opacity: .68; cursor: wait; }
.content-image-download { display: inline-flex; align-items: center; justify-content: center; color: #dd5a12; border: 1px solid #f1c5a8; background: #fff8f3; text-decoration: none; box-sizing: border-box; }
.content-image-notice { min-height: 15px; margin: 7px 0 0; color: #c34c24; font-size: 11px; line-height: 1.35; }

/* 리스트 */
.row-list { display: grid; gap: 8px; }
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #e6ecf0;
  border-radius: 11px;
  background: #fff;
}
.row-item .row-title { display: grid; gap: 3px; min-width: 0; }
.row-item b { color: #1e2933; font-size: 13px; font-weight: 850; }
.row-item span { color: #8a959f; font-size: 11.5px; font-weight: 650; }
.row-item .row-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* 안내 / 빈 상태 */
.empty-note {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 40px 20px;
  border: 1px dashed #d3dce3;
  border-radius: 12px;
  background: #f8fbfc;
  color: #8a959f;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}
.info-note {
  padding: 13px 15px;
  border: 1px solid #ffe0c8;
  border-radius: 11px;
  background: #fff8f2;
  color: #a3560f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

/* 아코디언 (고객센터 FAQ) */
.faq details {
  border: 1px solid #e6ecf0;
  border-radius: 11px;
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.faq summary {
  cursor: pointer;
  color: #22303a;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: #ff6618; font-weight: 900; }
.faq details[open] summary::after { content: "－"; }
.faq p { margin: 10px 0 0; color: #6b7883; font-size: 12.5px; font-weight: 650; line-height: 1.7; }
/* 열린 항목은 선택 카드(.choice.selected)와 같은 표시 방식으로 통일한다. */
.faq details { transition: .16s ease; }
.faq details:hover { border-color: #ffc39a; }
.faq details[open] {
  border-color: #ff6618;
  background: #fff7f2;
  box-shadow: 0 6px 16px rgba(255, 98, 23, .1);
}
.faq details[open] > summary { color: #d9530f; }

/* 토글 스위치 */
/* 토글 줄도 목록 줄(.row-item)과 같은 규격으로 맞춘다. */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #e6ecf0;
  border-radius: 11px;
  background: #fff;
}
/* 목록 줄과 토글 줄의 높이를 통일해 좌우 칸이 같은 눈금에 놓이게 한다. */
.row-item, .switch-row { min-height: 68px; }
.switch-row .switch-text { flex: 1 1 auto; min-width: 0; }
.switch-row .switch { margin-left: auto; flex: 0 0 auto; }
.switch-row .switch-text { display: grid; gap: 3px; }
.switch-row b { color: #22303a; font-size: 13px; font-weight: 850; }
.switch-row span { color: #8a959f; font-size: 11.5px; font-weight: 650; }
.switch { margin-left: auto; position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d5dde3;
  transition: .18s ease;
  pointer-events: none;
}
.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: .18s ease;
}
.switch input:checked + i { background: #ff6618; }
.switch input:checked + i::after { transform: translateX(20px); }

/* 색상 견본 (브랜드 스타일) */
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .07);
  cursor: pointer;
  position: relative;
}
.swatch.selected::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid #ff6618;
  border-radius: 15px;
}

/* 막대 그래프 (통계) */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 8px; }
.bar-chart .bar i {
  display: block;
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #ffa14a, #ff6618);
}
.bar-chart .bar span { text-align: center; color: #8a959f; font-size: 11px; font-weight: 800; }
.bar-chart .bar b { text-align: center; color: #45525c; font-size: 11.5px; font-weight: 900; }

/* 반응형 */
@media (max-width: 1420px) {
  .asset-grid, .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .panel-grid.cols-3, .panel-grid.cols-4, .panel-grid.side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-grid, .stat-grid, .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- 5. styles.css(다크 테마) 요소를 밝은 셸 안에서 재정의 ---------- */
.vector-home-body .message {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  background: #f1f5f8;
  border: 1px solid #e0e7ec;
  color: #4a5761;
}
.vector-home-body .message.error { background: #fff1f0; border-color: #ffd4cf; color: #c73a22; }
.vector-home-body .message.success { background: #eefaf1; border-color: #c9ecd6; color: #16803f; }
.vector-home-body .notice {
  padding: 14px 16px;
  border-radius: 11px;
  background: #f6f9fb;
  border: 1px solid #e1e8ed;
  color: #7c8892;
  font-size: 12.5px;
  font-weight: 700;
}
/* 요금제 카드 4개(무료·베이직·프로·비즈니스)를 같은 눈금에 맞춰 배치한다. (명령서 6·35항)
   1400px 이상: 4열 / 1400~1024px: 2×2 / 760px 이하: 1열 */
.vector-home-body .price-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* 2×2로 접힐 때도 위·아래 줄의 카드 높이가 같도록 행 높이를 균등하게 만든다. (명령서 35항) */
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 14px;
  max-width: 1320px;
}
.vector-home-body .price-card {
  position: relative;
  min-height: 0;
  display: grid;
  /* 제목 / 가격 / 설명 / 기능목록 / 버튼 — 카드마다 같은 줄에 오도록 행을 고정한다. */
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0;
  padding: 22px 20px;
  border: 1.5px solid #e2e8ed;
  border-radius: var(--card-radius);
  background: #fff;
  color: #1e2933;
  box-shadow: 0 4px 14px rgba(41, 55, 67, .04);
}
.vector-home-body .price-card.featured {
  border-color: #ff8a3d;
  box-shadow: 0 10px 26px rgba(255, 98, 23, .12);
}
.vector-home-body .price-card.is-current { border-color: #b9c4cd; background: #fbfcfd; }
.vector-home-body .price-card .badge {
  right: 16px;
  top: 16px;
  background: #ff6618;
  color: #fff;
}
.vector-home-body .price-card .badge-business { background: #2b3a48; }
.vector-home-body .price-card .price-name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #17222c;
  padding-right: 62px; /* 배지와 겹치지 않도록 */
}
.vector-home-body .price-card .price {
  margin: 10px 0 6px;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -.05em;
  line-height: 1.15;
  color: #17222c;
  white-space: nowrap;
}
.vector-home-body .price-card .price small { margin-left: 3px; font-size: 12.5px; color: #8a959f; font-weight: 800; }
.vector-home-body .price-card .price-desc {
  margin: 0 0 4px;
  min-height: 34px;
  color: #8a959f !important;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}
.vector-home-body .features { color: #4a5761; font-size: 12.5px; font-weight: 700; margin: 8px 0 16px; align-self: start; }
.vector-home-body .features li { padding: 5px 0; display: flex; gap: 6px; align-items: flex-start; line-height: 1.45; }
.vector-home-body .features li::before { color: #1a9a48; flex: 0 0 auto; }
.vector-home-body .price-card .price-cta { width: 100%; align-self: end; }
.vector-home-body .price-card .price-cta.is-current {
  background: #f1f5f8;
  border-color: #e2e8ed;
  color: #8a959f;
  cursor: default;
}
.vector-home-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border: 1px solid #dbe3e9;
  border-radius: 11px;
  background: #fff;
  color: #35424d;
  font-size: 13px;
  font-weight: 900;
}
.vector-home-body .btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7317, #ff4e14);
  color: #fff;
}
.vector-home-body .btn-ghost { background: transparent; }
/* 1400px 이하에서는 4열이 좁아 글자가 눌리므로 2×2 로 내린다. */
@media (max-width: 1400px) { .vector-home-body .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; } }
@media (max-width: 760px)  { .vector-home-body .price-grid { grid-template-columns: 1fr; max-width: 420px; } }

/* 좁은 화면에서는 히어로 손글씨 문구가 사진 속 문구와 겹치지 않도록 숨긴다. */
@media (max-width: 1180px) {
  .hero-cheer { display: none; }
}

/* 로그인 안내 모달: 밝은 홈 화면에서 글자가 묻히지 않도록 밝은 카드로 표시한다. */
.vector-home-body .login-modal-card {
  background: #fff;
  border: 1px solid #e2e8ed;
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(23, 34, 44, .22);
  color: #1c2833;
}
.vector-home-body .login-modal-backdrop { background: rgba(20, 34, 49, .55); }
/* 밝은 화면에서의 공용 확인 팝업 색상 */
.vector-home-body .oh-dialog-card h2 { color: #17222c; }
.vector-home-body .oh-dialog-message { color: #55636e; }
.vector-home-body .login-modal-card .oh-dialog-actions .oh-dialog-cancel { background: #fff; border-color: #dbe3e9; color: #35424d; }
.vector-home-body .login-modal-card .oh-dialog-actions .oh-dialog-danger { background: #e5432a; border-color: transparent; color: #fff; }
.vector-home-body .login-modal-card .oh-dialog-actions .oh-dialog-danger:hover { background: #c9351f; }
.vector-home-body .login-modal-card h2 { color: #17222c; font-size: 24px; font-weight: 950; }
.vector-home-body .login-modal-card p { color: #7e8a95; font-size: 13.5px; font-weight: 650; }
.vector-home-body .login-modal-close { background: #f1f5f8; color: #55636e; }

/* 로그인/계정찾기/회원가입 통합 팝업: 밝은 화면 안에서는 밝은 카드에 맞춰 폼도 밝게 표시한다. */
.vector-home-body .login-modal-card.auth-modal-card p,
.vector-home-body .login-modal-card.auth-modal-card .auth-panel > p { color: #7e8a95; }
.vector-home-body .auth-tabs { background: #f1f5f8; border-color: #e2e8ed; }
.vector-home-body .auth-tab { color: #7e8a95; }
.vector-home-body .auth-tab:hover { color: #17222c; }
.vector-home-body .auth-tab.active { background: #fff; color: #17222c; box-shadow: 0 2px 8px rgba(23, 34, 44, .1); }
.vector-home-body .login-modal-card .label { color: #45525c; }
.vector-home-body .login-modal-card .input {
  background: #fbfdfe;
  border-color: #dbe3e9;
  color: #212c36;
}
.vector-home-body .login-modal-card .input:focus { border-color: #ff8a3d; box-shadow: 0 0 0 3px rgba(255, 120, 30, .12); }
.vector-home-body .login-modal-card .check { color: #7e8a95; }
/* 밝은 배경 팝업에서의 약관·방침 강조 색상 */
.vector-home-body .login-modal-card .check .legal-link { color: #ff6618; }
.vector-home-body .login-modal-card .check .legal-link:hover { color: #e05300; }
.vector-home-body .login-modal-card .check .check-required { color: #ff6618; }
.vector-home-body .login-modal-card .field-guide { color: #97a2ab; }
.vector-home-body .login-modal-card .field-guide b { color: #45525c; }
.vector-home-body .login-modal-card .test-account-box { background: #fff7f2; border-color: #ffd9b8; }
.vector-home-body .login-modal-card .test-account-box strong { color: #b3540f; }
.vector-home-body .login-modal-card .test-account-box span { color: #97a2ab; }
.vector-home-body .login-modal-card .test-account-credentials code { background: #f6f9fb; border-color: #e2e8ed; color: #35424d; }
.vector-home-body .login-modal-card .test-login-btn { background: #fff; border-color: #dbe3e9; color: #35424d; }
.vector-home-body .login-modal-card .auth-note { background: #fff8f2; border-color: #ffe0c8; color: #a3560f; }
.vector-home-body .login-modal-card .auth-note a { color: #ff6618; }
.vector-home-body .login-modal-card .auth-foot { color: #7e8a95; }
.vector-home-body .login-modal-card .auth-foot-sep { color: #cbd4db; }
.vector-home-body .login-modal-card .link-btn { color: #ff6618; }
.vector-home-body .login-modal-card .auth-divider { color: #97a2ab; }
.vector-home-body .login-modal-card .auth-divider::before,
.vector-home-body .login-modal-card .auth-divider::after { background: #e2e8ed; }
.vector-home-body .login-modal-card .auth-divider em { color: #97a2ab; }
.vector-home-body .login-modal-card .biz-lookup-row .btn {
  height: 56px;
  border-color: #dbe3e9;
  background: #fff;
  color: #35424d;
}
.vector-home-body .login-modal-card .biz-lookup-result.ok { color: #16803f; }
.vector-home-body .login-modal-card .biz-lookup-result.warn { color: #a3560f; }
.vector-home-body .login-modal-card .biz-lookup-result.error { color: #c73a22; }

/* 크레딧 표시 (숫자는 credit-policy.js 가 채운다) */
.sub-head {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #35424d;
}
.choice-credit {
  margin-top: 8px;
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff3ec;
  border: 1px solid #ffd9c2;
  color: #d9530f;
  font-size: 11.5px;
  font-weight: 850;
}
.choice.selected .choice-credit { background: #ff6618; border-color: #ff6618; color: #fff; }
.estimate-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e1e8ed;
  font-size: 14px;
  font-weight: 900;
  color: #17222c;
}
.estimate-total .tag { font-size: 13px; font-weight: 900; }
.estimate-total .tag.short { background: #fff1f1; border-color: #ffd0d0; color: #d33b3b; }

/* ---------- 메인 큰 배너 슬라이드 ---------- */
/* 배너 개수는 /assets/js/banner.js 의 HOME_BANNERS 가 정한다. */
.hero-slider { position: relative; }
.hero-viewport { overflow: hidden; border-radius: 16px; }
.hero-track {
  display: flex;
  width: 100%;
  transition: transform .45s cubic-bezier(.4, .0, .2, 1);
  will-change: transform;
}
.hero-track > .hero-card {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
}
/* 원형 버튼: 슬라이더 아래 가운데. 개수는 자동으로 늘고 준다. */
.hero-slider .hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(4px);
  z-index: 8;
}
.hero-slider .hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d3cbc3;
  cursor: pointer;
  transition: .18s ease;
}
.hero-slider .hero-dots button:hover { background: #b9ada2; }
.hero-slider .hero-dots button.on { width: 26px; border-radius: 999px; background: #ff6618; }
.hero-slider .hero-dots button:focus-visible { outline: 2px solid #ff6618; outline-offset: 2px; }
/* 사진을 꽉 채우고 싶은 배너는 fit:'cover' 로 지정한다. */
.hero-photo.is-cover img { object-fit: cover !important; object-position: center center !important; }
@media (prefers-reduced-motion: reduce) { .hero-track { transition: none; } }

/* ---------- 리포트 / 브랜드 항목 크기 정렬 ---------- */
/* 페이지 제목 옆 필터는 좁은 칸에 갇혀 가로 스크롤이 생기지 않게 한다. */
.page-head .filters { max-width: none; overflow: visible; flex-wrap: wrap; justify-content: flex-end; }

/* 좌우 높이를 맞춘 칸에서는 그래프가 남는 높이를 채운다. */
.panel-grid.equal .bar-chart { flex: 1 1 auto; height: auto; min-height: 190px; }
/* 목록도 위에서부터 같은 간격으로 놓이게 한다. */
.panel-grid.equal .row-list { align-content: start; }

/* 로고는 칸을 다 먹지 않도록 크기를 제한한다. */
.logo-box { width: 100%; max-width: 200px; margin: 0 auto; }

/* hidden 속성이 항상 통하도록 한다(.credit-pill 등 display 를 지정한 요소가 무시하던 문제). */
[hidden] { display: none !important; }

/* ---------- 상단 알림 / 내 계정 드롭다운 ---------- */
.top-menu { position: relative; display: flex; align-items: center; }
.top-menu > button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.top-menu > button.bell { color: #101921; }
.top-menu.open > button { opacity: .85; }
.top-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: 320px;
  padding: 10px;
  border: 1px solid #e2e8ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(28, 44, 60, .16);
}
.top-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e2e8ed;
  border-top: 1px solid #e2e8ed;
  transform: rotate(45deg);
}
.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 10px;
  border-bottom: 1px solid #eef2f5;
}
.dropdown-head b { font-size: 13.5px; font-weight: 900; color: #17222c; }
.dropdown-head a { font-size: 11.5px; font-weight: 800; color: #ff6618; }
.dropdown-list { display: grid; gap: 2px; padding: 6px 0; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #26333d;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .14s ease;
}
.dropdown-item:hover { background: #f4f8fb; }
.dropdown-item > svg { width: 19px; height: 19px; flex: 0 0 19px; color: #ff6618; }
.dropdown-item > span { display: grid; gap: 2px; min-width: 0; }
.dropdown-item b { font-size: 12.5px; font-weight: 800; }
.dropdown-item small { color: #97a2ab; font-size: 11px; font-weight: 700; }
.dropdown-item.danger { color: #d33b3b; }
.dropdown-item.danger > svg { color: #d33b3b; }
.dropdown-note {
  margin: 4px 0 2px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6f9fb;
  color: #8a959f;
  font-size: 11px;
  font-weight: 700;
}
.dropdown-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 12px;
  border-bottom: 1px solid #eef2f5;
  margin-bottom: 6px;
}
.dropdown-user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.dropdown-user span { display: grid; gap: 3px; min-width: 0; }
.dropdown-user b { font-size: 13px; font-weight: 900; color: #17222c; }
.dropdown-user small { color: #97a2ab; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
/* 로그인 전 상단 버튼 */
.top-auth { display: flex; align-items: center; gap: 8px; }
.top-auth[hidden] { display: none; }

/* 통계 리포트 등 제목 옆 필터: 줄바꿈해서 전부 보이게 하고 가로 스크롤을 만들지 않는다. */
.page-head { flex-wrap: wrap; }
.page-head .page-head-actions { flex: 0 1 auto; min-width: 0; }
.page-head .filters {
  max-width: none;
  overflow: visible;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- 펼침 목록(select) 공통 디자인 ---------- */
/* JS 가 동작하면 실제 select 는 숨기고 같은 모양의 버튼 + 목록을 보여준다.
   JS 가 없으면 기존 select 가 그대로 보이므로 기능은 항상 유지된다. */
.select-box { position: relative; }
.select-box.ready > select { display: none; }
.select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid #dbe3e9;
  border-radius: 10px;
  background: #fbfdfe;
  color: #212c36;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: .16s ease;
}
.select-btn:hover { border-color: #ffc39a; }
.select-btn .select-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-btn > svg { width: 17px; height: 17px; flex: 0 0 17px; color: #7e8a95; transition: transform .16s ease; }
.select-box.open .select-btn {
  border-color: #ff8a3d;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 120, 30, .12);
}
.select-box.open .select-btn > svg { color: #ff6618; transform: rotate(180deg); }
.select-btn:focus-visible { outline: 2px solid #ff6618; outline-offset: 2px; }

.select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28, 44, 60, .14);
}
.select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: #35424d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: .14s ease;
}
.select-option > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-option > svg { width: 15px; height: 15px; flex: 0 0 15px; color: #ff6618; opacity: 0; }
.select-option:hover { background: #f6f9fb; }
/* 선택된 항목은 다른 선택 요소(.choice.selected)와 같은 표시 방식 */
.select-option.selected {
  border-color: #ff6618;
  background: #fff7f2;
  color: #d9530f;
  font-weight: 850;
}
.select-option.selected > svg { opacity: 1; }

/* 펼침 목록 스크롤바: 얇은 막대(ㅣ) 하나만 보이게 단순화한다. */
.select-list {
  scrollbar-width: thin;                     /* Firefox */
  scrollbar-color: #cfd8e0 transparent;
}
.select-list::-webkit-scrollbar { width: 10px; }
.select-list::-webkit-scrollbar-track { background: transparent; }
.select-list::-webkit-scrollbar-thumb {
  border: 3px solid transparent;             /* 실제 막대를 4px 로 얇게 보이게 하는 여백 */
  border-radius: 999px;
  background-clip: padding-box;
  background-color: #cfd8e0;
}
.select-list::-webkit-scrollbar-thumb:hover { background-color: #aab7c2; }
.select-list::-webkit-scrollbar-button { display: none; height: 0; }  /* 위아래 화살표 제거 */
.select-list::-webkit-scrollbar-corner { background: transparent; }

/* ---------- 상단 보유 크레딧 버튼 축소 ---------- */
/* 기존(52px 높이)보다 22% 줄인 크기로, 안의 동전 아이콘·숫자·버튼도 같은 비율로 줄인다. */
.credit-pill {
  height: 40px;
  min-width: 192px;
  padding: 0 6px 0 11px;
  gap: 6px;
}
.credit-pill .coin {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  font-size: 12px;
}
.credit-pill .credit-label {
  font-size: 10.5px;
}
.credit-pill > strong {
  font-size: 17px;
}
.credit-pill .charge {
  height: 26px;
  padding: 0 10px;
  font-size: 9.5px;
}
@media (max-width: 1420px) {
  .credit-pill { min-width: 176px; }
  .credit-pill .credit-label { font-size: 10px; }
  .credit-pill > strong { font-size: 16px; }
  .credit-pill .charge { padding: 0 8px; }
}
@media (max-width: 1180px) {
  .credit-pill { min-width: 150px; height: 38px; }
}

/* 구독 취소 등 위험 동작 버튼 */
.pill-btn.danger {
  border-color: #f4c9c9;
  background: #fff5f5;
  color: #d33b3b;
}
.pill-btn.danger:hover {
  border-color: #e69b9b;
  background: #ffecec;
  box-shadow: 0 4px 12px rgba(211, 59, 59, .12);
}
.pill-btn.danger svg { color: #d33b3b; }

/* 대시보드 상단의 "가게 정보"/"콘텐츠 만들기" 버튼: 너비를 맞추고, 텍스트가 버튼 정중앙에 오게 한다.
   (아이콘까지 함께 가운데 정렬하면 아이콘 때문에 글자가 중앙보다 오른쪽으로 밀려 보인다.
   아이콘을 흐름에서 빼서 왼쪽 여백에 고정하고, 글자만 남겨서 중앙에 놓는다.) */
body[data-page="dashboard"] .page-head-actions .pill-btn {
  position: relative;
  min-width: 160px;
  justify-content: center;
  /* 왼쪽 패딩은 아이콘(18px)이 들어갈 자리를 포함한 몫이다.
     오른쪽도 같은 값으로 맞춰야 그 안쪽 글자 영역이 버튼 정중앙에 놓인다. */
  padding: 0 43px;
}
body[data-page="dashboard"] .page-head-actions .pill-btn svg {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
}

/* ── 디자인 미리보기 편집기 (학습3차 명령서 50~54항) ─────────────────── */
.design-stage{
  background:#eef1f4;
  border:1px solid #e0e5ea;
  border-radius:16px;
  padding:12px;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:180px;
  overflow:hidden;
}
.design-stage svg{
  max-width:100%;
  max-height:52vh;
  height:auto;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(20,30,40,.14);
}
/* 미리보기 안의 글자를 누르면 그 항목으로 이동한다 */
.design-stage svg [data-zone]{cursor:pointer}
.design-stage .empty-note{margin:0;text-align:center}

.design-tabs{display:flex;gap:6px;margin-top:12px}
.design-tab{
  flex:1;
  padding:9px 6px;
  border:1px solid #dfe4e9;
  border-radius:11px;
  background:#fff;
  color:#616b75;
  font-size:12.5px;
  font-weight:850;
}
.design-tab.is-active{
  border-color:transparent;
  background:linear-gradient(135deg,#ff921f,#ff6b20);
  color:#fff;
}

.design-qa{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:12px}
.design-score{font-weight:900;padding:3px 9px;border-radius:999px}
.design-score.is-ok{background:rgba(26,127,69,.10);color:#1a7f45}
.design-score.is-bad{background:rgba(199,58,34,.10);color:#c73a22}
.design-issue{color:#c73a22}
.design-warn{color:#a3560f}

.design-fields{display:grid;gap:8px;margin-top:14px}
.design-fields .field{margin:0}
.design-tools{margin-top:14px;display:grid;gap:9px}
.design-tool-row{display:flex;gap:8px}
.design-tool-row .pill-btn{flex:1;justify-content:center}
.design-tools .message{margin:0}

/* ── 관리자 · 디자인 템플릿 (학습3차 명령서 56~60항) ─────────────────── */
.design-admin-filters{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}
.design-admin-filters .field{margin:0;min-width:200px}
/* legal-table 은 어두운 약관 페이지용이라 흰 관리자 화면에서는 글씨가 안 보인다.
   이 표만 밝은 화면에 맞는 색으로 다시 잡는다. */
.design-admin-table{font-size:12.5px;background:#fff}
.design-admin-table th{background:#f2f5f8;color:#1f262d;border-color:#dfe4e9;white-space:nowrap}
.design-admin-table td{color:#2a323a;border-color:#e6eaee;white-space:nowrap;vertical-align:middle}
.design-admin-table code{font-size:11.5px;background:#f2f5f8;border:1px solid #e0e5ea;color:#1f262d;border-radius:6px;padding:1px 6px}
.design-admin-table tr:hover td{background:#fafbfc}
.design-admin-actions{display:flex;gap:6px}
.design-admin-actions .pill-btn{padding:6px 11px;font-size:12px}
.design-admin-preview .design-stage{min-height:220px}
.design-admin-preview .design-qa{margin-top:10px}

/* 390px 모바일 — 콘텐츠 만들기 페이지 (디자인또수정 명령서 PART F).
   앱 전체는 데스크톱 최소폭(1100px) 기준이지만, 디자인 생성 버튼·로딩 문구·A/B/C·오류 문구는
   좁은 화면에서도 잘리지 않아야 하므로 이 페이지에서만 최소폭을 풀고 한 열로 쌓는다. */
@media (max-width: 760px) {
  body[data-page="create"].vector-home-body { min-width: 0; }
  body[data-page="create"] .home-shell { grid-template-columns: 64px minmax(0, 1fr); }
  body[data-page="create"] .home-sidebar { padding: 14px 8px; }
  body[data-page="create"] .home-topbar { height: auto; min-height: 60px; padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  body[data-page="create"] .home-topbar .search { flex: 1 1 100%; min-width: 0; max-width: none; }
  body[data-page="create"] .home-content { padding-left: 12px; padding-right: 12px; }
  body[data-page="create"] .page-head h1 { font-size: 24px; }
  body[data-page="create"] .panel-grid.side, body[data-page="create"] .panel-grid.cols-4, body[data-page="create"] .panel-grid.cols-3 { grid-template-columns: 1fr; }
  body[data-page="create"] .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="create"] .panel { padding: 16px 14px; }
  body[data-page="create"] .panel-foot, body[data-page="create"] .btn-pair, body[data-page="create"] .design-tool-row { flex-wrap: wrap; gap: 8px; }
  body[data-page="create"] .pill-btn { white-space: normal; height: auto; min-height: 42px; line-height: 1.25; padding: 8px 14px; max-width: 100%; text-align: center; }
  body[data-page="create"] #design-button, body[data-page="create"] #generate-button { width: 100%; justify-content: center; }
  body[data-page="create"] .design-tabs { flex-wrap: wrap; }
  body[data-page="create"] .design-tab { flex: 1 1 auto; text-align: center; }
  body[data-page="create"] #preview-text, body[data-page="create"] .design-qa, body[data-page="create"] .design-issue, body[data-page="create"] .design-warn { word-break: keep-all; overflow-wrap: anywhere; white-space: normal; }
  body[data-page="create"] .design-stage { max-width: 100%; }

  /* AI design-learning admin: retain the desktop shell but remove its
     1100px floor so the existing modal can be used at a 390px viewport. */
  body[data-page="admin-design-learning"].vector-home-body { min-width: 0; }
  body[data-page="admin-design-learning"] .home-shell { grid-template-columns: 64px minmax(0, 1fr); }
  body[data-page="admin-design-learning"] .home-sidebar { padding: 12px 7px; }
  body[data-page="admin-design-learning"] .brand { padding-bottom: 12px; }
  body[data-page="admin-design-learning"] .brand-mark { width: 48px; height: 48px; }
  body[data-page="admin-design-learning"] .brand-word,
  body[data-page="admin-design-learning"] .side-link b,
  body[data-page="admin-design-learning"] .plan-box,
  body[data-page="admin-design-learning"] .side-footer { display: none; }
  body[data-page="admin-design-learning"] .side-link { justify-content: center; padding: 0; }
  body[data-page="admin-design-learning"] .home-topbar { height: auto; min-height: 58px; padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  body[data-page="admin-design-learning"] .search-box { order: 2; width: 100%; }
  body[data-page="admin-design-learning"] .top-actions { margin-left: auto; gap: 8px; }
  body[data-page="admin-design-learning"] .credit-pill { display: none; }
  body[data-page="admin-design-learning"] .home-content { padding-left: 12px; padding-right: 12px; }
  body[data-page="admin-design-learning"] .page-head { align-items: flex-start; }
  body[data-page="admin-design-learning"] .page-head .page-head-actions { width: 100%; flex-wrap: wrap; }
  body[data-page="admin-design-learning"] .dl-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body[data-page="admin-design-learning"] #drop code { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  body[data-page="admin-design-learning"] .canva-import-panel { grid-template-columns: minmax(0, 1fr); max-width: calc(100vw - 24px); }
}
.vector-home-body .login-modal-card .business-number-row + .form-row-2 .form-row { margin-top: 10px; }
@media (max-height: 840px) {
  .vector-home-body .login-modal-card .business-number-row + .form-row-2 .form-row { margin-top: 8px; }
}
@media (max-height: 760px) {
  .vector-home-body .login-modal-card .business-number-row + .form-row-2 .form-row { margin-top: 6px; }
}
@media (max-height: 660px) {
  .vector-home-body .login-modal-card .business-number-row + .form-row-2 .form-row { margin-top: 3px; }
}
@media (max-width: 520px) {
  .vector-home-body .login-modal-card .business-number-row + .form-row-2 .form-row { margin-top: 6px; }
}
.vector-home-body .login-modal-card #biz-address-detail { margin-top: 8px; }

/* Create: use the same panel, field and choice language as the rest of the app. */
body[data-page="create"] .create-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr);
  gap: 18px;
  align-items: start;
}
body[data-page="create"] .type-grid { gap: 12px; }
body[data-page="create"] .type-card {
  position: relative;
  min-height: 124px;
  padding: 17px;
  border: 1px solid #dfe6eb;
  border-radius: 12px;
  background: #fff;
  color: #26333d;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
body[data-page="create"] .type-card:hover {
  border-color: #ffb287;
  background: #fffaf7;
  transform: translateY(-1px);
}
body[data-page="create"] .type-card.active {
  border: 2px solid #ff6b20;
  background: #fff7f2;
  box-shadow: 0 8px 18px rgba(255, 107, 32, .11);
}
body[data-page="create"] .type-card b {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}
body[data-page="create"] .type-card small {
  margin-top: 7px;
  color: #74818b;
  font-size: 12px;
  line-height: 1.4;
}
body[data-page="create"] .field { gap: 7px; margin: 15px 0; }
body[data-page="create"] .field label {
  color: #34424d;
  font-size: 13px;
  font-weight: 750;
}
body[data-page="create"] .field input,
body[data-page="create"] .field textarea,
body[data-page="create"] .field select {
  width: 100%;
  border: 1px solid #dfe6eb;
  border-radius: 10px;
  background: #fff;
  color: #26333d;
  box-shadow: 0 1px 2px rgba(24, 39, 52, .02);
  transition: border-color .15s ease, box-shadow .15s ease;
}
body[data-page="create"] .field input:focus,
body[data-page="create"] .field textarea:focus,
body[data-page="create"] .field select:focus {
  outline: 0;
  border-color: #ff8748;
  box-shadow: 0 0 0 3px rgba(255, 107, 32, .12);
}
body[data-page="create"] .preview-box {
  min-height: 312px;
  border: 1px dashed #d5e0e7;
  border-radius: 12px;
  background: #f3f6f8;
  color: #788792;
}
body[data-page="create"] .preview-box img { border-radius: 10px; }
body[data-page="create"] .sticky { top: 88px; }

/* Reference image: prevent the shared hint's negative top margin from colliding
   with the native file selector, while keeping the controls visually aligned. */
body[data-page="create"] #photo {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #dfe6eb;
  border-radius: 10px;
  background: #fff;
  color: #4a5863;
  font: inherit;
}
body[data-page="create"] #photo::file-selector-button {
  margin-right: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: #fff1e9;
  color: #db571c;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
body[data-page="create"] #photo-name.field-hint {
  margin: 8px 0 0;
  color: #74818b;
  line-height: 1.45;
}
body[data-page="create"] .create-copy-result {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #f3d7c7;
  border-radius: 12px;
  background: #fffaf7;
  color: #3b4750;
  text-align: left;
}
body[data-page="create"] .create-copy-result h3 { margin: 0 0 8px; color: #d9571d; font-size: 13px; }
body[data-page="create"] .create-copy-result strong { display: block; font-size: 16px; line-height: 1.45; }
body[data-page="create"] .create-copy-result p { margin: 7px 0 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
body[data-page="create"] .create-copy-result .create-copy-cta { color: #d9571d; font-weight: 750; }
body[data-page="create"] .create-copy-result small { display: block; margin-top: 8px; color: #74818b; line-height: 1.5; }
body[data-page="create"] .create-reference-note { display: block; margin-top: 9px; color: #74818b; font-size: 11px; line-height: 1.45; }

@media (max-width: 900px) {
  body[data-page="create"] .create-grid { grid-template-columns: 1fr; }
  body[data-page="create"] .sticky { position: static; }
}

@media (max-width: 560px) {
  body[data-page="create"] .type-grid { grid-template-columns: 1fr 1fr; }
  body[data-page="create"] .type-card { min-height: 108px; padding: 14px; }
}

/* Create page: align its density and visual hierarchy with the store-info page. */
body[data-page="create"] .home-content { max-width: 1540px; }
body[data-page="create"] .create-grid {
  grid-template-columns: minmax(0, 1.72fr) minmax(330px, .95fr);
  gap: 16px;
}
body[data-page="create"] .create-grid > section { display: grid; gap: 16px; }
body[data-page="create"] .create-grid > aside { display: grid; align-content: start; gap: 16px; }
body[data-page="create"] .create-grid .panel {
  padding: 22px 24px;
  border: 1px solid #e4ebf0;
  border-radius: 16px;
  box-shadow: 0 7px 20px rgba(25, 45, 62, .035);
}
body[data-page="create"] .create-grid .panel h2 {
  margin: 0 0 5px;
  color: #1d2a35;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.45px;
}
body[data-page="create"] .create-grid .field-hint {
  margin: 0 0 16px;
  color: #84929d;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}
body[data-page="create"] .type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body[data-page="create"] .type-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 116px;
  padding: 16px;
  border-radius: 12px;
}
body[data-page="create"] .type-card b { color: #26333d; }
body[data-page="create"] .type-card.active b { color: #d9571d; }
body[data-page="create"] .field { margin: 15px 0 0; }
body[data-page="create"] .field input,
body[data-page="create"] .field textarea,
body[data-page="create"] .field select {
  min-height: 52px;
  padding: 13px 15px;
  border-color: #e0e8ed;
  background: #fbfcfd;
}
body[data-page="create"] .field textarea { min-height: 134px; resize: vertical; }
body[data-page="create"] .field input::placeholder,
body[data-page="create"] .field textarea::placeholder { color: #a2aeb7; }
body[data-page="create"] #photo { min-height: 54px; background: #fbfcfd; }
body[data-page="create"] .sticky { top: 84px; }
body[data-page="create"] #make { min-height: 46px; padding: 0 18px; border-radius: 24px; }
body[data-page="create"] .preview-box {
  min-height: 390px;
  border-radius: 14px;
  background: #f5f8fa;
  font-weight: 650;
  line-height: 1.7;
}
body[data-page="create"] .preview-box img { max-height: 500px; }
body[data-page="create"] .create-copy-result { border-radius: 12px; }

@media (max-width: 1120px) {
  body[data-page="create"] .create-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .9fr); }
  body[data-page="create"] .type-card { min-height: 108px; padding: 14px; }
}

@media (max-width: 900px) {
  body[data-page="create"] .create-grid { grid-template-columns: 1fr; }
  body[data-page="create"] .sticky { position: static; }
}

@media (max-width: 620px) {
  body[data-page="create"] .create-grid .panel { padding: 18px 16px; }
  body[data-page="create"] .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="create"] .preview-box { min-height: 300px; }
}

/* Home hero: keep every CTA inside the card and show the complete source image. */
body[data-page="home"] .hero-slider { padding-bottom: 36px; }
body[data-page="home"] .hero-card {
  height: auto;
  min-height: 326px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .7fr) minmax(0, .95fr);
  align-items: stretch;
}
body[data-page="home"] .hero-copy { min-width: 0; padding-right: 18px; }
body[data-page="home"] .hero-copy h1,
body[data-page="home"] .hero-copy p { overflow-wrap: anywhere; word-break: keep-all; }
body[data-page="home"] .hero-cta {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  min-height: 52px;
  height: auto;
  padding: 10px clamp(12px, 2vw, 24px);
  gap: 8px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-page="home"] .hero-cta svg { flex: 0 0 22px; }
body[data-page="home"] .hero-photo { min-width: 0; min-height: 326px; }
body[data-page="home"] .hero-photo img,
body[data-page="home"] .hero-photo.is-cover img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
body[data-page="home"] .hero-cheer {
  right: clamp(12px, 3vw, 28px);
  top: clamp(18px, 4vw, 44px);
  font-size: clamp(14px, 1.5vw, 20px);
}
body[data-page="home"] .hero-slider .hero-dots { bottom: 0; }

@media (max-width: 980px) and (min-width: 761px) {
  body[data-page="home"].vector-home-body { min-width: 0; }
  body[data-page="home"] .home-shell { grid-template-columns: 78px minmax(0, 1fr); }
  body[data-page="home"] .home-sidebar { padding-right: 8px; padding-left: 8px; }
  body[data-page="home"] .home-topbar { gap: 10px; padding-right: 14px; padding-left: 14px; }
  body[data-page="home"] .home-topbar .search-box { width: min(330px, 34vw); }
  body[data-page="home"] .home-topbar .top-actions { gap: 8px; }
  body[data-page="home"] .home-topbar .credit-pill { min-width: 168px; height: 40px; padding-right: 6px; }
  body[data-page="home"] .home-topbar .credit-pill .credit-label { display: none; }
  body[data-page="home"] .home-topbar .profile { min-width: 42px; }
  body[data-page="home"] .home-topbar .profile span,
  body[data-page="home"] .home-topbar .profile > svg { display: none; }
  body[data-page="home"] .home-content { padding-right: 16px; padding-left: 16px; }
  body[data-page="home"] .hero-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  body[data-page="home"] .hero-copy { padding: 22px 10px 22px 18px; }
  body[data-page="home"] .hero-copy h1 { font-size: clamp(30px, 4vw, 38px); }
  body[data-page="home"] .hero-photo { min-height: 300px; }
}

@media (max-width: 1180px) and (min-width: 981px) {
  body[data-page="home"].vector-home-body { min-width: 0; }
}

@media (max-width: 1180px) {
  body[data-page="home"] .hero-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  body[data-page="home"] .hero-copy { padding: 26px 20px 24px 28px; }
  body[data-page="home"] .hero-photo { min-height: 300px; }
}

@media (max-width: 760px) {
  body[data-page="home"].vector-home-body { min-width: 0; }
  body[data-page="home"] .home-shell { display: block; min-width: 0; }
  body[data-page="home"] .home-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  body[data-page="home"] .home-sidebar .brand { padding: 0 3px; gap: 5px; }
  body[data-page="home"] .home-sidebar .brand-mark { width: 36px; height: 36px; }
  body[data-page="home"] .home-sidebar .brand-word strong { font-size: 19px; }
  body[data-page="home"] .home-sidebar .brand-word small,
  body[data-page="home"] .home-sidebar .plan-box,
  body[data-page="home"] .home-sidebar .side-footer { display: none; }
  body[data-page="home"] .home-sidebar .side-nav {
    display: flex;
    min-width: 0;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body[data-page="home"] .home-sidebar .side-nav::-webkit-scrollbar { display: none; }
  body[data-page="home"] .home-sidebar .side-link {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 8px;
    gap: 5px;
    font-size: 10px;
    white-space: nowrap;
  }
  body[data-page="home"] .home-sidebar .side-link svg { width: 16px; height: 16px; }
  body[data-page="home"] .home-topbar {
    position: relative;
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  body[data-page="home"] .home-topbar .search-box { order: 2; width: 100%; max-width: none; height: 36px; }
  body[data-page="home"] .home-topbar .top-actions { gap: 8px; }
  body[data-page="home"] .home-topbar .credit-pill { display: none; }
  body[data-page="home"] .home-topbar .profile { min-width: 0; }
  body[data-page="home"] .home-topbar .profile span,
  body[data-page="home"] .home-topbar .profile > svg { display: none; }
  body[data-page="home"] .home-content { min-width: 0; padding: 0 12px 18px; }
  body[data-page="home"] .hero-card {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  body[data-page="home"] .hero-copy { padding: 20px 18px 18px; }
  body[data-page="home"] .hero-copy > small { font-size: 11px; }
  body[data-page="home"] .hero-copy h1 { margin: 8px 0 9px; font-size: clamp(25px, 7vw, 34px); }
  body[data-page="home"] .hero-copy p { font-size: 13px; }
  body[data-page="home"] .hero-cta { min-height: 46px; margin-top: 12px; font-size: 12px; }
  body[data-page="home"] .hero-cta svg { flex-basis: 18px; width: 18px; height: 18px; }
  body[data-page="home"] .hero-note { display: none; }
  body[data-page="home"] .hero-photo { width: 100%; min-height: 0; aspect-ratio: 6 / 5; }
  body[data-page="home"] .hero-photo::before { width: 100%; background: linear-gradient(180deg, rgba(255,244,231,.28), transparent 30%); }
  body[data-page="home"] .hero-cheer { right: 16px; top: 18px; }
}
