* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  background: #14161a;
  color: #eee;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (max-width: 800px) {
  .gameHeader {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 0;
    right: 0;
    z-index: 1000;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    height: auto;
    padding: 0 12px;

    background: transparent;
    border: none;
    pointer-events: none;
  }

  .gameHeader > * {
    pointer-events: auto;
  }

  .gameHeader .exitBtn {
    justify-self: start;
  }

  .gameHeader .hudStats {
    justify-self: center;
  }

  .gameHeader .pageLinks {
    justify-self: end;
  }

  .gameHeader .exitBtn,
  .gameHeader .headerHelp {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(25, 28, 34, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
  }

  .gameHeader .hudStats {
    background: rgba(25, 28, 34, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 8px 14px;
    color: white;
  }
}
button,
input,
select,
textarea {
  font-family: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6,
.allCollectionModeTitle,
.collectionCardTitle {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.allCollectionModeTitle,
.collectionCardTitle {
  font-weight: 600;
}
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: transparent;
  font-weight: 600;
}
header .exitBtn {
  justify-self: start;
}
header .pageLinks {
  justify-self: end;
}
.hudStats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.hudPill {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  white-space: nowrap;
}
.exitBtn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.exitBtn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.headerHelp {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.headerHelp:hover {
  background: rgba(255, 255, 255, 0.16);
}
#game {
  flex: 1;
  display: flex;
  min-height: 0;
}
.mobileDivider {
  display: none;
}
#photoPane {
  flex: 1.2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

#photoViewport {
  width: 100%;
  height: 100%;
  padding: 0px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#photoViewport.dragging {
  cursor: grabbing;
}
#photoViewport.dragging img {
  transition: none;
}
#photoPane img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  will-change: transform;
  -webkit-user-drag: none;
}
#zoomResetBtn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  opacity: 0.9;
}
.photoZoomControls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
}
.photoZoomControls button {
  width: auto;
  min-width: 40px;
  padding: 8px 10px;
  border: 1px solid #596575;
  background: rgba(29, 32, 38, 0.92);
  font-size: 0.875rem;
}
#photoMsg {
  padding: 20px;
  text-align: center;
  color: #aaa;
}
#side {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#game.game--dateOnly {
  flex-direction: column;
}
#game.game--dateOnly #photoPane {
  flex: 1 1 0;
  min-height: 0;
}
#game.game--dateOnly #gameDivider,
#game.game--dateOnly #map {
  display: none;
}
#game.game--dateOnly #side {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 65%;
  background: #1d2026;
}
#game.game--dateOnly :is(#controls, #result) {
  flex: 0 1 auto;
  width: min(100%, 600px);
  min-height: 0;
  margin: 0 auto;
  overflow-y: auto;
}
#game.game--dateOnly #dateLocationHint {
  text-align: center;
}
#mapLegend {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  gap: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.78);
  color: #eee;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
#mapLegend[hidden] {
  display: none;
}
.legendDot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legendGuess {
  background: #3b82f6;
}
.legendAnswer {
  background: #22c55e;
  border-radius: 1px;
  transform: rotate(45deg);
}
.mapMarker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.mapMarker::before {
  box-sizing: border-box;
  content: "";
  display: block;
  border: 3px solid #fff;
  background: #3b82f6;
}
.mapMarker--guess::before,
.mapMarker--rival::before {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.mapMarker--answer::before {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #22c55e;
  transform: rotate(45deg);
}
.mapMarker--rival::before {
  background: #a855f7;
}
#map {
  flex: 1;
  min-height: 200px;
}
#mapErrorNotice {
  margin: 0;
  padding: 8px 12px;
  background: #422006;
  color: #fde68a;
  font-size: 0.8125rem;
}
.maplibregl-ctrl-attrib a {
  color: #2563eb;
}
#controls {
  padding: 12px 16px;
  background: #1d2026;
}
#dateLocationHint {
  margin: 0 0 10px;
  color: #ffe08a;
  font-weight: 600;
}
#controls label {
  display: block;
  font-size: 0.875rem;
}
.yearRow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 4px;
}
#yearLabel {
  min-width: 4ch;
  font-family: "Fredoka", sans-serif;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}
.stepBtn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.375rem;
  line-height: 1;
  touch-action: manipulation;
}
.stepBtn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.stepBtn:active {
  transform: scale(0.94);
}
#year {
  width: 100%;
  margin: 8px 0 0;
}
.yearTicks {
  height: 6px;
  margin: 0 8px;
  border-right: 1px solid #6b7280;
  background-image: linear-gradient(to right, #6b7280 1px, transparent 1px);
  background-size: calc(100% / var(--tick-intervals, 1)) 100%;
}
.yearRange {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: #9aa4b2;
  font-size: 0.75rem;
}
button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button:disabled {
  background: #444;
  cursor: not-allowed;
}
#guessBtn {
  margin-top: 8px;
  border-bottom: 4px solid #15803d;
  border-radius: 10px;
  background: #22c55e;
  transition:
    transform 0.08s ease,
    border-bottom-width 0.08s ease;
}
#guessBtn:hover:not(:disabled) {
  background: #4ade80;
}
#guessBtn:active:not(:disabled) {
  border-bottom-width: 2px;
  transform: translateY(2px);
}
#guessBtn:disabled {
  border-bottom-color: #2b2b2b;
  background: #444;
}
#guessBtn.needsPin:disabled {
  border: 2px dashed #5b6573;
  background: transparent;
  color: #9aa4b2;
  font-weight: 500;
}
#guessBtn.needsPin::before {
  content: "📍 ";
}
#result {
  padding: 12px 16px;
  background: #1d2026;
  display: none;
}
#result h3 {
  margin: 0 0 6px;
}
#result p {
  margin: 4px 0;
}
#scoreCards {
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.statCard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.statMain {
  font-family: "Fredoka", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
}
.statPts {
  flex: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}
#roundTotalBanner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 600;
}
#roundTotalBanner .totalBar {
  flex: 1;
  min-width: 24px;
  margin-top: 0;
}
#resTotal {
  color: #fde68a;
  font-family: "Fredoka", sans-serif;
  font-size: 1.125rem;
  white-space: nowrap;
}
.totalBar {
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
}
#resTotalFill,
#collectionCompleteFill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #facc15, #22c55e);
  transition: width 0.6s ease;
}
#nextBtn {
  border-bottom: 4px solid #1d4ed8;
  border-radius: 10px;
}
#nextBtn:active {
  border-bottom-width: 2px;
  transform: translateY(2px);
}
#info {
  max-height: 28vh;
  overflow-y: auto;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #333;
  font-size: 0.875rem;
}
#info:empty,
#info.empty {
  display: none;
}
#resPlace {
  color: #ffe08a;
  font-weight: 600;
}
#resFacts {
  margin: 4px 0;
  padding-left: 18px;
  color: #ccc;
}
#resCredit {
  font-size: 0.75rem;
  color: #888;
}
#resCredit a {
  color: #7dd3fc;
}
.big {
  font-size: 1.375rem;
  font-weight: 700;
  color: #7dd3fc;
}
#collectionChooser {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: #f8f6f0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 3000;
  padding: 0;
}
#playStart {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: #f8f6f0;
  color: #14161a;
  z-index: 3000;
}
#playStartPanel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
html[data-theme="dark"] #playStart {
  background: #14161a;
  color: #eee;
}
#collectionPanel {
  width: min(980px, 100%);
  min-height: 100dvh;
  margin: 0;
  background: transparent;
  border-radius: 0;
  padding: 22px;
  border: 0;
}
#collectionPanel h2 {
  margin: 0 0 8px;
}
#collectionPanel p {
  margin: 0 0 18px;
  color: #c4ced9;
}
#progressSummary,
#challengeNotice {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #354354;
  border-radius: 8px;
  background: #12171d;
  color: #c4ced9;
  font-size: 0.875rem;
}
#progressSummary strong,
#challengeNotice strong {
  color: #fff;
}
#matchInvitePanel {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #354354;
  border-radius: 8px;
  background: #12171d;
  color: #c4ced9;
  font-size: 0.875rem;
}
#matchInvitePanel p {
  margin: 0 0 8px;
}
.accountButton,
#logoutButton,
#acceptMatchButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #42627c;
  border-radius: 7px;
  background: #1d3448;
  color: #e8f4ff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.accountButton[hidden],
#logoutButton[hidden],
#acceptMatchButton[hidden] {
  display: none;
}
.accountButton:hover,
#logoutButton:hover,
#acceptMatchButton:hover {
  background: #274a65;
}
#authError {
  margin-top: 8px !important;
  color: #fca5a5 !important;
}
#matchInvitePanel h3 {
  margin: 0 0 8px;
}
#matchInvitePanel input {
  width: 100%;
  margin-top: 8px;
}
#matchHistory {
  margin-top: 12px;
}
#matchHistoryList {
  margin: 0;
  padding-left: 20px;
}
#matchHistoryList li {
  margin-bottom: 12px;
}
#matchHistoryComparison:not([hidden]) {
  margin-top: 12px;
}
.matchComparisonRounds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.matchComparisonRound {
  padding: 10px;
  border: 1px solid #344957;
  border-radius: 8px;
  background: #111c24;
}
.matchComparisonRound h3,
.matchComparisonRound p {
  margin: 0;
}
.matchComparisonRound h3 {
  color: #70d2ea;
  font-size: 0.875rem;
}
.matchComparisonRoundTitle,
.matchComparisonAnswer {
  margin-top: 4px !important;
}
#recentGames {
  margin: 8px 0 0;
  padding-left: 20px;
}
#demoNotice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid #f59e0b;
  background: #241e12;
  color: #fcd98a;
  font-size: 0.8125rem;
}
#howToPlayDialog {
  position: relative;
  width: min(560px, calc(100% - 32px));
  max-height: min(80vh, 640px);
  overflow: auto;
  margin: auto;
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: #f8f6f0;
  color: #172f46;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}
#howToPlayDialog::backdrop {
  background: rgba(10, 22, 38, 0.62);
}
#howToPlayDialog h2 {
  margin: 0 36px 10px 0;
  color: #173a56;
  font-size: 1.5rem;
}
#howToPlayDialog p,
#howToPlayDialog li {
  color: #526579;
  line-height: 1.55;
}
#howToPlayDialog ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
#howToPlayDialog li + li {
  margin-top: 8px;
}
.howToPlayClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #526579;
  font-size: 1.5rem;
  line-height: 1;
}
.howToPlayClose:hover {
  background: #e7e4db;
  color: #172f46;
}
html[data-theme="dark"] #howToPlayDialog {
  border-color: #344658;
  background: #131d28;
  color: #e7edf3;
}
html[data-theme="dark"] #howToPlayDialog h2 {
  color: #e7edf3;
}
html[data-theme="dark"] #howToPlayDialog p,
html[data-theme="dark"] #howToPlayDialog li {
  color: #aab9c7;
}
html[data-theme="dark"] .howToPlayClose {
  color: #d6e0e8;
}
html[data-theme="dark"] .howToPlayClose:hover {
  background: #213545;
  color: #fff;
}
#turnstileDialog {
  width: min(440px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid #3b4652;
  border-radius: 12px;
  background: #1d2026;
  color: #eee;
}
#turnstileDialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
#turnstileDialog h2 {
  margin: 0 0 8px;
}
#turnstileDialog p {
  color: #c4ced9;
}
#turnstileWidget {
  min-height: 65px;
  margin: 0 0 8px;
}
#turnstileError {
  min-height: 1.4em;
  margin: 0 0 12px;
  color: #fcd98a;
  font-size: 0.8125rem;
}
#progressNotice {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: #fcd98a;
  font-size: 0.8125rem;
}
#allCollectionModes {
  margin: 0 0 20px;
}
#allCollectionModes h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}
#allCollectionModeButtons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.allCollectionModeButton {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid #3b4652;
  background: #12171d;
  text-align: left;
}
.allCollectionModeButton:hover {
  border-color: #60a5fa;
  background: #26364a;
}
.allCollectionModeButton:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.allCollectionModeTitle {
  font-size: 1.25rem;
}
.allCollectionModeDescription {
  color: #c4ced9;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
}
.allCollectionModeBest {
  margin-top: auto;
  color: #fcd98a;
  font-size: 0.75rem;
}
.collectionHeading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.aboutLink {
  color: #7dd3fc;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.aboutLink:hover {
  color: #bae6fd;
}
button.aboutLink {
  width: auto;
  padding: 0;
  background: transparent;
}
button.aboutLink:hover {
  background: transparent;
}
.pageLinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
#authError {
  margin: 0;
  color: #fca5a5;
  font-size: 0.8125rem;
}
#authError[hidden] {
  display: none;
}
#collectionSearch {
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #3b4652;
  border-radius: 8px;
  background: #12171d;
  color: #eee;
  font: inherit;
}
#collectionSearch:focus-visible,
.tagFilter:focus-visible,
.collectionCard:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
#gameModeFilters,
#tagFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tagFilter {
  width: auto;
  padding: 6px 10px;
  border: 1px solid #3b4652;
  border-radius: 999px;
  background: #12171d;
  color: #c4ced9;
  font-size: 0.8125rem;
  font-weight: 500;
}
.tagFilter:hover,
.tagFilter.active {
  border-color: #60a5fa;
  background: #26364a;
  color: #fff;
}
#collectionList {
  display: grid;
  gap: 24px;
}
.collectionGroup {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.collectionGroup h4 {
  margin: 0 0 12px;
  color: #c4ced9;
  font-size: 1rem;
}
.collectionGroupCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.collectionCard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1px solid #2f3741;
  border-top: 3px solid var(--collection-color);
  border-radius: 12px;
  background: #12171d;
  color: inherit;
  font: inherit;
  text-align: left;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.collectionCard:hover {
  transform: translateY(-2px);
  border-color: var(--collection-color);
}
.collectionCard.selected {
  box-shadow: 0 0 0 2px var(--collection-color);
}
.collectionCardTitle {
  font-size: 1.125rem;
  font-weight: 600;
}
.collectionCard .meta {
  color: #8ca0b8;
  font-size: 0.75rem;
}
.collectionCard .bestScore {
  margin-top: auto;
  color: #fcd98a;
  font-size: 0.8125rem;
  font-weight: 600;
}
.collectionCard .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.collectionTag {
  color: var(--collection-color);
  font-size: 0.75rem;
  font-weight: 600;
}
#noCollections {
  margin: 8px 0;
  color: #c4ced9;
}
.collectionCard ul {
  margin: 0;
  padding-left: 18px;
  color: #dfe8f2;
}
#final {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
#final div.box {
  background: #1d2026;
  padding: 28px;
  border-radius: 10px;
  max-width: 760px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}
#final h2,
#final .big,
.reviewRound h3 {
  font-weight: 500;
  letter-spacing: 0.01em;
}
#earnedTrophies {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #12171d;
  text-align: left;
}
#earnedTrophies h3 {
  margin: 0 0 6px;
}
#earnedTrophies ul {
  margin: 0;
  padding-left: 22px;
  color: #fcd98a;
}
#challengeResult {
  color: #bae6fd;
}
#shareLink {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #3b4652;
  border-radius: 6px;
  background: #12171d;
  color: #eee;
}
#roundReview {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  text-align: left;
}
#reviewSortButton {
  width: auto;
  margin: 0 0 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
}
.reviewRound {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid #354354;
  border-radius: 8px;
  background: #12171d;
  cursor: pointer;
}
.reviewRound:hover {
  border-color: #4b6178;
}
.reviewThumb {
  position: relative;
  align-self: start;
}
.reviewZoomHint {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}
.reviewBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 6px;
}
.reviewBadge {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #dfe8f2;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.reviewBadgePoints {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
}
.rivalResult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.12);
  color: #f3e8ff;
  font-size: 0.8125rem;
}
.rivalResult[hidden],
#mapLegendRival[hidden],
#reviewMapRivalLegend[hidden] {
  display: none !important;
}
.reviewRound img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}
.reviewRound img:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}
.reviewRound h3 {
  margin: 0 0 6px;
}
.reviewRound p {
  margin: 4px 0;
  color: #c4ced9;
}
.reviewRound .reviewDescription,
.reviewRound .reviewFact {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reviewRound .reviewDescription {
  -webkit-line-clamp: 2;
}
.reviewRound .reviewFact {
  -webkit-line-clamp: 1;
}
.reviewRound .reviewPlace {
  color: #ffe08a;
  font-weight: 400;
}
.reviewRound .reviewCredit {
  color: #8ca0b8;
  font-size: 0.75rem;
}
.reviewRound .reviewCredit a,
.reviewDetailPanel .reviewCredit a {
  color: #60a5fa;
}
.reviewMore {
  width: auto;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
  font-size: 0.875rem;
}
.reviewMore:hover {
  background: rgba(125, 211, 252, 0.22);
  color: #bae6fd;
}
.reviewDetail {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  background: rgba(0, 0, 0, 0.9);
}
.reviewDetail[hidden] {
  display: none;
}
.reviewDetailPanel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1000px, 100%);
  height: min(96vh, 900px);
  max-height: 96vh;
  overflow: hidden;
  padding: 12px 24px;
  border: 1px solid #354354;
  border-radius: 12px;
  background: #1d2026;
  text-align: left;
}
.reviewDetailPanel h2 {
  flex: none;
  margin: 0 48px 2px 0;
}
.reviewDetailPosition {
  flex: none;
  margin: 0 0 6px;
  color: #8ca0b8;
}
#reviewDetailImageViewport {
  position: relative;
  flex: 0 0 clamp(380px, 55vh, 680px);
  width: 100%;
  height: clamp(380px, 55vh, 680px);
  margin-bottom: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  touch-action: none;
}
#reviewDetailImageViewport.zoomed {
  cursor: grab;
}
#reviewDetailImageViewport.zoomed:active {
  cursor: grabbing;
}
#reviewDetailImageViewport > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}
.reviewImageZoomControls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}
.reviewImageZoomControls button {
  width: auto;
  min-width: 40px;
  padding: 8px 10px;
  border: 1px solid #596575;
  background: rgba(29, 32, 38, 0.92);
  font-size: 0.875rem;
}
.reviewImageZoomControls button:disabled {
  opacity: 0.6;
}
.reviewDetailPanel p {
  color: #c4ced9;
}
#reviewDetailContent {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  line-height: 1.35;
}
.reviewDetailPanel .reviewPlace {
  margin: 0 0 4px;
  color: #ffe08a;
  font-weight: 600;
}
.reviewDetailPanel .reviewCredit {
  margin: 4px 0 0;
  color: #8ca0b8;
  font-size: 0.75rem;
}
.reviewDetailPanel
  #reviewDetailContent
  > p:not(.reviewPlace):not(.reviewCredit) {
  margin: 4px 0;
}
.reviewDetailPanel .reviewCredit a {
  color: #7dd3fc;
}
.reviewDetailClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  padding: 4px;
  background: transparent;
  color: #eee;
  font-size: 1.75rem;
  line-height: 1;
}
.reviewDetailNavigation {
  display: flex;
  flex: none;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.reviewDetailNavigation button {
  width: auto;
  min-width: 120px;
}
@media (max-width: 520px) {
  .reviewRound {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  #game {
    flex-direction: column;
  }
  #photoPane {
    flex: 0.8;
  }
}
section {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid #2f3741;
  border-color: #ce3d2a;
  border-radius: 14px;
  background: #1d2026;
}
h5 {
  color: #a5a2a2;
  font-size: 0.9375rem;
  margin: 0 0 12px;
}

#collectionChooser {
  background: #f8f6f0;
}
#collectionPanel {
  width: min(1120px, 100%);
  padding: clamp(20px, 4vw, 42px);
  border: 0;
  background: transparent;
  color: #172f46;
  box-shadow: none;
}
#collectionPanel h2 {
  font-size: clamp(1.75rem, calc(4vw * var(--accessibility-scale, 1)), 2.5rem);
  letter-spacing: -0.04em;
}
#collectionPanel h3 {
  margin: 22px 0 12px;
  color: #173a56;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
}
#collectionPanel > p {
  color: #526579;
}
#collectionPanel .aboutLink {
  color: #126d91;
}
#collectionPanel .aboutLink:hover {
  color: #0c4961;
}
#progressNotice {
  color: #9c4c16;
}
#challengeNotice {
  border-color: #efc96b;
  background: #fff3cb;
  color: #674915;
}
#challengeNotice strong {
  color: #51370e;
}
#demoNotice {
  border-left-color: #efac32;
  border-radius: 0 10px 10px 0;
  background: #fff2d6;
  color: #73521a;
}
#allCollectionModes {
  margin: 24px 0 30px;
}
#allCollectionModes h3 {
  font-size: 1.5rem;
}
.thematicLink {
  display: inline-flex;
  align-items: center;
  margin: 0 12px 20px 0;
  padding: 12px 18px;
  border: 1px solid #2788a8;
  border-radius: 10px;
  background: #fff;
  color: #126d91;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.thematicLink:hover {
  background: #e8f5f8;
}
.thematicLink:focus-visible {
  outline: 3px solid #e7ae38;
  outline-offset: 3px;
}
.thematicLink[hidden] {
  display: none;
}
html[data-theme="dark"] .thematicLink {
  background: #23384a;
  color: #b6e4f2;
}
.thematicExplore {
  width: min(100%, 350px);
  margin-bottom: 20px;
  text-decoration: none;
}
#allCollectionModeButtons {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.allCollectionModeButton {
  --card-bg: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d5e0e6;
  border-bottom: 4px solid #d5e0e6;
  border-radius: 16px;
  background: var(--card-bg);
  color: #173a56;
  text-align: left;
  box-shadow: 0 5px 16px rgba(28, 62, 83, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.allCollectionModeButton:hover {
  transform: translateY(-4px);
  border-color: #46a8c6;
  background: #fff;
  box-shadow: 0 14px 28px rgba(28, 62, 83, 0.16);
}
.allCollectionModeButton:focus-visible,
.collectionCard:focus-visible,
#collectionSearch:focus-visible,
.tagFilter:focus-visible {
  outline: 3px solid #e7ae38;
  outline-offset: 3px;
}
.allCollectionModeButton::after {
  content: "→";
  position: absolute;
  right: 16px;
  bottom: 14px;
  color: #2788a8;
  font-size: 1.25rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.allCollectionModeButton:hover::after,
.allCollectionModeButton:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}
.allCollectionModeButton:active {
  border-bottom-width: 2px;
  transform: translateY(2px);
}
.allCollectionModeButton:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}
.allCollectionModeButton:disabled::after {
  opacity: 0;
}
.allCollectionModeButton::before {
  content: "";
  position: absolute;
  top: 102px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--card-bg));
  pointer-events: none;
}
.allCollectionModeImage {
  display: block;
  width: 100%;
  height: 142px;
  object-fit: cover;
}
.allCollectionModeContent {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 16px;
}
.allCollectionModeTitle {
  color: #173a56;
  font-size: 1.25rem;
}
.allCollectionModeTitleRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.allCollectionModeRecommended {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #d69a22;
  border-radius: 999px;
  background: #f7c84b;
  color: #5c430f;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 0 2px 6px rgba(166, 115, 20, 0.18);
}
.allCollectionModeDescription {
  color: #617488;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.allCollectionModeMeta {
  color: #84919a;
  font-size: 0.6875rem;
  font-weight: 500;
}
.allCollectionModeBest,
.collectionCardBest {
  margin-top: 2px;
  color: #8794a0;
  font-size: 0.6875rem;
  font-weight: 500;
  min-height: 14px;
  line-height: 14px;
}
.localProgressSummary {
  margin: 10px 0 14px;
  color: #617488;
  font-size: 0.8125rem;
}
.themeToggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 6px 10px;
  border: 1px solid #d3dfe4;
  border-radius: 999px;
  background: #fff;
  color: #526579;
  font-size: 0.8125rem;
  font-weight: 600;
}
.themeToggle:hover {
  border-color: #167da0;
  background: #edf8fb;
}
.themeToggle:focus-visible {
  outline: 3px solid #e7ae38;
  outline-offset: 3px;
}
#progressSummary {
  margin: 0 0 24px;
  padding: 10px 14px;
  border: 1px solid #e4e6e2;
  border-radius: 10px;
  background: #efeee8;
  color: #77828b;
  font-size: 0.75rem;
}
#progressSummary strong {
  color: #5d6e7c;
  font-weight: 600;
}
#recentGames {
  margin-top: 4px;
}
#collectionPanel #collectionSearch {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-color: #cfdae0;
  border-radius: 10px;
  background: #fff;
  color: #173a56;
}
#collectionPanel > p[data-i18n="game.filterModes"] {
  margin: 0 0 8px;
  font-size: 0.8125rem;
}
#gameModeFilters {
  margin-bottom: 20px;
}
#collectionPanel .tagFilter {
  border-color: #d3dfe4;
  background: #fff;
  color: #526579;
}
#collectionPanel .tagFilter:hover,
#collectionPanel .tagFilter.active {
  border-color: #167da0;
  background: #167da0;
  color: #fff;
}
#collectionList {
  gap: 28px;
}
.collectionGroup h4 {
  margin-bottom: 4px;
  color: #173a56;
  font-size: 1.1875rem;
}
.collectionGroup h5 {
  color: #7d8b94;
  font-size: 0.75rem;
  font-weight: 500;
}
.collectionGroupCards {
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}
.collectionCard {
  --card-bg: #fff;
  position: relative;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d9e1e3;
  border-top: 0;
  border-bottom: 4px solid #d9e1e3;
  border-radius: 14px;
  background: var(--card-bg);
  color: #173a56;
  box-shadow: 0 4px 14px rgba(28, 62, 83, 0.07);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}
.collectionCard::before {
  content: "";
  position: absolute;
  top: 84px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--card-bg));
  pointer-events: none;
}
.collectionCard::after {
  content: "→";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--collection-color, #2788a8);
  font-size: 1.125rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.collectionCard:hover::after,
.collectionCard:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}
.collectionCard:hover {
  border-color: var(--collection-color);
  box-shadow: 0 12px 24px rgba(28, 62, 83, 0.14);
  transform: translateY(-2px);
}
.collectionCard:active {
  border-bottom-width: 2px;
  transform: translateY(2px);
}
.collectionCard.selected {
  box-shadow:
    0 0 0 2px var(--collection-color),
    0 12px 24px rgba(28, 62, 83, 0.12);
}
.collectionCardImage {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: cover;
  background: linear-gradient(135deg, #5cb5c7, #f1c15a);
}
.collectionCardContent {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 13px 14px 15px;
}
.collectionCardTitle {
  color: #173a56;
  font-size: 1rem;
  line-height: 1.25;
}
.collectionCard .meta {
  color: #84919a;
  font-size: 0.6875rem;
}
.collectionNotice {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #dce1dc;
  border-radius: 14px;
  background: #efeee8;
}
.collectionNotice h2 {
  font-size: 1.25rem !important;
  letter-spacing: 0 !important;
}
.collectionNotice p {
  color: #687986 !important;
  font-size: 0.8125rem;
  line-height: 1.6;
}
#collectionPanel #noCollections {
  color: #617488;
}
.menuFooter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0 4px;
  border-top: 1px solid rgba(104, 121, 134, 0.35);
  color: #687986;
  text-align: center;
  font-size: 0.875rem;
}
.menuFooter a {
  color: #8cc8d9;
}
@media (max-width: 600px) {
  #collectionChooser {
    padding: 0;
  }
  #collectionPanel {
    padding: 20px 16px;
    border-radius: 0;
  }
  .collectionHeading {
    flex-direction: column;
    gap: 6px;
  }
  .pageLinks {
    gap: 14px;
  }
  .allCollectionModeImage {
    height: 118px;
  }
  .allCollectionModeButton::before {
    top: 78px;
  }
  .collectionGroupCards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .collectionCardImage {
    height: 104px;
  }
  .collectionCard::before {
    top: 64px;
  }
}
html[data-theme="dark"] #collectionChooser {
  background: #131d28;
}
html[data-theme="dark"] #collectionPanel {
  border: 0;
  background: transparent;
  color: #e7edf3;
}
html[data-theme="dark"] #collectionPanel h2,
html[data-theme="dark"] #collectionPanel h3,
html[data-theme="dark"] .collectionGroup h4,
html[data-theme="dark"] .collectionCardTitle,
html[data-theme="dark"] .allCollectionModeTitle {
  color: #e7edf3;
}
html[data-theme="dark"] #collectionPanel > p,
html[data-theme="dark"] .allCollectionModeDescription {
  color: #aab9c7;
}
html[data-theme="dark"] #collectionPanel .aboutLink {
  color: #83d3ed;
}
html[data-theme="dark"] #collectionPanel .aboutLink:hover {
  color: #b7ebf8;
}
html[data-theme="dark"] #challengeNotice {
  border-color: #735d2d;
  background: #302815;
  color: #f0d99c;
}
html[data-theme="dark"] #challengeNotice strong {
  color: #fff0c1;
}
html[data-theme="dark"] #demoNotice {
  border-left-color: #c58c28;
  background: #2a2417;
  color: #e7ce91;
}
html[data-theme="dark"] .allCollectionModeButton {
  --card-bg: #1b2936;
  border-color: #344658;
  background: var(--card-bg);
  color: #e7edf3;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}
html[data-theme="dark"] .allCollectionModeButton:hover {
  --card-bg: #213545;
  border-color: #59b6d2;
  background: var(--card-bg);
}
html[data-theme="dark"] .allCollectionModeBest,
html[data-theme="dark"] .collectionCardBest {
  color: #a6b3be;
}
html[data-theme="dark"] .allCollectionModeMeta,
html[data-theme="dark"] .collectionCard .meta {
  color: #95a5b3;
}
html[data-theme="dark"] #progressSummary {
  border-color: #344658;
  background: #1a2631;
  color: #9cabb8;
}
html[data-theme="dark"] #progressSummary strong {
  color: #c3ced7;
}
html[data-theme="dark"] #collectionPanel #collectionSearch {
  border-color: #405466;
  background: #0e1720;
  color: #e7edf3;
}
html[data-theme="dark"] #collectionPanel .tagFilter {
  border-color: #405466;
  background: #1a2631;
  color: #b9c6d1;
}
html[data-theme="dark"] #collectionPanel .tagFilter:hover,
html[data-theme="dark"] #collectionPanel .tagFilter.active {
  border-color: #2788a8;
  background: #17637d;
  color: #fff;
}
html[data-theme="dark"] .collectionGroup h5,
html[data-theme="dark"] .collectionCard .meta {
  color: #95a5b3;
}
html[data-theme="dark"] .collectionCard {
  --card-bg: #1b2936;
  border-color: #344658;
  background: var(--card-bg);
  color: #e7edf3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
html[data-theme="dark"] .collectionCard:hover {
  border-color: var(--collection-color);
}
html[data-theme="dark"] .collectionNotice {
  border-color: #344658;
  background: #1a2631;
}
html[data-theme="dark"] .collectionNotice p {
  color: #aab9c7 !important;
}
html[data-theme="dark"] #collectionPanel #noCollections {
  color: #aab9c7;
}
html[data-theme="dark"] .themeToggle {
  border-color: #405466;
  background: #1a2631;
  color: #d6e0e8;
}
html[data-theme="dark"] .themeToggle:hover {
  border-color: #59b6d2;
  background: #213545;
}
@media (prefers-reduced-motion: reduce) {
  .allCollectionModeButton,
  .collectionCard,
  .finalAction {
    transition: none;
  }
  .finalAction[hidden] {
    display: none;
  }
}
#finalActions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}
#finalActions.finalActions--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(520px, 100%);
  margin-right: auto;
  margin-left: auto;
}
.finalAction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  min-height: 78px;
  padding: 11px 6px;
  border: 1px solid #354354;
  border-radius: 12px;
  background: #12171d;
  color: #c4ced9;
  font-size: 0.8125rem;
  font-weight: 600;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}
.finalAction:hover {
  transform: translateY(-2px);
  border-color: #60a5fa;
  background: #1b2936;
  color: #fff;
}
.finalAction:focus-visible {
  outline: 3px solid #e7ae38;
  outline-offset: 3px;
}
.finalAction--share:hover {
  border-color: #7dd3fc;
  background: #172b35;
}
.finalAction--replay {
  border-color: #3b82f6;
  background: #2563eb;
  color: #fff;
}
.finalAction--replay:hover {
  border-color: #60a5fa;
  background: #1d4ed8;
}
.finalActionIcon {
  width: 23px;
  height: 23px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.finalActionIcon > g[hidden] {
  display: none !important;
}
@media (max-width: 420px) {
  #finalActions {
    gap: 7px;
  }
  .finalAction {
    min-height: 72px;
    font-size: 0.75rem;
  }
}

/* End-of-game review */
#final {
  align-items: stretch;
  background: #101923;
}
#final div.box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  background: #101923;
  text-align: left;
}
.finalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid #2b3b48;
}
.finalEyebrow,
.finalScoreBlock > span {
  margin: 0 0 4px;
  color: #9fb3c1;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.finalHeader h2 {
  margin: 0;
  font-size: clamp(
    1.25rem,
    calc(2.2vw * var(--accessibility-scale, 1)),
    1.8125rem
  );
}
#challengeResult {
  margin: 4px 0 0;
  font-size: 0.8125rem;
}
.finalScoreBlock {
  text-align: right;
  flex-shrink: 0;
}
.finalScoreBlock[hidden],
.collectionCompleteSummary[hidden] {
  display: none;
}
.collectionCompleteSummary {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  overflow-y: auto;
}
.collectionCompleteScore,
.collectionCompletePhotos {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid #405466;
  border-radius: 999px;
  background: #1b2936;
}
.collectionCompleteScore span {
  color: #b7c8d3;
  font-weight: 700;
}
.collectionCompleteScore strong {
  color: #fff;
  font-size: clamp(1.5rem, calc(3vw * var(--accessibility-scale, 1)), 2.25rem);
}
.collectionCompleteProgress {
  width: min(100%, 420px);
}
.collectionCompleteProgress .totalBar {
  height: 12px;
  margin: 0;
}
.collectionCompleteRange {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: #9fb3c1;
  font-size: 0.75rem;
}
.collectionCompletePhotos {
  color: #e2edf4;
  font-weight: 700;
}
.collectionCompletePhotos svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#finalScore {
  display: block;
  color: #fff;
  font-size: clamp(
    1.4375rem,
    calc(2.5vw * var(--accessibility-scale, 1)),
    2.125rem
  );
  line-height: 1.1;
}
#earnedTrophies {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 4px 0 0;
  padding: 0;
  background: none;
  color: #fcd98a;
  font-size: 0.75rem;
  text-align: right;
}
.finalReviewLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
  padding: 20px 28px 12px;
}
.finalReviewLayout--dateOnly {
  grid-template-columns: minmax(0, 1fr);
}
.finalReviewMap {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #354354;
  border-radius: 16px;
  background: #263440;
}
#reviewMap {
  width: 100%;
  height: 100%;
  min-height: 200px;
}
.reviewMapLegend {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 22, 26, 0.85);
  font-size: 0.75rem;
}
.reviewMapLegend[hidden] {
  display: none;
}
#reviewMapMessage,
#reviewMapError {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  background: #263440;
  color: #e2edf4;
  text-align: center;
}
#reviewMapMessage[hidden],
#reviewMapError[hidden] {
  display: none;
}
.finalReviewList {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.finalReviewLayout--dateOnly .finalReviewList {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}
#finalReviewLayout:not(.finalReviewLayout--dateOnly)
  :is(#roundReview, .reviewDetails) {
  scrollbar-width: none;
}
#finalReviewLayout:not(.finalReviewLayout--dateOnly)
  :is(#roundReview, .reviewDetails)::-webkit-scrollbar {
  display: none;
}
.finalReviewListHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.finalReviewListHeading h2 {
  margin: 0;
  font-size: 1.25rem;
}
#reviewSortButton {
  flex-shrink: 0;
  margin: 0;
  border: 1px solid #405466;
  border-radius: 8px;
  background: #1b2936;
  color: #dceaf2;
  font-size: 0.75rem;
}
#roundReview {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 12px 0 0;
  padding: 2px 6px 6px 2px;
  overflow-y: auto;
}
.reviewRound {
  grid-template-columns: minmax(100px, 35%) minmax(0, 1fr);
  gap: 14px;
  border-radius: 12px;
  background: #192833;
}
.reviewRound.selected {
  border-color: #70d2ea;
  box-shadow: 0 0 0 1px #70d2ea;
}
.reviewRound img {
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
}
.reviewSelect {
  width: auto;
  margin: 0 0 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #304957;
  color: #caedf7;
  font-size: 0.75rem;
}
.reviewSelect:focus-visible,
.reviewMore:focus-visible,
#reviewSortButton:focus-visible {
  outline: 3px solid #e7ae38;
  outline-offset: 2px;
}
.reviewRound h3 {
  font-size: 1rem;
}

.reviewDetailPoints {
  color: #fde68a !important;
  font-weight: 800;
}
.reviewCarouselNavigation {
  display: none;
}
.finalShareFeedback {
  padding: 0 28px;
}
.matchComparison {
  margin: 0 28px 16px;
  padding: 14px;
  border: 1px solid #3c5264;
  border-radius: 10px;
  background: #121c26;
  color: #dce8f1;
}
.matchComparison h3 {
  margin: 0 0 8px;
}
.matchComparisonSummary {
  margin: 0 0 10px;
  font-size: 1.0625rem;
  font-weight: 800;
}
.matchComparisonScores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}
.matchComparisonOutcome {
  margin: 0;
  color: #70d2ea;
  font-size: 1rem;
  font-weight: 800;
}
.matchComparisonScores strong {
  padding: 7px 10px;
  border-radius: 8px;
  background: #1b2a36;
  white-space: nowrap;
}
.reviewMapLegend .legendRival {
  background: #a855f7;
}
.reviewRoundComparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.reviewRoundComparison > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid #344957;
  border-radius: 8px;
  background: #111c24;
}
.reviewRoundComparison strong {
  color: #70d2ea;
  font-size: 0.75rem;
}
.matchComparisonRounds {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 24px;
}
.matchComparisonRounds li {
  padding-left: 3px;
}
.matchComparisonAnswer {
  display: block;
  color: #9fb3c5;
  font-size: 0.8125rem;
}
#shareStatus:empty {
  display: none;
}
#shareStatus {
  margin: 4px 0;
  font-size: 0.8125rem;
}
#finalActions {
  flex: none;
  gap: 10px;
  margin: 0;
  padding: 10px 28px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid #2b3b48;
  background: #101923;
}
.finalAction {
  flex-direction: row;
  min-height: 48px;
  padding: 8px;
}
.finalActionIcon {
  width: 19px;
  height: 19px;
}
@media (max-width: 800px) {
  #final div.box {
    overflow-y: auto;
  }
  .finalHeader {
    padding: 14px 16px;
  }
  .finalHeader h2 {
    font-size: 1.1875rem;
  }
  #finalScore {
    font-size: 1.3125rem;
  }
  .finalReviewLayout {
    display: flex;
    flex-direction: column;
    flex: none;
    gap: 16px;
    padding: 14px 16px;
  }
  .finalReviewMap {
    flex: none;
    height: clamp(220px, 35vh, 360px);
  }
  .finalReviewList {
    min-width: 0;
  }
  #roundReview {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }
  .reviewRound {
    flex: 0 0 90%;
    scroll-snap-align: center;
    grid-template-columns: minmax(90px, 36%) minmax(0, 1fr);
  }
  .reviewCarouselNavigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: #b7c8d3;
    font-size: 0.8125rem;
  }
  .reviewCarouselNavigation button {
    width: auto;
    padding: 7px 12px;
    background: #263b49;
    font-size: 0.8125rem;
  }
  .finalShareFeedback {
    padding: 0 16px;
  }
  .matchComparison {
    margin: 0 16px 14px;
  }
  .matchComparisonScores {
    grid-template-columns: 1fr 1fr;
  }
  .matchComparisonOutcome {
    grid-column: 1 / -1;
  }
  #finalActions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-top: auto;
    padding-right: 16px;
    padding-left: 16px;
  }
}
@media (max-width: 420px) {
  .finalAction {
    min-height: 48px;
    gap: 4px;
    font-size: 0.6875rem;
  }
  .reviewRound {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  #roundReview {
    scroll-behavior: auto;
  }
}

@media (max-width: 800px) {
  body {
    height: 100dvh;
  }
  body > header {
    flex: none;
    gap: 6px;
    padding: 6px 8px;
  }
  .hudStats {
    gap: 4px;
  }
  .hudPill,
  .exitBtn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
  body > header .hudPill {
    padding: 5px 8px;
  }
  body > header .exitBtn,
  body > header .headerHelp {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }

  #game {
    overflow: hidden;
  }
  #photoPane {
    flex: 0 0 var(--mobile-pane-size, 35%);
    min-height: 0;
  }
  .mobileDivider {
    display: flex;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    cursor: row-resize;
    touch-action: none;
    background: #1d2026;
  }
  .mobileDivider::after {
    content: "";
    width: 52px;
    height: 4px;
    border-radius: 999px;
    background: #94a3b8;
  }
  .mobileDivider:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: -2px;
  }
  #side {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }
  #map {
    min-height: 80px;
  }
  #controls {
    flex: 0 1 auto;
    min-height: 0;
    margin-top: auto;
    overflow-y: auto;
    padding: 6px 12px max(6px, env(safe-area-inset-bottom));
  }
  .yearRow {
    margin: 3px 0;
  }
  #yearLabel {
    font-size: 1.5625rem;
  }
  .stepBtn {
    width: 34px;
    height: 34px;
  }
  #year {
    margin-top: 2px;
  }
  #guessBtn {
    margin-top: 4px;
    padding: 8px;
  }
  #roundError:empty {
    display: none;
  }
  #result {
    flex: 0 1 auto;
    min-height: 0;
    margin-top: auto;
    overflow-y: auto;
    padding: 6px 12px max(6px, env(safe-area-inset-bottom));
  }
  #result h3 {
    margin-bottom: 4px;
    font-size: 1rem;
  }
  #scoreCards {
    margin-bottom: 6px;
    border-radius: 8px;
  }
  #result .statCard {
    padding: 5px 8px;
  }
  #result .statMain {
    font-size: 1.125rem;
  }
  #result .statPts {
    font-size: 0.875rem;
  }
  #roundTotalBanner {
    padding: 5px 8px;
  }
  #resTotal {
    font-size: 1rem;
  }
  #roundTotalBanner .totalBar {
    height: 5px;
  }
  #nextBtn {
    padding: 8px;
  }
  #info {
    max-height: none;
    overflow: visible;
  }
  #final div.box {
    overflow: hidden;
  }
  .finalHeader {
    flex: none;
    padding: 8px 12px;
  }
  .finalReviewLayout {
    flex: 1 1 0;
    min-height: 0;
    gap: 0;
    padding: 6px 12px;
  }
  .finalReviewMap {
    flex: 0 0 var(--mobile-pane-size, 40%);
    height: auto;
    min-height: 0;
  }
  #reviewMap {
    min-height: 0;
  }
  .finalReviewLayout--dateOnly #reviewDivider {
    display: none;
  }
  .finalReviewList {
    flex: 1 1 0;
    min-height: 0;
  }
  .finalReviewListHeading h2 {
    font-size: 1rem;
  }
  #roundReview {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 6px;
    align-items: stretch;
  }
  .reviewRound {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 50%) minmax(0, 50%);
    gap: 8px;
    padding: 8px;
  }
  .reviewThumb {
    align-self: stretch;
    min-height: 0;
  }
  .reviewRound img {
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .reviewDetails {
    min-height: 0;
    overflow-y: auto;
  }
  .reviewCarouselNavigation {
    flex: none;
    margin-top: 4px;
  }
  .matchComparison {
    flex: none;
    max-height: 15vh;
    overflow-y: auto;
    margin-bottom: 4px;
  }
  #finalActions {
    position: static;
    margin-top: 0;
    padding-top: 6px;
  }
  .reviewDetail {
    padding: 8px;
  }
  .reviewDetailPanel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    padding: 12px;
    overflow: hidden;
  }
  .reviewDetailPosition,
  .reviewDetailPanel h2,
  .reviewDetailNavigation {
    flex: none;
  }
  .reviewDetailPanel h2 {
    margin-bottom: 6px;
    font-size: 1.1875rem;
  }
  #reviewDetailImageViewport {
    flex: 0 0 38%;
    height: auto;
    min-height: 0;
    margin-bottom: 8px;
  }
  #reviewDetailContent {
    min-height: 0;
    overflow-y: auto;
  }
  .reviewDetailNavigation {
    margin-top: auto;
    padding-top: 8px;
  }
}
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  .reviewDetail {
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .reviewDetailPanel {
    width: min(1000px, 100%);
    height: auto;
    min-height: calc(100% - 12px);
    max-height: none;
    overflow: visible;
  }
  #reviewDetailImageViewport {
    flex: 0 0 clamp(220px, 48vh, 340px);
    height: clamp(220px, 48vh, 340px);
  }
  #reviewDetailContent {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }
  .reviewDetailNavigation {
    margin-top: 8px;
  }
}
@media (max-width: 520px) {
  body > header {
    grid-template-columns: auto 1fr auto;
  }
  body > header .hudStats {
    justify-self: center;
  }
  body > header .pageLinks {
    gap: 8px;
  }
  body > header .aboutLink {
    font-size: 0.75rem;
  }
}
