.hjd-td-dictionary,
.hjd-td-single {
  --hjd-td-blue: #2563eb;
  --hjd-td-blue-dark: #1d4ed8;
  --hjd-td-blue-soft: #eff6ff;
  --hjd-td-border: #e5e7eb;
  --hjd-td-text: #111827;
  --hjd-td-muted: #4b5563;
  --hjd-td-bg: #f8fafc;
  color: var(--hjd-td-text);
  font-family: inherit;
  word-break: keep-all;
  box-sizing: border-box;
}

.hjd-td-dictionary *,
.hjd-td-single * {
  box-sizing: border-box;
}

.hjd-td-dictionary {
  max-width: 1120px;
  margin: 44px auto 48px;
  padding: 0 20px;
}

.hjd-td-hero {
  padding: 34px 32px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: #f8fbff;
}

.hjd-td-kicker,
.hjd-td-final-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--hjd-td-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hjd-td-main-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(31px, 4.8vw, 50px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hjd-td-intro {
  max-width: 850px;
  margin: 16px 0 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: -0.02em;
}

.hjd-td-medical-notice,
.hjd-td-single-notice {
  margin-top: 22px;
  padding: 20px 21px;
  border: 1px solid var(--hjd-td-border);
  border-radius: 17px;
  background: #fff;
}

.hjd-td-medical-notice strong,
.hjd-td-single-notice strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 900;
}

.hjd-td-medical-notice p,
.hjd-td-single-notice p {
  margin: 0;
  color: var(--hjd-td-muted);
  font-size: 14px;
  line-height: 1.75;
}

.hjd-td-search-box {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--hjd-td-border);
  border-radius: 20px;
  background: #fff;
}

.hjd-td-search-field {
  position: relative;
}

.hjd-td-search {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 48px 0 17px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  outline: 0;
  background: var(--hjd-td-bg);
  color: var(--hjd-td-text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.hjd-td-search:focus {
  border-color: var(--hjd-td-blue);
  background: #fff;
}

.hjd-td-search::placeholder {
  color: #9ca3af;
}

.hjd-td-search-icon {
  position: absolute;
  top: 50%;
  right: 17px;
  transform: translateY(-50%);
  color: var(--hjd-td-blue);
  font-size: 18px;
  font-weight: 900;
  pointer-events: none;
}

.hjd-td-search-result {
  min-height: 20px;
  margin: 9px 2px 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.hjd-td-departments {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.hjd-td-department {
  padding: 24px 22px;
  border: 1px solid var(--hjd-td-border);
  border-radius: 20px;
  background: #fff;
}

.hjd-td-department-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hjd-td-department-head h2 {
  margin: 0;
  color: var(--hjd-td-text);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hjd-td-department-head span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--hjd-td-blue-soft);
  color: var(--hjd-td-blue-dark);
  font-size: 12px;
  font-weight: 850;
}

.hjd-td-items {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hjd-td-item,
.hjd-td-item:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 0 15px;
  border: 1px solid #dbeafe !important;
  border-radius: 999px;
  background: var(--hjd-td-bg);
  color: var(--hjd-td-blue-dark) !important;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 850;
  text-align: center;
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 1px solid #dbeafe !important;
  box-shadow: none !important;
  transition: opacity .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

.hjd-td-item:hover,
.hjd-td-item:focus {
  background: var(--hjd-td-blue-soft);
  border-color: #bfdbfe !important;
  color: var(--hjd-td-blue-dark) !important;
  text-decoration: none !important;
}

.hjd-td-dictionary.is-searching .hjd-td-item {
  opacity: .24;
}

.hjd-td-dictionary.is-searching .hjd-td-item.is-match,
.hjd-td-dictionary.is-searching .hjd-td-item.is-match:visited,
.hjd-td-dictionary.is-searching .hjd-td-item.is-match:hover,
.hjd-td-dictionary.is-searching .hjd-td-item.is-match:focus {
  opacity: 1;
  background: var(--hjd-td-blue);
  border-color: var(--hjd-td-blue) !important;
  color: #fff !important;
}

.hjd-td-empty {
  margin-top: 22px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: #64748b;
  text-align: center;
}

.hjd-td-final {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-top: 28px;
  padding: 28px 27px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
}

.hjd-td-final h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hjd-td-final p {
  margin: 9px 0 0;
  color: var(--hjd-td-muted);
  font-size: 15px;
  line-height: 1.7;
}

.hjd-td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  flex: 0 0 auto;
}

.hjd-td-btn,
.hjd-td-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  font-weight: 850;
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.hjd-td-btn-primary,
.hjd-td-btn-primary:visited,
.hjd-td-btn-primary:hover,
.hjd-td-btn-primary:focus {
  background: var(--hjd-td-blue);
  color: #fff !important;
}

.hjd-td-btn-secondary,
.hjd-td-btn-secondary:visited,
.hjd-td-btn-secondary:hover,
.hjd-td-btn-secondary:focus {
  border: 1px solid #bfdbfe !important;
  background: #fff;
  color: var(--hjd-td-blue-dark) !important;
}

.hjd-td-btn-kakao,
.hjd-td-btn-kakao:visited,
.hjd-td-btn-kakao:hover,
.hjd-td-btn-kakao:focus {
  background: #fee500;
  color: #181600 !important;
}

/* Single treatment */
.hjd-td-single {
  max-width: 1120px;
  margin: 42px auto 52px;
  padding: 0 20px;
}

.hjd-td-article {
  width: 100%;
}

.hjd-td-back,
.hjd-td-back:visited,
.hjd-td-back:hover,
.hjd-td-back:focus {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--hjd-td-blue-dark) !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.hjd-td-single-header {
  padding: 31px 30px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
}

.hjd-td-single-department {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #bfdbfe;
  color: var(--hjd-td-blue-dark);
  font-size: 13px;
  font-weight: 850;
}

.hjd-td-single-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hjd-td-single-summary {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.75;
}

.hjd-td-single-content {
  margin-top: 28px;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.85;
}

.hjd-td-single-content h2 {
  margin: 38px 0 14px;
  font-size: 27px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hjd-td-single-content h3 {
  margin: 28px 0 11px;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hjd-td-single-content p,
.hjd-td-single-content ul,
.hjd-td-single-content ol {
  margin-top: 0;
  margin-bottom: 18px;
}

.hjd-td-related {
  margin-top: 38px;
  padding-top: 30px;
  border-top: 1px solid var(--hjd-td-border);
}

.hjd-td-related h2 {
  margin: 0 0 15px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.hjd-td-related-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hjd-td-related-items a,
.hjd-td-related-items a:visited,
.hjd-td-related-items a:hover,
.hjd-td-related-items a:focus {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid #dbeafe !important;
  border-radius: 999px;
  background: #fff;
  color: var(--hjd-td-blue-dark) !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  border-bottom: 1px solid #dbeafe !important;
}

@media (max-width: 900px) {
  .hjd-td-final {
    align-items: flex-start;
    flex-direction: column;
  }

  .hjd-td-actions {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .hjd-td-dictionary,
  .hjd-td-single {
    margin-top: 32px;
    padding: 0 16px;
  }

  .hjd-td-hero {
    padding: 28px 21px;
    border-radius: 20px;
  }

  .hjd-td-main-title {
    font-size: 33px;
  }

  .hjd-td-search-box,
  .hjd-td-department {
    padding: 20px 18px;
    border-radius: 18px;
  }

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

  .hjd-td-item,
  .hjd-td-item:visited {
    width: 100%;
    min-height: 43px;
    padding: 8px 10px;
    border-radius: 13px;
    font-size: 13px;
  }

  .hjd-td-final {
    padding: 24px 20px;
    border-radius: 19px;
  }

  .hjd-td-final h2 {
    font-size: 22px;
  }

  .hjd-td-actions {
    flex-direction: column;
  }

  .hjd-td-btn {
    width: 100%;
  }

  .hjd-td-single-header {
    padding: 27px 21px;
    border-radius: 20px;
  }

  .hjd-td-single-header h1 {
    font-size: 34px;
  }

  .hjd-td-single-summary {
    font-size: 16px;
  }

  .hjd-td-single-content {
    font-size: 15.5px;
  }

  .hjd-td-single-content h2 {
    font-size: 24px;
  }
}

/* v1.0.2: compact upper notice on mobile */
@media (max-width: 768px) {
  .hjd-td-medical-notice,
  .hjd-td-single-notice {
    margin-top: 18px;
    padding: 17px 18px;
  }

  .hjd-td-medical-notice p,
  .hjd-td-single-notice p {
    line-height: 1.68;
  }
}
