  :root {
    --navy:       #0B1E3D;
    --navy-mid:   #132848;
    --navy-light: #1C3A60;
    --teal:       #0D7A5F;
    --teal-bright:#10A87E;
    --teal-glow:  #13C994;
    --red:        #E05555;
    --red-glow:   #FF6B6B;
    --gold:       #E8B84B;
    --text-primary:  #F0F4FA;
    --text-secondary:#8BA3C0;
    --text-muted:    #4A6585;
    --border:        rgba(255,255,255,0.07);
    --card-bg:       rgba(19,40,72,0.6);
    --input-bg:      rgba(11,30,61,0.8);
  }

  * { margin:0; padding:0; box-sizing:border-box; }

  body {
    font-family:'Noto Sans KR',sans-serif;
    background:var(--navy);
    color:var(--text-primary);
    min-height:100vh;
    overflow-x:hidden;
  }

  body::before {
    content:'';
    position:fixed; inset:0;
    background-image:
      linear-gradient(rgba(13,122,95,0.04) 1px,transparent 1px),
      linear-gradient(90deg,rgba(13,122,95,0.04) 1px,transparent 1px);
    background-size:40px 40px;
    pointer-events:none; z-index:0;
  }

  .bg-glow {
    position:fixed; border-radius:50%;
    filter:blur(130px); pointer-events:none; z-index:0;
  }
  .bg-glow-1 {
    width:500px; height:500px;
    background:radial-gradient(circle,rgba(13,122,95,0.1) 0%,transparent 70%);
    top:-150px; right:-100px;
  }

  /* ===== 헤더 ===== */
  header {
    position:sticky; top:0; z-index:100;
    background:rgba(11,30,61,0.88);
    backdrop-filter:blur(20px);
    border-bottom:1px solid var(--border);
    padding:0 40px; height:64px;
    display:flex; align-items:center; justify-content:space-between;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }
  .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--teal), var(--teal-bright));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Mono", monospace;
    font-weight: 500;
    font-size: 14px;
    color: white;
    letter-spacing: -0.5px;
  }
  .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
  }
  .logo-text span {
    color: var(--teal-glow);
  }

  nav { display:flex; gap:4px; }
  nav a {
    padding:6px 14px; font-size:13px; font-weight:500;
    color:var(--text-secondary); text-decoration:none;
    border-radius:8px; transition:all .2s;
  }
  nav a:hover { color:var(--text-primary); background:rgba(255,255,255,0.06); }

  /* ===== 브레드크럼 + 제목 ===== */
  .page-header {
    position:relative; z-index:1;
    max-width:1000px; margin:0 auto;
    padding:40px 40px 0;
  }
  .breadcrumb {
    display:flex; align-items:center; gap:6px;
    font-size:12px; color:var(--text-muted); margin-bottom:20px;
  }
  .breadcrumb a { color:var(--text-muted); text-decoration:none; }
  .breadcrumb a:hover { color:var(--teal-glow); }
  .breadcrumb-sep { color:var(--text-muted); }

  .page-title-wrap { display:flex; align-items:flex-start; gap:16px; }
  .page-icon {
    width:52px; height:52px; flex-shrink:0;
    background:linear-gradient(135deg,rgba(13,122,95,0.3),rgba(13,201,148,0.1));
    border:1px solid rgba(19,201,148,0.2);
    border-radius:16px;
    display:flex; align-items:center; justify-content:center;
    font-size:24px;
  }
  .page-title-text h1 {
    font-size:26px; font-weight:900;
    letter-spacing:-0.5px; line-height:1.2;
  }
  .page-title-text p {
    font-size:13px; color:var(--text-secondary); margin-top:6px; line-height:1.6;
  }

  /* ===== 광고 슬롯 ===== */
  .ad-slot {
    position:relative; z-index:1;
    max-width:1000px; margin:28px auto 0;
    padding:0 40px;
  }
  .ad-inner {
    background:rgba(255,255,255,0.02);
    border:1px dashed rgba(255,255,255,0.08);
    border-radius:12px; height:90px;
    display:flex; align-items:center; justify-content:center;
    font-size:12px; color:var(--text-muted);
  }

  /* ===== 메인 레이아웃 ===== */
  .main-layout {
    position:relative; z-index:1;
    max-width:1000px; margin:32px auto 0;
    padding:0 40px 80px;
    display:grid;
    grid-template-columns:1fr 360px;
    gap:24px;
    align-items:start;
  }

  /* ===== 계산기 카드 ===== */
  .calc-card {
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:20px;
    overflow:hidden;
  }

  .calc-card-header {
    padding:20px 24px;
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:10px;
  }
  .calc-card-header h2 { font-size:15px; font-weight:700; }


  /* 수수료·세금 행 */
  .fee-row {
    padding:16px 24px;
    border-bottom:1px solid var(--border);
    display:flex; gap:12px;
  }
  .fee-field { flex:1; }
  .field-label {
    font-size:11px; color:var(--text-muted);
    margin-bottom:6px; font-weight:500;
  }
  .input-wrap {
    position:relative; display:flex; align-items:center;
  }
  .input-wrap input {
    width:100%; background:var(--input-bg);
    border:1px solid var(--border);
    border-radius:10px; padding:10px 36px 10px 12px;
    font-size:14px; font-family:'DM Mono',monospace;
    color:var(--text-primary); outline:none;
    transition:border-color .2s;
  }
  .input-wrap input:focus {
    border-color:rgba(19,201,148,0.4);
    box-shadow:0 0 0 3px rgba(19,201,148,0.06);
  }
  .input-unit {
    position:absolute; right:12px;
    font-size:12px; color:var(--text-muted);
    font-family:'DM Mono',monospace;
    pointer-events:none;
  }

  /* 메인 입력 영역 */
  .inputs-section { padding:20px 24px; }

  .input-group {
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:12px;
    margin-bottom:16px;
  }
  .input-field {}
  .input-field label {
    font-size:12px; color:var(--text-secondary);
    display:block; margin-bottom:7px; font-weight:500;
  }
  .input-field input {
    width:100%; background:var(--input-bg);
    border:1px solid var(--border);
    border-radius:12px; padding:13px 14px;
    font-size:16px; font-family:'DM Mono',monospace;
    color:var(--text-primary); outline:none;
    transition:all .2s; text-align:right;
  }
  .input-field input:focus {
    border-color:rgba(19,201,148,0.4);
    box-shadow:0 0 0 3px rgba(19,201,148,0.06);
  }
  .input-field input.buy-input:focus { border-color:rgba(100,149,237,0.4); box-shadow:0 0 0 3px rgba(100,149,237,0.06); }
  .input-field input.sell-input:focus { border-color:rgba(19,201,148,0.4); box-shadow:0 0 0 3px rgba(19,201,148,0.06); }

  /* 버튼 행 */
  .btn-row {
    display:flex; gap:10px;
    padding:0 24px 24px;
  }
  .btn-calc {
    flex:1; padding:15px;
    background:linear-gradient(135deg,var(--teal),var(--teal-bright));
    border:none; border-radius:12px;
    font-size:15px; font-weight:700;
    color:white; cursor:pointer;
    font-family:'Noto Sans KR',sans-serif;
    transition:all .2s;
    box-shadow:0 4px 20px rgba(13,122,95,0.3);
  }
  .btn-calc:hover {
    transform:translateY(-2px);
    box-shadow:0 8px 28px rgba(13,122,95,0.4);
  }
  .btn-calc:active { transform:translateY(0); }
  .btn-reset {
    padding:15px 20px;
    background:rgba(255,255,255,0.04);
    border:1px solid var(--border);
    border-radius:12px;
    font-size:14px; color:var(--text-secondary);
    cursor:pointer; font-family:'Noto Sans KR',sans-serif;
    transition:all .2s;
  }
  .btn-reset:hover { background:rgba(255,255,255,0.08); color:var(--text-primary); }

  /* ===== 결과 카드 ===== */
  .result-card {
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:20px;
    overflow:hidden;
    position:sticky;
    top:88px;
    transition:all .4s ease;
  }

  .result-header {
    padding:20px 24px;
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between;
  }
  .result-header h2 { font-size:15px; font-weight:700; }
  .result-status {
    font-size:11px; padding:3px 10px;
    border-radius:100px; font-weight:600;
  }
  .status-ready { background:rgba(255,255,255,0.06); color:var(--text-muted); }
  .status-profit { background:rgba(13,201,148,0.15); color:var(--teal-glow); }
  .status-loss { background:rgba(224,85,85,0.15); color:var(--red-glow); }

  /* 수익률 큰 숫자 */
  .rate-display {
    padding:28px 24px 20px;
    text-align:center;
  }
  .rate-label { font-size:12px; color:var(--text-muted); margin-bottom:10px; }
  .rate-value {
    font-family:'DM Mono',monospace;
    font-size:52px; font-weight:500;
    line-height:1;
    transition:all .4s ease;
    color:var(--text-muted);
  }
  .rate-value.profit { color:var(--teal-glow); }
  .rate-value.loss   { color:var(--red-glow); }

  /* 수익률 바 */
  .rate-bar-wrap {
    padding:0 24px 24px;
  }
  .rate-bar-bg {
    height:8px; border-radius:100px;
    background:rgba(255,255,255,0.06);
    position:relative; overflow:hidden;
  }
  .rate-bar-fill {
    height:100%; border-radius:100px;
    width:0%;
    transition:width .6s cubic-bezier(.25,.8,.25,1);
    background:linear-gradient(90deg,var(--teal),var(--teal-glow));
  }
  .rate-bar-fill.loss {
    background:linear-gradient(90deg,#c0392b,var(--red-glow));
    margin-left:auto;
  }
  .rate-bar-center {
    position:absolute; left:50%; top:0; bottom:0;
    width:2px; background:rgba(255,255,255,0.15);
    transform:translateX(-50%);
  }

  /* 상세 수치 */
  .detail-rows {
    padding:0 24px 20px;
    display:flex; flex-direction:column; gap:0;
  }
  .detail-row {
    display:flex; align-items:center; justify-content:space-between;
    padding:11px 0;
    border-bottom:1px solid rgba(255,255,255,0.04);
    font-size:13px;
  }
  .detail-row:last-child { border-bottom:none; }
  .detail-row-label { color:var(--text-secondary); }
  .detail-row-value {
    font-family:'DM Mono',monospace; font-weight:500;
    color:var(--text-primary);
  }
  .detail-row-value.highlight-green { color:var(--teal-glow); }
  .detail-row-value.highlight-red   { color:var(--red-glow); }
  .detail-row-value.muted { color:var(--text-muted); }

  /* 손익분기 */
  .breakeven-box {
    margin:0 24px 20px;
    background:rgba(232,184,75,0.08);
    border:1px solid rgba(232,184,75,0.2);
    border-radius:12px;
    padding:14px 16px;
  }
  .breakeven-label {
    font-size:11px; font-weight:700; letter-spacing:0.5px;
    color:var(--gold); margin-bottom:6px;
  }
  .breakeven-value {
    font-family:'DM Mono',monospace;
    font-size:20px; font-weight:500;
    color:var(--gold);
  }
  .breakeven-sub { font-size:11px; color:var(--text-muted); margin-top:4px; }

  /* 도넛 차트 */
  .chart-section {
    padding:0 24px 24px;
  }
  .chart-label { font-size:11px; color:var(--text-muted); margin-bottom:14px; font-weight:700; letter-spacing:0.5px; text-transform:uppercase; }
  .donut-wrap {
    position:relative; width:140px; height:140px; margin:0 auto 16px;
  }
  .donut-svg { width:100%; height:100%; transform:rotate(-90deg); }
  .donut-bg { fill:none; stroke:rgba(255,255,255,0.06); stroke-width:14; }
  .donut-profit { fill:none; stroke:var(--teal-glow); stroke-width:14; stroke-linecap:round; transition:stroke-dashoffset .8s cubic-bezier(.25,.8,.25,1); }
  .donut-fee    { fill:none; stroke:var(--gold); stroke-width:14; stroke-linecap:round; transition:stroke-dashoffset .8s cubic-bezier(.25,.8,.25,1); }
  .donut-tax    { fill:none; stroke:var(--red-glow); stroke-width:14; stroke-linecap:round; transition:stroke-dashoffset .8s cubic-bezier(.25,.8,.25,1); }
  .donut-center {
    position:absolute; inset:0;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
  }
  .donut-center-label { font-size:10px; color:var(--text-muted); }
  .donut-center-value { font-family:'DM Mono',monospace; font-size:14px; font-weight:500; color:var(--text-secondary); }

  .chart-legend {
    display:flex; flex-direction:column; gap:8px;
  }
  .legend-item {
    display:flex; align-items:center; gap:8px;
    font-size:12px; color:var(--text-secondary);
  }
  .legend-dot { width:8px; height:8px; border-radius:2px; flex-shrink:0; }

  /* 공유 버튼 */
  .share-row {
    padding:16px 24px;
    border-top:1px solid var(--border);
    display:flex; gap:8px;
  }
  .btn-share {
    flex:1; padding:11px;
    border:1px solid var(--border);
    background:rgba(255,255,255,0.04);
    border-radius:10px;
    font-size:12px; font-weight:600;
    color:var(--text-secondary);
    cursor:pointer; font-family:'Noto Sans KR',sans-serif;
    transition:all .2s;
    display:flex; align-items:center; justify-content:center; gap:6px;
  }
  .btn-share:hover { background:rgba(255,255,255,0.08); color:var(--text-primary); }

  /* ===== SEO 설명 섹션 ===== */
  .seo-section {
    position:relative; z-index:1;
    max-width:1000px; margin:0 auto;
    padding:0 40px 40px;
  }
  .seo-card {
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:20px;
    padding:32px;
  }
  .seo-card h2 {
    font-size:17px; font-weight:700; margin-bottom:16px;
  }
  .seo-card p {
    font-size:14px; color:var(--text-secondary);
    line-height:1.8; margin-bottom:14px;
  }
  .seo-card p:last-child { margin-bottom:0; }
  .formula-box {
    background:rgba(13,122,95,0.08);
    border:1px solid rgba(13,201,148,0.15);
    border-radius:12px;
    padding:16px 20px;
    margin:16px 0;
    font-family:'DM Mono',monospace;
    font-size:13px; color:var(--teal-glow);
    line-height:1.8;
  }

  /* FAQ */
  .faq-section {
    position:relative; z-index:1;
    max-width:1000px; margin:0 auto;
    padding:0 40px 60px;
  }
  .faq-title { font-size:17px; font-weight:700; margin-bottom:16px; }
  .faq-item {
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:14px;
    overflow:hidden;
    margin-bottom:8px;
  }
  .faq-q {
    padding:18px 20px;
    cursor:pointer;
    display:flex; align-items:center; justify-content:space-between;
    font-size:14px; font-weight:500;
    transition:background .2s;
  }
  .faq-q:hover { background:rgba(255,255,255,0.03); }
  .faq-q-icon { color:var(--teal-glow); font-size:18px; transition:transform .3s; flex-shrink:0; }
  .faq-a {
    display:none;
    padding:0 20px 18px;
    font-size:13px; color:var(--text-secondary); line-height:1.8;
  }
  .faq-item.open .faq-a { display:block; }
  .faq-item.open .faq-q-icon { transform:rotate(45deg); }

  /* 하단 광고 */
  .ad-slot-bottom {
    position:relative; z-index:1;
    max-width:1000px; margin:0 auto 0;
    padding:0 40px 40px;
  }

  /* 관련 계산기 */
  .related-section {
    position:relative; z-index:1;
    max-width:1000px; margin:0 auto;
    padding:0 40px 60px;
  }
  .related-title { font-size:15px; font-weight:700; margin-bottom:14px; }
  .related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
  .related-card {
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:14px;
    padding:18px;
    text-decoration:none;
    display:flex; align-items:center; gap:12px;
    transition:all .25s;
  }
  .related-card:hover {
    border-color:rgba(19,201,148,0.25);
    transform:translateY(-2px);
  }
  .related-icon { font-size:22px; }
  .related-text { display:flex; flex-direction:column; gap:3px; }
  .related-name { font-size:13px; font-weight:700; color:var(--text-primary); }
  .related-desc { font-size:11px; color:var(--text-muted); }

  /* 푸터 */
  footer {
    position:relative; z-index:1;
    border-top:1px solid var(--border);
    padding:32px 40px;
    max-width:1000px; margin:0 auto;
    display:flex; align-items:center; justify-content:space-between;
  }
  .footer-logo { font-size:14px; font-weight:700; color:var(--text-secondary); }
  .footer-logo span { color:var(--teal-glow); }
  .footer-note { font-size:11px; color:var(--text-muted); }

  /* ===== 사용법 스텝 ===== */
  .steps-flow {
    display:grid;
    grid-template-columns:1fr 28px 1fr 28px 1fr;
    align-items:stretch;
    gap:0;
    margin:24px 0;
  }
  .step-card {
    background:rgba(255,255,255,0.03);
    border:1px solid var(--border);
    border-radius:16px;
    padding:18px;
    display:flex;
    flex-direction:column;
  }
  .step-badge {
    display:inline-flex;
    align-items:center;
    font-size:10px;
    font-weight:700;
    letter-spacing:1px;
    color:var(--teal-bright);
    background:rgba(16,168,126,0.12);
    padding:3px 10px;
    border-radius:100px;
    font-family:'DM Mono',monospace;
    margin-bottom:12px;
    width:fit-content;
  }
  .step-icon { font-size:22px; margin-bottom:8px; }
  .step-title {
    font-size:14px;
    font-weight:700;
    color:var(--text-primary);
    margin-bottom:6px;
  }
  .step-desc {
    font-size:12px;
    color:var(--text-secondary);
    line-height:1.7;
    flex:1;
    margin-bottom:12px;
  }
  .step-chips { display:flex; flex-wrap:wrap; gap:5px; }
  .chip {
    font-size:11px;
    font-weight:600;
    padding:3px 9px;
    border-radius:100px;
  }
  .chip-blue { background:rgba(100,149,237,0.15); color:#7BABF7; }
  .chip-teal { background:rgba(19,201,148,0.12);  color:var(--teal-glow); }
  .chip-gold { background:rgba(232,184,75,0.12);  color:var(--gold); }
  .step-arrow {
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--text-muted);
    font-size:22px;
    line-height:1;
  }

  /* 계산 공식 시각화 */
  .formula-visual { margin-top:24px; }
  .formula-visual-title {
    font-size:11px;
    font-weight:700;
    letter-spacing:1px;
    color:var(--text-muted);
    text-transform:uppercase;
    margin-bottom:10px;
  }
  .formula-visual-rows { display:flex; flex-direction:column; gap:3px; }
  .fv-row {
    display:grid;
    grid-template-columns:80px 20px 1fr;
    align-items:center;
    gap:8px;
    padding:9px 14px;
    border-radius:10px;
    font-family:'DM Mono',monospace;
    font-size:13px;
    background:rgba(255,255,255,0.02);
    border:1px solid transparent;
  }
  .fv-row.fv-highlight {
    background:rgba(19,201,148,0.06);
    border-color:rgba(19,201,148,0.1);
  }
  .fv-row.fv-main {
    background:rgba(19,201,148,0.1);
    border-color:rgba(19,201,148,0.22);
  }
  .fv-label { color:var(--teal-glow); font-weight:500; font-size:12px; }
  .fv-row.fv-main .fv-label { color:#4FFFC8; font-size:13px; }
  .fv-op { color:var(--text-muted); text-align:center; }
  .fv-expr { color:var(--text-secondary); }
  .fv-row.fv-main .fv-expr { color:var(--text-primary); }

  /* 세금 안내 */
  .tax-notice {
    display:flex;
    align-items:flex-start;
    gap:14px;
    margin-top:20px;
