@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  color-scheme: light dark;
  --bg: #f6f8fb; --surface: #fff; --surface-2: #f0f3f8;
  --text: #17243b; --text-2: #536079; --text-3: #6b7890;
  --accent: #1b64da; --accent-hover: #1457c2; --accent-soft: #eaf1fd;
  --line: #e4e9f1; --blue-2: #7ca8eb; --blue-3: #bdcff0;
  --success: #217865; --error: #b04042; --error-soft: #fff0ef;
  --shadow: 0 1px 2px rgba(25,48,81,.03), 0 8px 24px rgba(25,48,81,.045);
  --radius-sm: 12px; --radius: 16px; --radius-lg: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, a { transition: background 180ms ease-out, color 180ms ease-out, transform 180ms ease-out, box-shadow 180ms ease-out; }
button, summary { cursor: pointer; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button:active, .calc-card:active, .primary:active { transform: scale(.98); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 750; letter-spacing: -.02em; line-height: 1.35; }
h1 { font-size: 36px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
svg { display: block; flex-shrink: 0; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 20px; }
.skip { position: fixed; top: -80px; left: 20px; z-index: 10; background: var(--surface); padding: 12px 20px; border-radius: 12px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 750; letter-spacing: -.04em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: #fff; }
.edition { font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 20px; padding: 5px 10px; font-weight: 650; }
.header-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); padding: 8px 0 8px 8px; }
.header-link .icon { width: 16px; height: 16px; }
.hero { padding: 36px 0 0; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: 40px; line-height: 1.3; }
.hero h1 span { color: var(--accent); }
.hero-description { color: var(--text-2); margin-top: 16px; font-size: 16px; }
.hero-visual { margin-top: 28px; position: relative; background: var(--accent-soft); border-radius: var(--radius-lg); height: 240px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-orbit { position: absolute; width: 360px; height: 360px; right: -116px; top: -80px; border: 1px solid var(--blue-3); border-radius: 50%; opacity: .6; }
.hero-orbit::after { content: ''; width: 260px; height: 260px; position: absolute; top: 49px; left: 49px; border: 1px solid var(--blue-3); border-radius: 50%; }
.preview-card { width: 280px; padding: 24px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); z-index: 1; transform: rotate(-3deg); }
.hero-visual .preview-card { margin-bottom: 16px; }
.coin-art path:last-child { fill: none; }
.preview-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); }
.preview-top .icon { color: var(--accent); width: 20px; height: 20px; }
.preview-value { margin-top: 12px; font-size: 28px; line-height: 1.3; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.preview-value small { font-size: 14px; margin-left: 4px; font-weight: 500; }
.preview-bar { height: 8px; display: flex; gap: 4px; margin-top: 20px; }
.preview-bar span { border-radius: 8px; background: var(--accent); width: 74%; }
.preview-bar span:nth-child(2) { background: var(--blue-2); width: 18%; }
.preview-bar span:nth-child(3) { background: var(--blue-3); width: 8%; }
.preview-bottom { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.coin-art { width: 92px; height: 112px; position: absolute; right: 18px; bottom: 12px; z-index: 2; transform: rotate(8deg); color: var(--accent); }
.visual-note { position: absolute; left: 20px; bottom: 12px; font-size: 12px; color: var(--text-3); z-index: 3; }
.section { margin-top: 56px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading span { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc-card { padding: 24px 20px 20px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 192px; }
.calc-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(25,48,81,.03), 0 12px 28px rgba(25,48,81,.08); }
.icon-tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.icon-tile .icon { width: 28px; height: 28px; }
.calc-card p { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-top: 4px; }
.card-arrow { position: absolute; right: 20px; top: 24px; color: var(--text-3); width: 20px; height: 20px; }
.calc-card:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 112px; gap: 16px; }
.calc-card:last-child .card-arrow { top: 44px; }
.calc-card:last-child .card-copy { padding-right: 24px; }
.trust-panel { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: var(--radius-lg); background: var(--surface-2); }
.trust-panel > .icon { color: var(--accent); margin-top: 2px; }
.trust-panel h3 { font-size: 16px; }
.trust-panel p { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.intro-copy { color: var(--text-2); font-size: 14px; margin-top: 12px; }
.faq-list { margin-top: 16px; }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 16px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; display: block; width: 8px; height: 8px; border-right: 1.75px solid var(--text-3); border-bottom: 1.75px solid var(--text-3); transform: rotate(45deg); margin: 0 4px 4px 0; flex-shrink: 0; transition: transform 180ms ease-out; }
details[open] > summary::after { transform: rotate(225deg); margin-bottom: 0; }
details > p { font-size: 14px; color: var(--text-2); padding: 0 0 20px; }
.footer { padding: 40px 0 44px; margin-top: 48px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.footer-title { font-size: 14px; color: var(--text-2); font-weight: 700; margin-bottom: 12px; }
.footer p + p { margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.calculator-page { padding-bottom: 92px; }
.page-intro { position: relative; padding: 24px 0 32px; }
.page-intro .eyebrow { margin-bottom: 12px; }
.page-intro h1 { font-size: 28px; line-height: 1.35; padding-right: 72px; }
.page-intro p { font-size: 14px; color: var(--text-2); margin-top: 12px; }
.intro-art { position: absolute; top: 28px; right: 0; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; transform: rotate(7deg); }
.intro-art .icon { width: 36px; height: 36px; }
.form-panel { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.panel-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 24px; }
.panel-top h2 { font-size: 18px; }
.live-badge { display: flex; gap: 6px; align-items: center; color: var(--text-3); font-size: 12px; }
.live-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.field { min-width: 0; margin-top: 24px; }
.field:first-child { margin-top: 0; }
.field-label, .field > label, legend { display: block; font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; padding: 0; }
.input-wrap { display: flex; align-items: center; gap: 8px; padding: 12px 16px; min-height: 60px; border-radius: var(--radius-sm); background: var(--surface-2); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 180ms ease-out; }
.input-wrap:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.input-wrap:has([aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--error); }
.input-wrap input { width: 100%; min-width: 0; padding: 0; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 22px; font-weight: 650; line-height: 1.5; font-variant-numeric: tabular-nums; }
.input-wrap input:focus-visible { outline: 0; }
.input-wrap > span { color: var(--text-3); font-size: 14px; flex-shrink: 0; }
.primary-field .input-wrap { min-height: 72px; }
.primary-field input { font-size: 28px; letter-spacing: -.03em; }
.field-hint { color: var(--text-3); font-size: 12px; margin-top: 8px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field-row .field { margin-top: 24px; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border-radius: 24px; background: var(--surface-2); color: var(--text-2); padding: 6px 12px; min-height: 36px; font-size: 12px; font-weight: 600; }
.chip:hover { background: var(--accent-soft); color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); }
.segment { position: relative; flex: 1; min-width: 0; display: flex; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment span { width: 100%; display: flex; align-items: center; justify-content: center; padding: 10px 4px; border-radius: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; line-height: 1.4; text-align: center; transition: background 180ms ease-out, color 180ms ease-out; min-height: 44px; }
.segment span:hover { color: var(--accent); }
.segment input:checked + span { background: var(--surface); color: var(--accent); font-weight: 700; box-shadow: 0 1px 4px rgba(25,48,81,.07); }
.segment input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-details { border: 0; margin-top: 20px; }
.form-details > summary { font-size: 14px; padding: 8px 0; color: var(--text-2); }
.notice { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.6; color: var(--text-2); padding: 16px; background: var(--accent-soft); border-radius: var(--radius-sm); margin-top: 24px; }
.notice .icon { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.error-box { border-radius: var(--radius-sm); padding: 20px; background: var(--error-soft); color: var(--error); margin-top: 20px; font-size: 14px; }
.error-box strong { display: block; margin-bottom: 4px; }
.retry { display: inline-flex; padding: 8px 16px; margin-top: 12px; border-radius: 10px; background: var(--surface); color: var(--accent); font-size: 14px; font-weight: 650; }
.result { margin-top: 32px; padding: 28px 24px 24px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: 24px; animation: appear 220ms ease-out; }
.result-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 14px; }
.result-illustration { width: 36px; height: 36px; background: var(--accent-soft); border-radius: 12px; display: grid; place-items: center; color: var(--accent); }
.result-label { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.result-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; color: var(--accent); line-height: 1.35; margin-top: 8px; font-variant-numeric: tabular-nums; }
.result-amount output { font-size: clamp(36px, 7.5vw, 44px); font-weight: 750; letter-spacing: -.04em; overflow-wrap: anywhere; min-width: 0; }
.result-amount span { font-size: 18px; font-weight: 600; }
.result-context { font-size: 12px; color: var(--text-3); margin-top: 12px; }
.chart { margin-top: 28px; }
.stacked-bar { height: 12px; display: flex; gap: 3px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.stacked-bar span { display: block; background: var(--accent); border-radius: 4px; min-width: 0; }
.stacked-bar span:nth-child(2) { background: var(--blue-2); }
.stacked-bar span:nth-child(3) { background: var(--blue-3); }
.chart-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.chart-legend b { font-weight: 600; color: var(--text-2); }
.breakdown { margin: 24px 0 0; }
.breakdown div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.breakdown dt { font-size: 14px; color: var(--text-2); }
.breakdown dd { margin: 0; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.breakdown .total { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.breakdown .total dt, .breakdown .total dd { color: var(--accent); font-weight: 700; }
.deduction-row { flex-wrap: wrap; gap: 8px 16px !important; }
.deduction-bar { flex-basis: 100%; height: 4px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.deduction-bar i { display: block; height: 100%; border-radius: 8px; background: var(--blue-2); }
.result-note { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.share-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; min-height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); width: 100%; font-size: 14px; font-weight: 650; margin-top: 24px; }
.share-button:hover { background: var(--accent-soft); color: var(--accent); }
.share-button .icon { width: 18px; height: 18px; }
.copy-fallback { margin-top: 16px; }
.copy-fallback input { width: 100%; color: var(--text); border: 0; background: var(--surface-2); padding: 12px; border-radius: 12px; font-size: 14px; margin-top: 8px; }
.copy-fallback label, .copy-fallback p { color: var(--text-2); font-size: 12px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 108px; z-index: 20; background: var(--text); color: var(--surface); padding: 12px 20px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 40px); text-align: center; }
.table-details { margin-top: 24px; border-bottom: 0; }
.table-details > summary { padding: 12px 0; font-size: 14px; }
.table-wrap { max-height: 400px; overflow: auto; border-radius: 12px; background: var(--surface-2); }
table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 12px; color: var(--text-2); }
th, td { padding: 12px 8px; text-align: right; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { color: var(--text-2); font-weight: 650; background: var(--surface-2); position: sticky; top: 0; }
th:first-child, td:first-child { text-align: left; }
.table-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.affiliate-area { margin-top: 32px; }
.affiliate-area h2 { font-size: 18px; margin-bottom: 12px; }
.affiliate-card { display: flex; gap: 12px; align-items: center; padding: 20px; border-radius: 16px; background: var(--surface); margin-top: 12px; box-shadow: var(--shadow); }
.affiliate-card .icon-tile { width: 40px; height: 40px; border-radius: 12px; }
.affiliate-copy { flex: 1; }
.affiliate-copy strong { font-size: 14px; }
.affiliate-copy p { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.platform { font-size: 12px; color: var(--text-3); }
.affiliate-card.disabled { background: var(--surface-2); color: var(--text-3); box-shadow: none; }
.affiliate-card.disabled .icon-tile { background: var(--line); color: var(--text-3); }
.affiliate-card.disabled .platform { white-space: nowrap; }
.disclosure { color: var(--text-3); font-size: 12px; margin-top: 12px; }
.banner-slot { margin-top: 24px; }
.banner-slot iframe { display: block; border: 0; border-radius: 12px; }
.banner-preview { height: 140px; background: var(--surface-2); border-radius: 16px; color: var(--text-3); font-size: 14px; display: grid; place-items: center; }
.sources { margin-top: 40px; }
.sources > summary { font-size: 14px; }
.source-updated { font-size: 12px; color: var(--text-3); padding-bottom: 16px; }
.source-list { display: grid; gap: 20px; margin: 0; padding-bottom: 20px; }
.source-list dt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; }
.source-list dd { margin: 4px 0 0; font-size: 12px; color: var(--text-3); }
.source-list a { display: inline-block; margin-top: 4px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.verification { font-size: 12px; color: var(--success); background: var(--surface-2); border-radius: 16px; padding: 2px 8px; font-weight: 500; }
.verification.unverified { color: var(--text-2); }
.other-calculators { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.other-calculators a { background: var(--surface-2); color: var(--text-2); font-size: 14px; border-radius: 24px; padding: 8px 16px; }
.other-calculators a:hover { color: var(--accent); background: var(--accent-soft); }
.action-dock { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
.action-dock-inner { max-width: 560px; margin: 0 auto; }
.primary { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; padding: 16px 20px; border-radius: 16px; min-height: 56px; }
.primary:hover { background: var(--accent-hover); color: #fff; }
.primary .icon { width: 20px; height: 20px; }
.skeleton { height: 196px; margin-top: 32px; background: var(--surface); padding: 24px; border-radius: 24px; }
.skeleton span { display: block; background: var(--surface-2); height: 20px; width: 45%; border-radius: 8px; margin: 12px 0; animation: pulse 1.2s ease-in-out infinite; }
.skeleton span:nth-child(2) { width: 85%; height: 44px; }
.test-summary { padding: 24px; border-radius: 24px; background: var(--accent-soft); margin: 24px 0; }
.test-case { padding: 20px 0; border-bottom: 1px solid var(--line); }
.test-case p { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.pass { color: var(--success); }
.fail { color: var(--error); }
.not-found { padding: 56px 0; }
.not-found h1 { margin: 24px 0 16px; }
.not-found .primary { margin-top: 32px; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .4; } }
@media (min-width: 700px) {
  .container { padding: 0 24px; }
  .hero { padding-top: 48px; }
  .hero-visual { height: 260px; }
  .preview-card { width: 320px; }
  .preview-value { font-size: 36px; }
  .coin-art { right: 40px; bottom: 20px; width: 108px; height: 128px; }
  .page-intro { padding-top: 40px; padding-bottom: 40px; }
  .page-intro h1 { font-size: 36px; padding-right: 88px; }
  .intro-art { top: 44px; width: 72px; height: 72px; }
  .calculator-page { padding-bottom: 0; }
  .action-dock { position: static; background: transparent; padding: 24px 0 0; box-shadow: none; }
}
@media (max-width: 389px) {
  .hero h1 { font-size: 36px; }
  .hero-visual { height: 220px; }
  .preview-card { width: 252px; padding: 20px; }
  .preview-value { font-size: 28px; }
  .coin-art { width: 76px; height: 92px; right: 4px; }
  .calc-card { padding: 20px 16px; }
  .calc-card h3 { font-size: 16px; }
  .calc-card p { font-size: 12px; }
  .form-panel, .result { padding: 24px 20px; }
  .field-row { gap: 12px; }
  .field-row .input-wrap { padding: 12px; }
  .field-row input { font-size: 18px; }
  .segment span { font-size: 12px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101722; --surface: #1a2433; --surface-2: #222e40;
    --text: #edf2fb; --text-2: #b4c0d4; --text-3: #8f9fb8;
    --accent: #81afff; --accent-hover: #9cc0ff; --accent-soft: #213652;
    --line: #2d3a4e; --blue-2: #4f80cb; --blue-3: #3a557d;
    --success: #8acbb5; --error: #ffafac; --error-soft: #3c272d;
    --shadow: 0 1px 2px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.12);
  }
  .brand-mark, .primary { background: #276fe4; color: #fff; }
  .primary:hover { background: #367cf0; }
  input[type="date"] { color-scheme: dark; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
