:root {
  --blue: #2b63ff;
  --violet: #6126d9;
  --ink: #eef4ff;
  --muted: #aeb9d0;
  --line: rgba(178, 199, 255, 0.22);
  --panel: rgba(255, 255, 255, 0.095);
  --panel-strong: rgba(255, 255, 255, 0.145);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Pretendard, Inter, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(36, 91, 255, 0.42), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(93, 34, 210, 0.42), transparent 34%),
    radial-gradient(circle at 52% 94%, rgba(0, 177, 190, 0.18), transparent 32%),
    #060916;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.78) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(130,178,255,0.48) 0 1px, transparent 1.5px);
  background-position: 0 0, 48px 60px;
  background-size: 120px 120px, 180px 180px;
  opacity: 0.3;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(16px);
}

.topbar-slogan {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: inherit;
  font-weight: 700;
  font-size: 19px;
  color: rgba(200, 215, 255, 0.75);
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  margin: 0;
}


.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.mark {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 30px;
  height: 30px;
}

.mark span {
  width: 7px;
  border-radius: 2px;
}

.mark span:nth-child(1) { height: 18px; background: #81b843; }
.mark span:nth-child(2) { height: 25px; background: #d84845; }
.mark span:nth-child(3) { height: 21px; background: #50606d; }

.brand strong,
.brand span {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 14px;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.tab {
  min-width: 82px;
  border: 0;
  border-radius: 6px;
  padding: 9px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tab.is-active {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

main {
  position: relative;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 12px 0 14px;
}

.space-field {
  position: absolute;
  inset: 24px 0 auto;
  height: 420px;
  pointer-events: none;
  overflow: hidden;
}

.space-field span {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 22px rgba(255,255,255,0.85);
  opacity: 0.7;
}

.space-field span:nth-child(1) { left: 9%; top: 34%; width: 5px; height: 5px; }
.space-field span:nth-child(2) { left: 31%; top: 11%; width: 8px; height: 8px; }
.space-field span:nth-child(3) { right: 22%; top: 28%; width: 4px; height: 4px; }
.space-field span:nth-child(4) { right: 8%; top: 67%; width: 7px; height: 7px; }
.space-field span:nth-child(5) { left: 56%; top: 76%; width: 5px; height: 5px; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 790px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.stats {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stats div {
  flex: 0 0 128px;
  padding: 9px 12px;
  border-left: 1px solid var(--line);
}

.stats div:first-child {
  border-left: 0;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.controls {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 8px;
}

.search-box {
  display: grid;
  gap: 4px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.search-box input {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  padding: 0 15px;
  background: rgba(255,255,255,0.92);
  color: #141824;
  outline: none;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 99, 255, 0.18);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.1);
  color: #dfe7ff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.filter-button.is-active {
  border-color: transparent;
  background: var(--blue);
  color: white;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.map-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 24, 50, 0.84), rgba(8, 12, 27, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.map-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 9px 16px;
  color: white;
  background:
    linear-gradient(100deg, rgba(43, 99, 255, 0.92), rgba(97, 38, 217, 0.9)),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.25), transparent 22%);
}

.map-title strong {
  font-size: 20px;
  letter-spacing: 0;
}

.map-title span {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.9;
}

.map-content {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.stage-rail {
  position: relative;
  padding: 10px 0;
}

.stage-rail::before {
  content: "";
  position: absolute;
  top: calc(var(--rail-row-height, 91px) / 2 + 10px);
  bottom: calc(var(--rail-row-height, 91px) / 2 + 10px);
  left: 99px;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
}

.rail-stage {
  position: relative;
  display: grid;
  grid-template-columns: 90px;
  gap: 0;
  align-items: center;
  min-height: var(--rail-row-height, 91px);
}

.rail-stage::after {
  content: "";
  position: absolute;
  left: 90px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border: 4px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(92, 139, 255, 0.55), 0 0 24px rgba(92, 139, 255, 0.7);
}

.rail-stage strong {
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}

.rail-stage.is-active strong {
  color: #fff;
}

.rail-stage.is-active::after {
  background: #fff;
  box-shadow:
    0 0 0 3px var(--blue),
    0 0 0 5px rgba(92, 139, 255, 0.5),
    0 0 20px 4px rgba(92, 139, 255, 0.9);
  animation: rail-pulse 1.6s ease-in-out infinite;
}

@keyframes rail-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--blue), 0 0 0 5px rgba(92,139,255,0.5), 0 0 20px 4px rgba(92,139,255,0.9); }
  50%       { box-shadow: 0 0 0 3px var(--blue), 0 0 0 8px rgba(92,139,255,0.3), 0 0 32px 8px rgba(92,139,255,0.6); }
}

.rail-stage span {
  display: none;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.35;
}

.stage-list {
  display: grid;
  gap: 8px;
}

.stage-card {
  display: grid;
  grid-template-columns: var(--category-template, repeat(var(--category-count, 3), minmax(0, 1fr)));
  gap: 0;
  min-height: 82px;
  transition: opacity 0.3s, filter 0.3s;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 134, 255, 0.13), transparent 52%),
    rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

.stage-card.is-dimmed {
  opacity: 0.25;
  filter: blur(1px);
}

.stage-card.is-active {
  border-color: rgba(92, 139, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(92,139,255,0.3), 0 0 24px rgba(92,139,255,0.15);
}

.stage-development { min-height: 104px; }
.stage-transaction { min-height: 88px; }
.stage-operation { min-height: 104px; }
.stage-asset { min-height: 58px; }
.stage-infra { min-height: 88px; }

.category-column {
  position: relative;
  min-width: 0;
  padding: 9px;
  border-left: 1px solid var(--line);
}

.category-column:first-child {
  border-left: 0;
}

.category-column h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #c8d6ff;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0;
}

.category-column h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.company-list {
  position: relative;
  height: calc(100% - 18px);
  min-height: calc(52px + min(var(--density, 1), 10) * 2px);
  margin-top: 4px;
}

.company-list.floating-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 8px 4px;
  height: auto;
}

.company-list.floating-list .company-chip {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  animation: float-y var(--float-duration, 6s) ease-in-out var(--float-delay, 0s) infinite alternate;
}

.company-list.floating-list .company-chip:hover,
.company-list.floating-list .company-chip:focus-visible {
  transform: scale(1.08);
}

@keyframes float-y {
  from { transform: translateY(-4px); }
  to   { transform: translateY(4px); }
}

.company-chip {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  display: inline-grid;
  place-items: center;
  width: clamp(68px, 5.4vw, 92px);
  height: clamp(30px, 2.4vw, 40px);
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #242a35;
  text-align: center;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 22px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(86, 134, 255, 0.12);
  transform-origin: center;
  transform: translate(-50%, -50%);
  transition: box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease;
  animation: drift var(--float-duration, 7s) ease-in-out var(--float-delay, 0s) infinite alternate;
}

.company-chip:hover,
.company-chip:focus-visible {
  z-index: 5;
  border-color: var(--blue);
  outline: none;
  filter: saturate(1.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36), 0 0 32px rgba(83, 132, 255, 0.45);
}

.orbit-motion {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 160ms ease;
}

.company-chip:hover .orbit-motion,
.company-chip:focus-visible .orbit-motion {
  transform: scale(1.28);
}

.company-chip.is-featured {
  border-color: rgba(255, 224, 124, 0.9);
  background: #ffffff;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(255, 215, 92, 0.55),
    0 0 34px rgba(80, 157, 255, 0.35);
}

.company-chip.is-featured::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.95) 45%, transparent 70%);
  transform: translateX(-130%);
  animation: shine 2.8s ease-in-out infinite;
}

.company-chip.is-featured::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd95c;
  box-shadow:
    0 0 0 3px rgba(255, 217, 92, 0.2),
    0 0 12px rgba(255, 217, 92, 0.95);
  animation: twinkle 1.6s ease-in-out infinite alternate;
}

.directory-card.is-featured {
  border-color: rgba(255, 224, 124, 0.45);
  box-shadow:
    0 12px 32px rgba(24, 33, 55, 0.12),
    0 0 28px rgba(255, 215, 92, 0.22);
}

.directory-card.is-featured .directory-logo {
  border-color: rgba(255, 224, 124, 0.9);
  box-shadow: 0 0 24px rgba(255, 215, 92, 0.35);
}

@keyframes shine {
  0%, 45% {
    transform: translateX(-130%);
    opacity: 0;
  }
  55% {
    opacity: 0.85;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes twinkle {
  from {
    transform: scale(0.85) rotate(-8deg);
    opacity: 0.55;
  }
  to {
    transform: scale(1.2) rotate(8deg);
    opacity: 1;
  }
}

@keyframes drift {
  0% {
    transform: perspective(600px) translate(calc(-50% - var(--float-x, 0px)), calc(-50% - var(--float-y, 0px))) translateZ(calc(-1 * var(--float-z, 0px)));
    z-index: 0;
  }
  50% {
    z-index: 3;
  }
  100% {
    transform: perspective(600px) translate(calc(-50% + var(--float-x, 0px)), calc(-50% + var(--float-y, 0px))) translateZ(var(--float-z, 0px));
    z-index: 0;
  }
}

.logo-text {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.logo-text img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.directory-logo img {
  position: absolute;
  inset: 8px 14px;
  width: calc(100% - 28px);
  height: calc(100% - 16px);
  object-fit: contain;
  object-position: center center;
}

.directory-logo span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
}

.company-chip small {
  display: none;
}

/* ── Business View ───────────────────────────────────────────── */
.biz-columns {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 0;
  padding: 0 0 40px;
  align-items: stretch;
}

.biz-col {
  display: flex;
  flex-direction: column;
  padding: 20px 16px 20px;
  border-radius: 0;
  transition: background 0.3s;
}

.biz-col:first-child {
  background: linear-gradient(160deg, rgba(43,99,255,0.13) 0%, rgba(43,99,255,0.06) 100%);
  border-right: 2px solid rgba(43, 99, 255, 0.25);
  border-radius: 20px 0 0 20px;
}

.biz-col-center {
  background: linear-gradient(180deg, rgba(90,60,255,0.14) 0%, rgba(120,80,255,0.09) 100%);
  border-left: 2px solid rgba(90, 60, 255, 0.22);
  border-right: 2px solid rgba(90, 60, 255, 0.22);
}

.biz-col:last-child {
  background: linear-gradient(200deg, rgba(97,38,217,0.06) 0%, rgba(97,38,217,0.14) 100%);
  border-left: 2px solid rgba(97, 38, 217, 0.25);
  border-radius: 0 20px 20px 0;
}

.biz-col-header {
  text-align: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.biz-col-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.biz-col:first-child .biz-col-label { color: rgba(120, 160, 255, 0.95); }
.biz-col-center .biz-col-label      { color: rgba(178, 155, 255, 0.95); }
.biz-col:last-child .biz-col-label  { color: rgba(170, 120, 255, 0.95); }

.biz-col-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.biz-chip-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 10px;
  padding: 8px 4px;
  position: relative;
}

.biz-chip-area .company-chip {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: clamp(76px, 6vw, 104px);
  height: clamp(34px, 2.6vw, 46px);
  padding: 6px 10px;
  animation: float-y var(--float-duration, 6s) ease-in-out var(--float-delay, 0s) infinite alternate;
}

.biz-chip-area .company-chip:hover,
.biz-chip-area .company-chip:focus-visible {
  transform: scale(1.08);
}

.biz-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Search highlight ────────────────────────────────────────── */
mark.search-mark {
  background: rgba(255, 220, 60, 0.45);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* ── Category count badge ────────────────────────────────────── */
.category-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(43, 99, 255, 0.28);
  color: #c8d6ff;
  font-size: 10px;
  font-weight: 900;
  margin-left: 4px;
}

/* ── Initials fallback ───────────────────────────────────────── */
.logo-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 900;
  color: #242a35;
  background: linear-gradient(135deg, #e8eeff, #d0d8f8);
  letter-spacing: 0.04em;
}

.dir-initials {
  font-size: 16px;
  border-radius: 999px;
}

.modal-initials {
  font-size: 18px;
  border-radius: 999px;
}

/* ── Filter clear button ─────────────────────────────────────── */
.filter-clear {
  border-color: rgba(255, 100, 100, 0.35) !important;
  color: rgba(255, 160, 160, 0.9) !important;
}

.filter-clear:hover {
  background: rgba(255, 80, 80, 0.18) !important;
}

/* ── Biz col count ───────────────────────────────────────────── */
.biz-col-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

/* ── Sort controls ───────────────────────────────────────────── */
.sort-controls {
  display: flex;
  gap: 6px;
}

.sort-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.sort-button.is-active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

/* ── Directory ───────────────────────────────────────────────── */
.directory-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.side-panel,
.result-bar,
.directory-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(24, 33, 55, 0.12);
  backdrop-filter: blur(14px);
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.category-filter-list {
  display: grid;
  gap: 7px;
}

.category-filter {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.08);
  color: #dfe7ff;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.category-filter.is-active {
  border-color: transparent;
  background: rgba(255,255,255,0.2);
  color: white;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 15px 17px;
}

.result-bar span {
  color: var(--muted);
  font-size: 13px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.directory-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.directory-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.directory-logo {
  position: relative;
  flex-shrink: 0;
  width: 168px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: #ffffff;
}

.directory-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.directory-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.category-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-list {
  display: grid;
  gap: 8px;
}

.service-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(178,199,255,0.14);
}

.service-name {
  font-size: 13px;
  font-weight: 900;
  color: #c8d6ff;
}

.service-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.service-tech {
  font-size: 11px;
  font-weight: 900;
  color: var(--blue);
  margin-top: 2px;
}

.stage-badge {
  flex: 0 0 auto;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(36, 91, 255, 0.2);
  color: #d9e4ff;
  font-size: 11px;
  font-weight: 950;
}

.link-button {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  border-radius: 6px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
}

.company-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-modal.hidden {
  display: none;
}

.company-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.company-modal-box {
  position: relative;
  width: min(480px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  background: #0b1326;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
}

.company-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-modal-close:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.modal-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 4px;
}

.modal-logo {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  height: 56px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: #ffffff;
}

.modal-logo img {
  position: absolute;
  inset: 6px 12px;
  width: calc(100% - 24px);
  height: calc(100% - 12px);
  object-fit: contain;
  object-position: center center;
}

.modal-meta {
  display: grid;
  gap: 5px;
}

.modal-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.modal-category {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-link {
  display: inline-flex;
  margin-top: 20px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.08);
}

@media (max-width: 1120px) {
  main {
    width: min(100% - 28px, 1180px);
  }

  .hero,
  .controls,
  .directory-layout {
    grid-template-columns: 1fr;
  }

  .stats div {
    flex: 1 1 100px;
  }

  .map-content {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .stage-rail::before {
    left: 99px;
  }

  .rail-stage {
    grid-template-columns: 90px;
    gap: 0;
  }

  .rail-stage::after {
    left: 90px;
  }

  .rail-stage span {
    display: none;
  }

  .side-panel {
    position: static;
  }

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

@media (max-height: 850px) and (min-width: 900px) {
  .topbar {
    min-height: 40px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .brand span {
    display: none;
  }

  main {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 330px;
    margin-bottom: 6px;
  }

  .eyebrow {
    display: none;
  }

  h1 {
    font-size: 38px;
  }

  .lead {
    display: none;
  }

  .stats {
    flex-wrap: wrap;
  }

  .stats div {
    padding: 7px 10px;
  }

  .stats strong {
    font-size: 20px;
  }

  .controls {
    grid-template-columns: 310px minmax(0, 1fr);
    margin-bottom: 6px;
  }

  .search-box span {
    display: none;
  }

  .search-box input {
    height: 32px;
  }

  .filter-button {
    padding: 7px 10px;
    font-size: 12px;
  }

  .map-title {
    padding: 7px 14px;
  }

  .map-title strong {
    font-size: 18px;
  }

  .map-content {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .stage-list {
    gap: 6px;
  }

  .rail-stage {
    grid-template-columns: 90px;
    gap: 0;
    min-height: 82px;
  }

  .rail-stage strong {
    font-size: 15px;
  }

  .rail-stage span {
    display: none;
  }

  .stage-development { min-height: 94px; }
  .stage-transaction { min-height: 80px; }
  .stage-operation { min-height: 94px; }
  .stage-asset { min-height: 50px; }
  .stage-infra { min-height: 80px; }

  .category-column {
    padding: 7px;
  }

  .category-column h2 {
    font-size: 12px;
  }

  .company-list {
    min-height: calc(48px + min(var(--density, 1), 10) * 2px);
  }

  .company-chip {
    width: clamp(62px, 5.2vw, 82px);
    height: clamp(27px, 2.2vw, 34px);
    padding: 4px 8px;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    display: grid;
    padding: 14px 16px;
  }

  .view-tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
  }

  main {
    width: min(100% - 24px, 640px);
  }

  h1 {
    font-size: 42px;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    flex-wrap: wrap;
  }

  .stats div {
    flex: 1 1 120px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stats div:first-child {
    border-top: 0;
  }

  .map-title {
    display: grid;
  }

  .map-content {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .stage-rail {
    display: none;
  }

  .stage-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .category-column {
    min-height: 120px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .category-column:first-child {
    border-top: 0;
  }

  .company-chip {
    width: 120px;
    height: 48px;
  }

  .biz-columns {
    grid-template-columns: 1fr;
  }

  .biz-col:first-child {
    border-radius: 20px 20px 0 0;
    border-right: none;
    border-bottom: 2px solid rgba(43, 99, 255, 0.25);
  }

  .biz-col-center {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 2px solid rgba(90, 60, 255, 0.22);
  }

  .biz-col:last-child {
    border-radius: 0 0 20px 20px;
    border-left: none;
    border-top: none;
  }
}
