:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef3f6;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f6;
}

[v-cloak] {
  display: none;
}

.market-enhanced .market-server-detail {
  display: none;
}

.market-server-detail {
  max-width: 920px;
  margin: 18px auto;
  padding: 0 18px;
}

.market-server-detail article {
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
}

.market-server-detail h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.25;
}

.market-server-detail p {
  margin: 0 0 12px;
  color: #40505f;
  line-height: 1.7;
}

.market-server-detail dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px 12px;
}

.market-server-detail dt {
  color: #52616f;
  font-weight: 700;
}

.market-server-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.market-server-detail a {
  color: #126b61;
}

.market-hero {
  min-height: 360px;
  display: grid;
  align-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px) 44px;
  background:
    linear-gradient(90deg, rgba(10, 25, 38, 0.86), rgba(10, 25, 38, 0.42)),
    url("/common/img/background.webp") center/cover;
  color: #ffffff;
}

.market-hero nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.market-hero nav a {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.market-hero nav a:first-child {
  margin-right: auto;
  font-size: 20px;
}

.hero-copy {
  max-width: 780px;
}

.hero-copy p {
  margin: 0 0 10px;
  color: #b7e4dc;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
}

.hero-copy span {
  display: block;
  max-width: 640px;
  margin-top: 16px;
  color: #eef7f5;
  font-size: 17px;
  line-height: 1.8;
}

main {
  max-width: 1180px;
  margin: -24px auto 0;
  padding: 0 18px 48px;
}

.market-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) repeat(6, auto) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(23, 32, 42, 0.12);
}

.market-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #52616f;
  font-size: 12px;
}

.market-filters select,
.market-filters input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(44, 62, 80, 0.18);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #17202a;
  font-size: 14px;
}

.market-filters .check-field {
  min-height: 42px;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(44, 62, 80, 0.18);
  border-radius: 8px;
  padding: 0 10px;
  color: #17202a;
  font-weight: 700;
}

.check-field input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #126b61;
}

.market-filters button,
.detail-actions a,
.detail-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #126b61;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.market-status {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52616f;
  font-size: 13px;
}

.error {
  color: #b42318;
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.market-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-list article button {
  width: 100%;
  min-height: 166px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.market-list article.active button,
.market-list article button:focus-visible {
  outline: 3px solid rgba(18, 107, 97, 0.2);
  border-color: #126b61;
}

.category {
  color: #126b61;
  font-size: 12px;
  font-weight: 900;
}

.market-list strong {
  font-size: 17px;
  line-height: 1.35;
}

.address {
  color: #52616f;
  font-size: 13px;
  line-height: 1.5;
}

.badges {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badges span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf6f4;
  color: #126b61;
  font-size: 11px;
  font-weight: 800;
}

.market-detail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
}

.market-detail h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
}

.market-detail p {
  margin: 0;
  color: #40505f;
  line-height: 1.7;
}

.market-detail dl {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.market-detail dt {
  color: #52616f;
  font-size: 13px;
}

.market-detail dd {
  margin: 0;
}

.detail-actions {
  display: grid;
  gap: 8px;
}

.detail-actions a,
.detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.detail-actions button:disabled {
  background: #d8e0e5;
  color: #52616f;
  cursor: default;
}

.hospital-note {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(18, 107, 97, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: #f2faf8;
}

.hospital-note h3 {
  margin: 0;
  color: #126b61;
  font-size: 14px;
}

.hospital-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.legacy-assets {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fffdf7;
}

.legacy-assets h3 {
  margin: 0;
  color: #5c4a16;
  font-size: 15px;
}

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

.legacy-image-grid a,
.legacy-asset-list a {
  color: #2f5e8f;
  text-decoration: none;
}

.legacy-image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 6px;
  background: #f3f5f7;
}

.legacy-image-grid span {
  display: block;
  margin-top: 4px;
  color: #5f6b74;
  font-size: 12px;
}

.legacy-asset-list {
  display: grid;
  gap: 6px;
}

.legacy-asset-list a {
  display: grid;
  gap: 3px;
  padding: 7px 0;
  border-top: 1px solid rgba(44, 62, 80, 0.08);
  overflow-wrap: anywhere;
}

.legacy-asset-list strong {
  color: #17202a;
  font-size: 12px;
}

.legacy-asset-list span {
  color: #40505f;
  font-size: 13px;
  line-height: 1.5;
}

.market-evidence {
  display: grid;
  gap: 8px;
}

.market-evidence h3 {
  margin: 0;
  font-size: 15px;
}

.market-evidence a {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-top: 1px solid rgba(44, 62, 80, 0.08);
  overflow-wrap: anywhere;
  color: #2f5e8f;
  font-size: 13px;
  text-decoration: none;
}

.market-evidence strong {
  color: #17202a;
  font-size: 12px;
}

.market-evidence span {
  color: #40505f;
}

.market-evidence em {
  color: #6b7884;
  font-size: 11px;
  font-style: normal;
}

@media (max-width: 900px) {
  .market-hero {
    min-height: 320px;
  }

  .market-filters,
  .market-layout {
    grid-template-columns: 1fr;
  }

  .market-filters .check-field {
    justify-content: start;
  }

  .market-list {
    grid-template-columns: 1fr;
  }

  .market-detail {
    position: static;
  }
}
