:root {
  color-scheme: light;
  --ink: #1d2a25;
  --muted: #66746d;
  --paper: rgba(255, 252, 241, 0.92);
  --paper-solid: #fffaf0;
  --line: rgba(37, 61, 52, 0.18);
  --leaf: #2f7d52;
  --leaf-dark: #1f5f48;
  --sky: #bde9ee;
  --accent: #d9573c;
  --gold: #f4b942;
  --shadow: 0 16px 40px rgba(25, 43, 35, 0.22);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #9dd6d7;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(#bfeef3, #e8f2d3 55%, #9ccc86);
}

#forestCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: none;
  touch-action: none;
}

.top-bar,
.lens-panel,
.journal,
.photo-review,
.quiz-panel,
.controls {
  position: absolute;
  z-index: 3;
}

.top-bar {
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.brand,
.stats,
.lens-panel,
.journal,
.photo-review,
.quiz-panel,
.zoom-control,
.next-level-button {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fffbdf 0 26%, transparent 28%),
    conic-gradient(from 15deg, #273b32, #4f8c5b, #f4b942, #d9573c, #273b32);
}

.brand h1,
.lens-panel h2,
.journal h2,
.photo-review h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 1.15rem;
  line-height: 1.1;
}

.brand p,
.lens-panel p,
.photo-review p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stats {
  display: flex;
  min-width: 430px;
  border-radius: var(--radius);
  overflow: hidden;
}

.stats div {
  min-width: 86px;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.stats div:first-child {
  border-left: 0;
}

.stats span {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.stats .player-stat span {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.73rem;
  text-transform: uppercase;
}

.lens-panel {
  left: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 32px));
  min-height: 132px;
  padding: 14px 48px 14px 14px;
  border-radius: var(--radius);
  pointer-events: none;
}

.draggable-panel {
  user-select: none;
}

.draggable-panel.is-moved {
  right: auto;
  bottom: auto;
}

.panel-drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.88);
  color: var(--leaf-dark);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 6px 16px rgba(25, 43, 35, 0.12);
}

.panel-drag-handle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.panel-drag-handle:hover {
  background: rgba(244, 185, 66, 0.22);
}

.panel-close-button {
  position: absolute;
  top: 44px;
  right: 8px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.88);
  color: var(--leaf-dark);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: auto;
  box-shadow: 0 6px 16px rgba(25, 43, 35, 0.12);
}

.panel-close-button:hover {
  background: rgba(244, 185, 66, 0.22);
}

.panel-drag-handle:active,
.draggable-panel.is-dragging .panel-drag-handle {
  cursor: grabbing;
  transform: none;
}

.focus-meter {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(38, 61, 52, 0.14);
}

.focus-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55a868, var(--gold), var(--accent));
  transition: width 120ms ease;
}

.eyebrow {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lens-panel h2 {
  margin-top: 7px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.lens-panel p:last-child {
  min-height: 42px;
  font-size: 0.94rem;
  line-height: 1.4;
}

.journal {
  top: 96px;
  right: 16px;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 210px);
  padding: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    width 220ms ease,
    max-height 220ms ease,
    transform 220ms ease;
}

.journal.is-collapsed {
  width: min(232px, calc(100vw - 32px));
  max-height: 68px;
}

.journal.is-collapsed .species-grid {
  display: none;
}

.journal.is-collapsed .journal-head {
  margin-bottom: 0;
}

.journal:not(.is-collapsed) #journalToggle svg {
  transform: rotate(180deg);
}

.journal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.journal-head h2 {
  margin-top: 2px;
  font-size: 1.05rem;
}

.species-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: calc(100vh - 300px);
  overflow: auto;
  padding-right: 4px;
}

.species-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.species-card:hover {
  border-color: rgba(31, 95, 72, 0.28);
  background: rgba(255, 250, 240, 0.82);
}

.species-card:focus-visible {
  outline: 3px solid rgba(217, 87, 60, 0.38);
  outline-offset: 2px;
}

.species-card:active {
  transform: translateY(1px);
}

.species-card.is-locked {
  color: #68716c;
}

.species-thumb {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(160deg, rgba(47, 125, 82, 0.18), rgba(244, 185, 66, 0.18));
}

.species-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bird-icon {
  width: 34px;
  height: 26px;
  border-radius: 50% 45% 52% 48%;
  background: #718079;
  box-shadow:
    12px -5px 0 -4px rgba(255, 255, 255, 0.85),
    17px -4px 0 -6px #1d2a25;
  opacity: 0.42;
}

.species-card.is-captured .bird-icon {
  opacity: 1;
}

.species-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.species-note {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quality-badge {
  min-width: 42px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(47, 125, 82, 0.12);
  color: var(--leaf-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.entry-button {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: 999px;
  background: rgba(47, 125, 82, 0.12);
  color: var(--leaf-dark);
  cursor: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.entry-button:hover {
  background: rgba(244, 185, 66, 0.22);
}

.photo-review {
  left: 50%;
  bottom: 104px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  width: min(430px, calc(100vw - 32px));
  min-height: 116px;
  padding: 10px 42px 10px 10px;
  border-radius: var(--radius);
  pointer-events: none;
  transform: translateX(-50%);
  animation: review-in 260ms ease both;
}

.photo-review.is-moved {
  animation-name: review-fade-in;
  transform: none;
}

.photo-review img {
  width: 96px;
  height: 96px;
  border: 4px solid var(--paper-solid);
  border-radius: 6px;
  object-fit: cover;
  background: #dfead1;
}

.photo-review h2 {
  margin-top: 5px;
  font-size: 1rem;
}

.photo-review p:last-child {
  font-size: 0.86rem;
  line-height: 1.35;
}

.intro-panel {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 36, 31, 0.28);
  pointer-events: auto;
}

.intro-card {
  width: min(480px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intro-card h2 {
  margin: 3px 0 8px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.intro-card p,
.intro-card li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.intro-card p {
  margin: 0;
}

.intro-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.intro-field input {
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(31, 95, 72, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-transform: none;
}

.intro-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.intro-card li + li {
  margin-top: 5px;
}

.intro-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.intro-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.intro-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.intro-leaderboard {
  margin-top: 14px;
}

.player-list {
  display: grid;
  gap: 7px;
  max-height: 124px;
  overflow: auto;
}

.player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.player-card:hover,
.player-card.is-active {
  border-color: rgba(217, 87, 60, 0.52);
  background: rgba(255, 250, 240, 0.86);
}

.player-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card span,
.player-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.quiz-panel {
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius);
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.quiz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.quiz-head h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.quiz-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-progress {
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(47, 125, 82, 0.12);
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.quiz-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.86);
  color: var(--leaf-dark);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.quiz-close-button:hover {
  background: rgba(244, 185, 66, 0.22);
}

.quiz-status {
  min-height: 24px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.quiz-preview {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.quiz-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 4px solid var(--paper-solid);
  border-radius: 7px;
  object-fit: cover;
  background: #dfead1;
}

.quiz-board {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
}

.quiz-column-label {
  margin: 0 0 7px;
  color: var(--leaf-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quiz-list {
  display: grid;
  gap: 8px;
}

.quiz-photo-card,
.quiz-name-card,
.quiz-action-button,
.quiz-primary-button {
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.quiz-photo-card,
.quiz-name-card {
  min-height: 92px;
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quiz-photo-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.quiz-photo-card img {
  width: 132px;
  height: 92px;
  border: 3px solid var(--paper-solid);
  border-radius: 6px;
  object-fit: cover;
  background: #dfead1;
}

.quiz-name-card {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
}

.quiz-card-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.15;
}

.quiz-card-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.quiz-photo-card:hover,
.quiz-name-card:hover,
.quiz-photo-card.is-selected,
.quiz-name-card.is-ready {
  border-color: rgba(217, 87, 60, 0.52);
  background: rgba(255, 250, 240, 0.86);
}

.quiz-photo-card.is-selected {
  box-shadow: 0 0 0 3px rgba(217, 87, 60, 0.18);
}

.quiz-photo-card.is-clue,
.quiz-name-card.is-clue {
  border-color: rgba(244, 185, 66, 0.82);
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.22);
}

.quiz-photo-card.is-matched,
.quiz-name-card.is-matched {
  border-color: rgba(47, 125, 82, 0.42);
  background: rgba(47, 125, 82, 0.1);
  cursor: default;
}

.quiz-photo-card:disabled,
.quiz-name-card:disabled {
  color: var(--ink);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.quiz-action-button,
.quiz-primary-button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
}

.quiz-action-button {
  background: rgba(255, 250, 240, 0.86);
  color: var(--leaf-dark);
}

.quiz-primary-button {
  background: var(--leaf-dark);
  color: var(--paper-solid);
}

.quiz-action-button:hover {
  background: rgba(244, 185, 66, 0.22);
}

.quiz-primary-button:hover {
  background: var(--leaf);
}

.reticle {
  position: absolute;
  z-index: 2;
  width: 94px;
  height: 94px;
  margin: -47px 0 0 -47px;
  border: 2px solid rgba(255, 252, 241, 0.9);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(24, 46, 37, 0.42),
    0 0 0 999px rgba(14, 31, 27, 0.08);
  pointer-events: none;
}

.reticle::before,
.reticle::after,
.reticle span::before,
.reticle span::after {
  position: absolute;
  display: block;
  background: rgba(255, 252, 241, 0.96);
  content: "";
}

.reticle::before {
  top: 50%;
  left: 10px;
  right: 10px;
  height: 2px;
}

.reticle::after {
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 2px;
}

.reticle span::before {
  top: 45px;
  left: 45px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.reticle span::after {
  right: 12px;
  bottom: 12px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 252, 241, 0.96);
  border-bottom: 2px solid rgba(255, 252, 241, 0.96);
  background: transparent;
}

.reticle.is-locked {
  border-color: #fff2b3;
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: rgba(255, 255, 255, 0);
}

.flash.is-active {
  animation: camera-flash 240ms ease-out;
}

.controls {
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  min-width: 284px;
  padding: 0 10px;
  border-radius: var(--radius);
}

.zoom-control span {
  color: var(--leaf-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.zoom-step {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(31, 95, 72, 0.2);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.84);
  color: var(--leaf-dark);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.zoom-step:hover {
  background: rgba(244, 185, 66, 0.22);
}

.zoom-control input {
  width: 104px;
  accent-color: var(--accent);
}

.zoom-control output {
  min-width: 34px;
  color: var(--leaf-dark);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: right;
}

.icon-button,
.next-level-button {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.next-level-button {
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(31, 95, 72, 0.18);
  border-radius: var(--radius);
  color: var(--leaf-dark);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.next-level-button:hover {
  background: rgba(244, 185, 66, 0.22);
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-solid);
  box-shadow: 0 8px 20px rgba(25, 43, 35, 0.14);
}

.icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(217, 87, 60, 0.42);
  outline-offset: 3px;
}

button:active {
  transform: translateY(1px);
}

@keyframes camera-flash {
  0% {
    background: rgba(255, 255, 255, 0);
  }
  35% {
    background: rgba(255, 255, 255, 0.9);
  }
  100% {
    background: rgba(255, 255, 255, 0);
  }
}

@keyframes review-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes review-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 820px) {
  .game-shell {
    min-height: 720px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .brand {
    max-width: none;
  }

  .stats {
    width: 100%;
    min-width: 0;
  }

  .stats div {
    flex: 1;
    min-width: 0;
  }

  .journal {
    top: auto;
    right: 12px;
    bottom: 88px;
    left: 12px;
    width: auto;
    max-height: 238px;
  }

  .journal.is-collapsed {
    width: auto;
    max-height: 62px;
  }

  .species-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 160px;
  }

  .species-card {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 62px;
  }

  .species-thumb {
    width: 42px;
    height: 42px;
  }

  .quality-badge,
  .entry-button {
    grid-column: 2;
    justify-self: start;
    margin-top: -4px;
  }

  .lens-panel {
    bottom: 158px;
  }

  .photo-review {
    bottom: 294px;
  }

  .quiz-panel {
    top: 52%;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
  }

  .quiz-preview {
    grid-template-columns: 1fr;
  }

  .quiz-board {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .game-shell {
    min-height: 680px;
  }

  .top-bar {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .brand {
    padding: 9px 10px;
  }

  .brand-mark {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand p {
    font-size: 0.82rem;
  }

  .stats span {
    font-size: 1rem;
  }

  .stats small {
    font-size: 0.64rem;
  }

  .lens-panel {
    left: 10px;
    bottom: 148px;
    width: calc(100vw - 20px);
    min-height: 116px;
    padding: 12px;
  }

  .lens-panel h2 {
    font-size: 1rem;
  }

  .lens-panel p:last-child {
    min-height: 34px;
    font-size: 0.82rem;
  }

  .journal {
    right: 10px;
    bottom: 82px;
    left: 10px;
    padding: 10px;
  }

  .journal-head {
    margin-bottom: 8px;
  }

  .species-grid {
    gap: 6px;
  }

  .species-card {
    padding: 6px;
  }

  .species-name {
    font-size: 0.78rem;
  }

  .species-note {
    font-size: 0.7rem;
  }

  .photo-review {
    grid-template-columns: 72px minmax(0, 1fr);
    bottom: 278px;
    width: calc(100vw - 20px);
  }

  .photo-review img {
    width: 72px;
    height: 72px;
  }

  .quiz-panel {
    width: calc(100vw - 20px);
    padding: 12px;
  }

  .quiz-head {
    gap: 10px;
  }

  .quiz-head h2 {
    font-size: 1rem;
  }

  .quiz-actions {
    justify-content: stretch;
  }

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

  .quiz-action-button,
  .quiz-primary-button {
    flex: 1 1 116px;
  }

  .quiz-photo-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .quiz-photo-card img {
    width: 104px;
    height: 76px;
  }

  .zoom-control {
    min-width: 246px;
    height: 44px;
    gap: 6px;
  }

  .zoom-control input {
    width: 70px;
  }

  .zoom-control output {
    min-width: 30px;
    font-size: 0.72rem;
  }

  .zoom-step {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  .next-level-button {
    height: 40px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .reticle {
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
  }
}
