:root {
  color-scheme: dark;
  --bg: #06111c;
  --panel: #0c1d2c;
  --panel-2: #10283a;
  --line: #24445a;
  --text: #f2f8fb;
  --muted: #a8c0ce;
  --accent: #58c6ef;
  --accent-2: #bceeff;
  --pink: #ff6aad;
  --green: #69d2a2;
  --warning: #ffd36b;
  --danger: #ff7c83;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  background:
    radial-gradient(circle at 50% -20%, rgba(48, 137, 183, 0.24), transparent 42%),
    linear-gradient(180deg, #081725, var(--bg) 60%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }

.app {
  width: min(100%, 760px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow, .mission-kicker {
  margin: 0 0 2px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(1.38rem, 5vw, 2rem); line-height: 1; }
h2 { margin: 0; font-size: 1.25rem; }
p { line-height: 1.45; }

.icon-button, .small-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(16, 40, 58, 0.92);
  font-weight: 800;
}
.small-button { min-height: 38px; min-width: 68px; padding: 0 14px; color: var(--accent-2); }

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.hud-item {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 29, 44, 0.84);
  text-align: center;
}
.hud-item span { display: block; color: var(--muted); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hud-item strong { display: block; margin-top: 2px; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mission-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(16, 42, 61, 0.96), rgba(9, 28, 43, 0.96));
}
.mission-card p:not(.mission-kicker) { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; }

.laboratory {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(5, 16, 25, 0.15), rgba(5, 16, 25, 0.55)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(121, 175, 200, 0.035) 32px),
    linear-gradient(180deg, #102638, #091825);
  box-shadow: var(--shadow);
}
.reading-panel {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  pointer-events: none;
}
.reading-panel div {
  padding: 6px 7px;
  border: 1px solid rgba(117, 173, 198, 0.32);
  border-radius: 10px;
  background: rgba(3, 14, 23, 0.8);
  text-align: center;
  backdrop-filter: blur(5px);
}
.reading-panel span { display: block; color: var(--muted); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; }
.reading-panel strong { display: block; margin-top: 1px; font-size: 0.77rem; }

.apparatus-wrap { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.apparatus { width: 100%; height: 100%; min-height: 0; display: block; }
.svg-label { fill: #acd4e6; font-size: 11px; font-weight: 700; text-anchor: end; dominant-baseline: middle; }
#tapHitArea { cursor: pointer; touch-action: none; }
#tapHitArea:focus { outline: none; }
#tapVisual.active #tapHandle { fill: var(--pink); }

.endpoint-card {
  margin: -13px 10px 10px;
  padding: 8px 10px 9px;
  border: 1px solid rgba(87, 151, 181, 0.38);
  border-radius: 13px;
  background: rgba(4, 18, 28, 0.91);
  backdrop-filter: blur(8px);
}
.endpoint-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; font-weight: 800; }
.endpoint-row span { color: var(--accent-2); }
.endpoint-row strong { color: var(--muted); font-weight: 700; }
.persistence-track { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #183246; }
.persistence-fill { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--pink)); transition: width 120ms linear; }
.endpoint-card p { margin: 6px 0 0; color: var(--muted); font-size: 0.72rem; }

.controls { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.control, .finish-button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, #143249, #0d2638);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.control-primary { border-color: #3c90b5; background: linear-gradient(180deg, #1a506d, #12364c); }
.control-icon { font-size: 1.35rem; font-weight: 900; }
.control span:last-child { min-width: 0; text-align: left; }
.control strong { display: block; font-size: 0.88rem; }
.control small { display: block; margin-top: 1px; color: var(--muted); font-size: 0.64rem; }
.control.active { transform: translateY(1px); background: linear-gradient(180deg, #7b2f59, #4d213c); border-color: var(--pink); }
#swirlButton.active { background: linear-gradient(180deg, #1e6a69, #144746); border-color: #62d3cc; }
.finish-button {
  grid-column: 1 / -1;
  min-height: 48px;
  background: linear-gradient(180deg, #f0f7fa, #bddbe7);
  border-color: #e6fbff;
  color: #092031;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.finish-button:disabled { opacity: 0.45; }

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  background: rgba(2, 8, 14, 0.78);
  backdrop-filter: blur(10px);
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(100%, 480px);
  max-height: min(94dvh, 760px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #31556c;
  border-radius: 22px;
  background: linear-gradient(180deg, #112a3d, #091a28);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}
.modal h2 { font-size: 1.65rem; }
.modal > p { color: var(--muted); }
.mode-grid { display: grid; gap: 9px; margin: 18px 0; }
.mode-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #0c2233;
  text-align: left;
}
.mode-card strong { display: block; font-size: 1rem; }
.mode-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.mode-card.selected { border-color: var(--accent); background: #12364d; box-shadow: inset 0 0 0 1px rgba(88, 198, 239, 0.28); }
.how-to { display: grid; gap: 8px; margin: 14px 0; }
.how-to div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.83rem; }
.how-to b { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #173c54; color: var(--accent-2); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 3px; color: var(--muted); }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.modal-primary, .modal-secondary {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border-radius: 14px;
  font-weight: 900;
}
.modal-primary { border: 1px solid #e8fbff; background: #dff7ff; color: #082030; }
.modal-secondary { border: 1px solid var(--line); background: #10293b; color: var(--text); }
.version { margin: 14px 0 0 !important; text-align: center; font-size: 0.68rem; }

.result-badge { display: inline-block; margin: 10px 0 14px; padding: 7px 12px; border-radius: 999px; background: rgba(105, 210, 162, 0.16); color: var(--green); font-weight: 900; }
.result-badge.warning { background: rgba(255, 211, 107, 0.14); color: var(--warning); }
.result-badge.danger { background: rgba(255, 124, 131, 0.14); color: var(--danger); }
.result-readings, .score-breakdown, .setup-list { display: grid; gap: 7px; }
.result-readings div, .score-breakdown div, .setup-list div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 27, 41, 0.7);
}
.result-readings span, .score-breakdown span, .setup-list span { color: var(--muted); font-size: 0.78rem; }
.result-readings strong, .score-breakdown strong, .setup-list strong { text-align: right; font-size: 0.82rem; }
.score-breakdown { margin-top: 10px; }
.score-total { border-color: #3e8eae !important; background: #12354a !important; }
.result-feedback { padding: 10px 12px; border-radius: 12px; background: rgba(17, 48, 67, 0.7); font-size: 0.84rem; }

@keyframes swirlFlask {
  0% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-6px) rotate(-2deg); }
  55% { transform: translateX(6px) rotate(2deg); }
  100% { transform: translateX(0) rotate(0deg); }
}
#flaskGroup.swirling { transform-origin: 180px 535px; animation: swirlFlask 520ms ease-in-out; }
@keyframes flowPulse { 0%,100% { opacity: .72; } 50% { opacity: 1; } }
#liquidStream.flowing { animation: flowPulse 260ms infinite; }

@media (min-width: 700px) and (min-height: 760px) {
  .app { padding-left: 20px; padding-right: 20px; gap: 12px; }
  .controls { grid-template-columns: 1fr 1fr 0.8fr; }
  .finish-button { grid-column: auto; min-height: 62px; }
}

@media (max-height: 700px) {
  .app { gap: 7px; padding-top: max(6px, env(safe-area-inset-top)); }
  .mission-card { padding-top: 7px; padding-bottom: 7px; }
  .mission-card p:not(.mission-kicker) { display: none; }
  .control { min-height: 54px; }
  .control small { display: none; }
  .finish-button { min-height: 43px; }
}

@media (max-width: 370px) {
  .app { padding-left: 8px; padding-right: 8px; }
  .hud { gap: 4px; }
  .hud-item { padding-left: 3px; padding-right: 3px; }
  .control { padding-left: 6px; padding-right: 6px; }
  .control-icon { display: none; }
}

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

/* v2026.08.06.4 — complete phosphoric-acid neutralisation reactions */
.calculation-launch {
  border-color: #72d8bd;
  background: linear-gradient(180deg, #dffbf2, #9ee2cf);
  color: #082c26;
}
.calculation-launch:disabled { opacity: 0.7; }

.calculation-modal { width: min(100%, 560px); }
.calculation-context {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
}
.calculation-context div {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 27, 41, 0.72);
  text-align: center;
}
.calculation-context span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.calculation-context strong {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.calculation-steps { display: grid; gap: 10px; }
.calculation-step {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 27, 41, 0.68);
}
.calculation-step > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}
.calculation-step > span b {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #173c54;
  color: var(--accent-2);
}
.calculation-step input,
.calculation-step textarea {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid #41657a;
  border-radius: 10px;
  background: #071b2a;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.calculation-step input::placeholder, .calculation-step textarea::placeholder { color: #718a98; }
.calculation-step input.correct, .calculation-step textarea.correct { border-color: var(--green); box-shadow: inset 0 0 0 1px rgba(105, 210, 162, 0.35); }
.calculation-step input.partial, .calculation-step textarea.partial { border-color: #f1b65f; box-shadow: inset 0 0 0 1px rgba(241, 182, 95, 0.35); }
.calculation-step input.incorrect, .calculation-step textarea.incorrect { border-color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 124, 131, 0.3); }
.calculation-step input:disabled, .calculation-step textarea:disabled { opacity: 1; -webkit-text-fill-color: var(--text); }
.calculation-step textarea { min-height: 68px; resize: vertical; line-height: 1.35; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.answer-row em {
  min-width: 68px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}
.calculation-step small { min-height: 1.15em; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.correct-feedback { color: var(--green) !important; }
.partial-feedback { color: #ffd28a !important; }
.incorrect-feedback { color: #ffb0b5 !important; }
.calculation-summary {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(17, 48, 67, 0.72);
  color: var(--muted) !important;
  font-size: 0.80rem;
}
.calculation-summary.success { background: rgba(57, 130, 102, 0.22); color: #b9f3d9 !important; }
.calculation-summary.warning { background: rgba(132, 81, 42, 0.24); color: #ffe0a6 !important; }

@media (max-width: 420px) {
  .calculation-context { grid-template-columns: 1fr; }
  .calculation-context div { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
  .calculation-context strong { margin-top: 0; text-align: right; }
}

/* v2026.08.06.5 — analysis mode, logbook and minimum-volume lock */
[hidden] { display: none !important; }

.app.analysis-active {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 7px;
}
.app.analysis-active .hud-item:nth-child(4) { display: none; }
.app.analysis-active .hud { grid-template-columns: repeat(3, 1fr); }
.app.analysis-active .mission-card { padding-top: 7px; padding-bottom: 7px; }
.app.analysis-active .mission-card p:not(.mission-kicker) { font-size: 0.75rem; }
.app.analysis-active .endpoint-card .persistence-track { display: none; }
.app.analysis-active .endpoint-card { padding-bottom: 7px; }

.analysis-panel {
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(14, 42, 60, 0.96), rgba(7, 27, 40, 0.96));
}
.analysis-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analysis-panel-head h2 { font-size: 0.98rem; }
.analysis-panel-head .small-button { min-height: 36px; }
.analysis-logbook {
  display: grid;
  gap: 5px;
  max-height: 70px;
  margin-top: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.empty-logbook { margin: 2px 0; color: var(--muted); font-size: 0.72rem; }
.logbook-row {
  display: grid;
  grid-template-columns: 38px repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(80, 132, 158, 0.32);
  border-radius: 9px;
  background: rgba(4, 19, 29, 0.72);
  font-size: 0.67rem;
}
.logbook-row b { color: var(--accent-2); }
.logbook-row span { min-width: 0; text-align: right; white-space: nowrap; }
.logbook-tag { padding: 2px 5px; border-radius: 999px; background: #17384d; color: var(--muted); font-size: 0.58rem; text-transform: uppercase; }
.logbook-tag.include { background: rgba(105, 210, 162, 0.16); color: var(--green); }
.logbook-tag.rough { background: rgba(255, 211, 107, 0.14); color: var(--warning); }
.logbook-tag.exclude { background: rgba(255, 124, 131, 0.14); color: #ffb0b5; }

.classification-field { display: grid; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 0.82rem; font-weight: 800; }
.classification-field select,
.analysis-selection-row select,
.average-section input {
  width: 100%;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid #41657a;
  border-radius: 10px;
  background: #071b2a;
  color: var(--text);
  font: inherit;
}
.analysis-process-modal, .analysis-final-modal { width: min(100%, 610px); }
.analysis-selection-list { display: grid; gap: 8px; margin: 13px 0; }
.analysis-selection-row {
  display: grid;
  grid-template-columns: auto 42px repeat(3, minmax(0, 1fr)) minmax(96px, 1.1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 27, 41, 0.72);
}
.analysis-selection-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.analysis-selection-row b { color: var(--accent-2); }
.analysis-selection-row span { color: var(--muted); font-size: 0.72rem; text-align: right; white-space: nowrap; }
.analysis-selection-row select { min-height: 40px; padding: 6px 7px; font-size: 0.75rem; }
.average-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #3f7791;
  border-radius: 13px;
  background: rgba(15, 49, 68, 0.68);
}
.average-section label { display: grid; gap: 7px; font-size: 0.84rem; font-weight: 800; }
.average-section small { min-height: 1.1em; color: var(--muted); }
.analysis-recovery-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.analysis-recovery-actions .modal-secondary { margin-top: 8px; }
.analysis-finish { border-color: #72d8bd; background: linear-gradient(180deg, #dffbf2, #9ee2cf); color: #082c26; }

.analysis-report-section { margin-top: 12px; }
.analysis-report-section h3 { margin: 0 0 7px; color: var(--accent-2); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }
.analysis-report-grid { display: grid; gap: 6px; }
.analysis-report-grid > div,
.analysis-report-table > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 27, 41, 0.68);
}
.analysis-report-grid span,
.analysis-report-table span { color: var(--muted); font-size: 0.75rem; }
.analysis-report-grid strong,
.analysis-report-table strong { text-align: right; font-size: 0.78rem; overflow-wrap: anywhere; }
.analysis-report-table { display: grid; gap: 5px; }
.analysis-report-equation { overflow-wrap: anywhere; line-height: 1.5; }

@media (max-height: 760px) {
  .app.analysis-active .topbar .eyebrow { display: none; }
  .app.analysis-active h1 { font-size: 1.25rem; }
  .app.analysis-active .hud-item { padding-top: 5px; padding-bottom: 5px; }
  .app.analysis-active .mission-card p:not(.mission-kicker) { display: none; }
  .app.analysis-active .analysis-logbook { max-height: 53px; }
  .app.analysis-active .control { min-height: 50px; }
  .app.analysis-active .finish-button { min-height: 42px; }
}

@media (max-width: 520px) {
  .analysis-selection-row {
    grid-template-columns: auto 40px 1fr 1fr;
  }
  .analysis-selection-row .selection-final,
  .analysis-selection-row select { grid-column: span 2; }
  .analysis-selection-row select { min-height: 38px; }
}

@media (max-width: 370px) {
  .logbook-row { grid-template-columns: 34px repeat(2, minmax(0, 1fr)) auto; }
  .logbook-row .logbook-initial { display: none; }
  .analysis-recovery-actions { grid-template-columns: 1fr; }
}
button:disabled { cursor: not-allowed; }
.small-button:disabled, .modal-primary:disabled, .modal-secondary:disabled { opacity: 0.45; }

/* v2026.08.06.7 — Rush target-volume and result-lock update */
.topbar-actions { display: flex; align-items: center; gap: 7px; }
button, input, textarea, select { font: inherit; }

.start-modal {
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  padding: 15px;
}
.start-modal > p:not(.eyebrow):not(.version):not(.control-hint) { margin: 7px 0 0; font-size: 0.82rem; }
.start-modal .mode-grid { gap: 6px; margin: 11px 0 9px; }
.start-modal .mode-card { padding: 9px 11px; border-radius: 12px; }
.start-modal .mode-card strong { font-size: 0.92rem; }
.start-modal .mode-card span { margin-top: 2px; font-size: 0.70rem; line-height: 1.25; }
.control-hint {
  margin: 8px 0 !important;
  padding: 7px 9px;
  border: 1px solid rgba(88, 198, 239, 0.28);
  border-radius: 10px;
  background: rgba(14, 47, 66, 0.62);
  color: var(--accent-2) !important;
  font-size: 0.73rem;
  text-align: center;
}
.start-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.start-settings .toggle-row {
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 27, 41, 0.64);
  font-size: 0.76rem;
}
.start-settings .toggle-row input { width: 19px; height: 19px; }
.start-actions { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(92px, 0.8fr); gap: 7px; }
.start-actions .modal-primary,
.start-actions .modal-secondary { min-height: 45px; margin-top: 8px; }
.start-modal #resumeAnalysisButton { min-height: 42px; margin-top: 7px; }
.start-modal .version { margin-top: 7px !important; }

.app.unguided-mode .endpoint-card { display: none; }
.app.unguided-mode .apparatus-wrap { grid-template-rows: minmax(0, 1fr); }
.app.unguided-mode .laboratory { min-height: 0; }

.help-modal { width: min(100%, 650px); }
.help-modal > p { margin: 8px 0 12px; font-size: 0.84rem; }
.help-section {
  margin-top: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8, 27, 41, 0.67);
}
.help-section h3 { margin: 0 0 7px; color: var(--accent-2); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; }
.help-section ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.79rem; line-height: 1.4; }
.help-section li + li { margin-top: 4px; }
.indicator-help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.indicator-help-grid article { padding: 9px; border: 1px solid rgba(87, 151, 181, 0.34); border-radius: 10px; background: rgba(4, 18, 28, 0.72); }
.indicator-help-grid article > strong { color: var(--text); font-size: 0.84rem; }
.indicator-help-grid p { margin: 5px 0; color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.indicator-help-grid small { color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.colour-chip { display: inline-block; width: 12px; height: 12px; margin-right: 3px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; vertical-align: -1px; }
.colour-chip.colourless { background: linear-gradient(135deg, #eaf9ff, #a8d7e8); }
.colour-chip.pale-pink { background: #f5a6c6; }
.colour-chip.red { background: #d84c57; }
.colour-chip.orange { background: #ee9a4a; }
.colour-chip.yellow { background: #efd65f; }
.help-note { margin: 8px 0 0; color: #d2e5ed; font-size: 0.72rem; }
.term-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0; }
.term-grid > div { padding: 8px; border: 1px solid rgba(87, 151, 181, 0.28); border-radius: 9px; background: rgba(3, 17, 27, 0.58); }
.term-grid dt { color: var(--accent-2); font-size: 0.75rem; font-weight: 900; }
.term-grid dd { margin: 2px 0 0; color: var(--muted); font-size: 0.69rem; line-height: 1.35; }

.report-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.report-legend span { padding: 4px 8px; border-radius: 999px; font-size: 0.66rem; font-weight: 800; }
.report-correct { border-color: rgba(105, 210, 162, 0.55) !important; background: rgba(55, 125, 98, 0.22) !important; }
.report-partial { border-color: rgba(255, 211, 107, 0.55) !important; background: rgba(132, 91, 42, 0.23) !important; }
.report-incorrect { border-color: rgba(255, 124, 131, 0.58) !important; background: rgba(124, 50, 58, 0.23) !important; }
.report-reference { border-color: rgba(88, 198, 239, 0.42) !important; background: rgba(30, 91, 119, 0.18) !important; }
.report-legend .report-correct { color: #b9f3d9; }
.report-legend .report-partial { color: #ffe0a6; }
.report-legend .report-incorrect { color: #ffb0b5; }
.report-legend .report-reference { color: var(--accent-2); }
.report-status-text { display: block; margin-top: 2px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.report-correct .report-status-text { color: var(--green); }
.report-partial .report-status-text { color: var(--warning); }
.report-incorrect .report-status-text { color: var(--danger); }
.report-reference .report-status-text { color: var(--accent-2); }
.report-name-field { display: grid; gap: 6px; margin-top: 13px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.report-name-field input {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #41657a; border-radius: 10px;
  background: #071b2a; color: var(--text);
}
.report-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.report-export-actions .modal-primary,
.report-export-actions .modal-secondary { min-height: 46px; }
.pdf-note { margin: 7px 0 0 !important; color: var(--muted) !important; font-size: .69rem; text-align: center; }

@media (max-width: 520px) {
  .indicator-help-grid, .term-grid { grid-template-columns: 1fr; }
  .report-export-actions { grid-template-columns: 1fr; gap: 0; }
}

@media (max-height: 680px) {
  .start-modal { padding: 11px; }
  .start-modal .eyebrow { display: none; }
  .start-modal h2 { font-size: 1.35rem; }
  .start-modal > p:not(.version):not(.control-hint) { display: none; }
  .start-modal .mode-card span { display: none; }
  .start-modal .mode-grid { margin: 8px 0 7px; }
  .start-modal .mode-card { padding: 8px 10px; }
  .control-hint { margin: 6px 0 !important; }
  .start-settings .toggle-row { min-height: 32px; }
}

.site-return{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;}
