* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", sans-serif;
  background: #fff;
  color: #1f2937;
  padding-bottom: 120px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.top-header {
  background: #fff;
  padding: 14px 20px;
}

.header-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-mark { display: none; }
.brand-logo { height: 48px; width: auto; display: block; }

.brand-text {
  color: #1d4ed8;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn {
  display: none;
}

.icon-bell {
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

.login-btn {
  display: inline-block;
  text-decoration: none;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 12px;
  border-radius: 10px;
}

.header-nav {
  width: min(1200px, 92vw);
  margin: 8px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.header-nav .flat-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* Desktop: hide categorized menu by default */
.menu-cats {
  display: none;
}

.header-nav-item {
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  color: #404040;
  line-height: 1.1;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-nav-item.active {
  color: #1d4ed8;
  background: #eff6ff;
}
.header-nav-item .nav-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
}

/* Mobile: PC와 동일 flat-links 메뉴 */
@media (max-width: 980px) {
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
  }
  .header-nav { display: none; }
  .header-nav.open { display: block; background: #ffffff; border-top: 1px solid #e5e7eb; padding: 12px 16px; }
  .header-nav .flat-links { display: none; }
  .header-nav.open .flat-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header-nav .menu-cats { display: none !important; }
  .header-nav.open .header-nav-item {
    display: block;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
    background: #f9fafb;
    text-align: left;
    white-space: normal;
  }
  .header-nav.open .header-nav-item.active,
  .header-nav.open .header-nav-item:active {
    background: #eff6ff;
    color: #1d4ed8;
  }
}
.menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5b6b;
}

main {
  padding: 24px 0 40px;
}

.calc-main {
  width: min(980px, 94vw);
}

.main-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.row-title {
  margin: 18px 0 10px;
  padding-top: 8px;
  border-top: 1px solid #d8dce4;
  font-size: 20px;
}

.card-row {
  display: grid;
  gap: 12px;
}

.card-row.six {
  grid-template-columns: repeat(3, 1fr);
}

.card-row.three {
  grid-template-columns: repeat(3, 1fr);
}

.pick-card {
  border: 1px solid #d8dce4;
  background: #fff;
  border-radius: 10px;
  min-height: 96px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
}

.pick-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.pick-card span {
  line-height: 1.2;
}

.pick-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.plan-card {
  border: 1px solid #d8dce4;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.plan-card.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.pick-card:focus-visible,
.plan-card:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.plan-card h3 {
  margin: 0;
  font-size: 24px;
}

.plan-card p {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.plan-card small {
  color: #666;
}

.plan-card strong {
  margin-top: 8px;
  font-size: 20px;
}

.toggle-row {
  display: flex;
  gap: 20px;
  margin: 16px 0 6px;
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.info-bar {
  margin: 18px 0;
  text-align: center;
  background: #f8f9fa;
  border: 1px solid #d8dce4;
  border-radius: 8px;
  padding: 14px 12px;
  font-weight: 600;
}

.monthly-summary {
  margin-top: 20px;
  border-top: 1px solid #d8dce4;
  border-bottom: 1px solid #d8dce4;
  background: #ffffff;
  padding: 8px 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  align-items: center;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 70;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.12);
}

.summary-lines {
  width: min(720px, 70vw);
  padding: 2px 0;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  color: #444;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row strong {
  font-size: 20px;
  line-height: 1;
  color: #333;
}

.summary-row.emphasis span {
  font-weight: 700;
  color: #111;
}

.summary-row.emphasis strong {
  color: #111;
}

.summary-row small {
  margin-left: 8px;
  color: #555;
  font-weight: 500;
  font-size: 11px;
}

.summary-row.gift span,
.summary-row.gift strong {
  color: #ef4f8b;
}

.summary-row.no-discount span,
.summary-row.no-discount strong {
  color: #94a3b8;
  font-weight: 500;
}
.summary-row.no-discount strong {
  font-size: 14px;
  font-weight: 600;
}

.consult-btn {
  border: 0;
  border-radius: 10px;
  background: #1d4ed8;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(77, 51, 204, 0.35);
}

.text-block,
.table-block,
.faq-block {
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.text-block h3,
.table-block h3,
.faq-block h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.text-block p,
.faq-block p {
  margin: 0 0 8px;
  line-height: 1.6;
  color: #555;
}

.placeholder-image {
  margin-top: 10px;
  height: 240px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #d8dce4;
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
}

th {
  background: #f8f9fa;
  color: #555;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.service-box {
  border: 1px solid #e7e9f5;
  border-radius: 10px;
  padding: 14px;
  background: #fbfcff;
}

.service-box.active {
  border-color: #cdd2ff;
  background: #f4f6ff;
}

.service-box h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.service-box ul {
  margin: 0;
  padding-left: 18px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-bottom: 18px;
}

.tips-list {
  border: 1px solid #eaecf5;
  border-radius: 10px;
  padding: 16px;
}

.tips-list h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.tips-list a {
  display: block;
  color: #1f2937;
  text-decoration: none;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f8;
  font-size: 14px;
}

.calculator-card {
  border: 1px solid #dbe4ff;
  background: #f9fbff;
  border-radius: 10px;
  padding: 16px;
}

.badge {
  margin: 0;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 5px 10px;
}

.calculator-card h3 {
  margin: 10px 0 14px;
  font-size: 21px;
}

.calc-controls {
  border: 1px solid #e8edf9;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

.control-group {
  margin-bottom: 10px;
}

.control-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-chip {
  border: 1px solid #d8dceb;
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.choice-chip.active {
  border-color: #1d4ed8;
  background: #dbeafe;
  color: #1d4ed8;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.control-grid label {
  margin: 0;
  font-size: 12px;
}

select {
  width: 100%;
  border: 1px solid #d8dce8;
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 6px;
  font: inherit;
  background: #fff;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #e8edf9;
  font-size: 14px;
}

.price-row strong {
  font-size: 19px;
}

.price-row.highlight strong {
  color: #2563eb;
}

.calculator-card button,
.submit-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.calculator-card button {
  margin-top: 12px;
  background: #1d4ed8;
  color: #fff;
}

.form-card {
  border: 1px solid #eaecf5;
  border-radius: 10px;
  padding: 16px;
}

.form-card h3 {
  margin: 0 0 8px;
}

.form-card p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d8dce8;
  border-radius: 8px;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 10px;
  font: inherit;
}

.agree-list {
  margin: 8px 0 12px;
}

.agree-list label {
  font-size: 12px;
  font-weight: 500;
}

.submit-btn {
  background: #111827;
  color: #fff;
}

.site-footer {
  margin-top: 26px;
  padding: 24px 0 36px;
  background: #2f2e3b;
}

.site-footer p {
  margin: 0 0 8px;
  color: rgba(246, 245, 255, 0.5);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .top-header {
    padding: 14px 14px 16px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 16px;
  }

  .brand-text {
    font-size: 26px;
  }

  .icon-bell {
    font-size: 16px;
  }

  .login-btn {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  .header-nav {
    margin-top: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .header-nav-item {
    font-size: 20px;
  }

  .menu-dot {
    width: 8px;
    height: 8px;
  }

  .main-title {
    font-size: 22px;
  }

  .card-row.six,
  .card-row.three {
    grid-template-columns: 1fr;
  }

  .toggle-row {
    flex-direction: column;
    gap: 8px;
  }

  .monthly-summary {
    padding: 8px 12px;
    gap: 8px;
  }

  .summary-lines {
    width: min(100%, calc(100vw - 120px));
  }

  .summary-row {
    font-size: 11px;
  }

  .summary-row strong {
    font-size: 15px;
  }

  .summary-row small {
    display: none;
  }

  .consult-btn {
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
  }

  .service-grid,
  .content-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 한 줄 헤더 레이아웃 ── */
.header-inner {
  gap: 16px;
  flex-wrap: wrap;
}
.brand { flex: 0 0 auto; }
.header-nav {
  flex: 1 1 auto;
  margin: 0 !important;
  width: auto !important;
  min-width: 0;
  justify-content: center;
}
.header-nav .flat-links {
  gap: 6px;
  flex-wrap: nowrap;
}
.header-nav-item {
  font-size: 14px;
  padding: 8px 10px;
  white-space: nowrap;
}
.header-actions {
  margin-left: auto;
}
@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; }
  .header-nav {
    flex: 1 1 100%;
    order: 3;
  }
  .header-nav.open {
    width: 100%;
    margin-top: 8px;
  }
}

