:root {
  --bg: #daccbe;
  --text: #444444;
  --muted: #7b7b7b;
  --line: #8d8d8d;
  --line-branch: rgba(141, 141, 141, 0.42);
  --accent: #d58a1b;
  --panel: rgba(198, 157, 124, 0.16);
  --footer-bg: rgba(131, 131, 131, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "SF Pro Text", "Segoe UI", sans-serif;
}

.topbar,
.page,
.species-page,
.game-page,
.site-footer {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 480ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-loading .topbar,
body.page-loading .page,
body.page-loading .species-page,
body.page-loading .game-page,
body.page-loading .site-footer {
  opacity: 0;
  transform: translateY(20px);
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .page,
  .species-page,
  .game-page,
  .site-footer {
    transition: none;
    transform: none;
  }

  body.page-loading .topbar,
  body.page-loading .page,
  body.page-loading .species-page,
  body.page-loading .game-page,
  body.page-loading .site-footer {
    opacity: 1;
  }

  .view-spinner {
    animation: none;
  }

  .search-result-button.search-result-button--loading::after {
    animation: none;
  }

  .simulate-btn.simulate-btn--loading::after {
    animation: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.view-state-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.view-state-shell[hidden] {
  display: none !important;
}

.view-spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid rgba(213, 138, 27, 0.24);
  border-top-color: var(--accent);
  animation: view-spinner-spin 680ms linear infinite;
}

@keyframes view-spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

.view-state-shell--failure {
  text-align: center;
}

.view-failure-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.view-failure-message {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
}

.view-back-home-btn {
  min-width: 190px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  padding: 0 18px;
}

.topbar {
  height: 76px;
  background: rgba(198, 157, 124, 0.16);
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(141, 141, 141, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar.topbar--with-search {
  height: 76px;
}

.topbar-inner,
.hero,
.footer-inner {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.topbar-inner {
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav-search-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 22px;
  width: 500px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--line);
}

.nav-search-bar[hidden] {
  display: none !important;
}

.nav-search-bar input {
  flex: 1;
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--muted);
  outline: none;
}

.nav-search-bar input::placeholder {
  color: var(--muted);
}

.nav-search-bar button {
  border: 0;
  background: transparent;
  line-height: 0;
  padding: 0 0 6px;
  cursor: pointer;
}

.nav-search-results {
  left: 0;
  width: 100%;
  z-index: 140;
}

.github-btn {
  height: 40px;
  border-radius: 10px;
  background: var(--text);
  color: #ffffff;
  text-decoration: none;
  padding: 0 18px 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 400;
}

.topbar--game .topbar-inner {
  gap: 18px;
}

.game-nav-controls {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.game-nav-control {
  min-width: 0;
  width: min(100%, 420px);
}

.game-nav-game-field {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--line);
  min-height: 34px;
  cursor: pointer;
}

.game-nav-game-input {
  flex: 1;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.2;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.game-nav-game-input::placeholder {
  color: var(--muted);
}

.game-nav-game-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.game-nav-game-input:not(:placeholder-shown) {
  color: var(--text);
}

.game-nav-game-toggle {
  border: 0;
  background: transparent;
  height: 32px;
  width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.game-nav-game-input:focus,
.game-nav-game-input:focus-visible,
.game-nav-game-toggle:focus,
.game-nav-game-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.game-nav-dropdown-caret {
  width: 0;
  height: 0;
  display: block;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(141, 141, 141, 0.95);
}

.game-nav-game-results {
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  z-index: 180;
}

.game-nav-game-results .search-result-button {
  height: 46px;
  padding: 0 12px;
  -webkit-tap-highlight-color: transparent;
}

.game-nav-game-results .search-result-button:active,
.game-nav-game-results .search-result-button:focus,
.game-nav-game-results .search-result-button:focus-visible {
  background: transparent;
}

.page {
  padding: 95px 0 40px;
}

.hero {
  padding: 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 36px;
  align-items: start;
}

.hero-copy h1 {
  margin: 0;
  max-width: 807px;
  line-height: 1.1;
  font-size: 65px;
  font-weight: 800;
}

.hero-copy h1 span {
  /* display: inline-block; */
  color: var(--muted);
}

.search-bar {
  margin-top: 78px;
  width: min(100%, 729px);
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--line);
  gap: 10px;
}

.search-bar input {
  flex: 1;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 21px;
  font-weight: 300;
  color: var(--muted);
  padding: 0;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--muted);
}

.search-bar input:not(:placeholder-shown) {
  color: var(--text);
}

.search-bar button {
  border: 0;
  background: transparent;
  line-height: 0;
  padding: 0 0 6px;
  cursor: pointer;
}

.search-arrow-icon {
  width: 17px;
  height: auto;
  display: block;
}

.search-stage {
  margin-top: 30px;
  width: min(100%, 729px);
  position: relative;
  min-height: 186px;
}

.search-stage.search-stage--expanded {
  min-height: 186px;
}

.quick-actions {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.search-bar.has-query + .search-stage .quick-actions {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.search-bar.has-query + .search-stage {
  margin-top: 8px;
}

.search-bar.has-query + .search-stage .search-results {
  top: 0;
}

.search-results {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(141, 141, 141, 0.24);
  z-index: 10;
}

.nav-search-bar .nav-search-results {
  top: calc(100% + 10px);
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-result-item {
  margin: 0;
  padding: 0;
}

.search-result-button {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 61px;
  padding: 0 28px 0 31px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.search-result-copy {
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.search-result-common {
  color: inherit;
}

.search-result-scientific {
  color: inherit;
  font-style: italic;
}

.search-result-arrow {
  width: 17px;
  height: auto;
}

.search-result-plus {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
}

.nav-search-results .search-result-button {
  padding: 0 18px;
}

.search-result-button.search-result-button--loading {
  cursor: progress;
}

.search-result-button.search-result-button--loading .search-result-arrow {
  visibility: hidden;
}

.search-result-button.search-result-button--loading .search-result-plus {
  visibility: hidden;
}

.search-result-button.search-result-button--loading::after {
  content: '';
  position: absolute;
  right: 28px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid rgba(213, 138, 27, 0.24);
  border-top-color: var(--accent);
  animation: search-result-spin 650ms linear infinite;
}

.nav-search-results .search-result-button.search-result-button--loading::after {
  right: 18px;
}

@keyframes search-result-spin {
  to {
    transform: rotate(360deg);
  }
}

.search-result-item + .search-result-item .search-result-button {
  border-top: 1px solid rgba(141, 141, 141, 0.85);
}

.search-bar input:not(:placeholder-shown) + button,
.nav-search-bar input:not(:placeholder-shown) + button {
  opacity: 0;
  pointer-events: none;
  width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.action-card {
  width: 170px;
  height: 116px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: inherit;
  color: var(--text);
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  transition: transform 160ms ease;
}

.action-card:hover,
.action-card:focus-visible {
  transform: translateY(-4px);
}

.action-card .action-icon {
  height: 50px;
  width: 50px;
  overflow: hidden;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-card .action-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.24);
  transform-origin: center;
  display: block;
}

.action-card.action-card--loading {
  cursor: progress;
}

.action-card.action-card--loading:hover,
.action-card.action-card--loading:focus-visible {
  transform: none;
}

.action-card.action-card--loading .action-icon img {
  display: none;
}

.action-card.action-card--loading .action-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  border: 3px solid rgba(213, 138, 27, 0.24);
  border-top-color: var(--accent);
  animation: action-card-spin 700ms linear infinite;
}

@keyframes action-card-spin {
  to {
    transform: rotate(360deg);
  }
}

.species-graph {
  width: 430px;
  height: 390px;
  position: relative;
  margin-top: 72px;
}

.species-graph .ray {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 1px;
  border-top: 1px solid var(--line);
  width: var(--ray-length, 180px);
  --ray-angle: 0deg;
  --ray-swing: 3deg;
  --ray-duration: 8s;
  --ray-delay: 0s;
  transform-origin: left center;
  transform: rotate(var(--ray-angle));
  animation: ray-drift var(--ray-duration) cubic-bezier(0.45, 0.05, 0.35, 1)
    var(--ray-delay) infinite alternate;
  will-change: transform;
}

.species-graph .ray::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.species-graph .ray .ray-branch {
  position: absolute;
  left: calc(100% - 1px);
  top: 0;
  height: 1px;
  width: calc(var(--ray-length) * 0.57);
  border-top: 1px solid var(--line-branch);
  transform-origin: left center;
  --branch-angle: 0deg;
  --branch-swing: 2deg;
  --branch-duration: 7s;
  --branch-delay: 0s;
  transform: rotate(var(--branch-angle));
  animation: ray-branch-drift var(--branch-duration) cubic-bezier(0.44, 0.05, 0.3, 1)
    var(--branch-delay) infinite alternate;
  will-change: transform;
}

.species-graph .ray .ray-branch::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line);
}

.species-graph .ray .ray-branch.b1 {
  --branch-angle: -58deg;
  --branch-swing: 2.2deg;
  --branch-duration: 7.2s;
  --branch-delay: -0.9s;
}

.species-graph .ray .ray-branch.b2 {
  --branch-angle: -28deg;
  --branch-swing: 1.9deg;
  --branch-duration: 6.9s;
  --branch-delay: -1.8s;
}

.species-graph .ray .ray-branch.b3 {
  --branch-angle: 24deg;
  --branch-swing: 2deg;
  --branch-duration: 7.6s;
  --branch-delay: -2.4s;
}

.species-graph .ray-1 {
  --ray-length: 208px;
  --ray-angle: -107deg;
  --ray-swing: 4.2deg;
  --ray-duration: 8.6s;
  --ray-delay: -1.8s;
}

.species-graph .ray-2 {
  --ray-length: 180px;
  --ray-angle: -43deg;
  --ray-swing: 2.3deg;
  --ray-duration: 7.4s;
  --ray-delay: -0.9s;
}

.species-graph .ray-4 {
  --ray-length: 188px;
  --ray-angle: 35deg;
  --ray-swing: 2.5deg;
  --ray-duration: 8.1s;
  --ray-delay: -2.6s;
}

.species-graph .ray-5 {
  --ray-length: 188px;
  --ray-angle: 96deg;
  --ray-swing: 4.1deg;
  --ray-duration: 9.1s;
  --ray-delay: -0.5s;
}

@keyframes ray-drift {
  0% {
    transform: rotate(calc(var(--ray-angle) - var(--ray-swing))) scaleX(0.98);
  }
  50% {
    transform: rotate(var(--ray-angle)) scaleX(1.03);
  }
  100% {
    transform: rotate(calc(var(--ray-angle) + var(--ray-swing))) scaleX(1);
  }
}

@keyframes ray-branch-drift {
  0% {
    transform: rotate(calc(var(--branch-angle) - var(--branch-swing))) scaleX(0.98);
  }
  50% {
    transform: rotate(var(--branch-angle)) scaleX(1.02);
  }
  100% {
    transform: rotate(calc(var(--branch-angle) + var(--branch-swing))) scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .species-graph .ray,
  .species-graph .ray .ray-branch {
    animation: none;
  }

  .action-card {
    transition: none;
  }

  .action-card:hover,
  .action-card:focus-visible {
    transform: none;
  }
}

.center-dot {
  position: absolute;
  left: calc(50% - 11px);
  top: calc(50% - 11px);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
}

.species-graph p {
  position: absolute;
  left: 40px;
  top: calc(50% - 18px);
  margin: 0;
  color: var(--accent);
  font-family: "Carrois Gothic SC", sans-serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.site-footer {
  margin-top: 70px;
  background: var(--footer-bg);
}

.species-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 55px 103px 64px;
}

.species-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.species-overview-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 280px;
  justify-content: space-between;
}

.species-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.species-name-wrap {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.species-scientific-name {
  margin: 0;
  font-size: 37px;
  line-height: 1;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}

.species-common-name {
  margin: 0;
  font-size: 37px;
  line-height: 1;
  font-weight: 500;
  color: var(--text);
}

.copy-json-btn {
  border: 0;
  background: transparent;
  color: rgba(123, 123, 123, 0.9);
  text-decoration: underline;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  margin-top: 6px;
  align-self: flex-start;
}

.species-path {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.3;
}

.species-priors {
  margin: 0;
}

.species-mobile-tabs {
  display: none;
}

.species-mobile-tab {
  border: 1px solid rgba(141, 141, 141, 0.34);
  background: transparent;
  color: var(--muted);
  height: 34px;
  min-width: 86px;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
}

.species-mobile-tab.is-active {
  color: var(--text);
  background: var(--panel);
}

.species-prior-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.species-prior-item {
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
}

.species-prior-label {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
}

.species-prior-value {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1;
  color: var(--accent);
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.species-radar-panel {
  background: transparent;
  border: 1px solid rgba(141, 141, 141, 0.32);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.species-radar {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  display: block;
}

.simulations {
  margin-top: 34px;
}

.simulations h2 {
  margin: 0;
  color: var(--text);
  font-family: "Carrois Gothic SC", sans-serif;
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
}

.simulation-cards {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.simulation-card {
  background: var(--panel);
  border-radius: 10px;
  min-height: 127px;
  padding: 18px 28px 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.simulation-copy {
  max-width: 783px;
}

.simulation-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--text);
}

.simulation-desc {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--muted);
}

.simulation-species-name {
  font-style: italic;
}

.simulate-btn {
  width: 185px;
  height: 43px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  flex: none;
  position: relative;
}

.simulate-btn.simulate-btn--loading {
  cursor: progress;
  color: transparent;
}

.simulate-btn.simulate-btn--loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #ffffff;
  animation: search-result-spin 650ms linear infinite;
}

.game-page {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 26px 24px 44px;
}

.game-layout {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  align-items: start;
}

.game-panel {
  border: 1px solid rgba(141, 141, 141, 0.24);
  border-radius: 12px;
  background: rgba(198, 157, 124, 0.12);
  padding: 16px;
}

.game-panel h2 {
  margin: 0;
  color: var(--text);
  font-family: "Carrois Gothic SC", sans-serif;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}

.game-controls {
  position: relative;
}

.game-controls > * + * {
  margin-top: 12px;
}

.game-controls > h2 + .game-selected-species-list {
  margin-top: 20px;
}

.game-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.game-species-field {
  position: relative;
  margin-top: 8px;
}

.game-species-field.game-nav-game-field,
.game-species-field .game-nav-game-input {
  cursor: text;
}

.game-input,
.game-select {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(141, 141, 141, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.2;
  padding: 0 12px;
  outline: none;
}

.game-input:focus-visible,
.game-select:focus-visible,
.game-runs-slider:focus-visible,
.game-add-species-btn:focus-visible,
.game-settings-simulate-btn:focus-visible,
.game-selected-species-remove:focus-visible,
.game-results-tab:focus-visible,
.game-simulation-tab:focus-visible {
  outline: 2px solid rgba(213, 138, 27, 0.65);
  outline-offset: 1px;
}

.game-input::placeholder {
  color: var(--muted);
}

.game-search-results {
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  border: 1px solid rgba(141, 141, 141, 0.36);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.game-search-results .search-result-button {
  height: 52px;
  padding: 0 14px;
}

.game-search-results .search-result-button.search-result-button--loading::after {
  right: 14px;
}

.game-add-species-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}

.game-add-species-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-add-species-plus {
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  transform: translateY(-1px);
}

.game-selected-species-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-selected-species-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(141, 141, 141, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 8px 6px 10px;
}

.game-selected-species-item--empty {
  align-items: center;
  justify-content: flex-start;
}

.game-selected-species-item--empty .game-selected-species-name {
  color: var(--muted);
}

.game-selected-species-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
  word-break: break-word;
}

.game-selected-species-common {
  font-size: 13px;
  color: var(--text);
}

.game-selected-species-scientific {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.game-selected-species-remove {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  margin-top: 1px;
}

.game-settings-simulate-btn {
  width: 100%;
  height: 40px;
  font-size: 18px;
}

.game-settings-simulate-btn:disabled:not([data-simulating='true']) {
  background: #d3d3d3;
  cursor: not-allowed;
}

.game-runs-control {
  display: grid;
  gap: 8px;
}

.game-runs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.game-runs-head .game-label {
  margin-top: 0;
}

.game-runs-value {
  font-size: 14px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.game-runs-slider {
  width: 100%;
  margin: 0;
  accent-color: rgb(213, 138, 27);
  cursor: pointer;
}

.game-runs-scale {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 12px;
  line-height: 1.1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.game-runs-scale span:first-child {
  justify-self: start;
}

.game-runs-scale span:nth-child(2) {
  justify-self: center;
}

.game-runs-scale span:last-child {
  justify-self: end;
}

.game-helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.game-live-feed {
  margin: 12px 0 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  min-height: 292px;
}

.game-live-feed-line,
.game-live-feed-empty {
  margin: 0;
}

.game-live-feed-empty {
  color: var(--muted);
}

.game-results-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.game-key-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.game-results-tabs,
.game-simulation-tabs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-results-tab,
.game-simulation-tab {
  border: 1px solid rgba(141, 141, 141, 0.34);
  background: rgba(255, 255, 255, 0.18);
  color: var(--muted);
  border-radius: 999px;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.game-results-tab.is-active,
.game-simulation-tab.is-active {
  color: var(--text);
  border-color: rgba(213, 138, 27, 0.55);
  background: rgba(213, 138, 27, 0.18);
}

.game-metric {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(141, 141, 141, 0.2);
}

.game-metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.game-metric-value {
  margin: 5px 0 0;
  color: var(--accent);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
}

.game-chart {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(141, 141, 141, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}

.game-chart-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
}

.game-chart-bars {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-chart-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
}

.game-chart-label,
.game-chart-value {
  font-size: 12px;
  line-height: 1.2;
  color: var(--text);
}

.game-chart-value {
  text-align: right;
}

.game-chart-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(141, 141, 141, 0.2);
  overflow: hidden;
}

.game-chart-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(213, 138, 27, 0.52), rgba(213, 138, 27, 0.96));
}

.game-meta,
.game-interpretation {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.game-meta {
  color: var(--muted);
}

.game-interpretation {
  color: var(--text);
}

.footer-inner {
  text-align: center;
  font-size: 16px;
  line-height: 1.22;
  padding: 30px 24px 32px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner p + p {
  margin-top: 18px;
}

.footer-inner a {
  color: inherit;
}

@media (max-width: 1200px) {
  .brand {
    font-size: 22px;
  }

  .nav-search-bar {
    width: min(48vw, 500px);
  }

  .nav-search-bar input {
    font-size: clamp(18px, 2.4vw, 20px);
  }

  .topbar--game .game-nav-controls {
    max-width: 460px;
    margin: 0 auto;
  }

  .hero {
    padding: 0 40px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(48px, 7.4vw, 67px);
  }

  .species-graph {
    margin: 28px auto 0;
  }

  .footer-inner {
    font-size: 15px;
  }

  .species-page {
    padding: 30px 40px 52px;
  }

  .species-overview {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
  }

  .species-prior-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .species-scientific-name,
  .species-common-name {
    font-size: clamp(28px, 3.2vw, 37px);
  }

  .copy-json-btn {
    font-size: clamp(16px, 1.9vw, 20px);
  }

  .simulation-title {
    font-size: clamp(21px, 2.5vw, 25px);
  }

  .game-page {
    padding: 22px 20px 36px;
  }

  .game-layout {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .game-controls {
    grid-column: 1;
    grid-row: 1;
  }

  .game-simulation {
    grid-column: 1;
    grid-row: 2;
  }

  .game-results {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 0 24px;
    gap: 12px;
  }

  .search-bar,
  .search-stage {
    width: 100%;
  }

  .species-graph {
    display: none;
  }

  .topbar--game .topbar-inner {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .topbar--game .game-nav-controls {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
    justify-content: flex-start;
  }

  .topbar--game .game-nav-control {
    width: min(100%, 420px);
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-controls,
  .game-simulation,
  .game-results {
    grid-column: 1;
    grid-row: auto;
  }

  .game-live-feed {
    min-height: 0;
  }

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

@media (max-width: 720px) {
  .topbar {
    height: auto;
    padding: 10px 0;
  }

  .topbar.topbar--with-search {
    min-height: 102px;
    padding-bottom: 44px;
  }

  .topbar-inner {
    padding: 0 16px;
    gap: 10px;
  }

  .brand {
    font-size: 20px;
    gap: 8px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .nav-search-bar {
    top: 52px;
    width: calc(100% - 32px);
    left: 16px;
    transform: none;
  }

  .nav-search-bar input {
    font-size: 17px;
    height: 29px;
  }

  .nav-search-bar button {
    padding-bottom: 4px;
  }

  .topbar.topbar--game {
    padding-bottom: 12px;
  }

  .topbar--game .topbar-inner {
    gap: 8px;
  }

  .topbar--game .game-nav-controls {
    justify-content: flex-start;
  }

  .topbar--game .game-nav-control {
    width: 100%;
  }

  .topbar--game .game-nav-game-input {
    height: 30px;
    font-size: 17px;
  }

  .github-btn {
    height: 34px;
    padding: 0 19px;
    font-size: 14px;
  }

  .page {
    padding-top: 22px;
    padding-bottom: 32px;
  }

  .hero {
    padding: 0 20px;
    gap: 10px;
  }

  .hero-copy h1 {
    font-size: clamp(37px, 10.4vw, 55px);
  }

  .search-bar {
    margin-top: 28px;
  }

  .search-bar input {
    height: 40px;
    font-size: 17px;
  }

  .search-bar button {
    padding-bottom: 4px;
  }

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

  .action-card {
    width: 100%;
    min-height: 112px;
    height: auto;
    border-radius: 12px;
    padding: 12px 10px;
    background: rgba(198, 157, 124, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: 14px;
    gap: 10px;
    line-height: 1.15;
  }

  .action-card .action-icon {
    height: 30px;
    width: 30px;
  }

  .search-stage {
    margin-top: 14px;
    min-height: 162px;
  }

  .search-stage.search-stage--expanded {
    min-height: 162px;
  }

  .search-result-button {
    height: 54px;
    padding: 0 14px;
  }

  .search-result-copy {
    font-size: 13px;
  }

  .search-result-arrow {
    width: 15px;
  }

  .species-graph {
    display: none;
  }

  .site-footer {
    margin-top: 42px;
  }

  .footer-inner {
    font-size: 13px;
    padding: 24px 14px;
  }

  .footer-inner p + p {
    margin-top: 12px;
  }

  .species-page {
    padding: 24px 16px 32px;
  }

  .species-meta {
    gap: 14px;
  }

  .species-overview {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .species-overview-main {
    min-height: 0;
    justify-content: flex-start;
    gap: 14px;
  }

  .species-name-wrap {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .species-scientific-name,
  .species-common-name {
    font-size: 36px;
  }

  .copy-json-btn {
    font-size: 16px;
    display: none;
  }

  .species-path {
    font-size: 14px;
  }

  .species-priors {
    margin: 12px 0;
  }

  .species-mobile-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }

  .species-prior-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .species-prior-item {
    padding: 10px 12px;
  }

  .species-prior-value {
    font-size: 16px;
  }

  .species-radar-panel {
    min-height: 220px;
    padding: 10px;
    margin: 12px 0;
  }

  .species-page.mobile-tab-priors .species-radar-panel {
    display: none;
  }

  .species-page.mobile-tab-graph .species-priors {
    display: none;
  }

  .simulations {
    margin-top: 22px;
  }

  .simulations h2 {
    font-size: 22px;
  }

  .simulation-cards {
    margin-top: 12px;
    gap: 12px;
  }

  .simulation-card {
    min-height: 120px;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    gap: 12px;
  }

  .simulation-title {
    font-size: 30px;
  }

  .simulation-desc {
    font-size: 14px;
    margin-top: 8px;
  }

  .simulate-btn {
    width: 100%;
    height: 40px;
    font-size: 18px;
  }

  .game-page {
    padding: 18px 14px 28px;
  }

  .game-panel {
    padding: 12px;
  }

  .game-panel h2 {
    font-size: 19px;
  }

  .game-key-metrics {
    grid-template-columns: 1fr;
  }

  .game-chart-row {
    grid-template-columns: 52px minmax(0, 1fr) 28px;
    gap: 6px;
  }
}
