:root {
  color-scheme: dark;
  --bg: #070908;
  --surface: #101513;
  --surface-2: #171f1b;
  --line: rgba(222, 232, 213, 0.14);
  --text: #edf2e8;
  --muted: #9da99a;
  --green: #8dff8a;
  --red: #ff6f61;
  --amber: #ffc857;
  --steel: #8db7ce;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(141, 255, 138, 0.08), transparent 30rem),
    linear-gradient(135deg, #070908 0%, #10130f 48%, #050706 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 8, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(141, 255, 138, 0.45);
  background: linear-gradient(145deg, rgba(141, 255, 138, 0.18), rgba(255, 111, 97, 0.12));
  color: var(--green);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  gap: 0.4rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.nav-links a {
  padding: 0.55rem 0.8rem;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.login-button,
.primary-action,
.secondary-action,
.save-button,
.tab,
.close-button,
.icon-button {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}

.login-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  background: var(--surface-2);
}

.login-icon {
  color: var(--green);
  font-size: 1.2rem;
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  padding: 0.72rem;
  background: var(--surface-2);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 92vh);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 8, 0.92), rgba(7, 9, 8, 0.64) 44%, rgba(7, 9, 8, 0.18)),
    linear-gradient(0deg, rgba(7, 9, 8, 0.92), transparent 38%);
}

.hero-content {
  position: relative;
  align-self: center;
  width: min(720px, calc(100% - 2rem));
  margin-left: clamp(1rem, 6vw, 5rem);
  padding: 6rem 0 8rem;
}

.kicker {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 14ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-content > p:not(.kicker) {
  max-width: 46rem;
  color: #c9d4c5;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  font-weight: 800;
}

.primary-action {
  border-color: rgba(141, 255, 138, 0.55);
  background: var(--green);
  color: #061006;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.08);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.status-strip article {
  padding: 1.2rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(13, 18, 15, 0.96);
}

.status-strip span {
  display: block;
  color: var(--amber);
  font-size: 1.4rem;
  font-weight: 900;
}

.status-strip p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.workspace,
.navigator {
  width: min(1420px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
}

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

.section-heading h2,
.guide-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.map-card,
.saved-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.map-card {
  display: grid;
  grid-template-rows: 9.5rem minmax(0, 1fr) 6.5rem;
  width: 100%;
  height: 22.1rem;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  isolation: isolate;
}

.map-card-media {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.map-card-image,
.map-card-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-card-image {
  object-fit: cover;
  transform: scale(1.02);
  transform-origin: center;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.map-card-shade {
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0.08), rgba(7, 9, 8, 0.7)),
    linear-gradient(120deg, rgba(7, 9, 8, 0.34), rgba(7, 9, 8, 0.02));
}

.map-card:hover .map-card-media .map-card-image,
.map-card:focus-visible .map-card-media .map-card-image {
  transform: scale(1.07);
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9.5rem;
  background:
    linear-gradient(150deg, rgba(141, 255, 138, 0.14), transparent 36%),
    radial-gradient(circle at var(--x, 70%) var(--y, 28%), var(--accent), transparent 35%);
  opacity: 0.52;
  z-index: 2;
}

.map-card > * {
  position: relative;
  z-index: 3;
}

.map-card > .map-card-media {
  z-index: 1;
}

.map-card > .pill,
.map-card > div:not(.map-tag-row) {
  margin-right: 1rem;
  margin-left: 1rem;
}

.map-card > .pill {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  justify-self: start;
  margin-top: 1rem;
}

.map-card > div:not(.map-tag-row) {
  grid-row: 2;
  grid-column: 1;
  min-height: 0;
  padding-top: 0.85rem;
  overflow: hidden;
}

.map-card > .map-tag-row {
  grid-row: 3;
  grid-column: 1;
  align-self: start;
  margin: 0.6rem 1rem 1rem;
}

.map-card.is-active {
  border-color: rgba(141, 255, 138, 0.7);
  box-shadow: inset 0 0 0 1px rgba(141, 255, 138, 0.24);
}

.map-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
}

.map-card p,
.saved-card p {
  color: var(--muted);
  line-height: 1.55;
}

.map-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.map-tag-row,
.guide-meta,
.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.map-tag-row {
  flex-wrap: wrap;
  align-content: start;
  max-height: 5.2rem;
  overflow: hidden;
}

.map-tag-row .pill {
  flex: 0 1 auto;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.72rem;
  padding: 0 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #d9e1d5;
  font-size: 0.74rem;
  font-weight: 750;
}

.navigator {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 1rem;
  padding-top: 0;
}

.navigator-panel {
  border: 1px solid var(--line);
  background: rgba(16, 21, 19, 0.76);
  box-shadow: var(--shadow);
}

.map-panel {
  height: min(720px, calc(100vh - 6.5rem));
  min-height: 620px;
  overflow: hidden;
}

.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background:
    linear-gradient(rgba(141, 255, 138, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 255, 138, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(141, 255, 138, 0.16), transparent 28rem),
    #0b100e;
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.active-map-image,
.active-map-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.active-map-image {
  object-fit: cover;
}

.active-map-shade {
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0.16), rgba(7, 9, 8, 0.82)),
    linear-gradient(90deg, rgba(7, 9, 8, 0.6), rgba(7, 9, 8, 0.2));
}

.map-label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  max-width: min(28rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(7, 9, 8, 0.82);
  z-index: 5;
}

.map-label h3 {
  margin-bottom: 0.35rem;
}

.map-label p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.verification-note {
  display: block;
  margin-top: 0.8rem;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.guide-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  height: min(720px, calc(100vh - 6.5rem));
  min-height: 620px;
  overflow: hidden;
  padding: 1rem;
}

.guide-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.save-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  align-self: start;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.06);
}

.save-button.is-saved {
  border-color: rgba(255, 200, 87, 0.7);
  color: var(--amber);
}

.guide-meta {
  margin: 1rem 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 1rem 0;
}

.tab {
  background: rgba(255, 255, 255, 0.05);
}

.tab[hidden] {
  display: none;
}

.tab.is-active {
  border-color: rgba(141, 255, 138, 0.62);
  background: rgba(141, 255, 138, 0.12);
  color: var(--green);
}

.guide-list {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-color: rgba(141, 255, 138, 0.45) rgba(255, 255, 255, 0.06);
}

.guide-link {
  display: inline-flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.8rem;
  border: 1px solid rgba(141, 255, 138, 0.42);
  background: rgba(141, 255, 138, 0.1);
  color: var(--green);
  font-weight: 850;
}

.guide-link[hidden] {
  display: none;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.step-index {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: rgba(141, 255, 138, 0.13);
  color: var(--green);
  font-weight: 900;
}

.step h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.saved-card {
  padding: 1rem;
}

.saved-card h3 {
  margin-bottom: 0.4rem;
}

.saved-card.empty {
  grid-column: 1 / -1;
  min-height: auto;
}

.saved-actions button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.login-modal {
  width: min(440px, calc(100% - 2rem));
  border: 1px solid var(--line);
  padding: 0;
  background: transparent;
  color: var(--text);
}

.login-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.login-card {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
  background: var(--surface);
}

.login-card h2 {
  margin-bottom: 0.3rem;
}

.login-card label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 0.85rem;
}

.login-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.full {
  width: 100%;
}

.close-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.4rem;
  min-height: 2.4rem;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.3rem;
}

@media (max-width: 1080px) {
  .map-grid,
  .saved-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .map-panel,
  .map-stage,
  .guide-panel {
    height: auto;
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    border-right: 0;
    border-left: 0;
    background: rgba(7, 9, 8, 0.98);
  }

  .nav-links.is-open {
    display: grid;
  }

  .login-button {
    width: 2.75rem;
    justify-content: center;
    padding: 0;
  }

  .login-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .hero {
    min-height: 86vh;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(7, 9, 8, 0.94), rgba(7, 9, 8, 0.42)),
      linear-gradient(90deg, rgba(7, 9, 8, 0.76), transparent);
  }

  .hero-content {
    align-self: end;
    margin: 0 auto;
    padding: 7rem 0 5rem;
  }

  h1 {
    max-width: 11ch;
  }

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

  .map-grid,
  .saved-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .guide-head {
    display: grid;
  }

  .map-panel,
  .map-stage {
    min-height: 480px;
  }

  .guide-panel {
    min-height: 600px;
    max-height: 680px;
  }

}

@media (max-width: 440px) {
  .brand small {
    display: none;
  }

  .hero-actions {
    display: grid;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }

  .tab {
    min-height: 2.5rem;
    font-size: 0.88rem;
  }
}

.guide-page {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
  gap: 1rem;
  align-items: end;
  padding-bottom: 1rem;
}

.guide-hero h1 {
  max-width: 13ch;
}

.source-panel {
  border: 1px solid var(--line);
  background: rgba(16, 21, 19, 0.72);
  padding: 1rem;
}

.source-panel p,
.guide-card p {
  color: var(--muted);
  line-height: 1.55;
}

.guide-nav {
  position: sticky;
  top: 4.55rem;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.8rem 0;
  background: rgba(7, 9, 8, 0.9);
  border-bottom: 1px solid var(--line);
}

.guide-nav a {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 750;
}

.guide-nav a:hover,
.guide-nav a:focus-visible {
  color: var(--green);
  border-color: rgba(141, 255, 138, 0.5);
}

.egg-guides {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.guide-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(16, 21, 19, 0.82);
}

.guide-card figure {
  position: relative;
  display: flex;
  align-items: stretch;
  height: clamp(18rem, 30vw, 25rem);
  min-height: 18rem;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(141, 255, 138, 0.08), rgba(255, 255, 255, 0.03)),
    #080b0a;
}

.guide-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.6rem;
}

.guide-card img.cover-art {
  object-fit: cover;
  padding: 0;
}

.guide-card img.framed-art {
  object-position: center;
}

.guide-body {
  padding: 1rem;
}

.guide-card h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.egg-steps {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.egg-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.egg-step strong {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: rgba(141, 255, 138, 0.13);
  color: var(--green);
}

.egg-step ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  color: #cbd6c6;
  line-height: 1.55;
}

.egg-step li + li {
  margin-top: 0.35rem;
}

.video-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(141, 255, 138, 0.28);
  background:
    linear-gradient(135deg, rgba(141, 255, 138, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(7, 9, 8, 0.76);
}

.video-slot h3 {
  margin-bottom: 0.35rem;
}

.video-slot p:last-child {
  margin-bottom: 0;
}

.video-slot a {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  border: 1px solid rgba(141, 255, 138, 0.5);
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.source-links a {
  min-height: 2.3rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--steel);
  font-weight: 750;
}

@media (max-width: 860px) {
  .guide-hero,
  .guide-card {
    grid-template-columns: 1fr;
  }

  .guide-card figure {
    height: clamp(15rem, 58vw, 24rem);
  }

  .video-slot {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    top: 4rem;
  }
}

.tac-page {
  width: min(1500px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) 0;
}

.tac-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tac-toolbar h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
}

.map-select-label {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 18rem);
  color: var(--muted);
  font-weight: 800;
}

.map-select-label select {
  min-height: 3rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 0.8rem;
}

.tac-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.layer-panel,
.tac-map-card {
  border: 1px solid var(--line);
  background: rgba(16, 21, 19, 0.82);
  box-shadow: var(--shadow);
}

.layer-panel {
  padding: 1rem;
}

.layer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.layer-panel-head .kicker {
  margin-bottom: 0;
}

.layer-panel button,
.zoom-controls button {
  min-height: 2.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.layer-list {
  display: grid;
  gap: 0.5rem;
}

.layer-toggle {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.65rem;
  align-items: center;
  min-height: 2.85rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #dfe7dc;
  font-weight: 800;
}

.layer-toggle input {
  accent-color: var(--green);
}

.layer-toggle span {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  background: var(--layer-color);
  border: 1px solid rgba(0, 0, 0, 0.5);
}

.layer-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
}

.tac-map-card {
  display: grid;
  grid-template-rows: auto minmax(32rem, calc(100vh - 17rem)) auto;
  min-height: 42rem;
  overflow: hidden;
}

.tac-map-topbar,
.marker-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 8, 0.68);
}

.tac-map-topbar h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.zoom-controls {
  display: inline-grid;
  grid-template-columns: 2.5rem 4.4rem 2.5rem;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.zoom-controls button {
  border: 0;
  font-size: 1.3rem;
}

.zoom-controls span {
  text-align: center;
  color: var(--green);
  font-weight: 900;
}

.map-viewport {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background:
    linear-gradient(rgba(141, 255, 138, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 255, 138, 0.07) 1px, transparent 1px),
    #070908;
  background-size: 40px 40px;
}

.map-viewport:active {
  cursor: grabbing;
}

.map-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
  translate: -50% -50%;
  transition: transform 140ms ease;
}

.map-base,
.map-markers,
.single-map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.single-map-image {
  object-fit: contain;
  background: #050706;
}

.map-tile {
  position: absolute;
  user-select: none;
  pointer-events: none;
}

.map-markers {
  z-index: 2;
}

.tac-marker {
  position: absolute;
  display: grid;
  width: 2.35rem;
  height: 3rem;
  place-items: center;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.65));
}

.tac-marker::before {
  content: "";
  position: absolute;
  top: 0.08rem;
  left: 50%;
  width: 2.05rem;
  height: 2.05rem;
  background: var(--marker-color);
  border: 2px solid #050706;
  border-radius: 50% 50% 50% 0;
  transform: translateX(-50%) rotate(-45deg);
}

.tac-marker svg {
  position: relative;
  z-index: 1;
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 0.6rem;
}

.tac-marker img {
  position: relative;
  z-index: 1;
  width: 1.42rem;
  height: 1.42rem;
  margin-bottom: 0.6rem;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.tac-marker:hover,
.tac-marker:focus-visible {
  z-index: 5;
  scale: 1.15;
}

.map-empty {
  position: absolute;
  inset: 1rem;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(141, 255, 138, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 255, 138, 0.07) 1px, transparent 1px),
    rgba(7, 9, 8, 0.9);
  background-size: 32px 32px;
}

.map-empty[hidden] {
  display: none;
}

.map-empty p {
  color: var(--muted);
}

.marker-details {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.marker-details strong,
.marker-details span {
  display: block;
}

.marker-details span {
  color: var(--muted);
}

@media (max-width: 980px) {
  .tac-toolbar,
  .tac-shell {
    grid-template-columns: 1fr;
  }

  .tac-toolbar,
  .tac-shell {
    display: grid;
  }

  .layer-panel {
    order: 2;
  }

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

  .tac-map-card {
    grid-template-rows: auto minmax(28rem, 62vh) auto;
  }
}

@media (max-width: 560px) {
  .tac-page {
    width: min(100% - 0.75rem, 1500px);
    padding-top: 0.75rem;
  }

  .tac-map-topbar,
  .marker-details {
    display: grid;
  }

  .zoom-controls {
    width: 100%;
    grid-template-columns: 3rem 1fr 3rem;
  }

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

  .tac-map-card {
    min-height: 38rem;
    grid-template-rows: auto minmax(24rem, 58vh) auto;
  }
}
