@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@500;700&family=Noto+Sans+KR:wght@400;500;700&display=swap");

* { box-sizing: border-box; }

:root {
    --background: #F8F4EF;
    --foreground: #27211B;
    --card: #FDFAF6;
    --border: #E4DCCB;
    --accent-blue: #6B7A9E;
    --accent-blue-soft: rgba(107,122,158,.09);
    --text-secondary: rgba(39,33,27,.6);
    --text-tertiary: rgba(39,33,27,.45);
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;
}

/* 공통 헤더/푸터(fragments/layout)를 함께 쓰므로 body는 세로로 쌓이게 두고,
   가운데 정렬과 여백은 아래 #guide-root가 담당한다.
   (body를 flex로 만들면 헤더/푸터가 본문과 가로로 나란히 놓인다.) */
body {
    margin: 0;
    /* 사이트 공용 헤더(commonIncludes, .site-header)가 position:fixed 74px라서
       buddhism.css와 동일하게 그만큼 밀어준다. */
    padding-top: 74px;
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    background: var(--background);
    color: var(--foreground);
}

/* PC 웹 기준. 사이트 본문 컨테이너 폭(예: max-width 1200px)에 맞춰
   아래 max-width만 조정하면 됨. */
#guide-root {
    max-width: 700px;
    margin: 56px auto 100px;
    padding: 0 24px;
}

.guide-header {
    text-align: center;
    margin-bottom: 56px;
}
.guide-header .kicker {
    font-family: "Noto Serif KR", serif;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 10px;
}
.guide-header h1 {
    font-family: "Noto Serif KR", serif;
    font-size: 32px;
    margin: 0 0 14px;
}
.guide-header p {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0;
}

/* ---------- 세로 타임라인(여정) ---------- */
#category-list {
    position: relative;
    padding-left: 60px;
    counter-reset: step;
}
/* 뱃지들을 잇는 세로선 */
#category-list::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 6px;
    bottom: 44px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-blue) 0%, var(--border) 85%);
    opacity: .35;
}

.category-card {
    position: relative;
    counter-increment: step;
    padding: 0 0 44px;
}
.category-card:last-child { padding-bottom: 0; }

/* 단계 뱃지(자동 번호) — 로드맵 페이지의 스텝 마커와 같은 언어 */
.category-card h2::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: -60px;
    top: -3px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--card);
    border: 1.5px solid var(--accent-blue);
    color: var(--accent-blue);
    font-family: "Noto Serif KR", serif;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px var(--background);
}

.category-card h2 {
    font-family: "Noto Serif KR", serif;
    font-size: 19px;
    margin: 2px 0 14px;
}
/* 예전 버전 호환용(제목 안에 <span class="cat-letter">가 남아있어도
   자동 번호 뱃지랑 중복 표시되지 않도록 숨김) */
.category-card h2 .cat-letter { display: none; }

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.item-list li {
    border-bottom: 1px solid var(--border);
}
.item-list li:last-child { border-bottom: none; }

.item-action {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    border-radius: 6px;
    text-align: left;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--foreground);
    padding: 13px 8px;
    margin: 0 -8px;
    cursor: pointer;
    transition: background .12s;
}
.item-action:not(.no-reason):hover { background: var(--accent-blue-soft); }
.item-action.no-reason { cursor: default; }
.item-action .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-tertiary); flex: none;
}
.item-action .caret {
    margin-left: auto;
    font-size: 20px;
    color: var(--text-tertiary);
    transition: transform .15s;
    flex: none;
}
.item-action[aria-expanded="true"] .caret { transform: rotate(90deg); color: var(--accent-blue); }
.item-action.no-reason .caret { visibility: hidden; }

.item-reason {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .18s ease;
}
.item-reason.open { grid-template-rows: 1fr; }
.item-reason-inner { overflow: hidden; }
.item-reason p {
    margin: 2px 0 14px;
    padding: 12px 14px;
    background: var(--accent-blue-soft);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* 2026-09-02: "메인으로 돌아가기"를 맨 위 대신 여기로 옮김 — "시뮬레이션 하러가기"
   버튼 옆에 나란히 두 개의 선택지로 보여주는 구성(슌 요청). */
.sim-cta {
    margin-top: 20px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sim-cta a {
    display: inline-block;
    min-width: 190px;
    padding: 13px 30px;
    border-radius: var(--radius-md);
    text-decoration: none;
    text-align: center;
    font-size: 14.5px;
    font-weight: 700;
    transition: opacity .15s, background .15s;
}
.sim-cta .btn-primary {
    background: var(--accent-blue);
    color: #fff;
}
.sim-cta .btn-primary:hover { opacity: .88; }
.sim-cta .btn-secondary {
    background: transparent;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
    padding: 11.5px 28.5px; /* border 두께만큼 안쪽 보정, btn-primary와 높이 맞춤 */
}
.sim-cta .btn-secondary:hover { background: var(--accent-blue-soft); }