.biosim-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.biosim-kicker a {
  color: var(--teal-dark);
  text-decoration: none;
}

.biosim-kicker a:hover {
  text-decoration: underline;
}

.player-viewport-wrap {
  position: relative;
  min-height: 28rem;
  background: radial-gradient(ellipse at 30% 20%, #143039 0%, #07171c 55%, #041014 100%);
}

.player-viewport-state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.55rem;
  padding: 1.5rem;
  color: #d9efec;
  background: rgba(3, 16, 20, 0.88);
  text-align: center;
}

.player-viewport-state[hidden] {
  display: none;
}

.player-viewport-state[data-kind="error"] {
  color: #fff0e7;
  background: rgba(39, 13, 12, 0.93);
}

.player-viewport-state strong {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.player-viewport-state > span:last-child {
  max-width: 28rem;
  color: #a9c5c2;
  font-size: 0.82rem;
  line-height: 1.45;
}

.player-loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 0.2rem solid rgba(217, 239, 236, 0.22);
  border-top-color: #48c6b5;
  border-radius: 50%;
  animation: player-loading-spin 0.8s linear infinite;
}

.player-viewport-state[data-kind="error"] .player-loading-spinner {
  display: none;
}

@keyframes player-loading-spin {
  to { transform: rotate(360deg); }
}

.player-viewport-wrap #viewport {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none;
}

.player-viewport-wrap #viewport:active {
  cursor: grabbing;
}

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

.player-metrics strong {
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.player-scrub {
  grid-template-columns: 1fr;
}

.player-scrub input[type="range"] {
  width: 100%;
}

.reaction-guide-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 0.6rem;
  background: linear-gradient(145deg, rgba(232, 248, 244, 0.96), rgba(255, 255, 255, 0.98));
}

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

.reaction-guide-panel > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.5rem;
}

.reaction-guide-panel > header > div {
  display: grid;
  gap: 0.08rem;
}

.reaction-guide-kicker {
  color: var(--teal-dark);
  font-size: 0.58rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reaction-guide-panel header strong {
  color: var(--navy);
  font-size: 0.84rem;
}

.reaction-state-badge {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  color: #38565a;
  background: #e7edec;
  font-size: 0.62rem;
  font-weight: 820;
  white-space: nowrap;
}

.reaction-guide-panel[data-state="reactant"] .reaction-state-badge {
  color: #285d77;
  background: #dceff8;
}

.reaction-guide-panel[data-state="transition"] .reaction-state-badge {
  color: #805900;
  background: #fff0bd;
}

.reaction-guide-panel[data-state="product"] .reaction-state-badge {
  color: #176347;
  background: #d9f2e6;
}

.reaction-equation {
  margin: 0;
  color: #174f54;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  font-weight: 680;
  line-height: 1.35;
}

.reaction-expected {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0.28rem;
}

.reaction-expected article {
  display: grid;
  align-content: center;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.48rem 0.35rem;
  border: 1px solid rgba(16, 61, 68, 0.13);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.reaction-expected article > span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.reaction-expected article > small {
  color: var(--muted);
  font-size: 0.5rem;
  line-height: 1.25;
}

.reaction-state-name {
  overflow-wrap: anywhere;
  color: #123f45;
  font-size: 0.6rem;
  line-height: 1.25;
}

.reaction-state-smiles {
  display: block;
  overflow-wrap: anywhere;
  padding: 0.28rem 0.35rem;
  border-radius: 0.25rem;
  color: #174f54;
  background: #edf7f6;
  font-size: 0.56rem;
  line-height: 1.3;
  text-align: left;
  user-select: all;
}

.reaction-depiction-missing {
  margin: 0;
  padding: 0.55rem;
  border: 1px solid #d9b34e;
  border-radius: 0.4rem;
  color: #694f0c;
  background: #fff8dd;
  font-size: 0.58rem;
  line-height: 1.35;
}

.reaction-guide-panel[data-state="reactant"] #reaction-reactant-card,
.reaction-guide-panel[data-state="product"] #reaction-product-card {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 35%, transparent);
  background: #fff;
}

.reaction-guide-panel[data-state="transition"] .reaction-expected article {
  border-color: #d5a530;
}

.reaction-arrow {
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  font-size: 1rem;
  font-weight: 800;
}

.reaction-molecule-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 260;
  object-fit: contain;
  border: 1px solid rgba(16, 61, 68, 0.12);
  border-radius: 0.32rem;
  background: #fff;
}

.reaction-progress {
  display: grid;
  gap: 0.28rem;
}

.reaction-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 720;
}

.reaction-progress-track {
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9dfed, #ffe49a 50%, #bde8d4);
}

.reaction-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-right: 0.18rem solid #092e34;
  background: rgba(9, 46, 52, 0.2);
  transition: width 80ms linear;
}

.reaction-distances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0;
}

.reaction-distances > div {
  min-width: 0;
  padding: 0.38rem 0.44rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
}

.reaction-distances dt {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-distances dd {
  margin: 0.12rem 0 0;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.77rem;
  font-weight: 820;
}

.reaction-frame-note,
.reaction-guide-caveat {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.35;
}

.reaction-frame-note {
  color: #315c60;
  font-weight: 680;
}

.reaction-guide-toggle {
  font-size: 0.64rem;
}

.player-analysis {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.player-analysis .muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.player-analysis .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.player-analysis .stat {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.player-analysis .stat span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-analysis .stat b {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 720;
}

.player-analysis .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
}

.player-analysis .card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.player-analysis .card h4 {
  margin: 0 0 0.65rem;
  color: var(--navy);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.player-analysis .pair {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.player-analysis .pair b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.player-analysis .warn {
  margin: 0.4rem 0 0.6rem;
  color: #9a6b12;
  font-size: 0.82rem;
}

.player-analysis .qualified {
  margin: 0.4rem 0 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #8bc5a8;
  background: #edf8f2;
  color: #276448;
  font-size: 0.84rem;
}

.player-analysis .trajectory-evidence {
  margin: 0.4rem 0 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #8bbdc5;
  background: #edf7f8;
  color: #245d66;
  font-size: 0.84rem;
  line-height: 1.5;
}

.player-analysis .plot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.55rem;
  background: #f7fbfa;
  border: 1px solid var(--line);
}

.player-analysis .plot-line {
  fill: none;
  stroke: #087e7b;
  stroke-width: 1.6;
}

.player-analysis .plot-ref {
  stroke: #c9a227;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.player-analysis .plot-axis {
  fill: #526a70;
  font-size: 9px;
  font-family: Inter, system-ui, sans-serif;
}

/* Compact public embed inside the main Biosimulation workbench. */
.player-embedded .site-header,
.player-embedded .page-heading {
  display: none;
}

.player-embedded body {
  min-width: 0;
  background: #fff;
}

.player-embedded .biosim-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.player-embedded .player-block {
  margin: 0;
  padding: 0.85rem;
  border: 0;
}

.player-embedded .player-block > .biosim-block-head {
  display: none;
}

.player-embedded .player-analysis {
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .player-embedded .player-block {
    padding: 0.5rem;
  }
}
