:root {
  --blue: #144990;
  --blue2: #1e4a8a;
  --teal: #009290;
  --line: #d8dee8;
  --soft: #f8f8f8;
  --text: #222;
  --muted: #666;
  --danger: #c52222;
  --footer: #f4f4f4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family:
    "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}
a {
  color: inherit;
  text-decoration: none;
}
.site-header {
  height: 92px;
  background: #fff;
  border-bottom: 6px solid #1b7187;
}
.site-header-inner {
  width: min(1120px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #008d8a;
  font-size: 22px;
  font-weight: 800;
}
.brand-symbol {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #008d8a;
  color: #fff;
  font-weight: 900;
}
.brand-text strong {
  color: #1e4a8a;
}
.site-main {
  padding: 42px 0 56px;
  background: #fff;
}
.form-wrap {
  width: min(960px, calc(100% - 28px));
  margin: 0 auto;
  background: #f9f9f9;
  padding: 0 0 20px;
}
.page-title {
  text-align: center;
  padding: 0 20px 24px;
  background: #fff;
}
.page-title h1 {
  display: inline-block;
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 800;
  color: #111;
}
.page-title h1:after {
  content: "";
  display: block;
  width: 44px;
  margin: 12px auto 0;
  border-top: 2px solid #333;
}
.clinic-form {
  width: 100%;
  margin: 0 auto;
}
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}
.step-tabs {
  display: flex;
  width: 100%;
  height: 50px;
}
.step-tab {
  flex: 1;
  border: 0;
  background: #c9c9c9;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}
.step-tab.is-active {
  background: var(--blue);
}
.step-panel {
  display: none;
  padding: 0 22px;
}
.step-panel.is-active {
  display: block;
}
.center-choice {
  text-align: center;
  padding: 24px 10px 28px;
}
.center-choice h2 {
  margin: 0 0 14px;
  font-size: 17px;
}
.center-choice label {
  margin: 0 12px;
}
.line-row {
  border-top: 1px solid #777;
  border-bottom: 1px solid #777;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 14px 22px;
  background: #f9f9f9;
}
.line-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.line-row span {
  font-weight: 700;
}
.section-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  border-bottom: 1px solid #ddd;
  padding: 16px 0;
  background: #f9f9f9;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
  padding: 10px;
}
.section-label small {
  font-size: 15px;
}
.section-body {
  padding: 0 16px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.clinic-form label {
  font-weight: 600;
  color: #333;
}
.clinic-form input[type="text"],
.clinic-form input[type="tel"],
.clinic-form input[type="password"],
.clinic-form input[type="number"],
.clinic-form select,
.clinic-form textarea {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 5px;
  padding: 8px 12px;
  border: 1px solid #b2b2b2;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
}
.field-group {
  font-weight: 600;
}
.radio-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.radio-row.center {
  justify-content: center;
}
.inline-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 600;
}
.inline-fields > span {
  width: 100%;
  font-weight: 700;
}
.inline-fields input {
  width: 58px !important;
  display: inline-block !important;
  margin: 0 4px;
}
.check-list label {
  display: block;
  margin: 4px 0;
  font-weight: 500;
}
.medicine-list label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.medicine-list input[type="text"] {
  display: inline-block;
  width: 230px;
  margin: 0;
  height: 34px;
}
.survey-list fieldset {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}
.survey-list legend {
  font-weight: 700;
  margin-bottom: 7px;
}
.survey-list label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 18px 6px 0;
  font-weight: 500;
}
.agree-summary {
  margin: 18px 22px 10px;
  font-weight: 800;
}
.all-agree {
  display: block;
  margin: 22px 0;
  padding: 16px 12px;
  background: #f8f8f8;
  font-size: 18px;
  font-weight: 800;
  color: #d65042;
}
.all-agree input {
  transform: scale(1.25);
  margin-right: 8px;
}
.consent-block {
  padding: 26px 0;
  border-bottom: 1px solid #ddd;
}
.consent-block h2 {
  text-align: center;
  font-size: 24px;
  margin: 0 0 24px;
}
.consent-block h3 {
  text-align: center;
  font-size: 18px;
  margin: 0 0 18px;
}
.info-table,
.third-table {
  border: 1px solid #cbd5e1;
  background: #fff;
  margin: 0 0 18px;
}
.info-table .thead,
.third-table .thead {
  display: grid;
  background: var(--blue2);
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.info-table-4 .thead {
  grid-template-columns: 1.4fr 0.65fr 2.4fr 0.8fr;
}
.third-table .thead {
  grid-template-columns: 1.2fr 0.9fr 2.4fr 0.9fr;
}
.info-table .thead span,
.third-table .thead span {
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.info-table .trow,
.third-table .trow {
  display: grid;
  border-top: 1px solid #cbd5e1;
}
.info-table-4 .trow {
  grid-template-columns: 1.4fr 0.65fr 2.4fr 0.8fr;
}
.third-table .trow {
  grid-template-columns: 1.2fr 0.9fr 2.4fr 0.9fr;
}
.info-table .trow > div,
.third-table .trow > div {
  padding: 14px;
  border-right: 1px solid #cbd5e1;
}
.info-table .trow > div:last-child,
.third-table .trow > div:last-child {
  border-right: 0;
  text-align: center;
  color: var(--blue);
  font-weight: 800;
}
.muted {
  background: #f8fafc;
}
.notice-text {
  font-size: 14px;
  color: #333;
  margin: 16px 0;
}
.consent-choice {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 70px 70px;
  gap: 8px 16px;
  align-items: center;
  background: #f8f8f8;
  padding: 18px 20px;
  text-align: center;
  font-weight: 800;
}
.consent-choice label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}
.service-consent p {
  margin: 0 0 12px;
}
.signature-box {
  background: #f8f8f8;
  padding: 26px 22px 34px;
  border-bottom: 1px solid #ddd;
}
.date-line {
  text-align: center;
  font-weight: 800;
  margin: 0 0 20px;
}
.signature-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.signer-area {
  text-align: center;
}
.signer-name {
  display: block;
  margin-top: 16px;
  color: var(--blue) !important;
}
.guardian-fields {
  display: none;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}
.guardian-fields.is-active {
  display: flex;
}
.guardian-fields label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.guardian-fields input {
  width: 130px !important;
  margin: 0 !important;
}
.canvas-area {
  text-align: center;
}
.canvas-area p {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 800;
}
#signatureCanvas {
  width: 283px;
  height: 90px;
  background: #fff;
  border: 1px solid #222;
  touch-action: none;
}
.canvas-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.canvas-buttons button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid #aaa;
  background: #fff;
  cursor: pointer;
}
.canvas-buttons #confirmSignature {
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  border-color: var(--blue);
}
.signature-status {
  font-size: 13px;
  color: #777 !important;
  margin-top: 8px !important;
}
.signature-status.ok {
  color: #0a7c48 !important;
}
.director {
  text-align: center;
  font-size: 24px;
  margin: 34px 0 0;
}
.bottom-actions {
  padding: 20px 22px 0;
  display: none;
  gap: 8px;
}
.bottom-actions.is-active {
  display: flex;
}
.step1-actions {
  display: flex;
}
.step2-actions {
  display: none;
}
.primary,
.secondary {
  height: 48px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.primary {
  background: var(--blue);
}
.secondary {
  background: #6e7985;
  flex: 1;
}
.primary.full {
  width: 100%;
}
.step2-actions .primary {
  flex: 1;
}
.site-footer {
  background: var(--footer);
  padding: 38px 20px 54px;
  text-align: center;
  color: #555;
  border-top: 1px solid #e5e5e5;
}
.footer-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
  border-top: 1px solid #d6d6d6;
  padding-top: 24px;
}
.footer-links {
  font-size: 13px;
  margin-bottom: 24px;
}
.footer-links a {
  margin: 0 8px;
}
.site-footer h2 {
  font-size: 22px;
  color: #333;
  margin: 0 0 16px;
}
.site-footer p {
  margin: 4px 0;
  font-size: 13px;
}
.copyright {
  color: #777;
  margin-top: 14px !important;
}
.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid #333;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
}
.complete-card,
.search-card,
.admin-card {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e1e5ec;
  padding: 34px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.complete-card h1,
.search-card h1,
.admin-card h1 {
  margin-top: 0;
}
.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}
.meta-table th,
.meta-table td {
  border: 1px solid #d7dde8;
  padding: 10px;
  text-align: left;
}
.meta-table th {
  width: 180px;
  background: #f7f9fc;
  color: #144990;
}
.action-links {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.action-links a,
.action-links button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  background: #144990;
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-links .gray {
  background: #6e7985;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}
.admin-table th,
.admin-table td {
  border: 1px solid #d7dde8;
  padding: 10px;
  text-align: left;
}
.admin-table th {
  background: #144990;
  color: #fff;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.admin-toolbar form {
  display: flex;
  gap: 6px;
}
.admin-toolbar input,
.admin-toolbar select {
  height: 38px;
  border: 1px solid #bbb;
  padding: 0 10px;
}
.admin-toolbar button {
  height: 38px;
  border: 0;
  background: #144990;
  color: #fff;
  padding: 0 14px;
}
.detail-section {
  margin: 22px 0;
}
.detail-section h2 {
  font-size: 18px;
  color: #144990;
  border-bottom: 2px solid #144990;
  padding-bottom: 6px;
}
.signature-img {
  max-width: 283px;
  border: 1px solid #222;
  background: #fff;
}
.status-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}
.status-form select,
.status-form textarea {
  border: 1px solid #bbb;
  padding: 8px;
}
.status-form textarea {
  width: 100%;
  min-height: 80px;
}
.status-form button {
  background: #144990;
  color: #fff;
  border: 0;
  padding: 10px 16px;
  font-weight: 800;
}
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  .site-header {
    height: 74px;
  }
  .site-header-inner {
    width: calc(100% - 24px);
  }
  .brand {
    font-size: 18px;
  }
  .brand-symbol {
    width: 28px;
    height: 28px;
  }
  .site-main {
    padding: 28px 0;
  }
  .form-wrap {
    width: calc(100% - 16px);
  }
  .page-title h1 {
    font-size: 24px;
  }
  .step-panel {
    padding: 0 12px;
  }
  .line-row {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .section-grid {
    grid-template-columns: 1fr;
    padding: 14px 0;
  }
  .section-label {
    justify-content: flex-start;
    font-size: 18px;
    padding: 8px 10px;
  }
  .section-body {
    padding: 0 10px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .inline-fields {
    display: block;
  }
  .inline-fields label {
    display: block;
    margin-top: 7px;
  }
  .medicine-list label {
    display: block;
  }
  .medicine-list input[type="text"] {
    width: 100%;
    margin-top: 5px;
  }
  .survey-list label {
    display: block;
    margin-right: 0;
  }
  .info-table .thead,
  .third-table .thead {
    display: none;
  }
  .info-table .trow,
  .third-table .trow,
  .info-table-4 .trow {
    display: block;
    border-top: 0;
    border-bottom: 3px solid var(--blue2);
  }
  .info-table .trow > div,
  .third-table .trow > div {
    border-right: 0;
    border-bottom: 1px solid #dbe3ef;
    text-align: left !important;
  }
  .info-table .trow > div:before,
  .third-table .trow > div:before {
    display: block;
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 4px;
  }
  .info-table .trow > div:nth-child(1):before {
    content: "수집·이용 목적";
  }
  .info-table .trow > div:nth-child(2):before {
    content: "구분";
  }
  .info-table .trow > div:nth-child(3):before {
    content: "항목";
  }
  .info-table .trow > div:nth-child(4):before {
    content: "보유기간";
  }
  .third-table .trow > div:nth-child(1):before {
    content: "제공받는 자";
  }
  .third-table .trow > div:nth-child(2):before {
    content: "제공 목적";
  }
  .third-table .trow > div:nth-child(3):before {
    content: "항목";
  }
  .third-table .trow > div:nth-child(4):before {
    content: "보유기간";
  }
  .consent-choice {
    grid-template-columns: 1fr 70px 70px;
    text-align: left;
    padding: 14px 10px;
  }
  .consent-choice span {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 10px;
  }
  .signature-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .guardian-fields.is-active {
    display: block;
  }
  .guardian-fields label {
    justify-content: center;
    margin-top: 6px;
  }
  .guardian-fields input {
    width: 160px !important;
  }
  .bottom-actions {
    padding-left: 12px;
    padding-right: 12px;
  }
  .step2-actions {
    flex-direction: column;
  }
  .complete-card,
  .search-card,
  .admin-card {
    padding: 22px 16px;
  }
  .admin-toolbar {
    display: block;
  }
  .admin-toolbar form {
    margin-top: 10px;
    flex-wrap: wrap;
  }
  .admin-table {
    font-size: 13px;
  }
  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4),
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) {
    display: none;
  }
  .action-links {
    flex-direction: column;
  }
}

.brand-logo-img {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.brand-logo-img img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 260px;
}

@media (max-width: 768px) {
  .brand-logo-img img {
    height: 34px;
    max-width: 220px;
  }
}
