:root {
  --ink: #17131c;
  --muted: #6c6674;
  --subtle: #91899d;
  --paper: #ffffff;
  --bg: #ffffff;
  --line: #e4dfe9;
  --line-strong: #d7d0de;
  --accent: #854eb9;
  --accent-dark: #6b39a0;
  --accent-soft: #f4ecfb;
  --blue: #5a81ff;
  --green: #68c76f;
  --shadow: 0 8px 22px rgba(34, 26, 44, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

button,
input,
select {
  font: inherit;
}

.global-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.global-header::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  content: "";
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(133, 78, 185, 0.24);
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.language-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.language-nav::-webkit-scrollbar {
  display: none;
}

.language-nav a {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  box-shadow: 0 2px 7px rgba(23, 19, 28, 0.08);
}

.language-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 60px;
}

.search-hero {
  position: relative;
  min-height: 310px;
  margin: 0;
  overflow: visible;
  background: #eee;
}

.search-hero img {
  display: block;
  width: 100%;
  height: 310px;
  object-fit: cover;
  object-position: center 44%;
}

.search-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 19, 28, 0.18), rgba(23, 19, 28, 0.26)),
    rgba(23, 19, 28, 0.12);
}

.search-hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 20px 34px;
  text-align: center;
}

.search-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 2.55vw, 31px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-box {
  position: absolute;
  right: 50%;
  bottom: -28px;
  z-index: 2;
  width: min(920px, calc(100% - 36px));
  display: grid;
  grid-template-columns: minmax(280px, 1.45fr) minmax(140px, 0.72fr) minmax(160px, 0.78fr) 116px;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 19, 28, 0.16);
  transform: translateX(50%);
}

.search-box label {
  position: relative;
  display: block;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.search-box span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-box input,
.search-box select {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 0 17px;
  font-size: 13px;
  outline: none;
}

.search-box input:focus,
.search-box select:focus {
  box-shadow: inset 0 0 0 2px rgba(133, 78, 185, 0.24);
}

.search-box button {
  align-self: stretch;
  height: 56px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.search-box button:hover {
  background: var(--accent-dark);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
  transform: none;
}

body.is-result-page .search-box,
body.is-result-page .home-directory-section {
  display: none;
}

body.is-result-page .search-hero {
  display: none;
}

body.is-result-page main {
  padding-top: 48px;
}

body.is-result-page .result-section {
  margin-top: 0;
}

.result-section {
  margin-top: 50px;
  padding: 0;
}

.directory-section {
  margin-top: 64px;
}

.directory-section .section-kicker {
  display: none;
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  letter-spacing: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
}

.area-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 30px;
  margin-bottom: 42px;
}

.area-card {
  display: grid;
  gap: 7px;
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 19, 28, 0.09);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.area-card:hover {
  border-color: var(--accent);
  background: #fdfaff;
  box-shadow: 0 8px 20px rgba(23, 19, 28, 0.12);
  transform: translateY(-1px);
}

.area-card strong {
  font-size: 15px;
  letter-spacing: 0;
}

.area-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.area-card {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 84px;
  padding: 0;
  overflow: hidden;
  border-color: #dadada;
  box-shadow: 0 5px 14px rgba(23, 19, 28, 0.15);
}

.area-card img {
  display: block;
  width: 88px;
  height: 84px;
  object-fit: cover;
}

.area-card-text {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.area-card strong {
  font-size: 16px;
  font-weight: 900;
}

.area-card b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.region-directory {
  display: grid;
  gap: 0;
}

.directory-select-card,
.finder-trigger {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.directory-select-card:hover,
.finder-trigger:hover {
  border-color: var(--accent);
  background: #fdfaff;
  box-shadow: 0 8px 18px rgba(23, 19, 28, 0.1);
  transform: translateY(-1px);
}

.directory-select-card {
  max-width: 420px;
  min-height: 78px;
  padding: 17px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(23, 19, 28, 0.08);
}

.directory-select-card span,
.finder-trigger span {
  min-width: 0;
}

.directory-select-card em {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.directory-select-card strong,
.finder-trigger strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.directory-select-card b {
  color: var(--line-strong);
  font-size: 22px;
  line-height: 1;
}

.finder-trigger {
  min-height: 58px;
  padding: 13px 14px;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(23, 19, 28, 0.06);
}

.finder-trigger span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.region-block {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid transparent;
}

.region-block h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.region-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.region-block a {
  color: #2275d7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.region-block a:hover {
  text-decoration: underline;
}

.category-grid {
  display: grid;
  gap: 22px;
}

.category-feature-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f4f0f7;
  box-shadow: 0 6px 16px rgba(23, 19, 28, 0.12);
  color: #fff;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.category-card:hover {
  border-color: rgba(133, 78, 185, 0.34);
  box-shadow: 0 12px 24px rgba(23, 19, 28, 0.18);
  transform: translateY(-2px);
}

.category-card-image,
.category-card-shade {
  position: absolute;
  inset: 0;
}

.category-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.category-card:hover .category-card-image {
  transform: scale(1.04);
}

.category-card-shade {
  background:
    linear-gradient(180deg, rgba(23, 19, 28, 0.08), rgba(23, 19, 28, 0.62)),
    rgba(23, 19, 28, 0.12);
}

.category-card-copy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 7px;
  text-align: center;
}

.category-card strong {
  color: #fff;
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-card-copy span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(23, 19, 28, 0.07);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.category-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 7px 16px rgba(23, 19, 28, 0.11);
  transform: translateY(-1px);
}

.result-list {
  display: grid;
}

.result-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.result-finder {
  display: grid;
  gap: 24px;
  padding-top: 4px;
}

.result-finder section {
  display: grid;
  gap: 10px;
}

.result-finder h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.finder-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
}

.finder-link-list a {
  color: #2275d7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.finder-link-list a:hover {
  text-decoration: underline;
}

.hospital-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.hospital-card:first-child {
  border-top: 0;
}

.hospital-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0;
}

.hospital-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #f4f0f7;
}

.hospital-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hospital-card-copy {
  min-width: 0;
  padding-top: 2px;
}

.hospital-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.hospital-distance {
  display: inline-block;
  margin-top: 7px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
}

.hospital-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hospital-tags span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
}

.empty-state,
.loading-state {
  padding: 26px 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.result-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 24px 0 2px;
}

.result-pagination[hidden] {
  display: none;
}

.result-pagination button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.result-pagination button:hover,
.result-pagination button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.directory-modal[hidden] {
  display: none;
}

.directory-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
}

.directory-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 19, 28, 0.28);
  cursor: pointer;
}

.directory-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 44px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(23, 19, 28, 0.24);
}

.directory-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 20px 56px 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfafc;
}

.directory-modal-head p {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.directory-modal-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.directory-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.directory-modal-body {
  max-height: calc(min(760px, 100vh - 56px) - 76px);
  overflow: auto;
  padding: 0 24px 24px;
}

.modal-all-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.modal-row-list {
  display: grid;
}

.modal-directory-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.modal-directory-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.modal-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.modal-link-grid a,
.modal-all-row a {
  color: #2275d7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.modal-link-grid a:hover,
.modal-all-row a:hover {
  text-decoration: underline;
}

.modal-all-row a.is-strong {
  color: var(--accent-dark);
  font-weight: 900;
}

.modal-loading {
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal-subway-directory {
  display: grid;
}

.modal-subway-region {
  border-bottom: 1px solid var(--line);
}

.modal-subway-region summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.modal-subway-region summary::-webkit-details-marker {
  display: none;
}

.modal-subway-region summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 900;
}

.modal-subway-region[open] summary::after {
  content: "-";
}

.modal-subway-region summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.modal-subway-region summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.modal-subway-line-list {
  display: grid;
  padding: 0 0 12px;
}

.modal-subway-line {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.modal-subway-line h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 30px 18px 44px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer strong {
  color: var(--accent-dark);
}

@media (max-width: 960px) {
  .search-box {
    grid-template-columns: 1fr 0.68fr 0.72fr 112px;
  }

  .search-box label:nth-child(2) {
    grid-column: auto;
  }

  .search-box button {
    grid-column: auto;
  }

  .area-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .area-card {
    gap: 16px;
  }

  .result-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .result-finder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .global-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  main {
    width: min(100% - 20px, 1120px);
    padding-top: 128px;
  }

  body.is-result-page main {
    padding-top: 34px;
  }

  .search-hero {
    min-height: 224px;
  }

  .search-hero img {
    height: 224px;
  }

  .search-hero-content {
    padding-bottom: 70px;
  }

  .search-hero h1 {
    font-size: 20px;
  }

  .search-box {
    bottom: -112px;
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    border-radius: 6px;
  }

  .search-box label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .search-box input,
  .search-box select,
  .search-box button {
    height: 42px;
    font-size: 12px;
  }

  .result-section {
    margin-top: 42px;
    padding: 0;
  }

  .directory-section {
    margin-top: 54px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .result-finder {
    grid-template-columns: 1fr;
  }

  .directory-select-card {
    max-width: none;
    min-height: 68px;
    padding: 14px 16px;
  }

  .directory-modal {
    align-items: end;
    padding: 12px;
  }

  .directory-modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 10px 10px 6px 6px;
  }

  .directory-modal-head {
    padding: 16px 52px 14px 18px;
  }

  .directory-modal-body {
    max-height: calc(100vh - 104px);
    padding: 0 18px 18px;
  }

  .modal-directory-row {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 17px 0;
  }

  .modal-link-grid {
    gap: 9px 14px;
  }

  .modal-link-grid a,
  .modal-all-row a {
    font-size: 12px;
  }

  .modal-subway-region summary {
    padding: 15px 0;
  }

  .modal-subway-line {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 0;
  }

  .area-card-grid {
    grid-template-columns: 1fr;
  }

  .category-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-card-copy {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .category-chip-row {
    gap: 8px;
  }

  .category-chip {
    min-height: 32px;
    padding: 0 11px;
    font-size: 11px;
  }

  .area-card-grid {
    gap: 14px;
    margin-bottom: 34px;
  }

  .area-card {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 82px;
  }

  .area-card img {
    width: 82px;
    height: 82px;
  }

  .region-block {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .hospital-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 13px;
    padding: 15px 0;
  }

  .hospital-card h3 {
    font-size: 14px;
  }

  .hospital-card p {
    font-size: 11px;
  }
}
