:root {
  --bg: #061008;
  --green: #7cff6b;
  --green-dim: #3f9a38;
  --amber: #f0c14b;
  --text: #e8f8dc;
  --muted: #7f9a74;
  --panel: rgba(7, 14, 10, 0.88);
  --line: rgba(124, 255, 107, 0.2);
  --font: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
  --world-w: 3600px;
  --world-h: 2400px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body.in-camp {
  cursor: none;
}

/* ── GATE / LOGIN ── */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}

.gate-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.gate-bg-tex {
  position: absolute;
  inset: 0;
  background:
    url("/assets/textures/fa/forest_floor_leaves_a_01.jpg") center / 420px repeat,
    #070a06;
  filter: brightness(0.35) saturate(0.85) contrast(1.05);
}

.gate-bg-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 0%, rgba(4, 6, 3, 0.75) 70%, #040603 100%),
    linear-gradient(180deg, rgba(4, 8, 4, 0.4), rgba(4, 6, 3, 0.85));
}

.gate-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 30% 30%, rgba(240, 193, 75, 0.12), transparent 60%),
    radial-gradient(500px 360px at 75% 65%, rgba(124, 255, 107, 0.1), transparent 55%);
}

.gate-frame {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  animation: rise 0.55s ease both;
}

.gate-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.gate-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--green);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124, 255, 107, 0.3);
  background: rgba(8, 14, 8, 0.7);
  backdrop-filter: blur(10px);
}

.gate-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}

.gate-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--amber);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 193, 75, 0.35);
  background: rgba(20, 14, 4, 0.65);
  backdrop-filter: blur(10px);
}

.gate-hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  padding: 40px 36px;
  border-radius: 28px;
  border: 1px solid rgba(240, 193, 75, 0.22);
  background:
    linear-gradient(145deg, rgba(14, 16, 12, 0.88), rgba(6, 8, 5, 0.94));
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 80px rgba(240, 193, 75, 0.06);
  backdrop-filter: blur(16px);
}

.gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.gate-tagline {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: 28ch;
}

.emblem {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.emblem-wordmark {
  width: min(380px, 100%);
  height: auto;
  min-height: 0;
}

.emblem img {
  position: relative;
  z-index: 2;
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 24px rgba(240, 193, 75, 0.35));
  animation: emblemFloat 5s ease-in-out infinite;
}

.emblem-wordmark img {
  width: 100%;
  height: auto;
  max-width: 380px;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.55));
  animation: emblemFloat 5s ease-in-out infinite;
}

.emblem-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(240, 193, 75, 0.35);
  box-shadow: 0 0 40px rgba(240, 193, 75, 0.12);
  animation: ringSpin 22s linear infinite;
}

.emblem-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: #f0c14b;
  border-right-color: rgba(124, 255, 107, 0.4);
}

.emblem-ring-2 {
  inset: 28px;
  animation-direction: reverse;
  animation-duration: 14s;
  opacity: 0.7;
  border-color: rgba(124, 255, 107, 0.25);
}

.gate-copy {
  min-width: 0;
}

.gate-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 12px;
}

.gate-copy h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #f4ffe8;
  margin-bottom: 14px;
}

.gate-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #f0c14b 0%, #ffe08a 40%, #7cff6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 40ch;
  margin-bottom: 20px;
}

.pot {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(240, 193, 75, 0.4);
  background: linear-gradient(90deg, rgba(240, 193, 75, 0.14), rgba(20, 16, 8, 0.5));
}

.pot-left {
  padding: 14px 18px;
  min-width: 46%;
  border-right: 1px solid rgba(240, 193, 75, 0.2);
}

.pot-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}

.pot-amount {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  color: #ffe9a8;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pot-amount small {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.pot-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text);
}

.pot-right span {
  opacity: 0.85;
}

.pot-right span::before {
  content: "▸ ";
  color: var(--green);
}

.gate-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.step {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(124, 255, 107, 0.12);
  background: rgba(8, 12, 8, 0.55);
}

.step b {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 6px;
}

.step span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.ca-chip {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(124, 255, 107, 0.28);
  background: rgba(8, 14, 10, 0.72);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ca-chip:hover {
  border-color: rgba(124, 255, 107, 0.5);
  background: rgba(12, 22, 14, 0.9);
  transform: translateY(-1px);
}

.ca-chip:active {
  transform: translateY(0);
}

.ca-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #061008;
  background: var(--green);
  padding: 4px 8px;
  border-radius: 6px;
}

.ca-value {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(232, 248, 220, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-ligatures: none;
}

.ca-action {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.ca-chip.is-copied {
  border-color: rgba(124, 255, 107, 0.55);
  background: rgba(124, 255, 107, 0.1);
}

.ca-chip.is-copied .ca-action {
  color: var(--green);
}

.enter {
  appearance: none;
  width: 100%;
  border: none;
  background: linear-gradient(180deg, #f0c14b 0%, #c9961e 100%);
  color: #1a1204;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 22px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow:
    0 12px 40px rgba(240, 193, 75, 0.28),
    0 0 0 1px rgba(255, 230, 150, 0.35) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.pill-ca {
  cursor: pointer;
  color: var(--amber) !important;
  border-color: rgba(240, 193, 75, 0.35) !important;
  font-family: var(--font);
  letter-spacing: 0.08em !important;
}

.pill-ca:hover {
  border-color: rgba(240, 193, 75, 0.6) !important;
  background: rgba(240, 193, 75, 0.1) !important;
}

.pill-ca.is-copied {
  color: var(--green) !important;
  border-color: rgba(124, 255, 107, 0.45) !important;
}

.enter:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 48px rgba(240, 193, 75, 0.4),
    0 0 0 1px rgba(255, 230, 150, 0.45) inset;
}

.enter:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.gate-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

.gate.is-out {
  animation: fadeOut 0.4s ease both;
  pointer-events: none;
}

@keyframes emblemFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes ringSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 780px) {
  .gate-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
    padding: 26px 20px;
  }

  .gate-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .gate-steps {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .pot {
    flex-direction: column;
  }

  .pot-left {
    border-right: none;
    border-bottom: 1px solid rgba(240, 193, 75, 0.2);
  }

  .emblem {
    width: 180px;
    height: 180px;
  }

  .emblem img {
    width: 132px;
    height: 132px;
  }

  .emblem-wordmark {
    width: min(300px, 88vw);
  }

  .emblem-wordmark img {
    width: 100%;
    height: auto;
    max-width: 300px;
  }

  .gate-brand {
    order: -1;
  }
}

/* ── HUD ── */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  pointer-events: none;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hud-logo {
  width: 72px;
  height: auto;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.hud-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hud-meta strong {
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.hud-meta span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .hud-logo {
    width: 56px;
  }

  .hud-meta strong {
    font-size: 11px;
  }
}

.hud-brand strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--green);
}

.hud-brand span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.hud-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  pointer-events: auto;
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--green);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pill-dim {
  color: var(--amber);
}

.pill-reward {
  color: #1a1408;
  background: linear-gradient(180deg, #f0c14b, #c9a030);
  border-color: rgba(255, 220, 120, 0.6);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(240, 193, 75, 0.35);
}

.toast {
  pointer-events: none;
  max-width: min(420px, 70vw);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(240, 193, 75, 0.35);
  background: rgba(10, 16, 10, 0.94);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: rise 0.25s ease both;
}

.hint-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  max-width: 94vw;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.found-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 230px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  pointer-events: none;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.found-panel h3 {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 4px;
}

.found-sub {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.found-panel ul {
  list-style: none;
  display: grid;
  gap: 4px;
}

.found-panel li {
  font-size: 11px;
  color: var(--green);
}

.found-panel li.miss {
  color: var(--muted);
  opacity: 0.55;
}

.found-panel li.partial {
  color: var(--amber);
  opacity: 0.9;
}

.pill-open {
  color: #061008 !important;
  background: linear-gradient(180deg, #7cff6b, #3f9a38) !important;
  border-color: rgba(124, 255, 107, 0.6) !important;
  font-weight: 800;
}

.found-panel {
  pointer-events: auto;
  max-height: min(42vh, 320px);
  overflow: auto;
  width: min(260px, 88vw);
}

.found-panel ul {
  max-height: 220px;
  overflow: auto;
}

/* ── INTERIOR ── */
.interior {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.interior[hidden] {
  display: none !important;
}

.interior-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 3, 0.72);
  backdrop-filter: blur(8px);
}

.interior-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(240, 193, 75, 0.28);
  background:
    linear-gradient(160deg, rgba(18, 22, 14, 0.97), rgba(6, 10, 6, 0.98));
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  padding: 18px 18px 14px;
  animation: rise 0.28s ease both;
}

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

.interior-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}

.interior-top h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f4ffe8;
  line-height: 1.05;
}

.interior-exit {
  appearance: none;
  border: 1px solid rgba(124, 255, 107, 0.3);
  background: rgba(124, 255, 107, 0.08);
  color: var(--green);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.interior-exit:hover {
  background: rgba(124, 255, 107, 0.16);
}

.interior-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.room-tab {
  appearance: none;
  border: 1px solid rgba(124, 255, 107, 0.16);
  background: rgba(8, 14, 10, 0.7);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.room-tab:hover {
  border-color: rgba(124, 255, 107, 0.35);
  color: var(--text);
}

.room-tab.is-active {
  border-color: rgba(240, 193, 75, 0.55);
  background: rgba(240, 193, 75, 0.12);
  color: var(--amber);
}

.room-tab.is-cleared {
  color: var(--green);
}

.room-tab.is-cleared.is-active {
  color: var(--amber);
}

.interior-stage {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(124, 255, 107, 0.14);
  min-height: 220px;
  overflow: hidden;
  background: #0a120c;
}

.interior-stage-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(240, 193, 75, 0.08), transparent 55%),
    linear-gradient(180deg, #121a14 0%, #0a100c 55%, #070c08 100%);
}

.interior-stage-bg[data-mood="wood"] {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(180, 120, 50, 0.12), transparent 50%),
    linear-gradient(180deg, #1a1610 0%, #0e0c08 100%);
}

.interior-stage-bg[data-mood="stone"] {
  background:
    radial-gradient(ellipse 60% 40% at 50% 20%, rgba(120, 140, 130, 0.12), transparent 50%),
    linear-gradient(180deg, #121816 0%, #090c0a 100%);
}

.interior-stage-bg[data-mood="loft"] {
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(124, 255, 107, 0.08), transparent 50%),
    linear-gradient(180deg, #101814 0%, #080c0a 100%);
}

.interior-stage-bg[data-mood="cellar"] {
  background:
    radial-gradient(ellipse 40% 30% at 50% 80%, rgba(80, 60, 40, 0.2), transparent 50%),
    linear-gradient(180deg, #0a0c0a 0%, #050604 100%);
}

.interior-stage-label {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 248, 220, 0.55);
}

.interior-items {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 44px 14px 16px;
  min-height: 220px;
}

.room-item {
  appearance: none;
  border: 1px solid rgba(124, 255, 107, 0.16);
  background: rgba(8, 14, 10, 0.75);
  border-radius: 14px;
  padding: 14px 10px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  text-align: center;
}

.room-item:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(240, 193, 75, 0.45);
  background: rgba(14, 20, 12, 0.9);
}

.room-item:disabled,
.room-item.is-done {
  opacity: 0.55;
  cursor: default;
  border-color: rgba(124, 255, 107, 0.28);
}

.room-item .emoji {
  font-size: 22px;
  line-height: 1;
  filter: grayscale(0.15);
}

.room-item .name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(232, 248, 220, 0.9);
}

.room-item .tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.room-item.is-done .tag {
  color: var(--green);
}

.interior-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

.interior-foot #interior-progress {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.06em;
}

body.in-interior {
  cursor: auto;
}

body.in-interior .viewport {
  filter: blur(2px) brightness(0.7);
}

/* ── VICTORY ── */
.victory {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.victory[hidden] {
  display: none !important;
}

.victory-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(240, 193, 75, 0.18), transparent 55%),
    rgba(2, 6, 3, 0.82);
  backdrop-filter: blur(10px);
}

.victory-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  text-align: center;
  padding: 36px 28px 28px;
  border-radius: 24px;
  border: 1px solid rgba(240, 193, 75, 0.4);
  background:
    linear-gradient(160deg, rgba(20, 18, 10, 0.98), rgba(6, 10, 6, 0.98));
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(240, 193, 75, 0.12);
  animation: rise 0.4s ease both;
}

.victory-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--green);
  margin-bottom: 12px;
}

.victory-card h2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #f4ffe8;
  margin-bottom: 14px;
}

.victory-card h2 em {
  font-style: normal;
  background: linear-gradient(100deg, #f0c14b, #ffe08a 45%, #7cff6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.victory-lead {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.victory-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.victory-stats div {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(124, 255, 107, 0.16);
  background: rgba(8, 14, 10, 0.65);
}

.victory-stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.02em;
}

.victory-stats span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.victory-btn {
  width: 100%;
}

/* ── WORLD ── */
.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #050c08;
}

.viewport::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.45);
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.22) 100%);
}

.world {
  position: absolute;
  width: var(--world-w);
  height: var(--world-h);
  transform-origin: 0 0;
  will-change: transform;
}

#ground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.props {
  position: absolute;
  inset: 0;
}

.prop {
  position: absolute;
  transform: translate(-50%, -70%);
  user-select: none;
  touch-action: none;
  z-index: 3;
}

.prop.prop-model,
.prop.prop-home {
  z-index: 6;
}

.prop .sprite {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 50%),
    rgba(8, 14, 10, 0.72);
  border: 1px solid rgba(124, 255, 107, 0.18);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.prop .icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  line-height: 0;
}

.prop .icon svg {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.prop.landmark .sprite {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border-color: rgba(240, 193, 75, 0.28);
  background:
    linear-gradient(160deg, rgba(240, 193, 75, 0.14), transparent 55%),
    rgba(10, 14, 10, 0.82);
}

.prop.landmark .icon,
.prop.landmark .icon svg {
  width: 40px;
  height: 40px;
}

.prop.prop-env .sprite {
  width: 40px;
  height: 40px;
  background: rgba(8, 14, 10, 0.45);
  border-color: rgba(124, 255, 107, 0.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.prop.prop-env .icon,
.prop.prop-env .icon svg {
  width: 30px;
  height: 30px;
}

.prop.kind-tree .sprite,
.prop.kind-bush .sprite {
  background: transparent;
  border: none;
  box-shadow: none;
}

.prop.kind-tree .icon svg,
.prop.kind-bush .icon svg {
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}

/* Building models — force image display (override landmark box styles) */
.prop.prop-model .sprite,
.prop.prop-home .sprite,
.prop.landmark.prop-model .sprite,
.prop.kind-vault.prop-model .sprite {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

.prop.prop-model .sprite-img,
.prop.prop-home .sprite-img {
  display: block !important;
  width: 120px !important;
  height: 120px !important;
  max-width: none !important;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.prop.kind-vault .sprite-img,
.prop.kind-lodge .sprite-img {
  width: 140px !important;
  height: 140px !important;
}

.prop.kind-tower .sprite-img {
  width: 100px !important;
  height: 130px !important;
}

.prop.kind-shop .sprite-img,
.prop.kind-shack .sprite-img,
.prop.kind-tent .sprite-img {
  width: 110px !important;
  height: 110px !important;
}

.prop.is-hot.prop-model .sprite-img {
  transform: scale(1.12) translateY(-6px);
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 14px rgba(240, 193, 75, 0.5));
}

.prop.home-used .sprite-img {
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 12px rgba(124, 255, 107, 0.45));
}

.prop.home-used .label::after {
  content: " · used";
  color: var(--green);
}

.prop.kind-fire .sprite {
  border-color: rgba(255, 140, 40, 0.45);
  box-shadow: 0 0 22px rgba(255, 120, 30, 0.35);
}

.prop.kind-chest:not(.prop-model) .sprite {
  border-color: rgba(240, 193, 75, 0.45);
  box-shadow: 0 0 20px rgba(240, 193, 75, 0.25);
}

.prop.is-hot:not(.prop-model) .sprite {
  transform: scale(1.14) translateY(-3px);
  border-color: rgba(124, 255, 107, 0.55);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(124, 255, 107, 0.4);
}

.prop .label {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(232, 248, 220, 0.9);
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 12, 8, 0.78);
  border: 1px solid rgba(124, 255, 107, 0.15);
}

.prop.is-hot .label {
  opacity: 1;
}

.prop.clue-found .sprite {
  filter: saturate(1.2);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(240, 193, 75, 0.55);
  border-color: rgba(240, 193, 75, 0.55);
}

/* floating text / dirt pops */
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.popup {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--amber);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  animation: pop 1.1s ease forwards;
  white-space: nowrap;
  pointer-events: none;
  font-weight: 600;
}

.popup.green {
  color: var(--green);
}

.dirt {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6a5030;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  animation: dirt 0.7s ease forwards;
  pointer-events: none;
}

/* cursors */
.cursors {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cursor-el {
  position: absolute;
  transform: translate(-3px, -2px);
  transition: left 0.05s linear, top 0.05s linear;
  z-index: 5;
}

.cursor-el.you {
  transition: none;
  z-index: 10;
}

.cursor-el .pointer {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.cursor-el.you .pointer {
  width: 32px;
  height: 32px;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 8px rgba(124, 255, 107, 0.45));
}

.cursor-el .tag {
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 12, 8, 0.88);
  border: 1px solid rgba(124, 255, 107, 0.28);
  color: var(--green);
  white-space: nowrap;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cursor-el.bot .tag {
  border-color: rgba(240, 193, 75, 0.35);
  color: var(--amber);
}

.you-label {
  position: absolute;
  pointer-events: none;
  font-size: 10px;
  color: var(--green);
  opacity: 0;
}

.trail {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(124, 255, 107, 0.4);
  pointer-events: none;
  animation: trail 0.8s ease forwards;
  box-shadow: 0 0 6px rgba(124, 255, 107, 0.35);
}

.loading-map {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #061008;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -90%);
  }
}

@keyframes dirt {
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy));
  }
}

@keyframes trail {
  to {
    opacity: 0;
    transform: scale(0.2);
  }
}

@keyframes cluePulse {
  0%,
  100% {
    box-shadow:
      0 10px 18px rgba(0, 0, 0, 0.35),
      0 0 16px rgba(124, 255, 107, 0.2);
  }
  50% {
    box-shadow:
      0 10px 18px rgba(0, 0, 0, 0.35),
      0 0 28px rgba(124, 255, 107, 0.45);
  }
}

@media (max-width: 640px) {
  .hint-bar {
    font-size: 10px;
    bottom: 10px;
  }
  .found-panel {
    display: none;
  }
}
