.calc-pay{
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-sub: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --accent: #10b981;
  --accent-soft: #ecfdf5;
  --warn: #ef4444;
  --warn-soft: #fef2f2;
  --orange: #f59e0b;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.calc-pay,.calc-pay *{ box-sizing: border-box; }
.calc-pay{ scroll-behavior: smooth; }
.calc-pay{
  margin: 0; min-width: 320px; color: var(--ink-sub); background: var(--bg);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.6; padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
}
.calc-pay button,.calc-pay input,.calc-pay select{ font: inherit; }
.calc-pay button{ cursor: pointer; }
.calc-pay a{ color: inherit; text-decoration: none; }
.calc-pay .mono{ font-family: "IBM Plex Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.calc-pay{ max-width: 680px; width: 100%; margin: 0 auto; padding: 0 16px; }
.calc-pay .nav-bar{
  position: sticky; top: 0; z-index: 50; height: 58px;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.calc-pay .nav-in{ height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calc-pay .brand-link{ display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; color: var(--ink); }
.calc-pay .brand-badge{ width: 28px; height: 28px; border-radius: 6px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.calc-pay .brand-sub{ font-size: 10px; color: var(--brand); font-weight: 800; letter-spacing: 0.06em; margin-left: 2px; }
.calc-pay .nav-back-btn{
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--muted);
  transition: all 0.15s ease;
}
.calc-pay .nav-back-btn:hover{ border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.calc-pay header.page-head{ text-align: center; padding: 22px 0 14px; margin-bottom: 14px; }
.calc-pay .page-badge{ display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 800; margin-bottom: 6px; }
.calc-pay h1.page-title{ font-size: clamp(21px, 5.5vw, 27px); font-weight: 900; color: var(--ink); margin: 2px 0 6px; letter-spacing: -0.03em; word-break: keep-all; }
.calc-pay .page-desc{ font-size: 13.5px; color: var(--muted); margin: 0; word-break: keep-all; }
.calc-pay .panel{
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 16px;
}
.calc-pay .panel-title{ font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.calc-pay .field{ margin-bottom: 16px; }
.calc-pay .field:last-child{ margin-bottom: 0; }
.calc-pay .field-label{ display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.calc-pay .field-hint{ font-weight: 500; font-size: 11.5px; color: var(--muted); }
.calc-pay .input-box{ position: relative; display: flex; align-items: center; }
.calc-pay .input-box input,.calc-pay .input-box select,.calc-pay input[type=date]{
  width: 100%; height: 48px; padding: 0 44px 0 14px; font-size: 16px; font-weight: 700;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-pay .input-box input:focus,.calc-pay .input-box select:focus,.calc-pay input[type=date]:focus{
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.calc-pay .input-box .unit{ position: absolute; right: 14px; font-size: 13.5px; font-weight: 700; color: var(--muted); pointer-events: none; }
.calc-pay .row-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px){.calc-pay .row-2{ grid-template-columns: 1fr; }}
.calc-pay .quick-tags{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.calc-pay .q-btn{
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc;
  color: var(--muted); font-size: 11.5px; font-weight: 700; transition: all 0.15s ease;
}
.calc-pay .q-btn:hover{ background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.calc-pay .seg-group{ display: flex; gap: 6px; width: 100%; }
.calc-pay .seg-btn{
  flex: 1; padding: 11px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; transition: all 0.15s ease;
}
.calc-pay .seg-btn.active{
  background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
@keyframes mainBtnPulse{
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); }
  50% { transform: scale(1.025); box-shadow: 0 8px 26px rgba(37, 99, 235, 0.6); }
}
.calc-pay .btn-calc-main{
  width: 100%; padding: 16px; border-radius: 10px; border: 0;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff;
  font-size: 16.5px; font-weight: 900; letter-spacing: -0.02em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  animation: mainBtnPulse 1.8s infinite ease-in-out;
  transition: transform 0.15s ease;
}
.calc-pay .btn-calc-main:hover{ animation-play-state: paused; transform: scale(1.03) translateY(-2px); }
.calc-pay .btn-calc-main small{ font-size: 11.5px; font-weight: 500; opacity: 0.9; }
.calc-pay .result-hero{
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #fff; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.calc-pay .hero-lbl{ font-size: 12px; font-weight: 800; color: #93c5fd; letter-spacing: 0.08em; margin-bottom: 2px; }
.calc-pay .hero-amt{ font-family: "IBM Plex Mono", monospace; font-size: clamp(28px, 7vw, 40px); font-weight: 900; color: #fff; line-height: 1.15; margin-bottom: 6px; }
.calc-pay .hero-amt small{ font-size: 17px; font-weight: 700; color: #bfdbfe; margin-left: 2px; }
.calc-pay .hero-sub{ font-size: 13px; color: #dbeafe; line-height: 1.55; }
.calc-pay .percentile-card{
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.calc-pay .percentile-head{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 4px; }
.calc-pay .percentile-title{ font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.calc-pay .percentile-pill{ font: 900 12.5px "IBM Plex Mono", monospace; padding: 3px 9px; border-radius: 999px; background: rgba(37, 99, 235, 0.1); color: var(--brand); border: 1px solid var(--brand); }
.calc-pay .percentile-track{ width: 100%; height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.calc-pay .percentile-fill{ height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #10b981); transition: width 0.8s ease; }
.calc-pay .percentile-desc{ font-size: 12px; color: var(--muted); line-height: 1.5; }
.calc-pay .audit-item{
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-bottom: 8px;
}
.calc-pay .audit-item:last-child{ margin-bottom: 0; }
.calc-pay .audit-row{ display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.calc-pay .audit-row:last-child{ margin-bottom: 0; }
.calc-pay .audit-row strong{ color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 14px; }
.calc-pay .audit-row.highlight{ font-weight: 800; color: var(--brand-dark); border-top: 1px dashed #cbd5e1; padding-top: 6px; margin-top: 6px; }
.calc-pay .audit-row.highlight strong{ color: var(--brand-dark); font-size: 15px; }
.calc-pay .action-grid{ display: grid; gap: 8px; margin: 20px 0; }
.calc-pay .btn-act{
  width: 100%; padding: 14px; border-radius: 8px; font-size: 14.5px; font-weight: 800;
  border: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s ease;
}
.calc-pay .btn-copy{ background: #0f172a; color: #f8fafc; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2); }
.calc-pay .btn-copy:hover{ background: #1e293b; }
.calc-pay .btn-recalc{ background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.calc-pay .btn-recalc:hover{ border-color: var(--ink); }
@keyframes hubCtaPulse{
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25); border-color: #2563eb; }
  50% { transform: scale(1.025); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.55); border-color: #3b82f6; }
}
.calc-pay .btn-paynote-hub{
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 15px 18px; margin-top: 12px; border-radius: 10px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #38bdf8 !important; border: 1.5px solid #38bdf8;
  font-size: 14.5px; font-weight: 900; text-align: center;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
  transition: all 0.2s ease;
}
.calc-pay .btn-paynote-hub:hover{ transform: translateY(-2px); color: #fff !important; }
.calc-pay .btn-paynote-hub.pulse{ animation: hubCtaPulse 2s infinite ease-in-out; }
.calc-pay .faq-wrap{ margin-top: 24px; }
.calc-pay .faq-card{ background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px; }
.calc-pay .faq-head{ font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.calc-pay .faq-item{ border-bottom: 1px solid var(--line); }
.calc-pay .faq-item:last-child{ border-bottom: 0; }
.calc-pay .faq-q{ padding: 12px 0; font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.calc-pay .faq-q:hover{ color: var(--brand); }
.calc-pay .faq-arrow{ font-size: 10px; color: var(--muted); transition: transform 0.2s ease; }
.calc-pay .faq-a{ max-height: 0; overflow: hidden; transition: max-height 0.25s ease; font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.calc-pay .faq-a-in{ padding-bottom: 10px; }
.calc-pay .faq-item.active .faq-arrow{ transform: rotate(180deg); color: var(--brand); }
.calc-pay .faq-item.active .faq-a{ max-height: 300px; }
.calc-pay #aiLoadingModal{
  position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.calc-pay .loading-box{
  background: #fff; border-radius: 14px; padding: 24px 20px; width: 100%; max-width: 320px; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.calc-pay .loading-spinner{
  width: 44px; height: 44px; border: 4px solid #e2e8f0; border-top-color: var(--brand);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 14px;
}
@keyframes spin{ to { transform: rotate(360deg); } }
.calc-pay .loading-title{ font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.calc-pay .loading-desc{ font-size: 12px; color: var(--muted); margin: 0; }
.calc-pay #toast{
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; z-index: 10000; opacity: 0; pointer-events: none;
  transition: all 0.25s ease; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.calc-pay #toast.show{ transform: translateX(-50%) translateY(0); opacity: 1; }
.calc-pay footer.paynote-foot{
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.7;
}
.calc-pay .pass{ color: var(--accent); font-weight: 700; }
.calc-pay .fail{ color: var(--warn); font-weight: 700; }
.calc-pay .note{ font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.7; }
.calc-pay .note b{ color: var(--ink); }
.calc-pay .adwrap{margin:10px 0;text-align:center}
.calc-pay .adwrap:has(ins[data-ad-status="unfilled"]){display:none}
.calc-pay .adwrap:not(:has(ins[data-ad-status="unfilled"]))+*{margin-top:0}
.calc-pay *:has(+.adwrap:not(:has(ins[data-ad-status="unfilled"]))){margin-bottom:0}
.calc-pay .ad-rect{display:block;width:300px;height:250px;margin:0 auto}
@media (min-width:500px){.calc-pay .ad-rect{width:336px;height:280px}}
.calc-pay header.page-head:has(+.adwrap:not(:has(ins[data-ad-status="unfilled"]))){padding-bottom:0}
.calc-pay .ad-gapline{margin:10px 0;padding:5px 0;font-size:12.5px;line-height:1.55;color:var(--muted);text-align:center}
.calc-pay .calc-disclaimer{margin-top:40px;padding-top:20px;border-top:1px solid var(--line);text-align:center;font-size:11.5px;color:var(--muted);line-height:1.7}
