:root {
  --bg: #000000;
  --bg-soft: rgba(255, 255, 255, 0.025);
  --panel: rgba(0, 0, 0, 0.42);
  --panel-strong: rgba(0, 0, 0, 0.68);
  --panel-line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f2;
  --text-soft: rgba(245, 245, 242, 0.68);
  --text-faint: rgba(245, 245, 242, 0.42);
  --chip: rgba(255, 255, 255, 0.055);
  --chip-strong: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: var(--text);
}

body {
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.035), transparent 28%), #000;
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.experience-shell,
.hero-map {
  min-height: 100vh;
}

.hero-map {
  position: relative;
  overflow: hidden;
}

#pixi-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#pixi-canvas:active {
  cursor: grabbing;
}

.top-strip {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.brand-lockup,
.top-controls,
.detail-panel,
.map-note {
  pointer-events: auto;
}

.brand-lockup {
  display: grid;
  gap: 4px;
  max-width: 360px;
}

.brand-lockup-single {
  display: block;
  max-width: none;
}

.brand-mark,
.placeholder-kicker,
.detail-meta,
.detail-grid h3 {
  margin: 0;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
}

.brand-mark-main {
  color: var(--text);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  letter-spacing: 0.12em;
  font-weight: 700;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  line-height: 0.96;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.top-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(620px, 58vw);
}

.search-shell {
  display: block;
  width: 100%;
}

.search-shell input,
.compact-controls select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.54);
  color: var(--text);
  padding: 0.88rem 1.05rem;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(10px);
}

.search-shell input::placeholder {
  color: rgba(245, 245, 242, 0.42);
}

.search-shell input:focus,
.compact-controls select:focus {
  border-color: rgba(255, 255, 255, 0.12);
}

.compact-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-controls select {
  width: auto;
  min-width: 180px;
  appearance: none;
}

.chip-button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-soft);
  padding: 0.82rem 1rem;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  backdrop-filter: blur(10px);
}

.switch-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 140ms ease;
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 140ms ease, background 140ms ease;
}

.chip-button:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.chip-button[aria-pressed='true'],
.chip-button-strong {
  background: var(--chip-strong);
  color: var(--text);
}

.switch-button[aria-pressed='true'] .switch-track {
  background: rgba(205, 183, 255, 0.32);
}

.switch-button[aria-pressed='true'] .switch-knob {
  transform: translateX(14px);
  background: #f2eaff;
}

.map-note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  padding: 0;
  max-width: 420px;
  text-align: left;
  cursor: pointer;
}

.map-note:hover {
  color: var(--text-soft);
}

.map-note.is-hidden {
  display: none;
}

.detail-panel {
  position: absolute;
  z-index: 4;
  width: min(280px, calc(100% - 36px));
  max-height: none;
  overflow: visible;
  padding: 14px 14px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.74));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  cursor: pointer;
}

.detail-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.is-hidden {
  display: none;
}

.detail-card h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
}

.detail-summary-short {
  font-size: 0.94rem;
  line-height: 1.48;
  color: var(--text);
}

.detail-summary-editorial,
.detail-why {
  color: var(--text-soft);
  line-height: 1.46;
  font-size: 0.88rem;
}

.detail-actions-top {
  margin-bottom: 2px;
}

.launch-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0;
  border: 0;
}

.launch-link:hover {
  color: #ffffff;
}

.seed-drawer {
  display: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.section-heading p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.seed-list {
  display: grid;
  gap: 10px;
}

.seed-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 14px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.seed-card h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.15;
}

.seed-card p {
  margin-bottom: 0;
  color: var(--text-soft);
  line-height: 1.4;
}

.seed-card .eyebrow {
  margin-bottom: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.seed-card:hover,
.seed-card:focus-visible,
.seed-card.is-active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  outline: none;
}

@media (max-width: 960px) {
  .top-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand-lockup {
    max-width: none;
  }

  .top-controls {
    width: 100%;
    align-items: stretch;
  }

  .compact-controls {
    justify-content: flex-start;
  }

  .detail-panel {
    left: 18px !important;
    right: 18px !important;
    top: auto !important;
    bottom: 18px !important;
    width: auto;
  }
}

@media (max-width: 640px) {
  body[data-map-mode='list'] {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 32%),
      #000;
  }

  body[data-map-mode='list'] .experience-shell {
    min-height: 100vh;
    padding: 12px 12px 112px;
  }

  body[data-map-mode='list'] .hero-map {
    min-height: auto;
    overflow: visible;
  }

  body[data-map-mode='list'] #pixi-canvas,
  body[data-map-mode='list'] .map-note,
  body[data-map-mode='list'] #relationships-toggle {
    display: none;
  }

  body[data-map-mode='list'] .top-strip {
    position: static;
    gap: 10px;
    margin-bottom: 14px;
  }

  body[data-map-mode='list'] .top-controls {
    gap: 8px;
  }

  body[data-map-mode='list'] .seed-drawer {
    display: block;
  }

  body[data-map-mode='list'] .detail-panel {
    position: fixed;
  }

  .top-strip {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 10px;
  }

  .brand-lockup h1 {
    font-size: 1.25rem;
  }

  .brand-mark {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

  .search-shell input,
  .compact-controls select,
  .chip-button {
    padding: 0.8rem 0.95rem;
  }

  .compact-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .compact-controls select {
    min-width: 0;
    width: 100%;
    grid-column: 1 / -1;
    flex: none;
  }

  .switch-button,
  .chip-button-strong {
    width: 100%;
    justify-content: center;
  }

  .detail-panel {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: 12px !important;
    width: auto;
    padding: 14px 14px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.88));
  }

  .detail-card {
    gap: 10px;
  }

  .detail-card h2 {
    font-size: 1.02rem;
    padding-right: 24px;
  }

  .detail-summary-short {
    font-size: 0.9rem;
  }

  .detail-summary-editorial,
  .detail-why {
    font-size: 0.82rem;
    line-height: 1.38;
  }

  .detail-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
  }

  .map-note {
    left: 12px;
    right: 12px;
    bottom: calc(34vh + 24px);
    max-width: none;
    font-size: 0.76rem;
    line-height: 1.35;
  }
}
