/* TaxEasy 이용가이드 페이지 스타일 (/guide) */

.guide-page {
  position: relative;
  /* (2026-10-31 사용자 「좌우에 여백을 다 안 써서 맞물려」) 회색 배경 = 화면 전체 폭. 종전 max-width 1440 은 0.8 축소 때 화면 폭과
     같았는데, 1배율에선 양옆이 흰 띠로 남고 목차 카드가 회색 경계에 걸쳤다. 본문 폭은 .guide-content(1025)가 정한다. */
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 2rem 0.75rem 6rem;
  min-height: 100vh;
  background: #f8fafc;
  color: #1e293b;
  font-family: 'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Segoe UI', sans-serif; /* (2026-10-31) 랜딩 글꼴 — 종전 NanumSquare */
}

/* ========= 상단 공통 네비게이션 (다른 탭과 동일 스타일) ========= */
/* html zoom: 0.8 을 상쇄하기 위해 치수들을 1.25배로 직접 확대 */
.guide-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 25px;
  max-width: 1025px;
  width: 100%;
  margin: 36px auto 40px;
  padding: 0 30px;
  font-size: 17.5px;
  line-height: 1.4;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .guide-topnav {
    max-width: 820px;
    gap: 8px 20px;
    margin: 28px auto 32px;
    padding: 0 24px;
    font-size: 14px;
  }
}
@media (max-width: 640px) {
  .guide-topnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .guide-topnav::-webkit-scrollbar { display: none; }
}
.guide-topnav a {
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.guide-topnav a:hover {
  color: #0f172a;
}
.guide-topnav a[aria-current="page"] {
  color: #2563eb;
  font-weight: 700;
}

/* ========= 좌측 고정 TOC (본문과 분리되어 좌측에 고정) ========= */
.guide-toc {
  position: fixed;
  /* (2026-10-31 사용자 「왼쪽 카드가 겹쳐」) 1배율 전환(.legacy-zoom 해제) 뒤 화면 왼쪽 기준 배치가 본문(1025px)과 겹쳤다 →
     본문 왼쪽 끝에서 24px 띄워 붙인다(본문 절반 512.5 + 목차 220 + 간격 24). 자리가 없으면 아래 미디어에서 숨김. */
  left: calc(50vw - 809px); /* 본문 절반 565 + 목차 220 + 간격 24 */
  top: 8rem;
  width: 220px;
  padding: 1.5rem 1rem;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  max-height: calc(100vh - 10rem);
  overflow-y: auto;
  z-index: 1;
  /* (2026-10-31 사용자 「사이드 카드 클릭바가 움직여」) 줄높이 고정 — 종전 normal(글꼴 고유값)이라 대체 글꼴로 먼저
     그렸다가 Pretendard 가 오면 항목 높이 39→37px·목차 372→335px 로 줄며 파란 막대가 위로 움찔했다.
     1.2 = Pretendard normal(≈1.19)과 같은 모양. */
  line-height: 1.2;
}
/* 목차 왼쪽 끝 ≥ 16px 이 되는 폭 = 2 × (809 + 16) = 1650px — 그보다 좁으면 숨김(종전 1400 = 0.8 축소 기준) */
@media (max-width: 1649px) {
  .guide-toc { display: none; }
}

.guide-toc-title {
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  padding: 0 0.5rem;
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc-item {
  margin: 0;
}

.guide-toc-item a {
  display: block;
  /* 한 줄 고정 — 대체 글꼴(폭이 넓음)로 먼저 그릴 때 「1. 회원가입 + 세금 유형」이 두 줄이 됐다가 한 줄로 돌아오며
     아래 항목이 19px 움찔했다(2026-10-31). Pretendard 에선 전 항목 한 줄. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: calc(0.55rem - 1px) 0.75rem calc(0.55rem + 1px);
  color: #475569;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition:
    background 0.15s,
    color 0.15s;
}

.guide-toc-item a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.guide-toc-item.is-active a {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

/* ========= 본문 ========= */
.guide-content {
  /* (2026-10-31) 정적 안내 페이지 공통 폭 1130px(좌우 24px) — site-chrome.css --te-page 와 같은 값 */
  max-width: 1130px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .guide-content {
    max-width: 820px;
    padding: 0 24px;
  }
}
@media (max-width: 640px) {
  .guide-page { padding: 1.5rem 0 4rem; }
  .guide-content { padding: 0; }
  .guide-hero { border-radius: 0; padding: 2rem 1.5rem 1.75rem; margin-bottom: 1.5rem; }
}

/* Hero */
.guide-hero {
  position: relative;
  margin-bottom: 2.5rem;
  padding: 2.75rem 2rem 2.5rem;
  /* (2026-10-31) 랜딩 그라데이션(--lp-grad) — 종전 135deg #2563eb→#3b82f6 */
  background: linear-gradient(165deg, #3d5af6 0%, #4c46f1 48%, #6e54f5 100%);
  color: #ffffff;
  border-radius: 18px;
  overflow: hidden;
}

.guide-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 65%);
  pointer-events: none;
}

.guide-hero-eyebrow {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin: 0 0 1rem;
}

.guide-hero-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.guide-hero-description {
  font-size: 16px;
  opacity: 0.92;
  margin: 0 0 1.5rem;
  line-height: 1.6;
  white-space: nowrap;
}

.guide-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: calc(0.5rem - 1px) 0.9rem calc(0.5rem + 1px);
  background: #ffffff;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.guide-hero-back:hover {
  background: #eff6ff;
  color: #2563eb;
}

/* Section */
.guide-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  scroll-margin-top: 2rem;
}

.guide-section-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.guide-section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.guide-section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.3px;
  flex: 1 1 auto;
  min-width: 0;
}

.guide-section-subtitle {
  font-size: 15px;
  color: #475569;
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

.guide-section-duration {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #dbeafe;
  border-radius: 999px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.guide-section-body {
  font-size: 20px;
  line-height: 1.75;
  color: #334155;
}

.guide-placeholder {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

/* ========= 준비물 카드 그리드 ========= */
.guide-intro-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.guide-intro-card {
  padding: 1.25rem 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.guide-intro-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.guide-intro-icon {
  display: inline-block;
  font-size: 28px;
  margin-bottom: 0.5rem;
}

.guide-intro-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.4rem;
}

.guide-intro-card p {
  font-size: 15px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* ========= 번호 체크리스트 ========= */
.guide-checklist {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  border-radius: 0 10px 10px 0;
}

.guide-checklist-items {
  counter-reset: guide-step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-checklist-items > li {
  counter-increment: guide-step;
  position: relative;
  padding: 0.45rem 0 0.45rem 2.25rem;
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
}

.guide-checklist-items > li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: center;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  border-radius: 50%;
}

/* 체크리스트 아이템 내부의 하위 리스트 (공제 조정 예시 등) */
.guide-checklist-sublist {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

.guide-checklist-sublist li {
  padding: 0.2rem 0;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.65;
}

.guide-checklist-sublist li::marker {
  color: #94a3b8;
}

/* ========= 흔한 실수 박스 ========= */
.guide-mistakes {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.guide-mistakes-title {
  font-size: 16px;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 0.5rem;
}

.guide-mistakes-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-mistakes-items li {
  font-size: 16px;
  line-height: 1.65;
  color: #7f1d1d;
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
}

.guide-mistakes-items li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0.35rem;
  color: #dc2626;
  font-weight: 700;
}

.guide-mistakes-items li strong {
  color: #7f1d1d;
  font-weight: 700;
}

.guide-mistakes-fix {
  color: #991b1b;
}

/* ========= 서브섹션 (Step 내부 소제목) ========= */
.guide-subsection {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
}

.guide-subsection-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.guide-checklist + .guide-checklist {
  margin-top: 1rem;
}

/* ========= FAQ 아코디언 ========= */
.guide-faq {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.guide-faq-item {
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.guide-faq-item:first-child {
  border-top: 1px solid #e2e8f0;
}

.guide-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0.25rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.guide-faq-question:hover {
  background: #f8fafc;
}

.guide-faq-q-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  border-radius: 50%;
}

.guide-faq-q-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.5;
}

.guide-faq-toggle {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  color: #64748b;
  font-size: 20px;
  font-weight: 600;
}

.guide-faq-item.is-open .guide-faq-toggle {
  color: #2563eb;
}

.guide-faq-answer {
  padding: 0.25rem 0.25rem 1.25rem 3rem;
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
}

.guide-faq-answer p {
  margin: 0;
}

/* ========= 시퀀스 그리드 (여러 단계 스크린샷을 나란히) ========= */
.guide-sequence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.guide-sequence figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-sequence img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  display: block;
}

.guide-sequence figcaption {
  font-size: 18px;
  color: #94a3b8;
  text-align: center;
  font-weight: 500;
  line-height: 1.5;
  font-style: italic;
}

.guide-sequence figcaption strong,
.annotated-screenshot-caption strong {
  color: #2563eb;
  font-weight: 700;
  font-style: italic;
}

@media (max-width: 720px) {
  .guide-sequence {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ========= 이미지 라이트박스 (클릭 → 원본 보기) ========= */
.annotated-screenshot-img,
.guide-sequence figure img {
  cursor: zoom-in;
}

.guide-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
  animation: guide-lightbox-fade 120ms ease-out;
}

@keyframes guide-lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.guide-lightbox-img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.guide-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease;
}

.guide-lightbox-close:hover,
.guide-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

/* ========= AnnotatedScreenshot 컴포넌트 ========= */
.annotated-screenshot {
  margin: 1.5rem 0;
}

.annotated-screenshot-frame {
  position: relative;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.annotated-screenshot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

/* is-natural: 이미지 원본 비율 그대로 표시 (letterbox 방지) */
.annotated-screenshot-frame.is-natural {
  height: auto;
}
.annotated-screenshot-frame.is-natural .annotated-screenshot-img {
  height: auto;
  object-fit: unset;
}

.annotated-screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  font-style: italic;
  background: repeating-linear-gradient(
    45deg,
    #f8fafc 0 10px,
    #eef2f7 10px 20px
  );
}

.annotated-screenshot-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.annotation {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  --annot-color: #ef4444;
}

.annotation-badge {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--annot-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 2px 8px rgba(15, 23, 42, 0.25);
}

.annotation-label {
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--annot-color);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

/* 방향별 배치 — transform 기준점은 (x, y) 좌표 */
.annotation-dir-top {
  flex-direction: column-reverse;
  transform: translate(-50%, -100%);
}

.annotation-dir-bottom {
  flex-direction: column;
  transform: translate(-50%, 0);
}

.annotation-dir-left {
  flex-direction: row-reverse;
  transform: translate(-100%, -50%);
}

.annotation-dir-right {
  flex-direction: row;
  transform: translate(0, -50%);
}

.annotated-screenshot-caption {
  margin-top: 0.75rem;
  font-size: 18px;
  color: #94a3b8;
  text-align: center;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
}

/* ========= 반응형 (최소한만 — Phase 2에서 정식 대응) ========= */
@media (max-width: 900px) {
  .guide-page {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem 1rem 4rem;
  }

  .guide-toc {
    display: none;
  }

  .guide-hero {
    padding: 2rem 1.5rem;
  }

  .guide-hero-title {
    font-size: 22px;
  }

  .guide-hero-description {
    font-size: 14px;
    white-space: normal;
  }

  .guide-section {
    padding: 1.5rem 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .guide-section-title {
    font-size: 20px;
  }

  .guide-section-body {
    font-size: 14px;
  }

  .guide-subsection-title {
    font-size: 15px;
  }

  .guide-intro-card h4 {
    font-size: 14px;
  }

  .guide-intro-card p {
    font-size: 13px;
  }

  .guide-checklist-items > li {
    font-size: 14px;
  }

  .guide-checklist-sublist li {
    font-size: 12.5px;
  }

  .guide-mistakes-title {
    font-size: 15px;
  }

  .guide-mistakes-items li {
    font-size: 13.5px;
  }

  .annotated-screenshot-caption {
    font-size: 14px;
  }

  .guide-sequence figcaption {
    font-size: 14px;
  }
}

/* ========= 하단 시작 CTA (세무칼럼·FAQ와 동일 포맷) ========= */
/* 하단 시작 안내 = site-chrome.css .te-endcta (2026-10-31 카드 → 문구 + 우측 버튼 한 줄) */
