/* ============================================
   차용증 & 지불각서 자동완성 사이트
   Design System — WDS 레이아웃 + TDS 컬러 참조
   ============================================ */

/* ---------- Fonts: Pretendard ---------- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css');

/* ---------- CSS Variables (Light Mode) — TDS Color Palette ---------- */
:root {
  /* Semantic Label (TDS Grey Scale) */
  --label-normal: #191f28;
  --label-strong: #000000;
  --label-alternative: #4e5968;
  --label-assistive: #8b95a1;
  --label-disable: #d1d6db;

  /* Semantic Background (TDS Adaptive) */
  --bg-normal: #ffffff;
  --bg-normal-rgb: 255, 255, 255;
  --bg-sub: #f2f4f6;
  --bg-elevated: #ffffff;

  /* Semantic Fill (TDS Grey) */
  --fill-normal: #f2f4f6;
  --fill-strong: #e5e8eb;
  --fill-alternative: #d1d6db;

  /* Primary / Accent (TDS Blue) */
  --primary: #3182f6;
  --primary-hover: #1b64da;
  --primary-light: #e8f3ff;
  --primary-strong: rgba(49, 130, 246, 0.16);

  /* Status (TDS Semantic) */
  --success: #03b26c;
  --success-light: #f0faf6;
  --warning: #fe9800;
  --warning-light: #fff3e0;
  --error: #f04452;
  --error-light: #ffeeee;

  /* Semantic Line (TDS Opacity / Hairline) */
  --line-normal: #e5e8eb;
  --line-alternative: #f2f4f6;
  --line-strong: #d1d6db;

  /* Inverse (TDS Grey900 / White) */
  --inverse-bg: #191f28;
  --inverse-label: #ffffff;

  /* Elevation (TDS style — subtle) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 8px 40px rgba(0, 0, 0, 0.08);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 99px;

  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-80: 80px;

  /* Transition */
  --ease-default: 0.2s ease;
  --ease-slow: 0.3s ease;

  /* Layout */
  --max-width: 1060px;
  --gnb-height: 62px;
  --layout-padding: 20px;
}

@media (min-width: 768px) {
  :root { --layout-padding: 40px; }
}
@media (min-width: 1200px) {
  :root { --max-width: 1060px; }
}

/* ---------- Dark Mode — TDS Dark Palette ---------- */
[data-theme="dark"] {
  --label-normal: #e4e4e5;
  --label-strong: #ffffff;
  --label-alternative: #9e9ea4;
  --label-assistive: #7e7e87;
  --label-disable: #4d4d59;

  --bg-normal: #17171c;
  --bg-normal-rgb: 23, 23, 28;
  --bg-sub: #101013;
  --bg-elevated: #202027;

  --fill-normal: #2c2c35;
  --fill-strong: #3c3c47;
  --fill-alternative: #4d4d59;

  --primary: #3485fa;
  --primary-hover: #449bff;
  --primary-light: rgba(49, 130, 246, 0.16);
  --primary-strong: rgba(49, 130, 246, 0.24);

  --success: #16bb76;
  --success-light: rgba(22, 187, 118, 0.12);
  --warning: #f18600;
  --warning-light: rgba(241, 134, 0, 0.12);
  --error: #f04251;
  --error-light: rgba(240, 66, 81, 0.12);

  --line-normal: #3c3c47;
  --line-alternative: #2c2c35;
  --line-strong: #4d4d59;

  --inverse-bg: #ffffff;
  --inverse-label: #191f28;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.36);
  --shadow-xl: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  background-color: var(--bg-normal);
  color: var(--label-normal);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--ease-slow), color var(--ease-slow);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease-default);
}
a:hover { color: var(--primary-hover); }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--label-normal);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p {
  color: var(--label-alternative);
  margin-bottom: var(--space-16);
  line-height: 1.7;
}

/* ---------- Header / GNB ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1300;
  width: 100%;
  height: var(--gnb-height);
  background-color: rgba(var(--bg-normal-rgb), 0.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-bottom: 1px solid var(--line-normal);
  transition: background-color var(--ease-slow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--layout-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--label-normal);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--label-alternative);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--ease-default);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--ease-slow);
}

.nav-links a:hover { color: var(--label-normal); }
.nav-links a.active { color: var(--label-normal); }
.nav-links a.active::after { width: 20px; }

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--label-normal);
  transition: background-color var(--ease-default);
}
.theme-toggle:hover { background-color: var(--fill-normal); }

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-md);
}
.mobile-menu-btn:hover { background-color: var(--fill-normal); }

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--label-normal);
  border-radius: 1px;
  transition: all var(--ease-default);
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ---------- Main Content ---------- */
main {
  min-height: calc(100vh - var(--gnb-height));
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--layout-padding);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: var(--space-80) 0 var(--space-64);
  text-align: center;
  background-color: var(--bg-normal);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-20);
  color: var(--label-strong);
}

.hero p {
  font-size: 1.0625rem;
  color: var(--label-alternative);
  margin-bottom: var(--space-32);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--ease-default);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--inverse-bg);
  color: var(--inverse-label);
}
.btn-primary:hover {
  opacity: 0.85;
  color: var(--inverse-label);
}

.btn-secondary {
  background: var(--fill-normal);
  color: var(--label-normal);
}
.btn-secondary:hover {
  background: var(--fill-strong);
  color: var(--label-normal);
}

.btn-outline {
  background: transparent;
  color: var(--label-normal);
  border: 1.5px solid var(--line-strong);
}
.btn-outline:hover {
  background: var(--fill-normal);
}

.btn-success {
  background: var(--primary);
  color: white;
}
.btn-success:hover {
  background: var(--primary-hover);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--label-alternative);
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover {
  background: var(--fill-normal);
  color: var(--label-normal);
  border-color: var(--line-strong);
}

.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Card ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line-normal);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  transition: all var(--ease-default);
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-16);
}

.card-icon.purple { background: var(--primary-light); color: var(--primary); }
.card-icon.green { background: var(--success-light); color: var(--success); }
.card-icon.amber { background: var(--warning-light); color: var(--warning); }
.card-icon.blue { background: var(--primary-light); color: var(--primary); }

.card h3 { font-size: 1.0625rem; margin-bottom: var(--space-8); }
.card p { font-size: 0.9375rem; color: var(--label-alternative); margin-bottom: 0; }

/* ---------- Grid Layouts ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-16); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-16); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-16); }

/* ---------- Section ---------- */
.section { padding: var(--space-64) 0; }
.section-header { text-align: center; margin-bottom: var(--space-40); }
.section-header h2 { margin-bottom: var(--space-8); }
.section-header p { font-size: 0.9375rem; max-width: 520px; margin: 0 auto; }

.section-label {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-12);
  letter-spacing: -0.01em;
}

/* ---------- Form Page Layout ---------- */
.form-page-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
  padding: var(--space-32) 0;
  align-items: start;
}

.form-panel {
  position: sticky;
  top: calc(var(--gnb-height) + var(--space-16));
}

/* ---------- Step Navigation ---------- */
.step-nav {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-24);
}

.step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-normal);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--ease-default);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--label-assistive);
}

.step-item .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fill-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--label-assistive);
  transition: all var(--ease-default);
  flex-shrink: 0;
}

.step-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.step-item.active .step-num {
  background: var(--primary);
  color: white;
}
.step-item.completed {
  border-color: var(--success);
  color: var(--success);
}
.step-item.completed .step-num {
  background: var(--success);
  color: white;
}

.step-content {
  display: none;
  animation: fadeSlideIn 0.25s ease;
}
.step-content.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Form Styles ---------- */
.form-group { margin-bottom: var(--space-20); }

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--label-normal);
  margin-bottom: var(--space-8);
}
.form-group label .required { color: var(--error); margin-left: 2px; }
.form-group label .optional { color: var(--label-assistive); font-weight: 400; font-size: 0.75rem; margin-left: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); }

input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--bg-elevated);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--label-normal);
  transition: all var(--ease-default);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
input::placeholder, textarea::placeholder { color: var(--label-disable); }
textarea { resize: vertical; min-height: 72px; }

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B95A1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input-with-suffix { position: relative; }
.input-with-suffix input { padding-right: 56px; }
.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--label-assistive);
  font-size: 0.875rem;
  font-weight: 500;
}

.amount-korean {
  margin-top: var(--space-4);
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.field-warning {
  margin-top: var(--space-4);
  padding: 8px 12px;
  background: var(--error-light);
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--error);
  display: none;
  align-items: center;
  gap: var(--space-8);
}
.field-warning.visible { display: flex; }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-24);
  padding-top: var(--space-20);
  border-top: 1px solid var(--line-normal);
}

/* ---------- Document Preview ---------- */
.preview-panel {
  position: sticky;
  top: calc(var(--gnb-height) + var(--space-16));
}

.preview-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--line-normal);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--space-20);
  border-bottom: 1px solid var(--line-normal);
}
.preview-toolbar h3 { font-size: 0.875rem; font-weight: 600; }
.preview-actions { display: flex; gap: var(--space-8); }

.preview-document {
  padding: 36px;
  min-height: 500px;
  font-size: 12.5px;
  line-height: 1.9;
  background: white;
  color: #1a1a1a;
}
[data-theme="dark"] .preview-document { background: #fafafa; color: #1a1a1a; }

.preview-document .doc-title {
  text-align: center;
  font-size: 1.35em;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: 8px;
  color: #111;
}
.preview-document .doc-section { margin-bottom: 18px; }
.preview-document .doc-section-title {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}
.preview-document .doc-field { display: flex; margin-bottom: 3px; }
.preview-document .doc-label { flex-shrink: 0; width: 110px; font-weight: 600; color: #444; }
.preview-document .doc-value { flex: 1; border-bottom: 1px solid #d0d0d0; min-height: 1.3em; padding-bottom: 1px; color: #111; word-break: break-all; }
.preview-document .doc-value.empty { color: #bbb; }
.preview-document .doc-body { text-indent: 1em; margin: 18px 0; line-height: 2; }
.preview-document .doc-signature { margin-top: 36px; }
.preview-document .doc-signature .sig-row { display: flex; gap: 16px; margin-bottom: 5px; }
.preview-document .doc-signature .sig-label { width: 90px; font-weight: 600; }
.preview-document .doc-signature .sig-value { flex: 1; border-bottom: 1px solid #d0d0d0; min-height: 1.2em; }
.preview-document .doc-date { text-align: center; margin-top: 28px; font-size: 1em; font-weight: 600; }

/* ---------- Disclaimer Banner ---------- */
.disclaimer-banner {
  padding: var(--space-16) var(--space-20);
  background: var(--warning-light);
  border: 1px solid rgba(255, 149, 0, 0.15);
  border-radius: var(--radius-md);
  margin: var(--space-24) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  font-size: 0.8125rem;
  color: var(--label-alternative);
  line-height: 1.6;
}
.disclaimer-banner .disclaimer-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.disclaimer-banner strong { color: var(--label-normal); }

.action-bar { padding: var(--space-24) 0 var(--space-40); }
.action-bar-inner { display: flex; gap: var(--space-12); justify-content: center; flex-wrap: wrap; }

/* ---------- Comparison Table ---------- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-normal);
}
.comparison-table th {
  background: var(--fill-normal);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--label-normal);
  border-bottom: 1px solid var(--line-normal);
}
.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-normal);
  font-size: 0.875rem;
  color: var(--label-alternative);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--bg-sub); }

/* ---------- FAQ / Accordion ---------- */
.accordion-item {
  border: 1px solid var(--line-normal);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-8);
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  padding: var(--space-16) var(--space-20);
  background: var(--bg-elevated);
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--label-normal);
  transition: background-color var(--ease-default);
}
.accordion-header:hover { background: var(--bg-sub); }
.accordion-header .accordion-icon {
  font-size: 1rem;
  transition: transform var(--ease-default);
  color: var(--label-assistive);
}
.accordion-item.open .accordion-header .accordion-icon { transform: rotate(180deg); }

.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.accordion-body-inner {
  padding: 0 var(--space-20) var(--space-20);
  font-size: 0.9375rem;
  color: var(--label-alternative);
  line-height: 1.8;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-sub);
  border-top: 1px solid var(--line-normal);
  padding: var(--space-48) 0 var(--space-24);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--layout-padding);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-40);
  padding-bottom: var(--space-32);
  border-bottom: 1px solid var(--line-normal);
}

.footer-brand .logo { color: var(--label-normal); margin-bottom: var(--space-12); }
.footer-brand p { color: var(--label-assistive); font-size: 0.8125rem; line-height: 1.7; }

.footer-links h4 { color: var(--label-normal); font-size: 0.8125rem; margin-bottom: var(--space-12); text-transform: uppercase; letter-spacing: 0.04em; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: var(--space-8); }
.footer-links a { color: var(--label-assistive); font-size: 0.8125rem; }
.footer-links a:hover { color: var(--label-normal); }

.footer-disclaimer {
  margin-top: var(--space-24);
  padding: var(--space-20);
  background: var(--fill-normal);
  border-radius: var(--radius-md);
}
.footer-disclaimer h4 {
  color: var(--label-normal);
  font-size: 0.8125rem;
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.footer-disclaimer p { color: var(--label-assistive); font-size: 0.75rem; line-height: 1.8; margin-bottom: var(--space-4); }

.footer-bottom {
  margin-top: var(--space-20);
  text-align: center;
  font-size: 0.75rem;
  color: var(--label-disable);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mb-sm { margin-bottom: var(--space-8); }
.mb-md { margin-bottom: var(--space-16); }
.mb-lg { margin-bottom: var(--space-24); }
.mb-xl { margin-bottom: var(--space-32); }
.mt-lg { margin-top: var(--space-24); }
.mt-xl { margin-top: var(--space-32); }

.hidden { display: none !important; }
.visible { display: flex !important; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in { animation: fadeIn 0.4s ease forwards; }
.animate-slide-up { animation: slideUp 0.5s ease forwards; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ---------- Page Title Bar ---------- */
.page-title-bar {
  background: var(--bg-sub);
  padding: var(--space-40) 0;
  text-align: center;
  border-bottom: 1px solid var(--line-normal);
}
.page-title-bar h1 {
  color: var(--label-normal);
  font-size: 1.75rem;
  margin-bottom: var(--space-8);
}
.page-title-bar p {
  color: var(--label-alternative);
  font-size: 0.9375rem;
}

/* ---------- Guide Page ---------- */
.guide-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-48) var(--layout-padding);
}
.guide-content h2 {
  font-size: 1.375rem;
  margin-top: var(--space-48);
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--line-normal);
}
.guide-content h3 {
  font-size: 1.0625rem;
  margin-top: var(--space-24);
  margin-bottom: var(--space-8);
  color: var(--primary);
}
.guide-content p { margin-bottom: var(--space-16); line-height: 1.85; }
.guide-content ul, .guide-content ol { margin-bottom: var(--space-16); padding-left: var(--space-24); }
.guide-content li { margin-bottom: var(--space-8); color: var(--label-alternative); line-height: 1.7; }

.info-box {
  padding: var(--space-20);
  border-radius: var(--radius-md);
  margin: var(--space-20) 0;
  border-left: 3px solid;
}
.info-box.tip { background: var(--success-light); border-color: var(--success); }
.info-box.warning { background: var(--warning-light); border-color: var(--warning); }
.info-box.danger { background: var(--error-light); border-color: var(--error); }
.info-box p { margin-bottom: var(--space-4); }
.info-box strong { color: var(--label-normal); }

/* ---------- Paper Document (Direct-Input Style) ---------- */
.paper-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-24) var(--layout-padding) var(--space-80);
}

.paper {
  background: #ffffff;
  color: #191f28;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-normal);
  padding: 52px 48px;
  font-size: 16px;
  line-height: 2;
  position: relative;
}
[data-theme="dark"] .paper {
  background: #fafafa;
  color: #191f28;
  border-color: var(--fill-strong);
}
/* 종이 내부의 모든 입력 요소: 일반 폼 스타일 완전 재정의 */
.paper input[type="text"],
.paper input[type="number"],
.paper input[type="date"],
.paper input[type="tel"],
.paper input[type="email"] {
  width: auto !important;
  flex: 1;
  padding: 6px 8px !important;
  font-size: calc(1em + 2pt) !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1.5px solid #d1d6db !important;
  border-radius: 0 !important;
  color: #191f28 !important;
  outline: none !important;
  min-width: 0;
  min-height: 36px;
  line-height: inherit;
  transition: border-color 0.2s ease;
}
.paper input:focus {
  border-bottom-color: #3182f6 !important;
  background: rgba(49, 130, 246, 0.03) !important;
  box-shadow: none !important;
}
.paper input::placeholder,
.paper textarea::placeholder {
  color: #b0b8c1 !important;
  font-style: italic;
}

.paper select {
  padding: 8px 32px 8px 8px !important;
  font-size: calc(1em + 2pt) !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1.5px solid #d1d6db !important;
  border-radius: 0 !important;
  color: #191f28 !important;
  outline: none !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%238b95a1' d='M5 7L1 3h8z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 6px center !important;
  min-width: 100px;
  min-height: 40px;
  transition: border-color 0.2s ease;
}
.paper select:focus {
  border-bottom-color: #3182f6 !important;
  box-shadow: none !important;
}

.paper textarea {
  width: 100% !important;
  padding: 10px 12px !important;
  font-size: calc(0.92em + 2pt) !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  background: rgba(249, 250, 251, 0.5) !important;
  border: 1.5px solid #d1d6db !important;
  border-radius: 6px !important;
  color: #191f28 !important;
  outline: none !important;
  resize: vertical;
  min-height: 80px;
  line-height: 1.8;
  transition: border-color 0.2s ease;
}
.paper textarea:focus {
  border-color: #3182f6 !important;
  background: rgba(49, 130, 246, 0.02) !important;
  box-shadow: none !important;
}

.paper-title {
  text-align: center;
  font-size: 1.5em;
  font-weight: 800;
  letter-spacing: 10px;
  margin-bottom: 32px;
  color: #111;
  padding-bottom: 16px;
  border-bottom: 2px solid #111;
}

.paper-body {
  text-indent: 1em;
  margin: 20px 0;
  line-height: 2.2;
  color: #333;
}

.paper-section {
  margin: 28px 0;
}

.paper-section-title {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #d1d6db;
  color: #333;
}

.paper-field {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 10px;
  gap: 8px;
  overflow: hidden;
}

.paper-label {
  flex-shrink: 0;
  width: 120px;
  font-weight: 600;
  color: #4e5968;
  font-size: 0.94em;
}

.paper-input {
  flex: 1;
  border: none;
  border-bottom: 1.5px solid #d1d6db;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: #191f28;
  padding: 6px 8px;
  outline: none;
  min-width: 0;
  transition: border-color 0.2s ease;
}
.paper-input:focus {
  border-bottom-color: #3182f6;
  background: rgba(49, 130, 246, 0.03);
}
.paper-input::placeholder {
  color: #b0b8c1;
  font-style: italic;
}
.paper-input:disabled {
  border-bottom-color: #e5e8eb;
  color: #8b95a1;
}

.paper-input-short {
  max-width: 140px;
}
.paper-input-mid {
  max-width: 220px;
}

/* Hide number input spinners */
.paper-input[type="number"]::-webkit-inner-spin-button,
.paper-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.paper-input[type="number"] {
  -moz-appearance: textfield;
}

/* Bank select smaller text */
.paper-select-sm {
  font-size: 0.875em;
}

.paper-select {
  border: none;
  border-bottom: 1.5px solid #d1d6db;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: #191f28;
  padding: 8px 28px 8px 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%238b95a1' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  transition: border-color 0.2s ease;
}
.paper-select:focus {
  border-bottom-color: #3182f6;
}

.paper-textarea {
  width: 100%;
  border: 1.5px solid #d1d6db;
  border-radius: 6px;
  background: rgba(249, 250, 251, 0.5);
  font-family: inherit;
  font-size: 0.92em;
  line-height: 1.8;
  color: #191f28;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  margin-top: 6px;
  transition: border-color 0.2s ease;
}
.paper-textarea:focus {
  border-color: #3182f6;
  background: rgba(49, 130, 246, 0.02);
}
.paper-textarea::placeholder {
  color: #b0b8c1;
  font-style: italic;
}

.paper-inline {
  display: inline;
}
.paper-inline .paper-input {
  display: inline-block;
  width: auto;
  min-width: 60px;
}

.paper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}
.paper-row .paper-field { flex: 1; min-width: 0; margin-bottom: 0; }
.paper-row .paper-input[type="date"] { max-width: 100%; min-width: 0; }

.paper-date {
  text-align: center;
  margin-top: 36px;
  font-size: 1em;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.paper-sig-block {
  margin-top: 40px;
  border-top: 1px solid #d1d6db;
  padding-top: 20px;
}

.paper-sig-title {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 12px;
  color: #333;
}

.paper-sig-group {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(242, 244, 246, 0.5);
  border-radius: 10px;
}
.paper-sig-group-label {
  font-weight: 700;
  font-size: 0.88em;
  color: #4e5968;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.paper-sig-group-label .sig-badge {
  display: inline-block;
  padding: 1px 8px;
  background: #e8f3ff;
  color: #3182f6;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
}

.paper-amount-display {
  margin-top: 2px;
  padding: 4px 8px;
  background: #e8f3ff;
  border-radius: 4px;
  font-size: 0.85em;
  color: #3182f6;
  font-weight: 500;
  display: inline-block;
  min-height: 22px;
}
.paper-amount-display:empty { display: none; }

.paper-interest-warning {
  margin-top: 4px;
  padding: 4px 8px;
  background: #ffeeee;
  border-radius: 4px;
  font-size: 0.82em;
  color: #f04452;
  display: none;
}
.paper-interest-warning.visible { display: block; }

.paper-help {
  font-size: 0.8em;
  color: #8b95a1;
  margin-top: 2px;
}

/* Sticky Download Bar */
.sticky-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background: rgba(var(--bg-normal-rgb), 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line-normal);
  padding: var(--space-12) var(--space-20);
}

.sticky-actions-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-8);
}
.sticky-actions .btn { flex: 1; }
.sticky-actions .btn-primary { flex: 2; }

/* ---------- Interstitial Ad Overlay ---------- */
.interstitial-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease;
}
.interstitial-overlay.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.interstitial-card {
  background: var(--bg-normal);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 480px;
  width: calc(100% - 32px);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.interstitial-header {
  padding: 20px 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line-normal);
}
.interstitial-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--label-normal);
  margin-bottom: 4px;
}
.interstitial-header p {
  font-size: 0.85rem;
  color: var(--label-assistive);
}

.interstitial-ad-area {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--fill-normal);
}
.interstitial-ad-area .ad-placeholder {
  text-align: center;
  color: var(--label-disable);
  font-size: 0.8rem;
}

.interstitial-footer {
  padding: 16px 24px 20px;
  text-align: center;
  border-top: 1px solid var(--line-normal);
}

.interstitial-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--label-assistive);
  margin-bottom: 12px;
}
.interstitial-timer .countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.interstitial-download-btn {
  display: none;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.interstitial-download-btn:hover {
  background: var(--primary-hover);
}
.interstitial-download-btn:active {
  transform: scale(0.98);
}
.interstitial-download-btn.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Paper disclaimer inside the paper */
.paper-disclaimer {
  margin-top: 24px;
  padding: 12px 14px;
  background: #fff3e0;
  border-radius: 8px;
  font-size: 0.78em;
  color: #6b7684;
  line-height: 1.7;
  border: 1px solid rgba(254, 152, 0, 0.15);
}
.paper-disclaimer strong { color: #4e5968; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .form-page-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .hero { padding: var(--space-56) 0 var(--space-48); }
  .hero h1 { font-size: 2rem; line-height: 1.25; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--gnb-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(var(--bg-normal-rgb), 0.96);
    backdrop-filter: blur(32px);
    border-bottom: 1px solid var(--line-normal);
    padding: var(--space-16);
    gap: var(--space-4);
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .step-nav { flex-direction: column; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 320px; }
  .footer-top { grid-template-columns: 1fr; }

  .page-title-bar h1 { font-size: 1.375rem; }
  .comparison-table { display: block; overflow-x: auto; }

  /* Paper mobile */
  .paper { padding: 32px 24px; font-size: 15px; border-radius: var(--radius-md); }
  .paper-title { font-size: 1.3em; letter-spacing: 6px; margin-bottom: 24px; padding-bottom: 12px; }
  .paper-label { width: 90px; font-size: 0.92em; }
  .paper-row { flex-direction: column; gap: 0; }
  .paper-container { padding: var(--space-16) var(--space-12) var(--space-80); }
  .paper-sig-group { padding: 14px 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-16); }
  .card { padding: var(--space-20); }
  .section { padding: var(--space-48) 0; }
  .paper { padding: 28px 18px; font-size: 14.5px; }
  .paper-field { flex-direction: column; gap: 4px; }
  .paper-label { width: auto; }
  .paper-input { width: 100%; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .step-nav, .step-buttons, .form-panel,
  .preview-toolbar, .disclaimer-banner, .action-bar, .theme-toggle,
  .mobile-menu-btn, .btn, .sticky-actions, .paper-disclaimer,
  .page-title-bar { display: none !important; }
  body { background: white; color: black; }
  .paper { box-shadow: none; border: none; padding: 0; }
  .paper-input { border-bottom-color: transparent; }
  .paper-select { border-bottom-color: transparent; }
  .paper-container { padding: 0; max-width: none; }
  .preview-document { padding: 0; box-shadow: none; border: none; }
  .form-page-layout { display: block; }
  .preview-wrapper { border: none; box-shadow: none; }
}
