:root {
  --bg-deep: #08222d;
  --bg-river: #164b63;
  --bg-silt: #c89e6a;
  --panel: rgba(7, 24, 32, 0.82);
  --panel-soft: rgba(17, 46, 57, 0.72);
  --paper: rgba(245, 239, 227, 0.96);
  --paper-soft: rgba(255, 251, 243, 0.72);
  --ink: #102329;
  --muted: #d7e6ea;
  --accent: #d9702d;
  --accent-strong: #9f4215;
  --success: #2f7a50;
  --warning: #a23a2a;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Bitter", Georgia, serif;
  --font-body: "Source Sans 3", "Trebuchet MS", sans-serif;
  --font-hand: "Caveat", "Brush Script MT", cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(69, 141, 166, 0.25), transparent 30%),
    radial-gradient(circle at bottom right, rgba(205, 148, 78, 0.2), transparent 28%),
    linear-gradient(180deg, #0a2c3a 0%, #0d4258 34%, #1f5a62 57%, #0d2936 100%);
  color: #fff;
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #ffe19f;
  outline-offset: 2px;
}

#app {
  min-height: 100vh;
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 16px;
  animation: fade-in 280ms ease-out;
}

.page--investigation {
  padding: 10px;
}

.page::after {
  content: "";
  position: fixed;
  inset: auto -4rem -7rem auto;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(207, 146, 71, 0.24), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.topbar,
.name-entry-shell,
.briefing-shell,
.assessment-shell,
.results-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(7, 24, 32, 0.84), rgba(18, 54, 66, 0.76));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.topbar__title,
.section-title,
.modal__title,
.notebook__title,
.score-card__value,
.claim-badge {
  font-family: var(--font-display);
}

.topbar__eyebrow,
.eyebrow {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f7c88d;
}

.topbar__title {
  margin: 0.05rem 0 0;
  font-size: clamp(1.45rem, 1.75vw, 2rem);
}

.topbar__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #edf6f8;
  font-weight: 600;
}

.pill--ink {
  background: rgba(16, 35, 41, 0.08);
  border-color: rgba(16, 35, 41, 0.12);
  color: var(--ink);
}

.button,
.button-secondary,
.site-button,
.sample-card__button,
.answer-button,
.tab-button {
  border: 0;
  border-radius: 999px;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.button:hover,
.button-secondary:hover,
.site-button:hover,
.sample-card__button:hover,
.answer-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.button {
  padding: 13px 20px;
  background: linear-gradient(135deg, #de7630, #a94716);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 16px 26px rgba(122, 56, 19, 0.34);
}

.button[disabled],
.button-secondary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace {
  display: grid;
  grid-template-columns: 1.1fr 1.15fr 0.85fr;
  gap: 18px;
  max-width: 1400px;
  margin: 18px auto 0;
}

.map-stage {
  max-width: 1400px;
  margin: 10px auto 0;
}

.page--investigation .map-stage {
  margin-top: 0;
}

.map-stage__panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(8, 30, 39, 0.88), rgba(12, 44, 55, 0.8));
  box-shadow: var(--shadow);
}

.map-stage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
}

.map-stage__header {
  border-bottom: 1px solid var(--line);
}

.map-stage__title-group {
  min-width: 230px;
}

.map-stage__title-group .eyebrow {
  margin: 0 0 4px;
}

.map-stage__instruction {
  flex: 1;
  max-width: 620px;
  margin: 0;
}

.map-stage__journal-button,
.map-stage__claim-button {
  flex: 0 0 auto;
  padding: 10px 16px;
}

.map-stage__canvas {
  position: relative;
  padding: 10px 14px 14px;
}

.map-stage__canvas .stream-map {
  height: clamp(500px, calc(100vh - 178px), 860px);
  min-height: 0;
  padding: clamp(8px, 1.2vw, 14px);
}

.page--investigation .map-stage__canvas .stream-map {
  height: clamp(500px, calc(100vh - 46px), 860px);
}

.map-stage__canvas .stream-map svg {
  min-height: 0;
}

.map-stage__hud {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: min(320px, calc(100% - 56px));
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 24, 32, 0.82);
  backdrop-filter: blur(6px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.map-stage__floating-actions {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: min(440px, calc(100% - 56px));
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(8, 30, 39, 0.86), rgba(12, 44, 55, 0.78));
  box-shadow: var(--shadow);
}

.panel__header,
.panel__body {
  padding: 20px;
}

.panel__header {
  border-bottom: 1px solid var(--line);
}

.panel__body {
  display: grid;
  gap: 16px;
}

.briefing-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: stretch;
  min-height: calc(100vh - 44px);
}

.name-entry-shell {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
  min-height: calc(100vh - 44px);
}

.briefing-card,
.name-entry-card,
.name-entry-side,
.briefing-side,
.assessment-card,
.results-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.briefing-card {
  background:
    linear-gradient(180deg, rgba(245, 239, 227, 0.98), rgba(242, 233, 214, 0.96)),
    linear-gradient(45deg, rgba(16, 71, 91, 0.04), rgba(0, 0, 0, 0));
  color: var(--ink);
  padding: 32px;
}

.name-entry-card {
  align-self: center;
  padding: 36px 32px;
  background:
    linear-gradient(180deg, rgba(245, 239, 227, 0.98), rgba(242, 233, 214, 0.96)),
    linear-gradient(45deg, rgba(16, 71, 91, 0.04), rgba(0, 0, 0, 0));
  color: var(--ink);
}

.briefing-side {
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(10, 39, 50, 0.9), rgba(16, 62, 77, 0.78)),
    radial-gradient(circle at top, rgba(91, 182, 196, 0.18), transparent 40%);
}

.name-entry-side {
  align-self: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(10, 39, 50, 0.9), rgba(16, 62, 77, 0.78)),
    radial-gradient(circle at top, rgba(91, 182, 196, 0.18), transparent 40%);
}

.lede {
  font-size: 1.17rem;
  line-height: 1.55;
}

.goal-list,
.tip-list,
.sample-list,
.question-review {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.name-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.field-label {
  font-weight: 700;
  color: var(--ink);
}

.text-input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 35, 41, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.text-input::placeholder {
  color: rgba(16, 35, 41, 0.48);
}

.text-input:focus-visible {
  outline: 3px solid rgba(223, 133, 65, 0.45);
  outline-offset: 2px;
}

.reading-answer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink);
  font-weight: 700;
}

.reading-answer__input {
  max-width: 260px;
}

.reading-answer__hint {
  margin: 8px 0 0;
  color: rgba(16, 35, 41, 0.68);
  font-size: 0.96rem;
}

.callout-card,
.mission-card,
.assessment-callout,
.score-card,
.observation-card,
.question-card,
.trend-card,
.sample-card,
.site-context,
.sample-modal__card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.callout-card,
.mission-card,
.sample-card,
.site-context,
.assessment-callout {
  background: rgba(255, 255, 255, 0.06);
  padding: 18px;
}

.sample-list li,
.goal-list li,
.tip-list li {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.stream-map {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 18px;
  --stream-node-size: clamp(56px, 5vw, 76px);
}

.stream-map svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.stream-map__image {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 26px;
  filter:
    saturate(1.08)
    contrast(1.02)
    drop-shadow(0 24px 42px rgba(0, 0, 0, 0.26));
}

.stream-map__image--photo {
  background-color: #203640;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.stream-map__site {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.stream-map__site--locked {
  opacity: 0.58;
  filter: grayscale(1);
}

.stream-map__landmark-button {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  min-width: 110px;
  padding: 10px 14px;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: #2d6e8b;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.stream-map__landmark-button:hover {
  background: #3382a5;
}

.stream-map__landmark-alert {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 3px solid #fff;
  background: #d83f2e;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
}

.stream-node {
  width: var(--stream-node-size);
  height: var(--stream-node-size);
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.78);
  background: var(--site-color, #3d87d1);
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.62rem, 1.35vw, 0.8rem);
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
}

.stream-node--active {
  transform: scale(1.06);
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.32);
}

.stream-node--locked,
.stream-node--locked:hover {
  background: #6f7b7e;
  border-color: rgba(255, 255, 255, 0.48);
  color: rgba(255, 255, 255, 0.82);
  cursor: not-allowed;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  transform: none;
}

.stream-node__label {
  position: absolute;
  top: calc(var(--stream-node-size) + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: clamp(120px, 14vw, 150px);
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 24, 32, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.stream-node__label strong {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: #f7d8a8;
}

.stream-map__site--label-above .stream-node__label {
  top: auto;
  bottom: calc(var(--stream-node-size) + 12px);
}

.site-button-row,
.sample-grid,
.metric-grid,
.results-grid,
.score-grid,
.button-row {
  display: grid;
  gap: 12px;
}

.site-button-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-button {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-button--active {
  background: linear-gradient(135deg, rgba(223, 133, 65, 0.95), rgba(163, 67, 24, 0.95));
}

.sample-grid,
.metric-grid,
.score-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.sample-card__title-row,
.notebook__title-row,
.assessment-topbar,
.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sample-card__title,
.section-title,
.modal__title,
.notebook__title {
  margin: 0;
  font-size: 1.45rem;
}

.sample-card__metric-line,
.muted,
.site-context p,
.sample-card p,
.observation-card p,
.question-card p {
  color: var(--muted);
  line-height: 1.5;
}

.score-card p,
.score-card .eyebrow,
.review-line {
  color: var(--ink);
  line-height: 1.5;
}

.sample-card__button {
  padding: 12px 16px;
  background: rgba(217, 112, 45, 0.95);
  color: #fff;
  font-weight: 700;
}

.sample-card__button--done {
  background: rgba(47, 122, 80, 0.95);
}

.sample-card--ready {
  border-color: rgba(250, 205, 138, 0.42);
  box-shadow: inset 0 0 0 1px rgba(250, 205, 138, 0.18);
}

.sample-card--collected {
  border-color: rgba(137, 219, 167, 0.42);
}

.drop-target-active {
  outline: 3px dashed rgba(255, 214, 153, 0.88);
  outline-offset: 2px;
}

.sample-card.drop-target-active {
  transform: translateY(-2px);
}

.sample-card__instruction {
  margin: 0;
  color: #f5e2c2;
  font-weight: 600;
}

.toolbox-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 17, 23, 0.56);
}

.site-transition {
  position: relative;
  isolation: isolate;
  width: min(1180px, 100%);
  min-height: min(86vh, 820px);
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: clamp(18px, 3vw, 38px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: #0c2d38;
  background-image:
    linear-gradient(180deg, rgba(5, 18, 24, 0.02), rgba(4, 13, 18, 0.42)),
    var(--site-photo, linear-gradient(180deg, rgba(8, 30, 39, 0.96), rgba(16, 62, 77, 0.9)));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.site-transition__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 220, 155, 0.14), transparent 26%),
    linear-gradient(180deg, transparent 0 42%, rgba(3, 12, 17, 0.2) 66%, rgba(3, 12, 17, 0.72) 100%);
}

.site-transition__content {
  display: grid;
  gap: 14px;
  max-width: min(760px, 100%);
  padding: 18px 0 0;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.72);
}

.site-transition__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 6.8rem);
  line-height: 0.88;
}

.site-transition__tip {
  margin: 0;
  max-width: 64ch;
  color: #fff;
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  font-weight: 700;
  line-height: 1.35;
}

.site-transition__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.town-hall-scene {
  position: relative;
  isolation: isolate;
  width: min(1180px, 100%);
  min-height: min(86vh, 820px);
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: clamp(18px, 3vw, 38px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: #233730;
  background-image:
    linear-gradient(180deg, rgba(12, 22, 21, 0.04), rgba(5, 13, 12, 0.36)),
    var(--town-hall-photo);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.town-hall-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 236, 189, 0.16), transparent 26%),
    linear-gradient(180deg, transparent 0 40%, rgba(4, 11, 10, 0.32) 68%, rgba(4, 11, 10, 0.72) 100%);
}

.town-hall-scene__actions {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.town-hall-chat {
  position: relative;
  max-width: min(720px, 100%);
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(16, 35, 41, 0.14);
  background: rgba(247, 240, 228, 0.94);
  color: var(--ink);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.town-hall-chat::after {
  content: "";
  position: absolute;
  left: 44px;
  bottom: -18px;
  width: 34px;
  height: 34px;
  background: rgba(247, 240, 228, 0.94);
  transform: rotate(45deg);
  border-right: 1px solid rgba(16, 35, 41, 0.14);
  border-bottom: 1px solid rgba(16, 35, 41, 0.14);
}

.town-hall-chat .eyebrow {
  color: #9a5d29;
}

.town-hall-chat .section-title {
  margin: 5px 0 10px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
}

.town-hall-chat p {
  margin: 0 0 14px;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.5;
}

.town-hall-task-list {
  margin: 0 0 16px;
  padding-left: 22px;
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.town-hall-scene__credit {
  margin: 12px 0 0;
  color: rgba(16, 35, 41, 0.68);
  font-size: 0.82rem;
}

.town-hall-scene__credit a {
  color: inherit;
  font-weight: 700;
}

.site-scene {
  position: relative;
  width: min(1320px, 100%);
  height: min(92vh, 960px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 16, 22, 0.88);
  box-shadow: var(--shadow);
}

.site-scene__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #0c2d38;
  background-image:
    linear-gradient(180deg, rgba(4, 16, 22, 0.34), rgba(5, 18, 24, 0.16)),
    var(--site-photo, linear-gradient(180deg, rgba(8, 30, 39, 0.96), rgba(16, 62, 77, 0.9)));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.site-scene__controls {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
}

.site-scene__controls-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: min(80%, 920px);
}

.site-time-toggle {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(65%, 560px);
}

.site-time-toggle__button {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 24, 32, 0.72);
  color: #fff;
  font-weight: 700;
}

.site-time-toggle__button--active {
  background: linear-gradient(135deg, rgba(223, 133, 65, 0.95), rgba(163, 67, 24, 0.95));
  border-color: rgba(255, 232, 198, 0.5);
}

.scene-control {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 24, 32, 0.82);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.scene-control--ghost {
  background: rgba(7, 24, 32, 0.58);
}

.observation-target {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(7, 24, 32, 0.78);
  color: #fff;
  font-weight: 800;
  text-align: left;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.28);
}

.observation-target:hover {
  background: rgba(19, 55, 65, 0.88);
}

.observation-target__marker {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
}

.observation-target--weather .observation-target__marker {
  background: #f0c35b;
}

.observation-target--biology .observation-target__marker {
  background: #59b36c;
}

.observation-target__label {
  line-height: 1.05;
}

.site-journal-panel {
  position: absolute;
  top: 80px;
  left: 18px;
  width: 460px;
  height: 640px;
  min-width: 360px;
  min-height: 320px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow: auto;
  z-index: 3;
  padding: 0;
  border-radius: 18px;
  border: 0;
  background: transparent;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
  touch-action: none;
  resize: both;
}

.site-journal-panel__paper {
  position: relative;
  height: 100%;
  padding: 16px 16px 14px 34px;
  border-radius: 18px;
  border: 1px solid rgba(121, 98, 67, 0.24);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(207, 79, 61, 0.55) 0 2px, transparent 2px),
    repeating-linear-gradient(
      to bottom,
      rgba(53, 98, 146, 0.2),
      rgba(53, 98, 146, 0.2) 1px,
      transparent 1px,
      transparent 34px
    ),
    linear-gradient(180deg, rgba(255, 251, 240, 0.98), rgba(246, 237, 217, 0.97));
  background-position: 24px 0, 0 88px, 0 0;
  color: #2b2417;
}

.site-journal-panel__paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22px 22px, rgba(62, 50, 36, 0.18) 0 2px, transparent 2px),
    radial-gradient(circle at 22px 58px, rgba(62, 50, 36, 0.18) 0 2px, transparent 2px),
    radial-gradient(circle at 22px 94px, rgba(62, 50, 36, 0.18) 0 2px, transparent 2px);
  opacity: 0.5;
}

.site-journal-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

body.journal-dragging .site-journal-panel__header {
  cursor: grabbing;
}

body.journal-resizing {
  cursor: nwse-resize;
}

.site-journal-panel__header .eyebrow {
  color: #6f5b3f;
}

.site-journal-panel__header .section-title {
  color: #20180e;
}

.site-journal-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-journal-panel__form {
  margin-top: 14px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-journal-panel__sample-label {
  margin: 0 0 2px;
  color: #4b3b24;
  font-weight: 700;
}

.site-journal-panel__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.site-journal-field {
  display: grid;
  gap: 4px;
}

.site-journal-panel__entry {
  border-radius: 10px;
  border: 1px solid rgba(93, 75, 53, 0.22);
  background: rgba(255, 255, 255, 0.74);
  color: #2d2418;
}

.site-journal-panel .field-label {
  color: #463722;
}

.site-journal-panel .button-secondary {
  color: #2b2417;
  border-color: rgba(80, 66, 45, 0.24);
  background: rgba(255, 255, 255, 0.52);
}

.site-journal-panel .button {
  box-shadow: 0 10px 18px rgba(122, 56, 19, 0.26);
}

.site-journal-panel__select {
  border-radius: 10px;
  border: 1px solid rgba(93, 75, 53, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: #2d2418;
}

.site-journal-panel__textarea {
  flex: 1;
  min-height: 140px;
  padding: 9px 10px 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(93, 75, 53, 0.22);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 30px,
      rgba(53, 98, 146, 0.2) 30px 31px
    ),
    rgba(255, 255, 255, 0.26);
  color: #2b2114;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  line-height: 1.3;
  resize: vertical;
}

.site-journal-panel__textarea::placeholder {
  color: rgba(64, 52, 36, 0.55);
  font-family: var(--font-hand);
}

.site-journal-panel__saved {
  margin-top: 14px;
  padding-bottom: 22px;
}

.site-journal-panel__error {
  margin: 4px 0 2px;
  color: #9d2d1f;
  font-weight: 700;
}

.journal-entry-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.journal-entry-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(95, 79, 58, 0.16);
  color: #2b2417;
  line-height: 1.4;
}

.journal-entry-list__status {
  font-weight: 700;
  color: #236434;
}

.muted-ink {
  margin: 12px 0 0;
  color: rgba(67, 54, 39, 0.66);
}

.site-journal-panel__resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: nwse-resize;
  z-index: 6;
  border: 1px solid rgba(70, 56, 36, 0.42);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(70, 56, 36, 0.62) 46% 53%, transparent 53% 100%),
    linear-gradient(135deg, transparent 0 62%, rgba(70, 56, 36, 0.62) 62% 69%, transparent 69% 100%),
    linear-gradient(135deg, transparent 0 78%, rgba(70, 56, 36, 0.62) 78% 85%, transparent 85% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 220, 194, 0.9));
}

.site-observation-panel {
  position: absolute;
  top: 118px;
  left: 18px;
  width: min(560px, calc(100% - 36px));
  max-height: min(56vh, 520px);
  overflow: auto;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 26, 34, 0.84);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

.site-observation-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.site-observation-panel__sample-label {
  margin: 0;
  color: #f0ddc2;
  font-weight: 700;
}

.site-observation-panel__summary {
  margin: 12px 0 10px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

.site-observation-panel__subhead {
  margin: 0 0 6px;
}

.site-observation-panel__detail-list {
  margin: 0 0 12px;
  padding-left: 22px;
  display: grid;
  gap: 5px;
}

.site-observation-panel__detail-item {
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.42;
}

.site-observation-panel__species-list {
  margin: 0 0 10px;
  padding-left: 22px;
  display: grid;
  gap: 4px;
}

.site-observation-panel__species-item {
  color: rgba(255, 255, 255, 0.94);
}

.site-observation-panel__indicator {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.species-book {
  position: absolute;
  top: 118px;
  left: 18px;
  width: 760px;
  height: 640px;
  min-width: 520px;
  min-height: 380px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(28, 17, 9, 0.96), rgba(44, 29, 14, 0.94));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

.species-book__frame {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  padding: 10px;
}

.species-book__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #f9e6c7;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.species-book__header .section-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.7vw, 2.55rem);
}

.species-book__spread {
  position: relative;
  min-height: 0;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(134, 102, 63, 0.2), rgba(255, 245, 226, 0.85) 8%, rgba(255, 248, 233, 0.92) 50%, rgba(255, 245, 226, 0.85) 92%, rgba(134, 102, 63, 0.2));
  border: 1px solid rgba(112, 79, 44, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(112, 79, 44, 0.22);
  overflow: hidden;
}

.species-book__pages {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.species-book__spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 14px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(124, 80, 41, 0.46), rgba(85, 51, 24, 0.52));
  box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.2), inset -1px 0 1px rgba(0, 0, 0, 0.22);
}

.species-book__page {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 16px 16px 14px;
  color: #342617;
}

.species-book__page--left {
  border-right: 1px solid rgba(112, 79, 44, 0.16);
  padding-right: 22px;
}

.species-book__page--right {
  border-left: 1px solid rgba(112, 79, 44, 0.1);
  padding-left: 22px;
}

.species-book__empty-page {
  min-height: 100%;
}

.species-book__empty-page--note {
  display: grid;
  place-items: center;
  color: #5b4631;
  text-align: center;
  padding: 16px;
}

.species-book__toc h4,
.species-book__entry h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.18rem;
}

.species-book__toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  overflow: auto;
  min-height: 0;
  align-content: start;
}

.species-book__toc-item {
  margin: 0;
}

.species-book__toc-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(88, 64, 37, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  color: #2e2114;
  padding: 4px 6px;
  font-weight: 700;
  text-align: left;
  font-size: 0.76rem;
  line-height: 1.1;
}

.species-book__entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.species-book__description {
  margin: 0;
  color: #3a2b1c;
  line-height: 1.45;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.species-book__description--under-image {
  line-height: 1.4;
}

.species-book__image-shell {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(88, 64, 37, 0.3);
  background: rgba(255, 255, 255, 0.38);
  min-height: 120px;
  max-height: min(30vh, 180px);
}

.species-book__image {
  width: 100%;
  height: 100%;
  max-height: min(30vh, 180px);
  object-fit: cover;
  display: block;
}

.species-book__image-placeholder {
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #5a4630;
  padding: 12px;
}

.species-book__minimums-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(109, 79, 48, 0.22);
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed;
}

.species-book__minimums-table th,
.species-book__minimums-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(109, 79, 48, 0.18);
  color: #2b2014;
  font-size: 0.95rem;
  vertical-align: top;
  word-break: break-word;
}

.species-book__minimums-table thead th {
  background: rgba(182, 143, 97, 0.3);
  font-weight: 800;
}

.species-book__minimums-table tbody tr:last-child td {
  border-bottom: 0;
}

.species-book__source {
  margin: 0;
  color: #5f4a31;
  margin-top: auto;
}

.species-book__source a {
  color: #3f2f1e;
}

.species-book__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 52px;
}

.species-book__page-indicator {
  color: #f4debc;
  font-weight: 700;
  font-size: 0.95rem;
}

.species-book__footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.species-book .button-secondary {
  color: #fff2dd;
  border-color: rgba(255, 236, 206, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.species-book .button-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.species-book .button-secondary:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.2);
}

.species-book__toc-button:hover {
  background: rgba(255, 255, 255, 0.6);
}

.species-book__toc-button span:last-child {
  color: #7b6143;
}

.species-book__toc-button span:first-child {
  font-weight: 700;
}

.species-book__entry p {
  line-height: 1.4;
}

.species-book__entry--details .species-book__description {
  max-height: none;
  overflow: visible;
}

.species-book__toc {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  gap: 8px;
}

.species-book__resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: nwse-resize;
  z-index: 5;
  border: 1px solid rgba(99, 73, 45, 0.52);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.26);
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(99, 73, 45, 0.72) 46% 53%, transparent 53% 100%),
    linear-gradient(135deg, transparent 0 62%, rgba(99, 73, 45, 0.72) 62% 69%, transparent 69% 100%),
    linear-gradient(135deg, transparent 0 78%, rgba(99, 73, 45, 0.72) 78% 85%, transparent 85% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(236, 220, 194, 0.92));
}

body.encyclopedia-resizing {
  cursor: nwse-resize;
}

body.encyclopedia-dragging .species-book__header {
  cursor: grabbing;
}

.toolbox-overlay {
  position: absolute;
  top: 118px;
  right: 18px;
  bottom: 18px;
  width: min(320px, calc(100% - 36px));
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  z-index: 3;
}

.toolbox-overlay__card {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 24, 32, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  overflow: hidden;
}

.toolbox-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbox-overlay__text {
  margin: 4px 0 0;
  color: #ecdfcb;
  line-height: 1.5;
}

.sensor-toolbox--overlay {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  align-content: start;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.sensor-toolbox--overlay .sensor-tool {
  touch-action: pan-y;
}

.river-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.river-hotspot__pin {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 3px dashed rgba(255, 249, 231, 0.92);
  background:
    radial-gradient(circle, rgba(255, 249, 231, 0) 0 42%, rgba(255, 249, 231, 0.18) 43% 48%, transparent 49%),
    rgba(5, 18, 22, 0.14);
  box-shadow:
    0 0 0 8px rgba(5, 18, 22, 0.18),
    0 18px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 18px rgba(255, 249, 231, 0.18);
  cursor: crosshair;
}

.river-hotspot.drop-target-active .river-hotspot__pin {
  border-style: solid;
  border-color: #fff3b7;
  background:
    radial-gradient(circle, rgba(255, 243, 183, 0.04) 0 42%, rgba(255, 243, 183, 0.36) 43% 50%, transparent 51%),
    rgba(5, 18, 22, 0.22);
  box-shadow:
    0 0 0 12px rgba(255, 243, 183, 0.16),
    0 18px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 22px rgba(255, 243, 183, 0.3);
}

.placed-tool {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.8);
  transform-origin: center;
  z-index: 2;
  cursor: grab;
  pointer-events: auto;
}

.placed-tool:active {
  cursor: grabbing;
}

.placed-tool--dragging {
  opacity: 0.3;
}

.placed-tool .sensor-tool {
  width: 168px;
  min-height: 186px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.22));
}

.placed-tool--reading .sensor-tool {
  background: rgba(5, 19, 25, 0.62);
  border-color: color-mix(in srgb, var(--sensor-accent) 48%, rgba(255, 255, 255, 0.28));
}

.placed-tool--nitrate .sensor-tool {
  width: 132px;
  min-height: 158px;
  padding: 8px 8px 10px;
}

.placed-tool--nitrate .sensor-tool__caption {
  max-width: 120px;
}

.placed-tool--nitrate-open {
  transform: translate(-50%, -50%) scale(1);
}

.placed-tool--nitrate-open .sensor-tool {
  width: 212px;
  min-height: 204px;
}

.sensor-toolbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.sensor-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 202px;
  padding: 10px 8px 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.sensor-tool:active {
  cursor: grabbing;
}

.sensor-tool--dragging {
  opacity: 0.35;
}

.sensor-tool__object {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 144px;
}

.sensor-tool__screen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 52px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 22, 29, 0.72);
  color: #fff4dc;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.sensor-tool--has-reading .sensor-tool__screen {
  min-width: 78px;
  background: linear-gradient(180deg, #fff8dc, #f1d98c);
  color: #162329;
  box-shadow: 0 0 0 4px rgba(255, 243, 183, 0.12);
}

.sensor-tool__label {
  display: block;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sensor-tool__caption {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  max-width: 144px;
}

.sensor-tool__context {
  color: #d8edf1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-meter {
  position: relative;
  width: 168px;
  height: 150px;
}

.tool-meter__body {
  position: absolute;
  inset: 0 56px 6px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfbf7, #e7e4dc);
  border: 2px solid rgba(20, 26, 30, 0.72);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.tool-meter__display {
  position: absolute;
  top: 12px;
  left: 10px;
  right: 10px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(22, 28, 32, 0.8);
  background: linear-gradient(180deg, rgba(244, 250, 252, 0.95), rgba(228, 238, 241, 0.88));
  color: #102028;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-meter__dial {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 35%, #1f2326, #060708 72%);
}

.tool-meter__cable {
  position: absolute;
  top: 24px;
  right: 14px;
  width: 66px;
  height: 104px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 46px 58px 0;
  opacity: 0.9;
}

.tool-meter__probe {
  position: absolute;
  right: -2px;
  bottom: 24px;
  width: 58px;
  height: 8px;
  border-radius: 999px;
  transform: rotate(-11deg);
  transform-origin: right center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.18));
}

.tool-probe {
  position: relative;
  width: 168px;
  height: 108px;
}

.tool-probe__handle {
  position: absolute;
  left: 8px;
  top: 28px;
  width: 86px;
  height: 52px;
  border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sensor-accent) 18%, #f5f4ef), #e7e4dd);
  border: 2px solid rgba(32, 36, 40, 0.74);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.tool-probe__display {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 52px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(15, 26, 32, 0.82);
  color: #ecfafc;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tool-probe__button {
  position: absolute;
  right: 10px;
  top: 17px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #171b1f, #050607 74%);
}

.tool-probe__shaft {
  position: absolute;
  left: 90px;
  top: 50px;
  width: 58px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.14));
}

.tool-probe__tip {
  position: absolute;
  left: 145px;
  top: 46px;
  width: 16px;
  height: 16px;
  border-radius: 999px 999px 999px 4px;
  transform: rotate(45deg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sensor-accent) 60%, #fff), var(--sensor-accent));
}

.tool-pen {
  position: relative;
  width: 94px;
  height: 160px;
}

.tool-pen__body {
  position: absolute;
  left: 24px;
  top: 0;
  width: 46px;
  height: 124px;
  border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sensor-accent) 18%, #f5f3ee), #dedbd5);
  border: 2px solid rgba(28, 34, 38, 0.78);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.16);
}

.tool-pen__display {
  position: absolute;
  top: 16px;
  left: 5px;
  right: 5px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(16, 27, 34, 0.82);
  color: #f3fbfc;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tool-pen__buttons {
  position: absolute;
  top: 54px;
  left: 50%;
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
}

.tool-pen__buttons span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(18, 22, 26, 0.88);
}

.tool-pen__ring {
  position: absolute;
  left: 22px;
  top: 118px;
  width: 50px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.tool-pen__tip {
  position: absolute;
  left: 35px;
  bottom: 0;
  width: 24px;
  height: 42px;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background: linear-gradient(180deg, rgba(235, 241, 244, 0.92), rgba(187, 197, 203, 0.88));
}

.tool-tube {
  position: relative;
  width: 88px;
  height: 164px;
}

.tool-tube__cap {
  position: absolute;
  top: 0;
  left: 20px;
  width: 48px;
  height: 24px;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(180deg, #d0a94c, #8d6a21);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

.tool-tube__glass {
  position: absolute;
  top: 18px;
  left: 22px;
  width: 44px;
  height: 138px;
  overflow: hidden;
  border-radius: 18px 18px 24px 24px;
  border: 2px solid rgba(236, 247, 250, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(220, 238, 242, 0.12));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.tool-tube__label {
  position: absolute;
  top: 16px;
  left: 5px;
  right: 5px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 8px;
  background: rgba(16, 28, 35, 0.72);
  color: #f7fbfc;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-tube__liquid {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 58%;
  border-radius: 12px 12px 18px 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sensor-accent) 60%, #f8f2d6), var(--sensor-accent));
  opacity: 0.78;
}

.tool-tube__scale {
  position: absolute;
  right: 7px;
  top: 14px;
  bottom: 14px;
  width: 10px;
  opacity: 0.6;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.86),
    rgba(255, 255, 255, 0.86) 2px,
    transparent 2px,
    transparent 12px
  );
}

.tool-kit {
  position: relative;
  width: 188px;
  height: 164px;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  column-gap: 12px;
}

.tool-kit--placed.tool-kit--guide-hidden {
  width: 72px;
  height: 134px;
  grid-template-columns: 1fr;
}

.tool-kit__tester {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.tool-kit__strip-stick {
  width: 24px;
  height: 132px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6e2db, #ccc8c0);
  border: 1px solid rgba(28, 33, 37, 0.38);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 7px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
}

.tool-kit__strip-stick--sampled {
  background: linear-gradient(180deg, var(--strip-color, #d7df84), var(--strip-color, #d7df84));
}

.tool-kit__guide {
  height: 140px;
  overflow: hidden;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #faf7f1, #e0ddd6);
  border: 1px solid rgba(25, 31, 35, 0.24);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 4px;
}

.tool-kit__guide-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 5px;
  border-radius: 5px;
}

.tool-kit__guide-row--active {
  background: rgba(11, 21, 24, 0.16);
  outline: 1px solid rgba(18, 28, 32, 0.3);
}

.tool-kit__guide-swatch {
  display: inline-block;
  width: 20px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(20, 26, 30, 0.4);
}

.tool-kit__guide-range {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #2f271f;
}

.tool-kit__results-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff6e8;
  background: rgba(7, 24, 32, 0.74);
  white-space: nowrap;
}

.tool-kit__results-button:hover {
  background: rgba(23, 48, 58, 0.84);
}

.drag-tool-proxy {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.drag-tool-proxy .sensor-tool {
  width: 188px;
  min-height: 206px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.32));
}

body.tool-dragging {
  user-select: none;
  cursor: grabbing;
}

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

.sample-readout {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.sample-readout--done {
  border-style: solid;
  border-color: rgba(139, 224, 174, 0.4);
  background: rgba(91, 169, 109, 0.16);
}

.sample-readout__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8edf1;
}

.sample-readout__value {
  margin-top: 4px;
  color: #fff;
  font-weight: 700;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.summary-item__status {
  font-weight: 700;
  color: #f7d8a8;
}

.summary-item__status--done {
  color: #97e6b4;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 9, 0.68);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
}

.sample-modal__card {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(247, 240, 228, 0.98), rgba(242, 233, 214, 0.96));
  color: var(--ink);
  padding: 26px;
}

.site-sheet {
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #0c2d38;
  background-image:
    linear-gradient(180deg, rgba(6, 20, 27, 0.72), rgba(7, 24, 32, 0.82) 34%, rgba(10, 40, 50, 0.9)),
    var(--site-photo, linear-gradient(180deg, rgba(8, 30, 39, 0.96), rgba(16, 62, 77, 0.9)));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--shadow);
}

.site-sheet__credit {
  margin: 12px 0 0;
  color: rgba(245, 244, 238, 0.9);
  font-size: 0.92rem;
}

.site-sheet__credit a {
  color: #ffd59c;
  font-weight: 700;
  text-decoration: none;
}

.site-sheet__credit a:hover {
  text-decoration: underline;
}

.site-sheet__credit span {
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.data-chip {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(19, 43, 54, 0.08);
}

.data-chip__label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5d737a;
}

.data-chip__value {
  margin-top: 4px;
  font-weight: 700;
  font-size: 1.2rem;
}

.notebook {
  width: min(1320px, 100%);
  height: min(92vh, 920px);
  display: grid;
  grid-template-columns: 270px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: rgba(244, 236, 220, 0.98);
}

.notebook__sidebar {
  padding: 24px;
  background: linear-gradient(180deg, rgba(8, 30, 39, 0.96), rgba(16, 62, 77, 0.9));
}

.notebook__content {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.notebook__header {
  padding: 20px 26px;
  background: rgba(17, 50, 63, 0.95);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notebook__scroll {
  min-height: 0;
  overflow: auto;
  padding: 22px 26px 26px;
  color: var(--ink);
}

.tab-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.tab-button {
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-button--active {
  background: linear-gradient(135deg, rgba(223, 133, 65, 0.95), rgba(163, 67, 24, 0.95));
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(16, 35, 41, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.68);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(16, 35, 41, 0.08);
  text-align: left;
}

th {
  background: rgba(16, 35, 41, 0.06);
}

.journal-note-cell {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trend-card,
.observation-card,
.question-card,
.score-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 220px;
  margin-top: 14px;
}

.chart-column {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.chart-bar-shell {
  width: 58px;
  height: 128px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 6px;
  border-radius: 18px;
  background: rgba(16, 35, 41, 0.08);
}

.chart-bar {
  width: 100%;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, var(--bar-top, #5ab6c4), var(--bar-bottom, #215776));
}

.chart-label,
.chart-value {
  text-align: center;
  color: var(--ink);
}

.chart-label {
  font-size: 0.9rem;
}

.chart-value {
  font-weight: 700;
}

.assessment-shell,
.results-shell {
  padding-top: 20px;
}

.page--council-meeting {
  min-height: 100vh;
  overflow: auto;
  isolation: isolate;
  background-color: #172723;
  background-image:
    linear-gradient(180deg, rgba(6, 16, 18, 0.38), rgba(5, 14, 16, 0.78)),
    var(--town-hall-photo);
  background-position: center;
  background-size: cover;
}

.page--council-meeting::after {
  display: none;
}

.page--council-meeting .assessment-shell {
  position: relative;
  z-index: 2;
  padding-top: 170px;
}

.page--council-meeting .assessment-topbar {
  align-items: flex-start;
}

.page--council-meeting .assessment-topbar > div:first-child {
  max-width: 680px;
}

.page--council-meeting .topbar__meta {
  justify-content: flex-end;
}

.council-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: grid;
  align-items: start;
  justify-items: center;
  padding-top: 18px;
}

.council-dais {
  position: relative;
  width: min(1080px, 86vw);
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  padding: 34px 34px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(72, 55, 42, 0.78), rgba(36, 27, 22, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18% 82%, rgba(0, 0, 0, 0.16));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  opacity: 0.9;
}

.council-dais::before {
  content: "Mill Creek City Council";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(5, 17, 23, 0.78);
  color: #f5d7a6;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.council-member {
  width: clamp(68px, 8vw, 96px);
  display: grid;
  justify-items: center;
  gap: 0;
  color: rgba(255, 246, 226, 0.88);
  font-size: clamp(0.62rem, 1vw, 0.78rem);
  font-weight: 800;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.council-member__head {
  width: clamp(24px, 2.7vw, 34px);
  height: clamp(24px, 2.7vw, 34px);
  border-radius: 999px;
  background: linear-gradient(180deg, #dfba8b, #8a6045);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.32);
}

.council-member__body {
  width: clamp(46px, 5vw, 66px);
  height: clamp(42px, 4.8vw, 58px);
  margin-top: -2px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #214d5b, #10262f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 20px rgba(0, 0, 0, 0.28);
}

.council-member:nth-child(2n) .council-member__body {
  background: linear-gradient(180deg, #4b6240, #1d2f24);
}

.council-member:nth-child(3n) .council-member__body {
  background: linear-gradient(180deg, #69443d, #2f201f);
}

.council-member span {
  margin-top: 8px;
}

.assessment-card,
.results-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(8, 30, 39, 0.9), rgba(16, 55, 68, 0.84));
}

.page--council-meeting .assessment-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 30, 39, 0.58), rgba(10, 36, 45, 0.68));
  backdrop-filter: blur(2px);
}

.assessment-body,
.results-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.assessment-body--single {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.council-meeting-card {
  display: grid;
  gap: 16px;
}

.council-question-intro {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 24, 32, 0.74);
  backdrop-filter: blur(2px);
}

.council-question-intro p {
  margin: 0;
}

.council-question-intro p + p {
  margin-top: 6px;
  color: var(--muted);
}

.council-meeting-card__controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.question-card {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.answer-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.answer-button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.answer-button--selected {
  background: linear-gradient(135deg, rgba(223, 133, 65, 0.95), rgba(163, 67, 24, 0.95));
}

.question-badge,
.claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.question-badge {
  background: rgba(255, 255, 255, 0.08);
}

.claim-badge {
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  color: #fff;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.claim-badge--healthy {
  background: linear-gradient(135deg, #3d9364, #25553b);
}

.claim-badge--stressed {
  background: linear-gradient(135deg, #d67730, #8f431b);
}

.claim-badge--unhealthy {
  background: linear-gradient(135deg, #b54937, #6f281e);
}

.score-grid,
.results-grid {
  margin-top: 14px;
}

.score-card {
  color: var(--ink);
}

.score-card__value {
  font-size: 2rem;
  margin: 0;
}

.review-line {
  padding: 14px 0;
  border-top: 1px solid rgba(16, 35, 41, 0.08);
}

.empty-state,
.locked-state {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.loading,
.error-state {
  max-width: 720px;
  margin: 10vh auto 0;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(7, 24, 32, 0.84);
  box-shadow: var(--shadow);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1160px) {
  .workspace,
  .name-entry-shell,
  .briefing-shell {
    grid-template-columns: 1fr;
  }

  .map-stage__header {
    flex-direction: column;
    align-items: stretch;
  }

  .notebook {
    grid-template-columns: 1fr;
    height: min(92vh, 980px);
  }

  .notebook__sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-scene {
    height: min(94vh, 980px);
  }

}

@media (max-width: 760px) {
  .page {
    padding: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .site-button-row,
  .sample-grid,
  .sample-readout-grid,
  .metric-grid,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .site-scene {
    height: min(96vh, 980px);
    grid-template-columns: 1fr;
  }

  .site-transition {
    min-height: min(86vh, 760px);
    padding: 18px;
  }

  .page--council-meeting .assessment-shell {
    padding-top: 138px;
  }

  .council-backdrop {
    padding-top: 12px;
  }

  .council-dais {
    width: min(760px, 92vw);
    min-height: 112px;
    gap: 8px;
    padding: 22px 16px 20px;
  }

  .council-member {
    width: min(72px, 12vw);
    font-size: 0.62rem;
  }

  .council-member:nth-child(n + 6) {
    display: none;
  }

  .town-hall-scene {
    min-height: min(86vh, 760px);
    padding: 18px;
  }

  .town-hall-scene__actions {
    top: 12px;
    right: 12px;
  }

  .town-hall-chat {
    padding: 18px;
  }

  .site-transition__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .river-hotspot {
    transform: translate(-50%, -50%) scale(0.94);
    transform-origin: center;
  }

  .observation-target {
    transform: translate(-50%, -50%) scale(0.92);
    transform-origin: center;
    max-width: 170px;
    padding: 9px 10px;
    font-size: 0.88rem;
  }

  .site-scene__controls {
    top: 14px;
    left: 14px;
    right: 14px;
  }

  .site-time-toggle {
    top: 64px;
    right: 14px;
    left: 14px;
    max-width: none;
    justify-content: flex-start;
  }

  .site-scene__controls-left {
    gap: 8px;
    max-width: calc(100% - 72px);
  }

  .site-journal-panel {
    top: 74px;
    left: 14px;
    width: min(460px, calc(100% - 28px));
    height: min(640px, calc(100% - 88px));
    max-width: calc(100% - 28px);
    max-height: calc(100% - 88px);
  }

  .site-observation-panel {
    top: 110px;
    left: 14px;
    width: calc(100% - 28px);
    max-height: min(40vh, 360px);
  }

  .species-book {
    top: 110px;
    left: 14px;
    width: min(920px, calc(100% - 28px));
    height: min(760px, calc(100% - 124px));
    min-width: min(520px, calc(100% - 28px));
    min-height: 360px;
  }

  .species-book__pages {
    grid-template-columns: 1fr;
  }

  .species-book__spine {
    display: none;
  }

  .species-book__page--left,
  .species-book__page--right {
    border: 0;
    padding: 14px 12px;
  }

  .species-book__page--right {
    display: none;
  }

  .species-book__image {
    max-height: min(14vh, 88px);
  }

  .species-book__footer {
    flex-wrap: wrap;
    padding-right: 52px;
  }

  .species-book__footer-left {
    width: 100%;
    justify-content: space-between;
  }

  .species-book__resize-handle {
    right: 8px;
    bottom: 8px;
  }

  .site-journal-panel__paper {
    padding: 14px 12px 12px 26px;
    background-position: 18px 0, 0 84px, 0 0;
  }

  .site-journal-panel__textarea {
    min-height: 122px;
    font-size: 1.45rem;
  }

  .site-journal-panel__fields {
    grid-template-columns: 1fr;
  }

  .toolbox-overlay {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(46vh, 460px);
    min-height: 260px;
    padding: 0;
  }

  .toolbox-overlay__card {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    height: 100%;
  }

  .map-stage__canvas .stream-map {
    height: clamp(330px, calc(100vh - 230px), 560px);
  }

  .map-stage__hud {
    position: static;
    width: auto;
    margin: 0 18px 18px;
  }

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

  .button-row {
    grid-template-columns: 1fr;
  }
}
