/* Original frontier RPG chrome: brass, weathered timber, dark slate. */
.frontier-tagline.game-subtitle {
  font:
    italic 23px/1.4 Georgia,
    serif !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  margin: 14px 0 34px !important;
}
.mobile-game-nav {
  display: none;
}
.in-game {
  --ink: #e4d5ae;
  --line: #665a3b;
  --pine: #192721;
  background: #171e1b;
  color: var(--ink);
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    #ffffff02 3px 4px
  );
}
.in-game header {
  height:auto;
  min-height:76px;
  flex-wrap:wrap;
  padding:12px 24px;
  background: #222820;
  border-bottom: 4px ridge #74674a;
  box-shadow: 0 3px 0 #101711;
  gap: 20px;
}
.in-game header .brand {
  color: #eac985;
  font-size: 27px;
  text-shadow: 1px 2px #090f0a;
}
.in-game header .brand span {
  color: #9c9e80;
  font-size: 8px;
}
.in-game header nav {
  gap: 6px;
}
.in-game header nav a,
.in-game header nav button {
  padding: 12px 19px;
  
  font:
    13px Georgia,
    serif;
  
}

.in-game #profile-button {
  
  
  
  font: 12px monospace;
}
.in-game #game {
  max-width: 1500px;
  margin: auto;
  padding: 24px 28px 32px;
}
#game[data-view="frontier"] #camp,
#game[data-view="frontier"] #journal,
#game[data-view="camp"] #frontier,
#game[data-view="camp"] #journal,
#game[data-view="journal"] #frontier,
#game[data-view="journal"] #camp {
  display: none;
}
.in-game .frontier,
.in-game .camp {
  margin: 0;
  padding: 0;
  max-width: none;
}
.in-game .section-top {
  margin-bottom: 20px;
  gap: 15px;
}
.in-game .eyebrow {
  color: #a39e7a;
  font-size: 9px;
  letter-spacing: 2px;
}
.in-game h2 {
  font:
    32px Georgia,
    serif;
  color: #eedbb0;
  text-shadow: 1px 2px #0c120c;
  margin: 5px 0 0;
}
.in-game #clock {
  color: #cebf95;
  font: 12px monospace;
  background: #111c15;
  border: 1px solid #494b36;
  padding: 12px 16px;
}
.in-game .practice {
  color: #c7c7a7;
  background: #263329;
  border: 1px solid #4f5e43;
  font-size: 9px;
  padding: 9px 13px;
}
.in-game .practice span {
  color: #94a58e;
}
.in-game .stats {
  margin-bottom: 14px;
  background: #272a20;
  border: 3px ridge #746747;
  border-radius: 0;
  box-shadow: 0 3px 0 #0d150f;
}
.in-game .stats > div {
  padding: 15px 22px;
  border-right: 1px solid #494933;
  position: relative;
}
.in-game .stats > div:before {
  content: none;
  float: left;
  margin: 7px 14px 12px 0;
  color: #cfad5e;
  font-size: 18px;
  text-shadow: 2px 2px #322916;
}
.in-game .stats > div:first-child:before {
  content: "▥";
  color: #c16b49;
}
.in-game .stats span {
  color: #a7ac8f;
  font: 10px monospace;
}
.in-game .stats strong {
  color: #f0d994;
  font:
    23px Georgia,
    serif;
}
.in-game .stats small {
  font: 11px monospace;
  color: #c0b890;
}

.in-game .map-wrap {
  border: 5px ridge #706342;
  box-shadow: 0 4px 0 #0d150f;
  background: #1f3428;
}
.in-game .map-bar {
  height: 47px;
  background: #292e23;
  border-bottom: 2px ridge #746748;
  color: #bdbb94;
}
.in-game .map-bar button {
  
  
  
  
  min-height: 32px;
}

.in-game .map-hint {
  background: #14271deb;
  border: 1px solid #647052;
  bottom: 51px;
}
.in-game .map-legend {
  background: #202b20;
  color: #aabb98;
  padding: 13px;
  border-top: 1px solid #566345;
}
.in-game #plot-panel {
  background: #303026;
  border: 3px ridge #776b4a;
  box-shadow: 0 3px #11190f;}
.in-game h3 {
  color: #ecd8a9;
  font:
    25px Georgia,
    serif;
}
.in-game p {
  color: #b8baa0;
  line-height: 1.65;
}
.in-game #plot-description {
  font-size: 13px;
  min-height: 62px;
}
.in-game .survey-result {
  background: #1c291f;
  border: 1px solid #657151;
  border-style: solid;
  color: #bdc99c;
  font: 12px/1.6 monospace;
  padding: 16px;
  margin: 18px 0;
  box-shadow: inset 0 2px 5px #0e180e;
}
.in-game .plot-info {
  border-color: #50513a;
  color: #b7b89a;
  padding: 12px 0;
}
.in-game .plot-info b {
  color: #e1cf9d;
}
.in-game .primary,
.in-game .secondary,
.in-game .danger {
  
  
  
  font:
    600 13px Georgia,
    serif;
  min-height: 45px;
  padding: 13px 17px;
  transition: background 0.12s;
}





.in-game button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.in-game .link {
  color: #c8bb8c;
}
.in-game .fine {
  font-size: 11px;
  color: #a0a58b;
}
.in-game #action-result {
  color: #f0cb76;
  border-top: 1px solid #55533c;
  margin-top: 12px;
  font-size: 12px;
}
.in-game summary {
  color: #c6bc91;
}
.in-game #nearby button {
  
  
  min-height: 38px;
}
.in-game .camp-grid {
  border: 3px ridge #746747;
  background: #282e22;
  gap: 0;
  box-shadow: 0 4px #0f170e;
}
.in-game .camp-grid article {
  padding: 30px;
  
}
.in-game .camp-icon {
  color: #d4b767;
  border: 2px ridge #827252;
  background: #18251a;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.in-game input,
.in-game select,
.in-game textarea {
  background: #18221b;
  border: 1px solid #686247;
  border-radius: 1px;
  color: #e0d5b2;
  box-shadow: inset 1px 2px 5px #0d160e;
}
.in-game label {
  color: #bcb595;
}
.in-game .journal {
  padding: 30px;
  background: #2a2e23;
  border: 3px ridge #746747;
  gap: 45px;
}
.in-game #activity p {
  border-color: #4b5038;
  padding: 15px 0;
}
.in-game #wallet-status {
  color: #9cac8e;
}

.in-game dialog h2 {
  margin-bottom: 20px;
}
.in-game footer {
  display: none;
}
.in-game #toast {
  background: #202b1d;
  border: 2px ridge #ab925b;
  color: #eddbab;
  border-radius: 1px;
}
@media (max-width: 800px) {
  .in-game header {
    height:auto;
    min-height:68px;
    padding: 10px 16px;
    flex-wrap:wrap;
  }
  .in-game header nav {
    display: none;
  }
  .in-game header .brand {
    font-size: 23px;
  }
  .in-game #profile-button {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .in-game #game {
    padding: 18px 12px 90px;
  }
  .in-game .mobile-game-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: #20291e;
    border-top: 3px ridge #83714d;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
  }
  .mobile-game-nav button {
    min-height: 48px;
    
    
    font:
      13px Georgia,
      serif;
    
  }
  
  .in-game .section-top {
    gap: 10px;
    margin-bottom: 13px;
  }
  .in-game h2 {
    font-size: 28px;
  }
  .in-game #clock {
    width: auto;
    font-size: 10px;
    padding: 8px;
    margin-left: auto;
  }
  .in-game .practice {
    font-size: 8px;
    padding: 7px;
  }
  .in-game .stats > div {
    padding: 12px 10px;
    border-bottom: 1px solid #4d4f36;
  }
  .in-game .stats > div:before {
    font-size: 14px;
    margin: 9px 8px 10px 0;
  }
  .in-game .stats strong {
    font-size: 19px;
  }
  .in-game .stats span {
    font-size: 9px;
  }
  .in-game .stats small {
    font-size: 9px;
  }
  
  .in-game .map-wrap {
    border-width: 3px;
  }
  
  .in-game .map-bar {
    height: 62px;
  }
  
  .in-game #plot-panel.mobile-open {
    border-radius: 6px 6px 0 0;
    border: 3px ridge #92805b;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px #07100ab0;}
  .in-game #plot-panel.mobile-open .close-plot {
    color: #ddce9b;
    min-height: 44px;
  }
  .in-game .camp-grid article {
    padding: 25px 20px;
  }
  .in-game .journal {
    padding: 24px 20px;
    gap: 30px;
  }
  .in-game #toast {
    bottom: 85px;
  }
  .frontier-tagline.game-subtitle {
    font-size: 18px !important;
    letter-spacing: 0 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .in-game button {
    transition: none !important;
    
  }
}
/* Consistent game typography and tools; no web-template arrows or overlay NPC. */
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.pickaxe-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  vertical-align: middle;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}
.hero-copy.title-screen {
  top: 17%;
  width: min(92%, 800px);
}
.hero h1.eureka-logo {
  font-family: Georgia, serif;
  font-size: clamp(70px, 10vw, 140px);
  letter-spacing: -0.035em;
  -webkit-text-fill-color: #ebce86;
  -webkit-text-stroke: 1px #755932;
  background: none;
  color: #ebce86;
  filter: none;
  text-shadow:
    0 2px #a98444,
    0 4px #634721,
    2px 6px #241e12;
  line-height: 1.06;
}
.hero .frontier-tagline.game-subtitle {
  font:
    italic 22px/1.5 Georgia,
    serif !important;
  margin: 15px 0 28px !important;
  color: #f6e4b5;
}
.hero p.game-premise {
  font:
    600 20px/1.45 Georgia,
    serif;
  color: #fff0c7;
  margin: 0 0 7px;
  text-shadow: 0 2px 3px #12271c;
}
.hero p.game-loop {
  font:
    13px/1.7 "Courier New",
    monospace;
  color: #e4dfbc;
  margin: 0 0 28px;
  text-shadow: 0 1px 3px #142417;
}
.hero .enter-button {
  font:
    700 15px "Courier New",
    monospace;
  display: flex;
  align-items: center;
  gap: 12px;
  
  
  
  
  min-width: 238px;
}

.hero p.entry-caption {
  font:
    12px/1.7 Georgia,
    serif;
  color: #e8dfbd;
  margin-top: 18px;
}
.hero p.entry-caption span {
  color: #cbd4ba;
  font:
    10px/1.8 "Courier New",
    monospace;
}
.hero-bottom.gate-bottom {
  gap: 15px;
}
.gate-bottom .hero-agent {
  font:
    12px "Courier New",
    monospace;
  border: 1px solid #82906a;
  background: #203627d9;
  padding: 12px 16px;
  min-height: 44px;
}
#fairness-dialog {
  background: #263025;
  border: 3px ridge #a38b59;
  border-radius: 0;
  color: #f0d9a2;
}
#fairness-dialog p {
  color: #d7d4b9;
  font:
    14px/1.7 Georgia,
    serif;
}
#fairness-dialog .eyebrow {
  color: #bcbd92;
}
.in-game button {
  font-family: "Courier New", monospace;
}
@media (max-width: 800px) {
  .hero-copy.title-screen {
    top: 14%;
    width: 94%;
  }
  .hero h1.eureka-logo {
    font-size: clamp(61px, 16vw, 100px);
  }
  .hero .frontier-tagline.game-subtitle {
    font-size: 18px !important;
    margin: 15px 0 27px !important;
  }
  .hero p.game-premise {
    font-size: 17px;
    padding: 0 12px;
  }
  .hero p.game-loop {
    font-size: 11px;
    padding: 0 12px;
    margin-bottom: 25px;
  }
  .hero-bottom.gate-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    bottom: 20px;
    gap: 10px;
  }
  .gate-bottom > span {
    grid-column: 1/-1;
    text-align: center;
    font-size: 9px;
    order: 3;
  }
  .gate-bottom .hero-agent {
    font-size: 10px;
    padding: 10px 6px;
  }
}
.entry-plaque {
  max-width: 480px;
  margin: auto;
  padding: 22px 26px 20px;
  background: #192b21eb;
  border: 2px ridge #8a784c;
  box-shadow:
    inset 0 0 0 3px #14241c,
    0 4px #122218a0;
}
.hero .entry-plaque p.game-premise {
  font-size: 18px;
  color: #fff0c7;
}
.hero .entry-plaque p.game-loop {
  font-size: 12px;
  color: #d7dfc2;
  text-shadow: none;
  margin-bottom: 20px;
}
.hero .entry-plaque p.entry-caption {
  color: #e5dfc5;
  text-shadow: none;
  font-size: 12px;
}
.hero .entry-plaque p.entry-caption span {
  color: #bbcbb0;
}
@media (max-width: 800px) {
  .entry-plaque {
    max-width: 340px;
    width: 94%;
    padding: 20px 12px;
  }
  .hero .entry-plaque p.game-premise {
    font-size: 16px;
  }
  .hero .entry-plaque p.game-loop {
    font-size: 10px;
    padding: 0;
  }
  .hero-copy.title-screen {
    top: 10%;
  }
}

/* Frontier title: a forged pickaxe behind the wordmark. */
.hero h1.eureka-logo { position:relative; isolation:isolate; overflow:visible; }
.logo-pickaxe { position:absolute; width:1.65em; height:1.65em; left:50%; top:48%; transform:translate(-50%,-50%) rotate(24deg); z-index:-1; filter:drop-shadow(3px 4px 0 #171a13); }
.logo-text { position:relative; text-shadow: -2px -2px #fff0ba, 2px 2px #8a612e, 3px 5px #3b2916, -3px 3px #241c12, 3px -2px #241c12; }
.entry-plaque { background:#14251e; border-color:#b59a62; }
.hero .entry-plaque p.game-loop { color:#f7f0dc; font-size:14px; line-height:1.65; }
.hero .entry-plaque p.entry-caption { color:#f0e6cc; font-size:13px; }
.hero .entry-plaque p.entry-caption span { color:#cbd8cc; }
.hero .frontier-tagline.game-subtitle { color:#fff5d7; text-shadow:0 2px 2px #102018, 1px 0 2px #102018,-1px 0 2px #102018; }
@media(max-width:800px) { .hero .entry-plaque p.game-loop { font-size:13px; } .hero .entry-plaque p.entry-caption { font-size:12px; } }

/* A small bullion ingot crowns the wordmark without crossing the lettering. */
.hero h1.eureka-logo { padding-top:0.36em; }
.logo-bullion { position:absolute; width:0.86em; height:0.344em; left:50%; top:0; transform:translateX(-50%); filter:drop-shadow(0 2px 0 #332718); }

#fairness-dialog { max-width:640px; max-height:90dvh; overflow:auto; }
.hunt-film { border:2px ridge #a98a53; background:#101e18; padding:12px; text-align:center; }
#hunt-canvas { width:100%; display:block; image-rendering:pixelated; margin-bottom:16px; }
#hunt-title { color:#ffe194; font:700 25px Georgia,serif; }
#fairness-dialog #hunt-caption { min-height:3em; color:#eee6cf; font-size:14px; }
.hunt-controls {display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:16px 0;}
.hunt-film small {color:#bdc6b7;font-size:11px;}
.hunt-steps {padding-left:24px;color:#e5dfcb;line-height:1.65;}
.hunt-steps li {padding:8px 0 8px 5px;}
.hunt-steps b {color:#ffe194;}
@media(max-width:600px){#fairness-dialog{padding:22px 16px;}#hunt-title{font-size:22px;}}
.hunt-controls button {padding:12px 16px;font:700 12px "Courier New",monospace;cursor:pointer;}
.hunt-controls button:focus-visible {outline:2px solid #ffe194;outline-offset:3px;}

.landing-deposits {display:flex;align-items:center;justify-content:center;gap:8px 16px;flex-wrap:wrap;width:max-content;max-width:95%;margin:0 auto 22px;padding:12px 20px;background:#14251ef2;border:1px solid #a38a52;color:#f7e9bd;font:13px "Courier New",monospace;}
.landing-deposits strong {color:#ffe194;font:700 22px Georgia,serif;}
.landing-deposits #landing-value {width:100%;font-size:12px;color:#e4e4ce;}
.hero-copy.title-screen {top:9%;}
@media(max-width:800px){.hero-copy.title-screen{top:4%;}.landing-deposits{margin-bottom:14px;padding:9px 12px;}.hero-bottom.gate-bottom{grid-template-columns:repeat(3,1fr);}.gate-bottom .hero-agent{padding:10px 7px;font-size:10px;}}

#action-result {color:#ffe194;font:700 22px/1.4 Georgia,serif;padding:12px 0;}

#gameplay-video {display:block;width:100%;height:auto;margin-bottom:12px;background:#101e18;}
#fairness-dialog {max-width:1000px;}

/* Keep native scrolling and keyboard behavior, with frontier panel materials. */
:root { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: #927646 #17231b; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: #17231b; border-left: 1px solid #354232; }
*::-webkit-scrollbar-thumb { background: #927646; border: 2px solid #17231b; border-radius: 0; }
*::-webkit-scrollbar-thumb:hover { background: #b7995e; }
*::-webkit-scrollbar-thumb:active { background: #d1b576; }
*::-webkit-scrollbar-corner { background: #17231b; }
@media (forced-colors: active) { * { scrollbar-color: auto; } }

.tnt-icon {width:24px;height:24px;vertical-align:middle;image-rendering:pixelated;}
.dynamite-tray {display:flex;align-items:center;gap:12px;padding:12px;background:#202b1d;border-top:2px ridge #857046;}
#drag-tnt {display:flex;align-items:center;gap:8px;flex-shrink:0;min-height:48px;background:#483421;color:#ffe6aa;border:2px ridge #b39155;font:700 14px Georgia;touch-action:none;cursor:grab;}
#drag-tnt img {width:40px;height:40px;image-rendering:pixelated;pointer-events:none;}
#drag-tnt[aria-pressed="true"]{outline:2px solid #ffe194;}
#drag-tnt:disabled{opacity:.5;cursor:not-allowed;}
#plant-help{font:12px/1.5 "Courier New",monospace;color:#e5ddc4;}
.dynamite-ghost {position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;z-index:10000;image-rendering:pixelated;}
@media(max-width:600px){.dynamite-tray{gap:8px;padding:8px;}#drag-tnt{font-size:12px;}#plant-help{font-size:10px;}}
#gameplay-video {max-height:65dvh;object-fit:contain;}

.in-game .stats > div:first-child:before{content:none;}

@media(max-width:800px){.in-game #plot-panel.mobile-open .close-plot{position:sticky;top:0;background:#242a1e;z-index:2;min-height:44px;}}

.dynamite-tray{display:grid;grid-template-columns:auto 1fr;gap:10px 18px;padding:14px;background:#22251c;box-shadow:inset 0 2px #53503a,inset 0 -2px #11180f;}
.inventory-heading{grid-column:1/-1;color:#d6ba78;font:700 11px "Courier New",monospace;letter-spacing:.12em;display:flex;justify-content:space-between;}
.inventory-heading span{color:#aaa68a;font-weight:400;letter-spacing:0;}
.inventory-slots{display:flex;gap:5px;}
.inventory-slots #drag-tnt,.empty-slot{width:58px;height:58px;min-height:58px;padding:0;border:2px ridge #83754d;background:#151b13;box-shadow:inset 2px 2px 0 #080d08,inset -2px -2px #3a3c2a;position:relative;}
.inventory-slots #drag-tnt{justify-content:center;}
.inventory-slots #drag-tnt img{width:48px;height:48px;}
#tnt-stack{position:static;color:#ffe19a;font:bold 12px "Courier New",monospace;text-shadow:1px 1px #000,-1px -1px #000;pointer-events:none;}
.empty-slot:after{content:"";position:absolute;inset:9px;border:1px solid #292f21;}
@media(max-width:800px){.dynamite-tray{grid-template-columns:1fr;padding:10px;gap:8px;}.inventory-slots{justify-content:space-between;}.inventory-slots #drag-tnt,.empty-slot{width:60px;height:60px;}.dynamite-tray #plant-help{font-size:11px;}}

/* One framed workspace; inset stone, brass bevels and no floating map overlays. */
.in-game .map-wrap,.in-game #plot-panel,.in-game .stats,.in-game .camp-grid article {
 
 border-left-color:#807451;border-right-color:#302e24;
 
 
 
 
}

.in-game #plot-panel{border-left-width:2px;}
.in-game .map-hint{position:static;background:#1b281d;border:0;border-top:1px solid #4b5139;padding:10px 14px;color:#dfd8b7;box-shadow:none;}
.in-game .map-legend{display:none;}
.in-game .survey-result{margin:12px 0;padding:12px;}
.blast-review{margin:14px 0;padding:14px;}
.blast-review[hidden]{display:none;}
.blast-review p{font-size:13px;line-height:1.5;}
.in-game #plot-panel button{min-height:44px;}
.in-game #plot-panel #action-result{font-size:20px;}
#fairness-dialog{width:min(94vw,900px);max-width:900px;}
#fairness-dialog .hunt-film{float:left;width:min(42%,320px);padding:5px;margin:0 26px 18px 0;box-sizing:border-box;}
#gameplay-video{width:100%;height:auto;max-height:none;aspect-ratio:390/844;object-fit:contain;}
#fairness-dialog .hunt-steps{display:flow-root;padding-left:24px;}
#fairness-dialog:after{content:"";display:block;clear:both;}
@media(max-width:800px){
 .in-game .game-layout{flex-direction:column;}
 .in-game .map-wrap{width:100%;box-sizing:border-box;}
 .in-game #plot-panel,.in-game #plot-panel.mobile-open{border-radius:0;box-sizing:border-box;box-shadow:inset 0 0 0 1px #97875e;}
 .in-game #plot-panel .close-plot,.in-game #plot-panel.mobile-open .close-plot{display:none;}
 
 .in-game .map-bar{height:48px;}
 .in-game .stats strong{font-size:17px;}
 .in-game .stats>div{padding:9px;}
 .in-game .stats{margin-bottom:12px;}
}
@media(max-width:600px){
 #fairness-dialog{width:94vw;padding:20px 14px;}
 #fairness-dialog .hunt-film{float:none;width:min(100%,300px);margin:0 auto 22px;}
 #fairness-dialog .hunt-steps{display:block;}
}
#gameplay-video{aspect-ratio:380/844;}

/* A single reading order: film first, field guide underneath. */
#fairness-dialog {width:min(94vw,620px);}
#fairness-dialog .hunt-film {float:none;width:100%;max-width:440px;margin:0 auto 26px;padding:5px;}
#fairness-dialog .hunt-steps {clear:both;display:block;padding-left:24px;}

#fairness-dialog .hunt-film{width:min(100%,calc(52dvh * 380 / 844));max-width:360px;}
#gameplay-video{max-height:52dvh;}
#video-fullscreen{display:block;width:100%;margin:8px 0;min-height:44px;color:#ffe6a9;background:#3b3d2a;border:2px ridge #998052;}
#gameplay-video:fullscreen{width:100vw;height:100vh;max-height:none;background:#080d08;object-fit:contain;}
.in-game #action-result.motherlode{font:700 clamp(24px,4vw,36px)/1.25 Georgia,serif;color:#ffe39a;background:#3b301b;border:3px ridge #c6a258;padding:20px;margin-top:16px;text-shadow:2px 2px #20180d;}

/* Phone-shaped tutorial and a tool rail beside the navigable terrain. */
#fairness-dialog .hunt-film {width:min(100%,430px,calc(68dvh * 430 / 932));max-width:430px;padding:0;border:0;background:transparent;}
#gameplay-video {width:100%;height:auto;max-height:none;aspect-ratio:430/932;object-fit:contain;}
.in-game .map-wrap {display:grid;grid-template-columns:max-content minmax(0,1fr);position:relative;}
.in-game .map-bar,.in-game .map-hint {grid-column:1/-1;}
.in-game .map-bar {grid-row:1;}
.in-game .dynamite-tray {grid-column:1;grid-row:2;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:12px 6px;gap:8px;border:0;border-right:2px ridge #786844;}
.inventory-heading {font-size:0;display:block;}
.inventory-heading:before {content:"TNT";font:700 12px "Courier New",monospace;color:#e3c987;}
.inventory-heading span,.dynamite-tray .empty-slot,.dynamite-tray #plant-help {display:none;}
.inventory-slots {display:block;}
.inventory-slots #drag-tnt {width:58px;height:58px;min-height:58px;}
.in-game .map-wrap canvas {grid-column:2;grid-row:2;min-width:0;touch-action:none;}
.in-game .map-hint {grid-row:3;margin:0;font-size:11px;}
@media(max-width:800px){
 .in-game .map-wrap{grid-template-columns:max-content minmax(0,1fr);}
 .in-game .dynamite-tray{padding:10px 3px;}
 .inventory-slots #drag-tnt{width:52px;height:56px;min-height:56px;}
 .inventory-slots #drag-tnt img{width:42px;height:42px;}
 
}

@media(min-width:801px){
 #fairness-dialog {width:min(94vw,1120px);max-width:1120px;}
 #fairness-dialog .hunt-film {width:100%;max-width:100%;}
 #gameplay-video {aspect-ratio:1440/900;width:100%;max-height:65dvh;object-fit:contain;background:#121a12;}
}
@media(max-width:800px){#gameplay-video{aspect-ratio:430/932;}#fairness-dialog .hunt-film{width:min(100%,430px,calc(68dvh * 430 / 932));}}
@media(min-width:801px){#fairness-dialog .hunt-film{width:min(100%,calc(65dvh * 1440 / 900));}#gameplay-video{max-height:none;}}

/* Shared dialog system: the gate and the game use the same materials. */
:root {
  --rpg-panel: #262b21;
  --rpg-inset: #151e16;
  --rpg-brass: #a39060;
  --rpg-text: #ece2c6;
  --rpg-muted: #bec1a7;
  --rpg-gold: #f2d79c;
}
body dialog {
  box-sizing:border-box;
  background:var(--rpg-panel);
  color:var(--rpg-text);
  border:4px solid #514a36;
  border-top-color:var(--rpg-brass);
  border-left-color:#807451;
  border-right-color:#302e24;
  border-bottom-color:#25291f;
  border-radius:0;
  box-shadow:inset 0 0 0 1px #b69e6c,inset 0 0 0 3px #171f16,0 18px 60px #0008;
  padding:32px;
  max-height:90dvh;
  overflow:auto;
}
body dialog::backdrop {background:#08120ddb;backdrop-filter:blur(3px);}
body dialog h2 {font:700 clamp(26px,4vw,34px)/1.15 Georgia,serif;color:var(--rpg-gold);margin:14px 0 18px;letter-spacing:-.025em;}
body dialog .eyebrow {color:#c2ab76;font:700 10px/1.5 "Courier New",monospace;letter-spacing:.16em;}
body dialog p,body dialog label {color:var(--rpg-muted);line-height:1.65;}
body dialog .fine {color:#afb59e;font-size:12px;}
body dialog input,body dialog select,body dialog textarea {
  box-sizing:border-box;width:100%;min-height:46px;
  padding:12px;background:var(--rpg-inset);color:var(--rpg-text);
  border:2px solid #646047;border-top-color:#10170f;border-left-color:#10170f;
  border-radius:0;box-shadow:inset 1px 1px #313c2b;
  font:14px/1.5 "Courier New",monospace;
}
body dialog input::placeholder,body dialog textarea::placeholder {color:#939b83;opacity:1;}
body dialog input:focus-visible,body dialog textarea:focus-visible,body dialog button:focus-visible {outline:2px solid #f1cd78;outline-offset:3px;}
body dialog .primary,body dialog .secondary {
  min-height:46px;padding:12px 20px;
  
  
  font:700 13px/1.4 "Courier New",monospace;
}



body dialog button:disabled{opacity:.5;cursor:wait;}
body dialog .close{position:static;margin:0 0 12px auto;display:grid;place-items:center;width:44px;height:44px;padding:0;color:#d5bd83;background:transparent;border:1px solid transparent;border-radius:0;font-size:26px;}
body dialog .close:hover{border-color:#786a45;background:#353b29;}
#profile-dialog,#agent-dialog{width:min(92vw,540px);}
#profile-form label{display:block;font:12px/1.5 "Courier New",monospace;margin:22px 0;}
#profile-form input{margin-top:8px;}
#wallet-message:empty{display:none;}
#wallet-message:not(:empty){padding:12px;margin:18px 0;border-left:3px solid var(--rpg-brass);background:var(--rpg-inset);}
@media(max-width:600px){body dialog{padding:28px 20px;}body dialog h2{padding-right:14px;}#profile-form .primary{width:100%;}}

/* Tutorial is one flush frame, sized to the recording rather than a padded card. */
body #fairness-dialog {
  padding:0;
  width:min(94vw,1100px,calc(65dvh * 1440 / 900));
  max-width:none;
}
#fairness-dialog > .eyebrow {display:block;margin:24px 26px 0;}
#fairness-dialog > h2 {margin:10px 26px 12px;padding-right:30px;}
#fairness-dialog > p {margin:0 26px 22px;}
#fairness-dialog .hunt-film {
  float:none;display:block;box-sizing:border-box;
  width:100%;max-width:none;margin:0;padding:0;
  border:0;background:transparent;
}
#fairness-dialog #gameplay-video {
  display:block;width:100%;height:auto;max-height:none;
  margin:0;border:0;aspect-ratio:1440/900;object-fit:contain;
}
#fairness-dialog .hunt-film small {display:block;padding:12px 20px;line-height:1.5;border-bottom:1px solid #55503a;}
#fairness-dialog .hunt-steps {margin:18px 26px 24px;padding-left:22px;}
@media(max-width:800px){
 body #fairness-dialog{width:min(94vw,430px,calc(68dvh * 430 / 932));}
 #fairness-dialog #gameplay-video{aspect-ratio:430/932;}
 #fairness-dialog > .eyebrow{margin:22px 16px 0;}
 #fairness-dialog > h2{margin:10px 16px 12px;font-size:25px;}
 #fairness-dialog > p{margin:0 16px 18px;}
 #fairness-dialog .hunt-steps{margin:16px 16px 22px;}
}

.agent-steps{padding-left:22px;color:var(--rpg-muted);font-size:14px;line-height:1.55;}
.agent-steps li{padding:5px 0;}.agent-steps b{color:var(--rpg-gold);}
#agent-setup-status{padding:10px 12px;border-left:2px solid var(--rpg-brass);background:var(--rpg-inset);font-size:13px;}
#agent-dialog details{overflow:visible;max-height:none;}#agent-dialog textarea{min-height:70px;}

/* Prospector identity and discovery ledger */
.portrait-picker{border:0;padding:0;margin:20px 0;display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.portrait-picker legend{margin-bottom:10px;color:var(--rpg-gold)}
.portrait-picker label{position:relative;display:grid;gap:4px;text-align:center;cursor:pointer;font-size:11px}
.portrait-picker input{position:absolute;opacity:0;width:1px;height:1px}
.portrait-picker img{width:100%;image-rendering:pixelated;border:2px solid #635a42;background:#17261e}
.portrait-picker input:checked+img{border-color:#ffdb7e;box-shadow:0 0 0 2px #957946}
.portrait-picker input:focus-visible+img{outline:3px solid white;outline-offset:3px}
#game:not([data-view="leaderboard"]) #leaderboard,#game[data-view="leaderboard"] #frontier,#game[data-view="leaderboard"] #camp,#game[data-view="leaderboard"] #journal{display:none}
.miners-board{margin:24px auto;max-width:1000px;padding:24px;background:var(--rpg-panel);border:3px ridge var(--rpg-brass);color:var(--rpg-text)}
.miners-board h2{color:var(--rpg-gold);font-family:Georgia,serif}
.miner-periods{display:flex;gap:8px;margin:20px 0 8px}.miner-periods [aria-pressed="true"]{background:#715c33;color:#fff0bf}
#miner-rankings{list-style:none;padding:0}#miner-rankings li{display:flex;align-items:center;gap:16px;padding:16px 0;border-top:1px solid #665e46}#miner-rankings img{width:64px;height:64px;image-rendering:pixelated}#miner-rankings li>div{flex:1}#miner-rankings small{display:block;color:var(--rpg-muted);margin-top:6px}#miner-rankings li>strong{color:var(--rpg-gold)}
@media(max-width:800px){.in-game .mobile-game-nav{grid-template-columns:repeat(4,1fr)}.portrait-picker{grid-template-columns:repeat(3,1fr)}.portrait-picker img{max-width:72px;justify-self:center}.miners-board{margin:12px;padding:16px}#miner-rankings li{flex-wrap:wrap;gap:10px}#miner-rankings li>strong{margin-left:74px;font-size:15px}}

/* Detailed landscape-matched portrait atlas. */
.miner-portrait{display:block;aspect-ratio:1;background-image:url("/miner-portraits-v2.png");background-size:300% 200%;background-repeat:no-repeat;image-rendering:pixelated}
.portrait-1{background-position:0 0}.portrait-2{background-position:50% 0}.portrait-3{background-position:100% 0}.portrait-4{background-position:0 100%}.portrait-5{background-position:50% 100%}.portrait-6{background-position:100% 100%}
.portrait-picker{grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0 20px}
.portrait-picker .miner-portrait{width:100%;border:2px solid #635a42;box-sizing:border-box}
.portrait-picker input:checked+.miner-portrait{border-color:#ffdb7e;box-shadow:0 0 0 2px #957946}
.portrait-picker input:focus-visible+.miner-portrait{outline:3px solid white;outline-offset:3px}
#miner-rankings .miner-portrait{width:72px;flex-shrink:0}
#profile-dialog{width:min(560px,calc(100vw - 24px))}
#profile-dialog form{padding:24px}
#profile-dialog h2{font-size:28px;margin:10px 0}
#profile-dialog .portrait-picker label{gap:5px;font-size:11px}
@media(max-width:600px){#profile-dialog form{padding:16px}.portrait-picker{gap:9px}#profile-dialog h2{font-size:25px}}
body #profile-dialog{padding:0;width:min(560px,calc(100vw - 24px))}
#profile-form .portrait-picker label{display:grid;margin:0;font-size:11px;line-height:1.3}
#profile-form .portrait-picker input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;border:0}
#profile-form .portrait-picker{max-width:390px;margin:12px auto 18px}
#profile-form>label{margin:12px 0}
#profile-form>p{margin:10px 0}

:is(#sound-toggle,#game-sound-toggle){display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;padding:10px;color:#e4cd96;vertical-align:middle;border:1px solid #aa916955;background:#17251c99;box-shadow:inset 0 0 0 2px #111b1455}
:is(#sound-toggle,#game-sound-toggle) svg{width:24px;height:24px}:is(#sound-toggle,#game-sound-toggle):hover{color:#ffebaf;background:#33402a}:is(#sound-toggle,#game-sound-toggle):focus-visible{outline:2px solid #ffe4a2;outline-offset:4px}
:is(#sound-toggle,#game-sound-toggle) .speaker-waves{display:none}:is(#sound-toggle,#game-sound-toggle)[aria-pressed="true"] .speaker-waves{display:block}:is(#sound-toggle,#game-sound-toggle)[aria-pressed="true"] .speaker-muted{display:none}

.gold-exchange{padding:18px 0;margin:16px 0;border-top:1px solid #766746;border-bottom:1px solid #766746}.gold-exchange input{max-width:180px}.gold-exchange h3{color:var(--rpg-gold)}

#swap-panel{width:min(520px,calc(100vw - 24px))}#jupiter-buy{width:100%;min-width:0}#buy-tnt{margin-bottom:12px}

#tnt-contract:not([hidden]){display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:8px auto 0;max-width:580px;color:#e5d8b8;font-size:12px;text-shadow:0 1px 3px #000}#tnt-contract code{font:12px/1.5 monospace;overflow-wrap:anywhere;user-select:all}#copy-tnt-mint{min-height:44px;padding:6px 10px;background:#19251cbb;color:#ffe6a7;border:1px solid #9a8258;cursor:pointer}#tnt-copy-status:empty{display:none}

.personal-vault{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center;margin:0 0 24px;padding:24px;}
.vault-art svg{width:100%;display:block;image-rendering:pixelated;border:4px ridge #746c4c}.vault-summary h3{font:24px Georgia,serif;color:#f3ddab;margin:8px 0 16px}.vault-summary>strong{display:block;color:#ffdb81;font:32px Georgia,serif}.vault-summary>span:not(.eyebrow){display:block;color:#decba0;margin-top:6px}.vault-summary .fine{color:#b7bda5}.vault-summary .row{flex-wrap:wrap}
@media(max-width:700px){.personal-vault{grid-template-columns:1fr;gap:16px;padding:16px;}.vault-art{max-width:380px;width:100%;margin:auto}.vault-summary>strong{font-size:28px}}

/* Shared gold denomination: original pixel bullion, paired with its USD estimate. */
.gold-pair { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; }
.gold-token { display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.gold-token::before { content:""; display:inline-block; flex:none; width:24px; height:18px; background:url("/gold-bullion-v2.png") center / contain no-repeat; image-rendering:pixelated; }
.gold-usd { color:#f3d898; font-size:1em; white-space:nowrap; }
.landing-deposits #landing-value { font-size:clamp(16px,2vw,21px); color:#f3d898; }
#available.gold-pair, #earned.gold-pair { line-height:1.45; }

/* Studio pass: one frontier material system, compact tools, clear play states. */
:root{--frontier-ink:#142019;--frontier-timber:#292d22;--frontier-brass:#9c8252;--frontier-paper:#e8ddbd;--frontier-muted:#b4baa5;--frontier-gold:#f2d18a}
.in-game .stats{display:flex;flex-wrap:wrap;gap:0}.in-game .stats>div{flex:1 1 180px;padding:14px 18px}.in-game .stats>div[hidden]{display:none}
.in-game .stats strong{font-size:20px}.in-game .stats small{display:block;margin-top:5px;color:var(--frontier-muted);font:12px/1.4 system-ui}
.in-game .gold-pair{gap:3px 12px}.in-game .gold-pair .gold-usd{font-size:1em}.in-game .gold-pair .gold-token{font-size:.85em}
.in-game button{font-size:13px;letter-spacing:.01em;}.in-game button:disabled{opacity:.46;cursor:not-allowed;}.in-game :focus-visible{outline:2px solid #ffe6a8;outline-offset:3px}
.in-game .camp-grid{grid-template-columns:1fr 1fr;gap:16px}.in-game .camp-grid article{padding:22px;min-height:0;}.in-game .camp-grid article:last-child{grid-column:1/-1;padding:16px 22px;}.camp-grid article:last-child .camp-icon{display:none;}.camp-grid article:last-child h3{font-size:18px;margin:0 0 6px;}.camp-grid article:last-child p{margin:6px 0;}
.in-game .camp-icon{display:none}.in-game .camp h3{margin-top:0}.in-game .camp p{line-height:1.6}.in-game label{font:13px/1.5 system-ui;color:var(--frontier-paper)}
.personal-vault{padding:0;gap:0;overflow:hidden;grid-template-columns:1.15fr 1fr;}
.vault-art{position:relative;align-self:stretch;max-width:none!important}.vault-art>img{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.vault-summary{padding:26px}.vault-identity{display:flex;align-items:center;gap:12px;margin-bottom:20px}.vault-identity .miner-portrait{width:52px;border:2px solid #9c8252}.vault-identity strong{display:block;font:16px Georgia;color:#ead6a6;margin-top:5px}
.vault-summary h3{font-size:21px}.vault-summary .fine{font:12px/1.6 system-ui}.vault-summary .row{margin-top:18px}
#assay-office{padding:24px;margin-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:8px 30px;}#assay-office>.eyebrow,#assay-office>h2,#assay-office>p:first-of-type{grid-column:1/-1}#assay-office h2{font-size:24px;margin:0;}#assay-office .gold-exchange{grid-column:1;grid-row:4/8;margin:0;padding:12px 0;}#assay-office>#withdraw{align-self:end}#assay-office>p{margin:5px 0}#assay-office .gold-exchange h3{font-size:19px;}
.in-game .journal{display:block;max-width:900px;margin:auto}.journal>details{margin:20px 0;padding:16px;border-top:1px solid #746343}#activity p{padding:16px;border-bottom:1px solid #46503c}#money-dialog{max-width:540px}#money-copy{overflow-wrap:anywhere;line-height:1.7}
#agent-setup-status{padding:14px;border-left:3px solid #d8b568;background:#172219;color:#f6e0ab}.agent-steps{padding-left:24px}.agent-steps li{margin:12px 0}.agent-steps li[data-complete=true]{color:#9aa88e}.agent-steps li[data-complete=true]::marker{content:"✓  "}
#plot-status{padding:10px 0;border-top:1px solid #716344;color:#ead6a6;font-size:13px;line-height:1.5}#action-result:empty{display:none}.in-game #plot-panel h3{font-size:24px;margin:7px 0 12px}.in-game #plot-panel #action-result{font-size:17px;line-height:1.45}#plot-panel .blast-review{padding:14px;}
#fairness-dialog h2{font-size:clamp(24px,3vw,34px)}#fairness-dialog .hunt-steps li{margin:12px 0}
@media(max-width:800px){
 .in-game .mobile-game-nav{grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom);background:#1b241b}.mobile-game-nav button{padding:8px 2px;font-size:12px;min-height:48px;}
 .in-game .frontier{padding:10px 10px 0}.in-game .section-top{gap:6px;margin-bottom:10px}.in-game .section-top h2{font-size:24px}.in-game .section-top .eyebrow{display:none}.in-game .practice{font-size:9px;padding:4px;max-width:130px}.in-game #clock{font-size:11px;padding:4px}
 .in-game .stats>div{flex:1 1 30%;padding:8px;min-width:0}.in-game .stats strong{font-size:14px}.in-game .stats>div>span{font-size:10px}.in-game .stats small{font-size:10px}.in-game .stats .gold-pair{gap:2px}.gold-token::before{width:18px;height:14px}.in-game .stats{margin-bottom:10px}
 .in-game .map-wrap{width:100%;grid-template-columns:max-content minmax(0,1fr)}.in-game .map-bar{height:40px}.in-game .map-bar>span{font-size:9px}.in-game .map-bar button{min-height:36px;padding:6px;}.in-game .map-hint{font-size:10px;padding:6px}.inventory-slots #drag-tnt{width:44px;min-height:54px}.inventory-slots #drag-tnt img{width:34px}
 .in-game #plot-panel,.in-game #plot-panel.mobile-open{background:#20291f;border:2px solid #887346;box-shadow:0 -4px 14px #0005;}
 #plot-panel #plot-coord,#plot-panel #plot-name,#plot-panel #survey-result,#plot-panel #plot-status,#plot-panel #action-result,#plot-panel #confirm-panel,#plot-panel>details{grid-column:1/-1}.in-game #plot-panel #plot-name{font-size:20px;margin:0}.in-game #plot-panel #plot-description{display:none}.in-game #plot-panel .plot-info{font-size:11px;margin:0;padding:3px 0;display:flex;gap:5px;flex-wrap:wrap}.in-game #plot-panel .survey-result{font-size:12px;padding:6px;margin:0}.in-game #plot-panel button{margin:0;width:100%;min-height:44px;}.in-game #plot-panel #release{font-size:11px}.in-game #plot-panel #plot-status{margin:0;padding:5px 0;font-size:11px}.in-game #plot-panel>details{font-size:11px}.in-game #plot-panel #action-result{font-size:15px;margin:0}.in-game #plot-panel #action-result.motherlode{padding:10px}.in-game #plot-panel .close-plot{display:none}
 .personal-vault{grid-template-columns:1fr;}.vault-art{height:210px}.vault-art>img{object-fit:cover;object-position:center 60%}.vault-summary{padding:18px}.vault-identity{margin-bottom:12px}.vault-summary>strong{font-size:28px}.in-game .camp-grid{grid-template-columns:1fr}.in-game .camp-grid article{padding:18px;}.in-game .camp-grid article:last-child{grid-column:auto;}
 #assay-office{display:block;padding:18px;}#assay-office .gold-exchange{padding:16px 0;margin:12px 0;border-block:1px solid #746343;}.in-game .camp{padding:12px}.in-game #wallet-status{font-size:11px}.in-game .journal{padding:12px}.in-game .journal article{padding:18px}#agent-dialog{padding:20px}#agent-dialog .agent-steps{font-size:13px}#money-dialog{width:calc(100vw - 24px);padding:20px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}
.mining-performance{padding:22px;margin:0 0 20px;border-block:1px solid #7d6b48;}.mining-performance h3{margin:7px 0 20px;}.performance-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.performance-grid>div>span{display:block;color:#c1c7af;font-size:12px}.performance-grid strong{display:block;color:#f0d39a;margin:8px 0;font-size:20px}.performance-grid strong.gold-pair{display:flex}.performance-grid small{display:block;font:12px/1.5 system-ui;color:#b4baa5}.performance-grid #performance-net{font-size:16px}@media(max-width:700px){.performance-grid{grid-template-columns:1fr;gap:18px}.mining-performance{padding:18px;}}
/* Shelf positions track the uncropped safe artwork at every viewport. */
.vault-art{align-self:center;height:auto!important}.vault-art>img{height:auto;object-fit:contain;aspect-ratio:3/2}
.agent-steps li[hidden]{display:none}.agent-steps{list-style:none;padding:0}.agent-steps li{border:1px solid #716344;padding:14px;color:#e8ddbd}.agent-steps li b{display:block;margin-bottom:6px}
/* Compact utility labels; foreground actions carry the emphasis. */
.in-game .stats>div>span::before{display:none}.in-game .stats strong{color:var(--frontier-gold)}.in-game .stats .gold-usd{font-family:Georgia,serif;font-weight:700}.in-game .stats .gold-token{font-family:system-ui;font-weight:500}.in-game .stats small{color:#c3c6b2}
.cost-basis{margin-top:12px;font-size:12px}.cost-basis label{display:block;margin-top:12px}.cost-basis input{max-width:190px}#performance-net[data-sign=positive]{color:#b8d498}#performance-net[data-sign=negative]{color:#efa58b}

/* Authoritative gameplay geometry. Earlier material rules do not own layout. */
:root { --space-1:8px; --space-2:12px; --space-3:16px; --space-4:24px; --space-5:32px; }
*, *::before, *::after { box-sizing:border-box; }
.in-game .game-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,340px); gap:var(--space-3); align-items:start; }
.in-game .game-layout > *, .camp-grid > *, .personal-vault > *, .performance-grid > * { min-width:0; }
.in-game #plot-panel, .in-game #plot-panel.mobile-open { position:static; display:block; width:100%; min-height:0; max-height:none; overflow:visible; padding:var(--space-4); }
.in-game .map-wrap canvas { display:block; width:100%; height:min(62dvh,680px); min-height:320px; }
.in-game button, .in-game select, .in-game input, .map-bar button { min-height:44px; }
.in-game button { white-space:normal; overflow-wrap:anywhere; }
.in-game :is(p,small,strong,code,h2,h3,label), #money-copy { overflow-wrap:anywhere; }
.in-game #plot-panel > * + * { margin-top:var(--space-2); }
.in-game #plot-panel .close-plot { display:none; }
#selected-budget { color:var(--frontier-gold); font-size:13px; }
#survey-result { line-height:1.5; }
.in-game .map-bar { height:auto; min-height:48px; flex-wrap:wrap; gap:8px; }
.in-game .gold-token, .in-game .gold-usd { white-space:normal; }
@media(max-width:800px) {
 .in-game .game-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
 .in-game #plot-panel,.in-game #plot-panel.mobile-open { position:static; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 12px; padding:16px; }
 .in-game #plot-panel > * + * { margin-top:0; }
 #selected-budget, #plot-description, #live-map-status { grid-column:1/-1; }
 .in-game .map-wrap canvas { height:clamp(200px,24dvh,240px); min-height:200px; }
 .in-game main { padding-bottom:calc(var(--mobile-nav-height,64px) + 16px + env(safe-area-inset-bottom)); }
 .in-game .map-bar button { min-width:44px; min-height:44px; }
 .in-game .map-hint { position:static; grid-column:1/-1; }
 .in-game #plot-panel #plot-status,.in-game #plot-panel .survey-result { font-size:13px; }
}
@media(max-height:500px) { .in-game .map-wrap canvas { height:260px; min-height:260px; } }

#jupiter-buy { --jupiter-plugin-primary:242,209,138; --jupiter-plugin-background:20,32,25; --jupiter-plugin-primaryText:232,221,189; --jupiter-plugin-interactive:48,54,38; --jupiter-plugin-module:29,39,30; min-width:0; }
#live-map-status {font-size:12px; color:#c0cfa6;}

/* Inventory accommodates enlarged text without covering the dynamite artwork. */
.inventory-slots #drag-tnt {display:flex;flex-direction:column;gap:4px;width:max(54px,4em);height:auto;min-height:72px;padding:4px;}
#tnt-stack {max-width:100%;text-align:center;line-height:1.3;}
.in-game .stats>div {flex-basis:18ch;}

/* Frontier desk: one outer frame, quiet inset sections. */
[hidden]{display:none!important}
.vault-tabs,.supply-presets{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}

.camp-grid:has(>[data-vault-pane=agent]:not([hidden])){grid-template-columns:minmax(0,1fr)}

.in-game .game-layout{padding:12px;}
.in-game .map-wrap,.in-game #plot-panel{box-shadow:none;border:0;background:#202820}
.in-game #plot-panel{border-left:1px solid #515743}
.in-game button:focus-visible,dialog button:focus-visible{outline:3px solid #ebce8d;outline-offset:3px;}
.in-game .stats{box-shadow:none;border:0;border-bottom:1px solid #515743}
.in-game .stats strong{font-variant-numeric:tabular-nums}
.in-game button:disabled{opacity:.55;cursor:not-allowed;}
dialog{box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;margin:auto;}
dialog>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
#agent-dialog{width:min(560px,calc(100vw - 24px));padding:24px}
#agent-dialog .agent-steps{width:auto;min-width:0}
@media(max-width:700px){
 .in-game .game-layout{padding:8px;gap:8px;}
 .in-game #plot-panel{border-left:0;border-top:1px solid #515743}
 .in-game .stats{gap:8px;padding:8px;display:grid;grid-template-columns:1fr 1fr}
 .in-game .stats>div{padding:8px;min-width:0}
 .in-game .stats>div:nth-child(3){display:none}
 .in-game .section-top{margin-bottom:8px}
 #agent-dialog{padding:16px}
}

.nav-pixel{width:16px;height:16px;display:inline-block;vertical-align:-2px;fill:none;stroke:currentColor;stroke-width:1.5;shape-rendering:crispEdges;flex-shrink:0}

#plot-panel:has(#confirm-panel:not([hidden])) > :is(#survey,#blast,#release){display:none}
#plot-panel:has(#action-result:not(:empty)) > .plot-info{display:none}

/* Map-first workspace: inventory on the edge, decisions in a shallow bottom rail. */
.in-game .game-layout{grid-template-columns:minmax(0,1fr);gap:0;padding:8px;}
.in-game .map-wrap canvas{height:clamp(300px,calc(100dvh - 430px),760px);min-height:0}
.in-game #plot-panel,.in-game #plot-panel.mobile-open{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px;border:0;border-top:1px solid #776342}
.in-game #plot-panel>*{margin:0!important;min-width:0}
.in-game #plot-panel #plot-name{font-size:16px;margin:0}
.in-game #plot-panel #plot-coord{font-size:10px;letter-spacing:.05em}
.in-game #plot-panel>button{width:auto;padding:8px 14px;}
.in-game #plot-panel>.plot-info{display:none}
.in-game #plot-panel>#plot-status{flex-basis:100%;border:0;padding:0;font-size:12px}
.in-game #plot-panel>.plot-notes,.in-game #plot-panel>.frontier-notes{font-size:12px}
.in-game #plot-panel>details[open]{flex-basis:100%;padding:8px}
.in-game #plot-panel #survey-result{padding:8px;font-size:12px;flex-basis:100%}
.in-game #plot-panel #confirm-panel{flex-basis:100%;padding:12px}
.in-game #plot-panel #action-result{flex-basis:100%;font-size:18px}
.in-game .stats{margin-bottom:8px}
.in-game .stats>div{padding:10px 16px}
@media(max-width:800px){
 .in-game .map-wrap canvas{height:clamp(240px,calc(100dvh - 510px),560px)}
 .in-game .map-bar{display:flex;flex-wrap:nowrap;gap:4px}
 .in-game .map-bar>span{flex:1;min-width:0;font-size:8px}
 .in-game .map-bar button{padding:4px;font-size:10px;}
 .in-game #plot-panel,.in-game #plot-panel.mobile-open{padding:8px;gap:6px 8px}
 .in-game #plot-panel #plot-coord{flex-basis:100%}
 .in-game #plot-panel #plot-name{font-size:14px}
 .in-game #plot-panel>button{flex:1 1 auto;font-size:12px;}
 .in-game #plot-panel>details{font-size:10px}
 .in-game .stats>div{padding:5px}
}

.in-game .frontier>.section-top{padding-top:0;margin-top:0}
.in-game #plot-panel>:is(#reserve,#survey,#blast,#release,#confirm-panel){order:-1}

/* Frontier controls: hard pixel bevels, embossed faces and physical travel. */
:root{--control-iron:#30372c;--control-light:#9c8b61;--control-dark:#0c120e;--control-gold:#e8ce91}
:is(.in-game,dialog) button,.in-game header nav a{
 display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;line-height:1.25;text-align:center;
 
 
 
 font-weight:700;
 transition:background-color 80ms steps(2,end),transform 80ms steps(2,end);min-height:44px;
}


:is(.in-game,dialog) button:disabled{opacity:.5;}
:is(.in-game,dialog) button:focus-visible,.in-game header nav a:focus-visible{outline:2px solid #ffe1a0;outline-offset:4px;}


.in-game .nav-pixel{filter:none;stroke:#ddc890;stroke-width:2}
.inventory-slots #drag-tnt{background-color:#3b3020;border:3px solid;border-color:#d2b57b #55412a #291e14 #ac8b54;box-shadow:inset 3px 3px #080e0b,inset -3px -3px #756443,0 3px #080d09;padding:8px;touch-action:none;cursor:grab}
.inventory-slots #drag-tnt img{image-rendering:pixelated;filter:none;pointer-events:none}
.inventory-slots #drag-tnt:active{cursor:grabbing}
.inventory-slots #drag-tnt[aria-pressed=true]{border-color:#ffe2a0;background-color:#64502c}
#tnt-stack{padding:2px 4px;background:#151b12;border-top:1px solid #756342;color:#f2d48d;font:700 11px monospace}
.dynamite-ghost{image-rendering:pixelated;filter:drop-shadow(3px 5px 0 #080d0988)}
:is(.in-game,dialog) button[data-pixel]::before{content:"";display:block;flex:0 0 16px;width:16px;height:16px;margin:0;background:var(--pixel-icon) center/contain no-repeat;image-rendering:pixelated;filter:none}
:is(.in-game,dialog) button[data-pixel=tnt]{--pixel-icon:url("/dynamite.svg");}
@media(prefers-reduced-motion:reduce){:is(.in-game,dialog) button,.in-game header nav a{transition:none;}}
button[data-pixel=claim]{--pixel-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%2376552d%22%20d%3D%22M3%202h2v13H3z%22/%3E%3Cpath%20fill%3D%22%23ebcc7f%22%20d%3D%22M5%202h8v2h-2v3h2v2H5z%22/%3E%3Cpath%20fill%3D%22%23ab8145%22%20d%3D%22M2%2014h5v2H2z%22/%3E%3C/svg%3E");}
button[data-pixel=survey]{--pixel-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%23eed9a0%22%20d%3D%22M3%202h6v2H3zM1%204h2v5H1zM9%204h2v5H9zM3%209h6v2H3z%22/%3E%3Cpath%20fill%3D%22%2388b5a4%22%20d%3D%22M3%204h6v5H3z%22/%3E%3Cpath%20fill%3D%22%23a17c43%22%20d%3D%22M10%2010h2v2h2v2h2v2h-4v-2h-2z%22/%3E%3C/svg%3E");}
button[data-pixel=bag]{--pixel-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%23d7b47b%22%20d%3D%22M5%201h6v3H5z%22/%3E%3Cpath%20fill%3D%22%23725130%22%20d%3D%22M5%204h6v2H5z%22/%3E%3Cpath%20fill%3D%22%23b28b51%22%20d%3D%22M4%206h8v2h2v6h-2v2H4v-2H2V8h2z%22/%3E%3Cpath%20fill%3D%22%23e5c478%22%20d%3D%22M5%208h2v5H5z%22/%3E%3C/svg%3E");}
button[data-pixel=load]{--pixel-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20shape-rendering%3D%22crispEdges%22%3E%3Cpath%20fill%3D%22%23997547%22%20d%3D%22M1%208h14v7H1z%22/%3E%3Cpath%20fill%3D%22%23e0ba73%22%20d%3D%22M1%208h14v2H1zM3%2011h2v3H3zM11%2011h2v3h-2z%22/%3E%3Cpath%20fill%3D%22%23f0d99b%22%20d%3D%22M7%201h2v4h3L8%209%204%205h3z%22/%3E%3C/svg%3E");}

/* Resource HUD: shared baselines, readable figures, one icon per resource. */
.in-game .stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0;margin:0 0 12px;border:1px solid #666247;background:#222a20}
.in-game .stats:has(>div:nth-child(2):not([hidden])){grid-template-columns:repeat(4,minmax(0,1fr))}
.in-game .stats>div{position:relative;min-width:0;padding:16px 20px;display:flex;flex-direction:column;gap:8px;border-right:1px solid #555a43}
.in-game .stats>div:last-child{border-right:0}
.in-game .stats>div>span{display:flex;align-items:center;gap:8px;min-height:26px;font:500 15px/1.3 system-ui;color:#e0ddc5;letter-spacing:0;text-transform:none;padding:0}
.in-game .stats>div>span::before{display:none!important}
.in-game .stats strong{font:700 26px/1.15 Georgia,serif;margin:0;color:#f3d695}
.in-game .stats small{font:13px/1.4 system-ui;margin:0;color:#c9cbb9}
.in-game .stats .gold-pair{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.in-game .stats .gold-usd{order:-1;font:700 26px/1.15 Georgia,serif;color:#f3d695}
.in-game .stats .gold-token{display:flex;align-items:center;gap:8px;font:500 15px/1.4 system-ui;color:#e1d5af}
.in-game .stats .gold-token::before{width:24px;height:18px;margin:0}
.in-game .stats .tnt-icon{width:24px;height:24px;image-rendering:pixelated}
.in-game #bag-open{position:static;min-height:44px;width:auto;padding:4px 10px;font-size:12px;margin-left:auto}
.in-game #bag-open::before{display:none}
.in-game .stats>.hud-bag>span{min-height:26px}
.in-game .hud-bag #bag-open{position:absolute;right:12px;top:10px}
.in-game .hud-bag>span{padding-right:58px}
@media(max-width:800px){
 .in-game .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
 .in-game .stats>div{padding:12px;gap:6px}
 .in-game .stats>div:nth-child(3){display:flex;grid-column:1/-1;grid-row:2;flex-direction:row;align-items:center;justify-content:space-between;border-top:1px solid #555a43;padding:8px 12px}
 .in-game .stats>div:nth-child(3) .gold-pair{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:4px 12px}
 .in-game .stats>div>span{font-size:14px}
 .in-game .stats strong,.in-game .stats .gold-usd{font-size:22px}
 .in-game .stats .gold-token{font-size:14px}
 .in-game .stats small{font-size:12px}
 .in-game .stats>div:nth-child(3) .gold-usd{font-size:18px}
 .in-game .stats>div:nth-child(3) .gold-token{font-size:12px}
 .in-game .hud-bag #bag-open{right:8px;top:5px;width:44px;padding:4px;font-size:0}
 .in-game .hud-bag #bag-open::before{display:inline-block;margin:0}
 .in-game .hud-bag>span{padding-right:44px}
 .in-game .map-wrap canvas{height:clamp(240px,calc(100dvh - 600px),560px)}
}
@media(max-width:800px){.in-game .stats:has(>div:nth-child(2):not([hidden])){grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Control geometry: centered content, shared depth, no selected-slot movement. */
.in-game :is(button,header nav a),dialog button{padding:10px 14px;min-height:44px;box-sizing:border-box;}
.in-game header nav{align-items:center;gap:8px}
.in-game header nav :is(a,button){height:44px;margin:0;min-width:76px;font-size:13px;}
.in-game .mobile-game-nav{align-items:stretch;gap:6px;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
.in-game .mobile-game-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:54px;padding:6px 2px;margin:0;line-height:1.1;font-size:11px;}
.in-game .mobile-game-nav .nav-pixel{display:block;width:16px;height:16px;margin:0;vertical-align:initial;flex:none}
.in-game .map-bar button{display:inline-flex;align-items:center;justify-content:center;height:44px;min-width:44px;padding:8px;margin:0;}
.in-game .map-bar :is(#zoom-in,#zoom-out){width:44px;flex:0 0 44px;font:20px/1 monospace}
.in-game .inventory-slots #drag-tnt{display:flex;flex-direction:column;align-items:center;justify-content:center;width:60px;min-height:80px;height:auto;padding:8px;gap:6px;border-width:2px;border-color:#a3946c #272b21 #161c16 #7f7957;box-shadow:inset 1px 1px #d8c48c33,inset -1px -1px #080e0980,0 2px #080d09;transform:none}
.in-game .inventory-slots #drag-tnt img{width:32px;height:32px;flex:none;margin:0}
.in-game #tnt-stack{margin:0;width:100%;padding:2px;line-height:14px;text-align:center}
.in-game .inventory-slots #drag-tnt[aria-pressed=true]{border-color:#d5b976;background:#50452b;box-shadow:inset 2px 2px #0a100b,inset -1px -1px #d4b57255,0 1px #090e09}
.in-game #bag-open{display:flex;align-items:center;justify-content:center;gap:0;padding:8px;min-width:44px;height:44px;margin:0}
.in-game #bag-open::before{flex:none;width:16px;height:16px;margin:0}

dialog .close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;line-height:1;}

/* MATERIAL SYSTEM — single owner for controls and container surfaces.
   Layout remains in the responsive shell; do not add per-screen material overrides. */
:root{--ui-bg:#18211b;--ui-panel:#242d22;--ui-inset:#1b241d;--ui-edge:#6d684a;--ui-light:#a99970;--ui-shadow:#0c140f;--ui-text:#eee0b9;--ui-muted:#c6c7b2;--ui-accent:#ddbd79;--ui-danger:#693d2d;--ui-bevel:inset 1px 1px 0 #b8ab7826,inset -1px -1px 0 #080e0966;--ui-depth:0 2px 0 #0c140f}
button,button.outline,.primary,.secondary,.danger,.in-game header nav a{
 border:2px solid;border-color:var(--ui-light) #414633 #293122 #89805c;border-radius:0;
 background:var(--ui-panel);color:var(--ui-text);box-shadow:var(--ui-bevel),var(--ui-depth);text-shadow:none;transform:none;filter:none;
}
button:hover:not(:disabled),.in-game header nav a:hover{background:#35402d;border-top-color:#d6c18a}
button.primary,button#reserve,button#deposit,button#money-confirm{background:#575333;color:#fff0c5;border-top-color:#d8bd7e}
button.danger{background:var(--ui-danger);color:#ffe0be;border-top-color:#be8b64}
button:active:not(:disabled),button[aria-pressed=true]{background:#323c29;border-color:#353f2b #9b8b60 #b09a66 #465039;box-shadow:inset 1px 2px 0 #0a120d;transform:none}
button:disabled{background:#242c22;color:#a6aa98;border-color:#545a44;box-shadow:none;opacity:.6;filter:none}
button:focus-visible,.in-game header nav a:focus-visible{outline:2px solid #f6d48a;outline-offset:3px}
/* Navigation is a selector, not a competing call to action. */
.in-game header nav :is(a,button),.in-game .mobile-game-nav button,.vault-tabs button,.miner-periods button{
 background:var(--ui-inset);border:1px solid #5e644b;box-shadow:none;color:var(--ui-muted);text-shadow:none;transform:none;
}
.in-game header nav a[aria-current=page],.in-game .mobile-game-nav button[aria-current=page],.vault-tabs button[aria-pressed=true],.miner-periods button[aria-pressed=true]{background:#3b442e;border-color:var(--ui-accent);box-shadow:inset 0 -2px var(--ui-accent);color:#ffe1a0;transform:none}
.inventory-slots #drag-tnt{background:var(--ui-inset);border:2px solid var(--ui-edge);box-shadow:inset 2px 2px var(--ui-shadow);transform:none}
.inventory-slots #drag-tnt[aria-pressed=true]{background:#41452c;border-color:var(--ui-accent);box-shadow:inset 2px 2px var(--ui-shadow)}
/* Frame, inset and dialog share a palette; depth has one meaning. */
.in-game .game-layout,.personal-vault{background:var(--ui-bg);border:1px solid var(--ui-edge);border-radius:0;box-shadow:none;color:var(--ui-text)}
.in-game .camp-grid>article,.mining-performance,#assay-office,.journal>article,.miners-board{background:var(--ui-panel);border:1px solid var(--ui-edge);border-radius:0;box-shadow:none;color:var(--ui-text)}
.in-game #plot-panel,.in-game #plot-panel.mobile-open,.in-game .map-wrap{background:var(--ui-inset);border:0;border-radius:0;box-shadow:none}
.in-game #plot-panel,.in-game #plot-panel.mobile-open{border-top:1px solid var(--ui-edge)}
.blast-review,.in-game #plot-panel .blast-review,.survey-result{background:var(--ui-inset);border:1px solid var(--ui-edge);box-shadow:none;color:var(--ui-text)}
dialog,.in-game dialog,#profile-dialog,#agent-dialog,#money-dialog,#fairness-dialog{background:var(--ui-panel);color:var(--ui-text);border:2px solid var(--ui-light);border-radius:0;box-shadow:0 8px 0 #080f0aaa;padding:24px}
dialog::backdrop{background:#08120ddd;backdrop-filter:blur(3px)}
input,select,textarea{background:var(--ui-inset);color:var(--ui-text);border:1px solid var(--ui-edge);border-radius:0;box-shadow:inset 1px 1px var(--ui-shadow)}
@media(max-width:700px){dialog,.in-game dialog,#profile-dialog,#agent-dialog,#money-dialog,#fairness-dialog{padding:16px}}

/* Equal navigation slots; typography belongs to the control, not its screen. */
.vault-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;justify-content:initial}
.vault-tabs button{width:100%;margin:0}
button,.in-game button,dialog button{font-family:Georgia,serif;font-weight:700;letter-spacing:0;text-align:center}
.in-game .map-bar>div{display:flex;gap:6px;align-items:center}

/* Gameplay occupies the viewport; map yields space to the action rail. */
body.in-game:has(#game[data-view=frontier]){overflow:hidden}
.in-game #game[data-view=frontier] #frontier{position:fixed;top:var(--game-header-bottom,80px);bottom:12px;left:12px;right:12px;max-width:1476px;margin:0 auto;padding:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:8px;min-height:0}
.in-game #game[data-view=frontier] .section-top{margin:0;padding:0;gap:8px}
.in-game #game[data-view=frontier] .section-top h2{font-size:24px;margin:0}
.in-game #game[data-view=frontier] .section-top .eyebrow{display:none}
.in-game #game[data-view=frontier] .stats{margin:0}
.in-game #game[data-view=frontier] .game-layout{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:0;padding:6px}
.in-game #game[data-view=frontier] .map-wrap{height:100%;align-self:stretch;min-width:0;min-height:0;display:grid;grid-template-rows:44px minmax(0,1fr) 22px;grid-template-columns:64px minmax(0,1fr)}
.in-game #game[data-view=frontier] .map-bar{grid-column:1/-1;grid-row:1;min-height:44px;padding:0 4px}
.in-game #game[data-view=frontier] .map-wrap canvas{grid-column:2;grid-row:2;height:100%;min-height:0;width:100%}
.in-game #game[data-view=frontier] .dynamite-tray{grid-column:1;grid-row:2;min-height:0;padding:4px 2px;overflow:hidden}
.in-game #game[data-view=frontier] .map-hint{grid-column:1/-1;grid-row:3;padding:2px 6px;font-size:10px}
.in-game #plot-panel{position:relative;padding:8px;gap:6px 10px}
.in-game #plot-panel #plot-name{display:none}
.in-game #plot-panel #plot-status{font-size:12px;line-height:1.3}
.in-game #plot-panel>details[open]{position:absolute;left:0;right:0;bottom:100%;max-height:45dvh;overflow:auto;z-index:5;padding:16px;background:var(--ui-panel);border:1px solid var(--ui-edge);box-shadow:0 -4px 12px #0007}
.in-game #confirm-panel{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.in-game #confirm-panel>*{margin:0}
.in-game #confirm-panel p{font-size:12px}
.in-game #plot-panel #survey-result{font-size:12px;padding:4px;line-height:1.3}
@media(max-width:800px){
 .in-game #game[data-view=frontier] #frontier{bottom:calc(var(--mobile-nav-height,70px) + 6px);left:8px;right:8px;gap:6px}
 .in-game #game[data-view=frontier] .section-top h2{font-size:18px}
 .in-game #game[data-view=frontier] .stats>div{padding:6px 10px;gap:4px}
 .in-game #game[data-view=frontier] .stats .gold-usd,.in-game #game[data-view=frontier] .stats strong{font-size:20px}
 .in-game #game[data-view=frontier] .stats small{display:none}
 .in-game #plot-panel>button{padding:6px 8px;font-size:12px;min-height:44px}
 .in-game #plot-panel #plot-coord{flex-basis:auto;font-size:10px}
 .in-game #plot-panel #release{flex:0 1 auto}
}
@media(max-height:550px){
 .in-game #game[data-view=frontier] #frontier{grid-template-rows:auto minmax(0,1fr)}
 .in-game #game[data-view=frontier] .section-top{display:none}
 .in-game #game[data-view=frontier] .stats{display:flex}
 .in-game #game[data-view=frontier] .stats>div{padding:4px 8px;flex:1;gap:2px;border-top:0}
 .in-game #game[data-view=frontier] .stats .gold-pair{flex-direction:row;gap:6px}
 .in-game #game[data-view=frontier] .stats>div>span{font-size:12px;min-height:18px}
 .in-game #game[data-view=frontier] .stats strong,.in-game #game[data-view=frontier] .stats .gold-usd{font-size:16px}
 .in-game #game[data-view=frontier] .stats .gold-token{font-size:11px}
 .in-game #game[data-view=frontier] .stats small{display:none}
}
.in-game #game[data-view=frontier] .dynamite-tray{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px}
.in-game #game[data-view=frontier] .inventory-heading{display:none}
.in-game #game[data-view=frontier] .map-wrap{overflow:hidden}
@media(max-width:800px){
 .in-game #game[data-view=frontier] .section-top{display:flex;flex-wrap:nowrap;justify-content:space-between}
 .in-game #game[data-view=frontier] .section-top .practice{display:none}
 .in-game #game[data-view=frontier] .section-top h2{font-size:16px}
 .in-game #game[data-view=frontier] #clock{font-size:10px}
 .in-game #plot-panel>:is(#survey,#blast,#release){flex:1 1 0;min-width:0;font-size:11px;padding:4px;gap:4px}
 .in-game #game[data-view=frontier] .stats .gold-pair{gap:2px}
 .in-game #game[data-view=frontier] .stats>div>span{font-size:12px;min-height:20px}
 .in-game #game[data-view=frontier] .stats>div:nth-child(3){padding:4px 8px}
}

.in-game #plot-panel .action-tools{display:flex;flex:1 0 100%;gap:8px;order:-1;min-width:0}
.in-game #plot-panel:has(#confirm-panel:not([hidden])) .action-tools{display:none}
.in-game #confirm-panel>button{width:auto;flex:1 1 40%;padding:6px}
.in-game #confirm-panel>p{flex-basis:100%}

/* Supplemental map content lives in a bounded dialog, never overflows the rail. */
.field-dialog{width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto}
.field-dialog>details{margin:0;padding:0;border:0}
.field-dialog>details>summary{display:none}
.field-dialog h2{margin:0 48px 16px 0;font-size:24px}
.field-dialog details details{position:static;margin:12px 0;padding:8px;border:1px solid var(--ui-edge)}
.field-dialog #nearby{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.field-dialog #nearby button{width:100%;min-width:0;min-height:44px;white-space:normal}

/* Phone play layout: map first, compact HUD, contextual action tray. */
@media(max-width:800px){
 .in-game header{min-height:52px;padding:4px 10px;gap:8px;flex-wrap:nowrap}
 .in-game header .brand{font-size:20px}.in-game header .brand span{display:none}
 .in-game #profile-button{height:40px;min-height:40px;max-width:150px;padding:6px 10px;font-size:11px}
 .in-game #game[data-view=frontier] #frontier{gap:4px;left:6px;right:6px;bottom:calc(var(--mobile-nav-height,60px) + 4px)}
 .in-game #game[data-view=frontier] .section-top{height:22px;min-height:0;overflow:hidden}
 .in-game #game[data-view=frontier] .section-top h2{font-size:13px}
 .in-game #game[data-view=frontier] .stats{display:grid;grid-template-columns:1fr 1fr;border:0;background:var(--ui-inset)}
 .in-game #game[data-view=frontier] .stats>div{padding:5px 8px;gap:2px;border:0;min-height:0}
 .in-game #game[data-view=frontier] .stats>div>span{font-size:11px;min-height:14px;line-height:14px}
 .in-game #game[data-view=frontier] .stats strong,.in-game #game[data-view=frontier] .stats .gold-usd{font-size:19px;line-height:22px}
 .in-game #game[data-view=frontier] .stats .gold-pair{flex-direction:row;align-items:center;gap:6px}
 .in-game #game[data-view=frontier] .stats .gold-token{display:none}
 .in-game #game[data-view=frontier] .stats>div:nth-child(3){display:none}
 .in-game #game[data-view=frontier] .stats .tnt-icon{width:16px;height:16px}
 .in-game #game[data-view=frontier] .hud-bag #bag-open{top:3px;right:4px;height:40px;min-height:40px;width:40px;min-width:40px}
 .in-game #game[data-view=frontier] .game-layout{padding:0;grid-template-rows:minmax(0,1fr) auto}
 .in-game #game[data-view=frontier] .map-wrap{position:relative;display:block;height:100%;min-height:0}
 .in-game #game[data-view=frontier] .map-wrap canvas{position:absolute;inset:0;width:100%;height:100%;min-height:0}
 .in-game #game[data-view=frontier] .map-bar{position:absolute;right:6px;top:6px;z-index:2;padding:0;min-height:0;background:none;border:0}
 .in-game #game[data-view=frontier] .map-bar>span{display:none}
 .in-game #game[data-view=frontier] .map-bar button{height:44px;min-height:44px;background:#202a20ed}
 .in-game #game[data-view=frontier] #map-reset{font-size:10px;padding:4px;width:48px;min-width:48px}
 .in-game #game[data-view=frontier] .dynamite-tray{position:absolute;left:6px;top:6px;z-index:2;padding:0;background:none;border:0;overflow:visible}
 .in-game #game[data-view=frontier] #drag-tnt{width:48px;min-height:58px;padding:4px;gap:2px;background:#202a20ed}
 .in-game #game[data-view=frontier] #drag-tnt img{width:24px;height:24px}
 .in-game #game[data-view=frontier] .map-hint{position:absolute;bottom:0;left:0;right:0;z-index:1;padding:3px;background:#162018dd;font-size:10px;text-align:center;pointer-events:none}
 .in-game #plot-panel,.in-game #plot-panel.mobile-open{display:grid;grid-template-columns:1fr 44px 44px;padding:6px;gap:4px;align-items:center}
 .in-game #plot-panel .action-tools{grid-column:1/-1;display:flex;order:0;gap:6px}
 .in-game #plot-panel #plot-coord{grid-column:1;font-size:10px;line-height:1.2}
 .in-game #plot-panel #plot-status{grid-column:1;grid-row:3;font-size:11px;line-height:1.25;padding:0;border:0}
 .in-game #plot-panel #survey-result,.in-game #plot-panel #action-result,.in-game #plot-panel #confirm-panel{grid-column:1/-1;margin:0}
 .in-game .mobile-game-nav{padding:4px 6px calc(4px + env(safe-area-inset-bottom));gap:4px}
 .in-game .mobile-game-nav button{min-height:48px;padding:4px 2px;font-size:10px;gap:3px}
}

@media(max-width:800px){.in-game #plot-panel .action-tools{grid-row:1}.in-game #plot-panel #plot-coord{grid-row:2}}

/* A single, compact decision rail; no duplicate actions over the terrain. */
.in-game #plot-panel,.in-game #plot-panel.mobile-open{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:8px;align-items:center}
.in-game #plot-panel .action-tools{grid-column:1;grid-row:1;display:flex;flex-wrap:nowrap;gap:6px}
.in-game #plot-panel .action-tools>button{flex:0 1 auto;min-width:0;min-height:44px;white-space:normal}
.in-game #plot-panel .field-trigger{grid-column:2;grid-row:1;width:auto;font-size:12px;padding:6px 12px}
.in-game #plot-panel .field-trigger::after{display:none}
.in-game #plot-panel #plot-coord{grid-column:1/-1;grid-row:2}
.in-game #plot-panel #plot-status{grid-column:1/-1;grid-row:3}
.in-game #plot-panel #survey-result,.in-game #plot-panel #action-result,.in-game #plot-panel #confirm-panel{grid-column:1/-1}
.plot-options>details{padding:12px 0;border-bottom:1px solid var(--ui-edge)}
.plot-options>details>summary{display:list-item;min-height:44px;align-content:center;cursor:pointer}
.plot-options>#release{margin-top:16px;min-height:44px}
@media(max-width:800px){
 .in-game #plot-panel .action-tools>button{font-size:12px;padding:6px 10px}
}

/* Read-only plot context sits on the map and never intercepts gestures. */
.in-game #game[data-view=frontier] .map-context{position:absolute;left:8px;right:auto;bottom:8px;z-index:2;max-width:calc(100% - 16px);padding:6px 9px;text-align:left;background:#162018e8;pointer-events:none;border:0}
.in-game .map-context #plot-coord{display:block;margin:0;font-size:11px;line-height:1.4;letter-spacing:.02em}
.in-game .map-context #plot-status{margin:2px 0 0;padding:0;border:0;font-size:12px;line-height:1.35;color:#e8ddb4;overflow-wrap:anywhere}
.in-game #plot-panel #action-result{font-size:15px;line-height:1.4;margin:0;padding:8px 0}
.in-game #plot-panel #action-result:empty{display:none}

/* A private field diary: dated entries, generous reading rhythm, no feed rows. */
#activity .diary-entry{padding:20px 0;border-bottom:1px solid var(--ui-edge);max-width:70ch}
#activity .diary-entry time{display:block;font-size:11px;letter-spacing:.04em;color:#bcb38c}
#activity .diary-entry h3{font-family:Georgia,serif;font-size:22px;line-height:1.2;margin:8px 0;color:#efdeb0}
#activity .diary-entry p{font-family:Georgia,serif;font-size:16px;line-height:1.65;margin:0;padding:0;border:0;color:#ded7bd}

/* Miner cards keep identity intact instead of squeezing it beside a balance. */
#miner-rankings li{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:start;gap:24px}
#miner-rankings .miner-identity{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;text-align:center}
#miner-rankings .miner-identity>strong{font-size:15px;line-height:1.4;overflow-wrap:break-word;word-break:normal;width:100%}
#miner-rankings .miner-portrait{width:80px;height:80px;border:3px solid #a48c52;box-shadow:0 0 0 2px #111b14,inset 0 0 0 1px #eed899}
#miner-rankings small{margin:0;font-size:12px;line-height:1.4}
#miner-rankings .miner-results{min-width:0}
#miner-rankings .miner-results>strong{display:block;margin:6px 0 16px;color:var(--rpg-gold)}
#miner-rankings .gold-pair{flex-wrap:wrap}
.miner-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.miner-metrics dt{font-size:12px;color:#bbb79f}.miner-metrics dd{margin:3px 0 0;font-size:17px;color:#eee1b8}
@media(max-width:600px){#miner-rankings li{grid-template-columns:minmax(0,1fr);gap:16px}#miner-rankings .miner-identity{max-width:220px;justify-self:center}#miner-rankings .miner-results{width:100%}}

#miner-rankings .gold-token{margin-right:8px}

.brand-wagon{display:block;width:190px;height:auto;image-rendering:pixelated}.hero-wagon-logo{display:block;width:min(680px,90vw);height:auto;image-rendering:pixelated;margin:auto}.eureka-logo:has(.hero-wagon-logo){display:block;transform:none}#wagon-transfers{margin-top:20px}#wagon-transfers>summary,.gold-exchange>summary{min-height:44px;cursor:pointer;align-content:center}#swap-panel select{width:100%;min-height:44px;margin:6px 0 12px}@media(max-width:800px){.brand-wagon{width:150px}.hero-wagon-logo{width:90vw}}

.header-deposits{display:none}
@media(max-width:800px){
 .in-game header{flex-wrap:wrap}
 .in-game .header-deposits{display:grid;grid-template-columns:minmax(0,1fr) auto;flex-basis:100%;gap:2px 10px;padding:5px 0 3px;border-top:1px solid #665e46;align-items:center}
 .header-deposits>span:first-child{font-size:12px;color:#e6cf8b}
 .header-deposits small{font-size:10px;color:#beb99f}
 .header-deposits strong{grid-column:2;grid-row:1/3;font-size:22px;line-height:1.1;color:#ffdc79;white-space:nowrap}
 .header-deposits #header-deposit-gold{font-size:11px;color:#cfc6a6}
}

/* Frontier instrument panel: one shared brass rim and recessed readouts. */
.in-game #game[data-view=frontier] .stats{gap:6px;padding:6px;background:#383b2c;border:1px solid #9a8758;box-shadow:inset 1px 1px #c1ad70,inset -1px -1px #131c17}
.in-game #game[data-view=frontier] .stats>div{min-width:0;background:#19251e;border:1px solid #131b15;box-shadow:inset 2px 2px #0d1611,inset -1px -1px #66704c;padding:8px 12px}
.in-game #game[data-view=frontier] .stats strong{text-shadow:1px 2px #0a100c}
.in-game #game[data-view=frontier] .map-wrap{border:3px solid;border-color:#ad9861 #34392a #303729 #ac955e;box-shadow:0 0 0 1px #101810,inset 0 0 0 2px #162219}
.in-game #game[data-view=frontier] .map-wrap::after{content:'';position:absolute;inset:0;z-index:3;pointer-events:none;box-shadow:inset 2px 2px #111b16,inset -2px -2px #b1a16c66}
.in-game #plot-panel{background:#353b2d;border:1px solid #8b7d51;box-shadow:inset 1px 1px #b3a06a,inset -1px -1px #111b15}
.in-game #game[data-view=frontier] .map-bar button,.in-game #game[data-view=frontier] #drag-tnt{border:2px solid;border-color:#b6a270 #222a20 #222a20 #a18e5c;background:#364333;box-shadow:inset 1px 1px #6c7450,inset -1px -1px #101b14}
.in-game #game[data-view=frontier] .map-bar button:active,.in-game #game[data-view=frontier] #drag-tnt:active{border-color:#222a20 #a18e5c #b6a270 #222a20;box-shadow:inset 2px 2px #142018;transform:translateY(1px)}
@media(max-width:800px){
 .in-game .header-deposits{padding:6px 8px;background:#18241c;border:1px solid #8c7d50;box-shadow:inset 2px 2px #0c1510,inset -1px -1px #626b48}
 .in-game #game[data-view=frontier] .stats{padding:4px;gap:5px}
 .in-game #game[data-view=frontier] .stats>div{padding:5px 8px}
}

/* One button material; full-color sprites are never dimmed with their button. */
.in-game .mobile-game-nav button,.in-game #plot-panel .action-tools>button,.in-game #plot-panel .field-trigger{border:2px solid;border-color:#ad9861 #222d23 #222d23 #ad9861;background:#354232;box-shadow:inset 1px 1px #64704b,inset -1px -1px #142017;border-radius:0}
.in-game .mobile-game-nav button[aria-current],.in-game .mobile-game-nav button[aria-pressed=true]{background:#514c32;border-color:#eed38c #413b28 #413b28 #eed38c}
.in-game #game[data-view=frontier] .dynamite-tray{display:none}
.frontier-icon{display:inline-block;width:28px;height:32px;flex-shrink:0;background-image:url('/frontier-icons.png');background-size:400% 100%;background-repeat:no-repeat;image-rendering:pixelated;vertical-align:middle}
.icon-tnt{background-position:0 0}.icon-vault{background-position:33.333% 0}.icon-map{background-position:66.666% 0}.icon-journal{background-position:100% 0}
.in-game .mobile-game-nav .frontier-icon{width:26px;height:28px}
#bag-open::before{background-image:url('/frontier-icons.png');background-size:400% 100%;background-position:33.333% 0;width:28px;height:32px;content:'';image-rendering:pixelated}
#bag-open{font-size:0}
.in-game #plot-panel #blast::before,.in-game #plot-panel #survey::before{content:'';background-image:url('/frontier-icons.png');background-size:400% 100%;background-position:0 0;width:24px;height:28px;flex-shrink:0;image-rendering:pixelated}
.in-game #game[data-view=frontier] .hud-tnt>span .frontier-icon{width:20px;height:24px}
.in-game #bag-open::before{mask:none;-webkit-mask:none;background-color:transparent;opacity:1;position:static;display:block;margin:0;background-image:url('/frontier-icons.png');background-size:400% 100%;background-position:33.333% 0;width:28px;height:32px}

#swap-panel{width:min(480px,calc(100vw - 20px));padding:22px;--jupiter-plugin-primary:226,194,112;--jupiter-plugin-background:24,34,27;--jupiter-plugin-primaryText:239,230,201;--jupiter-plugin-warning:240,179,88;--jupiter-plugin-interactive:57,67,48;--jupiter-plugin-module:32,44,34}
#jupiter-buy{width:100%;min-width:0}.swap-token-panel{padding:16px;border:1px solid #8b7b4d;background:#17231c;box-shadow:inset 2px 2px #101811}
.swap-token-panel>div{display:flex;justify-content:space-between;gap:12px;align-items:center}.swap-token-panel small{font-size:11px;color:#a8ad98}
.swap-amount-row{margin-top:18px;font-size:30px;color:#8e9788}.swap-token-chip{font-size:16px;color:#e2d6af;background:#354232;padding:10px}
.swap-direction-mark{text-align:center;font-size:22px;line-height:32px;color:#cfb66e}#buy-status{font-size:13px;line-height:1.45}

/* Symbol-only navigation and map tools, with a consistent centered hit area. */
.in-game .mobile-game-nav button,.in-game header nav :is(a,button){display:flex;align-items:center;justify-content:center;gap:0;min-width:48px;min-height:48px;padding:6px;font-size:0}
.in-game :is(.mobile-game-nav,header nav) .frontier-icon{width:36px;height:36px;flex:0 0 36px;margin:0}
.in-game :is(.mobile-game-nav,header nav) .nav-pixel{width:32px;height:32px;flex:0 0 32px;margin:0}
.in-game #plot-panel .action-tools>button{display:flex;align-items:center;justify-content:center;flex:0 1 auto;width:auto;min-width:80px;min-height:48px;height:auto;padding:6px 10px;gap:6px;font-size:14px}
.in-game #plot-panel .field-trigger{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:64px;height:48px;padding:6px 8px;font-size:13px}
.blast-preference{display:flex;align-items:center;gap:8px;min-height:44px;font:13px/1.4 system-ui}
.blast-preference input{width:18px;height:18px;flex-shrink:0}
.in-game #plot-panel .action-tools{flex-wrap:wrap}
.in-game #plot-panel .action-tools>button::before{position:static;display:block;width:32px;height:32px;flex:0 0 32px;margin:0;opacity:1;mask:none;-webkit-mask:none}
.in-game #plot-panel #survey::before{background:var(--pixel-icon) center/contain no-repeat}
.in-game #plot-panel .field-trigger::after{display:none;content:none}
.in-game #game[data-view=frontier] #map-reset{font-size:28px;padding:0;min-width:44px;width:44px}
.in-game :is(header nav,.mobile-game-nav) :is(a,button):focus-visible,.in-game #plot-panel button:focus-visible{outline:2px solid #ffe7a0;outline-offset:2px}

/* The swap is part of Supplies, not a second overlay or framed dialog. */
.in-game #swap-panel{width:100%;max-width:480px;min-width:0;margin:0 auto;padding:0;border:0;box-shadow:none;background:transparent}
.in-game #swap-panel h3{margin-top:0}
.in-game #swap-panel p{margin:10px 0;line-height:1.5}
.in-game #swap-panel .swap-token-panel{margin:0}

/* Compact resource HUD: no inherited editorial margins inside metrics. */
.in-game #game[data-view=frontier] .stats span{margin:0}
.in-game #game[data-view=frontier] .stats{padding:4px;gap:4px}
.in-game #game[data-view=frontier] .stats>div{justify-content:flex-start;gap:4px;padding:8px 12px}
.in-game #game[data-view=frontier] .stats>div>span{height:24px;min-height:24px;padding:0;gap:6px;line-height:1.25}
.in-game #game[data-view=frontier] .stats .hud-resource-icon,
.in-game #game[data-view=frontier] .hud-tnt>span .frontier-icon{width:24px;height:24px;flex:0 0 24px;display:block}
.in-game #game[data-view=frontier] .stats>div>strong{margin:0;min-height:30px;line-height:30px}
.in-game #game[data-view=frontier] .stats .gold-usd{line-height:30px}
@media(max-width:800px){
 .in-game #game[data-view=frontier] .stats>div{padding:6px 8px;gap:2px}
 .in-game #game[data-view=frontier] .stats>div>span{height:24px;min-height:24px;font-size:12px}
 .in-game #game[data-view=frontier] .stats>div>strong,.in-game #game[data-view=frontier] .stats .gold-usd{min-height:24px;line-height:24px}
 .in-game #game[data-view=frontier] .stats .hud-resource-icon,.in-game #game[data-view=frontier] .hud-tnt>span .frontier-icon{width:22px;height:24px;flex-basis:22px}
}

/* Hand-pixelled frontier portraits use an exact 32-pixel grid. */
.frontier-nav-art{display:block;width:32px;height:32px;flex:0 0 32px;image-rendering:pixelated;stroke:none;filter:none;margin:0}
.in-game :is(.mobile-game-nav,header nav) .frontier-nav-art{width:32px;height:32px}

/* Detailed companion sprites matched to the original inventory artwork. */
.frontier-person-icon{display:block;width:40px;height:40px;flex:0 0 40px;background:url("/frontier-people-icons.png") 0 50%/200% 100% no-repeat;image-rendering:pixelated;margin:0}
.frontier-person-icon.icon-agent{background-position:100% 50%}

/* Claim marker shares the rendered inventory artwork finish. */
:is(.in-game,dialog) button[data-pixel=claim]{--pixel-icon:url("/claim-marker.png")}
.in-game #plot-panel #reserve::before{background:var(--pixel-icon) center/contain no-repeat;width:36px;height:36px;flex-basis:36px}

.in-game .gold-weight{display:block;font:12px/1.4 system-ui;color:#dfd2ae;white-space:normal}
.in-game #game[data-view=frontier] #earned.gold-pair{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;justify-items:start;gap:4px}
.in-game #game[data-view=frontier] #earned .gold-usd{grid-column:1;grid-row:2;order:0}
.in-game #game[data-view=frontier] #earned .gold-token{grid-row:1}
.in-game #game[data-view=frontier] #earned .gold-token::before{display:none}
.in-game #game[data-view=frontier] #earned .gold-weight{grid-row:3}
.in-game #game[data-view=frontier] .stats .gold-pair{gap:2px}
.in-game #game[data-view=frontier] .stats .gold-token{font-size:12px}
.in-game #game[data-view=frontier] .stats .gold-weight{font-size:11px;line-height:1.3}
.in-game #earned .gold-weight{flex-basis:auto}

.map-richest{display:grid;gap:8px;padding:12px;margin:12px 0;background:#16231b;border:1px solid #756841}.map-richest strong{color:#f3d695;font-size:18px;line-height:1.4}.map-richest small{font:12px/1.5 system-ui;color:#c2c6ae}

.deposit-explainer{margin-top:24px;padding-top:20px;border-top:1px solid #756841}
.deposit-explainer p{font:14px/1.6 system-ui;margin:12px 0}.deposit-explainer h3{font-size:22px;margin:16px 0}
.deposit-examples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.deposit-examples figure{margin:0;min-width:0;border:1px solid #756841;background:#17231c}
.deposit-examples img{display:block;width:100%;height:auto;image-rendering:pixelated}
.deposit-examples figcaption{display:grid;gap:4px;padding:10px;font:12px/1.4 system-ui;color:#e6d6a9}
.heatmap-key span{display:inline-block;width:80px;height:12px;background:linear-gradient(90deg,#263b31,#58106c,#eb7822,#fcffa4);margin-right:8px}
@media(max-width:600px){.deposit-examples{grid-template-columns:1fr}.deposit-explainer{margin:20px 0 0}.deposit-examples figure{width:100%;max-width:360px;justify-self:center}}

/* Discovery souvenir: contained preview, native share only on request. */
#discovery-card-dialog{box-sizing:border-box;width:min(94vw,520px);max-height:92dvh;overflow:auto;padding:16px;background:#19271f;color:#f1dfaa;border:4px ridge #cbb577;}
#discovery-card-dialog::backdrop{background:#08110de0;}
#discovery-card-dialog form{float:right;}#discovery-card-dialog h2{margin:0 0 12px;font-family:Georgia,serif;}
#discovery-card-dialog canvas{display:block;width:auto;max-width:100%;height:auto;max-height:62dvh;margin:auto;object-fit:contain;}
#discovery-card-dialog canvas[hidden]{display:none;}
#discovery-card-dialog button{min-height:44px;min-width:44px;}
.discovery-card-actions{display:flex;flex-wrap:wrap;gap:8px;}.discovery-card-actions button{flex:1;}
#discovery-card-dialog .discovery-card-actions{align-items:stretch;}
#discovery-card-dialog .discovery-card-actions button{height:48px;margin:0;padding:8px 12px;line-height:1.2;}

.hud-resource-icon{object-fit:contain;image-rendering:pixelated;}

/* Vault artwork is one coherent scene, never floating bar overlays. */
figure.vault-art{margin:0;min-width:0;width:100%;}
.vault-art>img{width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;image-rendering:pixelated;}
.vault-art>figcaption{padding:10px 12px;color:#dfd1a3;background:#142019;border-top:1px solid #766b47;font:14px/1.4 Georgia,serif;text-align:center;}

#vault-scene{width:100%;aspect-ratio:3/2;}#vault-scene>svg,#vault-scene>img{display:block;width:100%;height:auto;aspect-ratio:3/2;border:0;image-rendering:pixelated;}

/* Landing composition: normal flow keeps entry reachable at every aspect ratio. */
.at-gate .hero {
  display:flex;flex-direction:column;justify-content:center;gap:16px;
  height:auto;min-height:100svh;overflow:visible;
  padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  box-sizing:border-box;
}
.at-gate .landscape-scene{overflow:hidden;}
.at-gate .hero-copy.title-screen{
  position:relative;inset:auto;transform:none;width:100%;max-width:640px;
  margin:auto auto 0;padding:0;display:flex;flex-direction:column;align-items:center;gap:12px;
}
.at-gate .hero h1.eureka-logo{
  width:100%;margin:0;padding:0;font-size:0;line-height:0;letter-spacing:normal;
}
.at-gate .hero-wagon-logo{
  width:auto;max-width:82%;height:auto;max-height:min(16svh,140px);object-fit:contain;margin:auto;
}
.at-gate .landing-deposits{
  margin:0;padding:8px 16px;max-width:100%;gap:4px 12px;box-sizing:border-box;
}
.at-gate .landing-deposits strong{font-size:clamp(20px,3vw,26px);}
.at-gate .landing-deposits #landing-value{font-size:16px;}
.at-gate .hero .frontier-tagline.game-subtitle{
  margin:0!important;font-size:clamp(17px,2.2vw,22px)!important;line-height:1.3!important;letter-spacing:0;text-indent:0;
}
.at-gate .entry-plaque{
  width:100%;max-width:440px;box-sizing:border-box;margin:0;padding:16px 20px;
  display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0;
}
.at-gate .hero .entry-plaque p{height:auto;margin:0;padding:0;max-width:100%;}
.at-gate .hero .entry-plaque .game-premise{font-size:17px;line-height:1.35;}
.at-gate .hero .entry-plaque .game-loop{font-size:12px;line-height:1.5;}
.at-gate .hero .entry-plaque .entry-caption{font-size:12px;line-height:1.45;}
.at-gate .hero .enter-button{
  width:100%;max-width:320px;min-width:0;min-height:48px;margin:0;
  padding:12px 16px;white-space:normal;line-height:1.3;box-sizing:border-box;
}
.at-gate .hero-bottom.gate-bottom{
  position:relative;inset:auto;margin:0 auto auto;width:100%;max-width:440px;
  display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:8px;
}
.at-gate .gate-bottom .hero-agent{min-width:0;min-height:44px;padding:8px;font-size:11px;white-space:normal;}
.at-gate #tnt-contract{max-width:100%;overflow-wrap:anywhere;}
@media(max-height:640px){
  .at-gate .hero{gap:10px;padding-top:12px;}
  .at-gate .hero-copy.title-screen{gap:8px;}
  .at-gate .entry-plaque{padding:12px 16px;gap:8px;}
  .at-gate .landing-deposits{padding:6px 12px;}
  .at-gate .hero-wagon-logo{max-height:14svh;}
}
@media(min-width:600px) and (max-height:560px){
  .at-gate .hero-copy.title-screen{max-width:900px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:24px;}
  .at-gate .landing-deposits{grid-column:1;justify-self:center;}
  .at-gate .hero h1.eureka-logo{grid-column:1;}
  .at-gate .hero-wagon-logo{max-height:24svh;}
  .at-gate .frontier-tagline{grid-column:1;}
  .at-gate .entry-plaque{grid-column:2;grid-row:1/4;justify-self:center;}
}
/* Journey feedback stays outside the map's decision hierarchy. */
#connection-banner{position:sticky;top:0;z-index:1000;padding:8px 16px;background:#3f3024;border-bottom:2px solid #d9bb70;color:#fff0ca;display:flex;align-items:center;justify-content:center;gap:12px;font:14px/1.4 system-ui}
#connection-banner[hidden]{display:none}
#connection-banner button{min-height:44px}
.map-overlays{position:absolute;top:52px;left:12px;right:12px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;z-index:2;pointer-events:none}
.map-price{position:static;max-width:100%;padding:5px 8px;background:#16231fee;color:#eedcb0;font:12px/1.35 system-ui;pointer-events:none;z-index:2}
#quick-blast-status{position:static;pointer-events:auto;max-width:100%;z-index:3;min-height:44px;padding:6px;font-size:12px}
#activity>details{margin-bottom:12px;border-bottom:1px solid #665e46;padding-bottom:12px}
#activity>details>summary{font:700 18px/1.4 Georgia;padding:12px 0;cursor:pointer}
#activity .diary-entry{padding:12px 0}
#activity .diary-entry h3{margin:0 0 6px}
#activity .diary-entry p{margin:6px 0;line-height:1.5}
#milestone-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0}
#milestone-list p{margin:0;padding:12px;background:#18241c;border:1px solid #716a48}
#journey-totals{font:14px/1.7 system-ui;color:#ddd3b1}
#agent-controls{padding:12px 0;border-block:1px solid #716a48}
#agent-control-summary{font:14px/1.5 system-ui}
#swap-availability{margin:12px 0}
#swap-availability>summary{min-height:44px;padding:12px 0;cursor:pointer}
@media(max-height:550px){.in-game #game[data-view=frontier] #frontier{position:relative;inset:auto;min-height:calc(100dvh - 100px);padding-bottom:72px;grid-template-rows:auto auto}.in-game #map{height:220px;min-height:220px}.map-price{font-size:11px}}
#journey-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#journey-totals>div{padding:12px;border:1px solid #716a48;background:#18241c}
#journey-totals p{margin:8px 0;font-size:14px}
@media(max-width:800px){#journey-totals{grid-template-columns:1fr}}

.in-game .journal .section-top{display:block}
.in-game .journal #activity{width:100%;max-width:760px}

/* Enlarged text and shallow windows use document flow instead of clipping. */
body.in-game.expanded-text:has(#game[data-view=frontier]){overflow:auto}
.in-game.expanded-text #game[data-view=frontier] #frontier{position:relative;inset:auto;display:block;padding:12px 8px 100px}
.in-game.expanded-text #game[data-view=frontier] .game-layout{display:block}


.in-game.expanded-text #game[data-view=frontier] .section-top{display:block}
.in-game.expanded-text .stats{display:grid;grid-template-columns:1fr}
.in-game.expanded-text .header-deposits{display:flex;flex-wrap:wrap;gap:8px}
.in-game.expanded-text .header-deposits>*{flex:1 1 100%;white-space:normal}
.in-game.expanded-text #plot-panel .action-tools{flex-wrap:wrap}
.in-game.expanded-text #plot-panel{grid-template-columns:1fr}
.in-game.expanded-text #plot-panel .field-trigger{grid-column:1;grid-row:auto}
@media(max-height:550px){body.in-game:has(#game[data-view=frontier]){overflow:auto}}

/* Responsive geometry: map controls and explanations occupy distinct rows. */
.in-game #game[data-view=frontier] .map-wrap{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(140px,1fr) auto;height:100%;overflow:visible}
.in-game #game[data-view=frontier] .map-bar{position:static;grid-area:1/1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;min-width:0;height:auto;padding:4px 6px}
.in-game #game[data-view=frontier] .map-bar .map-summary{display:flex;flex:1 1 240px;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.in-game .map-summary #district-label{font:10px/1.2 monospace;color:var(--frontier-muted)}
.in-game .map-summary .map-price{padding:0;background:none;font-size:12px;line-height:1.3}
.in-game #game[data-view=frontier] .map-bar #quick-blast-status{font:11px/1.2 system-ui;padding:6px 8px;min-height:36px;max-width:170px}
@media(pointer:coarse){.in-game #game[data-view=frontier] .map-bar #quick-blast-status{min-height:44px}}
@media(max-width:600px){.in-game #game[data-view=frontier] .map-bar .map-summary{flex-basis:calc(100% - 154px)}.in-game .map-summary #district-label{display:none}.in-game #game[data-view=frontier] .map-bar #quick-blast-status{order:3;max-width:none}}

.in-game #game[data-view=frontier] .map-wrap canvas{position:static;inset:auto;grid-area:3/1;height:100%;min-height:140px;min-width:0;max-width:100%}
.in-game #game[data-view=frontier] .map-context{position:static;grid-area:4/1;max-width:100%;width:auto;margin:0;padding:6px 8px;min-width:0}
@media(min-width:1000px){
 .in-game #game[data-view=frontier] .map-context{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 16px;padding:5px 8px}
 .in-game #game[data-view=frontier] .map-context #plot-status{margin:0;flex:1 1 240px}
 .in-game #game[data-view=frontier] .map-context #plot-coord{flex:0 1 auto}
}
.in-game #plot-panel .action-tools{display:flex;align-items:stretch;gap:6px;width:100%;max-width:none;min-width:0}
.in-game #plot-panel .action-tools>button{flex:1 1 0;width:auto;min-width:0;margin:0;min-height:44px;padding:6px;overflow-wrap:normal;word-break:normal}
.in-game #plot-panel .action-tools>#survey{flex-grow:1.45}
.in-game #plot-panel .field-trigger{align-self:stretch;min-width:44px;margin:0;min-height:48px}
.in-game #confirm-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px}
.in-game #confirm-panel>:not(button){grid-column:1/-1;min-width:0}
.in-game #confirm-panel button{width:100%;min-width:0;min-height:48px;margin:0;white-space:normal}
.in-game #plot-panel{min-width:0}
.in-game .stats strong{overflow-wrap:normal;word-break:normal;font-size:clamp(18px,4.7vw,30px)}
.in-game #game[data-view=frontier] .section-top{flex-wrap:wrap}
dialog{padding:20px;scroll-padding:16px;overscroll-behavior:contain}
dialog .close{position:static;display:block;margin:0 0 12px auto;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;line-height:1}
dialog .row{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}
dialog .row>button{flex:1 1 140px;min-width:0;min-height:44px;margin:0;white-space:normal}
dialog input,dialog select,dialog textarea{box-sizing:border-box;min-width:0;max-width:100%}
dialog h2{margin-top:0;font-size:clamp(24px,5vw,32px);line-height:1.2}
body.in-game.space-constrained:has(#game[data-view=frontier]){overflow:hidden}
.in-game.space-constrained #game[data-view=frontier]{position:fixed;top:var(--game-header-bottom,80px);bottom:calc(var(--mobile-nav-height,0px) + 8px);left:0;right:0;overflow:auto;scroll-padding:12px;padding:0;margin:0}
.in-game.space-constrained #game[data-view=frontier] #frontier{position:relative;inset:auto;display:grid;grid-template-rows:auto auto auto;padding:8px;margin:0;min-height:0}
.in-game.space-constrained #game[data-view=frontier] .game-layout{grid-template-rows:auto auto}
.in-game.space-constrained #game[data-view=frontier] .map-wrap{height:auto;grid-template-rows:auto auto 180px auto}
.in-game.space-constrained #game[data-view=frontier] .map-wrap canvas{height:180px}
header #toast,.in-game header #toast{position:static;transform:none;flex:1 0 100%;grid-column:1/-1;width:100%;max-width:100%;box-sizing:border-box;margin:4px 0;padding:8px 12px;text-align:left;border-radius:0}
body:has(dialog[open]) header #toast{display:none}

.in-game #game[data-view=frontier] .section-top{height:auto;min-height:22px;overflow:visible;align-items:center}
.in-game #game[data-view=frontier] .stats>div>span{height:auto;min-height:24px}
.in-game.expanded-text #game[data-view=frontier] .stats{display:grid;grid-template-columns:minmax(0,1fr)}
.in-game.expanded-text #game[data-view=frontier] .stats>div{min-width:0}
.in-game.expanded-text #game[data-view=frontier] .map-wrap{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto 180px auto;height:auto}

.in-game #game[data-view=frontier] .map-bar button{height:auto;min-height:44px;min-width:44px;line-height:1.2;padding:8px}

/* Plot facts have one reading order, with no nested disclosures. */
.plot-options h2{margin-right:0;margin-bottom:8px}
.plot-options #plot-detail-location{font-size:13px;line-height:1.5;letter-spacing:.02em;overflow-wrap:anywhere}
.plot-options #plot-detail-status{padding:12px;background:var(--ui-inset);border-left:2px solid var(--ui-edge);font-size:14px;line-height:1.5}
.plot-options h3,.map-guide h3{margin:20px 0 8px;font-size:18px}
.plot-options p,.map-guide p{font-size:14px;line-height:1.6}
.plot-options .blast-preference{display:flex;align-items:center;gap:10px;padding:12px 0;margin:12px 0;border-block:1px solid var(--ui-edge)}
.plot-options .blast-preference input{width:20px;height:20px;flex:0 0 20px;margin:0}
.plot-options>button:not(.close){display:block;width:100%;min-height:44px;margin:12px 0 0}
.map-guide section{margin-top:20px}
/* Shared tab material and readable progress charts. */
.vault-tabs button,.miner-periods button{min-height:48px;padding:10px 16px;border:2px solid;border-color:#ad9861 #222d23 #222d23 #ad9861;background:#354232;box-shadow:inset 1px 1px #64704b,inset -1px -1px #142017;border-radius:0;font:700 16px/1.3 Georgia,serif}
.vault-tabs button[aria-pressed=true],.miner-periods button[aria-pressed=true]{background:#4a4930;border-color:#e1c57b #766235 #766235 #e1c57b;box-shadow:inset 1px 1px #a38f56,inset -1px -1px #292c1d}
.progress-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.progress-charts figure{margin:0;min-width:0;padding:16px;background:#142119;border:1px solid #716a48;box-shadow:inset 2px 2px #0c1610}
.progress-charts figure:last-child{grid-column:1/-1}
.progress-charts h4{margin:0 0 12px;color:#efd59a;font:700 20px/1.3 Georgia,serif}
.progress-charts svg{display:block;width:100%;height:auto;overflow:visible}
.chart-grid{stroke:#485342;stroke-width:1}.chart-label{fill:#c9c9ab;font:13px system-ui}
.chart-legend{display:flex;flex-wrap:wrap;gap:12px;font:14px/1.4 system-ui;margin:8px 0 0}
.chart-empty{min-height:120px;display:flex;align-items:center;font:14px/1.6 system-ui;color:#bdc4b3}
.agent-steps .next-step{border-color:#e1c57b;background:#303b29}
@media(max-width:700px){.progress-charts{grid-template-columns:minmax(0,1fr)}.progress-charts figure{padding:12px}.chart-label{font-size:16px}}

.mining-performance > .cost-basis { display: grid; gap: 12px; margin-block: 16px 24px; }
.mining-performance > .cost-basis h4 { margin: 0; }
.mining-performance > .cost-basis input { width: min(100%, 320px); margin: 0; }
.mining-performance > .cost-basis small { display: block; font-size: 13px; line-height: 1.5; }

/* Responsive reading scale. Touch targets stay large; their text does not. */
:root {
  --type-body: .9375rem;
  --type-label: .875rem;
  --type-caption: .8125rem;
  --type-section: 2rem;
  --type-panel: 1.5rem;
  --type-subhead: 1.125rem;
}
@media (max-width: 800px) {
  :root { --type-body: .875rem; --type-label: .8125rem; --type-caption: .75rem; --type-section: 1.375rem; --type-panel: 1.125rem; --type-subhead: 1rem; }
}
.in-game :is(#camp,#journal,#leaderboard),body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) { font-size:var(--type-body); line-height:1.45; }
.in-game :is(#camp,#journal,#leaderboard) h2,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) h2 { font-size:var(--type-section); line-height:1.2; }
.in-game :is(#camp,#journal,#leaderboard) h3,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) h3 { font-size:var(--type-panel); line-height:1.25; }
.in-game :is(#camp,#journal,#leaderboard) h4,.progress-charts h4,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) h4 { font-size:var(--type-subhead); line-height:1.3; }
.in-game :is(#camp,#journal,#leaderboard) p,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) p,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) label,#activity .diary-entry p { font-size:var(--type-body); line-height:1.5; }
.in-game :is(#camp,#journal,#leaderboard) :is(button,summary),body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) button:not(.close) { font-size:var(--type-label); line-height:1.3; white-space:normal; min-height:44px; }
.vault-tabs button,.miner-periods button { font-size:var(--type-label); }
.chart-legend,.chart-empty { font-size:var(--type-caption); }
@media(max-width:800px) {
  body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) h2 { margin:8px 0 12px; padding-right:0; }
  body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) p { margin-block:10px; }
  body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) :is(input,select,textarea),.in-game :is(input,select,textarea) { font-size:16px; } /* Avoid focus zoom on iOS. */
  .in-game :is(#camp,#journal,#leaderboard) .fine,body dialog:is(dialog,#agent-dialog,#profile-dialog,#fairness-dialog,#money-dialog,#plot-options-dialog) .fine,.mining-performance > .cost-basis small { font-size:var(--type-caption); line-height:1.45; }
  .in-game .section-top h2 { font-size:var(--type-section); }
  .in-game #game[data-view=frontier] .stats strong,.in-game #game[data-view=frontier] .stats .gold-usd { font-size:1.25rem; line-height:1.2; }
  .in-game #plot-panel .action-tools>button,.in-game #plot-panel .field-trigger { font-size:var(--type-label); line-height:1.3; padding:6px 8px; }
  .in-game #plot-panel #action-result { font-size:var(--type-body); }
  #activity .diary-entry h3 { font-size:var(--type-panel); margin:6px 0; }
  .vault-tabs button,.miner-periods button { min-height:44px; padding:8px 12px; }
  .progress-charts h4 { font-size:var(--type-subhead); }
  .mining-performance > .cost-basis { gap:8px; margin-block:12px 16px; }
  .at-gate .hero .entry-plaque .game-premise { font-size:var(--type-body); }
  .at-gate .hero .enter-button { font-size:var(--type-label); min-height:44px; }
}

/* A discovery is one compact row; sharing never takes a second toolbar row. */
.in-game #plot-panel .discovery-result{display:flex;align-items:center;gap:8px;flex:1 0 100%;min-width:0;grid-column:1/-1}
.in-game #plot-panel .discovery-result:has(#action-result:empty){display:none}
.in-game #plot-panel .discovery-result #action-result{flex:1 1 0;min-width:0;margin:0;padding:4px 0;font-size:var(--type-body);line-height:1.4}
.in-game #plot-panel .discovery-result #action-result.motherlode{padding:8px;font-size:var(--type-panel)}
.in-game #plot-panel #share-discovery{display:grid;place-items:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:10px}
#share-discovery svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square}
#discovery-card-dialog .discovery-card-actions>a{display:flex;align-items:center;justify-content:center;flex:1;min-height:48px;padding:8px 12px;box-sizing:border-box;text-decoration:none;font-size:var(--type-label);line-height:1.3}
#discovery-card-dialog .discovery-card-actions>a{border:2px solid;border-color:var(--ui-light) var(--ui-dark) var(--ui-dark) var(--ui-light);background:var(--ui-panel);color:var(--rpg-gold);font-weight:700;box-shadow:inset 1px 1px #64704b,inset -1px -1px #142017}
#discovery-card-dialog .discovery-card-actions>a:focus-visible{outline:2px solid #f1cd78;outline-offset:3px}

/* Compact controls: content-sized actions, consistent spacing, no oversized tabs. */
:root{--control-height:36px;--control-pad:6px 12px;--control-gap:6px}
@media(pointer:coarse),(max-width:800px){:root{--control-height:40px;--control-pad:6px 10px}}
.in-game :is(#camp,#journal,#leaderboard) button,
body dialog:is(dialog,#agent-dialog,#profile-dialog,#money-dialog,#discovery-card-dialog) button:not(.close){min-height:var(--control-height);height:auto;padding:var(--control-pad);font-size:.8125rem;line-height:1.3;margin-block:4px}
.in-game .vault-tabs,.in-game .miner-periods{display:flex;flex-wrap:wrap;gap:var(--control-gap);margin:10px 0}
.in-game .vault-tabs button,.in-game .miner-periods button{width:auto;flex:0 1 auto;min-width:88px;min-height:var(--control-height);padding:var(--control-pad);margin:0}
.in-game .supply-presets{display:flex;flex-wrap:wrap;gap:var(--control-gap);margin:8px 0}
.in-game .supply-presets button{width:auto;flex:1 1 110px;margin:0;font-size:.75rem}
body dialog .row{gap:var(--control-gap)}
body dialog .row>button{flex:1 1 110px}
.in-game #plot-panel .action-tools{gap:var(--control-gap)}
.in-game #plot-panel .action-tools>button,.in-game #plot-panel .field-trigger,.in-game #confirm-panel button{min-height:var(--control-height);height:auto;padding:6px 8px;font-size:.8125rem}
.in-game #plot-panel .action-tools>button::before{width:24px;height:24px;flex-basis:24px}
.in-game #confirm-panel{gap:8px;padding:10px}
.in-game #plot-panel .field-trigger{min-width:60px}
.in-game .mobile-game-nav{gap:4px;padding-top:4px;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))}
.in-game .mobile-game-nav button{min-height:44px;height:44px;padding:4px}
#discovery-card-dialog .discovery-card-actions{gap:6px}
#discovery-card-dialog .discovery-card-actions :is(button,a){min-height:40px;height:auto;padding:6px 10px;flex:1 1 100px;margin:0}
@media(max-width:800px){
 .in-game :is(#camp,#journal,#leaderboard) button,body dialog:is(dialog,#agent-dialog,#profile-dialog,#money-dialog) button:not(.close){font-size:.75rem}
 .in-game #plot-panel{padding:6px;gap:6px}
 .in-game .vault-tabs button{min-width:80px}
}

/* Brass frames carry the theme; operational text uses a clean, compact face. */
:root{--font-interface:Arial,Helvetica,sans-serif}
.in-game button,body dialog button,.in-game .vault-tabs button,.in-game .miner-periods button,
.in-game #plot-panel .action-tools>button,.in-game #plot-panel .field-trigger,
#discovery-card-dialog .discovery-card-actions>a,.at-gate .hero .enter-button{
 font-family:var(--font-interface);font-weight:600;letter-spacing:0;
}
.in-game :is(#camp,#journal,#leaderboard) :is(p,label,summary,small),
body dialog :is(p,label,summary,small,li){font-family:var(--font-interface);font-weight:400;letter-spacing:0}
.in-game #plot-panel .discovery-result #action-result{font-family:var(--font-interface);font-weight:600}
.in-game .vault-tabs button,.in-game .miner-periods button{font-weight:600}
#profile-form .username-input{display:flex;align-items:center;gap:8px;margin-top:8px;background:var(--rpg-inset);border:1px solid var(--ui-edge);padding-left:12px;font:16px var(--font-interface)}
#profile-form .username-input input{flex:1;min-width:0;width:100%;margin:0;border:0;box-shadow:none;background:transparent}
.market-summary,.mining-performance .performance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.market-summary>div{display:grid;gap:6px;padding:12px;background:var(--ui-inset);border:1px solid var(--ui-edge);min-width:0}
.market-summary span,.market-summary small{font:12px/1.4 var(--font-interface);color:var(--rpg-muted)}
.market-summary strong{font:600 18px/1.3 var(--font-interface);overflow-wrap:anywhere}
.market-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:16px;align-items:start}
.market-chart-panel,#swap-availability{min-width:0;padding:12px;background:var(--ui-inset);border:1px solid var(--ui-edge)}
#tnt-market-chart{height:360px;display:grid;place-items:center;color:var(--rpg-muted);font:14px/1.5 var(--font-interface)}
#tnt-market-chart>p{max-width:28ch;text-align:center}
#tnt-market-chart[data-symbol]{display:block}
#tnt-market-chart .tradingview-widget-container__widget{height:100%}
.progress-charts{display:block}.progress-charts svg{max-height:300px}
.chart-controls{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0}
.chart-controls button{min-width:40px;padding:6px 10px!important;margin:0!important}
.chart-controls button[aria-pressed=true]{background:#514c32;color:#ffe2a1;border-color:#c8ad6c}
.cost-basis>summary{cursor:pointer;min-height:40px;align-content:center}
.mining-performance .cost-basis[open]{display:grid;gap:8px}
@media(max-width:800px){.market-workspace{grid-template-columns:minmax(0,1fr)}#tnt-market-chart{height:240px}.market-summary,.mining-performance .performance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.market-summary>div:last-child,.mining-performance .performance-grid>div:last-child{grid-column:1/-1}.market-summary strong{font-size:16px}.market-workspace{gap:8px}}
#tnt-market-chart:not([data-symbol]){height:auto;min-height:88px;padding:12px}
.progress-charts svg circle:focus{outline:none;stroke:#fff0bd;stroke-width:2;fill:#776039}

header #game-sound-toggle{flex:0 0 40px;min-width:40px;width:40px;height:40px;padding:8px;margin-left:auto;}

/* Desktop mining desk: terrain is primary, resources and decisions share the right rail. */
@media(min-width:1000px) and (min-height:600px){
 body.in-game:not(.expanded-text) #game[data-view=frontier] #frontier{
  position:fixed;inset:var(--game-header-bottom,88px) 12px 12px;min-height:0;padding:8px;
  display:grid;grid-template-columns:minmax(0,1fr) 250px;grid-template-rows:auto auto minmax(0,1fr);gap:8px;
 }
 body.in-game:not(.expanded-text) #game[data-view=frontier] .section-top{grid-area:1/1/2/3;margin:0;padding:0;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .game-layout{display:contents;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .map-wrap{grid-area:2/1/4/2;height:100%;min-height:0;margin:0;grid-template-rows:auto auto minmax(0,1fr) auto;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .map-wrap canvas{min-height:0;height:100%;width:100%;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .stats{grid-area:2/2;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:8px;margin:0;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .stats>div{min-width:0;padding:10px 12px;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .stats strong{font-size:24px;line-height:1.2;margin-top:6px;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .stats .gold-usd{font-size:24px;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] .stats>div>span{font-size:13px;min-height:20px;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] #plot-panel{grid-area:3/2;align-self:start;display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:6px;margin:0;max-height:100%;overflow:auto;}
 body.in-game:not(.expanded-text) #plot-panel .action-tools{display:flex;max-width:none;}
 body.in-game:not(.expanded-text) #plot-panel .field-trigger{width:auto;}
 body.in-game:not(.expanded-text) #confirm-panel{gap:8px;}
 body.in-game:not(.expanded-text) #confirm-panel p{font-size:13px;}
}

/* Inline progress occupies the action rail, never obscures the selected terrain. */
#action-feedback{grid-column:1/-1;flex:1 0 100%;display:flex;align-items:center;gap:8px;padding:6px 8px;background:#17241c;border:1px solid #86794e;font:13px/1.35 system-ui,sans-serif;}
#action-feedback[hidden]{display:none}
#action-feedback .game-icon{position:relative;flex:0 0 32px;width:32px;height:32px}
#action-feedback:not([data-kind=blast]) .game-icon{display:none}
#action-feedback.fuse-running .game-icon::after{content:"";position:absolute;right:0;top:0;width:4px;height:4px;background:#fff2bf;box-shadow:4px 0 #e79539,0 -4px #efc65c,-4px 4px #f7d578;animation:fuse-burn .8s steps(6,end) both;}
@keyframes fuse-burn{from{transform:translate(4px,-6px);opacity:1}to{transform:translate(-8px,9px);opacity:0}}
@media(prefers-reduced-motion:reduce){#action-feedback.fuse-running .game-icon::after{animation:none;display:none}}

@media(min-width:1000px) and (min-height:600px){
 body.in-game:not(.expanded-text) #game[data-view=frontier] #plot-panel .discovery-result{flex:0 0 auto;width:100%;}
 body.in-game:not(.expanded-text) #game[data-view=frontier] #action-feedback{flex:0 0 auto;}
}

/* One compact action group; no empty column between decisions and details. */
.in-game #plot-panel .action-tools{flex:1 1 100%}
.in-game #plot-panel .action-tools>button[hidden]{display:none!important}
.in-game #plot-panel .action-tools>button{font-size:12px;line-height:1.25;gap:4px}
.in-game #plot-panel .action-tools>button::before{width:24px;height:24px;flex-basis:24px}
.in-game #plot-panel .action-tools>.field-trigger{flex:0.8 1 0;align-self:stretch;min-width:0;min-height:44px;font-size:12px}
@media(min-width:1000px) and (min-height:600px){
 body.in-game:not(.expanded-text) #plot-panel .action-tools{flex:0 0 auto}
 body.in-game:not(.expanded-text) #plot-panel .action-tools>button{flex-direction:column}
 body.in-game:not(.expanded-text) #plot-panel .action-tools>.field-trigger{flex-direction:row}
}

/* Invitation precedes the original landing content; its layout stays intact. */
.at-gate:not(.journey-started) .entry-plaque,
.at-gate:not(.journey-started) #fairness-open,
.at-gate:not(.journey-started) #agent-copy{display:none}
.intro-invitation{background:#dbc18a;color:#29281d;border:3px solid;border-color:#f3dda8 #77603a #77603a #f3dda8;box-shadow:inset 0 0 0 2px #a88b53,0 4px 0 #30291b;padding:14px 28px;min-height:52px;width:auto;justify-self:center;font-size:18px}
.journey-started .intro-invitation{display:none}
.at-gate:not(.journey-started) .hero-bottom.gate-bottom{display:flex;justify-content:center}

/* Readable NPC-style survey note, anchored inside the map rather than a separate menu. */
.map-wrap{position:relative}
#survey-bubble{position:absolute;z-index:8;box-sizing:border-box;width:280px;padding:12px 38px 12px 12px;background:#e1cf9e;color:#282a20;border:2px solid #665838;box-shadow:inset 0 0 0 2px #f4e6ba,3px 3px 0 #111b18;font:13px/1.4 var(--font-interface);overflow-wrap:break-word}
#survey-bubble[hidden]{display:none}
#survey-bubble::after{content:"";position:absolute;left:var(--survey-tail,50%);bottom:-8px;width:12px;height:12px;background:#e1cf9e;border-right:2px solid #665838;border-bottom:2px solid #665838;transform:rotate(45deg)}
#survey-bubble p{font:inherit;color:inherit;margin:6px 0}
#survey-bubble strong{font-size:14px}
#survey-bubble small{display:block;font-size:11px;line-height:1.35;color:#4d503d}
#survey-bubble>button{position:absolute;right:0;top:0;width:36px;height:36px;min-width:36px;min-height:36px;margin:0;padding:0;background:none;border:0;box-shadow:none;color:#343528;font:22px/1 sans-serif}
@media(pointer:coarse){#survey-bubble>button{width:44px;height:44px}}

/* The real landscape is visible while the first animated canvas frame prepares. */
#scenery-poster,#scenery{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 56%;image-rendering:pixelated}
#scenery{opacity:0}
#scenery[data-ready=true]{opacity:1}

/* Supply station: artwork and working transfers share one compact counter. */
.in-game .camp-grid.supply-station{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:0;align-items:start;border:1px solid var(--ui-edge);background:var(--ui-panel)}
.supply-station-art{position:relative;margin:0;min-width:0;overflow:hidden}
.supply-station-art img{display:block;width:100%;height:auto;image-rendering:pixelated}
.supply-station-art figcaption{position:absolute;inset:auto 0 0;padding:32px 16px 12px;background:linear-gradient(transparent,#101b16f5);color:#f3d695}
.supply-station-art h3{margin:4px 0 0;font-size:22px}
.in-game .supply-station>article{padding:16px;border:0;background:none}
.in-game .supply-station-controls h3{margin:0 0 8px;font-size:22px}
.in-game .supply-station #wagon-transfers{margin-top:0}
.in-game .supply-station #wagon-transfers>p{margin:8px 0 12px;font-size:13px;line-height:1.45}
.in-game .supply-station #supply-feedback:empty{display:none}
.in-game .supply-station .plot-info{margin:8px 0;padding:8px 0}
.in-game .supply-station .row{display:flex;flex-wrap:wrap;gap:8px}
.in-game .supply-station .row button{flex:1 1 140px;margin:0;font-size:13px}
.in-game .supply-station>article:last-child{grid-column:1/-1;border-top:1px solid var(--ui-edge);padding:12px 16px}
@media(max-width:760px){.in-game .camp-grid.supply-station{grid-template-columns:minmax(0,1fr)}.supply-station-art img{max-height:280px;object-fit:cover;object-position:center 40%}.in-game .supply-station>article{padding:12px}}

.in-game .supply-station .gold-exchange{margin:12px 0 0;padding:8px 0 0;border-bottom:0;border-top:1px solid var(--ui-edge)}
.in-game .supply-station .gold-exchange p{margin:8px 0;font-size:13px;line-height:1.45}
.in-game .supply-station .gold-exchange input{max-width:none;width:100%}
.in-game .supply-station .gold-exchange summary{font-size:14px}
