/* ============================================================================
   연봉 실수령액 계산기 (/salary/) — 전용 스타일 (대출 이자는 /loan/ 이 같은 틀을 ln- 이름표로 쓴다)
   ----------------------------------------------------------------------------
   공용 다크 레이어(lib/theme.php)에서 제외돼 있어 여기 있는 것이 전부다(배경만 jjam_theme_backdrop_style()).
   값은 사이트 표준(/liar/ 키트) — 반경 카드 24 · 버튼 16 · 입력 15 · 줄 14 · 칩 알약, 입력칸·행동 버튼 높이 51.
   강조색만 금융 앱처럼 파랑(#60a5fa → #22d3ee). 큰 숫자는 #8ec5ff(카드 위 9:1), 공제·이자는 호박색 #ffc971.
   글자 대비: 본문 #ece9ff(15:1) · 보조 #b9b3d8(9:1) · 흐림 #9995b5(6.3:1).
   ========================================================================= */

:root {
    --sl-bg: #0a0a12;
    --sl-bg-2: #12101f;
    --sl-surface: #161425;
    --sl-surface-2: #1c1930;
    --sl-surface-3: #262041;
    --sl-ink: #ece9ff;
    --sl-ink-soft: #b9b3d8;
    --sl-ink-faint: #9995b5;
    --sl-line-ui: #7b7599;
    --sl-blue: #60a5fa;
    --sl-blue-ink: #8ec5ff;
    --sl-cyan: #22d3ee;
    --sl-amber: #ffc971;
    --sl-on-fill: #0a0a12;
    --sl-brand: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
    --sl-title: linear-gradient(90deg, #60a5fa 15%, #22d3ee 85%);
    --sl-panel: linear-gradient(180deg, var(--sl-surface) 0%, var(--sl-bg-2) 100%);
    --sl-ring: inset 0 0 0 1px rgba(236, 233, 255, .08), inset 0 1px 0 rgba(236, 233, 255, .10);
    --sl-shadow: 0 20px 44px -22px rgba(0, 0, 0, .9);
    --sl-glow: 0 12px 30px -14px rgba(59, 130, 246, .9);
    --sl-r-card: 24px;
    --sl-r-btn: 16px;
    --sl-r-field: 15px;
    --sl-r-row: 14px;
    --sl-font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
    --sl-ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background-color: var(--sl-bg); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    color: var(--sl-ink); font-family: var(--sl-font); -webkit-font-smoothing: antialiased;
    min-height: 100dvh; overflow-x: hidden; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
a { color: var(--sl-blue-ink); }

/* Fluent 3D 이모지 그림 — 글자 이모지 자리에 글자 크기만큼(lib/fluent_emoji.php) */
.fe { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; object-fit: contain; }

.sl-skip { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--sl-surface); color: var(--sl-ink); padding: 10px 16px; border-radius: 10px; }
.sl-skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--sl-cyan); outline-offset: 3px; border-radius: 6px; }

/* ── 뼈대 ─────────────────────────────────────────────────────────── */
.sl-shell { width: 100%; max-width: 560px; margin: 0 auto; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px 32px; outline: none; display: flex; flex-direction: column; gap: 14px; }
.sl-panel { display: flex; flex-direction: column; gap: 14px; }
.sl-results { display: flex; flex-direction: column; gap: 14px; }
.sl-results:empty { display: none; }
.sl-card { background: var(--sl-panel); border-radius: var(--sl-r-card); box-shadow: var(--sl-ring), var(--sl-shadow); padding: 22px 20px; }
.sl-h2 { margin: 0 0 14px; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; display: flex; gap: 8px; align-items: center; }
.sl-h2 small { color: var(--sl-ink-faint); font-size: .8rem; font-weight: 700; }
.sl-fine { margin: 12px 0 0; color: var(--sl-ink-faint); font-size: .8rem; line-height: 1.55; }
.grad { background: var(--sl-title); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── 머리 ─────────────────────────────────────────────────────────── */
.sl-hero {
    position: relative; text-align: center; overflow: hidden;
    background: var(--sl-panel); border-radius: var(--sl-r-card); box-shadow: var(--sl-ring), var(--sl-shadow); padding: 26px 20px 20px;
}
.sl-hero::before {
    content: ''; position: absolute; inset: -45% -25% auto; height: 75%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(96, 165, 250, .26), transparent 70%);
}
.sl-kicker { position: relative; margin: 0 0 6px; color: var(--sl-cyan); font-size: .82rem; font-weight: 800; }
.sl-title { position: relative; margin: 0 0 10px; font-size: clamp(1.6rem, 7vw, 2.05rem); font-weight: 900; line-height: 1.25; letter-spacing: -.02em; }
.sl-lead { position: relative; margin: 0 auto 6px; max-width: 30em; color: var(--sl-ink-soft); font-size: .96rem; }

/* ── 입력 ─────────────────────────────────────────────────────────── */
.sl-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; min-width: 0; }
.sl-field label, .sl-label { font-size: .92rem; font-weight: 800; color: var(--sl-ink); padding: 0; }
.sl-field label small, .sl-label small { color: var(--sl-ink-faint); font-weight: 700; font-size: .8rem; margin-left: 4px; }
.sl-input { position: relative; }
.sl-input input {
    width: 100%; height: 51px; padding: 15px 52px 15px 16px; border: 1px solid var(--sl-line-ui); border-radius: var(--sl-r-field);
    background: rgba(10, 10, 18, .55); color: var(--sl-ink); font: inherit; font-size: 16px; font-weight: 800; letter-spacing: .01em;
    font-variant-numeric: tabular-nums; text-align: right; outline: none; transition: border-color .15s, box-shadow .15s;
}
.sl-input input:focus { border-color: var(--sl-blue); box-shadow: 0 0 0 3px rgba(96, 165, 250, .28); }
.sl-input .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--sl-ink-faint); font-size: .92rem; font-weight: 800; pointer-events: none; }
.sl-hint { margin: -2px 0 0; text-align: right; color: var(--sl-blue-ink); font-size: .84rem; font-weight: 700; min-height: 1.3em; }
.sl-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-card > .sl-quick { margin: -4px 0 16px; }
.sl-quick button {
    min-height: 33px; padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 800;
    color: var(--sl-ink); background: rgba(96, 165, 250, .10); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .28);
    transition: background-color .15s, transform .12s var(--sl-ease); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sl-quick button:hover { background: rgba(96, 165, 250, .2); }
.sl-quick button:active { transform: scale(.97); }
.sl-quick button.clear { color: var(--sl-ink-soft); background: transparent; box-shadow: inset 0 0 0 1px rgba(236, 233, 255, .14); }
.sl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.sl-stepper { display: flex; align-items: center; gap: 8px; height: 51px; padding: 0 6px; border-radius: var(--sl-r-field); background: rgba(10, 10, 18, .55); box-shadow: inset 0 0 0 1px var(--sl-line-ui); }
.sl-stepper button {
    flex: 0 0 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 1.25rem; font-weight: 900; line-height: 1;
    color: var(--sl-ink); background: var(--sl-surface-3); box-shadow: var(--sl-ring); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sl-stepper button:hover { background: #2d2650; }
.sl-stepper output { flex: 1; text-align: right; font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.sl-stepper .u { color: var(--sl-ink-faint); font-weight: 800; font-size: .9rem; margin-right: 2px; }

/* ── 버튼 ─────────────────────────────────────────────────────────── */
.sl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 51px;
    border: 0; border-radius: var(--sl-r-btn); padding: 16px 18px; font: inherit; font-size: .98rem; font-weight: 800; line-height: 1.2;
    cursor: pointer; color: var(--sl-ink); transition: transform .15s var(--sl-ease), box-shadow .2s, filter .2s, background-color .2s;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sl-btn:active { transform: translateY(1px) scale(.99); }
.sl-btn-primary { background: var(--sl-brand); color: var(--sl-on-fill); box-shadow: var(--sl-glow); }
.sl-btn-primary:hover { filter: brightness(1.05); }

/* ── 결과 ─────────────────────────────────────────────────────────── */
.sl-res { text-align: center; position: relative; overflow: hidden; }
.sl-res::before { content: ''; position: absolute; left: 50%; top: -40%; width: 120%; height: 80%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(96, 165, 250, .22), transparent 72%); pointer-events: none; }
.sl-res-label { position: relative; margin: 0 0 4px; color: var(--sl-ink-soft); font-size: .92rem; font-weight: 800; outline: none; }
.sl-big { position: relative; margin: 0; line-height: 1.15; }
.sl-big b { font-size: clamp(2.1rem, 10vw, 2.8rem); font-weight: 900; letter-spacing: -.02em; color: var(--sl-blue-ink); font-variant-numeric: tabular-nums; }
.sl-big span { margin-left: 4px; font-size: 1.1rem; font-weight: 800; color: var(--sl-ink-soft); }
.sl-res-sub { position: relative; margin: 6px 0 16px; color: var(--sl-ink-soft); font-size: .9rem; }
.sl-ratio { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.sl-ratio i { display: block; height: 100%; }
.sl-ratio i.a { background: var(--sl-brand); }
.sl-ratio i.b { background: linear-gradient(90deg, #ffb547, #ffc971); }
.sl-legend { position: relative; display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: .82rem; font-weight: 800; flex-wrap: wrap; }
.sl-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sl-legend .a { color: var(--sl-blue-ink); }
.sl-legend .a::before { background: var(--sl-blue); }
.sl-legend .b { color: var(--sl-amber); }
.sl-legend .b::before { background: var(--sl-amber); }
.sl-res .sl-fine { position: relative; text-align: left; }

.sl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.sl-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sl-table th, .sl-table td { padding: 10px 6px; text-align: left; border-bottom: 1px solid rgba(236, 233, 255, .07); white-space: nowrap; }
.sl-table thead th { color: var(--sl-ink-faint); font-size: .78rem; font-weight: 800; }
.sl-table tbody th { font-weight: 800; }
.sl-table td.rate { color: var(--sl-ink-soft); font-size: .82rem; }
.sl-table .num { text-align: right; }
.sl-table tfoot th, .sl-table tfoot td { font-weight: 900; border-bottom: 0; }
.sl-table tfoot tr:first-child th, .sl-table tfoot tr:first-child td { border-top: 1px solid rgba(236, 233, 255, .2); color: var(--sl-amber); }
.sl-table tfoot tr.net th, .sl-table tfoot tr.net td { color: var(--sl-blue-ink); font-size: 1rem; }

/* ── 다른 계산기로 가는 카드 ──────────────────────────────────────── */
.sl-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: var(--sl-ink); transition: transform .15s var(--sl-ease), background-color .2s; }
.sl-link:hover { transform: translateY(-1px); }
.sl-link-ico { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--sl-r-row); background: rgba(96, 165, 250, .12); font-size: 1.5rem; }
.sl-link-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sl-link-txt b { font-size: 1rem; font-weight: 900; }
.sl-link-txt small { color: var(--sl-ink-soft); font-size: .82rem; line-height: 1.4; }
.sl-link-go { flex: 0 0 auto; color: var(--sl-blue-ink); font-size: 1.2rem; font-weight: 900; }

/* ── 면책 ─────────────────────────────────────────────────────────── */
.sl-disclaimer { box-shadow: inset 0 0 0 1px rgba(255, 201, 113, .28), var(--sl-shadow); background: linear-gradient(180deg, rgba(255, 201, 113, .06), rgba(255, 201, 113, .02)), var(--sl-panel); }
.sl-disclaimer-main { margin: 0 0 10px; font-weight: 900; color: var(--sl-amber); }
.sl-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--sl-ink-soft); font-size: .86rem; line-height: 1.55; }

/* ── 폰 폭 ────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
    .sl-shell { padding-left: 12px; padding-right: 12px; }
    body .jjseo { padding-left: 12px; padding-right: 12px; }
    .sl-card, .sl-hero { padding-left: 16px; padding-right: 16px; }
    .sl-grid2 { grid-template-columns: 1fr; gap: 0; }
}
