/* =========================================================
   howto.css — 하는 방법(가이드) 페이지
   기본 규칙 · 배틀 규칙 · 점수 계산 · 등급
   ========================================================= */

.guide {
    width: 100%;
    max-width: 640px;
    height: 100%;
    margin: 0 auto;
    padding: 0 6px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-padding-top: 58px;
}

/* 섹션 이동(스티키) */
.guide__nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 10px 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-empty-border);
}
.guide__nav a {
    flex: 1 1 0;
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--color-absent);
    text-decoration: none;
    background: var(--color-key-bg);
}
.guide__nav a:active { filter: brightness(0.95); }

/* 섹션 */
.guide__sec { margin-top: 22px; }
.guide__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 800;
}
.guide__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-correct);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.guide__card {
    border: 1px solid var(--color-empty-border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}
.guide__card p { margin: 8px 0; font-size: 14.5px; line-height: 1.6; }
.guide__card p:first-child { margin-top: 0; }

.guide__ex { margin-top: 12px; }
.guide__hr { border: none; border-top: 1px solid var(--color-empty-border); margin: 14px 0; }
.guide__hint {
    margin: 12px 0 0 !important;
    font-size: 13px !important;
    color: var(--color-absent);
    line-height: 1.6;
}

/* 배지 예시 태그 */
.guide__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.guide__tag {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-key-bg);
    color: var(--color-text);
}

/* 목록 */
.guide__list { margin: 4px 0 0; padding-left: 2px; list-style: none; }
.guide__list li {
    position: relative;
    padding: 7px 0 7px 4px;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px dashed var(--color-empty-border);
}
.guide__list li:last-child { border-bottom: none; }
.guide__list--tight li { border-bottom: none; padding: 4px 0; color: var(--color-text); }

.g-hl { padding: 1px 7px; border-radius: 6px; color: #fff; font-weight: 800; }
.g-hl--same { background: var(--color-correct); }
.g-hl--diff { background: color-mix(in srgb, var(--color-present) 82%, #000); }

/* 점수 계산 표 */
.score-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 11px 2px;
    border-bottom: 1px solid var(--color-empty-border);
    font-size: 14px;
    line-height: 1.55;
}
.score-row:last-of-type { border-bottom: none; }
.score-row--head {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-absent);
    padding-top: 0;
}
.score-mode { font-weight: 800; }
.score-row .plus { color: var(--color-correct); }
.score-row .minus { color: #d0021b; }

/* 등급 사다리 */
.tier-ladder { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.tier-ladder__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--color-empty-border);
}
.tier-ladder__row:last-child { border-bottom: none; }
.tier-ladder__name { font-weight: 800; font-size: 14px; }
.tier-ladder__min {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-absent);
    font-variant-numeric: tabular-nums;
}

/* 시즌 초기화 안내 박스 */
.guide__season {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-correct) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--color-correct) 35%, #fff);
}
.guide__season > b { font-size: 14px; font-weight: 800; color: color-mix(in srgb, var(--color-correct) 78%, #000); }
.guide__season p { margin: 6px 0 0 !important; font-size: 13.5px; line-height: 1.55; }
.guide__season-ex { font-weight: 700; }

/* CTA */
.guide__cta {
    display: block;
    margin: 26px auto 0;
    max-width: 320px;
    padding: 15px;
    border-radius: 10px;
    background: var(--color-correct);
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}
.guide__cta:active { filter: brightness(0.95); }
