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

:root {
  --primary: #3B6FE8;
  --primary-dark: #1E47B8;
  --accent: #FF6B35;
  --accent-dark: #E5552A;
  --yellow: #FFF4D2;
  --yellow-deep: #FFE17A;
  --bg: #F4F7FC;
  --bg-soft: #EEF3FA;
  --text: #1A2540;
  --text-mute: #6B7795;
  --border: #E4EAF5;
  --shadow-sm: 0 4px 12px rgba(30, 71, 184, 0.08);
  --shadow-md: 0 10px 30px rgba(30, 71, 184, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

html, body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ===== Top Bar ===== */
.top-bar {
  background: linear-gradient(180deg, #4A8AFF 0%, #2E6BE0 100%);
  color: #fff;
  text-align: center;
  padding: 14px 20px 18px;
  font-size: 13px;
  line-height: 1.5;
}
.top-bar-inner strong {
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 2px;
}
.top-bar-inner span {
  font-weight: 500;
  opacity: 0.95;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.logo-mark { display: grid; place-items: center; }
.logo-text {
  font-size: 16px;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--accent);
}
.logo-text small {
  font-size: 8px;
  color: var(--text-mute);
  letter-spacing: 2px;
  margin-top: 3px;
  font-weight: 600;
}
.header-actions {
  display: flex;
  gap: 4px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text);
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--bg); }

/* ===== Side menu ===== */
.side-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 100;
  padding: 24px;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.side-menu.open { right: 0; }
.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-mute);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.close-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--text);
}
.side-menu ul {
  list-style: none;
  padding: 24px 0;
  flex: 1;
}
.side-menu li a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.side-menu li a:hover { color: var(--accent); }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 77, 0.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.show { opacity: 1; pointer-events: auto; }

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 16px 24px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
  width: 100%;
  transition: transform 0.18s;
}
.btn-primary:hover { transform: translateY(-2px); }

/* ===== Products ===== */
.products {
  background: #fff;
  padding: 16px 16px 24px;
  border-bottom: 1px solid var(--border);
}
.products-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}
.product-card {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 18px 16px 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-card.credit { background: #EBF1FB; }
.product-card.auto { background: #E9F5FF; }
.product-text h3 {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.product-text p {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.45;
  font-weight: 500;
}
.product-art {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 8px 0;
  min-height: 90px;
}
.product-art svg,
.product-art-img {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
  object-fit: contain;
}

@keyframes product-art-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.product-art-bob {
  animation: product-art-bob 2.4s ease-in-out infinite;
  will-change: transform;
}

/* 신용대출과 타이밍을 어긋나게 해 자연스럽게 */
.product-art-bob--auto {
  animation-duration: 2.1s;
  animation-delay: 0.35s;
}

@media (prefers-reduced-motion: reduce) {
  .product-art-bob {
    animation: none;
    will-change: auto;
  }
}
.card-cta {
  background: #fff;
  color: var(--primary-dark);
  padding: 9px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 auto;
  width: 100%;
  border: 1px solid var(--border);
  transition: 0.18s;
}
.card-cta:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Promo ===== */
.promo {
  padding: 18px 16px;
}
.promo-card {
  background: linear-gradient(180deg, #FFFAE0 0%, #FFF4D2 100%);
  border-radius: var(--radius-lg);
  padding: 28px 20px 20px;
  position: relative;
  overflow: hidden;
}
.promo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 0;
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  text-align: center;
}
.promo-pill {
  display: inline-block;
  background: linear-gradient(135deg, #FF6B35, #E5552A);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  padding: 14px 32px;
  border-radius: 100px;
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
  margin-bottom: 16px;
}
.promo-pill.alt { background: linear-gradient(135deg, #3B6FE8, #1E47B8); box-shadow: 0 8px 20px rgba(59, 111, 232, 0.3); }
.promo-pill.alt2 { background: linear-gradient(135deg, #4AAE4A, #2E8A2E); box-shadow: 0 8px 20px rgba(74, 174, 74, 0.3); }
.promo-desc {
  color: #5A4A1A;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}
.promo-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  transition: 0.2s;
}
.promo-dots button.active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}

/* ===== FAQ search ===== */
.faq-search {
  background: var(--bg);
  margin: 0 16px;
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-search-text h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}
.faq-search-text p {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.5;
}
.faq-search-icon { flex-shrink: 0; }

/* ===== FAQ list ===== */
.faq-list-section {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-list-section details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.faq-list-section summary {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-list-section summary::-webkit-details-marker { display: none; }
.faq-list-section summary::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.25s;
}
.faq-list-section details[open] summary::after { transform: rotate(45deg); }
.faq-list-section details p {
  margin-top: 12px;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.65;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===== Quick actions ===== */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.quick-item {
  background: #fff;
  padding: 22px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-icon { background: #FFE5DA; }
.myloan-icon { background: #DEEBFF; }

/* ===== Footer ===== */
.footer {
  background: #fff;
  padding: 24px 20px 90px;
  font-size: 11px;
  color: var(--text-mute);
}
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.footer-tags span {
  position: relative;
  font-weight: 500;
}
.footer-info p {
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 2px;
}
.footer-info p strong {
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.copyright { margin-top: 8px !important; }
.footer-disclaimer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.6;
}

/* ===== Bottom Tab ===== */
.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 70;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  transition: color 0.2s;
}
.tab-item.active { color: var(--accent); }
.tab-icon {
  font-size: 22px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.credit-tab::before {
  content: "💳";
}
.auto-tab::before {
  content: "🚗";
}

/* ===== Cookie ===== */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
  z-index: 75;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform 0.4s;
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar p {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.55;
  margin-bottom: 10px;
}
.cookie-bar a { color: var(--primary); text-decoration: underline; }
.cookie-confirm {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 77, 0.6);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 28px 22px 24px;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 16px;
  display: grid;
  place-items: center;
}
.receipt-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-mute);
  letter-spacing: 1px;
  background: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FFE5DA;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.avatar-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 2px;
}
.avatar-text span {
  color: var(--text-mute);
  font-size: 12px;
}

.apply-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  margin-left: 4px;
}
.field-hint {
  font-weight: 500;
  opacity: 0.85;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="tel"] {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span {
  display: block;
  text-align: center;
  padding: 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  background: var(--bg);
  color: var(--text-mute);
  transition: all 0.2s;
  cursor: pointer;
}
.radio input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mute);
  margin: 4px 0;
  cursor: pointer;
}
.agree input { margin-top: 2px; accent-color: var(--accent); }
.btn-submit { margin-top: 6px; padding: 16px; font-size: 16px; }

.success { text-align: center; padding: 12px 0; }
.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  animation: pop 0.4s cubic-bezier(0.2, 1.5, 0.3, 1);
}
@keyframes pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.success h3 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.success > p { color: var(--text-mute); margin-bottom: 22px; font-size: 14px; }
.receipt-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  text-align: left;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.9;
}
.receipt-summary div {
  display: flex;
  justify-content: space-between;
}
.receipt-summary div span:first-child {
  color: var(--text-mute);
  font-weight: 600;
}
.receipt-summary div span:last-child {
  font-weight: 700;
  color: var(--text);
}

/* ===== Responsive ===== */
@media (min-width: 720px) {
  .products-inner { max-width: 760px; }
  .product-card { min-height: 220px; padding: 22px 20px 18px; }
  .product-text h3 { font-size: 20px; }
  .product-text p { font-size: 13px; }
  .modal { align-items: center; }
  .modal-content { border-radius: var(--radius-lg); max-width: 480px; }
}
