/* ============================================================
 * 가게온 (GageON) — Editorial Redesign
 * "동네 가게를 위한 잡지 한 권"
 * 종이 오프화이트 + 잉크 블랙 + 버밀리온 1색 · 그라디언트 없음
 * ============================================================ */

/* ---------- 0. 토큰 ---------- */

:root {
  /* 팔레트 */
  --paper:      #F7F4EE;   /* 종이 */
  --paper-lift: #FFFDF7;   /* 카드용 밝은 종이 */
  --ink:        #1A1917;   /* 잉크 */
  --ink-70:     rgba(26, 25, 23, .72);
  --ink-45:     rgba(26, 25, 23, .5);
  --ink-25:     rgba(26, 25, 23, .28);
  --ink-12:     rgba(26, 25, 23, .14);
  --accent:     #E4572E;   /* 버밀리온 */
  --accent-ink: #C43F1B;   /* 호버용 진한 버밀리온 */

  /* 타이포 */
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', Georgia, serif;
  --disp:  'Playfair Display', 'Noto Serif KR', Georgia, serif;
  --sans:  'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;

  /* 룰(괘선) */
  --hairline: 1px solid var(--ink);
  --hairline-soft: 1px solid var(--ink-25);

  /* 하드 섀도(잉크 오프셋) */
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);

  /* 간격 */
  --sec-pad: clamp(64px, 10vw, 128px);
}

/* ---------- 1. 리셋 · 베이스 ---------- */

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

html { scroll-behavior: smooth; }

.landing-sec, #hero { scroll-margin-top: 78px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; }

::selection { background: var(--accent); color: var(--paper); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: .85em;
  background: var(--paper-lift);
  border: var(--hairline-soft);
  padding: .08em .4em;
}

/* ---------- 2. 유틸리티 ---------- */

.hidden { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.no-scroll { overflow: hidden; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.wrap.narrow { max-width: 780px; }
.wrap.wide   { max-width: 1320px; }

.center { text-align: center; }

/* 이탤릭 세리프 액센트 */
.fx-it {
  font-family: var(--disp);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--accent);
  padding-right: .04em;
}

/* 형광펜(주홍 마커) 밑줄 — 그라디언트 없이 inset 섀도로 */
.hl { box-shadow: inset 0 -0.42em 0 rgba(228, 87, 46, .28); }

/* 각주 스타일 상태 메시지 */
.status {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 12px 0 0;
  padding-left: 14px;
  position: relative;
  color: var(--ink-70);
}
.status::before {
  content: '*';
  position: absolute;
  left: 0; top: 0;
  font-family: var(--disp);
  font-style: italic;
  color: var(--accent);
}
.status.error, .status.warn { color: var(--accent-ink); }
.status.info { color: var(--ink-70); }

.hint {
  font-size: 13px;
  color: var(--ink-70);
  line-height: 1.65;
}

.opt {
  font-family: var(--sans);
  font-weight: 400;
  font-size: .68em;
  letter-spacing: .02em;
  color: var(--ink-45);
}

.req { color: var(--accent); }

/* ---------- 3. 마이크로바 + 마스트헤드 ---------- */

.microbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px clamp(20px, 5vw, 48px);
  border-bottom: var(--hairline);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-70);
  background: var(--paper);
}
.microbar-r { color: var(--accent); }
@media (max-width: 560px) { .microbar-r { display: none; } }

.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: var(--hairline);
}

.masthead {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 64px;
}

.brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}
.brand span {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  margin-left: 1px;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  margin-left: auto;
}
.nav-links a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-70);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-cta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 9px 18px;
  transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

/* ---------- 4. 공용 버튼 ---------- */

.btn-primary, .btn-accent, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 11px 20px;
  border-radius: 0;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
}
.btn-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }

.btn-accent {
  background: var(--accent);
  color: var(--paper);
  border: 1.5px solid var(--accent);
}
.btn-accent:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:disabled, .btn-accent:disabled, .btn-ghost:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-xl {
  font-size: 17px;
  padding: 16px 34px;
  box-shadow: var(--shadow-hard);
}
.btn-xl:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn-xl:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- 5. 히어로 ---------- */

.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 88px);
}

.hero-wrap { text-align: center; }

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin: 0 0 26px;
  display: inline-block;
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  padding: 7px 18px;
}
.kicker i {
  font-family: var(--disp);
  font-style: italic;
  text-transform: none;
  letter-spacing: .04em;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(44px, 7.6vw, 84px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 auto 24px;
  max-width: 18em;
  word-break: keep-all;
}

.hero h1 .star {
  font-family: var(--disp);
  font-style: italic;
  color: var(--accent);
  font-size: .55em;
  vertical-align: super;
  margin-left: .08em;
}

.hero-sub {
  font-size: clamp(15px, 1.8vw, 17.5px);
  color: var(--ink-70);
  max-width: 620px;
  margin: 0 auto 44px;
  line-height: 1.8;
  word-break: keep-all;
}

/* --- 발행 신청 티켓(입력 카드) --- */

.prompt-shell {
  max-width: 720px;
  margin: 0 auto 26px;
}

.prompt-card {
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 18px clamp(16px, 3vw, 28px) 20px;
  text-align: left;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-45);
  border-bottom: 1px dashed var(--ink-25);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.ticket-head span:last-child { color: var(--accent); }

.prompt-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.prompt-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 12px 2px;
  transition: border-color .15s ease;
}
.prompt-row input::placeholder { color: var(--ink-45); }
.prompt-row input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.btn-gen {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 12px 22px;
  transition: background .15s ease, border-color .15s ease;
}
.btn-gen:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.btn-gen:disabled { opacity: .55; cursor: wait; }

@media (max-width: 560px) {
  .prompt-row { flex-direction: column; }
  .btn-gen { width: 100%; }
}

/* 수동 입력 폴백 */
.manual-wrap {
  margin-top: 16px;
  border-top: 1px dashed var(--ink-25);
  padding-top: 14px;
}
.manual-wrap input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 10px 2px;
}
.manual-wrap input:focus { outline: none; border-bottom-color: var(--accent); }
.manual-wrap .hint { margin: 10px 0 0; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 4px;
}

/* 고급 설정 (API 키) */
.adv {
  margin-top: 18px;
  border-top: 1px dashed var(--ink-25);
  padding-top: 12px;
}
.adv > summary {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-70);
  cursor: pointer;
  list-style: none;
}
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::before {
  content: '+';
  font-family: var(--disp);
  font-style: italic;
  color: var(--accent);
  margin-right: 8px;
}
.adv[open] > summary::before { content: '−'; }

.adv-body { padding: 14px 0 4px; }
.adv-body input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  padding: 10px 2px;
}
.adv-body input:focus { outline: none; border-bottom-color: var(--accent); }

.key-guide { margin-top: 12px; }
.key-guide > summary {
  font-size: 12.5px;
  color: var(--ink-70);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.key-guide ol {
  font-size: 13px;
  color: var(--ink-70);
  line-height: 1.8;
  padding-left: 20px;
  margin: 10px 0 0;
}
.key-guide a { color: var(--accent-ink); }

/* --- 업종 칩 (신문 태그) --- */

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
}

.chip {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 7px 14px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.chip:hover { transform: rotate(-.6deg) translateY(-1px); }
.chip.on {
  background: var(--ink);
  color: var(--paper);
}
.chip.on::before {
  content: '✶ ';
  color: var(--accent);
}

/* 편집 화면용 칩 (디자인 무드) — 좌측 정렬, 필드 리듬에 맞춤 */
.chips-edit {
  justify-content: flex-start;
  margin: 8px 0 6px;
}
.chips-edit + .hint { margin-top: 2px; }

/* 히어로 업종 칩 — "기관·기업 ▾" 확장 토글 */
.chip-more {
  border-style: dashed;
  color: var(--ink-70);
}
.chip-more.open,
.chip-more:hover { color: var(--ink); }
.chip-more.open { border-style: solid; }
.chip-ext { border-color: var(--ink-25); }
.chip-ext.on { border-color: var(--ink); }

.trust-line {
  font-size: 13px;
  color: var(--ink-70);
  margin: 0;
}

/* ---------- 6. 마퀴 스트립 ---------- */

.marquee {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  overflow: hidden;
  padding: 12px 0;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: mq-slide 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-seg {
  white-space: nowrap;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(13px, 1.9vw, 16px);
  letter-spacing: .02em;
  color: var(--ink);
}
@keyframes mq-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── 한국어 가독성 강화 (어절 단위 줄바꿈 · 넉넉한 행간/문단 간격 · 모바일 대응) ── */
body, p, li, dd, dt, blockquote, figcaption,
h1, h2, h3, h4, h5, h6,
.trust-line, .sec-sub, .sec-title, .lead, .desc {
  word-break: keep-all;
  overflow-wrap: break-word;
}
body { line-height: 1.75; }
p, li { line-height: 1.75; }
p { margin-bottom: 1em; }
h1, h2, h3, h4 { line-height: 1.28; }
@media (max-width: 520px) {
  body { line-height: 1.82; }
  p, li { line-height: 1.85; }
}
  to   { transform: translateX(-50%); }

/* ---------- 7. 랜딩 섹션 스캐폴딩 ---------- */

.landing-sec {
  border-top: var(--hairline);
  padding: var(--sec-pad) 0;
}
#how { border-top: 0; }   /* 마퀴가 이미 괘선 역할 */

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(52px, 9vw, 132px);
  align-items: start;
  margin-top: clamp(64px, 9vw, 130px);
  margin-bottom: clamp(36px, 6vw, 64px);
}

.sec-no {
  grid-row: 1 / span 3;
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: .9;
  color: var(--accent);
  border-bottom: 3px solid var(--ink);
  padding-bottom: 12px;
  padding-right: 0;
  min-width: clamp(100px, 13vw, 180px);
}

.sec-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin: 4px 0 10px;
}

.sec-title {
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  max-width: 16em;
  word-break: keep-all;
}

.sec-sub {
  grid-column: 2;
  font-size: 15.5px;
  color: var(--ink-70);
  max-width: 560px;
  margin: 16px 0 0;
  word-break: keep-all;
}

@media (max-width: 640px) {
  .sec-head { grid-template-columns: 1fr; }
  .sec-no { grid-row: auto; border-bottom: 0; padding-bottom: 0; padding-right: 0; margin-bottom: 22px; }
  .sec-sub { grid-column: 1; }
}

/* ---------- 8. 01 사용법 ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
}

.step-card {
  border-top: 3px solid var(--ink);
  padding-top: 20px;
  transition: transform .2s ease;
}
.step-card:hover { transform: rotate(-.5deg) translateY(-3px); }

/* 01/02/03 큰 번호 사이 세로 구분선 (데스크톱) */
@media (min-width: 801px) {
  .step-card + .step-card {
    border-left: 1px solid var(--ink-25);
    padding-left: clamp(20px, 3vw, 36px);
  }
}

.step-num {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 21px;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 14.5px;
  color: var(--ink-70);
  margin: 0;
  word-break: keep-all;
}

@media (max-width: 800px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* ---------- 9. 02 AI 편집부 ---------- */

.agents-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: var(--hairline);
  border-left: var(--hairline);
}

.agent-card {
  border-right: var(--hairline);
  border-bottom: var(--hairline);
  padding: clamp(18px, 2.4vw, 28px) clamp(14px, 2vw, 22px);
  background: var(--paper);
  transition: background .2s ease, transform .2s ease;
  margin: 0;
}
.agent-card:hover {
  background: var(--paper-lift);
  transform: rotate(.4deg);
}

.agent-idx {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.agent-card h3 {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 10px;
  word-break: keep-all;
}
.agent-card p {
  font-size: 13px;
  color: var(--ink-70);
  margin: 0;
  word-break: keep-all;
}

@media (max-width: 1000px) { .agents-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .agents-grid { grid-template-columns: 1fr; } }

/* ---------- 10. 03 업종별 템플릿 ---------- */

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}

.tpl-card { transition: transform .2s ease; }
.tpl-card:hover { transform: rotate(-.5deg) translateY(-3px); }

.tpl-card h3 {
  font-size: 18px;
  margin: 14px 0 4px;
}
.tpl-card p {
  font-size: 13.5px;
  color: var(--ink-70);
  margin: 0;
}

/* 업종별 잉크 컬러 */
.t-restaurant { --tpl: #7C4327; --tpl-bg: #F3E4D2; }
.t-cafe       { --tpl: #A0714A; --tpl-bg: #F2E9D8; }
.t-salon      { --tpl: #B0566D; --tpl-bg: #F6E4E8; }
.t-clinic     { --tpl: #2F6F9E; --tpl-bg: #E2ECF4; }
.t-fitness    { --tpl: #23221D; --tpl-bg: #E2E65C; }
.t-stay       { --tpl: #1E5C49; --tpl-bg: #E3EADD; }
.t-realestate { --tpl: #8C6D25; --tpl-bg: #EBE4D0; }
.t-auto       { --tpl: #C2410C; --tpl-bg: #F6DFD0; }
.t-academy    { --tpl: #1B2A52; --tpl-bg: #F7ECCB; }
.t-general    { --tpl: #3E4A8C; --tpl-bg: #E5E7F3; }

/* 신규 8업종 (기관 · 기업 · 공공) */
.t-church       { --tpl: #26407C; --tpl-bg: #F2ECDA; }
.t-company      { --tpl: #1F3A5F; --tpl-bg: #E3E9F0; }
.t-postoffice   { --tpl: #1E4C9A; --tpl-bg: #DFE9F8; }
.t-publicoffice { --tpl: #0B4FB3; --tpl-bg: #E4EEF9; }
.t-nonprofit    { --tpl: #2F7D4F; --tpl-bg: #E4EEDF; }
.t-welfare      { --tpl: #C05F17; --tpl-bg: #F8E7D2; }
.t-prolegal     { --tpl: #20406E; --tpl-bg: #DEE4EC; }
.t-construction { --tpl: #2E4A66; --tpl-bg: #F4E8C4; }

/* NEW 뱃지 — 신규 업종 카드 제목 옆 */
.tpl-new {
  display: inline-block;
  vertical-align: 3px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--paper);
  background: var(--accent);
  padding: 2px 7px;
  margin-left: 6px;
  transform: rotate(-2deg);
}

.mock {
  border: 1.5px solid var(--ink);
  background: var(--tpl-bg);
  box-shadow: var(--shadow-hard-sm);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mock-bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-lift);
}
.mock-bar i {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: transparent;
}
.mock-bar i:first-child { background: var(--accent); border-color: var(--accent); }

.mock-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
}
.mock-hero b { display: block; border-radius: 0; }
.mock-title { width: 62%; height: 13px; background: var(--tpl); }
.mock-line  { width: 84%; height: 6px;  background: var(--tpl); opacity: .45; }
.mock-btn   { width: 34%; height: 11px; background: var(--tpl); }

.mock-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--ink);
  background: var(--paper-lift);
}
.mock-cells i {
  height: 18px;
  background: var(--tpl);
  opacity: .3;
}

/* --- 10-0. 템플릿 카드 호버 라이브 프리뷰 (스펙 2차 #3) --- */
/* 마우스(hover 지원) 기기: 히어로 확대 · 미니 스크롤 · CTA shimmer */
.mock { position: relative; }
.mock-btn { position: relative; overflow: hidden; }
.mock-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, .9) 50%, transparent 82%);
  transform: translateX(-120%);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .mock-hero,
  .mock-title, .mock-line, .mock-btn,
  .mock-cells i {
    transition: transform .4s ease, opacity .4s ease, width .35s ease, height .35s ease;
  }
  /* 히어로 확대 + 미니 화면 스크롤(카메라 팬) */
  .tpl-card:hover .mock-hero,
  .tpl-card:focus-within .mock-hero {
    animation: mock-pan 2.6s ease-in-out infinite alternate;
  }
  .tpl-card:hover .mock-title,
  .tpl-card:focus-within .mock-title { width: 78%; height: 15px; }
  .tpl-card:hover .mock-line,
  .tpl-card:focus-within .mock-line { width: 92%; opacity: .62; }
  /* 아래 콘텐츠(셀)가 스크롤로 드러나듯 상승 · 스태거 */
  .tpl-card:hover .mock-cells i,
  .tpl-card:focus-within .mock-cells i { opacity: .82; transform: translateY(-3px); }
  .tpl-card:hover .mock-cells i:nth-child(2),
  .tpl-card:focus-within .mock-cells i:nth-child(2) { transition-delay: .06s; }
  .tpl-card:hover .mock-cells i:nth-child(3),
  .tpl-card:focus-within .mock-cells i:nth-child(3) { transition-delay: .12s; }
  /* CTA shimmer */
  .tpl-card:hover .mock-btn::after,
  .tpl-card:focus-within .mock-btn::after {
    animation: mock-shimmer 1.15s ease-in-out infinite;
  }
}
@keyframes mock-pan {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.05) translateY(-9%); }
}
@keyframes mock-shimmer {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* 터치 기기(hover 없음): 애니메이션 대신 힌트만 표시 */
@media (hover: none) {
  .mock::after {
    content: '탭하면 미리보기';
    position: absolute; right: 6px; bottom: 6px; z-index: 2;
    font-size: 9px; font-weight: 800; letter-spacing: .03em;
    background: var(--ink); color: var(--paper); padding: 3px 6px;
    pointer-events: none;
  }
}

@media (max-width: 900px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr; } }

/* --- 10-1. 템플릿 갤러리 툴바 (검색 · 필터 · 무드) --- */

.tpl-toolbar { margin-bottom: clamp(24px, 4vw, 36px); }

.tpl-search input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--ink);
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow-hard-sm);
  padding: 13px 16px 13px 42px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='5' fill='none' stroke='%231A1917' stroke-width='1.6'/%3E%3Cline x1='10.5' y1='10.5' x2='15' y2='15' stroke='%23E4572E' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.tpl-search input::placeholder { color: var(--ink-45); }
.tpl-search input:focus {
  outline: none;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
}
.tpl-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.tpl-toolbar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tpl-filter {
  justify-content: flex-start;
  margin: 0;
  flex: 1 1 auto;
}

/* 그룹 필터 바 — 업종 필터 위 1줄 (음식·카페 / 기관·단체 / 공공서비스 …) */
.tpl-group-filter {
  margin: 14px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--ink-25);
}
.tpl-group-filter .chip {
  font-size: 12px;
  padding: 6px 12px;
  border-style: dashed;
}
.tpl-group-filter .chip.on {
  border-style: solid;
  background: var(--ink);
  color: var(--paper);
}

.tpl-mood-toggle { flex-shrink: 0; background: var(--paper-lift); }
.tpl-mood-toggle button { padding: 8px 14px; }

/* ── 03 갤러리 정리정돈(무드 접기 · 카드 차분 · 목업 클릭) ── */
.moodgrp-toggle { margin-top: 10px; padding: 6px 13px; font-size: .82rem; font-weight: 600; color: #7a746a; background: var(--paper-lift); border: 1px solid var(--ink-25); border-radius: 999px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.moodgrp-toggle:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#tplMoodChips .moodgrp-more[hidden] { display: none; }
#tplMoodChips .moodgrp-more > .moodgrp:first-child { border-top: 1px solid var(--ink-25); }
/* 미리보기 버튼 → 조용한 텍스트 링크 */
.tpl-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tpl-actions .btn-ghost.tpl-btn { padding: 0; border: 0; background: none; color: #857f75; font-size: .82rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; border-radius: 0; }
.tpl-actions .btn-ghost.tpl-btn:hover { color: var(--ink); background: none; }
/* 태그 차분하게 */
.tpl-tags span { font-size: .72rem; opacity: .8; }
/* 목업 클릭 = 미리보기 */
.tpl-card .mock { cursor: zoom-in; }

/* ── 무드 칩 그룹형 정리 (26개 나열 → 카테고리별 알약) ── */
#tplMoodChips.tpl-mood-toggle,
#pvMoodChips.tpl-mood-toggle {
  display: block; border: 0; background: var(--paper-lift);
  padding: 6px 10px; border-radius: 10px;
}
#tplMoodChips .moodgrp,
#pvMoodChips .moodgrp { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
#tplMoodChips .moodgrp + .moodgrp,
#pvMoodChips .moodgrp + .moodgrp { border-top: 1px solid var(--ink-25); }
#tplMoodChips .moodgrp-label,
#pvMoodChips .moodgrp-label {
  flex: 0 0 auto; width: 78px; padding-top: 5px;
  font-size: 11px; font-weight: 800; color: var(--ink-70);
  letter-spacing: .01em; word-break: keep-all;
}
#tplMoodChips .moodgrp-chips,
#pvMoodChips .moodgrp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#tplMoodChips .moodgrp-chips button,
#pvMoodChips .moodgrp-chips button {
  border: 1px solid var(--ink-25); border-radius: 999px;
  background: var(--paper); padding: 6px 12px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  cursor: pointer; line-height: 1;
}
#tplMoodChips .moodgrp-chips button + button,
#pvMoodChips .moodgrp-chips button + button { border-left: 1px solid var(--ink-25); }
#tplMoodChips .moodgrp-chips button.on,
#pvMoodChips .moodgrp-chips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 640px) {
  #tplMoodChips .moodgrp, #pvMoodChips .moodgrp { flex-direction: column; align-items: stretch; gap: 5px; }
  #tplMoodChips .moodgrp-label, #pvMoodChips .moodgrp-label { width: auto; padding-top: 0; }
}

/* --- 10-2. 템플릿 카드: 태그 · 액션 · 필터 트랜지션 --- */

.tpl-card {
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, opacity .22s ease;
}
.tpl-card.leaving {
  opacity: 0;
  transform: scale(.97);
  pointer-events: none;
}

.tpl-card > p { margin-bottom: 10px; }

.tpl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.tpl-tags span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-70);
  border: 1px solid var(--ink-25);
  background: var(--paper-lift);
  padding: 3px 9px;
  white-space: nowrap;
}

.tpl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}
.tpl-actions .tpl-btn {
  font-size: 12.5px;
  padding: 9px 8px;
  white-space: nowrap;
}

#tplEmpty { margin-top: 18px; }

/* --- 10-3. 라이브 미리보기 모달 (전체화면) --- */

.tpl-modal {
  z-index: 95;
  padding: clamp(10px, 2vw, 24px);
  align-items: stretch;
  justify-content: center;
}

.tpl-modal-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
}

.tpl-modal-head {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 3vw, 28px);
  border-bottom: var(--hairline);
  background: var(--paper);
}

.tpl-modal-title-wrap { min-width: 0; }

.tpl-modal-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin: 0 0 2px;
}
.tpl-modal-kicker i {
  font-family: var(--disp);
  font-style: italic;
  text-transform: none;
  letter-spacing: .04em;
  color: var(--accent);
}

#tplModalTitle {
  font-size: clamp(18px, 2.6vw, 24px);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-modal-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.tpl-modal-tools .device-toggle { background: var(--paper-lift); }
.tpl-modal-tools .btn-accent {
  font-size: 13px;
  padding: 9px 16px;
}

.tpl-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  font-size: 20px;
  line-height: 1;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tpl-close:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.tpl-frame-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: clamp(10px, 2vw, 20px) clamp(12px, 2.5vw, 24px);
  background: var(--paper);
}
.tpl-frame-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: #fff;
  transition: max-width .25s ease;
  max-width: 100%;
}
.tpl-frame-shell.mobile iframe { max-width: 400px; }

.tpl-modal-note {
  font-size: 12px;
  color: var(--ink-45);
  margin: 0;
  padding: 8px clamp(16px, 3vw, 28px) 12px;
  border-top: 1px dashed var(--ink-25);
}
@media (max-height: 640px) { .tpl-modal-note { display: none; } }

/* --- 10-4. 사용 시나리오 마퀴 --- */

.stories-sec { padding-bottom: 0; }
.stories-sec .sec-head { margin-bottom: clamp(28px, 4vw, 44px); }

.stories-marquee {
  border-top: var(--hairline);
  overflow: hidden;
  padding: clamp(20px, 3vw, 30px) 0;
  background: var(--paper);
}

.stories-track {
  display: flex;
  width: max-content;
  animation: mq-slide 52s linear infinite;
}
.stories-marquee:hover .stories-track,
.stories-track:focus-within { animation-play-state: paused; }

.stories-seg {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0 8px;
}

.story-card {
  flex: 0 0 auto;
  width: min(78vw, 336px);
  border: 1.5px solid var(--ink);
  background: var(--paper-lift);
  box-shadow: var(--shadow-hard-sm);
  padding: 16px 18px 14px;
}
.story-card:nth-child(even) { transform: rotate(.4deg); }
.story-card:nth-child(3n)   { transform: rotate(-.4deg); }

.story-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--ink-25);
}
.story-card p:last-child {
  font-size: 13.5px;
  color: var(--ink-70);
  line-height: 1.7;
  margin: 0;
  word-break: keep-all;
}

/* --- 10-5. 모바일 sticky CTA --- */

.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: none;
  padding: 10px clamp(16px, 4vw, 24px) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: var(--hairline);
  transform: translateY(103%);
  transition: transform .25s ease;
}
.mobile-cta .btn-accent {
  width: 100%;
  font-size: 15px;
  padding: 13px 20px;
  box-shadow: var(--shadow-hard-sm);
}
.mobile-cta.show { transform: translateY(0); }

@media (max-width: 768px) {
  .mobile-cta { display: block; }
}

/* ---------- 11. 04 요금제 (명세서) ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 28px);
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  padding: clamp(22px, 3vw, 30px);
}

.price-card.featured { box-shadow: var(--shadow-hard); }

.price-tag {
  position: absolute;
  top: -13px;
  right: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  border: 1.5px solid var(--ink);
  padding: 3px 12px;
  transform: rotate(2deg);
}

.price-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: var(--hairline);
}

.price-val {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 6px;
}

.price-desc {
  font-size: 13.5px;
  color: var(--ink-70);
  margin-bottom: 18px;
}

.price-feats {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}
.price-feats li {
  font-size: 14px;
  padding: 9px 0 9px 22px;
  border-bottom: 1px dashed var(--ink-25);
  position: relative;
}
.price-feats li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price-cta { width: 100%; }

@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

.hint.center { margin-top: 28px; }

/* ---------- 12. 05 수익 모델 ---------- */

.earn-grid {
  display: grid;
  gap: 0;
  border-top: var(--hairline);
}

.earn-card {
  display: grid;
  grid-template-columns: minmax(72px, 140px) 1fr;
  gap: clamp(16px, 4vw, 48px);
  padding: clamp(24px, 4vw, 40px) 0;
  border-bottom: var(--hairline);
  align-items: start;
}

.earn-num {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .85;
  color: var(--accent);
}

.earn-body h3 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 8px; }
.earn-body p  { font-size: 15px; color: var(--ink-70); margin: 0; max-width: 640px; word-break: keep-all; }

/* ---------- 13. 06 FAQ ---------- */

.faq-list { border-top: var(--hairline); }

.faq-item { border-bottom: var(--hairline); }

.faq-item summary {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 19px);
  letter-spacing: -0.01em;
  padding: 20px 44px 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--disp);
  font-style: italic;
  font-size: 24px;
  color: var(--accent);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--accent-ink); }

.faq-item p {
  font-size: 14.5px;
  color: var(--ink-70);
  padding: 0 0 22px;
  margin: 0;
  max-width: 660px;
  word-break: keep-all;
}

/* ---------- 14. STEP 2: 편집 폼 ---------- */

#stepEdit { padding: clamp(40px, 6vw, 72px) 0 80px; }

.step-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--ink);
}
.step-head h2 {
  font-size: clamp(24px, 4vw, 34px);
  margin: 0;
  flex: 1;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.badge-api    { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.badge-manual { color: var(--ink); background: transparent; }

/* 브랜드 디자이너 결정 요약 칩 (pro 무드 · 생성 후 편집 화면에 표시) */
.brand-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  background: var(--paper-lift, #fff);
  font-size: 13px;
}
.brand-summary strong { font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.brand-summary .bs-swatches { display: inline-flex; gap: 4px; }
.brand-summary .bs-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--ink-25);
  display: inline-block;
}
.brand-summary .bs-words { color: var(--ink-70); font-weight: 600; }
.brand-summary .bs-reason {
  flex-basis: 100%;
  color: var(--ink-45);
  font-style: normal;
  font-size: 12px;
}

/* Run B — 접이식 AI 브랜드 무드보드 (기존 요약 칩의 확장 렌더) */
.brand-summary.bs-board { display: block; padding: 0; }
.bs-board summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.bs-board summary::-webkit-details-marker { display: none; }
.bs-board summary strong { font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.bs-mood-name { font-size: 13px; font-weight: 700; color: var(--ink-70); }
.bs-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #2E7D46;
  border: 1px solid #2E7D46;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.bs-caret { margin-left: auto; font-style: normal; color: var(--ink-45); transition: transform .18s ease; }
.bs-board details[open] .bs-caret { transform: rotate(180deg); }
.bs-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 20px;
  padding: 12px 16px 14px;
  border-top: 1px dashed var(--ink-25);
}
.bs-item { font-size: 12.5px; color: var(--ink-70); min-width: 0; }
.bs-item > b {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink-45);
  margin-bottom: 4px;
}
.bs-item-wide { grid-column: 1 / -1; }
.bs-swatch { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; }
.bs-swatch i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--ink-25);
  display: inline-block;
  flex-shrink: 0;
}
.bs-sw-role { font-size: 11px; font-weight: 600; }
.bs-swatch code { font-size: 11px; color: var(--ink-45); }
.bs-body .bs-reason { display: block; flex-basis: auto; }
.bs-mini-moods { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.bs-mini-moods button {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border: 1px solid var(--ink-25);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-70);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.bs-mini-moods button:hover { border-color: var(--ink); color: var(--ink); }
.bs-mini-moods button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bs-mini-hint { display: block; font-style: normal; font-size: 11px; color: var(--ink-45); margin-top: 6px; }
/* 미리보기 화면용 축소판 */
.brand-summary.bs-preview { margin: 0 0 14px; }
.bs-preview summary { padding: 9px 14px; }
.bs-preview .bs-body { padding: 10px 14px 12px; }

.panel {
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 24px;
}

.panel-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 17px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: var(--hairline);
}

.panel-no {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 16px;
}
.grid2:last-child { margin-bottom: 0; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }

.field { margin-bottom: 16px; }
.grid2 .field { margin-bottom: 0; }
.panel .field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 4px;
}

.field input,
.field textarea,
.field select,
.hour-row input,
.dyn-row input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink-25);
  border-radius: 0;
  padding: 9px 2px;
  transition: border-color .15s ease;
}

.field input::placeholder,
.field textarea::placeholder,
.hour-row input::placeholder,
.dyn-row input::placeholder { color: var(--ink-45); }

.field input:focus,
.field textarea:focus,
.field select:focus,
.hour-row input:focus,
.dyn-row input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field textarea {
  resize: vertical;
  border: 1.5px solid var(--ink-25);
  padding: 10px 12px;
  line-height: 1.7;
}
.field textarea:focus { border-color: var(--accent); }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231A1917'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 22px;
  cursor: pointer;
}

/* 영업시간 */
.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
@media (max-width: 620px) { .hours-grid { grid-template-columns: 1fr; } }

.hour-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hour-row span {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  width: 22px;
  flex-shrink: 0;
  color: var(--accent-ink);
}

/* 동적 행 (메뉴/사진) */
.dyn-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.dyn-row.menu-dyn .m-name  { flex: 1.2; }
.dyn-row.menu-dyn .m-price { flex: .7; }
.dyn-row.menu-dyn .m-desc  { flex: 1.4; }
.dyn-row.menu-dyn .m-group { flex: .7; }
.dyn-row.photo-dyn .p-url  { flex: 1; }
.dyn-row.faq-dyn .f-q      { flex: .9; }
.dyn-row.faq-dyn .f-a      { flex: 1.5; }

@media (max-width: 620px) {
  .dyn-row.menu-dyn,
  .dyn-row.faq-dyn { flex-wrap: wrap; }
  .dyn-row.menu-dyn .m-name,
  .dyn-row.menu-dyn .m-price,
  .dyn-row.menu-dyn .m-desc,
  .dyn-row.menu-dyn .m-group,
  .dyn-row.faq-dyn .f-q,
  .dyn-row.faq-dyn .f-a { flex: 1 1 100%; }
}

.row-x {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.row-x:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

#menuRows, #photoRows, #faqRows { margin-bottom: 14px; }

/* 가져온 리뷰 */
.review-chip {
  border: 1px solid var(--ink-25);
  border-left: 3px solid var(--accent);
  background: var(--paper);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.chip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.chip-head strong {
  font-family: var(--serif);
  font-size: 13.5px;
}
.chip-x {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-70);
  background: transparent;
  border: 1px solid var(--ink-25);
  border-radius: 0;
  padding: 2px 8px;
  transition: color .15s ease, border-color .15s ease;
}
.chip-x:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.review-chip p {
  font-size: 13.5px;
  color: var(--ink-70);
  margin: 0;
}

.actions {
  text-align: center;
  padding-top: 12px;
}

/* ---------- 15. STEP 3: 미리보기 ---------- */

#stepPreview { padding: clamp(28px, 4vw, 48px) 0 80px; }

.preview-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  padding: 12px 16px;
  margin-bottom: 22px;
}

.device-toggle {
  display: flex;
  border: 1.5px solid var(--ink);
}
.device-toggle button {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 8px 16px;
  background: transparent;
  color: var(--ink);
  border: 0;
  transition: background .15s ease, color .15s ease;
}
.device-toggle button + button { border-left: 1.5px solid var(--ink); }
.device-toggle button.on {
  background: var(--ink);
  color: var(--paper);
}

.preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.preview-actions .btn-ghost,
.preview-actions .btn-primary,
.preview-actions .btn-accent {
  font-size: 13px;
  padding: 9px 16px;
}

.preview-shell {
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: #fff;
  height: min(78vh, 900px);
}
.preview-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.preview-shell.mobile {
  max-width: 400px;
  margin-inline: auto;
}

/* ---------- 16. 모달 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(26, 25, 23, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 620px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  padding: clamp(22px, 3.5vw, 34px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-size: clamp(20px, 3vw, 26px);
  margin: 0;
}
.modal-head button {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  font-size: 20px;
  line-height: 1;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.modal-head button:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.modal-box h3 {
  font-size: 16.5px;
  margin: 22px 0 8px;
}
.modal-box ol {
  font-size: 14px;
  color: var(--ink-70);
  line-height: 1.85;
  padding-left: 20px;
  margin: 0 0 8px;
}
.modal-box a { color: var(--accent-ink); }

/* ---------- 17. AI 에이전트 오버레이 (목차) ---------- */

.agent-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.agent-box {
  width: 100%;
  max-width: 640px;
}

.agent-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.agent-headline {
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 26px;
}

.agent-progress {
  height: 3px;
  background: var(--ink-12);
  margin-bottom: 30px;
  overflow: hidden;
}
.agent-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width .5s ease;
}

.agent-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--hairline);
}

.agent-stage {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: var(--hairline-soft);
  opacity: .45;
  transition: opacity .3s ease;
}
.agent-stage.active, .agent-stage.done { opacity: 1; }
.agent-stage.skip { display: none; }

.a-ico {
  font-family: var(--disp);
  font-style: italic;
  font-weight: 700;
  font-size: 17px;
  color: var(--accent);
  line-height: 1.45;
  flex-shrink: 0;
}

.a-txt { min-width: 0; }
.a-txt strong {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.55;
}
.a-txt em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-70);
  margin-top: 2px;
}
.agent-stage.active .a-txt em { color: var(--accent-ink); }

.a-dots {
  flex: 1;
  border-bottom: 1.5px dotted var(--ink-25);
  margin-top: 1em;
  min-width: 24px;
}

.a-state {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 2;
  color: var(--ink-45);
}
.a-state::before { content: '대기'; }
.agent-stage.active .a-state { color: var(--accent); }
.agent-stage.active .a-state::before {
  content: '작업 중';
  animation: blink 1.1s step-end infinite;
}
.agent-stage.done .a-state { color: var(--ink); }
.agent-stage.done .a-state::before { content: '완료 ✓'; }

@keyframes blink { 50% { opacity: .35; } }

.agent-footnote {
  font-size: 12.5px;
  color: var(--ink-45);
  margin: 20px 0 0;
}

@media (max-width: 480px) {
  .a-dots { display: none; }
  .a-state { margin-left: auto; }
}

/* 조립 연출 무대 (스펙 2차 #2) — 카드 조각이 홈페이지로 합쳐지는 시각화 */
.agent-overlay { overflow-y: auto; }
.agent-box { max-height: 100%; }

.agent-assembly { margin: 0 0 26px; }
.asm-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  padding: 14px;
  border: 1.5px solid var(--ink);
  background: var(--paper-lift);
  box-shadow: var(--shadow-hard-sm);
  min-height: 150px;
  align-content: start;
}
.asm-piece {
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .25, 1);
}
/* 조각 배치 */
.asm-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.asm-header .asm-pin {
  width: 14px; height: 14px; border-radius: 50% 50% 50% 0;
  background: var(--accent); transform: rotate(-45deg); flex: none;
}
.asm-header b { display: block; height: 12px; width: 56%; background: var(--ink); }
.asm-photo { height: 58px; border-radius: 3px; background: linear-gradient(135deg, var(--accent), var(--accent-ink)); }
.asm-palette { display: flex; gap: 6px; align-items: center; }
.asm-palette i { width: 22px; height: 22px; border: 1px solid var(--ink); }
.asm-palette i:nth-child(1) { background: var(--accent); }
.asm-palette i:nth-child(2) { background: var(--ink); }
.asm-palette i:nth-child(3) { background: var(--paper); }
.asm-palette i:nth-child(4) { background: var(--accent-ink); }
.asm-lines { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.asm-lines u { height: 8px; background: var(--ink-25); }
.asm-lines u:nth-child(2) { width: 72%; }
.asm-keys { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; }
.asm-keys b {
  height: 18px; width: 46px; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.asm-sections { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.asm-sections s { height: 9px; background: var(--ink-12); border-left: 3px solid var(--accent); text-decoration: none; }
.asm-sections s:nth-child(2) { width: 84%; }
.asm-sections s:nth-child(3) { width: 66%; }
.asm-check {
  grid-column: 1 / -1;
  justify-self: center;
  font-size: 22px; font-weight: 900; color: #2E7D46;
  border: 2px solid #2E7D46; border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}

/* 오버레이 단계 클래스 누적 → 조각이 순서대로 조립됨 */
.agent-overlay.asm-collect .asm-piece[data-p="collect"],
.agent-overlay.asm-design  .asm-piece[data-p="design"],
.agent-overlay.asm-copy    .asm-piece[data-p="copy"],
.agent-overlay.asm-seo     .asm-piece[data-p="seo"],
.agent-overlay.asm-qa      .asm-piece[data-p="qa"] {
  opacity: 1;
  transform: none;
}

.asm-cap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 12px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.asm-cap span { color: var(--ink-25); transition: color .3s ease; }
.asm-cap i { color: var(--ink-12); font-style: normal; }
.agent-overlay.asm-collect .asm-cap span[data-p="collect"],
.agent-overlay.asm-design  .asm-cap span[data-p="design"],
.agent-overlay.asm-copy    .asm-cap span[data-p="copy"],
.agent-overlay.asm-seo     .asm-cap span[data-p="seo"],
.agent-overlay.asm-qa      .asm-cap span[data-p="qa"] { color: var(--accent-ink); }

@media (max-width: 480px) { .asm-photo { height: 46px; } .asm-frame { min-height: 132px; } }

@media (prefers-reduced-motion: reduce) {
  /* 연출 대신 단계 리스트로 폴백 */
  .agent-assembly { display: none; }
}

/* ---------- 18. 토스트 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 110;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 20px;
  max-width: min(90vw, 480px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 19. 푸터 (판권장) ---------- */

.site-footer {
  border-top: 3px double var(--ink);
  padding: 44px 0 52px;
}

.footer-in { text-align: center; }
.footer-in .brand {
  display: inline-block;
  font-size: 30px;
  margin-bottom: 12px;
}

.colophon {
  font-size: 13px;
  color: var(--ink-70);
  margin: 0 0 4px;
}
.colophon-fine {
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-45);
  margin: 0;
}

/* ---------- 20. 스크롤 리빌 · 모션 ---------- */

.sr {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.sr.vis {
  opacity: 1;
  transform: none;
}

/* ---------- 21. 스마트 검색 — 추천 라벨 칩 · 결과 없음 박스 ---------- */

.tpl-best-chip {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--ink);
  padding: 2px 8px;
  transform: rotate(-1.2deg);
  white-space: nowrap;
}

.tpl-empty {
  margin-top: 24px;
  border: 1.5px dashed var(--ink-25);
  background: var(--paper-lift);
  padding: clamp(28px, 5vw, 44px) 20px;
  text-align: center;
}
.tpl-empty-msg {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(17px, 2.4vw, 21px);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.tpl-empty-sub {
  font-size: 13.5px;
  color: var(--ink-70);
  margin: 0 0 18px;
  word-break: keep-all;
}

/* ---------- 22. 시안 이미지 저장 — 드롭다운 + 캡처용 제안 카드 ---------- */

.shot-wrap { position: relative; display: inline-block; }

.shot-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 230px;
  background: var(--paper-lift);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
}
.shot-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  background: transparent;
  border: 0;
  color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.shot-menu button + button { border-top: 1px dashed var(--ink-25); }
.shot-menu button:hover { background: var(--ink); color: var(--paper); }

/* 캡처용 제안 카드 — 화면 밖(1080×1350 고정). 에디토리얼이 아닌
 * 밝고 신뢰감 있는 제안서 무드(화이트 + 업종 액센트 1색, Pretendard). */
.shot-card {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1080px;
  height: 1350px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: linear-gradient(175deg, #FFFFFF 0%, #F4F7FB 100%);
  color: #1D2A3A;
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
  line-height: 1.5;
  word-break: keep-all;
  pointer-events: none;
}
.shot-card * { box-sizing: border-box; margin: 0; }

.shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 64px 0;
}
.shot-brand { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.shot-brand b { color: var(--shot-accent, #E4572E); }
.shot-cat {
  font-size: 23px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--shot-accent, #E4572E);
  border-radius: 999px;
  padding: 10px 28px;
  white-space: nowrap;
}

.shot-visual {
  height: 260px;
  margin: 28px 64px 0;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.shot-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-visual .shot-ph-label {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, .92);
  letter-spacing: .06em;
}

.shot-body { flex: 1; min-height: 0; padding: 34px 64px 0; }
.shot-greet {
  font-size: 34px;
  font-weight: 700;
  color: var(--shot-accent, #E4572E);
  margin-bottom: 10px;
}
.shot-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.shot-sub {
  font-size: 24px;
  line-height: 1.5;
  color: #55627A;
  margin-bottom: 22px;
}

/* Run B — 포함 기능 체크 목록 (실데이터 기반 · 2열) */
.shot-feats {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 26px;
}
.shot-feats li {
  font-size: 23px;
  font-weight: 600;
  color: #2A3648;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-feats li::before {
  content: '✓ ';
  font-weight: 800;
  color: var(--shot-accent, #E4572E);
}

.shot-prices { display: flex; gap: 22px; margin-bottom: 20px; }
.shot-price {
  flex: 1;
  border: 2px solid #E2E8F2;
  border-radius: 22px;
  background: #FFFFFF;
  padding: 22px 28px;
}
.shot-price.featured {
  border-color: var(--shot-accent, #E4572E);
  box-shadow: 0 14px 40px rgba(29, 42, 58, .10);
}
.shot-price span { display: block; font-size: 20px; font-weight: 700; color: #55627A; margin-bottom: 5px; }
.shot-price strong { display: block; font-size: 42px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 5px; }
.shot-price em { display: block; font-style: normal; font-size: 20px; color: #55627A; }

/* Run B — Before/After 핵심 문구 */
.shot-ba {
  font-size: 22px;
  line-height: 1.5;
  color: #55627A;
  border-left: 6px solid var(--shot-accent, #E4572E);
  padding-left: 16px;
  margin-bottom: 14px;
}

.shot-cta { font-size: 26px; font-weight: 700; color: #1D2A3A; }
.shot-cta::before { content: '→ '; color: var(--shot-accent, #E4572E); }

.shot-foot {
  flex-shrink: 0;
  margin: 22px 64px 0;
  border-top: 2px solid #E2E8F2;
  padding: 20px 0 38px;
  font-size: 22px;
  color: #8B96A8;
}

/* ---------- 23. QA 완성도 점수판 — 뱃지 · 원형 게이지 · 체크리스트 ---------- */

.qa-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  background: var(--paper-lift);
  color: var(--ink);
  border-radius: 0;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.qa-badge:hover { background: var(--ink); color: var(--paper); }
.qa-badge.qa-good { border-color: #2E7D46; color: #2E7D46; }
.qa-badge.qa-mid  { border-color: #C77700; color: #C77700; }
.qa-badge.qa-bad  { border-color: #C43F1B; color: #C43F1B; }
.qa-badge.qa-good:hover { background: #2E7D46; color: #fff; }
.qa-badge.qa-mid:hover  { background: #C77700; color: #fff; }
.qa-badge.qa-bad:hover  { background: #C43F1B; color: #fff; }

.qa-score-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
}

.qa-gauge {
  flex-shrink: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* conic-gradient는 JS에서 인라인으로 주입 (점수 → 각도) */
}
.qa-gauge-in {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.qa-gauge-in strong {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.qa-gauge-in span { font-size: 11px; color: var(--ink-45); margin-top: 4px; }

.qa-verdict { min-width: 0; }
.qa-verdict p { font-size: 13px; color: var(--ink-70); margin: 8px 0 0; word-break: keep-all; }
.qa-grade {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 12px;
  border: 1.5px solid currentColor;
}
.qa-grade.qa-good { color: #2E7D46; }
.qa-grade.qa-mid  { color: #C77700; }
.qa-grade.qa-bad  { color: #C43F1B; }

.qa-items, .qa-seo {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.qa-items li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--ink-25);
}
.qa-item-count {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--accent-ink);
}
.qa-items .qa-clear { color: #2E7D46; font-weight: 600; }

.qa-seo li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  padding: 7px 2px;
  border-bottom: 1px dashed var(--ink-25);
}
.qa-seo li i { font-style: normal; font-weight: 700; flex-shrink: 0; }
.qa-seo li.ok i { color: #2E7D46; }
.qa-seo li.no i { color: #C43F1B; }
.qa-seo li.no { color: var(--accent-ink); }
/* Run B — 미충족 항목의 "개선 추천" 다음 행동 안내 */
.qa-seo .qa-li-body { min-width: 0; }
.qa-seo .qa-tip {
  display: block;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-45);
  margin-top: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sr { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .agent-stage.active .a-state::before { animation: none; }
  .step-card:hover,
  .tpl-card:hover,
  .agent-card:hover,
  .chip:hover,
  .btn-xl:hover:not(:disabled) { transform: none; }
  /* 시나리오 마퀴 → 정적 그리드 폴백 */
  .stories-track { animation: none; width: auto; flex-wrap: wrap; }
  .stories-seg { flex-wrap: wrap; padding: 0 clamp(20px, 5vw, 48px); }
  .stories-seg[aria-hidden="true"] { display: none; }
  .story-card { transform: none; }
  .mobile-cta { transition: none; }
  .tpl-card.leaving { transition: none; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ---------- 24. Before/After 정보 정리 비교 (스펙 2차 #1) ---------- */

.ba-compare { margin: 0 0 16px; }
.bac-head { margin-bottom: 10px; }
.bac-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.bac-sub { font-size: 13px; color: var(--ink-70); margin-top: 4px; }
.bac-sub b { color: var(--ink); }
.bac-sub-m { display: none; }

.bac-stage {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard);
  background: var(--paper-lift);
  height: clamp(340px, 54vh, 560px);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.bac-pane { position: absolute; inset: 0; overflow: hidden; }
.bac-after { z-index: 1; }
.bac-before {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--bac, 50%)) 0 0);
  background: #ECE6D8;
}
.bac-divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--bac, 50%);
  width: 2px; margin-left: -1px;
  background: var(--ink);
  z-index: 3; pointer-events: none;
}
.bac-handle {
  position: absolute; top: 50%;
  left: var(--bac, 50%);
  z-index: 4;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; color: var(--ink);
  padding: 0;
}
.bac-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bac-grip { font-size: 18px; line-height: 1; pointer-events: none; }
.bac-badge {
  position: absolute; top: 12px; z-index: 3;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  padding: 5px 10px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.bac-badge-before { left: 12px; }
.bac-badge-after {
  right: 12px;
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* 정리 전 — 지도에 흩어진 정보 조각 */
.bac-before-in { position: relative; width: 100%; height: 100%; padding: 20px; }
.bac-mini-label {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: var(--ink-45);
  border-bottom: 1px dashed var(--ink-25);
  padding-bottom: 3px; margin-bottom: 14px;
}
.bac-scatter {
  display: flex; flex-wrap: wrap; gap: 12px 14px;
  align-content: flex-start;
}
.bac-frag {
  background: #FFF8EA;
  border: 1px solid var(--ink-25);
  box-shadow: 2px 3px 0 rgba(26, 25, 23, .10);
  padding: 9px 12px;
  font-size: 13px; line-height: 1.4;
  color: var(--ink);
  max-width: 90%;
  word-break: keep-all;
}
.bac-frag.frag-name { font-family: var(--serif); font-weight: 900; font-size: 16px; transform: rotate(-1.4deg); }
.bac-frag.frag-rev { font-style: italic; color: var(--ink-70); transform: rotate(1.2deg); max-width: 78%; }
.bac-frag.frag-a { transform: rotate(-0.8deg); }
.bac-frag.frag-b { transform: rotate(1.6deg); }
.bac-frag.frag-c { transform: rotate(-1.8deg); }
.bac-frag.frag-star { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }

/* 정리 후 — 정돈된 홈페이지 미니 */
.bac-after-in { display: flex; flex-direction: column; width: 100%; height: 100%; background: #fff; }
.bac-hp-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--ink-12); flex: none;
}
.bac-hp-nav b { font-family: var(--serif); font-weight: 900; font-size: 15px; }
.bac-hp-navcta { font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink); padding: 4px 10px; }
.bac-hp-hero {
  position: relative; flex: 1; min-height: 0;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
  padding: 18px;
}
.bac-hp-hero-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,25,23,.05), rgba(26,25,23,.62));
}
.bac-hp-hero-txt { position: relative; color: #fff; width: 100%; }
.bac-hp-pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.92); color: var(--ink);
  padding: 3px 9px; margin-bottom: 8px;
}
.bac-hp-hero-txt h3 { font-family: var(--serif); font-weight: 900; font-size: clamp(18px, 3vw, 24px); letter-spacing: -0.01em; line-height: 1.12; }
.bac-hp-tag { font-size: 13px; opacity: .92; margin-top: 5px; }
.bac-hp-cta { display: flex; gap: 8px; margin-top: 12px; }
.bac-hp-cta span {
  font-size: 12px; font-weight: 700; padding: 8px 14px;
}
.bac-hp-cta .c1 { background: var(--accent); color: #fff; }
.bac-hp-cta .c2 { background: rgba(255,255,255,.92); color: var(--ink); }
.bac-hp-rows { flex: none; }
.bac-hp-row {
  display: flex; gap: 10px; font-size: 12.5px;
  padding: 9px 16px; border-top: 1px solid var(--ink-12); color: var(--ink-70);
}
.bac-hp-row strong { color: var(--ink); font-weight: 700; flex: none; min-width: 40px; }

/* 모바일 폴백 — 슬라이더 대신 세로 비교 카드 */
@media (max-width: 700px) {
  .bac-sub-m { display: inline; }
  .bac-stage {
    height: auto;
    display: flex; flex-direction: column;
    overflow: visible;
    background: transparent; border: 0; box-shadow: none;
  }
  .bac-pane {
    position: static; inset: auto;
    border: 1.5px solid var(--ink);
    box-shadow: var(--shadow-hard-sm);
  }
  .bac-before { clip-path: none; order: 1; min-height: 220px; }
  .bac-after { order: 2; margin-top: 40px; height: 360px; }
  .bac-divider, .bac-handle { display: none; }
  .bac-badge { top: -1px; }
  .bac-badge-before { left: -1px; }
  .bac-badge-after { right: auto; left: -1px; top: auto; }
  /* AFTER 배지를 정리 후 카드 상단에 붙임 */
  .bac-stage .bac-badge-after {
    order: 2; position: relative; align-self: flex-start;
    margin: -1px 0 -39px 0; top: 0;
  }
}

/* 제안 카드용 미니 Before→After (시안 이미지에 활용) */
.shot-ba-compare {
  display: flex; align-items: stretch; gap: 16px;
  margin-bottom: 16px;
}
.shot-ba-cell {
  flex: 1; border: 2px solid #E2E8F2; border-radius: 18px;
  padding: 16px 18px; background: #fff;
}
.shot-ba-cell.after { border-color: var(--shot-accent, #E4572E); }
.shot-ba-tag { display: block; font-size: 17px; font-weight: 800; margin-bottom: 6px; color: #8B96A8; }
.shot-ba-cell.after .shot-ba-tag { color: var(--shot-accent, #E4572E); }
.shot-ba-cell em { font-style: normal; font-size: 20px; font-weight: 600; color: #2A3648; }
.shot-ba-arrow { align-self: center; font-size: 34px; font-weight: 800; color: var(--shot-accent, #E4572E); flex: none; }

@media (prefers-reduced-motion: reduce) {
  .bac-handle { transition: none; }
}

/* ---------- 25. 12무드 카드 선택 UI (무드 엔진 고도화) ---------- */

.mood-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 4px 0 14px;
}
.mood-filter button {
  font-size: 12.5px; font-weight: 700;
  padding: 7px 14px;
  border: 1.5px solid var(--ink-25);
  background: var(--paper-lift); color: var(--ink-70);
  cursor: pointer; transition: all .15s ease;
}
.mood-filter button:hover { border-color: var(--ink); color: var(--ink); }
.mood-filter button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.mood-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 12px;
}
.mood-card {
  display: flex; flex-direction: column; gap: 8px;
  text-align: left; cursor: pointer;
  padding: 12px; background: var(--paper-lift);
  border: 1.5px solid var(--ink-25);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mood-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.mood-card[aria-checked="true"] {
  border-color: var(--accent); border-width: 2px;
  box-shadow: var(--shadow-hard-sm);
}
.mood-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mc-badges { display: flex; align-items: center; gap: 6px; }
.mc-tier {
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 2px 7px; border: 1px solid currentColor;
}
.mc-tier.tier-free { color: #2E7D46; }
.mc-tier.tier-pro { color: #1D4ED8; }
.mc-tier.tier-premium { color: #C77700; }
.mc-reco {
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 2px 7px; margin-left: auto;
  background: var(--accent); color: #fff;
}

/* 팔레트 기반 미니 미리보기 (무드 색으로 렌더 — iframe 없이 경량) */
.mc-preview {
  height: 86px; border: 1px solid var(--ink-12); overflow: hidden;
  position: relative; display: block;
  background: var(--mp-bg, #fff);
}
.mc-pv-nav { height: 14px; background: var(--mp-surface, #fff); border-bottom: 1px solid rgba(0,0,0,.08); }
.mc-pv-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.mc-pv-title { height: 9px; width: 66%; background: var(--mp-text, #222); border-radius: 2px; }
.mc-pv-line { height: 5px; width: 84%; background: var(--mp-muted, #999); border-radius: 2px; opacity: .6; }
.mc-pv-row { display: flex; gap: 5px; margin-top: 2px; }
.mc-pv-btn { height: 12px; width: 44px; background: var(--mp-primary, #333); border-radius: var(--mp-r, 3px); }
.mc-pv-card { height: 12px; flex: 1; background: var(--mp-surface, #eee); border: 1px solid rgba(0,0,0,.08); border-radius: var(--mp-r, 3px); }
.mc-pv-swatches { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 3px; }
.mc-pv-swatches i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); }

.mc-name { font-family: var(--serif); font-weight: 900; font-size: 14.5px; letter-spacing: -0.01em; }
.mc-desc { font-size: 11.5px; color: var(--ink-70); line-height: 1.4; }
.mc-inds { font-size: 10.5px; color: var(--ink-45); font-weight: 600; }

.mood-cards-empty { font-size: 13px; color: var(--ink-45); padding: 10px 2px; }

/* 선택 무드 라이브 미리보기 */
.mood-preview-wrap { margin-top: 16px; border: 1.5px solid var(--ink); box-shadow: var(--shadow-hard-sm); background: var(--paper-lift); }
.mood-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--ink-12); }
.mood-preview-head strong { font-size: 13px; }
.mood-preview-close { font-size: 12px; padding: 5px 10px; }
.mood-preview-shell { height: min(60vh, 520px); background: #fff; }
.mood-preview-shell iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 560px) {
  .mood-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .mood-card:hover { transform: none; }
}

/* 갤러리·모달 무드 토글 12무드 — 래핑 칩으로 표시 */
#tplMoodChips, #pvMoodChips { flex-wrap: wrap; gap: 4px; }
#tplMoodChips button, #pvMoodChips button { font-size: 11.5px; padding: 6px 10px; }

/* 프리미엄 무드 잠금 안내 배너 (미리보기 화면) */
.mood-lock-banner {
  margin: 0 0 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.4;
  border-radius: 10px;
}
.nowrap { white-space: nowrap; }

/* ============================================================
 * 크레딧 시스템 (credit.js 주입 UI)
 * ============================================================ */
.credit-chip {
  font: 700 13px/1 var(--sans);
  padding: 8px 14px;
  border: 1px solid var(--ink-25);
  border-radius: 999px;
  background: var(--paper-lift);
  color: var(--ink);
  cursor: pointer;
  margin-right: 10px;
  transition: border-color .15s, background .15s;
}
.credit-chip:hover { border-color: var(--ink); }
.credit-chip.on {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: #FFF3ED;
}

.cd-box { max-width: 420px; }
.cd-p { font-size: 14px; line-height: 1.65; color: var(--ink-70); margin: 0 0 14px; }
.cd-w { width: 100%; margin-top: 10px; }
.cd-me {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink-70); margin-bottom: 4px;
}
.cd-logout {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--ink-45); text-decoration: underline;
}
.cd-balance { font-size: 15px; margin: 0 0 12px; }
.cd-balance b { font-size: 26px; color: var(--accent-ink); font-family: var(--disp); }
.cd-pkgs { display: grid; gap: 8px; margin: 10px 0 6px; }
.cd-pkg {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--ink-25); border-radius: 12px;
  background: var(--paper-lift); cursor: pointer; text-align: left;
  font: 500 14px/1.3 var(--sans); color: var(--ink);
  transition: border-color .15s, transform .1s;
}
.cd-pkg:hover { border-color: var(--accent); transform: translateY(-1px); }
.cd-pkg b { font-weight: 700; }
.cd-pkg span { color: var(--ink-45); font-size: 12px; }
.cd-pkg em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--accent-ink); }
.cd-liveurl {
  padding: 12px; background: #FFF3ED; border: 1px dashed var(--accent);
  border-radius: 10px; word-break: break-all; font-weight: 700;
}
.cd-liveurl a { color: var(--accent-ink); }
#creditModal input, #publishModal input {
  width: 100%; padding: 11px 12px; font: 500 15px/1.2 var(--sans);
  border: 1px solid var(--ink-25); border-radius: 10px; background: #fff;
}

/* 요금제 2트랙 라벨 · 월 단위 표기 */
.price-track {
  font: 700 15px/1.4 var(--sans);
  margin: 34px 0 14px;
  padding-top: 18px;
  border-top: var(--hairline-soft);
}
.price-track:first-of-type { border-top: none; padding-top: 0; }
.price-per {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-45);
  margin-left: 2px;
}
