:root {
  color-scheme: light;
  --blue-950: #07142d;
  --blue-900: #0a1f44;
  --blue-800: #123f7a;
  --blue-700: #1761b5;
  --blue-600: #1f7fe5;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --bg: #eaf3ff;
  --surface: #f8fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --ink: #102033;
  --muted: #64748b;
  --line: #c8d7ec;
  --line-strong: #8eb4e6;
  --quark: #2563eb;
  --lepton: #0f766e;
  --boson: #4f46e5;
  --composite: #0f766e;
  --danger: #c0262d;
  --success: #047857;
  --warning: #b7791f;
  --shadow: 0 18px 48px rgba(7, 20, 45, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(31, 127, 229, 0.35);
  outline-offset: 2px;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
  padding: 8px 10px 10px;
  transition: filter 180ms ease, transform 180ms ease;
}

.app-shell.is-muted {
  filter: blur(2px) saturate(0.86);
  transform: scale(0.997);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 1740px;
  height: 42px;
  margin: 0 auto 8px;
}

.brand,
.start-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-900);
  overflow: hidden;
}

.brand-icon span {
  position: absolute;
  width: 23px;
  height: 23px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
}

.brand-icon span:nth-child(1) {
  transform: rotate(24deg) scaleX(1.35);
  border-color: #8bd8ff;
}

.brand-icon span:nth-child(2) {
  transform: rotate(92deg) scaleX(1.28);
  border-color: #f2b705;
}

.brand-icon span:nth-child(3) {
  transform: rotate(148deg) scaleX(1.18);
  border-color: #75f0c3;
}

.brand h1,
.brand p,
.panel-heading h2,
.panel-heading p,
.mini-heading h3,
.credits-hero h2,
.credits-hero p,
.start-card h2,
.start-card p {
  margin: 0;
}

.brand h1 {
  font-size: 0.96rem;
  line-height: 1.05;
}

.brand p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

.small-info-button,
.icon-button,
.primary-button {
  min-height: 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.small-info-button {
  padding: 0 9px;
  font-size: 0.86rem;
  font-weight: 850;
}

.small-info-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-800);
}

.icon-button {
  width: 32px;
  padding: 0;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue-800);
}

.primary-button {
  min-height: 40px;
  padding: 0 13px;
  border-color: var(--blue-800);
  background: var(--blue-800);
  color: #ffffff;
  font-weight: 850;
}

.small-info-button svg,
.icon-button svg,
.primary-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.small-info-button:hover,
.icon-button:hover,
.primary-button:hover,
.sm-tile:hover,
.recipe-card:hover,
.credit-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 22px rgba(7, 20, 45, 0.11);
}

.lab-view {
  display: none;
  grid-template-columns: minmax(390px, 440px) minmax(0, 1fr);
  gap: 10px;
  max-width: 1740px;
  height: calc(100vh - 68px);
  margin: 0 auto;
}

.lab-view.is-active {
  display: grid;
}

.side-panel,
.chamber-panel,
.credits-hero,
.credit-card {
  min-width: 0;
  border: 1px solid rgba(142, 180, 230, 0.56);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-panel {
  min-height: 0;
  padding: 9px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(86px, 1fr) auto;
  gap: 7px;
}

.panel-heading,
.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.eyebrow {
  color: var(--blue-700);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

h2 {
  font-size: 0.94rem;
  line-height: 1.15;
}

.count-pill,
.mini-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.72rem;
  font-weight: 900;
}

.particle-list {
  min-height: 0;
  overflow: visible;
  padding-right: 2px;
}

.standard-model-board {
  display: grid;
  grid-template-columns: 26px repeat(3, minmax(0, 1fr)) 96px;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  height: 276px;
  min-height: 0;
}

.board-title {
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #cfe0ff;
  color: var(--blue-950);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.05;
  font-weight: 950;
}

.board-title span {
  font-weight: 850;
}

.matter-title {
  grid-column: 1 / 5;
}

.carrier-title {
  grid-column: 5;
}

.generation-labels {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 26px repeat(3, minmax(0, 1fr)) 96px;
  align-items: center;
  color: var(--blue-900);
  font-size: 0.86rem;
  font-weight: 950;
  text-align: center;
}

.particle-board-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 26px repeat(3, minmax(0, 1fr)) 96px;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
}

.vertical-label {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 950;
  writing-mode: vertical-rl;
  rotate: 180deg;
}

.quark-axis {
  grid-column: 1;
  grid-row: 1 / span 2;
  background: #cfe0ff;
  color: var(--blue-800);
}

.lepton-axis {
  grid-column: 1;
  grid-row: 3 / span 2;
  background: #d2edf1;
  color: #0f5f68;
}

.boson-stack {
  grid-column: 5;
  grid-row: 1 / span 4;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
}

.sm-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.sm-cell.is-open {
  z-index: 12;
}

.sm-tile {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--tile-bg, #ffffff);
  color: var(--ink);
  text-align: left;
}

.sm-tile strong,
.sm-tile span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-tile small {
  display: block;
  color: var(--blue-700);
  font-size: 0.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sm-tile strong {
  color: var(--tile-color, var(--blue-800));
  font-size: 0.94rem;
  line-height: 1.18;
  font-weight: 950;
  overflow: visible;
}

.sm-tile span {
  color: var(--muted);
  font-size: 0.53rem;
  line-height: 1.12;
  font-weight: 850;
}

.sm-tile.quark {
  --tile-bg: #edf5ff;
  --tile-color: var(--quark);
}

.sm-tile.lepton {
  --tile-bg: #eef9fb;
  --tile-color: var(--lepton);
}

.sm-tile.boson {
  --tile-bg: #edf2ff;
  --tile-color: var(--boson);
}

.sm-tile.composite {
  --tile-bg: #eafaf4;
  --tile-color: var(--composite);
}

.variant-popover {
  position: absolute;
  left: calc(100% + 6px);
  top: 0;
  z-index: 20;
  width: 152px;
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 34px rgba(7, 20, 45, 0.18);
}

.variant-popover.from-right {
  left: auto;
  right: calc(100% + 6px);
}

.variant-popover.from-bottom {
  top: auto;
  bottom: 0;
}

.variant-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fbff;
  color: var(--ink);
  text-align: left;
}

.variant-choice:hover {
  border-color: var(--line-strong);
  background: var(--blue-50);
}

.variant-glyph {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--particle-color);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 950;
}

.variant-choice strong,
.variant-choice small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-choice strong {
  font-size: 0.66rem;
}

.variant-choice small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
}

.mini-section {
  min-height: 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.particle-detail-section,
.feynman-section,
.recipes-section {
  min-width: 0;
}

.feynman-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.mini-heading {
  margin-bottom: 4px;
}

.mini-heading h3 {
  font-size: 0.82rem;
  line-height: 1.15;
}

.particle-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.detail-empty {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
}

.detail-head h3,
.detail-head p {
  margin: 0;
}

.detail-head h3 {
  font-size: 0.78rem;
}

.detail-head p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.particle-glyph {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--particle-color);
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: inset 0 -5px 12px rgba(7, 20, 45, 0.18);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.detail-grid div {
  min-width: 0;
  padding: 4px;
  background: #ffffff;
}

.detail-grid span,
.detail-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid span {
  color: var(--muted);
  font-size: 0.45rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid strong {
  margin-top: 2px;
  color: var(--blue-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.55rem;
}

.feynman-card {
  height: 100%;
  min-height: 86px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 63, 122, 0.04) 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px, auto;
}

.feynman-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.feynman-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.feynman-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: feynmanDraw 820ms ease forwards;
}

.feynman-line.incoming {
  stroke: var(--blue-700);
}

.feynman-line.outgoing {
  stroke: #0f766e;
  animation-delay: 280ms;
}

.feynman-line.boson {
  stroke: #4f46e5;
  stroke-width: 2.5;
}

.feynman-line.composite {
  stroke: #0f766e;
}

.feynman-vertex {
  fill: #ffffff;
  stroke: var(--blue-800);
  stroke-width: 2;
  transform-origin: center;
  animation: vertexPop 760ms ease 260ms both;
}

.feynman-label {
  fill: var(--blue-950);
  font-size: 7.4px;
  font-weight: 900;
}

.feynman-label.output {
  text-anchor: end;
}

.feynman-caption {
  fill: var(--muted);
  font-size: 6.1px;
  font-weight: 850;
  text-anchor: middle;
}

@keyframes feynmanDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes vertexPop {
  from {
    opacity: 0;
    scale: 0.62;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

.product-diagram {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 5px;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.composite-diagram {
  position: relative;
  width: 88px;
  height: 62px;
}

.composite-orbit {
  position: absolute;
  inset: 8px 15px;
  border: 2px solid rgba(23, 97, 181, 0.25);
  border-radius: 50%;
}

.quark-dot {
  position: absolute;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--quark);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 14px rgba(7, 20, 45, 0.14);
}

.quark-dot:nth-child(2) {
  left: 29px;
  top: 0;
}

.quark-dot:nth-child(3) {
  left: 9px;
  top: 31px;
}

.quark-dot:nth-child(4) {
  right: 9px;
  top: 31px;
}

.gluon-line {
  position: absolute;
  left: 24px;
  top: 34px;
  width: 42px;
  height: 12px;
  border-top: 3px solid #f2b705;
  border-radius: 50%;
  rotate: -8deg;
}

.composite-diagram.is-meson .quark-dot:nth-child(2) {
  left: 13px;
  top: 16px;
}

.composite-diagram.is-meson .quark-dot:nth-child(3) {
  left: 45px;
  top: 16px;
}

.mini-composite {
  position: relative;
  width: 38px;
  height: 34px;
}

.mini-composite .composite-orbit {
  inset: 6px 7px;
  border-width: 1px;
}

.mini-composite .quark-dot {
  width: 18px;
  height: 18px;
  border-width: 2px;
  font-size: 0.46rem;
  box-shadow: 0 4px 8px rgba(7, 20, 45, 0.12);
}

.mini-composite.is-baryon .quark-dot:nth-child(2) {
  left: 10px;
  top: 0;
}

.mini-composite.is-baryon .quark-dot:nth-child(3) {
  left: 2px;
  top: 16px;
}

.mini-composite.is-baryon .quark-dot:nth-child(4) {
  right: 2px;
  top: 16px;
}

.mini-composite.is-meson .quark-dot:nth-child(2) {
  left: 3px;
  top: 8px;
}

.mini-composite.is-meson .quark-dot:nth-child(3) {
  right: 3px;
  left: auto;
  top: 8px;
}

.mini-composite .gluon-line {
  left: 9px;
  top: 19px;
  width: 20px;
  height: 7px;
  border-top-width: 2px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 96px;
  overflow: auto;
  padding-right: 2px;
}

.recipe-card {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
}

.recipe-art {
  width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-50);
  overflow: hidden;
}

.recipe-copy {
  min-width: 0;
}

.recipe-copy strong,
.recipe-copy span {
  display: block;
}

.recipe-copy strong {
  color: var(--blue-900);
  font-size: 0.68rem;
  line-height: 1.15;
}

.recipe-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.55rem;
  overflow-wrap: anywhere;
}

.recipe-glyph {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--particle-color);
  font-size: 0.56rem;
  font-weight: 950;
  box-shadow: inset 0 -4px 9px rgba(7, 20, 45, 0.18);
}

.multi-product-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.chamber-panel {
  min-height: 0;
  display: grid;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.chamber-toolbar {
  display: none;
}

.chamber {
  position: relative;
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(142, 180, 230, 0.74);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 63, 122, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 122, 0.055) 1px, transparent 1px),
    var(--surface);
  background-size: 42px 42px, 42px 42px, auto;
  overflow: hidden;
  touch-action: none;
}

.chamber-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.readouts {
  display: flex;
  align-items: center;
  gap: 6px;
}

.readouts div {
  min-width: 72px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(7, 20, 45, 0.08);
}

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

.readouts span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readouts strong {
  margin-top: 2px;
  color: var(--blue-800);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
}

#fieldCanvas,
.particle-layer,
.trash-zone,
.drop-hint {
  position: absolute;
  inset: 0;
}

#fieldCanvas {
  width: 100%;
  height: 100%;
}

.particle-layer {
  z-index: 2;
}

.trash-zone {
  inset: auto 14px 14px auto;
  z-index: 4;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(142, 180, 230, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: rgba(18, 63, 122, 0.58);
  opacity: 0.78;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(7, 20, 45, 0.1);
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, color 140ms ease;
}

.trash-zone svg {
  width: 26px;
  height: 26px;
}

.trash-zone.is-hot {
  transform: scale(1.06);
  opacity: 1;
  background: rgba(219, 234, 254, 0.78);
  color: var(--blue-800);
  border-color: var(--line-strong);
}

.drop-hint {
  z-index: 1;
  pointer-events: none;
}

.stage-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--r) * 2px);
  height: calc(var(--r) * 2px);
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #ffffff;
  background: var(--particle-color);
  box-shadow: 0 12px 22px rgba(7, 20, 45, 0.18), inset 0 -8px 16px rgba(7, 20, 45, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  user-select: none;
  touch-action: none;
  will-change: transform;
}

.stage-particle.is-selected {
  box-shadow: 0 0 0 5px rgba(31, 127, 229, 0.22), 0 16px 26px rgba(7, 20, 45, 0.2), inset 0 -8px 16px rgba(7, 20, 45, 0.18);
}

.stage-particle.is-ready::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(23, 97, 181, 0.42);
  border-radius: 50%;
}

.stage-particle.is-aging::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px dashed rgba(242, 183, 5, 0.9);
  border-radius: 50%;
  animation: spin 1.6s linear infinite;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.stage-particle.is-new {
  animation: pop 260ms ease-out;
}

@keyframes pop {
  from {
    scale: 0.65;
  }
  to {
    scale: 1;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(7, 20, 45, 0.24);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-open {
  display: grid;
}

.info-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(219, 234, 254, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(7, 20, 45, 0.28);
}

.info-modal h2,
.info-modal p {
  margin: 0;
}

.info-modal h2 {
  margin-top: 4px;
  font-size: 1.24rem;
}

.info-modal > p:not(.eyebrow) {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}

.info-modal a {
  color: var(--blue-700);
  font-weight: 850;
}

.contact-modal {
  width: min(480px, 100%);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--blue-800);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

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

.credit-card {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius);
}

.credit-card h3,
.credit-card p {
  margin: 0;
}

.credit-card h3 {
  font-size: 0.96rem;
}

.credit-card p {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.credit-card a {
  color: var(--blue-700);
  font-weight: 850;
  text-decoration: none;
}

.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(7, 20, 45, 0.22);
  backdrop-filter: blur(12px);
}

.start-overlay.is-open {
  display: grid;
}

.start-card {
  width: min(460px, 100%);
  display: grid;
  gap: 13px;
  padding: 20px;
  border: 1px solid rgba(219, 234, 254, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 90px rgba(7, 20, 45, 0.28);
}

.start-card h2 {
  font-size: 1.35rem;
}

.start-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.start-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 11px;
  background: #ffffff;
  color: var(--ink);
}

.start-button {
  min-height: 44px;
}

@media (max-width: 1000px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .lab-view {
    grid-template-columns: 1fr;
    height: auto;
  }

  .side-panel {
    overflow: visible;
  }

  .chamber {
    min-height: 560px;
  }
}

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

  .top-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .small-info-button {
    flex: 1;
  }

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

  .chamber-controls {
    left: 8px;
    right: 8px;
    justify-content: flex-end;
  }

  .readouts div {
    min-width: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
