/* 업무앱 공통 · 2026-11-07 1.소멸시효계산기/styles.css 에서 줄째 옮김(1-158 머리·히어로·카드 · 298-315 주의·버튼 · 386-405 조변 버튼 · 451-503 FAQ·바닥·알림·인쇄) */
/* ======================================================================
   소멸시효 계산기 · 2026-10-09 신설 (형기·가석방·공소시효 계산기의 styles.css 를 틀로)
   틀은 법정기간 자동 계산기(업무 앱 표준 · 헌법 §7)에서 가져왔다. 색은 홈 「청람」 토큰.
   형기 계산기에서 물려받은 부품은 «형사 계산기에서 물려받음» 절, 이 앱에만 있는 부품은 맨 끝 «소멸시효 계산기 전용» 절.
   ====================================================================== */
:root {
    --ground: #f2f5f8;
    --card: #ffffff;
    --line: #d9e2ea;
    --line-strong: #c3d0dc;
    --ink: #10203a;
    --ink-soft: #44546a;
    --ink-light: #7b8899;
    --accent: #0b4a76;
    --accent-2: #2d7fc0;
    --accent-soft: #e3eef7;
    --accent-soft-2: #d3e4f3;
    --seal: #c8432f;
    --seal-soft: #fbe9e6;
    --amber: #9a6a0c;
    --amber-soft: #fdf3dc;
    --ok: #1f6f4a;
    --r: 18px;
    --shadow: 0 1px 2px rgba(16, 32, 58, .04), 0 8px 24px rgba(16, 32, 58, .06);
    --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
    --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--ground);
    background-image: radial-gradient(1200px 420px at 50% -120px, #dfeaf5 0%, rgba(223, 234, 245, 0) 70%);
    background-repeat: no-repeat;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

/* ── 머리 ─────────────────────────────── */
.top {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.top-in {
    max-width: 1120px; margin: 0 auto; padding: 10px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-seal {
    width: 36px; height: 36px; border-radius: 9px; flex: none;
    display: grid; place-items: center;
    background: var(--ink); color: #fff;
    font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.brand-txt small { font-size: 12px; color: var(--ink-light); }
.head-tools { display: flex; gap: 8px; }
.tool-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: #fff; border: 1px solid var(--line-strong); color: var(--ink-soft);
    transition: border-color .15s, color .15s, transform .15s;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 본문 틀 ─────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }

.hero {
    padding: 30px 0 18px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
    grid-template-areas: "txt char" "facts facts" "note note";
}
.hero-txt { grid-area: txt; min-width: 0; }
.hero .facts { grid-area: facts; }
.hero .notice-line { grid-area: note; }
.hero-char { grid-area: char; align-self: end; position: relative; width: 104px; }
.hero-char img { display: block; width: 100%; height: auto; animation: charIn .6s ease both .1s; }
.hero-bubble { display: none; }
@keyframes charIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 760px) {
    .hero { grid-template-areas: "txt char" "facts char" "note char"; padding-bottom: 0; }
    .hero-char { width: 218px; margin: -8px 24px -30px 0; }   /* 허리 아래가 카드 뒤로 숨는다 */
    .hero-bubble {
        position: absolute; right: calc(100% + 4px); top: 34px; width: 196px; margin: 0;
        background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; padding: 11px 13px;
        font-size: 13px; line-height: 1.55; color: var(--ink-soft); box-shadow: var(--shadow);
        animation: charIn .6s ease both .35s;
    }
    .hero-bubble b { color: var(--accent); }
    .hero-bubble::after {
        content: ''; position: absolute; right: -8px; top: 26px; width: 14px; height: 14px; background: #fff;
        border-right: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg);
    }
    .board { position: relative; z-index: 1; }
}
/* 말풍선은 본문이 최대 폭(1120px)일 때만 — 폴드 안쪽·태블릿 폭에서는 제목·설명을 가렸다(2026-09-19 조변 실기기) */
@media (min-width: 1120px) { .hero-bubble { display: block; } }
.eyebrow {
    margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent);
}
.hero h1 {
    margin: 0; font-family: var(--serif); font-weight: 900;
    font-size: clamp(30px, 6.4vw, 46px); line-height: 1.18; letter-spacing: -.02em;
}
.hero h1 span { color: var(--accent); }
.h1-sub { margin: 8px 0 0; font-size: clamp(16px, 2.6vw, 19px); font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
.lead { margin: 12px 0 0; font-size: clamp(15px, 2.4vw, 17px); color: var(--ink-soft); max-width: 640px; }
.facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
    font-size: 13px; color: var(--ink-soft); background: #fff;
    border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}
.facts b { color: var(--accent); font-weight: 800; }
.notice-line {
    display: flex; align-items: flex-start; gap: 8px;
    margin: 14px 0 0; padding: 9px 12px; font-size: 13px; color: var(--ink-soft);
    background: rgba(0, 0, 0, .035); border: 1px solid rgba(0, 0, 0, .09); border-radius: 10px;
    max-width: 640px;
}
.notice-line svg { width: 15px; height: 15px; flex: none; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .5; }

/* ── 보드: 폰은 한 줄, 넓으면 입력 | 결과 ── */
.board { display: grid; gap: 16px; margin-top: 8px; }
.side { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 980px) {
    .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 22px; }
    .result { position: sticky; top: 76px; }
}

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow); padding: 20px; min-width: 0;
    scroll-margin-top: 72px;
}
.step h2 {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px; font-size: 18px; font-weight: 800; letter-spacing: -.01em;
}
.no {
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 14px; font-weight: 800;
    background: var(--accent); color: #fff;
}

.note {
    margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.6;
    background: #f6f9fc; border: 1px solid var(--line); color: var(--ink-soft);
}
.note b { color: var(--ink); }
.note.warn { background: var(--amber-soft); border-color: #f0dca8; color: #6b4a07; }
.note.law { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: none; border: 0; padding: 0; }
.law-chip { font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; }

.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.act {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
    font-size: 14px; font-weight: 700; padding: 9px 13px; border-radius: 11px;
    transition: border-color .15s, color .15s;
}
.act:hover { border-color: var(--accent); color: var(--accent); }
.act svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 조변 버튼 — 결과 화면에 하나만(헌법 §5) */
.cta {
    display: flex; align-items: center; gap: 12px; margin-top: 18px; text-decoration: none;
    background: linear-gradient(135deg, #10203a 0%, #163257 100%); color: #fff;
    border-radius: 16px; padding: 12px 14px; transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 32, 58, .22); }
.cta img { width: 56px; height: 56px; border-radius: 50%; flex: none; background: #dce8f4; object-fit: cover; border: 2px solid rgba(255, 255, 255, .7); }
.cta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.cta-txt b { font-size: 15px; font-weight: 800; }
.cta-txt span { font-size: 13px; color: #c9d6e6; }
.cta-go {
    flex: none; font-size: 13px; font-weight: 800; color: var(--ink); background: #fff;
    border-radius: 999px; padding: 7px 12px; white-space: nowrap;
}
@media (max-width: 440px) {
    .cta { flex-wrap: wrap; }
    .cta-go { width: 100%; text-align: center; margin-left: 68px; width: calc(100% - 68px); }
}

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 14.5px; color: var(--ink-soft); }

/* ── 바닥 ─────────────────────────── */
.foot { margin-top: 48px; background: var(--ink); color: #c9d6e6; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 26px 20px 30px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-note { margin: 14px 0 0; font-size: 13px; line-height: 1.7; max-width: 760px; }
.foot-note a { color: #fff; }
.foot-copy { margin: 10px 0 0; font-size: 12px; color: #8fa1b8; }
.foot-copy span { font-family: var(--serif); font-weight: 900; }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
    max-width: min(88vw, 420px); text-align: center; background: rgba(16, 32, 58, .95); color: #fff;
    font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; z-index: 100;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 480px) {
    .wrap { padding: 0 16px 32px; }
    .top-in { padding: 9px 16px; }
    .card { padding: 16px; }
    .result { padding: 18px 16px; }
    .hero { padding-top: 22px; }
    .two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    /* 바닥글: 남색 띠·링크 줄은 빼고 참고용 안내와 사무소 표기만 작게(2026-09-19 인쇄 점검 · 이자 계산기는 끝줄 하나로 빈 2쪽이 생겼다) */
    .foot { margin-top: 14px; background: none !important; color: #555 !important; break-inside: avoid; }
    .foot-in { max-width: none; padding: 8px 20px 0; border-top: 1px solid #ccc; }
    .foot-links { display: none !important; }
    .foot-note { margin: 0; max-width: none; font-size: 8.5pt; line-height: 1.5; }
    .foot-note a { color: inherit; }
    .foot-copy { margin: 3px 0 0; font-size: 8pt; color: #777 !important; }
    .top, .hero, .panel, .estate, .faq, .acts, .cta, .toast, .more-read { display: none !important; }
    .board { display: block; }
    body { background: #fff; }
    .card { box-shadow: none; border: 0; }
}

/* ======================================================================
   상속분 계산기 전용 (2026-11-07) · 위쪽은 소멸시효 계산기 styles.css 에서 가져온 업무앱 공통(머리·히어로·카드·바닥)
   ====================================================================== */
.brand-mark { width: 36px; height: 36px; border-radius: 9px; flex: none; display: block; overflow: hidden; }

/* 보드: 넓으면 가계도 | 결과 */
@media (min-width: 980px) {
    .board { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
}
.step-lead { margin: -6px 0 12px; font-size: 13.5px; color: var(--ink-light); }

/* 가계도 */
.fam { position: relative; padding: 4px 0 8px; }
.fam svg.lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.fam svg.lines path { fill: none; stroke: #8d9aab; stroke-width: 1.6; }
.fam svg.lines path.dash { stroke-dasharray: 4 4; stroke: #b3bdc9; }
.gen { position: relative; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 14px; row-gap: 24px; padding: 0 16px; margin-top: 30px; }
.gen:first-of-type { margin-top: 0; }
.gen-d { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 22px; align-items: center; }
.gen-d .me { grid-column: 2; }
.gen-d .p { justify-self: start; }
.p, .me, .add { position: relative; z-index: 1; }
.p {
    width: 84px; min-height: 78px; padding: 6px 3px; border: 1px solid var(--line-strong); border-radius: 12px;
    background: #fff; cursor: pointer; text-align: center; line-height: 1.3; transition: box-shadow .15s, border-color .15s;
}
.p:hover { border-color: var(--accent-2); }
.p b { display: block; font-size: 14px; font-weight: 800; }
.p .fr { display: block; font-weight: 800; color: var(--accent); font-size: 17px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.p .st { display: block; font-size: 11.5px; color: var(--ink-light); }
.p .tag { display: inline-block; font-size: 11px; font-weight: 800; color: var(--amber); background: var(--amber-soft); border-radius: 5px; padding: 0 5px; margin-top: 2px; }
.p.heir { background: var(--accent-soft); border-color: var(--accent); }
.p.off { background: #f4f6f8; color: var(--ink-light); border-color: var(--line); }
.p.off .fr { color: var(--ink-light); font-weight: 600; font-size: 12.5px; }
.p.none { border-style: dashed; background: #fafbfc; }
.p.on { box-shadow: 0 0 0 3px var(--accent-2); }
.me {
    width: 84px; min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; text-align: center; padding: 6px; line-height: 1.3; font-size: 14px;
}
.me small { font-weight: 500; font-size: 11.5px; opacity: .8; }
.add { width: 44px; min-height: 78px; border: 1px dashed var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; font-size: 22px; color: var(--accent); }
.add:hover { border-color: var(--accent); }
.gen-name { position: absolute; left: 12px; top: -31px; font-size: 12px; font-weight: 700; color: var(--ink-light); z-index: 1; background: var(--card); padding: 0 4px 0 0; }
@media (max-width: 400px) {
    .gen { column-gap: 10px; padding: 0 13px; }
    .gen-d { column-gap: 10px; padding: 0 8px; }
    .p, .me { width: 78px; }
    .gen-name { left: 10px; }
}

/* 고른 사람 칸 */
.panel { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); scroll-margin-top: 80px; }
.panel h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.panel .empty { margin: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button {
    min-height: 42px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
    cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-soft);
}
.opts button:hover { border-color: var(--accent); color: var(--accent); }
.opts button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt { display: flex; align-items: center; gap: 10px 16px; margin-top: 12px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.stepper button { width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer; font-size: 18px; color: var(--accent); }
.stepper b { min-width: 18px; text-align: center; color: var(--ink); }
.chk { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.panel .hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-light); line-height: 1.6; }
.del-btn { min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer; font-size: 13.5px; color: var(--ink-soft); }
.del-btn:hover { border-color: var(--seal); color: var(--seal); }
.reset { margin-top: 12px; }

/* 결과 */
.result h2 { margin-bottom: 4px; }
.rank { margin: 0; font-size: 15px; font-weight: 800; color: var(--accent); }
.share-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: #e9eef3; margin: 12px 0 14px; }
.share-bar i { display: block; height: 100%; transition: width .3s; border-right: 2px solid #fff; }
.share-bar i:last-child { border-right: 0; }
.htable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.htable th, .htable td { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.htable th:first-child, .htable td:first-child { text-align: left; }
.htable th { font-size: 12.5px; color: var(--ink-light); font-weight: 700; }
.htable td b { font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.htable td i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
.htable .won { display: block; font-size: 12.5px; color: var(--ink-light); font-variant-numeric: tabular-nums; }
.htable .lim { font-size: 12px; font-weight: 700; color: var(--amber); }
.estate { margin-top: 16px; }
.estate label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.estate input {
    width: 100%; min-height: 48px; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
    background: #fff; font-variant-numeric: tabular-nums;
}
.estate input:focus { outline: 0; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(45, 127, 192, .15); }
.estate .hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--ink-light); }
.result .note a { color: var(--accent); font-weight: 700; }
.foot-copy a.foot-home { color: inherit; text-decoration: none; }
.foot-copy a.foot-home:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 히어로: 캐릭터가 키가 커도 칩·안내 상자는 내용 높이만(격자 줄이 늘어나 칩이 길쭉해졌다 · 2026-11-07) */
.hero .facts, .hero .notice-line { align-self: start; }

/* 인쇄: 더하기 상자·점선·고른 테두리·안내 줄은 빼고 가계도와 결과만 */
@media print { .fam .add { visibility: hidden; } .fam svg.lines path.dash { display: none; } .p.on { box-shadow: none; } .step-lead { display: none; } }

/* ═══ 업무앱 폰 보정 v1 · 2026-10-25 · 정본 !공용/업무앱폰보정/phone-fit.css (복사해서 styles.css 맨 끝에 붙인다 · 고칠 때는 정본부터) ═══ */
/* ① 아이폰은 16px 미만 입력칸을 누르면 화면을 확대한다 */
@media (max-width: 760px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
    select, textarea { font-size: 16px !important; }
}
/* ② 폰 첫 화면에 1단계가 들어오게: 소개 3줄 · 사실 칩 한 줄 가로 밀기 · 캐릭터 작게 */
@media (max-width: 480px) {
    .hero { padding-top: 16px; }
    .hero .lead.pf-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
    .hero .facts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 24px;
        -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
    .hero .facts::-webkit-scrollbar { display: none; }
    .hero .facts li { flex: none; white-space: nowrap; }
    .hero-char { width: 84px; }
}
