:root {
  --ink: #173229;
  --ink-soft: #2b4b3d;
  --paper: #f6f2e9;
  --paper-deep: #ece7db;
  --white: #fffdf8;
  --line: #d9d4c8;
  --line-dark: #c3c6b9;
  --muted: #68756c;
  --muted-dark: #4c5e53;
  --lime: #dcfa68;
  --lime-dark: #b3d74f;
  --coral: #ee7655;
  --coral-dark: #b84a36;
  --shadow: 0 20px 50px rgba(23, 50, 41, 0.09);
  --shadow-small: 0 10px 25px rgba(23, 50, 41, 0.08);
  --radius: 4px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(
      circle at 8% 8%,
      rgba(220, 250, 104, 0.14),
      transparent 22rem
    ),
    var(--paper);
  color: var(--ink);
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid #2b7a5f;
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 6.4vw 60px;
  position: relative;
}
.app-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: -12rem;
  bottom: -12rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(23, 50, 41, 0.05);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(23, 50, 41, 0.025),
    0 0 0 84px rgba(23, 50, 41, 0.018);
}
.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font:
    italic 700 21px/1 "Playfair Display",
    serif;
}
.brand-wordmark {
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 1.5px;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 8%;
}
.nav-button {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.nav-button:hover,
.nav-button.is-active {
  border-bottom-color: var(--coral);
  color: var(--ink);
}
.profile-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
}
.demo-pill {
  padding: 6px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font:
    500 9px/1 "DM Mono",
    monospace;
  letter-spacing: 0.8px;
}
.avatar {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--lime);
  font-weight: 800;
  cursor: pointer;
}
.view {
  padding-top: 60px;
  animation: fade-in 0.3s ease both;
}
.view[hidden] {
  display: none;
}
.is-hidden {
  display: none !important;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.eyebrow,
.micro-label {
  margin: 0;
  color: var(--muted);
  font:
    500 10px/1.2 "DM Mono",
    monospace;
  letter-spacing: 1.5px;
}
.eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--coral);
  vertical-align: 1px;
}
.micro-label {
  font-size: 9px;
  letter-spacing: 1.2px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1,
h2 {
  color: var(--ink);
}
h1 {
  margin-bottom: 18px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 0.98;
  letter-spacing: -3.7px;
  font-weight: 800;
}
h1 em,
h2 em {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}
h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -0.7px;
}
.primary-button,
.secondary-button,
.text-button {
  min-height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}
.primary-button:hover {
  background: #275141;
}
.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary-button span {
  font-size: 20px;
  line-height: 1;
}
.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.secondary-button:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}
.text-button {
  min-height: 32px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover {
  color: var(--coral-dark);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}
.brand {
  text-decoration: none;
}
button {
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.back-link {
  font-size: 12px;
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(35px, 8vw, 115px);
  align-items: start;
}
.setup-intro {
  padding-top: 34px;
}
.setup-intro h1 {
  margin-top: 25px;
}
.intro-copy {
  font-size: 18px;
  line-height: 1.7;
}
.intro-meta {
  display: flex;
  gap: 25px;
  margin: 28px 0;
  font-size: 12px;
}
.intro-meta b {
  font-size: 17px;
}
.quiet {
  color: var(--muted-dark);
  line-height: 1.7;
  margin: 22px 0;
}
.setup-card,
.answer-card {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-small);
}
.setup-card h2 {
  font-size: 28px;
  margin: 12px 0;
}
.setup-card > p {
  color: var(--muted-dark);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
legend,
.field-label {
  display: block;
  font-weight: 700;
  font-size: 12px;
  margin: 0 0 9px;
}
.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 16px 12px;
  margin-top: 9px;
  cursor: pointer;
}
.mode-card:has(input:checked) {
  border-color: var(--ink);
  background: #f3f6e7;
}
.mode-card input {
  accent-color: var(--ink);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.mode-card small {
  display: block;
  font-size: 12px;
  color: var(--muted-dark);
  line-height: 1.55;
  margin-top: 4px;
}
.tag {
  font-size: 9px;
  letter-spacing: 1px;
  background: var(--lime);
  padding: 4px 6px;
  margin-left: auto;
}
select,
input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: white;
  padding: 12px;
  color: var(--ink);
}
.wide {
  width: 100%;
}
.fine {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted-dark);
  margin: 12px 0 0;
}
.setup-card .quiet {
  font-size: 12px;
  margin: 12px 0 22px;
}
.notice {
  padding: 14px 18px;
  border-left: 3px solid var(--coral);
  background: #ffecdf;
  margin-top: 20px;
}
.narrow {
  max-width: 800px;
  margin: auto;
}
.narrow h1 {
  margin-top: 20px;
}
.total {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -2px;
}
.record {
  padding: 21px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.record h2 {
  font-size: 18px;
  margin: 0 0 6px;
}
.record p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 13px;
}
.record strong {
  font-size: 21px;
  white-space: nowrap;
}
.record small {
  display: block;
  color: var(--muted-dark);
  font-size: 11px;
  margin-top: 7px;
}
.note {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.note h2 {
  margin-bottom: 10px;
}
.note p {
  margin-bottom: 0;
  line-height: 1.7;
}
.resume-list {
  max-width: 650px;
  margin: 35px 0;
}
.resume-list:empty {
  display: none;
}
#summary .primary-button {
  margin-top: 30px;
}
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 75px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-dark);
  font-size: 10px;
  line-height: 1.6;
}
footer span:last-child {
  flex-basis: 100%;
}
.legal {
  max-width: 720px;
  margin: 45px auto;
  padding: 0 24px;
  line-height: 1.8;
}
.legal h1 {
  font-size: 40px;
  letter-spacing: -2px;
}
.legal h2 {
  margin: 30px 0 12px;
}
#prompt:focus {
  outline: 0;
}
@media (max-width: 950px) {
  .app-shell {
    padding: 18px 5vw 35px;
  }
  .top-nav {
    margin-left: 0;
    gap: 18px;
  }
  .view {
    padding-top: 35px;
  }
  .setup-grid {
    gap: 35px;
  }
  .play-grid {
    grid-template-columns: 1fr;
  }
  .answer-card {
    max-width: 640px;
    width: 100%;
  }
  .play-heading h2 {
    font-size: 24px;
  }
  .photo-frame {
    max-width: 800px;
  }
}
@media (max-width: 650px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .setup-intro {
    padding-top: 0;
  }
  .setup-intro h1 {
    font-size: 49px;
    letter-spacing: -2.7px;
  }
  .setup-intro .quiet {
    margin-bottom: 0;
  }
  .setup-card {
    padding: 23px;
  }
  .brand-wordmark {
    font-size: 9px;
  }
  .brand-mark {
    width: 29px;
    height: 29px;
  }
  .top-nav {
    gap: 13px;
  }
  .top-nav button {
    font-size: 10px;
  }
  .back-link {
    display: none;
  }
  .topbar {
    gap: 15px;
  }
  .play-heading {
    align-items: flex-start;
  }
  .play-heading h2 {
    font-size: 22px;
  }
  .answer-card {
    padding: 18px;
  }
  .record {
    gap: 10px;
  }
  .record h2 {
    font-size: 16px;
  }
  .narrow h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }
  .intro-copy {
    font-size: 16px;
  }
  .media-caption {
    font-size: 10px;
  }
  .view {
    padding-top: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.gmp-attribution {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: normal;
  white-space: nowrap;
  color: #5e5e5e;
  margin: 8px 0;
}

/* The active game is a viewport-sized workspace, with actions below both views. */
.is-playing .app-shell {
  width: min(1600px, 100%);
  height: 100svh;
  min-height: 600px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
}
.is-playing .topbar {
  min-height: 44px;
  flex-shrink: 0;
}
.is-playing .nav-button {
  font-size: 14px;
}
.is-playing #main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding-top: 14px;
}
.is-playing .notice {
  margin: 0 0 8px;
  padding: 8px 12px;
}
.is-playing #play {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  gap: 12px;
  animation: none;
}
.is-playing .play-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
  margin: 0;
}
.is-playing .play-heading h2 {
  margin-top: 6px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.is-playing .eyebrow {
  font-size: 12px;
  letter-spacing: 1px;
}
.is-playing #leave {
  white-space: nowrap;
}
.is-playing .play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.location-picker {
  margin: 18px 0;
}
.location-picker .field-label {
  margin-top: 0;
}
.location-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.location-controls select {
  flex: 1;
  min-width: 0;
  width: auto;
}
.location-controls .secondary-button {
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
}
.location-picker .fine {
  margin: 8px 0 0;
  min-height: 2.8em;
}
@media (max-width: 400px) {
  .location-controls {
    flex-direction: column;
  }
}
.scene-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}
.photo-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  overflow: hidden;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: var(--muted-dark);
  background: var(--paper-deep);
}
.media-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 18px;
  gap: 8px;
  margin: 0;
}
.is-playing .gmp-attribution {
  margin: 0;
  font-size: 12px;
}
.is-playing .answer-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  min-height: 0;
  min-width: 0;
  max-width: none;
  width: 100%;
  box-shadow: none;
}
.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  gap: 8px;
  font-size: 16px;
}
.map-controls {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.map-controls button {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  font-size: 20px;
  cursor: pointer;
}
.map-stage {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  container-type: size;
}
.map-frame {
  position: relative;
  width: min(100cqw, calc(100cqh * 4 / 3));
  max-width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  box-shadow: 0 0 0 1px var(--line);
  cursor: crosshair;
  touch-action: manipulation;
  overflow: hidden;
}
.map-frame img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
.map-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}
#pin-status {
  margin: 0;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.4;
}
.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 800;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 6px #0005;
}
.guess-pin {
  background: var(--coral);
  color: #1a201d;
}
.answer-pin {
  background: var(--ink);
  color: var(--lime);
}
.play-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  margin: 0;
}
.round-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
.is-playing .primary-button,
.is-playing .secondary-button,
.is-playing .text-button {
  font-size: 14px;
}
.is-playing #submit {
  margin: 0 0 0 auto;
  min-width: 260px;
  justify-content: center;
}
.clue-box {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--lime-dark);
  background: #edf4d7;
  font-size: 14px;
}
.map-help {
  position: relative;
}
.map-help summary {
  list-style: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.map-help summary::-webkit-details-marker {
  display: none;
}
.map-help summary:focus-visible {
  outline: 3px solid #2b7a5f;
  outline-offset: 3px;
}
.help-content {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 10;
  width: min(340px, 80vw);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.55;
}
.help-content p {
  margin: 10px 0 0;
}
.reveal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}
#result-score {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}
.result-copy h2 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0;
}
#result-detail {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted-dark);
}
.is-playing #next {
  justify-content: center;
  white-space: nowrap;
}
.view-toggle {
  display: none;
}
.is-playing footer {
  margin-top: 10px;
  padding-top: 8px;
  gap: 4px 16px;
  font-size: 12px;
  line-height: 1.3;
  flex-shrink: 0;
}
.is-playing footer span:last-child {
  flex-basis: auto;
}
@media (max-width: 760px) {
  .is-playing .app-shell {
    padding: 8px 12px;
    min-height: 560px;
  }
  .is-playing #main {
    padding-top: 10px;
  }
  .is-playing .top-nav {
    gap: 12px;
  }
  .is-playing .nav-button {
    font-size: 12px;
  }
  .is-playing .back-link {
    display: none;
  }
  .is-playing #play {
    gap: 8px;
  }
  .is-playing .play-heading {
    gap: 10px;
    align-items: flex-start;
  }
  .is-playing .play-heading h2 {
    font-size: 18px;
    line-height: 1.2;
    margin-top: 4px;
  }
  .is-playing .eyebrow {
    font-size: 12px;
    letter-spacing: 0;
  }
  .is-playing #leave {
    font-size: 12px;
  }
  .view-toggle {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
  }
  .view-toggle button {
    flex: 1;
    height: 34px;
    border: 1px solid var(--line-dark);
    border-radius: 3px;
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
  }
  .view-toggle button.selected {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
  }
  .is-playing .play-grid {
    display: flex;
    gap: 0;
  }
  .is-playing .scene-column,
  .is-playing .answer-card {
    width: 100%;
    height: 100%;
  }
  #play[data-panel="scene"] .answer-card,
  #play[data-panel="map"] .scene-column {
    display: none;
  }
  .is-playing .answer-card {
    padding: 8px;
    gap: 6px;
  }
  .map-heading {
    min-height: 28px;
    font-size: 14px;
  }
  .map-controls button {
    height: 34px;
  }
  .play-actions {
    gap: 6px;
  }
  .round-tools {
    gap: 8px;
  }
  .is-playing .secondary-button {
    padding: 8px;
  }
  .is-playing #submit {
    min-width: 0;
    flex: 1;
    padding: 10px 8px;
  }
  .map-help summary {
    width: 32px;
    height: 32px;
  }
  .help-content {
    left: auto;
    right: -110px;
    width: min(310px, calc(100vw - 32px));
  }
  .reveal {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding-top: 8px;
  }
  #result-score {
    font-size: 20px;
  }
  .result-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .result-copy h2 {
    font-size: 14px;
  }
  #result-detail {
    font-size: 12px;
  }
  .is-playing #next {
    grid-column: 2;
    grid-row: 1;
    padding: 10px;
  }
  .is-playing footer {
    display: none;
  }
}
