/* 로그인/가입/프로젝트 목록 등 SaaS 페이지 공용 스타일. style.css의 색상 변수를 그대로 쓴다. */

.saas-body {
  min-height: 100vh;
  /* 메인(스토어)·작업창(에디터)을 뺀 나머지 페이지는 연한 회색 배경 + 카드 스타일.
     메인은 .store-body에서 흰색으로 따로 지정한다. */
  background: var(--cream);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  display: flex;
  flex-direction: column;
}

/* 모글디 메인(스토어)과 통일: 상단 네비바는 흰 배경 + 검정 로고/브랜드 + 회색 메뉴.
   (에디터는 #topNavbar, 관리자는 admin-shell 사이드바라 이 규칙에 영향받지 않는다.) */
.saas-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}

.saas-navbar a.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

/* 흰 네비바: 로고 아이콘은 원본 빨강(logo-icon.png) 그대로, 브랜드 글씨는 검정(a.brand)으로 통일. */
.saas-navbar .mascot-icon { width: 40px; height: 40px; border-radius: 6px; filter: none; }

/* 브랜드 로고 텍스트 - '모글디'를 제작자 폰트(오케이고딕)로 렌더해 아이콘 옆에 표시.
   3글자만 서브셋한 초경량 웹폰트(okgothic-logo.woff2). 색은 헤더 컨텍스트(밝음=검정,
   어두움=흰색)에서 상속. */
@font-face {
  font-family: "OkGothicLogo";
  src: url("/okgothic-logo.woff2") format("woff2");
  font-display: swap;
  font-weight: normal;
}
.brand-logo-text {
  font-family: "OkGothicLogo", sans-serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.5px;
}
.store-navbar a.brand .brand-logo-text { font-size: 28px; }

.saas-navbar-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.saas-navbar-right a, .saas-navbar-right button {
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
}

.saas-navbar-right a:hover, .saas-navbar-right button:hover {
  background: var(--cream);
  color: var(--ink);
}
/* 아이콘 전용 원형 nav 버튼(홈/폰트마켓) - 텍스트 없이 아이콘만, hover 시 툴팁(title). */
.saas-navbar-right a.saas-nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-soft);
}
.saas-navbar-right a.saas-nav-icon:hover { border-color: var(--ink); color: var(--ink); background: none; }
.saas-navbar-right a.saas-nav-icon svg { width: 18px; height: 18px; }

/* 마이페이지: 화면 왼쪽 끝 세로 메뉴 + 세로 구분선으로 나뉜 2단(왼쪽 메뉴 / 오른쪽 본문) */
.mypage-main { display: flex; align-items: flex-start; flex: 1; width: 100%; min-height: calc(100vh - 60px); }
.mypage-side {
  flex: 0 0 216px; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--rule);  /* 세로 구분선 */
  /* 스크롤해도 메뉴가 그 자리에 고정되도록 sticky. 상단 고정 네비바(60px) 아래에서 화면 높이만큼. */
  position: sticky; top: 60px; align-self: flex-start; height: calc(100vh - 60px); overflow-y: auto;
}
/* 마이페이지 상단 네비바도 스크롤 시 고정 */
.mypage-body .saas-navbar { position: sticky; top: 0; z-index: 50; }
.mypage-content { flex: 1; min-width: 0; padding: 28px 34px 60px; }
.mypage-content-inner { max-width: 1180px; margin: 0 auto; }
.mypage-title { margin: 0 0 18px; }
/* 메뉴 항목(링크 + 하위메뉴) 사이 가로 구분선 */
.mypage-nav-item + .mypage-nav-item { border-top: 1px solid var(--rule); }
.mypage-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; font-size: 14px; text-decoration: none; color: var(--ink);
}
.mypage-side-link .mps-ic { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.mypage-side-link.active .mps-ic { opacity: 1; }
.mypage-side-link:hover { background: var(--cream); color: var(--ink); }
.mypage-side-link.active { color: var(--accent); font-weight: 700; }
/* 하위메뉴 */
.mypage-submenu { display: flex; flex-direction: column; padding: 0 0 8px; }
.mypage-sublink { padding: 8px 20px 8px 48px; font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.mypage-sublink:hover { background: var(--cream); color: var(--ink); }
.mypage-sublink.active { color: var(--accent); font-weight: 700; }
.mypage-mobilebar { display: none; }
/* 드로어 헤더/프로필/구분선/로그아웃은 모바일 전용(데스크톱 사이드바에선 숨김) */
.mypage-side-brand, .mypage-side-profile, .mypage-side-divider, .mypage-side-logout { display: none; }
@media (max-width: 760px) {
  .mypage-mobilebar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 40;
    background: #fff; border-bottom: 1px solid var(--rule); padding: 8px 14px;
  }
  .mypage-menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 38px; padding: 0 9px; border: none; background: none; cursor: pointer;
  }
  .mypage-menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .mypage-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mypage-menu-toggle.open span:nth-child(2) { opacity: 0; }
  .mypage-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mypage-mobilebar-title { font-weight: 700; font-size: 15px; color: var(--ink); }
  /* 왼쪽에서 슬라이드로 나오는 오프캔버스 메뉴 */
  .mypage-side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    width: 244px; max-width: 82vw; flex: none; margin: 0; height: auto;
    background: #fff; border: none; border-right: 1px solid var(--rule); border-radius: 0;
    padding: 14px 12px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.12);
  }
  .mypage-side.open { transform: translateX(0); }
  .mypage-menu-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 99; }
  .mypage-menu-backdrop[hidden] { display: none; }
  /* 드로어 헤더: 로고 + 브랜드 */
  .mypage-side-brand {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    font-weight: 900; font-size: 18px; color: var(--ink); padding: 2px 6px 10px;
  }
  .mypage-side-brand .mascot-icon { width: 32px; height: 32px; filter: none; }
  /* 프로필 */
  .mypage-side-profile { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
  .mypage-side-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 17px;
  }
  .mypage-side-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mypage-side-name { font-weight: 700; font-size: 14px; color: var(--ink); word-break: break-all; }
  .mypage-side-email { font-size: 12px; color: var(--ink-soft); word-break: break-all; }
  /* 구분선 */
  .mypage-side-divider { display: block; height: 1px; background: var(--rule); margin: 10px 4px; }
  /* 로그아웃 */
  .mypage-side-logout { display: block; padding: 11px 14px; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
  .mypage-side-logout:hover { color: var(--badge-red); }
  /* 모바일: 본문 여백 축소(사이드바는 오프캔버스 고정이라 본문이 전체 폭) */
  .mypage-content { padding: 16px 14px 40px; }
}
/* 데스크톱에선 백드롭이 절대 보이지 않게(모바일 전용) */
.mypage-menu-backdrop { display: none; }
@media (max-width: 760px) { .mypage-menu-backdrop:not([hidden]) { display: block; } }

.saas-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 20px; }

.saas-flash { width: 100%; max-width: 380px; margin-bottom: 16px; }
.saas-flash .flash-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.saas-flash .flash-error { background: var(--accent-tint); color: var(--badge-red); }
.saas-flash .flash-info { background: var(--accent-tint); color: var(--ink); }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 6px 24px var(--shadow-color);
}

.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p.sub { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 22px; }

.auth-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; color: var(--ink-soft); }
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  background: var(--cream);
  color: var(--ink);
  box-sizing: border-box;
}
/* 드롭다운도 입력창과 동일한 높이·여백으로 보이게 하고, 오른쪽에 커스텀 화살표를 그린다. */
.auth-field select {
  height: 44px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23888' stroke-width='1.6' d='M2 4.5L6 8.5L10 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus { outline: 2px solid var(--accent-light); outline-offset: 1px; }
/* 체크박스·라디오는 위의 width:100%에서 제외 - 안 그러면 동의 체크박스가 줄 전체를 차지해
   옆 문구가 한 글자 폭으로 눌려 세로로 쌓인다. */
.auth-field input[type="checkbox"],
.auth-field input[type="radio"] { width: auto; }

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.05); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 8px;
}
.oauth-btn:hover { background: var(--cream); }
.oauth-btn.kakao { background: #fee500; border-color: #fee500; color: #191600; }
.oauth-btn.google { background: #fff; }

.auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.auth-foot a { color: var(--accent); text-decoration: none; }

/* ---------- 프로젝트 목록 ---------- */

.projects-header {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.projects-header h1 { font-size: 22px; margin: 0; }
.new-project-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.new-project-btn:visited, .new-project-btn:hover, .new-project-btn:focus { text-decoration: none; }
.new-project-btn:hover { filter: brightness(1.05); }

.project-grid {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.project-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}
.project-card:hover { transform: translateY(-2px); }

.project-card .name { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.project-card .meta-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-charset { background: var(--accent-tint); color: var(--accent); }
.badge-trial { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }
.badge-paid { background: rgba(34, 181, 115, 0.14); color: var(--badge-green); }

.project-card .progress-track {
  height: 6px;
  border-radius: 4px;
  background: var(--rule);
  overflow: hidden;
  margin-bottom: 8px;
}
.project-card .progress-fill { height: 100%; background: var(--accent); }
.project-card .progress-label { font-size: 12px; color: var(--ink-soft); }

.empty-state {
  width: 100%;
  max-width: 960px;
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* ---------- 새 프로젝트 위저드 모달 (기존 #projectGate 재사용) ---------- */

/* style.css의 #projectGate { display:flex } 는 항상 보이는 걸 전제로 한 규칙이라
   (원래 index.html 전체 페이지용), id+class 조합으로 우선순위를 높여 기본값을 덮어쓴다 -
   /projects 목록 페이지에서는 "새 프로젝트" 버튼을 눌렀을 때만 모달로 열려야 한다. */
#projectGate.wizard-overlay { display: none; background: rgba(20, 20, 24, 0.45); }
#projectGate.wizard-overlay.open { display: flex; }

/* ---------- 관리자 페이지 (왼쪽 사이드바 레이아웃) ---------- */

.saas-navbar-right a.active { color: var(--ink); background: var(--cream); }

.admin-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--navbar-bg);
  color: var(--navbar-ink);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar-top { display: flex; align-items: center; justify-content: space-between; }

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--navbar-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 20px 18px;
  flex-shrink: 0;
}

/* 모바일에서만 보이는 사이드바 메뉴 토글(햄버거) */
.admin-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--navbar-ink);
  cursor: pointer;
  padding: 16px 18px;
}

.admin-sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; flex: 1; }

.admin-sidebar-nav a {
  color: var(--navbar-ink-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-sidebar-nav a:hover { background: rgba(255, 255, 255, 0.12); color: var(--navbar-ink); }

.admin-sidebar-nav a.active { background: rgba(255, 255, 255, 0.12); color: var(--navbar-ink); font-weight: 600; }

/* 사이드바 카테고리 그룹(폰트제작/스토어/프로모션/관리) - 라벨은 접기/펼치기
   버튼(펼침 화살표 포함), 하위 링크는 살짝 들여쓰기. */
.admin-nav-group { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.admin-nav-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--navbar-ink-soft);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
}
.admin-nav-group-label:hover { background: rgba(255, 255, 255, 0.12); color: var(--navbar-ink); }
.admin-nav-group .nav-chevron { width: 12px; height: 12px; transition: transform 0.15s ease; }
.admin-nav-group.collapsed .nav-chevron { transform: rotate(-90deg); }
.admin-nav-group-items { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-group.collapsed .admin-nav-group-items { display: none; }
.admin-nav-group a { padding-left: 22px; }

.admin-sidebar-footer { padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); flex-shrink: 0; }

.admin-sidebar-footer a {
  display: block;
  color: var(--navbar-ink-soft);
  text-decoration: none;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-sidebar-footer a:hover { background: rgba(255, 255, 255, 0.12); color: var(--navbar-ink); }

.admin-content { flex: 1; min-width: 0; padding: 40px 32px; }

.admin-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

/* 마이페이지는 좌측 세로 메뉴 + 본문이라 가로를 더 넓게 쓴다. */
.mypage-wrap { max-width: 1400px; }

/* 프로젝트 카드 오른쪽 위 ⋮ 메뉴(이름변경/복제/삭제/플랜 업그레이드) - 여러 페이지 공유. */
.card-menu-btn {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-soft);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.card-menu-btn:hover { background: var(--cream); color: var(--ink); }
.card-menu {
  display: none; position: absolute; top: 40px; right: 8px; z-index: 30;
  min-width: 150px; padding: 6px; background: var(--card);
  border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.card-menu button, .card-menu a {
  display: block; width: 100%; box-sizing: border-box; text-align: left;
  padding: 9px 12px; border: none; border-radius: 6px; background: transparent;
  color: var(--ink); font-size: 13.5px; cursor: pointer; text-decoration: none;
}
.card-menu button:hover, .card-menu a:hover { background: var(--cream); }
.card-menu button.danger { color: var(--badge-red); }

.admin-wrap h1 { font-size: 21px; margin: 0 0 18px; }
.admin-wrap h2 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
/* 섹션(카드) 제목은 검정 */
.admin-section h2, .admin-section h3 { color: var(--ink); }

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px 18px;
}
/* 마이페이지 대시보드 - 각 목록 요약 카드(누르면 목록으로 이동). */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.dash-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px;
  transition: border-color .12s, transform .12s;
}
.dash-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.dash-label { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.dash-value { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; }
.dash-value span { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-left: 3px; }
/* 대시보드 요약 패널(각 목록을 몇 개씩 미리보기). */
.dash-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dash-sec-head h2 { margin: 0; font-size: 17px; color: var(--ink); }
.dash-sec-head h2 .dash-count { font-size: 13px; color: var(--accent); font-weight: 700; margin-left: 4px; }
/* 섹션 헤더의 바로가기 링크 - 둥근 버튼(pill) 모양 */
.dash-sec-head a { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px;
  border: 1.4px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent);
  font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background .12s, color .12s; }
.dash-sec-head a:hover { background: var(--accent); color: #fff; }
.dash-head-actions { display: flex; align-items: center; gap: 8px; }
.dash-head-actions a.dash-pill-solid { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 대시보드 섹션을 하나의 흰색 카드로 묶기 */
.mp-section-card { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 20px 22px; }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.dash-list li:last-child { border-bottom: none; }
.dash-list .dl-main { font-weight: 600; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.dash-list, .dash-list a.dl-main:hover { color: var(--accent); }
.dash-list .dl-sub { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.dash-list .dl-right { margin-left: auto; color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.dash-list a.dl-right { color: var(--accent); font-weight: 700; }
.dash-list .dl-right.badge { background: var(--cream); padding: 3px 9px; border-radius: 999px; }
.dash-empty { color: var(--ink-soft); font-size: 13.5px; margin: 4px 0; }

/* 프로필 설정 - 프로필 이미지 미리보기(원형). */
.profile-avatar-preview {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; border: 1px solid var(--rule);
}
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
/* 상세페이지 제작자 아바타에 업로드한 프로필 이미지 표시. */
.creator-avatar { overflow: hidden; }
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* 프로필 이미지가 없을 때 기본 사람모양 아이콘. */
.default-avatar-icon { width: 62%; height: 62%; opacity: 0.55; }

/* 상세 - 검색 태그 칩(누르면 그 키워드로 스토어 검색). */
.support-chip.tag-chip { text-decoration: none; cursor: pointer; }
.support-chip.tag-chip:hover { border-color: var(--accent); color: var(--accent); }

/* 상세 - 굵기별 미리보기(굵기마다 한 줄씩). */
.weight-previews { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.weight-preview-row { padding: 14px 4px; border-bottom: 1px solid var(--rule); }
.weight-preview-row:last-child { border-bottom: none; }
.weight-preview-row .wp-label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.weight-preview-row .wp-sample { font-size: 30px; line-height: 1.3; color: var(--ink); word-break: keep-all; }

/* 결제 페이지 카드 */
.checkout-card { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 22px; }
.checkout-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.checkout-summary .cs-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.checkout-summary .cs-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.checkout-summary .cs-price { font-size: 20px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.info-table td:first-child { color: var(--ink-soft); white-space: nowrap; width: 120px; }
.admin-stat-card .label { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }
.admin-stat-card .value { font-size: 22px; font-weight: 700; }

/* 대시보드 상단 바로가기(신규주문/취소관리/답변대기 문의) - 클릭 시 해당 메뉴로 이동 */
.admin-shortcut-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-shortcut {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--rule);
  text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 600;
}
.admin-shortcut:hover { border-color: var(--accent); color: var(--accent); }
.admin-shortcut .s-count {
  min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}

/* 모든 관리자/마이페이지 섹션을 하나의 흰색 카드로 묶는다. */
.admin-section { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
/* 섹션 카드 안의 표는 자체 카드 테두리를 빼서 이중 카드가 안 되게(가로 스크롤은 유지). */
.admin-section .admin-table-wrap { border: none; border-radius: 0; background: transparent; }
/* 마이페이지 대시보드 요약 패널 - 프로젝트처럼 흰 배경 카드로 감싼다. */
.dash-panel { background: #fff; border: 1px solid var(--rule); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.dash-panel .dash-sec-head h2 { font-size: 16px; }
/* 프로젝트 외 요약 패널을 좌/우 2열로 배치(좁은 화면에선 1열). */
.dash-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-2col .dash-panel { margin-bottom: 0; }
@media (max-width: 760px) { .dash-2col { grid-template-columns: 1fr; } }
/* 프로젝트 패널은 아래 2열 영역과 가로 폭을 맞춘다(그리드 max-width 해제). */
.dash-panel .project-grid { max-width: none; }
/* 대시보드 프로젝트 - 한 줄에 4개씩(좁은 화면에선 자동으로 줄어듦). */
.dash-project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
/* 태블릿 등 화면이 좁아지면 한 줄에 2개씩(사이드바로 본문이 좁아진 것도 고려) */
@media (max-width: 1024px) { .dash-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dash-project-grid { grid-template-columns: 1fr; } }

/* 상단 탭(주문 / 프로젝트처럼 한 메뉴 아래 하위 화면 전환) */
.admin-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--rule); margin-bottom: 20px;
}
.admin-tabs .admin-tab {
  padding: 10px 20px; text-decoration: none; color: var(--ink-soft); font-weight: 700;
  font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.admin-tabs .admin-tab:hover { color: var(--ink); }
.admin-tabs .admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

/* 목록 페이지 제목은 가운데정렬 - 관리자 모든 페이지 제목과 마이페이지 제목/섹션 제목. */
.admin-content h1 { text-align: center; }
.saas-main .admin-wrap > h1,
.saas-main .admin-wrap .admin-section > h2 { text-align: center; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  /* 컬럼이 많아도 가로 스크롤 대신 줄바꿈해서 화면 폭에 맞춘다(반응형) - 한글 단어는
     통째로(keep-all), 긴 영문/주문번호만 강제로(overflow-wrap) 접는다. */
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 상태·진행현황 배지는 한 덩어리로 유지(글자 단위로 세로로 쪼개지지 않게). */
table.admin-table .admin-badge { white-space: nowrap; }
table.admin-table th { word-break: keep-all; }
table.admin-table th {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12px;
}
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table a { color: var(--accent); text-decoration: none; }
table.admin-table a:hover { text-decoration: underline; }
/* 각 항목을 한 줄로(줄바꿈 없이) - 넘치면 admin-table-wrap이 가로 스크롤. */
table.admin-table-1line th, table.admin-table-1line td { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
/* 정산표 판매자명: 검정 굵게 */
table.admin-table a.settle-seller { color: var(--ink); font-weight: 700; }

.admin-back-link { display: inline-block; margin-bottom: 14px; color: var(--ink-soft); text-decoration: none; font-size: 13px; }
.admin-back-link:hover { color: var(--accent); }

/* 1:1 문의 - 한 페이지 카드형(문의 + 답변 스레드) */
.inquiry-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.inquiry-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.inquiry-head-left { display: flex; align-items: center; gap: 8px; }
.inquiry-head-right { font-size: 13px; color: var(--ink); text-align: right; }
.inquiry-date { color: var(--ink-soft); }
.inquiry-subject { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.inquiry-body { font-size: 14px; color: var(--ink); white-space: pre-wrap; line-height: 1.6; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.inquiry-reply { background: var(--cream); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.inquiry-reply-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.inquiry-reply-actions { display: flex; gap: 6px; flex-shrink: 0; }
.inquiry-reply-body { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; line-height: 1.6; }
.inquiry-add-reply { margin-top: 14px; }

/* 설정 페이지: 왼쪽 하위 메뉴(탭) + 오른쪽 패널 */
.settings-layout { display: flex; gap: 24px; align-items: flex-start; }
.settings-nav { flex: 0 0 200px; display: flex; flex-direction: column; gap: 4px; }
.settings-tab {
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-soft);
}
.settings-tab:hover { background: var(--cream); color: var(--ink); }
.settings-tab.active { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.settings-panels { flex: 1; min-width: 0; }
.settings-panel > h2:first-child { margin-top: 0; }
@media (max-width: 767px) {
  .settings-layout { flex-direction: column; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
}

/* ===== 관리자 모바일(≤767px): 사이드바는 상단바 + 접이식, 목록은 카드형으로 ===== */
@media (max-width: 767px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: column;
  }
  .admin-sidebar-toggle { display: flex; }
  /* 메뉴는 기본으로 접혀 있고, 햄버거를 누르면 펼쳐진다. */
  .admin-sidebar-nav,
  .admin-sidebar-footer { display: none; }
  .admin-sidebar.nav-open .admin-sidebar-nav { display: flex; }
  .admin-sidebar.nav-open .admin-sidebar-footer { display: block; }
  .admin-content { padding: 20px 14px; }

  /* 목록 테이블 → 카드: 각 행이 하나의 카드. 카드 안은 2열 그리드로, 항목들이
     왼쪽·오른쪽에 나눠 담겨(예: 주문정보 좌 / 결제정보 우) 세로로 짧고 읽기 편하다. */
  table.admin-table thead { display: none; }
  table.admin-table,
  table.admin-table tbody { display: block; width: 100%; }
  table.admin-table tr {
    display: block;
    columns: 2;
    column-gap: 16px;
    padding: 12px 14px 4px;
    border-bottom: 6px solid var(--cream);
  }
  table.admin-table tr:last-child { border-bottom: none; }
  table.admin-table td {
    display: block;
    min-width: 0;
    margin-bottom: 8px;
    padding: 0;
    border: none;
    text-align: left;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    /* 한 항목이 두 칸에 걸쳐 쪼개지지 않게(묶음 셀도 통째로 유지). */
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }
  /* 값이 없는(빈) 셀은 카드에서 감춘다. */
  table.admin-table td:empty { display: none; }
  /* 라벨 없는 셀(선택 체크박스 등)은 카드 한 줄 전체를 차지한다. */
  table.admin-table td:not([data-label]) { column-span: all; }
  /* 항목명을 값 위 작은 라벨로. 각 셀이 그리드의 좌/우 칸에 자리잡는다. */
  table.admin-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-soft);
    word-break: keep-all;
  }
  /* 값 영역의 입력창/셀렉트는 칸 폭에 맞춘다(가로 넘침 방지). */
  table.admin-table td[data-label] input,
  table.admin-table td[data-label] select {
    min-width: 0 !important;
    max-width: 100%;
  }
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.admin-detail-grid dt { color: var(--ink-soft); }
.admin-detail-grid dd { margin: 0; word-break: break-all; }

.admin-form {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 20px;
  max-width: 480px;
}
.admin-form .auth-field { margin-bottom: 14px; }
.admin-form label { font-size: 13px; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  font-size: 13.5px;
  background: var(--cream);
  color: var(--ink);
  box-sizing: border-box;
}
.admin-form-actions { display: flex; gap: 8px; margin-top: 4px; }

.admin-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.4px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
}
.admin-btn, .admin-btn:hover, .admin-btn:focus, .admin-btn:active, .admin-btn:visited { text-decoration: none; }
.admin-btn:not(:disabled):hover { background: var(--accent-tint); }
.admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.admin-btn-solid { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 호버 시 글씨 색을 테두리 색(accent)과 같게 - 배경은 연하게 바꿔 가독성을 유지한다. */
.admin-btn-solid:not(:disabled):hover { background: var(--accent-tint); color: var(--accent); }
.admin-btn-danger { border-color: var(--badge-red); color: var(--badge-red); }
.admin-btn-danger:not(:disabled):hover { background: rgba(224, 82, 74, 0.1); }

/* 상품 추가 등 관리자 모달(dialog) */
.admin-modal {
  border: none;
  border-radius: 14px;
  padding: 24px;
  width: min(420px, 92vw);
  background: var(--card, var(--cream));
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.admin-modal::backdrop { background: rgba(0, 0, 0, 0.45); }

/* 쿠폰 '지정 회원' 검색 결과 미리보기 목록(입력창 아래 인라인) */
.admin-search-results {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 4px;
}
.admin-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: none;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.admin-search-result:hover { background: var(--accent-tint); }
.admin-search-result.is-selected { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.admin-search-result .check { color: var(--accent); font-weight: 700; }

/* 고객 목록 - 좌측 그룹 필터 + 우측 테이블 */
.customers-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.customers-groups {
  flex: 0 0 180px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 10px;
  align-self: flex-start;
}
.customers-topbar { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.customers-topbar .customers-search,
.customers-topbar .customers-assign-bar { margin-bottom: 0; }
.cg-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-size: 14px;
}
.cg-item:hover { background: var(--accent-tint); }
.cg-item.active { background: var(--accent-tint); font-weight: 600; color: var(--accent); }
.cg-count { color: var(--ink-soft); font-size: 12px; }
.customers-main { flex: 1; min-width: 320px; }
/* 고객 목록은 1080px 제한을 풀어 화면 폭을 꽉 채운다(가로 스크롤 방지). */
.admin-wrap-wide { max-width: none; }
/* 셀 내용을 줄바꿈 허용해 컬럼이 많아도 가로 스크롤이 안 생기게 한다. */
.customers-main table.admin-table th,
.customers-main table.admin-table td { white-space: normal; }

/* 프로젝트 목록(컬럼 9개)도 화면 폭에 맞춰 줄바꿈 + 패딩 축소로 가로 스크롤 제거.
   table-layout은 auto 그대로 둬서 내용에 맞춰 컬럼 폭을 잡되, 긴 셀만 줄바꿈되게 한다. */
table.projects-table th,
table.projects-table td {
  white-space: normal;
  /* keep-all: 한글 단어(닉네임 등)를 음절 단위로 쪼개지 않고 통째로 유지.
     overflow-wrap:anywhere: 그래도 안 끊기는 긴 영문/숫자 토큰(프로젝트명·주문번호)은
     칸을 넘지 않게 강제로 줄바꿈. 둘을 함께 써서 한글은 깔끔히, 긴 토큰만 접는다. */
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding: 6px 6px;
  font-size: 11.5px;
  vertical-align: top;
}
/* 배지(상태/진행현황)는 한 덩어리로 유지하되 살짝 작게. */
table.projects-table .admin-badge { white-space: nowrap; font-size: 10.5px; padding: 2px 6px; }
.customers-search { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.customers-search input[type="text"] {
  flex: 1; min-width: 200px; max-width: 360px;
  padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--cream); color: var(--ink);
}
.customers-assign-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.customers-group-select { padding: 7px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--cream); color: var(--ink); }
.memo-btn { background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.35; line-height: 1; }
.memo-btn:hover { opacity: 0.9; }
.memo-btn.has-memo { opacity: 1; }

.admin-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.admin-badge-admin { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }
.admin-badge-user { background: var(--rule); color: var(--ink-soft); }
.admin-badge-pending { background: var(--rule); color: var(--ink-soft); }
.admin-badge-waiting_deposit { background: rgba(217, 119, 6, 0.14); color: #d97706; }
.admin-badge-paid { background: rgba(34, 181, 115, 0.14); color: var(--badge-green); }
.admin-badge-free { background: rgba(47, 111, 237, 0.14); color: #2f6fed; }
/* 프로젝트 진행현황 배지 색상(제작중/제작완료/검수중/심사완료/무료배포/판매중/반려) */
.pstat-made { background: rgba(120, 120, 128, 0.15); color: #6b7280; }
.pstat-done { background: rgba(13, 148, 136, 0.16); color: #0d9488; }
.pstat-review { background: rgba(217, 119, 6, 0.16); color: #d97706; }
.pstat-approved { background: rgba(124, 58, 237, 0.15); color: #7c3aed; }
.pstat-free { background: rgba(47, 111, 237, 0.14); color: #2f6fed; }
.pstat-sale { background: rgba(34, 181, 115, 0.16); color: var(--badge-green); }
.pstat-rejected { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }
.pstat-revision { background: rgba(217, 119, 6, 0.16); color: #d97706; }
.admin-badge-failed { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }
.admin-badge-refunded { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }
.admin-badge-canceled { background: var(--rule); color: var(--ink-soft); }
.admin-badge-trial { background: rgba(224, 82, 74, 0.12); color: var(--badge-red); }

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.admin-cards .admin-stat-card { display: block; text-decoration: none; color: var(--ink); }
.admin-cards .admin-stat-card .name { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }

/* ==========================================================================
   모글디 스토어 (구매자용 마켓플레이스: 홈 + 상세)
   - style.css의 색 토큰만 사용해 라이트/다크가 자동 유지된다.
   - "시원시원": 여백을 크게, 흰 표면 위주, 폰트 예문이 주인공.
   ========================================================================== */

/* 스토어 페이지는 상하 패딩 대신 히어로가 여백을 담당한다. */
.saas-body.store-body { background: #fff; }
.saas-main.store-main { padding: 0 0 64px; align-items: stretch; background: #fff; }
.store-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---- 스토어 공용 푸터 + 약관/정보 모달 ---- */
.store-footer { background: #f7f8fa; border-top: 1px solid var(--rule); margin-top: 40px; }
.store-footer-inner { max-width: 1140px; margin: 0 auto; padding: 26px 20px 34px; }
.store-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 14px; }
.store-footer-links button, .store-footer-links a {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  font-size: 13px; color: var(--ink-soft); font-family: inherit; text-decoration: none;
}
.store-footer-links button:hover, .store-footer-links a:hover { color: var(--ink); text-decoration: underline; }
.store-footer-links button strong { font-weight: 700; color: var(--ink); }
.store-footer-links .sep { color: #c9ced6; font-size: 12px; }
.store-footer-biz { font-size: 12.5px; line-height: 1.7; color: #8a909c; }
.store-footer-biz p { margin: 0; }
.store-footer-biz b { color: var(--ink-soft); font-weight: 700; }
.store-footer-mediation { margin-top: 10px; color: #9aa0aa; font-size: 12px; line-height: 1.7; }
.store-footer-biz .copyright { margin-top: 10px; color: #aeb4be; }

.footer-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 22, 28, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* [hidden] 속성이 위 display 규칙에 눌리지 않도록 명시적으로 숨김 처리. */
.footer-modal-backdrop[hidden], .footer-modal[hidden] { display: none !important; }
.footer-modal {
  background: #fff; border-radius: 16px; width: min(560px, 100%);
  max-height: 82vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.footer-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--rule);
}
.footer-modal-head h2 { margin: 0; font-size: 18px; color: var(--ink); }
.footer-modal-x {
  background: none; border: none; cursor: pointer; font-size: 24px; line-height: 1;
  color: var(--ink-soft); padding: 0 4px;
}
.footer-modal-x:hover { color: var(--ink); }
.footer-modal-body { padding: 20px 22px 24px; overflow-y: auto; color: var(--ink); }
.footer-modal-body h3 { font-size: 14px; margin: 18px 0 6px; color: var(--ink); }
.footer-modal-body h3:first-child { margin-top: 0; }
.footer-modal-body p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.footer-modal-body .fm-note { margin-top: 16px; font-size: 12px; color: #9aa0ac; }
.footer-modal-body .fm-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.footer-modal-body .fm-list li { font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); }
.footer-modal-body .fm-list b { display: inline-block; min-width: 72px; color: var(--ink); }
.fm-biz-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fm-biz-table th, .fm-biz-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.fm-biz-table th { width: 130px; color: var(--ink-soft); font-weight: 600; background: #f7f8fa; }
.fm-biz-table td { color: var(--ink); }

/* ---- 스토어 헤더 내비(흰 배경 + 검정 로고/브랜드 + 회색 비활성 메뉴) ---- */
/* 흰 바는 전체 폭, 안쪽 로고·메뉴는 콘텐츠 폭에 맞춰 가운데 정렬. */
.store-navbar {
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  justify-content: center;
}
.store-nav-inner {
  width: 100%; max-width: 1140px; height: 100%;
  margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.store-nav-left { display: flex; align-items: center; gap: 28px; min-width: 0; }
/* 로고 아이콘은 원본 빨강 그대로, 브랜드 글씨는 검정·더 두껍게 (a.brand로 기본값보다 우선) */
.store-navbar a.brand { color: var(--ink); font-weight: 900; }
.store-navbar a.brand .mascot-icon { filter: none; width: 46px; height: 46px; }
.store-nav-links { display: flex; gap: 22px; }
.store-nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 8px 2px; }
.store-nav-links a:hover { color: var(--ink); background: none; }
/* 로그인한 닉네임 - 진하게 표시(링크 아님) */
.store-nav-user { color: var(--ink); font-weight: 700; font-size: 14px; }

/* 로그인/회원가입 모달 */
.auth-modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.auth-modal-backdrop[hidden] { display: none; }
.auth-modal { background: #fff; border-radius: 18px; padding: 30px 28px 26px; width: min(400px, 100%); position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); max-height: 92vh; overflow-y: auto; scrollbar-width: none; }
.auth-modal::-webkit-scrollbar { display: none; }
/* 회원가입은 입력이 많아 세로가 길다 - 간격을 줄여 스크롤 없이 담기게 */
#authViewSignup .auth-field { margin-bottom: 10px; }
#authViewSignup .oauth-btn { margin-bottom: 8px; }
#authViewSignup .auth-divider { margin: 12px 0; }
.auth-modal-x { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.auth-modal h2 { font-size: 22px; margin: 0 0 6px; }
.auth-modal-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 18px; }
.auth-modal-err { background: var(--accent-tint); color: var(--badge-red); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }

/* 우측 상단 프로필(사진+닉네임) 드롭다운 */
.store-profile { position: relative; }
.store-profile-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 4px 10px 4px 4px;
}
.store-profile-btn:hover { border-color: var(--ink-soft); }
.store-profile-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 13px;
}
.store-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.store-profile-name { font-size: 13.5px; font-weight: 700; color: var(--ink); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-profile-caret { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0; }
.store-profile-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 152px;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 26px var(--shadow-color); z-index: 80;
}
.store-profile-menu[hidden] { display: none; }
.store-profile-menu a { display: block; padding: 10px 12px; font-size: 14px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.store-profile-menu a:hover { background: var(--cream); color: var(--ink); }

/* 정산 요약(마이페이지 대시보드 + 정산 페이지 공용) */
.settle-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .settle-summary { grid-template-columns: 1fr; } }
.settle-box { background: var(--cream); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; }
.settle-box.highlight { background: #fff; border-color: var(--accent); }
.settle-label { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }
.settle-value { font-size: 22px; font-weight: 800; color: var(--ink); }
.settle-box.highlight .settle-value { color: var(--accent); }
.settle-sub { font-size: 11.5px; margin-top: 5px; }
.settle-ok { color: #128a4e; font-weight: 700; }
.settle-muted { color: var(--ink-soft); }
@media (max-width: 620px) { .settle-summary { grid-template-columns: 1fr; } }
/* 우측 유틸 메뉴(좋아요/마이페이지/로그인)도 회색, hover 시 검정 */
.store-navbar .saas-navbar-right a:not(.store-cta-btn) { color: var(--ink-soft); }
.store-navbar .saas-navbar-right a:not(.store-cta-btn):hover { color: var(--ink); background: none; }
/* 레드 CTA 버튼은 흰 배경 위에서도 빨강 유지(기본 background:none보다 우선) */
.store-navbar a.store-cta-btn { background: var(--accent); color: #fff; }
.store-navbar a.store-cta-btn:hover { background: var(--accent); color: #fff; filter: brightness(1.06); }
.store-cta-btn {
  background: var(--accent); color: #fff !important; padding: 9px 16px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
}
.store-cta-btn:hover { filter: brightness(1.06); background: var(--accent) !important; color: #fff !important; }
/* 모바일 햄버거 + 드로어 (데스크톱은 숨김) */
.store-nav-burger { display: none; }
.store-nav-drawer { display: none; }
.store-nav-mobile { display: none; }
.store-nav-mobicon { display: none; }
@media (max-width: 760px) {
  .store-nav-links, .store-nav-like { display: none; }
  .store-navbar .saas-navbar-right { display: none; }
  .store-nav-inner { padding: 0 14px; }
  .store-navbar .brand { font-size: 16px; }
  .store-nav-mobile { display: flex; align-items: center; gap: 5px; }
  .store-nav-mobicon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--rule);
    color: var(--ink-soft); text-decoration: none;
  }
  .store-nav-mobicon svg { width: 18px; height: 18px; }
  .store-nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 9px; border: none; background: none; cursor: pointer;
  }
  .store-nav-burger span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .store-nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .store-nav-burger.open span:nth-child(2) { opacity: 0; }
  .store-nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .store-navbar { position: relative; }
  .store-nav-drawer {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 70;
    display: block; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
    background: #fff; padding: 8px 14px 14px; box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
  }
  .store-nav-drawer[hidden] { display: none; }
  .store-nav-drawer a {
    display: block; padding: 13px 6px; font-size: 15.5px; font-weight: 600;
    color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule);
  }
  .store-nav-drawer a:last-child { border-bottom: none; }
  .store-nav-drawer .store-nav-drawer-sep { height: 4px; }
  .store-nav-drawer a.store-cta-btn {
    text-align: center; color: #fff !important; border-bottom: none;
    margin-top: 10px; padding: 13px; border-radius: 10px;
  }
}

/* ---- 히어로(카카오식 둥근 파스텔 배너 카드) ---- */
.store-hero {
  text-align: center;
  padding: 64px 24px 56px;
  border-radius: 28px;
  margin: 22px auto 10px;
  max-width: 1140px; width: calc(100% - 40px);
  background:
    radial-gradient(90% 120% at 12% 0%, #ffe1de 0%, transparent 60%),
    radial-gradient(90% 120% at 100% 10%, #dff0e6 0%, transparent 55%),
    linear-gradient(180deg, #fff6f0 0%, #fef4f7 100%);
}
.store-hero-inner { max-width: 720px; margin: 0 auto; }
.store-hero .eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--accent); background: var(--card); border: 1px solid var(--accent-light);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.store-hero .hero-pre { white-space: pre-line; }
.store-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
}
.store-hero p.sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 28px;
}
/* 모바일에서만 부제목을 콤마 뒤에서 두 줄로 나눈다(데스크톱은 한 줄). */
.mobile-br { display: none; }
/* "내 문장으로 미리보기" 입력 - 전 카드/상세 예문에 실시간 반영. */
.store-preview-field {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  background: #f1f3f5;
  border: none;
  border-radius: 999px;
  padding: 12px 16px 12px 20px;
  box-shadow: none;
}
.store-preview-field svg { width: 18px; height: 18px; color: var(--ink-soft); flex-shrink: 0; }
.store-preview-field input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 15px; color: var(--ink); font-family: inherit; min-width: 0;
}
.store-preview-field .hint {
  font-size: 11.5px; color: var(--ink-soft); white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; background: var(--cream);
}

/* ---- 히어로 통합 검색창(메인 랜딩) ---- */
.store-hero-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 640px; margin: 0 auto 14px;
  background: var(--card); border: none; border-radius: 16px;
  padding: 6px 8px 6px 20px; box-shadow: 0 6px 24px var(--shadow-color);
}
.store-hero-search svg { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; }
.store-hero-search input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 17px; color: var(--ink); font-family: inherit; padding: 16px 0; min-width: 0;
}
.store-hero-search button {
  border: none; background: var(--accent); color: #fff; cursor: pointer;
  font-size: 15px; font-weight: 700; padding: 13px 26px; border-radius: 12px; flex-shrink: 0;
}
.store-hero-search button:hover { filter: brightness(1.05); }
/* 모바일: 검색창 폭이 좁아 안내문구가 잘리므로, 글자를 줄이고(아래) 문구도 짧게
   바꾼다(list.html의 스크립트가 ≤480에서 placeholder를 교체). */
@media (max-width: 480px) {
  .store-hero { padding: 46px 18px 40px; }
  .store-hero p.sub { font-size: 15px; }
  .mobile-br { display: inline; }
  .store-hero-search { padding: 4px 6px 4px 14px; gap: 6px; }
  .store-hero-search svg { width: 18px; height: 18px; }
  .store-hero-search input { padding: 13px 0; }
  .store-hero-search button { padding: 12px 16px; }
}

.store-keywords {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center;
  max-width: 640px; margin: 0 auto 22px;
}
.store-keywords .kw-label { font-size: 12.5px; color: var(--ink-soft); margin-right: 2px; }
.store-keywords a {
  font-size: 13px; color: var(--ink-soft); text-decoration: none;
  padding: 6px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule);
}
.store-keywords a:hover { border-color: var(--accent); color: var(--accent); }

.store-preview-panel {
  max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.store-preview-panel .store-preview-field { width: 100%; box-sizing: border-box; }
.store-preview-controls {
  display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--ink-soft);
}
.store-preview-controls .pv-size { display: flex; align-items: center; gap: 8px; }
/* 크기 슬라이더 - 회색 테두리 트랙 제거. 손잡이 왼쪽은 빨강 채움 유지.
   WebKit은 input 배경 그라디언트(_card_preview_script.html가 값에 맞춰 갱신)로,
   Firefox는 ::-moz-range-progress(빨강)로 왼쪽을 채운다. */
.store-preview-controls .pv-size input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 120px; height: 4px; border: none; outline: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 36%, #d9dce1 36%, #d9dce1 100%);
  border-radius: 999px; cursor: pointer;
}
.store-preview-controls .pv-size input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
}
.store-preview-controls .pv-size input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
}
.store-preview-controls .pv-size input[type="range"]::-moz-range-track {
  height: 4px; background: #d9dce1; border-radius: 999px; border: none;
}
.store-preview-controls .pv-size input[type="range"]::-moz-range-progress {
  height: 4px; background: var(--accent); border-radius: 999px;
}
.store-preview-controls #storePreviewReset {
  background: none; border: 1px solid var(--rule); color: var(--ink-soft);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-family: inherit;
}
.store-preview-controls #storePreviewReset:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 추천 테마(카카오식 원형 아이콘 + 아래 라벨) ---- */
.store-section-sub { color: var(--ink-soft); font-size: 14px; margin: -6px 0 16px; }
/* 전체 항목을 위/아래 두 줄에 반반씩 - 열 수(--theme-cols)를 항목 수의 절반으로 잡는다. */
.theme-grid {
  display: grid; grid-template-columns: repeat(var(--theme-cols, 7), minmax(0, 1fr));
  gap: 18px 8px; justify-items: center;
}
@media (max-width: 720px) {
  .theme-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
.theme-card {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-decoration: none; background: none; border: none; color: var(--ink);
  font-size: 13px; font-weight: 600; text-align: center; width: 84px;
  transition: transform 0.13s;
}
.theme-card:hover { transform: translateY(-3px); }
.theme-card .theme-emoji {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: var(--accent-tint);
}
/* 원형 아이콘 배경을 파스텔 색으로 순환(카카오처럼 알록달록하게). */
.theme-card:nth-child(7n+1) .theme-emoji { background: #ffe8e6; }
.theme-card:nth-child(7n+2) .theme-emoji { background: #fff2cc; }
.theme-card:nth-child(7n+3) .theme-emoji { background: #e3f4dd; }
.theme-card:nth-child(7n+4) .theme-emoji { background: #dcefff; }
.theme-card:nth-child(7n+5) .theme-emoji { background: #f0e6ff; }
.theme-card:nth-child(7n+6) .theme-emoji { background: #ffe6f2; }
.theme-card:nth-child(7n+7) .theme-emoji { background: #e6f7f4; }

/* ---- 제작자 소개 ---- */
.creator-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.creator-card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 26px 24px;
  text-decoration: none; color: var(--ink); transition: all 0.15s;
}
.card-follow-btn {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1.4px solid var(--accent); background: #fff; color: var(--accent);
  font-weight: 700; font-size: 12.5px; cursor: pointer; line-height: 1;
}
.card-follow-btn:hover { background: var(--accent-tint); }
.card-follow-btn.following { background: var(--accent); color: #fff; }
.creator-card .creator-head { padding-right: 76px; }
.creator-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 26px var(--shadow-color); }
.creator-head { display: flex; align-items: center; gap: 14px; }
.creator-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 24px;
}
.creator-name { font-size: 17px; font-weight: 700; }

/* 작가 프로필 SNS 아이콘 + 내 정보 SNS 입력 */
.seller-sns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.seller-sns a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule); color: var(--ink-soft); text-decoration: none; }
.seller-sns a:hover { border-color: var(--accent); color: var(--accent); }
.seller-sns svg { width: 18px; height: 18px; }
.sns-fields { display: flex; flex-direction: column; gap: 8px; }
.sns-fields input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1.4px solid var(--rule); border-radius: 8px; font-size: 14px; font-family: inherit; }
.sns-fields input:focus { outline: none; border-color: var(--accent); }

/* 관심작가(팔로우) 버튼 */
.follow-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.follow-btn:hover { background: var(--accent-tint); }
.follow-btn.following { background: var(--accent); color: #fff; }
.creator-stats { font-size: 12.5px; color: var(--ink-soft); }
.creator-heart { width: 12px; height: 12px; vertical-align: -1.5px; color: var(--accent); }
.creator-bio { font-size: 13px; color: var(--ink-soft); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 카드 전체를 덮는 스트레치 링크(작가 프로필) - 칩은 이 위에 올려 별도 링크로 동작 */
.creator-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.creator-reps { display: flex; gap: 6px; flex-wrap: wrap; position: relative; z-index: 2; }
.creator-rep {
  font-size: 15px; line-height: 1.3; padding: 5px 11px; border-radius: 999px;
  background: #fff; color: var(--ink-soft); border: 1px solid var(--ink-soft);
  cursor: pointer; text-decoration: none; transition: color 0.12s, border-color 0.12s;
}
.creator-rep.is-loaded { font-size: 17px; }
.creator-rep:hover, .creator-rep:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }

/* 장바구니 목록 */
.cart-selectall { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 10px; cursor: pointer; }
.cart-selectall input, .cart-check { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.cart-check-spacer { display: inline-block; width: 18px; flex-shrink: 0; }
.cart-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.cart-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px;
}
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-name { font-size: 14.5px; font-weight: 700; }
.cart-row-name a { color: var(--ink); text-decoration: none; }
.cart-row-name a:hover { text-decoration: underline; }
.cart-preview { margin-top: 6px; font-size: 22px; line-height: 1.35; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-row-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.cart-del-btn { border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); border-radius: 8px; padding: 8px 13px; font-size: 13px; cursor: pointer; font-family: inherit; }
.cart-del-btn:hover { border-color: var(--badge-red); color: var(--badge-red); }
.cart-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--cream); border-radius: 12px; margin-bottom: 18px; font-weight: 700; font-size: 15px; }
.cart-total-amt { font-size: 17px; color: var(--accent); }

/* 결제 페이지(체크아웃) - 주문상품/주문자정보/주문요약/결제수단/약관/결제버튼 */
.co-wrap { max-width: 900px; padding-top: 8px; }
.co-title { font-size: 24px; margin: 0 0 18px; color: var(--ink); }
/* 좌(주문상품·주문자정보) / 우(주문요약·결제수단·약관·버튼) 2단 */
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.co-col { display: flex; flex-direction: column; min-width: 0; }
.co-col-right { position: sticky; top: 16px; }
@media (max-width: 760px) {
  .co-grid { grid-template-columns: 1fr; gap: 0; }
  .co-col-right { position: static; }
}
.co-section { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.co-section h2 { font-size: 15px; margin: 0 0 12px; color: var(--ink); }
.co-items { display: flex; flex-direction: column; gap: 16px; }
.co-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 12px; align-items: baseline; }
.co-item-name { grid-column: 1; grid-row: 1; font-weight: 700; font-size: 14.5px; }
.co-item-meta { grid-column: 1; grid-row: 2; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.co-item-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.co-item-preview { grid-column: 1 / -1; grid-row: 3; margin-top: 8px; padding: 12px 14px; background: var(--cream); border-radius: 10px; font-size: 22px; line-height: 1.35; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.co-field:last-child { margin-bottom: 0; }
.co-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.co-field input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.4px solid var(--rule); border-radius: 10px; font-size: 15px; font-family: inherit; }
.co-field input:focus { outline: none; border-color: var(--accent); }
.co-summary { display: flex; flex-direction: column; gap: 10px; }
.co-sum-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.co-sum-total { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 2px; font-size: 16px; font-weight: 800; color: var(--ink); }
.co-sum-total span:last-child { color: var(--accent); }
.co-note { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 0; line-height: 1.6; }
.co-note-list { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 12px; padding-left: 18px; }
.co-note-list li { margin: 4px 0; }
.co-note-list a { color: var(--accent); }
.co-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink); line-height: 1.5; cursor: pointer; }
.co-consent input { margin-top: 2px; flex: none; }
/* 카드 결제 모달 - '결제하기' 누르면 토스 위젯이 이 안에 뜬다 */
.toss-pay-modal { border: none; border-radius: 16px; padding: 22px; width: min(460px, 94vw);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22); background: var(--card); color: var(--ink); }
.toss-pay-modal::backdrop { background: rgba(0,0,0,0.5); }
.toss-pay-modal h3 { margin: 0 0 14px; font-size: 17px; }
.toss-pay-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.toss-pay-modal-actions #tossPayCancelBtn { padding: 12px 18px; border-radius: 12px; border: 1.4px solid var(--rule);
  background: var(--card); color: var(--ink-soft); cursor: pointer; font-size: 14px; font-family: inherit; }
.toss-pay-modal-actions #tossPayConfirmBtn { padding: 12px 20px; font-size: 15px; }
.toss-pay-modal-actions #tossPayConfirmBtn:disabled { opacity: .6; cursor: default; }
.co-status { display: block; text-align: center; font-size: 12.5px; color: var(--ink-soft); min-height: 16px; margin: 6px 0; }
.co-paybtn { width: 100%; border: none; border-radius: 14px; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; padding: 17px; cursor: pointer; font-family: inherit; }
.co-paybtn:hover { filter: brightness(1.05); }
.co-paybtn:disabled { opacity: .6; cursor: default; }
/* 결제 수단 선택(신용카드/무통장입금) */
.pay-methods { display: flex; gap: 10px; margin-bottom: 14px; }
.pay-method { flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 12px; border: 1.4px solid var(--rule); border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.pay-method input { accent-color: var(--accent); }
.bank-box { background: var(--cream); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bank-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.bank-line b { color: var(--ink); }

/* ---- 모글디 제작 CTA 밴드 ---- */
.store-cta-band {
  margin: 48px 0 8px; padding: 44px 32px; border-radius: 22px; text-align: center;
  background:
    radial-gradient(130% 160% at 0% 0%, var(--accent-tint) 0%, transparent 55%),
    radial-gradient(130% 160% at 100% 100%, rgba(34, 181, 115, 0.10) 0%, transparent 55%),
    var(--card);
  border: 1px solid var(--rule);
}
.store-cta-band h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.store-cta-band p { color: var(--ink-soft); font-size: 15px; max-width: 620px; margin: 0 auto 24px; line-height: 1.6; }
.store-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store-cta-actions .cta-red {
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 12px;
}
.store-cta-actions .cta-red:hover { filter: brightness(1.05); }
.store-cta-actions .cta-ghost {
  background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 12px; border: 1.5px solid var(--rule);
}
.store-cta-actions .cta-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 툴바(검색 + 정렬) ---- 검색창을 큼직하게 ---- */
.store-toolbar {
  display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap;
  margin: 8px 0 20px;
}
.store-search {
  flex: 1; min-width: 260px;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: 16px;
  padding: 0 10px 0 22px;
  box-shadow: 0 3px 16px var(--shadow-color);
}
.store-search:focus-within { border-color: var(--accent); }
.store-search svg { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; }
.store-search input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 17px; color: var(--ink); font-family: inherit; padding: 18px 0; min-width: 0;
}
.store-search button {
  border: none; background: var(--accent); color: #fff; cursor: pointer;
  font-size: 15px; font-weight: 700; padding: 12px 26px; border-radius: 12px; flex-shrink: 0;
}
.store-search button:hover { filter: brightness(0.95); }
.store-sort {
  padding: 0 16px; border: 1.5px solid var(--rule); border-radius: 16px;
  background: var(--card); color: var(--ink); font-size: 15px; font-family: inherit; cursor: pointer;
}
.store-result-count { font-size: 13px; color: var(--ink-soft); margin-left: auto; }

/* ---- 필터 칩 ---- */
.store-filter-block { margin-bottom: 14px; }
.store-filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.store-filter-label {
  font-size: 12px; color: var(--ink-soft); font-weight: 600;
  min-width: 60px;
}
.store-chip {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  text-decoration: none; font-size: 13px; cursor: pointer;
  background: var(--card); color: var(--ink-soft); border: 1px solid var(--rule);
  transition: all 0.12s;
}
.store-chip:hover { border-color: var(--accent-light); color: var(--ink); }
.store-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.store-chip.active-dark { background: var(--ink); color: var(--card); border-color: var(--ink); font-weight: 600; }

/* ---- 폰트 카드 그리드(한 줄에 3개) ---- */
.font-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 18px;
}
@media (max-width: 680px) { .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  /* 모바일: 상품 카드 한 줄에 하나씩 */
  .font-grid { grid-template-columns: 1fr; }
  /* 커버 이미지 비율 유지 - 1열에선 9:4 크롭 없이 원본 비율 그대로 보여준다(미리보기 입력 중엔 예외). */
  .font-card:not(.previewing) .font-card-thumb.has-cover { aspect-ratio: auto; min-height: 0; padding: 0; }
  .font-card:not(.previewing) .font-card-thumb.has-cover .font-card-cover { position: static; width: 100%; height: auto; object-fit: contain; }
}

/* 섹션 제목(신규/인기/무료 레일 + 전체 그리드) */
.store-section { margin-top: 40px; }
.store-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.store-section-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.store-section-head .more-link {
  font-size: 13px; color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.store-section-head .more-link:hover { color: var(--accent); }

/* 카카오 이모티콘샵식 카드: 둥근 썸네일(폰트 예문) 위 + 이름/작가/가격 아래. 테두리 없이 깔끔. */
.font-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 12px 12px 14px; text-decoration: none; color: var(--ink);
}
/* 썸네일 = 부드러운 배경의 둥근 사각형에 폰트 예문을 크게 렌더 */
.font-card-thumb {
  position: relative;
  background: var(--cream); border-radius: 12px;
  min-height: 158px; aspect-ratio: 9 / 4; padding: 24px 20px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden;
  margin-bottom: 12px;
}
/* 대표(커버) 이미지 - 썸네일 박스를 꽉 채운다(9:4 비율 권장). */
.font-card-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* 커버가 있으면 예문(.stage-text)은 기본 숨김. '내 문장 미리보기' 입력 시(.previewing)
   커버를 숨기고 예문을 그 자리에 보여줘, 커버에 가려 안 보이던 문제를 없앤다. */
.font-card-thumb.has-cover .stage-text { display: none; }
.font-card.previewing .font-card-thumb.has-cover .font-card-cover { display: none; }
.font-card.previewing .font-card-thumb.has-cover .stage-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.font-card-thumb .stage-text {
  font-size: 32px; line-height: 1.35; color: var(--ink); word-break: keep-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.font-card-thumb-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 5px; }
/* 글자수 배지 - 작가명과 같은 줄 오른쪽. 글자수별로 색을 다르게. */
.charset-badge {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.charset-badge.cs-2780 { background: #ffe8cc; color: #e07b1a; }    /* 2,780자 - 주황 */
.charset-badge.cs-11172 { background: #f0e6ff; color: #7c3aed; }   /* 11,172자 - 보라 */
/* 현재 게시 버전 배지 - 상세 페이지와 동일한 정보를 카드에도 노출. */
.version-badge {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--cream, #f3efe7); color: var(--ink-soft, #6b7280);
}
/* 작가명 오른쪽 배지 묶음(굵기 + 글자수). */
.font-card-badges { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
/* 굵기 배지 - 글자 굵기를 배지 텍스트 두께로도 표현(가는/보통/굵은). */
.weight-badge {
  flex-shrink: 0;
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: #eef1f4; color: var(--ink-soft);
}
.weight-badge.wt-light { font-weight: 400; }
.weight-badge.wt-regular { font-weight: 600; }
.weight-badge.wt-bold { font-weight: 800; }
.font-card-body { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; }
/* 폰트명은 그 폰트 자체로 렌더(로드 전엔 기본 글꼴). */
.font-card-name {
  font-size: 27px; font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-synthesis: none;  /* 폰트 자체 굵기로만 렌더(합성 볼드 방지) */
}
.font-card-name-en {
  font-size: 18px; color: var(--ink-soft); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px;
  font-synthesis: none;
}
.font-card-topline {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 1px;
}
.font-card-designer { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px;
}
.font-card-price { font-size: 16px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.font-card-price.free { color: var(--badge-green); }
/* 오른쪽 지표 묶음: (무료) 다운로드 수 + 좋아요 수. */
.font-card-metrics { display: inline-flex; align-items: center; gap: 12px; }
.font-card-dl { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.font-card-dl svg { width: 16px; height: 16px; fill: none; stroke: #b5bac4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 좋아요 하트 - 기본은 빈 하트(회색), 누르면 빨간 하트로 채워짐. */
.font-card-like {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.font-card-like .heart { display: inline-flex; line-height: 0; transition: transform .12s ease; }
.font-card-like .heart svg { width: 17px; height: 17px; display: block; }
/* 기본은 회색 외곽선 하트, 누르면 빨간색으로 꽉 찬 하트. */
.font-card-like .heart svg path { fill: none; stroke: #b5bac4; stroke-width: 2; stroke-linejoin: round; transition: fill .12s ease, stroke .12s ease; }
/* 누르면(찜) 강조색으로 채워짐 - 장바구니 담김 색과 동일(var(--accent)). */
.font-card-like.liked .heart svg path { fill: var(--accent); stroke: var(--accent); }
/* 마우스 호버 시 강조색 외곽선으로 - 장바구니 아이콘 호버 색과 동일. */
.font-card-like:hover .heart svg path { stroke: var(--accent); }
.font-card-like:active .heart { transform: scale(1.2); }
/* 장바구니 담기 아이콘 - 하트 옆. 담기면 강조색으로 채워진다. */
.font-card-cart { display: inline-flex; align-items: center; cursor: pointer; color: var(--ink-soft);
  user-select: none; -webkit-tap-highlight-color: transparent; line-height: 0; }
.font-card-cart svg { width: 18px; height: 18px; display: block; stroke: #b5bac4; transition: stroke .12s ease, transform .12s ease; }
.font-card-cart:hover svg { stroke: var(--accent); }
.font-card-cart:active svg { transform: scale(1.15); }
.font-card-cart.added svg { stroke: var(--accent); }
.lic-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--badge-green); color: #fff;
}
.lic-badge.lic-badge-paid { background: rgba(255,255,255,0.92); color: var(--ink-soft); border: 1px solid var(--rule); }

.store-more-wrap { text-align: center; margin-top: 30px; }
.store-more {
  display: inline-block; padding: 12px 34px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--rule); color: var(--ink);
  text-decoration: none; font-size: 14px; font-weight: 600; cursor: pointer;
}
.store-more:hover { border-color: var(--accent); color: var(--accent); }
.store-empty { text-align: center; color: var(--ink-soft); font-size: 15px; padding: 60px 0; }

/* ---- 지원문자/글자수 작은 칩 ---- */
.support-chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--cream); color: var(--ink-soft); border: 1px solid var(--rule);
}

/* ---- 제작자 프로필 헤더 ---- */
.creator-profile-head {
  display: flex; gap: 22px; align-items: center; position: relative;
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 28px;
}
/* 작가 페이지 우측 상단 팔로우 버튼 */
.follow-btn-top { position: absolute; top: 20px; right: 20px; margin-top: 0; z-index: 1; }
@media (max-width: 520px) { .follow-btn-top { top: 14px; right: 14px; padding: 7px 14px; font-size: 13px; } }
.creator-avatar-lg { width: 76px; height: 76px; font-size: 34px; }
.creator-profile-info h1 { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.creator-profile-bio { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; line-height: 1.6; }
.creator-profile-stats { display: flex; gap: 20px; font-size: 14px; color: var(--ink-soft); }
.creator-profile-stats strong { color: var(--ink); font-size: 16px; font-weight: 800; }

/* ---- 상세페이지: 정보 블록 ---- */
.detail-block { margin-top: 32px; }
.detail-block-title {
  font-size: 17px; font-weight: 700; margin: 0 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}
.detail-compose { display: flex; gap: 12px; flex-wrap: wrap; }
.compose-item {
  flex: 1; min-width: 90px; text-align: center;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 10px;
}
.compose-item .compose-num { display: block; font-size: 20px; font-weight: 800; color: var(--accent); }
.compose-item .compose-lbl { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.compose-item.off .compose-num { color: var(--ink-soft); opacity: 0.5; }

/* 문자 구성 - '기타' 탭에서 추가한 커스텀 문자 표시 */
.detail-custom-chars { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.detail-custom-chars-label { font-size: 12.5px; color: var(--ink-soft); margin-right: 2px; }
.detail-custom-char {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 6px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--card);
  font-size: 16px; color: var(--ink);
}

.license-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.license-table td { padding: 11px 4px; border-bottom: 1px solid var(--rule); }
.license-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.license-table td.ok { color: var(--badge-green); }
.license-table td.cond { color: #d97706; }
.license-table td.no { color: var(--badge-red); }
.license-note { font-size: 12.5px; color: var(--ink-soft); margin: 12px 0 0; line-height: 1.6; }

/* 라이선스 요약 - 사용 가능 범위 / 제한 사항 두 그룹 */
.license-groups { display: grid; gap: 14px; }
@media (min-width: 640px) { .license-groups { grid-template-columns: 1fr 1fr; } }
.license-group { border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.license-allow { background: #f2faf4; border-color: #cfe9d7; }
.license-deny { background: #fdf4f3; border-color: #f2d5d2; }
.license-group-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.license-allow .license-group-head { color: var(--badge-green); }
.license-deny .license-group-head { color: var(--badge-red); }
.lg-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 1; color: #fff; flex: 0 0 auto; }
.license-allow .lg-icon { background: var(--badge-green); }
.license-deny .lg-icon { background: var(--badge-red); }
.license-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.license-list li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.6; color: var(--ink); }
.license-list li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); }
.license-list li b { font-weight: 700; margin-right: 3px; }

.detail-creator {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 18px;
}
.detail-creator:hover { border-color: var(--accent); }
.detail-creator-meta { display: flex; flex-direction: column; gap: 4px; }

/* ---- 상세페이지 ---- */
.store-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px;
  align-items: start;
}
.store-detail-head { margin-bottom: 18px; }
.store-detail-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.store-detail-seller { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.store-detail-seller:hover { color: var(--accent); }

/* 큰 인터랙티브 미리보기 스테이지 */
.preview-stage {
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 40px 32px; min-height: 160px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 44px; line-height: 1.4; color: var(--ink); word-break: keep-all;
  overflow-wrap: anywhere; margin-bottom: 14px;
}
.preview-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.preview-controls .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview-text-input {
  flex: 1; min-width: 200px;
  padding: 11px 16px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--card); color: var(--ink); font-size: 14px; font-family: inherit;
}
.preview-text-input:focus { border-color: var(--accent); outline: none; }
.preview-size {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-soft);
}
/* 상세 미리보기 크기 슬라이더 - 메인 페이지 슬라이더처럼 회색 테두리 트랙 제거 +
   손잡이 왼쪽 빨강 채움(WebKit은 JS가 배경 그라디언트로, Firefox는 moz-range-progress로). */
.preview-size input[type="range"] {
  flex: 1; min-width: 120px;
  -webkit-appearance: none; appearance: none;
  height: 4px; border: none; outline: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 34%, #d9dce1 34%, #d9dce1 100%);
  border-radius: 999px; cursor: pointer;
}
.preview-size input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
}
.preview-size input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer;
}
.preview-size input[type="range"]::-moz-range-track { height: 4px; background: #d9dce1; border-radius: 999px; border: none; }
.preview-size input[type="range"]::-moz-range-progress { height: 4px; background: var(--accent); border-radius: 999px; }
.weight-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.weight-tab {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
  background: var(--card); color: var(--ink-soft); border: 1px solid var(--rule);
}
.weight-tab:hover { border-color: var(--accent-light); color: var(--ink); }
.weight-tab.active { background: var(--ink); color: var(--card); border-color: var(--ink); font-weight: 600; }

/* 갤러리 */
.store-gallery-main {
  width: 100%; border-radius: 14px; margin-bottom: 10px; display: block;
  border: 1px solid var(--rule);
}
.store-gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.store-gallery-thumbs img {
  width: 62px; height: 62px; object-fit: cover; border-radius: 10px;
  border: 1.5px solid var(--rule); cursor: pointer;
}
.store-gallery-thumbs img:hover { border-color: var(--accent); }

.store-desc { font-size: 14.5px; line-height: 1.75; margin-bottom: 8px; }
.store-desc img { width: 100%; height: auto; display: block; border-radius: 10px; margin: 8px 0; }

/* 우측 스티키 구매 패널 */
.buy-panel {
  position: sticky; top: 24px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 22px; box-shadow: 0 6px 24px var(--shadow-color);
}
.buy-panel .price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule);
}
.buy-panel .price-row .amt { font-size: 24px; font-weight: 800; color: var(--accent); min-width: 0; }
.buy-panel .price-row .amt.free { color: var(--badge-green); }
.buy-panel .price-row .unit { font-size: 13px; color: var(--ink-soft); white-space: nowrap; flex-shrink: 0; }
/* 상세페이지 가격: 판매가(윗줄) + 할인가(아랫줄, 할인율 + 할인가격) */
.buy-panel .detail-price { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.buy-panel .detail-price-line { display: flex; align-items: baseline; gap: 8px; }
.buy-panel .detail-price-line + .detail-price-line { margin-top: 6px; }
.buy-panel .detail-price-label { min-width: 52px; flex-shrink: 0; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.buy-panel .detail-price-orig { font-size: 24px; font-weight: 800; color: var(--ink); }
.buy-panel .detail-price-orig.is-struck { font-size: 17px; font-weight: 500; color: var(--ink-soft); text-decoration: line-through; }
.buy-panel .detail-price-off { color: var(--accent); font-size: 24px; font-weight: 800; }
.buy-panel .detail-price-sale { font-size: 24px; font-weight: 800; color: var(--ink); }
.buy-panel .btn-block {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 13px; border-radius: 12px; font-size: 14.5px; font-weight: 700;
  cursor: pointer; border: none; margin-bottom: 10px; text-decoration: none;
}
.buy-panel .btn-primary { background: var(--accent); color: #fff; }
.buy-panel .btn-primary:hover { filter: brightness(0.95); }
.buy-panel .btn-ghost { background: var(--cream); color: var(--ink); border: 1px solid var(--rule); }
.buy-panel .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* 전역 버튼 - buy-panel 밖(비회원 주문조회/이메일조회/게스트 다운로드 등)에서도
   모글디 표준 빨간 버튼으로 통일. buy-panel 스코프 정의가 더 구체적이라 사이드바는 영향 없음. */
.btn-block {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; border: none; text-decoration: none; font-family: inherit;
  line-height: 1.2; transition: filter .12s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--cream); color: var(--ink); border: 1px solid var(--rule); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
/* 크게 - 결제하기(co-paybtn)와 동일한 존재감 */
.btn-lg { padding: 17px; border-radius: 14px; font-size: 17px; font-weight: 800; }
.buy-panel .panel-stats {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft);
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule);
}
.buy-panel .panel-note { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.buy-panel .support-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* 비회원 구매/받기 - 이메일 입력 폼(상세 구매패널 + 결제 페이지 공용) */
.guest-buy-form { display: flex; flex-direction: column; gap: 8px; }
.guest-email-input, .checkout-guest-email input {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1.4px solid var(--rule); border-radius: 10px; font-size: 15px; font-family: inherit;
}
.guest-email-input:focus, .checkout-guest-email input:focus { outline: none; border-color: var(--accent); }
.checkout-guest-email { display: block; margin-bottom: 12px; }
.checkout-guest-email span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.checkout-guest-email span em { font-style: normal; font-weight: 400; color: var(--ink-soft); }

@media (max-width: 820px) {
  .store-detail { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .preview-stage { font-size: 32px; padding: 28px 20px; }
  .store-hero h1 { font-size: 32px; }
}

/* 모바일 전용 상세 하단 고정 구매바 (데스크톱은 숨김) */
.detail-buybar { display: none; }
@media (max-width: 820px) {
  .detail-buybar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card); border-top: 1px solid var(--rule);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }
  .detail-buybar-price { font-size: 19px; font-weight: 800; color: var(--ink); white-space: nowrap; }
  .detail-buybar-price.free { color: var(--accent); }
  .detail-buybar > .btn-primary, .detail-buybar > form { flex: 1; }
  .detail-buybar .btn-primary {
    display: block; width: 100%; box-sizing: border-box; text-align: center; text-decoration: none;
    padding: 14px; border-radius: 12px; border: none; cursor: pointer;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 15.5px;
  }
  .detail-buybar-note { flex: 1; text-align: center; color: var(--ink-soft); font-size: 14px; }
  /* 하단바에 가리지 않도록 상세 페이지 본문 여백 확보 */
  .detail-page { padding-bottom: 80px; }
}

/* ---------- 폰트 만들기 상품 선택 페이지(/projects/new) ---------- */
.make-plans-head { margin: 8px auto 24px; max-width: 960px; text-align: center; }
.make-plans-head h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.make-plans-head p { color: var(--ink-soft); margin: 0; }

.make-plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 960px; margin: 0 auto; }
@media (max-width: 900px) { .make-plans-grid { grid-template-columns: 1fr; } }

.make-plan-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--rule, #e7e4de); border-radius: 16px;
  padding: 26px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform .12s, box-shadow .12s, border-color .12s;
  cursor: pointer;  /* 카드 전체를 눌러 상품 선택 */
}
.make-plan-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: var(--accent); }

/* 플랜 구분 아이콘 - 오리지널(펜)/베이직(3블록)/플러스(4블록) */
.make-plan-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.make-plan-icon svg { width: 26px; height: 26px; }
.mpi-orig { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.mpi-basic { background: rgba(59, 130, 246, 0.14); color: #2563eb; }
.mpi-plus { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
/* 플랜명 + 글자수 배지를 한 줄에 나란히 - 배지가 제목 오른쪽에 붙는다 */
.make-plan-namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.make-plan-name { font-size: 22px; font-weight: 800; margin: 0; color: var(--ink, #23201c); }
.make-plan-desc { color: var(--ink-soft, #8a857d); font-size: 14px; line-height: 1.6; margin: 0 0 18px; min-height: 44px; }
.make-plan-charset {
  background: #f2f0eb; color: var(--ink-soft, #8a857d);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.make-plan-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.make-plan-price { font-size: 26px; font-weight: 800; color: var(--ink, #23201c); }
.make-plan-price span { font-size: 14px; font-weight: 600; margin-left: 3px; color: var(--ink-soft); }
.make-plan-price .free { font-size: 20px; color: var(--accent); }
.make-plan-cta { border: none; background: none; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; padding: 6px 2px; white-space: nowrap; }
.make-plan-cta:hover { text-decoration: underline; }

.make-name-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.make-name-overlay.open { display: flex; }
.make-name-card { background: #fff; border-radius: 16px; padding: 30px 26px 26px; width: min(420px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,0.2); position: relative; }
.make-name-back { position: absolute; top: 16px; left: 16px; border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 13px; }
.make-name-card h2 { font-size: 17px; margin: 10px 0 16px; text-align: center; font-weight: 700; }
.make-name-card input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.4px solid var(--rule, #e7e4de); border-radius: 10px; font-size: 15px; }
.make-name-card input:focus { outline: none; border-color: var(--accent); }
#makeNameStatus { display: block; min-height: 18px; color: #c0392b; font-size: 13px; margin: 6px 2px; }
.make-name-card #makeNameStart { width: 100%; padding: 12px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px; }
.make-name-card #makeNameStart:disabled { opacity: .6; cursor: default; }
