/* ============================================================================
   옷·신발 사이즈 환산 (/size/ · women · men · shoes) — 전용 스타일
   ----------------------------------------------------------------------------
   공용 다크 레이어(lib/theme.php)에서 제외돼 있어 여기 있는 것이 전부다(배경만 jjam_theme_backdrop_style()).
   /salary/ · /loan/ 과 같은 카드 틀(이름표 sz-) — 반경 카드 24 · 버튼 16 · 입력 15 · 줄 14 · 칩 알약, 입력칸·행동 버튼 높이 51.
   표가 넓어 본문 폭만 760. 폰에서는 표를 옆으로 밀고, 첫 칸(한국)은 붙어 있게(sticky).
   글자 대비: 본문 #ece9ff(15:1) · 보조 #b9b3d8(9:1) · 흐림 #9995b5(6.3:1) · 강조 #8ec5ff(9:1).
   ========================================================================= */

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

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background-color: var(--sz-bg); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    color: var(--sz-ink); font-family: var(--sz-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(--sz-blue-ink); }
.sz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

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

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

/* ── 머리 ─────────────────────────────────────────────────────────── */
.sz-hero {
    position: relative; text-align: center; overflow: hidden;
    background: var(--sz-panel); border-radius: var(--sz-r-card); box-shadow: var(--sz-ring), var(--sz-shadow); padding: 26px 20px 20px;
}
.sz-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%);
}
.sz-kicker { position: relative; margin: 0 0 6px; color: var(--sz-cyan); font-size: .82rem; font-weight: 800; }
.sz-title { position: relative; margin: 0 0 10px; font-size: clamp(1.6rem, 7vw, 2.15rem); font-weight: 900; line-height: 1.25; letter-spacing: -.02em; }
.sz-lead { position: relative; margin: 0 auto 16px; max-width: 32em; color: var(--sz-ink-soft); font-size: .96rem; }
.sz-nav { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sz-nav a {
    display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border-radius: 999px; text-decoration: none;
    color: var(--sz-ink); font-size: .88rem; font-weight: 800; background: rgba(96, 165, 250, .08); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .24);
}
.sz-nav a:hover { background: rgba(96, 165, 250, .16); }
.sz-nav a[aria-current="page"] { color: var(--sz-on-fill); background: var(--sz-brand); box-shadow: var(--sz-glow); }

/* ── 입력 ─────────────────────────────────────────────────────────── */
.sz-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; min-width: 0; }
.sz-field label, .sz-label { font-size: .92rem; font-weight: 800; color: var(--sz-ink); padding: 0; }
.sz-field label small { color: var(--sz-ink-faint); font-weight: 700; font-size: .8rem; margin-left: 4px; }
.sz-input { position: relative; }
.sz-input input {
    width: 100%; height: 51px; padding: 15px 48px 15px 16px; border: 1px solid var(--sz-line-ui); border-radius: var(--sz-r-field);
    background: rgba(10, 10, 18, .55); color: var(--sz-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;
    -webkit-appearance: none; appearance: none;
}
.sz-input input::placeholder { color: var(--sz-ink-faint); font-weight: 700; opacity: 1; }
.sz-input input:focus { border-color: var(--sz-blue); box-shadow: 0 0 0 3px rgba(96, 165, 250, .28); }
.sz-input .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--sz-ink-faint); font-size: .92rem; font-weight: 800; pointer-events: none; }
.sz-search input { text-align: left; padding-right: 16px; }
.sz-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sz-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }

.sz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sz-chips button {
    min-height: 33px; padding: 6px 12px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 800;
    color: var(--sz-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(--sz-ease); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sz-chips button:hover { background: rgba(96, 165, 250, .2); }
.sz-chips button:active { transform: scale(.97); }

.sz-seg { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sz-seg legend { margin-bottom: 8px; }
.sz-seg label { position: relative; display: block; cursor: pointer; }
.sz-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sz-seg span {
    display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px; border-radius: var(--sz-r-row); text-align: center;
    font-weight: 900; font-size: .94rem; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(236, 233, 255, .12); transition: background-color .15s, box-shadow .15s;
}
.sz-seg input:checked + span { background: linear-gradient(135deg, rgba(96, 165, 250, .22), rgba(34, 211, 238, .14)); box-shadow: inset 0 0 0 2px var(--sz-blue); color: var(--sz-blue-ink); }
.sz-seg input:focus-visible + span { outline: 2px solid var(--sz-cyan); outline-offset: 3px; }

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

/* ── 검색 결과 ────────────────────────────────────────────────────── */
.sz-results { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sz-results:empty { display: none; }
.sz-results li { padding: 12px 14px; border-radius: var(--sz-r-row); background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(236, 233, 255, .08); }
.sz-results .t { margin: 0 0 2px; color: var(--sz-blue-ink); font-size: .82rem; font-weight: 900; }
.sz-results .d { margin: 0; font-size: .9rem; font-weight: 700; line-height: 1.55; font-variant-numeric: tabular-nums; }
.sz-results li.sz-empty { color: var(--sz-ink-soft); font-size: .86rem; box-shadow: none; background: transparent; padding: 4px 2px; }
.sz-link-btn {
    display: inline-block; margin-top: 8px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800;
    color: var(--sz-cyan); text-decoration: underline; text-decoration-color: rgba(34, 211, 238, .4); text-underline-offset: 3px;
}

/* ── 추천 결과 카드 ───────────────────────────────────────────────── */
.sz-results-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.sz-results-cards:empty { display: none; }
.sz-res { position: relative; overflow: hidden; }
.sz-res::before { content: ''; position: absolute; left: 50%; top: -50%; width: 130%; height: 90%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(96, 165, 250, .2), transparent 72%); pointer-events: none; }
.sz-res-label { position: relative; margin: 0 0 2px; color: var(--sz-ink-soft); font-size: .9rem; font-weight: 800; }
.sz-big { position: relative; margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--sz-ink-soft); line-height: 1.2; }
.sz-big b { font-size: clamp(2rem, 9vw, 2.5rem); font-weight: 900; letter-spacing: -.02em; color: var(--sz-blue-ink); font-variant-numeric: tabular-nums; margin-left: 4px; }
.sz-big span { margin-left: 4px; font-size: 1rem; font-weight: 800; color: var(--sz-ink-soft); }
.sz-res-sub { position: relative; margin: 6px 0 12px; color: var(--sz-ink-faint); font-size: .84rem; }
.sz-kv { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sz-kv li { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(236, 233, 255, .08); }
.sz-kv span { color: var(--sz-ink-faint); font-size: .74rem; font-weight: 800; }
.sz-kv b { font-size: 1.02rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.sz-warn { color: var(--sz-amber); }
.sz-res-foot { position: relative; }

/* ── 표 ───────────────────────────────────────────────────────────── */
/* ⚠️ 여백을 음수로 늘리지 말 것 — 첫 칸 고정(sticky)이 상자 안쪽 여백 자리에 붙어, 그 왼쪽 틈으로 뒤 칸 글자가 비쳤다. */
.sz-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.sz-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.sz-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sz-table th, .sz-table td { padding: 9px 8px; text-align: center; border-bottom: 1px solid rgba(236, 233, 255, .07); white-space: nowrap; }
.sz-table thead th { color: var(--sz-ink-faint); font-size: .76rem; font-weight: 800; }
.sz-table tbody th { font-weight: 900; color: var(--sz-blue-ink); }
.sz-table td.m { color: var(--sz-ink-soft); font-size: .82rem; }
/* 첫 칸 고정 — 옆으로 밀어도 어느 줄인지 보이게 */
.sz-table th:first-child { position: sticky; left: 0; z-index: 1; background: #151325; box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .6); }
.sz-table thead th:first-child { background: #161425; }
.sz-table tbody tr:hover td, .sz-table tbody tr:hover th { background-color: rgba(96, 165, 250, .06); }
.sz-table tbody tr.hit td, .sz-table tbody tr.hit th { background-color: rgba(96, 165, 250, .2); color: var(--sz-ink); }
.sz-table tbody tr.hit th:first-child { box-shadow: inset 3px 0 0 var(--sz-blue), 6px 0 8px -6px rgba(0, 0, 0, .6); }
.sz-more { margin: 12px 0 0; font-size: .86rem; font-weight: 800; }
.sz-more a { text-decoration: none; }

/* ── 입구 카드 ────────────────────────────────────────────────────── */
.sz-cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.sz-go { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--sz-ink); transition: transform .15s var(--sz-ease); }
.sz-go:hover { transform: translateY(-2px); }
.sz-go-ico { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.sz-go b { font-size: 1.05rem; font-weight: 900; }
.sz-go small { color: var(--sz-ink-soft); font-size: .84rem; line-height: 1.45; }

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

/* ── 폰 폭 ────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
    .sz-shell { padding-left: 12px; padding-right: 12px; }
    body .jjseo { padding-left: 12px; padding-right: 12px; }
    .sz-card, .sz-hero { padding-left: 16px; padding-right: 16px; }
    .sz-nav a { padding: 6px 11px; font-size: .84rem; }
}
