/* 다받음 웹 공통 스타일 — 향후 모든 다받음 웹 도구가 재사용하는 기본 레이아웃·헤더·푸터·폼 규격
   대비 규칙 (브랜드 가이드 2-3):
   - 주황(--accent) 바탕 위에는 남색/먹색(--brand-deep / --ink) 글자만 사용 (흰 글자 금지)
   - 밝은 바탕(--paper / --surface) 위에는 주황 글자 금지 (면·밑줄 형광펜·테두리·아이콘만 허용)
   - Pretendard 400 이하 미사용 (본문 600, 강조 700~800, 제목·핵심 숫자 900) */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;
  overflow-wrap: break-word;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.db-tnum {
  font-variant-numeric: tabular-nums;
}

/* 공통 상단 헤더 */
.db-header {
  background: var(--brand);
  color: var(--on-brand);
  border-bottom: 4px solid var(--brand-deep);
}

.db-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.db-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 8px 14px 9px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  flex-shrink: 0;
}

.db-brand-pill__check {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.db-brand-pill__check path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.db-header__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.db-header__tag {
  display: inline-block;
  background: var(--accent);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 11px;
  border-radius: 8px;
  white-space: nowrap;
}

.db-header__tool {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .db-header__tool {
    display: none;
  }
}

/* 메인 컨테이너 */
.db-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* 도식 제목 + 주황 형광펜 */
.db-page-head {
  margin-bottom: 18px;
}

.db-page-title {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}

.db-hl {
  background: linear-gradient(transparent 58%, var(--accent) 58%, var(--accent) 94%, transparent 94%);
  color: inherit;
  padding: 0 3px;
}

.db-page-desc {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.55;
}

.db-scope-line {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

/* 공통 카드 */
.db-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 16px;
  margin-bottom: 16px;
}

.db-card--brand {
  background: var(--brand);
  border-color: var(--brand-deep);
  color: var(--on-brand);
}

.db-card__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
  margin-bottom: 12px;
}

.db-card--brand .db-card__title {
  color: var(--on-brand);
}

/* 공통 버튼 */
.db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  border: 1.5px solid transparent;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.db-btn:active {
  transform: translateY(1px);
}

.db-btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand-deep);
}

.db-btn--primary:hover {
  background: var(--brand-deep);
}

.db-btn--accent {
  background: var(--accent);
  color: var(--brand-deep);
  border-color: #E07410;
}

.db-btn--accent:hover {
  background: #F47E12;
}

.db-btn--ghost {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--line);
}

.db-btn--ghost:hover {
  background: var(--brand-soft);
  border-color: var(--brand-mid);
}

.db-btn--block {
  width: 100%;
}

/* 공통 입력 필드 (모바일 터치 48px+, 16px 이상으로 iOS 확대 방지) */
.db-field {
  margin-bottom: 14px;
}

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

.db-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.db-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.db-hint-inline {
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

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

.db-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 48px 10px 14px;
  border: 1.5px solid #CFC9BE;
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.db-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.db-input[aria-invalid="true"] {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.db-input-unit {
  position: absolute;
  right: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--sub);
  pointer-events: none;
}

.db-field-help {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  min-height: 1.3em;
}

.db-error-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--warn-soft);
  border: 1.5px solid var(--warn);
  color: var(--warn);
  font-size: 14px;
  font-weight: 800;
}

.db-error-box[hidden] {
  display: none;
}

/* 공통 안내 박스 & 링크 카드 */
.db-notice {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
}

.db-notice strong {
  font-weight: 800;
  color: var(--brand-deep);
}

.db-link-list {
  display: grid;
  gap: 10px;
}

.db-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.db-link-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.db-link-card__kicker {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--sub);
  margin-bottom: 2px;
}

.db-link-card__title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-deep);
}

.db-link-card__arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 13px;
  font-weight: 800;
}

/* 공통 하단 푸터 (브랜드 배너 사인오프 계승) */
.db-footer {
  border-top: 1.5px solid var(--line);
  background: var(--surface);
  padding: 22px 16px 28px;
}

.db-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.db-footer__signoff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.db-footer__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 13px 8px 15px;
  border-radius: var(--radius-pill);
}

.db-footer__pill svg {
  width: 16px;
  height: 16px;
}

.db-footer__pill path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.db-footer__copy {
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}
