#lithium-scene {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(13px, 1.2vw, 19px);
}
#game #lithium-scene .mine-header {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 16px);
  padding: 6px 12px 6px 6px;
  background: linear-gradient(105deg,#294939,#142c21);
  border: 1px solid #bb9657;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px #dbb97540,0 3px 12px #14231e88;
}
#game #lithium-scene .mine-heading { min-width: 0; }
#game #lithium-scene .mine-heading h1 {
  font: 700 clamp(17px,2vw,27px)/1.1 Georgia,serif;
  color: #fff1cc;
}
#game #lithium-scene .mine-heading small { color: #d5c18e; }
#game #lithium-scene .mine-header [data-mine=back] {
  flex: none;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 5px;
}
#game #lithium-scene .mine-footer {
  padding: 7px max(8px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  background: linear-gradient(#294538,#162b22);
  border-top: 2px solid #bb9657;
}
#game #lithium-scene :is(.mine-actions,.mine-readouts) { width: min(100%,960px); }
#game #lithium-scene .mine-readouts {
  border: 0;
  padding: 0;
  gap: 6px;
  background: none;
}
#game #lithium-scene .mine-readout {
  padding: 6px 9px;
  border: 1px solid #a48552;
  background: #142e23;
  box-shadow: inset 0 0 0 2px #c8a9662b;
}
#game #lithium-scene .mine-readout b { color: #e5cd96; }
#game #lithium-scene .mine-readout strong { color: #fff1d1; font-variant-numeric: tabular-nums; }
#game #lithium-scene .mine-cycle-track { background: #0c2118; }
#game #lithium-scene .mine-cycle-track i { background: linear-gradient(90deg,#a7874b,#f0cf7d); }
#game #lithium-scene .mine-actions button {
  background: #173426 url('./assets/menu-pine-brass-v1.png') center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  font: 700 clamp(13px,1.15vw,17px)/1.1 Georgia,serif;
}
#game #lithium-scene .mine-actions .mine-primary {
  color: #31210d;
  background: #dab168 url('./assets/menu-gold-brass-v1.png') center / 100% 100% no-repeat;
}
#game #lithium-scene .mine-actions button[aria-expanded=true] { filter: brightness(1.25); }
#game #lithium-scene .mine-actions button::before,
#game #lithium-scene .mine-actions button::after { display: none; }
#game #lithium-scene .mine-upgrades-head { background: #f5e8c9; padding-block: 6px; }
#game #lithium-scene .mine-upgrades-head h2 {
  flex: 1;
  font: 700 1.03em/1.15 Georgia,serif;
  background: #143328 url('./assets/window-title-deco.jpg') center / 100% 100% no-repeat;
  color: #fff0c8;
}
#game #lithium-scene .mine-station {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  background: #fff5de;
}
#game #lithium-scene .mine-lift-stage { grid-template-columns: auto minmax(0,1fr) auto; }
#game #lithium-scene .mine-station h3 { font-family: Georgia,serif; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  #game #lithium-scene .mine-header { left: 5px; top: 5px; gap: 5px; padding: 4px; }
  #game #lithium-scene .mine-boost { position: fixed; right: 8px; bottom: 117px; }
  #game #lithium-scene .mine-readout { padding: 4px; }
  #game #lithium-scene .mine-readouts { gap: 3px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #game #lithium-scene .mine-footer { padding-block: 3px; gap: 4px; }
  #game #lithium-scene .mine-readout { padding-block: 2px; }
}
/* The mine controls float over the scene. */
#game #lithium-scene { grid-template-rows: minmax(0,1fr); }
#game #lithium-scene .mine-footer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
#game #lithium-scene .mine-readouts {
  position: absolute;
  top: clamp(66px,11vh,122px);
  left: max(8px,env(safe-area-inset-left));
  width: max-content;
  max-width: 35%;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 5px;
  background: none;
  padding: 0;
  border: 0;
}
#game #lithium-scene .mine-readout { padding: 4px 8px; }
#game #lithium-scene .mine-readout .mine-icon { width: 25px; height: 25px; }
#game #lithium-scene .mine-actions {
  position: absolute;
  inset: 0;
  width: auto;
  display: block;
  pointer-events: none;
}
#game #lithium-scene .mine-actions button {
  position: absolute;
  pointer-events: auto;
  min-height: 44px;
  font-size: clamp(11px,1.15vw,17px);
}
#game #lithium-scene .mine-actions .mine-primary {
  left: 50%;
  bottom: max(8px,env(safe-area-inset-bottom));
  transform: translateX(-50%);
  min-width: clamp(138px,21vw,245px);
  justify-content: center;
  padding-inline: 18px;
}
#game #lithium-scene .mine-actions button:not(.mine-primary) {
  right: max(8px,env(safe-area-inset-right));
  min-width: 88px;
  justify-content: flex-start;
  flex-direction: row;
}
#game #lithium-scene [data-mine=upgrades] { bottom: calc(max(8px,env(safe-area-inset-bottom)) + 50px); }
#game #lithium-scene [data-mine=help] { bottom: max(8px,env(safe-area-inset-bottom)); }
#game #lithium-scene .mine-payout { bottom: 64px; right: auto; left: 50%; transform: translateX(-50%); }
#game #lithium-scene .mine-inspect { z-index: 5; }
#game #lithium-scene:has(.mine-inspect:not([hidden])) .mine-footer { visibility: hidden; }
body.handset-landscape #game #lithium-scene .mine-readouts { top: 47px; max-width: 31%; gap: 3px; }
body.handset-landscape #game #lithium-scene .mine-readout { font-size: 11px; }
body.handset-landscape #game #lithium-scene .mine-readout .mine-icon { width: 18px; height: 18px; }

#game #lithium-scene .mine-visual canvas { object-fit: contain; }
#game #lithium-scene .mine-readout b { line-height: 1.1; }

