/* [가칭] 1분질문집 — 모바일 우선 · WCAG AA 대비 · 터치 44px · 입력 16px */
:root {
  --ink: #16191f;
  --ink-2: #3f4655;
  --muted: #545c6b;
  --line: #d5dae3;
  --bg: #ffffff;
  --soft: #f3f5f9;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e3f3f0;
  --brand-dark: #115e59;
  --ok: #0b6b3a;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 18px rgba(16, 24, 40, 0.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 4.5vw, 1.75rem); }
h3, .h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted, .hint, .fine { color: var(--muted); }
.fine { font-size: 0.9rem; }
.mt { margin-top: 16px; }
.sr { position: absolute !important; width: 1px; height: 1px; min-width: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* 머리·바닥 */
.site-head { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; min-height: 44px; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 16px; }
.logo small { font-weight: 600; color: var(--muted); font-size: 0.78rem; }
.head-nav { display: flex; gap: 2px; }
.head-nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-radius: 10px; }
.head-nav a:hover { background: var(--soft); }
.head-nav a.cta { background: var(--brand); color: #fff; }
.site-foot { border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0 40px; margin-top: 48px; font-size: 0.9rem; color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; }
.site-foot nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px; color: var(--ink-2); }
.site-foot p { margin: 0 0 4px; }

/* 버튼·입력 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--brand);
  background: #fff; color: var(--brand-dark); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--brand-soft); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 1.08rem; padding: 12px 22px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
label { font-weight: 700; }
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1.5px solid #8a93a3; border-radius: 12px; padding: 11px 12px; width: 100%; min-height: 48px;
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: 3px solid rgba(15, 118, 110, 0.25); outline-offset: 0; }
.field { margin: 14px 0; }
.field label { display: block; margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin: 12px 0; min-height: 44px; }
.check input { width: 24px; height: 24px; min-height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.err { color: var(--bad); font-size: 0.92rem; margin: 6px 0 0; font-weight: 600; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.chip { position: relative; font-weight: 600; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.chip input:focus-visible + span { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* 섹션 */
.hero { padding: 36px 0 28px; background: linear-gradient(180deg, #d8f0eb 0%, #fff 100%); }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 640px; }
.eyebrow { display: inline-block; font-weight: 800; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; font-size: 0.9rem; }
.section { padding: 36px 0; }
.section.alt { background: var(--soft); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.steps { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; counter-increment: s; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-right: 8px; }
.steps b { font-size: 1.05rem; }
.steps p { margin: 6px 0 0; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.badges li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }

/* 입력 */
.src { min-height: 220px; font-family: inherit; }
.counter { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.usage { font-weight: 700; color: var(--ink-2); }
.mb { margin-bottom: 12px; }
code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: 0.92em; }
.notice { border-radius: 12px; padding: 12px 14px; background: #eef8f1; color: var(--ok); font-weight: 600; margin: 12px 0 0; }
.notice.bad { background: #fdecea; color: var(--bad); }
.notice a { color: inherit; }
.narrow-panel { max-width: 760px; }

/* 원클릭 체험 */
.demo-src { background: var(--soft); border-left: 4px solid var(--brand); border-radius: 10px; margin: 12px 0; color: var(--ink-2); }
.demo-src summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); min-height: 48px; display: flex; align-items: center; padding: 0 14px; }
.demo-src pre { margin: 0; padding: 0 14px 12px; white-space: pre-wrap; font: inherit; font-size: 0.92rem; max-height: 320px; overflow: auto; }

/* 결과 */
.result { margin-top: 18px; }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.engine { font-size: 0.86rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--brand-soft); color: var(--brand-dark); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.tabs [role='tab'] { min-height: 46px; font-size: 0.92rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 8px; }
.tabs [role='tab'][aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.format-hint { font-size: 0.92rem; margin: 0 0 6px; }
.out { font-size: 16px; min-height: 200px; background: #fbfcfe; white-space: pre-wrap; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

/* 요금 */
.pricing { display: grid; gap: 12px; }
.plan { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 16px; display: flex; flex-direction: column; }
.plan.pick { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-size: 1.6rem; font-weight: 800; margin: 0 0 8px; }
.price small { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.plan ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); flex: 1; }
.plan li { margin: 4px 0; }
.badge { font-size: 0.8rem; font-weight: 800; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 9px; }
.soon { display: inline-block; font-size: 0.78rem; font-weight: 800; background: #fff4d6; color: #6b4700; border: 1px solid #e9c46a; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

/* 동의 */
.consent { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--soft); font-size: 0.92rem; }
.consent dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 12px; }
.consent dt { font-weight: 800; color: var(--ink); }
.consent dd { margin: 0 0 8px; color: var(--ink-2); }
.consent .overseas { margin: 4px 0 0; color: var(--ink-2); font-weight: 600; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 14px; min-height: 48px; display: flex; align-items: center; }
.faq details p { padding: 0 14px 12px; margin: 0; color: var(--ink-2); }

/* 문서 (약관·방침) */
.doc { padding-top: 24px; }
.doc h2 { font-size: 1.15rem; margin-top: 1.6em; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.92rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); }
.doc ul, .doc ol { padding-left: 20px; }

.toast { position: fixed; left: 12px; right: 12px; bottom: 16px; margin: 0 auto; max-width: 480px; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 600; box-shadow: var(--shadow); z-index: 30; }

@media (min-width: 720px) {
  .wrap { padding: 0 24px; }
  .hero { padding: 56px 0 40px; }
  .section { padding: 52px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .pricing { grid-template-columns: repeat(3, 1fr); }
  .result-actions { grid-template-columns: repeat(2, minmax(0, 220px)); }
  .consent dl { grid-template-columns: 7em 1fr; }
  .consent dd { margin-bottom: 4px; }
  .panel { padding: 24px; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
}
@media (max-width: 359px) {
  .head-nav a { padding: 0 6px; font-size: 0.92rem; }
  .logo small { display: none; }
  .wrap { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── 1분질문집 전용 ── */
.h4 { font-size: 1rem; margin: 18px 0 8px; }
.btn.sm { min-height: 44px; padding: 6px 12px; font-size: 0.92rem; }
.btn.danger { border-color: #b3261e; color: #b3261e; }
.btn.danger:hover { background: #fdecea; }
.btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }
.btn.kakao:hover { background: #f5dc00; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.btn-grid.one { grid-template-columns: 1fr; }
.demo-grid { display: grid; gap: 16px; }
input[readonly] { background: var(--soft); font-weight: 700; }

/* 체험 샘플 고르기 */
.sample-grid { display: grid; gap: 10px; }
.sample-btn {
  display: flex; align-items: center; gap: 12px; min-height: 64px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.sample-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.sample-btn[aria-pressed='true'] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.sample-emoji { font-size: 1.6rem; line-height: 1; flex: none; }
.chip-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.phone { border-top: 6px solid var(--brand); }

/* 질문집 (손님 화면) */
.faq-head { margin-bottom: 10px; }
.faq-title { font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 800; margin: 0 0 4px; }
.faq-intro { color: var(--ink-2); margin: 0; }
.search-box { position: sticky; top: 60px; z-index: 5; background: var(--bg); padding: 8px 0; }
.phone .search-box { position: static; background: transparent; }
.faq-search { border: 2px solid var(--brand); border-radius: 999px; padding-left: 18px; min-height: 52px; font-weight: 600; }
.faq-search::placeholder { color: #5b6472; font-weight: 500; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.cat-tab { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.cat-tab[aria-pressed='true'] { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.faq-count { font-weight: 700; color: var(--muted); margin: 6px 0 8px; font-size: 0.95rem; }
.faq-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.faq-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.faq-card[open] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.faq-card summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 12px 40px 12px 14px; min-height: 48px; position: relative; }
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::after { content: '+'; position: absolute; right: 14px; top: 10px; font-size: 1.4rem; font-weight: 700; color: var(--brand-dark); }
.faq-card[open] summary::after { content: '−'; }
.faq-cat { font-size: 0.82rem; font-weight: 800; color: var(--brand-dark); }
.faq-q { font-weight: 800; }
.faq-a { padding: 0 14px 12px; }
.answer { white-space: pre-wrap; color: var(--ink); margin: 0 0 8px; }
.helpful-n { font-size: 0.9rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.faq-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.helpful-btn[aria-pressed='true'] { background: var(--brand-soft); }
.faq-empty { border: 1.5px dashed #8a93a3; border-radius: 12px; padding: 14px; text-align: center; margin-top: 8px; }
.faq-empty-title { font-weight: 800; margin: 0 0 4px; }
.faq-empty .fine { margin: 0; }
.contact-box { margin-top: 18px; background: var(--brand-soft); border-radius: var(--radius); padding: 16px; }
.contact-title { font-size: 1.12rem; margin: 0 0 4px; }
.contact-box .fine { color: var(--ink-2); margin: 0 0 6px; }

/* 사장님 순위 · 집계 */
.owner-card { border: 2px solid var(--ink); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 10px; }
.seg-btn { min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2); font: inherit; font-weight: 700; cursor: pointer; }
.seg-btn[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rank-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.rank-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.rank-no { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-weight: 800; font-size: 0.9rem; }
.rank-body { min-width: 0; }
.rank-q { font-weight: 700; margin: 0; }
.rank-meta { font-size: 0.88rem; color: var(--ink-2); margin: 0; }
.admin { border: 2px solid var(--ink); margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 8px; }
.stats div { background: var(--soft); border-radius: 10px; padding: 8px; text-align: center; }
.stats dt { font-size: 0.82rem; font-weight: 700; color: var(--ink-2); }
.stats dd { margin: 0; font-size: 1.25rem; font-weight: 900; }
.manage-box { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }

/* 만들기 */
.two-col { display: grid; gap: 0 16px; }
.cats { border: 0; padding: 0; margin: 14px 0; }
.cats legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.cat-inputs { display: grid; grid-template-columns: 1fr; gap: 8px; }
.cards-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-top: 20px; }
.cards-head h2 { margin: 0; }
.usage { margin: 0; font-size: 0.92rem; }
.usage.warn { color: var(--bad); }
.card-edits { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.card-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--soft); display: grid; gap: 8px; }
.card-edit-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.card-no { font-weight: 900; color: var(--brand-dark); min-width: 2.2em; }
.card-edit .err { margin: 0; }
.board-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.board-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.board-item-title { font-weight: 700; }
#sample-fill { margin-bottom: 4px; }

@media (min-width: 720px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .cat-inputs { grid-template-columns: repeat(3, 1fr); }
  .sample-grid { grid-template-columns: repeat(3, 1fr); }
  .demo-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .stats { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 359px) {
  .faq-actions { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* 관리 화면처럼 <main class="wrap section"> 일 때 .section 이 .wrap 좌우 여백을 지우지 않게 */
main.wrap.section { padding: 28px 16px 36px; }
@media (min-width: 720px) { main.wrap.section { padding: 44px 24px 52px; } }
@media (max-width: 359px) { main.wrap.section { padding-left: 12px; padding-right: 12px; } }
.btn.stack { flex-direction: column; gap: 0; line-height: 1.3; }
.btn-sub { display: block; font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 359px) { .contact-box .btn-grid { grid-template-columns: 1fr; } }
