:root {
  --pine: #173c33;
  --deep: #102e28;
  --paper: #eee8d7;
  --ink: #233c32;
  --muted: #718074;
  --gold: #edbd59;
  --line: #c9ceba;
  --rust: #a94c33;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
input:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -70px;
}
.skip:focus {
  top: 8px;
  z-index: 9;
  background: white;
  padding: 12px;
}
header {
  height: 94px;
  padding: 0 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--pine);
  color: #f7f0d8;
  gap: 24px;
}
.brand {
  font:
    900 29px Georgia,
    serif;
  letter-spacing: -1.4px;
  white-space: nowrap;
}
.brand span {
  display: block;
  font: 8px monospace;
  letter-spacing: 2.7px;
  margin: 5px 0 0 28px;
}
nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 13px;
}

.link {
  background: none;
  color: inherit;
  padding: 10px 0;
  font-size: 13px;
  text-align: left;
}
.outline {
  background: transparent;
  color: inherit;
  border: 1px solid #728c74;
  padding: 12px 18px;
  border-radius: 4px;
}
.hero {
  height: min(660px, 69vw);
  min-height: 490px;
  position: relative;
  overflow: hidden;
  background: #558296;
}
.hero canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  position: absolute;
  inset: 0;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: #0a272430;
}
.hero-copy {
  position: relative;
  color: #fff5db;
  margin-left: 8%;
  padding-top: 82px;
}
.eyebrow {
  font: 10px monospace;
  letter-spacing: 1.6px;
  font-weight: 600;
}
.hero h1 {
  font:
    700 clamp(60px, 6.7vw, 94px)/0.97 Georgia,
    serif;
  letter-spacing: -4px;
  margin: 28px 0 22px;
  text-shadow: 0 3px 0 #102e2833;
}
.hero p {
  font-size: 17px;
  line-height: 1.65;
  color: #f3edda;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 28px;
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  min-height: 44px;
  padding: 14px 21px;
  font-size: 13px;
  font-weight: 600;
  
}




.hero-agent {
  background: none;
  color: #fff4d9;
  padding: 15px 0;
  font-size: 13px;
}
.hero-bottom {
  position: absolute;
  bottom: 25px;
  left: 4.5%;
  right: 4.5%;
  display: flex;
  justify-content: space-between;
  color: #faf0d6;
  font: 9px monospace;
  letter-spacing: 1px;
}
i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9fc780;
  margin-right: 8px;
}
.intro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 63px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
h2 {
  font:
    500 38px/1.15 Georgia,
    serif;
  letter-spacing: -1px;
  margin: 12px 0;
}
p {
  font-size: 14px;
  line-height: 1.75;
  color: #627164;
}
.intro p {
  max-width: 460px;
}
.frontier {
  max-width: 1400px;
  margin: auto;
  padding: 35px 4% 50px;
  border-top: 1px solid var(--line);
}
.section-top {
  display: flex;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.section-top h2 {
  margin-bottom: 0;
}
.practice {
  font: 11px monospace;
  text-transform: uppercase;
  background: #dce3d0;
  padding: 12px 16px;
  border: 1px solid #bac7ab;
  border-radius: 3px;
}
.practice span {
  display: block;
  font: 11px Arial;
  text-transform: none;
  color: #667362;
  margin-top: 4px;
}
#clock {
  font: 12px monospace;
  color: #627164;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 5px 5px 0 0;
  background: #f4efdf;
}
.stats > div {
  padding: 21px 24px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  border: 0;
}
.stats span {
  display: block;
  font-size: 11px;
  color: #6a7767;
  margin-bottom: 7px;
}
.stats strong {
  font: 600 23px Georgia;
}
.stats small {
  font: 11px Arial;
  color: #778270;
  display: block;
  margin-top: 6px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  
  
}
.map-wrap {
  background: #2c513c;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.map-bar {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  color: #dce8c2;
  font: 9px monospace;
  gap: 10px;
}
.map-bar button {
  
  
  min-width: 32px;
  min-height: 30px;
  margin-left: 4px;
  font-size: 11px;
}
.map-wrap canvas {
  display: block;
  width: 100%;
  height: 480px;
  image-rendering: pixelated;
  touch-action: none;
  cursor: crosshair;
}
.map-legend {
  display: flex;
  gap: 16px;
  padding: 14px;
  color: #cddbb8;
  font: 10px monospace;
  flex-wrap: wrap;
}
.map-legend span:nth-child(2) {
  color: #d6be79;
}
.map-legend span:nth-child(3) {
  color: #b2b0a1;
}
.map-hint {
  position: absolute;
  left: 16px;
  bottom: 60px;
  background: #18372bdf;
  color: #d8e0c4;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 10px;
  pointer-events: none;
}
aside {
  padding: 25px 22px;
  background: #f4efdf;
}
h3 {
  font: 500 25px Georgia;
  letter-spacing: -0.5px;
  margin: 12px 0;
}
aside p {
  font-size: 12px;
}
aside > button {
  width: 100%;
  margin-top: 10px;
}
.survey-result {
  border: 1px dashed #b8bea5;
  padding: 14px;
  margin: 24px 0;
  font: 12px monospace;
  color: #71815f;
  background: #e8ebd9;
}
.plot-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #d9dbca;
}
.plot-info b {
  text-align: right;
}
.fine {
  font-size: 11px;
  line-height: 1.6;
}
.camp {
  max-width: 1260px;
  margin: 25px auto 60px;
  padding: 0 32px;
}
.camp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.camp-grid article {
  padding: 28px;
  
}

.camp-icon {
  font: 30px Georgia;
  color: #ac7e30;
}
.camp-grid p {
  font-size: 12px;
  min-height: 50px;
}
label {
  display: block;
  font-size: 11px;
  color: #67745e;
  margin: 16px 0 8px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  background: #faf5e8;
  border: 1px solid #bdc5b2;
  color: var(--ink);
  padding: 12px;
  margin-top: 8px;
  border-radius: 3px;
  min-height: 44px;
}
textarea {
  height: 90px;
  font: 11px monospace;
  overflow-wrap: anywhere;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.camp-grid button {
  margin-top: 12px;
}
.journal {
  background: #e0e3d1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 50px max(5%, calc((100vw - 1150px) / 2));
  border-block: 1px solid #bfc8ae;
}
.journal h2 {
  font-size: 29px;
}
#activity p {
  padding: 10px 0;
  border-bottom: 1px solid #c7ceba;
  font-size: 12px;
  margin: 0;
}
footer {
  padding: 35px 5%;
  background: var(--pine);
  color: #c9d5b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}
footer .brand {
  font-size: 23px;
}
footer span,
footer > a:last-child {
  font-size: 11px;
}
dialog {
  
  
  
  
  max-width: 500px;
  width: calc(100% - 30px);
  padding: 36px;
  
}
dialog::backdrop {
  background: #0d261ccd;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 32px;
}
dialog .primary {
  margin-top: 20px;
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 26px;
  background: none;
  color: inherit;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep);
  color: #fff2d0;
  padding: 15px 22px;
  max-width: 90vw;
  border: 1px solid #789470;
  border-radius: 5px;
  z-index: 50;
  font-size: 13px;
}
details {
  margin-top: 16px;
  font-size: 12px;
}
summary {
  cursor: pointer;
  min-height: 32px;
}
pre {
  font: 10px/1.7 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#nearby button {
  display: block;
  width: 100%;
  padding: 8px;
  text-align: left;
  
  
  
}
#action-result {
  padding: 10px 0;
  font: 13px/1.6 monospace;
  color: #9a6721;
}
#wallet-status {
  font-size: 11px;
  color: #738068;
}
@media (max-width: 800px) {
  header {
    height: auto;
    min-height: 80px;
    padding: 16px 5%;
    flex-wrap: wrap;
    gap: 14px;
  }
  .brand {
    font-size: 24px;
  }
  nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
  }
  header > .outline {
    font-size: 11px;
    padding: 10px;
  }
  .hero {
    min-height: 540px;
  }
  .hero-copy {
    margin-left: 7%;
    padding-top: 80px;
  }
  .hero h1 {
    font-size: 65px;
  }
  .hero-bottom {
    font-size: 8px;
  }
  .hero-bottom > span:last-child {
    display: none;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 38px 6%;
  }
  .intro h2 {
    font-size: 33px;
  }
  .section-top {
    flex-wrap: wrap;
    gap: 15px;
  }
  .section-top h2 {
    font-size: 31px;
  }
  .practice {
    font-size: 9px;
  }
  #clock {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats > div {
    padding: 17px;
    border-bottom: 1px solid var(--line);
  }
  .stats strong {
    font-size: 20px;
  }
  .game-layout {
    grid-template-columns: 1fr;
  }
  .map-wrap canvas {
    height: 390px;
  }
  aside {
    border-top: 1px solid var(--line);
  }
  .camp-grid {
    grid-template-columns: 1fr;
  }
  
  .camp {
    padding: 0 5%;
  }
  .journal {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 35px 6%;
  }
  footer {
    flex-wrap: wrap;
  }
  footer span {
    display: none;
  }
  h2 {
    font-size: 30px;
  }
  .map-bar > span {
    font-size: 8px;
  }
  .hero-actions {
    gap: 17px;
  }
  .hero-agent {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.close-plot {
  display: none;
}
@media (max-width: 800px) {
  #plot-panel.mobile-open {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 65dvh;
    overflow: auto;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 50px #18372b55;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  #plot-panel.mobile-open .close-plot {
    display: block;
    width: auto;
    margin: 0 0 14px auto;
    background: transparent;
    color: var(--ink);
    min-height: 44px;
  }
  .map-bar {
    height: 60px;
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  .map-bar > div {
    display: flex;
  }
  .map-bar button {
    min-height: 32px;
  }
}
/* Landscape entrance; gameplay is a separate authenticated view. */
[hidden] {
  display: none !important;
}
.at-gate nav a[href="#camp"] {
  display: none;
}
.in-game .hero,
.in-game .intro {
  display: none;
}
.hero {
  height: auto;
  min-height: 0;
}
.landscape-scene {
  position: relative;
  aspect-ratio: 2/1;
  max-height: 740px;
  overflow: hidden;
}
.hero-copy {
  position: absolute;
  top: 0;
  left: 0;
  padding-top: 80px;
}
.hero-bottom {
  pointer-events: none;
}
#wallet-message {
  font-size: 13px;
  color: #685e39;
}
.in-game .frontier {
  padding-top: 35px;
}
@media (max-width: 800px) {
  .landscape-scene {
    aspect-ratio: 3/2;
    max-height: none;
  }
  .hero-copy {
    position: relative;
    padding: 30px 6% 38px;
    margin: 0;
    background: #183b32;
  }
  .hero h1 {
    font-size: 52px;
  }
  .hero-bottom {
    display: none;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
}
/* Single-scene RPG entrance, inspired by illustrated title screens. */
.at-gate {
  background: #132b24;
}
.at-gate > header,
.at-gate > footer,
.at-gate > .skip {
  display: none;
}
.at-gate main {
  min-height: 100svh;
}
.at-gate .hero {
  height: 100svh;
  min-height: 620px;
  isolation: isolate;
}
.at-gate .landscape-scene {
  position: absolute;
  inset: 0;
  max-height: none;
  aspect-ratio: auto;
}
.at-gate .hero-shade {
  background: #071b2135;
}
.hero-copy.title-screen {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 760px);
  margin: 0;
  padding: 0;
  text-align: center;
  background: transparent;
}
.title-ornament {
  font: 26px Georgia;
  color: #f3d695;
  text-shadow: 0 2px #483421;
  margin-bottom: 2px;
}
.hero h1.eureka-logo {
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(76px, 10.5vw, 152px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
  margin: 0;
  padding: 0 8px;
  color: #efd599;
  background: linear-gradient(
    #fff0bb 18%,
    #e6be64 47%,
    #8b5828 49%,
    #d4a74e 56%,
    #f0d898 77%,
    #ba873b 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #402c17) drop-shadow(0 4px 0 #332617)
    drop-shadow(0 7px 4px #09140de0);
  -webkit-text-stroke: 1px #b49352;
}
.hero p.game-subtitle {
  color: #f7e6b6;
  font:
    600 clamp(11px, 1.25vw, 16px)/1.5 Georgia,
    serif;
  letter-spacing: 0.43em;
  text-indent: 0.43em;
  margin: 9px 0 40px;
  text-shadow: 0 2px 3px #172013;
}
.hero .enter-button {
  margin: auto;
  min-width: 228px;
  justify-content: center;
  gap: 26px;
  padding: 17px 26px;
  
  
  
  
  
  font:
    600 17px Georgia,
    serif;
  transition: background 0.15s;
}

.hero p.entry-caption {
  color: #ecdfbd;
  font:
    12px Georgia,
    serif;
  margin: 19px 0 0;
  text-shadow: 0 1px 3px #10221b;
}
.prospector-npc {
  position: absolute;
  left: 12%;
  bottom: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.npc-sprite {
  width: 80px;
  height: 110px;
  image-rendering: pixelated;
  filter: drop-shadow(2px 3px 0 #17241b80);
}
.npc-speech {
  position: relative;
  margin: 0 0 13px;
  padding: 14px 19px;
  border: 2px solid #3b3a28;
  border-radius: 2px;
  background: #efe3bd;
  color: #3b3c27;
  font:
    14px/1.3 Georgia,
    serif;
  box-shadow: 0 3px 0 #18271e80;
}
.npc-speech:after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  bottom: -8px;
  left: calc(50% - 6px);
  background: #efe3bd;
  border-right: 2px solid #3b3a28;
  border-bottom: 2px solid #3b3a28;
  transform: rotate(45deg);
}
.npc-name {
  font: 9px monospace;
  color: #f0e3ba;
  letter-spacing: 1px;
  text-shadow: 1px 2px 2px #10231a;
}
.hero-bottom.gate-bottom {
  position: absolute;
  bottom: 24px;
  left: 32px;
  right: 32px;
  color: #e2e6ca;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 10px monospace;
  text-shadow: 0 1px 3px #10211d;
  pointer-events: auto;
}
.gate-bottom .hero-agent {
  font:
    12px Georgia,
    serif;
  color: #f2e5c3;
  background: transparent;
  padding: 10px;
  min-height: 44px;
}
@media (max-width: 800px) {
  .at-gate .hero {
    min-height: 660px;
  }
  .hero-copy.title-screen {
    top: 15%;
    width: 94%;
    padding: 0;
  }
  .hero h1.eureka-logo {
    font-size: clamp(68px, 16vw, 110px);
  }
  .hero p.game-subtitle {
    font-size: 10px;
    letter-spacing: 0.28em;
    margin: 10px 0 28px;
  }
  .hero .enter-button {
    min-width: 212px;
    font-size: 16px;
  }
  .prospector-npc {
    left: 50%;
    transform: translateX(-50%);
    bottom: 13%;
    width: 90%;
  }
  .npc-sprite {
    width: 64px;
    height: 88px;
  }
  .npc-speech {
    font-size: 13px;
    padding: 12px 16px;
  }
  .hero-bottom.gate-bottom {
    bottom: 10px;
    left: 14px;
    right: 14px;
    font-size: 8px;
    gap: 10px;
  }
  .gate-bottom .hero-agent {
    font-size: 11px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero .enter-button {
    transition: none;
  }
}
.hero .npc-speech{color:#3b3c27;font:14px/1.3 Georgia,serif;text-shadow:none}
