@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,500;0,600;0,700;0,800;1,700;1,800&family=Inter:wght@400;500;600;700;800&family=Roboto:wght@400;500;700;900&display=swap");
:root {
  color-scheme: dark;
  --bg: #10101d;
  --panel: #1c1b30;
  --muted: #aaa8c2;
  --purple: #8959f5;
  --green: #8bce36;
  --yellow: #ffdc58;
  --border: #ffffff16;
  font-family: Inter, system-ui, sans-serif;
  color: #fff;
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
html {
  margin: 0;
  min-height: 100%;
  background: #10101d;
  overscroll-behavior: none;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% 0, #38235b40, transparent 55%), var(--bg);
  overflow-x: clip;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ffdc58;
  outline-offset: 4px;
}
button,
input,
select {
  color: inherit;
}
button {
  border: 0;
}
input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ffffff28;
  border-radius: 8px;
  background: #111020;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--purple);
}
input[type="checkbox"] {
  width: 38px;
  accent-color: var(--purple);
}
label {
  display: block;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.field > span,
.eyebrow,
.section-title {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
  font-weight: 800;
}
.eyebrow {
  color: var(--yellow);
}
h1,
h2,
h3,
.display,
.btn,
.logo {
  font-family: "Barlow Condensed", Impact, system-ui, sans-serif;
}
h1,
h2,
h3 {
  font-style: italic;
  margin: 0;
}
h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
}
h2 {
  font-size: 34px;
}
h3 {
  font-size: 23px;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
  line-height: 1.6;
}
.hidden,
[hidden] {
  display: none !important;
}
.logo {
  font-style: italic;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -0.7px;
  white-space: nowrap;
}
.logo span {
  color: var(--yellow);
}
.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--border);
}
.site-header nav {
  display: flex;
  gap: 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.site-header nav a.active {
  color: #fff;
}
.site-header nav a:hover { color: #fff; }
.container {
  max-width: 1320px;
  margin: auto;
  padding: 38px 24px 60px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff1;
  border: 1px solid #fff3;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 17px;
  text-transform: uppercase;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  line-height: 1.15;
  transition:
    filter 0.15s,
    transform 0.15s;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, #98d947, #6aaa2f);
  border: 0;
  box-shadow: 0 4px 18px #81c53626, inset 0 1px 0 #ffffff35;
}
.btn.purple {
  background: var(--purple);
  border: 0;
}
.btn.small {
  font-size: 14px;
  padding: 9px 18px;
}
.btn.full {
  width: 100%;
}
.panel {
  background: linear-gradient(145deg, #232139, #1a192c);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.stack {
  display: grid;
  gap: 20px;
}
.section-title {
  color: var(--muted);
  margin-bottom: 18px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 52px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 75% 45%, #755dcc77, transparent 42%),
    linear-gradient(110deg, #26213e, #151527);
  border: 1px solid var(--border);
  min-height: 340px;
}
.hero h1 {
  max-width: 560px;
  margin-top: 14px;
}
.hero p {
  max-width: 450px;
  color: #c6c0dc;
  font-size: 14px;
}
.hero-globe {
  position: absolute;
  right: 50px;
  top: 40px;
  width: 265px;
  height: 265px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 25%,
    #6bd7cd,
    #457e98 32%,
    #202e68 65%,
    #0c1225
  );
  box-shadow:
    inset -30px -20px 45px #050821aa,
    0 0 90px #9182ff25;
  opacity: 0.85;
  transform: rotate(-18deg);
}
.hero-globe:before,
.hero-globe:after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #99efdc66;
  border-radius: 50%;
  transform: scaleX(0.45);
}
.hero-globe:after {
  transform: scaleY(0.45);
}
.hero > *:not(.hero-globe) {
  position: relative;
  z-index: 1;
}
.landing-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.mode-card {
  text-align: left;
  color: #fff;
  padding: 22px 18px;
  background: linear-gradient(135deg, #322951, #1e1934);
  border: 1px solid #ffffff15;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.mode-card:hover {
  border-color: #9871ec;
  transform: translateY(-3px);
}
.mode-card.selected {
  border-color: #b590ff;
  background: linear-gradient(135deg, #60418c, #33224e);
}
.mode-card .mode-icon {
  font-size: 28px;
  line-height: 1;
  color: #ccb7ff;
}
.mode-card p {
  margin: 0;
  font-size: 11px;
  color: #c0b7d9;
  line-height: 1.5;
}
.mode-card h3 {
  font-size: 21px;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
}
.room-code {
  font-size: 36px;
  letter-spacing: 5px;
  font-weight: 800;
  color: var(--yellow);
  margin: 12px 0;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.player-row > div {
  flex: 1;
}
.player-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #8153df;
  color: white;
  border: 2px solid #ffffff66;
  font-weight: 800;
  flex-shrink: 0;
}
.tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
  padding: 4px 8px;
}
.tag.ready {
  color: #b5ed7a;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #a489fa40;
  background: #8452ec12;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #c9c1e1;
}
.error {
  color: #ffb5b5;
}
.chat-log {
  height: 160px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.chat-log p {
  margin: 5px 0;
}
.chat-log b {
  color: #bda1f4;
}
.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chat-form input {
  min-width: 0;
  font-size: 12px;
}
.footer {
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: #a19ab8;
  border-top: 1px solid var(--border);
}

/* Map discovery uses original landscape artwork, not third-party imagery. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero {
  padding: 56px;
  min-height: 450px;
  border-radius: 20px;
  background: #1b1c32;
  box-shadow: 0 24px 80px #0003;
}
.hero .hero-globe {
  inset: 0 0 0 auto;
  width: 72%;
  height: 100%;
  border-radius: 0;
  opacity: 1;
  transform: none;
  background: linear-gradient(90deg, #1b1c32 0%, #1b1c3255 35%, #1b1c3200 80%), url("../assets/explore-landscape.svg") center / cover;
  box-shadow: none;
}
.hero .hero-globe::before,
.hero .hero-globe::after { display: none; }
.hero .hero-content { max-width: 630px; }
.hero h1 { font-size: clamp(46px, 5.8vw, 78px); letter-spacing: -1.5px; }
.hero h1 em { color: #e1d3ff; }
.hero p { max-width: 490px; font-size: 14px; margin: 22px 0 26px; }
.hero-actions .btn { min-height: 48px; padding-inline: 28px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #afe57d; margin-right: 8px; box-shadow: 0 0 12px #9ced6d80; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; }
.hero-stats > span { color: #b6b1cb; font-size: 10px; line-height: 1.8; }
.hero-stats strong { display: block; font: 700 17px Inter, sans-serif; color: #fff; margin-bottom: 4px; }
.hero-stats > span + span { border-left: 1px solid #ffffff1c; padding-left: 28px; }
.hero .hero-coordinate { position: absolute; bottom: 35px; right: 35px; display: grid; gap: 9px; text-align: right; color: #e7e5ee; }
.hero-coordinate span { font-size: 8px; letter-spacing: 1.8px; }
.hero-coordinate strong { font: italic 700 22px "Barlow Condensed", sans-serif; }
.landing-discover { margin: 42px 0; }
.section-heading, .map-browser-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.section-heading h2, .map-browser-heading h2 { margin-top: 8px; font-size: 34px; }
.text-link { font-size: 12px; color: #c5b0ff; font-weight: 700; white-space: nowrap; }
.text-link:hover { color: #fff; }
.map-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.landing-map-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  text-align: left;
  color: #fff;
  background: #222137;
  border: 1px solid #ffffff12;
  border-radius: 12px;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.map-card:hover { transform: translateY(-3px); border-color: #a28ad277; box-shadow: 0 8px 24px #0003; }
.map-card.selected { border-color: #a883ff; box-shadow: 0 0 0 1px #a883ff; background: #302746; }
.map-card-art { position: relative; display: grid; place-items: center; height: 112px; overflow: hidden; background: linear-gradient(135deg, #2e477080, #592e7580), url("../assets/explore-landscape.svg") center 48% / cover; }
.map-card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #181c3060, transparent); }
.map-card-art > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; font: 32px Inter, sans-serif; z-index: 1; background: #191b3155; border: 1px solid #ffffff60; box-shadow: 0 5px 20px #15162540; backdrop-filter: blur(8px); }
.map-art-rural { background-position: 85% 80%; filter: hue-rotate(30deg); }
.map-art-country { background-position: 100% 20%; filter: hue-rotate(-20deg); }
.map-art-custom { background-position: 0 0; filter: hue-rotate(70deg); }
.map-card-copy { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 18px; }
.map-card-category { color: #b6a3e7; font-size: 8px; letter-spacing: 1.3px; font-weight: 700; text-transform: uppercase; }
.map-card-copy > strong { font: italic 700 25px "Barlow Condensed", sans-serif; line-height: 1.1; }
.map-card-description { font-size: 11px; line-height: 1.55; color: #b5b1c7; }
.map-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: 10px; color: #aaa6c1; }
.map-card-meta > span { color: #e2d4ff; font-weight: 700; white-space: nowrap; }
.map-browser { padding: 24px; }
.map-browser-heading { margin-bottom: 0; }
.map-browser-heading .tag { flex-shrink: 0; color: #ccbef0; padding: 7px 10px; }
.map-browser-toolbar { margin: 18px 0 12px; }
.map-search input { padding: 14px 16px; font-size: 12px; border-radius: 10px; background: #141424; }
.map-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chip { min-height: 34px; padding: 8px 12px; background: #ffffff07; border: 1px solid #ffffff14; border-radius: 7px; color: #bcb6d0; font-size: 10px; font-weight: 600; }
.filter-chip:hover { background: #ffffff12; color: #fff; }
.filter-chip.active, .filter-chip[aria-pressed="true"] { background: #8052d72b; color: #e1cfff; border-color: #a27ce077; }
#catalogStatus { margin: 16px 0 12px; font-size: 10px; }
#mapCatalog { max-height: 555px; overflow: auto; padding: 3px 5px 6px 3px; scrollbar-width: thin; scrollbar-color: #625078 transparent; }
#mapCatalog .map-card-art { height: 84px; }
#mapCatalog .map-card-copy { padding: 14px; }
#mapCatalog .map-card-description { display: none; }
#mapCatalog .map-card-copy > strong { font-size: 22px; }
#moreMaps { margin-top: 14px; }
.catalog-empty { grid-column: 1 / -1; text-align: center; padding: 35px 20px; color: #bfb9d0; font-size: 13px; }
.catalog-empty strong { color: #fff; }
.map-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 0 0; margin-top: 15px; border-top: 1px solid #ffffff14; color: #d7c9f8; font-size: 12px; line-height: 1.6; }
.map-selection .text-link, .map-selection a { margin-left: auto; color: #c1eaa0; font-weight: 700; white-space: nowrap; }
.lobby-main { min-width: 0; }
.lobby-grid > aside { align-self: start; }
.setup-section-title { margin-top: 28px; }
.setup-panel { scroll-margin-top: 24px; }
#setupForm { scroll-margin-top: 30px; }
#setupForm #startBtn { min-height: 52px; margin-top: 8px; font-size: 20px; }
.party-create h2 { font-size: 40px; margin: 12px 0; }
.party-create > .btn { margin-top: 14px; }
.party-create input { background: #11102080; }
.mode-card.selected { box-shadow: inset 0 0 0 1px #c5a6ff55; }
.final-header h1 { font-size: clamp(38px, 6vw, 64px); }
.result-actions { flex-wrap: wrap; }

@media (min-width: 1150px) {
  .lobby-main .map-catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .hero { padding: 38px; }
  .hero .hero-coordinate { display: none; }
  .hero .hero-globe { width: 100%; opacity: .65; }
}
@media (max-width: 700px) {
  .hero { padding: 30px 24px; min-height: 460px; }
  .hero h1 { font-size: 49px; }
  .hero p { font-size: 13px; max-width: 320px; }
  .hero .hero-globe { width: 160%; right: -30%; opacity: .4; }
  .hero-stats { gap: 15px; }
  .hero-stats > span + span { padding-left: 15px; }
  .hero-stats strong { font-size: 14px; }
  .hero-actions .btn { padding-inline: 20px; font-size: 16px; }
  .landing-map-catalog { grid-template-columns: 1fr; }
  .landing-map-catalog .map-card { flex-direction: row; }
  .landing-map-catalog .map-card-art { width: 110px; height: auto; flex-shrink: 0; }
  .landing-map-catalog .map-card-description { display: none; }
  .landing-map-catalog .map-card-copy { padding: 17px; }
  .section-heading { align-items: flex-end; gap: 12px; }
  .section-heading h2 { font-size: 28px; }
  .section-heading .text-link { font-size: 10px; }
  .map-browser { padding: 18px; }
  .map-browser-heading h2 { font-size: 28px; }
  .map-browser-heading .tag { font-size: 8px; }
  .map-catalog { gap: 10px; }
  #mapCatalog .map-card-copy { padding: 11px; }
  #mapCatalog .map-card-meta { flex-direction: column; align-items: flex-start; }
  #mapCatalog .map-card-copy > strong { font-size: 20px; }
  .map-card-category { font-size: 7px; }
  .filter-chip { min-height: 40px; }
  .map-selection { font-size: 11px; }
}
/* Gameplay leaves the panorama unobstructed. */
body.in-game {
  overflow: hidden;
  background: #111;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
}
body.in-game #app { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; }
body.show-results :is(.pano-wrap, .brand-float, .hud-float, .timer, .modern-compass, .left-controls, .drawer, .attribution-pano, .viewer-status) { visibility: hidden; }
.pano-wrap,
#panoCustom {
  position: fixed;
  inset: 0;
  background: #14151a;
}
#panoCustom canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#panoCustom canvas:active {
  cursor: grabbing;
}
.brand-float {
  position: fixed;
  top: 15px;
  left: 18px;
  z-index: 5;
  filter: drop-shadow(0 2px 3px #0009);
}
.brand-float .logo {
  font-size: 23px;
}
.hud-float {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 26px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid #b899ff40;
  background: linear-gradient(120deg, #563996f2, #292044f5);
  backdrop-filter: blur(12px);
  z-index: 5;
  box-shadow: 0 2px 15px #0004;
}
.hud-cell {
  font:
    italic 800 19px "Barlow Condensed",
    sans-serif;
  min-width: 34px;
}
.hud-cell + .hud-cell { border-left: 1px solid #ffffff20; padding-left: 22px; }
.hud-cell span { display: block; overflow: hidden; text-overflow: ellipsis; }
.hud-cell small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #c6b8e7;
  margin-bottom: 3px;
}
.hud-map {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timer {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: #151322df;
  padding: 8px 19px;
  border: 1px solid #ffffff20;
  border-radius: 24px;
  font-variant-numeric: tabular-nums;
  font:
    800 19px "Barlow Condensed",
    sans-serif;
  z-index: 5;
  pointer-events: none;
}
.timer.urgent {
  color: #ff968c;
}
.modern-compass {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 34px;
  border-radius: 17px;
  background: #12152680;
  backdrop-filter: blur(6px);
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.modern-compass:after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 3px #000a;
}
.compass-track {
  position: absolute;
  left: 50%;
  top: 0;
  height: 30px;
  display: flex;
  align-items: center;
  will-change: transform;
}
.compass-mark {
  width: 45px;
  flex-shrink: 0;
  height: 20px;
  border-left: 1px solid #ddd9;
  color: #fff;
  font: 700 10px "Roboto", Inter, sans-serif;
  letter-spacing: 0.4px;
  padding-left: 4px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 8px,
    #ffffff40 8px,
    #ffffff40 9px
  );
  background-size: 45px 8px;
  background-repeat: no-repeat;
  background-position: bottom;
}
.left-controls {
  position: fixed;
  left: 20px;
  bottom: 46px;
  z-index: 6;
  display: grid;
  gap: 10px;
}
.control-grid {
  display: grid;
  grid-template-columns: 36px 36px;
  gap: 9px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #14151caa;
  backdrop-filter: blur(5px);
  border: 1px solid #ffffff18;
  font-size: 21px;
  box-shadow: 0 1px 5px #0002;
}
.icon-btn:hover:not(:disabled) {
  background: #222131ee;
}
.icon-btn[aria-pressed="true"] {
  background: var(--purple);
}
.icon-btn svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: block;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.classic-compass {
  width: 40px;
  height: 40px;
  position: relative;
  border: 2px solid #fff5;
  border-radius: 50%;
  background: #eee4;
  margin-bottom: 7px;
  box-shadow: 0 1px 3px #0004;
}
.classic-compass:before {
  content: "N";
  position: absolute;
  top: -14px;
  left: 14px;
  font-size: 9px;
  font-weight: 800;
  text-shadow: 0 1px 3px #000;
}
.needle {
  position: absolute;
  inset: 6px;
  transform-origin: center;
}
.needle:before,
.needle:after {
  content: "";
  position: absolute;
  left: 8px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.needle:before {
  top: 0;
  border-bottom: 14px solid #f45b5b;
}
.needle:after {
  bottom: 0;
  border-top: 14px solid #fff;
}
.navigation-links {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}
.navigation-links button {
  background: #10121b88;
  color: #fff;
  border: 1px solid #fff5;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12px;
}
.attribution-pano {
  position: fixed;
  bottom: 5px;
  left: 12px;
  z-index: 5;
  font-size: 10px;
  text-shadow: 0 1px 3px #000;
  color: #fff;
}
.viewer-status {
  position: fixed;
  bottom: 6px;
  left: 200px;
  max-width: calc(100vw - 550px);
  z-index: 5;
  color: #fffe;
  background: #17132266;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 3px;
  pointer-events: none;
}
.pano-loading {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #171322e8;
  text-align: center;
  padding: 20px;
}
.pano-loading .loading-card {
  max-width: 440px;
}
.loading-orbit {
  width: 44px;
  height: 44px;
  border: 3px solid #ffffff20;
  border-top-color: var(--purple);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.guess-map {
  --map-w: 660px;
  --map-h: 430px;
  position: fixed;
  right: 20px;
  bottom: 30px;
  width: 285px;
  height: 215px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.92;
  transition:
    width 0.22s cubic-bezier(.2,.7,.3,1),
    height 0.22s cubic-bezier(.2,.7,.3,1),
    opacity 0.18s;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 155px);
}
/* Moving mode plays the official Google Street View embed: the custom
   renderer's controls and compasses cannot observe it and are hidden. */
body.embed-mode #panoCustom canvas,
body.embed-mode .brand-float,
body.embed-mode .attribution-pano,
body.embed-mode .viewer-status,
body.embed-mode #modernCompass,
body.embed-mode #classicCompass,
body.embed-mode #navigationLinks,
body.embed-mode #zoomIn,
body.embed-mode #zoomOut,
body.embed-mode #undoMove,
body.embed-mode #setCheckpoint,
body.embed-mode #returnStart,
body.embed-mode #returnCheckpoint {
  display: none !important;
}
#svEmbed {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
body.embed-mode #svEmbed {
  display: block;
}
.chat-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.chat-tabs button {
  flex: 1;
  padding: 5px 0;
  font-size: 12px;
  background: #ffffff14;
  color: #fff;
  border: 1px solid #ffffff2e;
  border-radius: 8px;
  cursor: pointer;
}
.chat-tabs button[aria-pressed="true"] {
  background: var(--purple, #6a5acd);
  border-color: transparent;
}
.guess-map.expanded,
.guess-map.pinned,
.guess-map.hovered,
.guess-map.keyboard-expanded {
  width: var(--map-w);
  height: var(--map-h);
  opacity: 1;
}
.map-body {
  flex: 1;
  min-height: 0;
  position: relative;
  box-shadow: 0 4px 24px #0005;
  border: 1px solid #ffffff70;
  border-radius: 8px;
  overflow: hidden;
}
#map,
#resultMap {
  height: 100%;
  width: 100%;
  background: #acd4e9;
}
.leaflet-container {
  font-family: Inter, sans-serif;
  color: #252536;
}
.leaflet-control-attribution {
  font-size: 9px !important;
  background: #ffffffe0 !important;
  color: #333 !important;
}
.leaflet-control-attribution a {
  color: #354e67 !important;
}
.leaflet-bar a {
  background: #fff !important;
  color: #333 !important;
}
.map-tools {
  position: absolute;
  left: 0;
  top: -38px;
  z-index: 900;
  display: flex;
  gap: 5px;
  /* Bridge the gap so moving from the map to its toolbar never leaves it. */
  padding-bottom: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.guess-map.hovered .map-tools,
.guess-map.expanded .map-tools,
.guess-map.keyboard-expanded .map-tools,
.guess-map.pinned .map-tools {
  opacity: 1;
  pointer-events: auto;
}
.map-tools .icon-btn {
  width: 32px;
  height: 32px;
  font-size: 15px;
  border: 1px solid #ffffff45;
  background: #242032ed;
  box-shadow: 0 1px 4px #0007;
  color: #fff;
}
.map-tools .icon-btn[aria-pressed="true"] { background: #8152d9; border-color: #c4a5ff; }
.map-resize {
  cursor: nwse-resize !important;
  touch-action: none;
}
.btn-guess {
  width: 100%;
  border-radius: 7px;
  font-size: 17px;
  height: 42px;
  flex-shrink: 0;
  padding: 6px 18px;
  background: linear-gradient(#98dc44, #64a02b);
  box-shadow: 0 2px 0 #446521;
  border: 0;
  font-style: italic;
  font-weight: 800;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  color: #fff;
}
.btn-guess:disabled {
  background: #282432e8;
  color: #dfdce6;
  opacity: 1;
  box-shadow: none;
}
.mobile-map-toggle {
  display: none;
}
.country-bar {
  position: fixed;
  right: 24px;
  bottom: 26px;
  width: 330px;
  display: flex;
  gap: 10px;
  background: #19152be8;
  border: 1px solid #fff3;
  border-radius: 12px;
  padding: 14px;
  z-index: 7;
}
.country-bar input {
  min-width: 0;
  font-size: 13px;
}
.country-bar .btn {
  padding: 8px 18px;
}
.round-pill {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  background: #25213dcc;
  color: #fff;
  font: italic 800 15px "Barlow Condensed";
  padding: 8px 18px;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}
.round-results {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #17122b;
  display: flex;
  flex-direction: column;
}
.result-map-wrap {
  flex: 1;
  min-height: 150px;
  position: relative;
}
.result-summary {
  background: linear-gradient(110deg, #18122e, #201638);
  padding: 22px 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
  border-top: 1px solid #fff1;
}
.result-numbers {
  display: flex;
  justify-content: center;
  gap: 45px;
  text-align: center;
}
.result-numbers strong {
  display: block;
  font:
    800 48px "Barlow Condensed",
    sans-serif;
  color: #d7f2ff;
  text-shadow: 0 0 24px #64bce755;
}
.result-numbers .points strong {
  color: #ffdc87;
  text-shadow: 0 0 24px #fc943f55;
}
.result-numbers small {
  font: italic 700 11px "Barlow Condensed";
  text-transform: uppercase;
  color: #a69bbe;
}
.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}
.result-context {
  font-size: 13px;
  color: var(--muted);
}
.result-context strong {
  display: block;
  color: white;
  margin-bottom: 5px;
}
.round-board {
  max-height: 230px;
  overflow: auto;
  border-top: 1px solid #fff1;
  background: #100d21;
  padding: 10px max(24px, calc((100vw - 1000px) / 2));
}
.board {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.board th {
  color: #a99dc4;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1px;
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid #fff1;
}
.board td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #fff1;
}
.board th:nth-child(2),
.board td:nth-child(2) {
  text-align: left;
}
.board .me {
  background: #8051d617;
}
.board .name-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}
.board .total {
  color: #ffe278;
  font-weight: 800;
}
.board .rank {
  color: var(--muted);
  font-weight: 800;
}
.result-pin {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #251f39;
  color: #fff;
  border: 3px solid white;
  box-shadow: 0 2px 6px #0007;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.result-pin.actual {
  background: #222331;
  color: #ffe378;
  font-size: 17px;
}
.drawer {
  position: fixed;
  top: 100px;
  right: 24px;
  width: 310px;
  max-height: calc(100vh - 340px);
  overflow: auto;
  background: #171228ef;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  padding: 18px;
  z-index: 8;
  box-shadow: 0 10px 35px #0005;
}
.drawer .board td {
  padding: 8px 3px;
}
.drawer .board th {
  padding: 8px 3px;
}
.drawer .chat-log {
  height: 120px;
}
.drawer h3 {
  font-size: 22px;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  border: 0;
  margin: 0;
  background: #131321d9;
  backdrop-filter: blur(13px);
  color: #fff;
  overflow-y: auto;
  padding: 28px 24px;
}
.modal::backdrop {
  background: #15132155;
}
.settings-content {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px 32px;
  background: #1a182be8;
  border: 1px solid #ffffff15;
  border-radius: 20px;
  box-shadow: 0 20px 80px #0004;
}
.settings-content h2 {
  text-align: center;
  margin: 0 0 32px;
  font-size: 32px;
}
.settings-content .field {
  margin: 24px 0;
  font: italic 700 13px "Barlow Condensed";
  color: #fff;
}
.settings-content .field > span {
  font: inherit;
  letter-spacing: 0;
}
.settings-content input[type="range"] {
  margin: 8px 0;
  width: 100%;
}
.settings-content .toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: italic 700 15px "Barlow Condensed";
  margin: 25px 0;
}
.settings-content input[type="checkbox"] { appearance: none; position: relative; width: 44px; height: 25px; padding: 0; border: 1px solid #ffffff22; border-radius: 20px; background: #454054; cursor: pointer; flex-shrink: 0; }
.settings-content input[type="checkbox"]::before { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 150ms ease; }
.settings-content input[type="checkbox"]:checked { background: #8b56e9; border-color: #af88f5; }
.settings-content input[type="checkbox"]:checked::before { transform: translateX(19px); }
.settings-content input[type="checkbox"]:disabled { opacity: .4; cursor: not-allowed; }
.settings-content .segmented { flex-wrap: wrap; gap: 4px; border: 0; padding: 0; }
.settings-content .segmented button { flex: 1 1 70px; min-height: 38px; border: 1px solid #ffffff20; border-radius: 6px; }
.segmented {
  display: flex;
  border: 1px solid #fff3;
  border-radius: 5px;
  padding: 3px;
  gap: 2px;
}
.segmented button {
  flex: 1;
  background: transparent;
  padding: 8px 4px;
  border-radius: 3px;
  font: italic 700 13px "Barlow Condensed";
  color: white;
  text-transform: uppercase;
}
.segmented button[aria-pressed="true"] {
  background: var(--purple);
}
.settings-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}
.settings-actions .btn {
  font-size: 15px;
}
.toast {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: #211937f5;
  color: #fff;
  border: 1px solid #a782ef99;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 4px 30px #0006;
  max-width: 90vw;
  text-align: center;
}
.final-header {
  text-align: center;
  margin: 5px 0 24px;
}
.final-header h1 {
  font-size: 52px;
  margin: 14px;
}
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  margin: 30px 0;
}
.podium-player {
  width: 160px;
  text-align: center;
}
.podium-player .avatar {
  width: 55px;
  height: 55px;
  font-size: 19px;
  margin-bottom: 12px;
}
.podium-player .place {
  margin-top: 16px;
  padding: 20px 0;
  background: linear-gradient(#664399, #201933);
  border-top: 3px solid #a77adc;
  font: 800 48px "Barlow Condensed";
  border-radius: 8px 8px 0 0;
}
.podium-player.first .place {
  height: 130px;
  background: linear-gradient(#8b6d2c, #302641);
  border-color: #ffdc65;
}
.podium-player.second .place {
  height: 100px;
}
.podium-player.third .place {
  height: 80px;
}
.final-map {
  height: 340px;
  border-radius: 12px;
  overflow: hidden;
}
.solo-results .final-header { margin-bottom: 26px; }
.solo-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px 40px;
  align-items: center;
  margin: 0 0 24px;
  padding: 28px 32px;
  background: linear-gradient(120deg, #2c2244, #1c1b30);
  border: 1px solid #ac82ed30;
  border-radius: 16px;
}
.solo-summary-player { display: flex; align-items: center; gap: 18px; }
.solo-summary-player .avatar { width: 56px; height: 56px; font-size: 20px; border: 2px solid #c9aaff; }
.solo-summary-player .eyebrow { font-size: 9px; color: #bba7df; }
.solo-summary-player h2 { margin-top: 5px; font-size: 29px; }
.solo-summary-score { display: flex; align-items: center; gap: 14px; }
.solo-summary-score > strong { color: #ffe48b; font: italic 800 60px "Barlow Condensed", sans-serif; }
.solo-summary-score > span { color: #eee6ff; font-size: 12px; }
.solo-summary-score small { display: block; color: #ada2c4; margin-top: 5px; font-size: 10px; }
.solo-summary-stats { grid-column: 1 / -1; margin: 0; padding-top: 23px; border-top: 1px solid #ffffff12; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.solo-summary-stats dt { font-size: 9px; text-transform: uppercase; color: #a79abb; letter-spacing: 1px; margin-bottom: 9px; }
.solo-summary-stats dd { margin: 0; font-size: 19px; font-weight: 700; }
.solo-summary-stats small { display: block; font-size: 10px; font-weight: 400; margin-top: 5px; color: #aaa1be; }
.podium-status { display: block; color: #bca9d7; font-size: 11px; margin: 10px 0; }
.table-scroll {
  overflow-x: auto;
}
.final-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.no-animation * {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 1000px) {
  .hero-globe {
    right: -30px;
    opacity: 0.45;
  }
  .lobby-grid {
    grid-template-columns: 280px 1fr;
  }
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modern-compass {
    top: 82px;
    width: 180px;
  }
  .timer { top: 126px; }
  .result-summary {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .result-context {
    display: none;
  }
  .result-numbers {
    justify-content: flex-start;
  }
  .hud-map {
    max-width: 150px;
  }
}
@media (max-width: 680px) {
  .site-header {
    height: 64px;
    padding: 0 20px;
  }
  .site-header nav {
    gap: 16px;
  }
  .container {
    padding: 22px 16px;
  }
  .hero {
    padding: 28px;
    min-height: 310px;
  }
  .hero-globe {
    right: -60px;
    top: 70px;
  }
  .landing-grid,
  .lobby-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid,
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 18px;
  }
  .mode-card {
    padding: 17px 13px;
  }
  .brand-float {
    top: 12px;
    left: 12px;
  }
  .brand-float .logo {
    font-size: 20px;
  }
  .hud-float {
    top: 8px;
    right: 12px;
    padding: 10px 12px;
    gap: 12px;
  }
  .hud-cell {
    font-size: 16px;
  }
  .hud-cell small {
    font-size: 9px;
  }
  .hud-cell + .hud-cell { padding-left: 12px; }
  .hud-map {
    max-width: 110px;
  }
  .timer {
    top: 110px;
    font-size: 15px;
  }
  body.embed-mode .hud-float { top: 90px; }
  body.embed-mode .timer { top: 156px; }
  .modern-compass {
    top: 68px;
    left: 50%;
    width: 150px;
  }
  .left-controls {
    left: 12px;
    bottom: 33px;
  }
  .control-grid {
    gap: 7px;
    grid-template-columns: 32px 32px;
  }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .guess-map {
    right: 12px;
    bottom: 25px;
    width: 195px;
    height: 175px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 135px);
  }
  .guess-map.expanded,
  .guess-map.pinned,
  .guess-map.hovered,
  .guess-map.keyboard-expanded {
    width: min(var(--map-w), calc(100vw - 32px));
    height: min(var(--map-h), 60dvh);
  }
  .mobile-map-toggle {
    display: flex;
    position: absolute;
    top: -48px;
    right: 0;
    width: 44px;
    height: 42px;
    background: #242032ed;
    border: 1px solid #ffffff45;
  }
  .map-tools {
    top: -48px;
    gap: 5px;
  }
  .map-tools .icon-btn { width: 40px; height: 42px; }
  .guess-map.expanded .map-tools, .guess-map.pinned .map-tools, .guess-map.keyboard-expanded .map-tools { opacity: 1; pointer-events: auto; }
  .settings-content { padding: 22px; }
  .navigation-links {
    bottom: 190px;
    max-width: 70vw;
    flex-wrap: wrap;
  }
  .viewer-status {
    left: 110px;
    bottom: 6px;
    max-width: calc(100vw - 125px);
  }
  .attribution-pano {
    font-size: 8px;
  }
  .country-bar {
    width: calc(100vw - 115px);
    right: 12px;
    padding: 9px;
    gap: 6px;
  }
  .country-bar input {
    padding: 10px;
    font-size: 11px;
  }
  .country-bar .btn {
    font-size: 13px;
    padding: 8px 12px;
  }
  .result-summary {
    padding: 17px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .result-numbers {
    gap: 40px;
  }
  .result-numbers strong {
    font-size: 33px;
  }
  .result-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }
  .round-board {
    max-height: 190px;
    padding: 8px;
  }
  .round-pill {
    top: 14px;
    font-size: 12px;
  }
  .drawer {
    right: 12px;
    top: 105px;
    width: calc(100vw - 100px);
    max-height: calc(100dvh - 300px);
  }
  .podium-player {
    width: 105px;
  }
  .final-map {
    height: 250px;
  }
  .field {
    font-size: 11px;
  }
  .notice {
    font-size: 11px;
  }
}
@media (max-width: 460px) {
  .solo-summary { padding: 20px; gap: 18px; grid-template-columns: 1fr; }
  .solo-summary-score { justify-content: center; }
  .solo-summary-stats { gap: 12px; }
  .solo-summary-stats dd { font-size: 17px; }
  .solo-summary-stats dt { font-size: 8px; letter-spacing: .5px; }
  .brand-float.logo { font-size: 20px; }
  .hud-float { top: 48px; left: 12px; right: 12px; justify-content: space-between; }
  .hud-map { max-width: 155px; }
  .modern-compass { top: 112px; left: 50%; right: auto; width: 150px; }
  .timer { top: 154px; right: auto; }
  body.embed-mode .timer { top: 156px; }
  .control-grid { grid-template-columns: 36px 36px; }
  .left-controls .icon-btn { width: 36px; height: 36px; }
  .left-controls { bottom: 40px; }
  .guess-map.expanded, .guess-map.pinned, .guess-map.keyboard-expanded { height: min(var(--map-h), 58dvh, 470px); }
  .country-bar { width: calc(100vw - 32px); right: 16px; bottom: 210px; }
  .settings-content { padding: 20px; }
  .modal { padding: 16px 12px; }
  .result-actions .btn { font-size: 13px; padding: 11px 14px; }
  .result-numbers { gap: 32px; }
}
@media (pointer: coarse) and (min-width: 701px) {
  .mobile-map-toggle { display: flex; position: absolute; top: -46px; right: 0; width: 42px; height: 40px; }
  .map-tools { top: -46px; }
  .map-tools .icon-btn { width: 40px; height: 40px; }
}
