/* ==========================================================
   도구 페이지 공통 모양 (2026-11-15)
   - 홈 위젯을 "크게 보기"로 연 따로 페이지 (예: units.html 단위 환산)
   - blog.css(위 막대·맨 아래) 다음에 읽어요.
   - 색: 홈 단위 환산 칸과 같은 에메랄드 + 샴페인 골드 + 아이보리
   - 다음 도구 페이지도 이 파일을 같이 쓰면 돼요 (body class="blog-page tool-page")
   ========================================================== */

body.tool-page {
    --tp-emerald: #10372f;
    --tp-emerald2: #1b5245;
    --tp-emerald3: #286654;
    --tp-gold: #d8c08a;
    --tp-gold-deep: #a8874b;
    --tp-ivory: #f7f1e1;
    --tp-ink: #22302b;
    --tp-mute: #6f6a5c;
    background: #faf6ee;
    color: var(--tp-ink);
}

/* 위 막대: 에메랄드 */
.tool-page .bp-top { background: linear-gradient(180deg, var(--tp-emerald2), var(--tp-emerald)); box-shadow: 0 2px 10px rgba(16, 55, 47, 0.3); }
.tool-page .bp-brand { color: #f3e3b8; }
.tool-page .bp-brand small { color: var(--tp-gold); }
.tool-page .bp-home { border-color: rgba(216, 192, 138, 0.55); color: #f3ead4; }
.tool-page .bp-home:hover { background: rgba(216, 192, 138, 0.22); }

.tool-page .bp-top-in { max-width: 920px; }
.tool-page .bp-brand { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tp-main { max-width: 920px; margin: 0 auto; padding: 26px 16px 50px; }

/* ---------- 도구 탭 (2026-11-15): 도구 페이지 사이를 오가는 알약 버튼 ---------- */
.tp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tp-tabs a {
    padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid #ddd2b8;
    background: #fff;
    color: #3f4f48;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.tp-tabs a:hover { background: #f3eedf; }
.tp-tabs a.on { background: var(--tp-emerald2); border-color: var(--tp-emerald2); color: #f6ecd2; pointer-events: none; }

/* ---------- 머리말 ---------- */
.tp-head { margin-bottom: 18px; }
.tp-kicker {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e6efe9;
    color: var(--tp-emerald2);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.tp-head h1 { margin: 0 0 6px; font-size: 1.75rem; letter-spacing: 0.02em; color: var(--tp-emerald); }
.tp-head p { margin: 0; color: var(--tp-mute); line-height: 1.7; word-break: keep-all; }

/* ---------- 도구 + 표 (PC는 나란히, 폰은 위아래) ---------- */
.tp-tool {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 26px;
}

/* 큰 단위 환산 칸 (units.js가 같은 id로 움직여요) */
.tp-conv {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 20px 16px;
    border-radius: 16px;
    background:
        radial-gradient(120% 70% at 100% 0%, rgba(216, 192, 138, 0.2), transparent 60%),
        linear-gradient(160deg, var(--tp-emerald) 0%, var(--tp-emerald2) 58%, var(--tp-emerald3) 100%);
    border: 1px solid #0d2f28;
    box-shadow: inset 0 0 0 1px rgba(216, 192, 138, 0.25), 0 8px 24px rgba(16, 55, 47, 0.18);
    color: #f3ead4;
}
.tp-conv .uc-title { margin: 0; font-size: 1.05rem; letter-spacing: 0.04em; color: #f3ead4; }

/* 단위 알약 버튼 (units.js가 채워요) */
.uc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-chips button {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(216, 192, 138, 0.45);
    background: rgba(0, 0, 0, 0.18);
    color: #efe4c8;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.uc-chips button:hover { background: rgba(216, 192, 138, 0.18); }
.uc-chips button.on { background: var(--tp-gold); border-color: var(--tp-gold); color: var(--tp-emerald); font-weight: 700; }

/* 알약 버튼이 있으니 목록 상자는 숨겨요 (units.js는 그대로 씀) */
.tp-conv .uc-chips:not(:empty) + .uc-select { display: none; }
.tp-conv .uc-select {
    width: 100%;
    height: 40px;
    padding: 0 30px 0 12px;
    border: 1px solid rgba(216, 192, 138, 0.5);
    border-radius: 8px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23d8c08a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 11px 7px,
        rgba(0, 0, 0, 0.22);
    color: #f3ead4;
    font: inherit;
    font-size: 0.95rem;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.tp-conv .uc-select:focus { outline: none; border-color: var(--tp-gold); }
.tp-conv .uc-select option { color: #1b2b26; background: #faf6ee; }

.tp-conv .uc-in {
    display: flex;
    align-items: stretch;
    height: 58px;
    border-radius: 10px;
    background: var(--tp-ivory);
    overflow: hidden;
}
.tp-conv .uc-in:focus-within { box-shadow: 0 0 0 3px rgba(216, 192, 138, 0.85); }
.tp-conv .uc-in input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: #17312a;
    font: inherit;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: right;
}
.tp-conv .uc-in input:focus { outline: none; }
.tp-conv .uc-unit {
    flex: none;
    display: grid;
    place-items: center;
    min-width: 128px;
    padding: 0 14px;
    background: #ece2c8;
    color: #5f4e30;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.tp-conv .uc-link { height: 16px; display: flex; align-items: center; gap: 10px; color: var(--tp-gold); }
.tp-conv .uc-link::before,
.tp-conv .uc-link::after { content: ""; flex: 1 1 auto; height: 1px; background: rgba(216, 192, 138, 0.3); }
.tp-conv .uc-link svg { width: 14px; height: 14px; flex: none; }

.tp-conv .uc-hint { font-size: 0.82rem; text-align: center; color: rgba(243, 234, 212, 0.75); }
.tp-note { margin: 2px 0 0; font-size: 0.74rem; text-align: center; color: rgba(243, 234, 212, 0.55); }

/* 자주 쓰는 값 표 */
.tp-table-box {
    padding: 16px 16px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #ece3cf;
    box-shadow: 0 6px 20px rgba(120, 100, 60, 0.08);
}
.tp-table-box h2 { margin: 0 0 10px; font-size: 1rem; color: var(--tp-emerald); }
.tp-table-box h2 small { margin-left: 6px; font-size: 0.75rem; font-weight: 400; color: var(--tp-mute); }
.uc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.uc-table th {
    padding: 8px 10px;
    background: #eef4f0;
    color: var(--tp-emerald2);
    font-size: 0.8rem;
    text-align: right;
    border-bottom: 2px solid var(--tp-gold);
}
.uc-table td { padding: 7px 10px; text-align: right; border-bottom: 1px solid #f1eadb; }
.uc-table tbody tr:nth-child(even) td { background: #fcfaf4; }
.uc-table tbody tr:hover td { background: #f6efdc; }

/* ---------- 설명 글 ---------- */
.tp-article {
    padding: 28px 32px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #ece3cf;
    box-shadow: 0 6px 22px rgba(120, 100, 60, 0.07);
}
.tp-article > h2:first-child { margin-top: 0; }
.tp-article h2 {
    margin: 1.9em 0 0.6em;
    padding-bottom: 6px;
    border-bottom: 1px solid #efe6d2;
    font-size: 1.15rem;
    color: var(--tp-emerald);
}
.tp-article h2::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 2px;
    background: var(--tp-gold);
    transform: rotate(45deg);
    vertical-align: 2px;
}
.tp-article h3 { margin: 1.3em 0 0.4em; font-size: 1rem; color: #3a4a43; }
.tp-article p,
.tp-article li { line-height: 1.85; color: #3a3a32; word-break: keep-all; }
.tp-article ul { padding-left: 1.3em; }
.tp-article a { color: var(--tp-emerald2); font-weight: 600; }
.tp-article table { width: 100%; border-collapse: collapse; margin: 0.6em 0 1em; font-size: 0.9rem; }
.tp-article th,
.tp-article td { padding: 8px 10px; border: 1px solid #ece3cf; text-align: left; }
.tp-article th { background: #eef4f0; color: var(--tp-emerald2); }
.tp-article td.num, .tp-article th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tp-tip {
    margin: 1em 0;
    padding: 12px 16px;
    border-left: 4px solid var(--tp-gold);
    border-radius: 0 10px 10px 0;
    background: #fbf6e8;
    font-size: 0.92rem;
}

/* 자주 묻는 질문 */
.tp-faq details { border-bottom: 1px solid #efe6d2; }
.tp-faq summary {
    padding: 12px 4px;
    font-weight: 700;
    color: #33433c;
    cursor: pointer;
    list-style: none;
}
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::before { content: "Q. "; color: var(--tp-gold-deep); }
.tp-faq summary::after { content: "+"; float: right; color: var(--tp-gold-deep); font-weight: 400; }
.tp-faq details[open] summary::after { content: "−"; }
.tp-faq details p { margin: 0 4px 14px; }

/* ---------- 다른 도구 보기 (홈으로 연결) ---------- */
.tp-more {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbf8f1, #f1e9d9);
    border: 1px solid #d9c9a8;
}
.tp-more p { margin: 0; color: #5b4636; line-height: 1.6; word-break: keep-all; }
.tp-more p a { color: var(--tp-emerald2); font-weight: 700; }
.tp-more p b { display: block; color: #3b2a1a; font-size: 1.02rem; }
.tp-more > a {
    flex: none;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--tp-emerald2);
    color: #f6ecd2;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16, 55, 47, 0.25);
    transition: transform 0.15s, background 0.15s;
}
.tp-more > a:hover { background: var(--tp-emerald); transform: translateY(-1px); }

/* ==========================================================
   계산기 카드 공통 (2026-11-15, 만 나이·D-day 페이지 age.html부터)
   .tp-panel = 진한 에메랄드 카드, .tp-card = 흰 카드
   ========================================================== */
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.tp-panel,
.tp-card { padding: 18px 20px 16px; border-radius: 16px; }
.tp-panel {
    background:
        radial-gradient(120% 70% at 100% 0%, rgba(216, 192, 138, 0.2), transparent 60%),
        linear-gradient(160deg, var(--tp-emerald) 0%, var(--tp-emerald2) 58%, var(--tp-emerald3) 100%);
    border: 1px solid #0d2f28;
    box-shadow: inset 0 0 0 1px rgba(216, 192, 138, 0.25), 0 8px 24px rgba(16, 55, 47, 0.18);
    color: #f3ead4;
}
.tp-card { background: #fff; border: 1px solid #ece3cf; box-shadow: 0 6px 20px rgba(120, 100, 60, 0.08); }
.tp-panel h2,
.tp-card h2 { margin: 0 0 12px; font-size: 1.08rem; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.tp-panel h2 { color: #f6ecd2; }
.tp-card h2 { color: var(--tp-emerald); }
.tp-num-badge {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--tp-gold); color: var(--tp-emerald); font-size: 0.78rem; font-weight: 800; flex: none;
}

/* 입력 줄 */
.tp-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.tp-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 0; }
.tp-field > span { font-size: 0.78rem; font-weight: 600; }
.tp-panel .tp-field > span { color: var(--tp-gold); }
.tp-card .tp-field > span { color: var(--tp-mute); }
.tp-field input,
.tp-field select {
    box-sizing: border-box; width: 100%; height: 42px; padding: 0 10px;
    border-radius: 9px; border: 1px solid #ddd2b8; background: var(--tp-ivory);
    color: #17312a; font: inherit; font-size: 16px; font-weight: 600;
}
.tp-panel .tp-field input { border-color: transparent; }
.tp-field input:focus,
.tp-field select:focus { outline: none; box-shadow: 0 0 0 3px rgba(216, 192, 138, 0.8); }
.tp-field.tp-wide { flex-basis: 230px; }
.tp-field-row { display: flex; gap: 6px; }
.tp-field-row input { flex: 1 1 auto; min-width: 0; }
.tp-btn {
    flex: none; height: 42px; padding: 0 14px; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--tp-gold); background: transparent; color: var(--tp-gold);
    font: inherit; font-size: 0.85rem; font-weight: 700; white-space: nowrap;
}
.tp-btn:hover { background: rgba(216, 192, 138, 0.18); }
.tp-btn.solid { background: var(--tp-emerald2); border-color: var(--tp-emerald2); color: #f6ecd2; }
.tp-btn.solid:hover { background: var(--tp-emerald); }
.tp-card .tp-btn:not(.solid) { color: var(--tp-emerald2); border-color: #cdbf9c; }

.tp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.tp-presets button {
    padding: 4px 10px; border-radius: 999px; border: 1px solid #e3d8bf; background: #fbf7ec;
    color: #5b4a38; font: inherit; font-size: 0.78rem; cursor: pointer;
}
.tp-presets button:hover { background: #f3ead2; }

/* 결과 */
.tp-empty { margin: 6px 0; font-size: 0.88rem; opacity: 0.75; }
.tp-small { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.6; opacity: 0.85; word-break: keep-all; }
.age-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.age-big small { width: 100%; font-size: 0.8rem; color: var(--tp-gold); font-weight: 600; }
.age-big b { font-size: 3.4rem; line-height: 1; color: #fff3cf; font-variant-numeric: tabular-nums; }
.age-big span { font-size: 1.2rem; font-weight: 700; }
.age-hb { margin: 8px 0 0; font-weight: 700; color: #ffe08a; }
.tp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.tp-stats > div { padding: 9px 11px; border-radius: 10px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(216, 192, 138, 0.22); }
.tp-stats dt { font-size: 0.72rem; color: var(--tp-gold); }
.tp-stats dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 700; color: #fbf3dc; }

.dd-big, .df-big { font-size: 2.6rem; font-weight: 800; line-height: 1.1; color: var(--tp-emerald); font-variant-numeric: tabular-nums; }
.dd-big.is-today { color: #c2410c; }
.dd-big.is-past { color: #8a7d68; }
.df-big span { margin-left: 4px; font-size: 1rem; font-weight: 700; color: var(--tp-mute); }
.df-big.df-date { font-size: 1.45rem; }

.dd-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dd-list:empty { display: none; }
.dd-list li { display: flex; align-items: stretch; border: 1px solid #ece3cf; border-radius: 10px; overflow: hidden; background: #fcfaf4; }
.dd-pick {
    flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px;
    padding: 7px 10px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; color: inherit;
}
.dd-pick:hover { background: #f6efdc; }
.dd-pick b { grid-row: 1 / span 2; align-self: center; min-width: 64px; color: var(--tp-emerald2); font-size: 1.05rem; }
.dd-pick b.is-today { color: #c2410c; }
.dd-pick b.is-past { color: #8a7d68; }
.dd-pick span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-pick small { font-size: 0.75rem; color: var(--tp-mute); }
.dd-del { flex: none; width: 36px; border: 0; border-left: 1px solid #ece3cf; background: none; color: #a08f73; font-size: 1.2rem; cursor: pointer; }
.dd-del:hover { background: #fbe9e4; color: #c2410c; }

.an-now { margin: 0 0 10px; font-size: 0.95rem; }
.an-now b { color: var(--tp-emerald2); }
.tp-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.tp-table th { padding: 7px 8px; background: #eef4f0; color: var(--tp-emerald2); font-size: 0.78rem; text-align: left; border-bottom: 2px solid var(--tp-gold); }
.tp-table td { padding: 7px 8px; border-bottom: 1px solid #f1eadb; }
.tp-table td:last-child, .tp-table th:last-child { text-align: right; font-weight: 700; color: var(--tp-emerald2); }
.tp-table tr.is-past td { color: #b0a48e; }
.tp-table tr.is-past td:last-child { color: #b0a48e; font-weight: 400; }
.tp-table tr.is-today td { background: #fff4d6; }
.tp-sub { margin: 16px 0 8px; padding-top: 14px; border-top: 1px dashed #e6dcc4; font-size: 0.95rem; color: var(--tp-emerald); }

@media (max-width: 760px) {
    .tp-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
    .tp-panel, .tp-card { padding: 16px 14px 14px; }
    .age-big b { font-size: 3rem; }
    .dd-big, .df-big { font-size: 2.2rem; }
    .tp-table { font-size: 0.82rem; }
    .tp-table th, .tp-table td { padding: 6px 5px; }
}

/* ---------- 폰 ---------- */
@media (max-width: 760px) {
    .tp-main { padding: 18px 12px 40px; }
    .tp-head h1 { font-size: 1.45rem; }
    .tp-tabs { gap: 6px; margin-bottom: 14px; }
    .tp-tabs a { font-size: 0.82rem; padding: 6px 12px; }
    .tp-tool { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .tp-conv { padding: 16px 14px 14px; }
    .uc-chips { gap: 5px; }
    .uc-chips button { font-size: 0.78rem; padding: 5px 10px; }
    .tp-conv .uc-in { height: 54px; }
    .tp-conv .uc-in input { font-size: 1.4rem; }      /* 16px 넘어서 아이폰 자동 확대 없음 */
    .tp-conv .uc-unit { min-width: 104px; font-size: 0.85rem; padding: 0 10px; }
    .tp-article { padding: 20px 16px; }
    .tp-more { padding: 16px; }
    .tp-more > a { width: 100%; box-sizing: border-box; text-align: center; }
}
@media (max-width: 480px) {
    .tool-page .bp-top-in { gap: 8px; }
    .tool-page .bp-brand { font-size: 1.1rem; }
    .tool-page .bp-home { padding: 4px 9px; }
}
@media print {
    .bp-top, .tp-more, .uc-chips, .tp-tabs { display: none; }
}

/* ==========================================================
   2026-11-18: 도구 모음(tools.html) · 길 안내 줄 · 다른 도구 카드
   - .tp-crumb  : 맨 위 "홈 › 생활 도구 › 지금 페이지"
   - .th-card   : 도구 카드 (도구 모음 페이지 + 각 도구 페이지 아래 "다른 도구")
   ========================================================== */
.tp-crumb { margin: 0 0 12px; font-size: 0.82rem; color: var(--tp-mute); }
.tp-crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tp-crumb li { display: flex; align-items: center; gap: 4px; }
.tp-crumb li + li::before { content: "›"; color: var(--tp-gold-deep); }
.tp-crumb a { color: var(--tp-emerald2); text-decoration: none; font-weight: 600; }
.tp-crumb a:hover { text-decoration: underline; }
.tp-crumb [aria-current] { color: var(--tp-ink); }

.th-section { margin: 0 0 22px; }
.th-section > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.12rem; color: var(--tp-emerald); }
.th-section > h2::before { content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: var(--tp-gold); }
.th-section > p { margin: -4px 0 12px; color: var(--tp-mute); font-size: 0.9rem; line-height: 1.6; word-break: keep-all; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.th-card {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 74px; box-sizing: border-box;
    padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #ece3cf;
    box-shadow: 0 4px 14px rgba(120, 100, 60, 0.07); color: inherit; text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
a.th-card:hover { transform: translateY(-2px); border-color: var(--tp-gold); box-shadow: 0 8px 20px rgba(120, 100, 60, 0.14); }
.th-ic {
    flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    font-size: 1.5rem; line-height: 1; background: linear-gradient(160deg, var(--tp-emerald2), var(--tp-emerald3));
    box-shadow: inset 0 0 0 1px rgba(216, 192, 138, 0.35);
}
.th-ic.c2 { background: linear-gradient(160deg, #2c7a7a, #3f9c9c); }
.th-ic.c3 { background: linear-gradient(160deg, #4a6aa8, #7f9bd0); }
.th-ic.c4 { background: linear-gradient(160deg, #a8874b, #d8c08a); }
.th-ic.c5 { background: linear-gradient(160deg, #36347a, #6b68c4); }
.th-ic.c6 { background: linear-gradient(160deg, #b4536e, #e08aa2); }
.th-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.th-text b { color: var(--tp-emerald); font-size: 1rem; }
.th-text small { color: var(--tp-mute); font-size: 0.8rem; line-height: 1.45; word-break: keep-all; }
.th-go { margin-left: auto; color: var(--tp-gold-deep); font-size: 1.3rem; font-weight: 700; }
.th-card.is-soon { background: #fbf8f1; box-shadow: none; border-style: dashed; }
.th-card.is-soon .th-ic { filter: grayscale(0.6); opacity: 0.7; }
.th-card.is-soon .th-text b { color: #6f6a5c; }
.th-badge {
    position: absolute; top: 8px; right: 10px; padding: 1px 8px; border-radius: 999px;
    background: #efe6d2; color: #8a6d3b; font-size: 0.7rem; font-weight: 700;
}

/* 각 도구 페이지 맨 아래 "다른 도구" (예전 .tp-more 자리) */
.tp-related { margin-top: 22px; padding: 18px 20px 20px; border-radius: 16px; background: linear-gradient(135deg, #fbf8f1, #f1e9d9); border: 1px solid #d9c9a8; }
.tp-related-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-related-head h2 { margin: 0; font-size: 1.05rem; color: #3b2a1a; }
.tp-related-head a {
    padding: 8px 16px; border-radius: 999px; background: var(--tp-emerald2); color: #f6ecd2;
    font-weight: 700; font-size: 0.88rem; text-decoration: none; box-shadow: 0 2px 8px rgba(16, 55, 47, 0.25);
}
.tp-related-head a:hover { background: var(--tp-emerald); }
.tp-related .th-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tp-related .th-card { min-height: 64px; padding: 10px 12px; }
.tp-related .th-ic { width: 40px; height: 40px; font-size: 1.3rem; }

@media (max-width: 760px) {
    .th-grid, .tp-related .th-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .th-card { min-height: 64px; }
    .tp-related { padding: 16px 14px; }
    .tp-related-head a { width: 100%; box-sizing: border-box; text-align: center; }
}
@media print { .tp-related, .tp-crumb { display: none; } }

/* ---------- 2026-11-18: 퇴직금 계산기 (severance.html) ---------- */
.tool-page [hidden] { display: none !important; }
.sv-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.sv-check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 0.86rem; color: #f3ead4; cursor: pointer; user-select: none; }
.sv-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--tp-gold); flex: none; }
.sv-btns { margin-bottom: 4px; }
.sv-big { padding: 14px 16px; border-radius: 14px; background: linear-gradient(160deg, #fff8e6, #f6ecd2); border: 1px solid #e6d3a6; margin-bottom: 12px; }
.sv-big small { display: block; font-size: 0.8rem; font-weight: 700; color: var(--tp-gold-deep); }
.sv-big b { display: block; margin-top: 2px; font-size: 2.2rem; line-height: 1.15; color: var(--tp-emerald); font-variant-numeric: tabular-nums; word-break: keep-all; }
.sv-big.is-no { background: #f6f3ec; border-color: #e3dccb; }
.sv-big.is-no b { font-size: 1.6rem; color: #8a6d3b; }
.sv-why { margin: 0 0 10px; font-size: 0.9rem; line-height: 1.65; color: #4a4336; word-break: keep-all; }
.sv-why b { color: #c2410c; }
.sv-rows { margin: 0; display: flex; flex-direction: column; gap: 0; }
.sv-rows > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid #f1eadb; }
.sv-rows dt { font-size: 0.8rem; font-weight: 700; color: var(--tp-mute); padding-top: 2px; }
.sv-rows dd { margin: 0; font-weight: 700; color: var(--tp-ink); font-variant-numeric: tabular-nums; }
.sv-rows dd small { display: block; margin-top: 2px; font-size: 0.76rem; font-weight: 400; color: var(--tp-mute); }
.sv-steps th { width: 30%; background: none; border-bottom: 1px solid #f1eadb; color: var(--tp-mute); font-weight: 700; }
.sv-steps td:nth-child(2) { color: #5b5446; font-size: 0.82rem; }
@media (max-width: 760px) {
    .sv-grid { grid-template-columns: minmax(0, 1fr); }
    .sv-big b { font-size: 1.9rem; }
    .sv-rows > div { grid-template-columns: 96px 1fr; }
    .sv-steps td:nth-child(2) { font-size: 0.76rem; }
}
.sv-steps td:last-child { white-space: nowrap; }   /* 금액이 두 줄로 안 갈라지게 */

/* ---------- 2026-11-18: 글자 수 세기 (charcount.html) ---------- */
.cc-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.cc-text {
    box-sizing: border-box; width: 100%; min-height: 320px; padding: 14px 15px; resize: vertical;
    border-radius: 12px; border: 1px solid #ddd2b8; background: #fffdf8; color: #1f2a26;
    font: 400 16px/1.75 "Noto Sans KR", system-ui, sans-serif;
}
.cc-text:focus { outline: none; border-color: var(--tp-gold); box-shadow: 0 0 0 3px rgba(216, 192, 138, 0.45); }
.cc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.cc-msg { font-size: 0.84rem; font-weight: 700; color: var(--tp-emerald2); }
.cc-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-main > div { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(216, 192, 138, 0.3); }
.cc-main small { display: block; font-size: 0.76rem; font-weight: 700; color: var(--tp-gold); }
.cc-main b { display: block; font-size: 2.3rem; line-height: 1.1; color: #fff3cf; font-variant-numeric: tabular-nums; }
.cc-stats .tp-stats .cc-wide { grid-column: 1 / -1; }
.cc-goal-h { margin: 16px 0 8px; font-size: 0.92rem; color: #f6ecd2; }
.cc-stats .tp-field select { color: #17312a; }
.cc-presets button { background: rgba(255, 255, 255, 0.1); border-color: rgba(216, 192, 138, 0.45); color: #f3ead4; }
.cc-presets button:hover { background: rgba(216, 192, 138, 0.22); }
.cc-bar { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); overflow: hidden; }
.cc-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #d8c08a, #ffe08a); transition: width 0.2s; }
.cc-bar.is-over span { background: linear-gradient(90deg, #f07a52, #ff9b7a); }
.cc-bar-txt { margin: 8px 0 0; font-size: 0.85rem; color: #f3ead4; }
@media (max-width: 760px) {
    .cc-grid { grid-template-columns: minmax(0, 1fr); }
    .cc-text { min-height: 220px; }
    .cc-main b { font-size: 2rem; }
}

/* ---------- 2026-11-18: 대출 이자 계산기 (loan.html) ---------- */
.ln-unit { flex: 0 0 82px; width: 82px !important; }
.sv-big .ln-arrow { display: block; margin-top: 4px; font-size: 0.9rem; font-weight: 700; color: #6f5a32; }
.ln-hint { margin-left: 6px; font-size: 0.74rem; font-weight: 400; color: var(--tp-mute); }
.ln-cmp td:first-child { text-align: left; }
.ln-cmp td, .ln-cmp th { text-align: right; }
.ln-cmp th:first-child { text-align: left; }
.ln-cmp td:last-child, .ln-cmp th:last-child { color: var(--tp-ink); font-weight: 700; }
.ln-cmp button { padding: 3px 10px; border-radius: 999px; border: 1px solid #ddd2b8; background: #fbf7ec; color: var(--tp-emerald2); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.ln-cmp tr.is-on td { background: #fff4d6; }
.ln-cmp tr.is-on button { background: var(--tp-emerald2); border-color: var(--tp-emerald2); color: #f6ecd2; }
.ln-sched-box { margin-bottom: 16px; }
.ln-scroll { overflow-x: auto; }
.ln-sched { min-width: 520px; }
.ln-sched th, .ln-sched td { text-align: right; }
.ln-sched th:first-child, .ln-sched td:first-child { text-align: center; width: 54px; }
.ln-sched td:last-child, .ln-sched th:last-child { color: var(--tp-ink); font-weight: 400; }
.ln-sched tr.is-grace td { color: #8a6d3b; background: #fbf7ec; }
.ln-sched tr.ln-gap td { text-align: center; color: var(--tp-mute); background: #fcfaf4; font-size: 0.8rem; }
.ln-more { margin-top: 10px; }
.tp-card .tp-presets.cc-presets button { background: #fbf7ec; border-color: #e3d8bf; color: #5b4a38; }
.tp-article td, .tp-article th { word-break: keep-all; }   /* 표 안 한국어 낱말이 중간에서 안 끊기게 (2026-11-18) */

/* ==========================================================
   2026-11-18: 도구마다 다른 색 (초록 일변도 → 페이지마다 테마)
   body에 class를 붙여 색 변수만 바꿔요. 단위 환산은 원래 에메랄드 그대로.
   theme-hub(도구 모음, 남보라) · theme-age(청록+복숭아) · theme-sev(호두나무 갈색+금) ·
   theme-cc(남색+하늘) · theme-loan(자두색+분홍)
   ========================================================== */
body.tool-page { --tp-tint: #eef4f0; --tp-tint2: #e6efe9; }
.tp-kicker { background: var(--tp-tint2); }
.tp-article th, .tp-table th, .uc-table th { background: var(--tp-tint); }
.tp-panel { border-color: var(--tp-emerald); }
.tp-crumb li + li::before, .tp-faq summary::before, .tp-faq summary::after { color: var(--tp-gold-deep); }

body.tool-page.theme-hub  { --tp-emerald: #1f1d52; --tp-emerald2: #36347a; --tp-emerald3: #4d4aa6; --tp-gold: #c9c7f6; --tp-gold-deep: #5a57b5; --tp-tint: #ecebfb; --tp-tint2: #e6e5fb; }
body.tool-page.theme-age  { --tp-emerald: #0e3a44; --tp-emerald2: #1d5f6b; --tp-emerald3: #2c7a7a; --tp-gold: #ffc9a8; --tp-gold-deep: #b4573a; --tp-tint: #e6f2f2; --tp-tint2: #dff0ef; }
body.tool-page.theme-sev  { --tp-emerald: #3a2412; --tp-emerald2: #5b3a1f; --tp-emerald3: #7a5232; --tp-gold: #f0c674; --tp-gold-deep: #8a5a1c; --tp-tint: #f5ece0; --tp-tint2: #f1e6d6; }
body.tool-page.theme-cc   { --tp-emerald: #13254a; --tp-emerald2: #213f78; --tp-emerald3: #335a9c; --tp-gold: #a9d1f5; --tp-gold-deep: #2f5f9a; --tp-tint: #e8f0fa; --tp-tint2: #e2ecf9; }
body.tool-page.theme-loan { --tp-emerald: #3a1430; --tp-emerald2: #5c2248; --tp-emerald3: #7a3462; --tp-gold: #f5b8d0; --tp-gold-deep: #a33b6b; --tp-tint: #f8e9f0; --tp-tint2: #f6e3ec; }

/* 도구 탭: 각 탭도 그 도구의 색 (지금 페이지는 진하게) */
.tp-tabs a[href^="tools"].on     { background: #36347a; border-color: #36347a; }
.tp-tabs a[href^="units"].on     { background: #1b5245; border-color: #1b5245; }
.tp-tabs a[href^="age"].on       { background: #1d5f6b; border-color: #1d5f6b; }
.tp-tabs a[href^="severance"].on { background: #5b3a1f; border-color: #5b3a1f; }
.tp-tabs a[href^="charcount"].on { background: #213f78; border-color: #213f78; }
.tp-tabs a[href^="loan"].on      { background: #5c2248; border-color: #5c2248; }
.tp-tabs a[href^="tools"]:not(.on)     { border-left: 4px solid #6b68c4; }
.tp-tabs a[href^="units"]:not(.on)     { border-left: 4px solid #286654; }
.tp-tabs a[href^="age"]:not(.on)       { border-left: 4px solid #2c7a7a; }
.tp-tabs a[href^="severance"]:not(.on) { border-left: 4px solid #a8874b; }
.tp-tabs a[href^="charcount"]:not(.on) { border-left: 4px solid #4a6aa8; }
.tp-tabs a[href^="loan"]:not(.on)      { border-left: 4px solid #b4536e; }

/* 2026-11-18: 위 막대 "← 홈으로" 왼쪽 "이전 페이지" 화살표 (lang.js가 붙여요) */
.bp-back {
    flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; margin-right: -6px;
    border-radius: 50%; border: 1px solid rgba(216, 192, 138, 0.55); background: transparent; color: #f3ead4; cursor: pointer;
}
.bp-back svg { width: 16px; height: 16px; }
.bp-back:hover:not(:disabled) { background: rgba(216, 192, 138, 0.22); }
.bp-back:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 480px) { .bp-back { width: 28px; height: 28px; margin-right: -4px; } }
