@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --canvas: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-subtle: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-tint: #eff6ff;
  --blue-border: #bfdbfe;
  --emerald: #059669;
  --red: #dc2626;
  --red-soft: #f87171;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -10px rgba(15, 23, 42, 0.07);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 14px 28px -12px rgba(37, 99, 235, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max-w: 1020px;
  --font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.num {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
}

/* Sticky Translucent Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
  border-radius: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.14s ease, background-color 0.14s ease;
}

.nav-links a:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.nav-links a.active {
  color: var(--blue);
  background: var(--blue-tint);
  font-weight: 700;
}

/* Breadcrumb & Editorial Page Header */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 22px 0 6px;
  font-size: 0.81rem;
  color: var(--ink-3);
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.page-head {
  padding: 20px 0 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.page-head.hero-head {
  padding-top: 34px;
  padding-bottom: 28px;
}

.page-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.25;
}

.page-head .meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
}

.page-head .subtitle {
  margin: 8px 0 0;
  font-size: 0.96rem;
  color: var(--ink-2);
  max-width: 66ch;
}

/* 2026 Verified Statutory Rate Summary Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: var(--shadow-xs);
}

.stat-item span {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.stat-item strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Main Calculator Split Layout */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 28px;
}

.sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.sheet.receipt {
  background: var(--surface);
  border-top: 3px solid var(--ink);
}

.sheet-title {
  margin: 0 0 18px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}

/* Form Controls */
.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-3);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input[type="number"],
.field select {
  width: 100%;
  height: 46px;
  padding: 0 50px 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  padding-right: 14px;
  font-weight: 600;
  cursor: pointer;
}

.input-wrap input:hover,
.field select:hover {
  border-color: #94a3b8;
  background: var(--surface);
}

.input-wrap input:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
  pointer-events: none;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.chip-btn {
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip-btn:hover {
  border-color: var(--blue-border);
  background: var(--blue-tint);
  color: var(--blue);
}

.chip-btn:active {
  transform: scale(0.97);
}

.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-subtle);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
}

.toggle-btn {
  height: 36px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.toggle-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.checkbox-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

/* Receipt / Statement Result */
.result-summary {
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 14px;
}

.result-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}

.result-main {
  font-size: clamp(1.8rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.18;
}

.result-sub {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* Live Net vs Deduction Proportion Bar */
.ratio-wrap {
  margin-top: 14px;
}

.ratio-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface-subtle);
  gap: 2px;
}

.ratio-net {
  background: var(--blue);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ratio-deduct {
  background: var(--red-soft);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ratio-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.ratio-legend .dot-net::before,
.ratio-legend .dot-deduct::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.ratio-legend .dot-net::before {
  background: var(--blue);
}

.ratio-legend .dot-deduct::before {
  background: var(--red-soft);
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.breakdown-table tr {
  border-bottom: 1px solid var(--surface-subtle);
}

.breakdown-table tr:last-child {
  border-bottom: none;
}

.breakdown-table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  padding: 10px 2px;
}

.breakdown-table td {
  text-align: right;
  font-weight: 700;
  color: var(--ink);
  padding: 10px 2px;
  font-variant-numeric: tabular-nums;
}

.breakdown-table tr.total-row {
  border-top: 1px solid var(--line);
}

.breakdown-table tr.total-row th,
.breakdown-table tr.total-row td {
  padding-top: 13px;
  font-weight: 800;
  color: var(--red);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.btn-share:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

/* Directory Grid (Hub) */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.dir-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dir-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue-border);
  box-shadow: var(--shadow-hover);
}

.dir-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dir-cat {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
}

.dir-arrow {
  font-size: 0.92rem;
  color: var(--ink-3);
  transition: transform 0.16s ease, color 0.16s ease;
}

.dir-card:hover .dir-arrow {
  transform: translateX(3px);
  color: var(--blue);
}

.dir-card h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dir-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Official Reference / Affiliate Strip */
.affiliate-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.affiliate-strip strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.affiliate-strip span {
  font-size: 0.84rem;
  color: var(--ink-2);
}

.affiliate-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.affiliate-cta:hover {
  background: var(--blue);
  color: #ffffff;
}

/* AdSense Container (only rendered when configured) */
.ad-unit {
  margin: 24px 0;
  min-height: 90px;
  text-align: center;
}

/* Editorial Content & Internal Link Table */
.section-block {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.section-block h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-block p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.faq-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
}

.faq-item p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.link-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.matrix-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.14s ease;
}

.matrix-pill:hover,
.matrix-pill.current {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-tint);
  font-weight: 700;
}

.prev-next-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.prev-next-card {
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.9rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.prev-next-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.prev-next-card span {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.prev-next-card.next {
  text-align: right;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--ink-2);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.prose-sheet {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 30px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.prose-sheet h2 {
  margin: 24px 0 8px;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
}

.prose-sheet h2:first-child {
  margin-top: 0;
}

.prose-sheet p,
.prose-sheet li {
  font-size: 0.93rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.prose-sheet ul {
  margin: 8px 0 14px;
  padding-left: 20px;
}

.prose-sheet a {
  color: var(--blue);
  text-decoration: underline;
}

.not-found-box {
  text-align: center;
  padding: 52px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  margin: 28px 0;
}

.not-found-code {
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.not-found-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background-color 0.14s ease;
}

.not-found-cta:hover {
  background: var(--blue);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .affiliate-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .prev-next-nav {
    grid-template-columns: 1fr;
  }
  .prev-next-card.next {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }
  .sheet {
    padding: 20px 18px;
  }
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .faq-list {
    grid-template-columns: 1fr;
  }
  .prose-sheet {
    padding: 22px 18px;
  }
}

/* 2026-11-23 법령 반영 업데이트: 보조 안내·상세 입력 */
.calc-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #64748b;
}
.result-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12.5px;
  line-height: 1.55;
}
.result-note[hidden] { display: none; }
.calc-details {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}
.calc-details summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e3a8a;
}
.calc-details[open] summary { margin-bottom: 12px; }
.field[hidden] { display: none; }
.field .checkbox-row + .checkbox-row { margin-top: 8px; }

/* 공식 사이트 바로가기 */
.official-links-sub {
  margin: -4px 0 14px;
  font-size: 13.5px;
  color: #64748b;
}
.official-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.official-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.official-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}
.official-card strong {
  font-size: 14.5px;
  color: #1e3a8a;
}
.official-card span {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}
.official-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.official-calc-link {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

/* 한국어 줄바꿈: 단어(어절) 단위로 끊고, 제목은 줄 길이를 고르게, 본문은 마지막 줄 한 단어 방지 */
body {
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, .dir-card h2, .sheet-title, .result-label {
  text-wrap: balance;
}
p, li, .subtitle, .dir-card p, .faq-item p, .calc-note, .result-note, .official-card span, .affiliate-strip span, .field label {
  text-wrap: pretty;
}
.result-main, .breakdown-table td, .stat-item strong, .matrix-pill {
  white-space: nowrap;
}

.checkbox-hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  font-weight: 400;
}

.field .checkbox-row,
.calc-details .checkbox-row {
  justify-content: flex-start;
  align-items: flex-start;
}
.checkbox-row input {
  flex: 0 0 auto;
  margin-top: 2px;
}
.checkbox-row > span {
  flex: 1 1 auto;
  text-align: left;
}

/* 제휴 광고 카드 (광고 표시 의무) */
.partner-card {
  margin: 18px 0;
  padding: 14px 18px 16px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: #fffbeb;
}
.partner-badge {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: #92400e;
}
.partner-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.partner-body strong {
  display: block;
  font-size: 15px;
  color: #1f2937;
}
.partner-body span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #4b5563;
}
.partner-cta {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 10px;
  background: #1f2937;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.partner-cta:hover { background: #111827; }

/* 짧은 문구 균형 줄바꿈: 마지막 줄에 단어 하나만 남지 않도록 */
.official-card span, .official-card strong, .dir-card p, .checkbox-hint, .field-hint, .prose-sheet li, .partner-body span, .affiliate-strip span, .result-sub, .stat-item span, summary {
  text-wrap: balance;
}

/* 구간별 비교표 (SEO 콘텐츠 보강) */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  min-width: 480px;
}

.compare-table thead th {
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.compare-table thead th.num-col,
.compare-table tbody td.num-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.compare-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--surface-subtle);
  color: var(--ink);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr.is-current {
  background: var(--blue-tint);
}

.compare-table tbody tr.is-current td {
  font-weight: 700;
  color: #1e3a8a;
}

.compare-table tbody td a {
  color: var(--blue);
  font-weight: 600;
}

.compare-table tbody td a:hover {
  text-decoration: underline;
}

/* 세금별 절세 꿀팁 섹션 & 모아보기 페이지 */
.tips-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tips-head-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tips-kicker {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tips-head h2 {
  margin: 0;
}

.tips-sub {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.tips-more-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--emerald);
  white-space: nowrap;
}

.tips-more-link:hover {
  text-decoration: underline;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tip-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--emerald);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tip-card:hover {
  border-color: #6ee7b7;
  border-top-color: var(--emerald);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08);
}

.tip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.tip-num {
  font-size: 0.74rem;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.tip-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.tip-card h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.4;
  text-wrap: balance;
}

.tip-card p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--ink-2);
  line-height: 1.62;
  text-wrap: pretty;
}

.tip-caution {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.79rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* 홈 절세 꿀팁 배너 & 허브 페이지 */
.tips-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  margin: 6px 0 26px;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 70%);
  box-shadow: var(--shadow-xs);
}

.tips-banner strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.tips-banner p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.tips-banner-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--emerald);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.14s ease;
}

.tips-banner-cta:hover {
  background: #047857;
}

.tips-hub-group {
  scroll-margin-top: 76px;
}

.tips-calc-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.tips-calc-btn:hover {
  background: var(--blue);
  color: #ffffff;
}

@media (max-width: 720px) {
  .tips-grid {
    grid-template-columns: 1fr;
  }
  .tips-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px;
  }
}

/* 계산 결과 공유 모달 (PC·모바일 공통) */
.share-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.share-modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.28);
}

.share-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.share-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.share-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--ink-2);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.share-close-btn:hover {
  background: var(--line);
  color: var(--ink);
}

.share-preview {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--blue-tint);
  border: 1px solid var(--blue-border);
  color: #1e3a8a;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 12px;
  word-break: keep-all;
}

.share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.share-url-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 0.8rem;
}

.share-url-copy {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.share-url-copy:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.share-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-opt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.14s ease;
}

.share-opt-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.share-opt-btn.opt-primary {
  grid-column: 1 / -1;
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.share-opt-btn.opt-primary:hover {
  background: var(--blue-hover);
}

.share-opt-btn.opt-naver {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.share-opt-btn.opt-band {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.share-opt-btn.opt-x {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.share-opt-btn.opt-img {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.share-opt-btn.opt-native {
  grid-column: 1 / -1;
  background: #fefce8;
  border-color: #fde047;
  color: #854d0e;
}

/* 홈 4대 카테고리 섹션 (20종 계산기) */
.home-cat-group {
  margin-bottom: 26px;
}

.home-cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.home-cat-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.home-cat-head span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
}

.home-cat-group .directory-grid {
  margin-bottom: 0;
}

.dir-badge-new {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  color: #047857;
  font-size: 0.68rem;
  font-weight: 800;
  vertical-align: middle;
}



