/*
 * 안내 페이지 공용 스타일 — 사용 가이드 · 가이드 글 · 소개 · 개인정보처리방침 · 이용약관 · 문의.
 * 편집기 첫 화면(shell.css)과 같은 모양입니다: 따뜻한 회백색 바탕, 흰 맨 위 줄과 포메 로고,
 * 흰 카드(둥근 모서리 · 옅은 테두리), 청록 단추, 굵은 큰 제목, Pretendard.
 * 색 값은 theme.css(밝은 · 어두운 · 눈 편한 화면)가 들고 있습니다.
 */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg); color: var(--text);
  font: 17px/1.75 'Pretendard', 'Noto Sans KR', -apple-system, 'Segoe UI', 'Malgun Gothic', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; }

/* ── 맨 위 줄 ─────────────────────────────────────────── */
.pm-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  min-height: 60px; padding: 0 24px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.pm-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; }
.pm-logo svg { flex: none; }
.pm-brand { display: inline-flex; align-items: baseline; gap: 8px; font-size: 18px; }
.pm-brand b { font-weight: 800; }
.pm-brand__d { color: #3a3d44; }
.pm-brand__r { color: #d6372b; }
.pm-brand__en { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
:root[data-theme='dark'] .pm-brand__d { color: #d5d8de; }
:root[data-theme='dark'] .pm-brand__r { color: #ff6a5c; }
.pm-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.pm-nav a {
  padding: 8px 12px; border-radius: 9px;
  color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.pm-nav a:hover { background: var(--hover); color: var(--text); }
.pm-nav a[aria-current='page'] { color: var(--accent); background: var(--sel); }
.pm-tools { display: flex; align-items: center; gap: 8px; }
.pm-top .gtheme { white-space: nowrap; }

/* ── 단추 ─────────────────────────────────────────────── */
.pm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.pm-btn:hover { background: var(--sel); }
.pm-btn--pri { background: var(--accent); color: #fff; }
.pm-btn--pri:hover { background: var(--accent); filter: brightness(1.08); }
:root[data-theme='dark'] .pm-btn--pri { color: #0b1214; }

/* ── 본문 틀 ──────────────────────────────────────────── */
.pm-main { max-width: 880px; margin: 0 auto; padding: 44px 24px 72px; }
.pm-main--wide { max-width: 1180px; }
.pm-crumb { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.pm-crumb a { color: var(--muted); text-decoration: none; }
.pm-crumb a:hover { color: var(--accent); text-decoration: underline; }
.pm-eyebrow { display: inline-block; margin-bottom: 8px; color: var(--accent); font-size: 14px; font-weight: 700; }
h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 800; }
.pm-lead { margin: 0 0 30px; color: var(--muted); font-size: 18px; }
h2 { margin: 52px 0 14px; font-size: 25px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 800; }
h3 { margin: 30px 0 10px; font-size: 19px; line-height: 1.4; font-weight: 700; }
p { margin: 10px 0; }
ul, ol { margin: 10px 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }
li::marker { color: var(--muted); }
hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }
code {
  padding: 1px 7px; border-radius: 6px; background: var(--inset); border: 1px solid var(--line);
  font: 0.86em 'Cascadia Code', Consolas, monospace;
}
.pm-muted { color: var(--muted); }
.pm-small { font-size: 14px; color: var(--muted); }

/* 화면 단추 이름 — 편집기의 단추처럼 보이게 */
.ui {
  display: inline-block; padding: 0 9px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: var(--panel-2);
  font-size: 0.86em; font-weight: 700; line-height: 1.75; white-space: nowrap; color: var(--text);
}
.ui--pri { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme='dark'] .ui--pri { color: #0b1214; }

/* ── 카드 ─────────────────────────────────────────────── */
.pm-card {
  margin: 16px 0; padding: 22px 24px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
}
.pm-card > :first-child { margin-top: 0; }
.pm-card > :last-child { margin-bottom: 0; }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 18px 0; }
.pm-grid .pm-card { margin: 0; }
a.pm-card { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, translate 0.15s; }
a.pm-card:hover { border-color: var(--accent); box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.35); translate: 0 -2px; }
a.pm-card b { display: block; margin-bottom: 6px; font-size: 18px; color: var(--text); }
a.pm-card span { display: block; color: var(--muted); font-size: 15px; line-height: 1.6; }
a.pm-card em { display: inline-block; margin-top: 12px; color: var(--accent); font-size: 14px; font-weight: 700; font-style: normal; }

/* ── 알림 상자 ────────────────────────────────────────── */
.pm-note, .pm-warn, .pm-ok {
  margin: 16px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid transparent;
}
.pm-note { background: var(--sel); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.pm-warn { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.pm-ok { background: color-mix(in srgb, #2f6b4f 12%, var(--panel-2)); border-color: color-mix(in srgb, #2f6b4f 30%, transparent); }
.pm-note > :first-child, .pm-warn > :first-child, .pm-ok > :first-child { margin-top: 0; }
.pm-note > :last-child, .pm-warn > :last-child, .pm-ok > :last-child { margin-bottom: 0; }
.pm-note b:first-child, .pm-warn b:first-child, .pm-ok b:first-child { display: block; margin-bottom: 2px; }

/* ── 단계 목록 ────────────────────────────────────────── */
.pm-steps { counter-reset: step; list-style: none; margin: 18px 0; padding: 0; }
.pm-steps > li { position: relative; margin: 0 0 14px; padding: 2px 0 2px 46px; counter-increment: step; }
.pm-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 800;
}
:root[data-theme='dark'] .pm-steps > li::before { color: #0b1214; }

/* 편집기 단계 표시(1 시작 · 2 내용 채우기 …) */
.pm-stage { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.pm-stage span {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700;
}
.pm-stage i {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent); font-style: normal; font-size: 14px;
}

/* ── 표 ───────────────────────────────────────────────── */
.pm-table-wrap { margin: 16px 0 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--inset); font-size: 14px; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ── 그림 ─────────────────────────────────────────────── */
.pm-shot { margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.pm-shot img { display: block; width: 100%; height: auto; }

/* ── 가이드 목차(넓은 화면에서 왼쪽에 고정) ───────────── */
.pm-doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; max-width: 1180px; margin: 0 auto; padding: 44px 24px 72px; }
.pm-toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 15px; }
.pm-toc b { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.pm-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.pm-toc li { margin: 0; counter-increment: toc; }
.pm-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; line-height: 1.45; }
.pm-toc a::before { content: counter(toc) '. '; color: var(--muted); }
.pm-toc a:hover { background: var(--hover); }
.pm-toc a.is-on { background: var(--sel); color: var(--accent); font-weight: 700; }
.pm-doc .pm-main { max-width: none; margin: 0; padding: 0; }
@media (max-width: 980px) {
  .pm-doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .pm-toc { position: static; max-height: none; margin-bottom: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
}

/* ── 아래 줄 ──────────────────────────────────────────── */
.pm-foot { border-top: 1px solid var(--line); }
.pm-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; max-width: 1180px; margin: 0 auto; padding: 26px 24px 40px; font-size: 14px; color: var(--muted); }
.pm-foot__in nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pm-foot__in a { color: var(--muted); }
.pm-foot__in a[aria-current='page'] { color: var(--text); font-weight: 700; text-decoration: none; }
.pm-foot__in span:last-child { margin-left: auto; }

/* ── 좁은 화면 ────────────────────────────────────────── */
@media (max-width: 820px) {
  .pm-top { flex-wrap: wrap; gap: 6px 10px; padding: 8px 16px; }
  .pm-nav { order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
  .pm-nav::-webkit-scrollbar { display: none; }
  .pm-tools { margin-left: auto; }
  .pm-brand__en { display: none; }
  .pm-top .gtheme__label { display: none; }
  .pm-main { padding: 30px 16px 56px; }
  .pm-doc { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; margin-top: 40px; }
  .pm-lead { font-size: 16.5px; }
  .pm-foot__in span:last-child { margin-left: 0; }
}
@media (max-width: 420px) {
  .pm-tools .pm-btn { padding: 0 12px; min-height: 38px; font-size: 14px; }
}
.pm-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .pm-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pm-grid--4 { grid-template-columns: minmax(0, 1fr); } }
.pm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .pm-grid--2 { grid-template-columns: minmax(0, 1fr); } }

/*
 * 목차 접기 — 휴대폰에서는 처음에 접어 둡니다(theme.js). 목차 14줄이 화면 하나를 차지해 제목과 본문이
 * 첫 화면 아래로 밀렸습니다(꽃집 점검, 2026-11-13). 넓은 화면에서는 늘 펼친 채 제목만 보입니다.
 */
.pm-toc summary { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--muted); list-style: none; cursor: default; }
.pm-toc summary::-webkit-details-marker { display: none; }
@media (max-width: 980px) {
  .pm-toc { padding: 0; }
  .pm-toc summary { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 14px 18px; font-size: 16px; color: var(--text); cursor: pointer; }
  .pm-toc summary::after { content: '펼치기 ▾'; font-size: 14px; color: var(--accent); }
  .pm-toc[open] summary::after { content: '접기 ▴'; }
  .pm-toc ol { padding: 0 10px 12px; }
}
