/* Interactive journeys: the artwork is scenery; paths, players and labels
   remain native HTML/SVG. No text is baked into or scaled with the paintings. */
.game-mode-picker {
  min-width: 0;
  margin: 1.5rem 0;
  padding: 0;
  border: 0;
  color: #203744;
}
.game-mode-picker > legend {
  padding: 0;
  margin-bottom: .875rem;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
}
.game-mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .875rem;
}
.game-mode-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-width: 0;
  min-height: 8.5rem;
  margin: 0;
  padding: 1rem;
  border: 2px solid #b4a180;
  border-radius: 1rem;
  background: #fffaf0;
  cursor: pointer;
}
.game-mode-option:hover { border-color: #54756e; background: #f6f7eb; }
.game-mode-option:has(input:checked) {
  border-color: #2e665a;
  background: #eaf3e7;
  box-shadow: inset 0 0 0 1px #2e665a;
}
.game-mode-option:focus-within { outline: 3px solid #12618a; outline-offset: 4px; }
.game-mode-option > input[type='radio'] {
  width: 1.5rem;
  height: 1.5rem;
  min-height: 1.5rem;
  flex: 0 0 1.5rem;
  margin: .125rem 0 0;
  accent-color: #2e665a;
}
.game-mode-option > span { display: grid; gap: .5rem; min-width: 0; }
.game-mode-option strong { color: #203744; font-size: 1.25rem; font-weight: 800; line-height: 1.35; }
.game-mode-option small { color: #455951; font-size: 1rem; line-height: 1.5; }
.journey-goal-field {
  display: grid;
  gap: .5rem;
  width: min(100%, 25rem);
  margin-top: 1.25rem;
  color: #203744;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
}
.journey-goal-field[hidden] { display: none; }
.journey-goal-field > span { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.journey-goal-field input {
  width: min(100%, 12rem);
  min-width: 0;
  min-height: 3.25rem;
  padding: .75rem .875rem;
  border: 2px solid #927c56;
  border-radius: .75rem;
  color: #203744;
  background: #fffdf7;
  font-size: 1.125rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.journey-goal-field strong { font-size: 1.125rem; }
.game-mode-help { margin: 1rem 0 0; color: #455951; font-size: 1.125rem; line-height: 1.6; }

.journey-play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(19rem, 1fr);
  align-items: start;
  gap: clamp(1rem, 2vw, 1.75rem);
  min-width: 0;
  max-width: 100%;
}
.journey-play-layout > * { min-width: 0; max-width: 100%; }
.journey-board {
  --journey-accent: #b69a58;
  min-width: 0;
  max-width: 100%;
  color: #203744;
  background: #fffaf0;
  border: 1px solid #bba27a;
  border-radius: 1.5rem;
  box-shadow: 0 .35rem 0 #9f805326, 0 1rem 2rem #273a4610;
}
.journey-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
}
.journey-board-heading > div:first-child { flex: 1 1 16rem; min-width: 0; }
.journey-reveal { display: block; color: #526257; font-size: 1rem; font-weight: 750; line-height: 1.5; }
.journey-board .journey-board-heading h2 {
  margin: .25rem 0 .5rem;
  color: #203744;
  font-family: var(--ui-display-font, 'Game Night Lora', Georgia, serif);
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.journey-board-heading p { max-width: 55ch; margin: 0; color: #455951; font-size: 1.25rem; line-height: 1.5; }
.journey-goal-badge {
  display: grid;
  justify-items: center;
  gap: .125rem;
  padding: .75rem 1rem;
  border: 2px solid #a98b54;
  border-radius: 1rem;
  background: #fff0c8;
  color: #594626;
  text-align: center;
}
.journey-goal-badge strong { font-size: 2rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.journey-goal-badge span { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.journey-landscape {
  --token-size: 3.75rem;
  /* Container units keep a 12-player cluster within the start/finish margins. */
  --token-spread-x: clamp(0px, calc(12cqw - 35px), 42px);
  --token-spread-y: clamp(0px, calc(5cqw - 24px), 22px);
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-block: 1px solid #a98b54;
  background-color: #d9c9a7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.journey-path {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #1d30253d);
}
.journey-milestone {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, 1.125rem);
  display: block;
  min-width: 3rem;
  padding: .25rem .5rem;
  border: 1px solid #716044;
  border-radius: .5rem;
  background: #fff9e9;
  color: #293c42;
  box-shadow: 0 2px 3px #142b3826;
  font-family: var(--ui-font, 'Game Night Nunito', system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.journey-token {
  position: absolute;
  z-index: 3;
  display: block;
  width: var(--token-size);
  height: var(--token-size);
  padding: 3px;
  border: 3px solid #fff8df;
  border-radius: 50%;
  background: #f1d49e;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #4c5f57, 0 4px 7px #18343b66;
  transform: translate(calc(-50% + var(--token-column, 0) * var(--token-spread-x)), calc(-50% + var(--token-row, 0) * var(--token-spread-y)));
}
.journey-token :is(.player-portrait-pair, .avatar-graphic),
.journey-mini-token :is(.player-portrait-pair, .avatar-graphic) {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
}
.journey-token .avatar-emoji,
.journey-mini-token .avatar-emoji { font-size: 2rem; }
.journey-token .player-selfie,
.journey-mini-token .player-selfie { width: 42%; height: 42%; right: -3%; bottom: -3%; }
.journey-token > b {
  position: absolute;
  right: -5px;
  bottom: -6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border: 2px solid #fff8df;
  border-radius: 50%;
  background: #233e4a;
  color: white;
  font-family: var(--ui-font, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}
.journey-token-finished { border-color: #ffd36f; box-shadow: 0 0 0 2px #806025, 0 4px 7px #18343b66; }
.journey-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 1.25rem;
}
.journey-legend li {
  display: grid;
  grid-template-columns: 2.125rem minmax(0, 1fr);
  align-items: center;
  gap: .375rem .625rem;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #c5b598;
  border-radius: .875rem;
  background: #fffdf6;
  color: #203744;
}
.journey-player-number {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: #233e4a;
  color: white;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}
.journey-legend li > span:last-of-type { display: grid; gap: .125rem; min-width: 0; }
.journey-legend strong { font-size: 1.125rem; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.journey-legend small { color: #455951; font-size: 1.125rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.journey-legend progress {
  grid-column: 2;
  display: block;
  width: 100%;
  min-width: 0;
  height: .75rem;
  margin-top: .25rem;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  accent-color: #326a5b;
  background: #e2d9c3;
}
.journey-legend progress::-webkit-progress-bar { border-radius: 1rem; background: #e2d9c3; }
.journey-legend progress::-webkit-progress-value { border-radius: 1rem; background: #326a5b; }
.journey-legend progress::-moz-progress-bar { border-radius: 1rem; background: #326a5b; }
.journey-legend .journey-player-finished { border-color: #b28b38; background: #fff3ca; }

.journey-question-picker {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid #bba27a;
  border-radius: 1.5rem;
  background: #fffaf0;
  color: #203744;
  box-shadow: 0 .35rem 0 #9f805326;
}
.journey-question-picker h2 { margin: 0 0 .75rem; font-size: 1.75rem; line-height: 1.3; }
.journey-question-picker p { font-size: 1.25rem; line-height: 1.55; }
.journey-topic-list,
.journey-topic-options,
.journey-question-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.journey-question-picker .journey-topic-choice {
  display: flex;
  align-items: center;
  gap: .875rem;
  width: 100%;
  min-width: 0;
  min-height: 5.25rem;
  margin: 0 0 .75rem;
  padding: 1rem;
  border: 2px solid #b39a70;
  border-radius: 1rem;
  background: #fffdf6;
  color: #203744;
  font-family: var(--ui-font, system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  overflow-wrap: break-word;
}
.journey-question-picker .journey-topic-choice:not(:disabled):hover { border-color: #326a5b; background: #ecf3e6; }
.journey-question-picker .journey-topic-choice[aria-pressed='true'] { border-color: #326a5b; box-shadow: inset 0 0 0 1px #326a5b; background: #e7f1e2; }
.journey-question-picker .journey-topic-choice:disabled { color: #52615b; background: #eee9de; border-color: #b9b09d; opacity: 1; }
.journey-topic-choice :is(.category-artwork, .board-topic-illustration) { flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; }
.journey-topic-choice strong { display: block; font-size: 1.25rem; line-height: 1.4; }
.journey-topic-choice small { display: block; margin-top: .25rem; color: #455951; font-size: 1rem; line-height: 1.4; }
.journey-topic-choice > span:not(.category-artwork):not(.board-topic-illustration) { min-width: 0; }

.journey-answer-progress {
  margin: 1.25rem 0 1.5rem;
  padding: 1.125rem 1.25rem .5rem;
  border: 2px solid #ad915c;
  border-radius: 1rem;
  background: #fff2d2;
  color: #203744;
}
.journey-answer-progress > div:first-child { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .375rem 1rem; }
.journey-answer-progress strong { font-size: 1.375rem; font-weight: 800; line-height: 1.4; }
.journey-answer-progress > div > span { font-size: 1.125rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.journey-mini-track {
  position: relative;
  height: 1rem;
  margin: 1.75rem 1.5rem 1.625rem;
  border: 1px solid #a18b62;
  border-radius: 1rem;
  background: #dfd2b2;
}
.journey-mini-fill { display: block; height: 100%; border-radius: inherit; background: #326a5b; }
.journey-mini-token {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  padding: 2px;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: #ebd1a0;
  box-shadow: 0 0 0 1px #49655d, 0 2px 4px #20374445;
  transform: translate(-50%, -50%);
}

@media (max-width: 1050px) {
  .journey-play-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .game-mode-options { grid-template-columns: minmax(0, 1fr); }
  .game-mode-option { min-height: 0; padding: 1rem; }
  .journey-board-heading { padding: 1.125rem; }
  .journey-board-heading p { font-size: 1.125rem; }
  .journey-goal-badge { justify-items: start; padding: .625rem .875rem; text-align: left; }
  .journey-goal-badge strong { font-size: 1.75rem; }
  .journey-landscape {
    --token-size: 2.75rem;
    --token-spread-x: clamp(3px, calc(12cqw - 27px), 30px);
    --token-spread-y: clamp(0px, calc(7cqw - 18px), 18px);
    aspect-ratio: 3 / 2;
  }
  .journey-token { padding: 2px; border-width: 2px; }
  .journey-token > b { right: -4px; bottom: -5px; width: 1.5rem; height: 1.5rem; }
  .journey-milestone { transform: translate(-50%, 0); padding: .2rem .4rem; }
  .journey-legend { padding: 1rem; gap: .625rem; }
  .journey-question-picker { padding: 1.125rem; }
  .journey-answer-progress { padding-inline: 1rem; }
}
@media (max-width: 480px) {
  .journey-legend { grid-template-columns: minmax(0, 1fr); }
  .journey-legend li { grid-template-columns: 2.125rem minmax(0, 1fr); }
  .journey-board-heading { gap: .875rem; }
  .journey-goal-badge { grid-template-columns: auto 1fr; align-items: baseline; gap: .625rem; }
  .journey-goal-badge strong { font-size: 1.5rem; }
  .journey-answer-progress > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .journey-board *,
  .journey-answer-progress *,
  .game-mode-picker *,
  .journey-question-picker * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .game-mode-option,
  .journey-milestone,
  .journey-token,
  .journey-goal-badge,
  .journey-question-picker .journey-topic-choice { border: 2px solid ButtonText; }
  .journey-legend progress,
  .journey-mini-fill { forced-color-adjust: none; background: Highlight; }
}
