:root {
  --color-primary: #2563eb;
  --color-primary-light: #eff6ff;

  --color-background: #f8fafc;
  --color-surface: #ffffff;

  --color-danger: #dc2626;

  --color-gray-900: #1f2937;
  --color-gray-700: #4b5563;
  --color-gray-400: #9ca3af;
  --color-gray-200: #e5e7eb;
  --color-gray-50: #f8fafc;

  --color-priority-low: #5b9bd5;
  --color-priority-medium: #d8a23a;
  --color-priority-high: #c96868;

  --max-content-width: 1200px;
}

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

html {
  font-size: 16px;
}

body {
  min-width: 320px;
  background-color: var(--color-background);
  color: var(--color-gray-900);
  font-family:
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(100% - 40px, var(--max-content-width));
  margin: 0 auto;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.caption {
  color: var(--color-gray-700);
  font-size: 12px;
  font-weight: 400;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

.btn-primary:hover {
  opacity: 0.9;
}

.header {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 64px;
  background: linear-gradient(90deg,
      #ffffff 0%,
      #f8fbff 35%,
      #eef6ff 70%,
      #dceeff 100%);
  border-bottom: 1px solid rgb(219 234 254 / 70%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 64px, 1340px);
  height: 100%;
  margin: 0 auto;
}

.header-logo {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo img {
  display: block;
  width: 205px;
  height: auto;
  object-fit: contain;
}

.header-tagline {
  position: absolute;
  left: 72px;
  bottom: -1px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.emergency-button {
  width: 175px;
  height: 60px;
  flex-shrink: 0;
  padding: 0;
  border: 0;

  background-color: transparent;
  background-image: url("../assets/images/emergency-112.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;

  cursor: pointer;
}

@media (max-width: 900px) {
  .header-inner {
    width: min(100% - 40px, 1340px);
  }

  .header-logo img {
    width: 185px;
  }

  .header-tagline {
    left: 65px;
    font-size: 10px;
  }

  .emergency-button {
    width: 135px;
    height: 42px;
  }
}

@media (max-width: 600px) {
  .header {
    height: 64px;
  }

  .header-inner {
    width: calc(100% - 32px);
  }

  .header-logo img {
    width: 150px;
  }

  .header-tagline {
    left: 53px;
    bottom: 0;
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .emergency-button {
    width: 120px;
    height: 38px;
  }
}

.emergency-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.emergency-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.emergency-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(15 23 42 / 52%);
}

.emergency-modal-content {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 34px 28px 26px;
  border-radius: 18px;
  background-color: #ffffff;
  box-shadow: 0 20px 60px rgb(15 23 42 / 25%);
  text-align: center;
}

.emergency-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #64748b;
  font-family: "Pretendard", sans-serif;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
}

.emergency-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 4px auto 18px;
  border-radius: 50%;
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 24px;
  font-weight: 800;
}

.emergency-modal-content h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
}

.emergency-modal-description {
  margin: 10px 0 22px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.emergency-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 66px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background-color: #fff7f7;
}

.emergency-number span {
  color: #dc2626;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 4px;
}

.emergency-call-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 52px;
  border-radius: 10px;
  background-color: #dc2626;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.emergency-call-button:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
}

.emergency-call-icon {
  font-size: 18px;
}

.emergency-cancel-button {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: 0;
  background-color: transparent;
  color: #64748b;
  font-family: "Pretendard", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.emergency-cancel-button:hover {
  color: #334155;
}

body.emergency-modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .emergency-modal {
    align-items: flex-end;
    padding: 0;
  }

  .emergency-modal-content {
    width: 100%;
    max-width: none;
    padding: 32px 20px 24px;
    border-radius: 20px 20px 0 0;
  }

  .emergency-number {
    height: 62px;
  }

  .emergency-call-button {
    height: 54px;
  }
}

.emergency-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.emergency-divider::before,
.emergency-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #e2e8f0;
}

.emergency-divider span {
  flex-shrink: 0;
}

.emergency-web-guide {
  margin-bottom: 14px;
  text-align: left;
}

.emergency-web-guide strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.emergency-web-guide p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.emergency-safedream-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background-color: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.emergency-safedream-button:hover {
  border-color: #93c5fd;
  background-color: #dbeafe;
  transform: translateY(-1px);
}

.emergency-external-icon {
  font-size: 16px;
  line-height: 1;
}

.emergency-service-notice {
  margin: 18px 0 4px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background-color: #f8fbff;
  text-align: left;
}

.emergency-service-notice strong {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.emergency-service-notice p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .emergency-divider {
    margin: 18px 0;
  }

  .emergency-safedream-button {
    min-height: 52px;
  }

  .emergency-service-notice {
    font-size: 11px;
  }
}

.emergency-report-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 12px !important;
  padding: 11px 13px;
  border-radius: 8px;
  background-color: #f8fafc;
}

.emergency-report-number strong {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.emergency-report-number span {
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
}