/* Shelter Signal skin over the battle, settings and journey layout. */
:root {
  --bg: #23261e;
  --text: #f8f3de;
  --muted: #e0dfca;
  --em: #c6dd8b;
  --gold: #ffd379;
  --mana: #a9df82;
  --shadow: 0 1px 1px #16171195;
  --radio-ink: #20271e;
  --radio-lip: #222b21;
  --radio-line: #a4ad7f;
  --radio-dark: #344230;
  --radio-rugged: #4d5b40;
  --radio-panel: linear-gradient(#536044 0 7%, #414e37 8% 87%, #394430 88%);
  --radio-grain: linear-gradient(transparent, transparent);
  --radio-screen: #d9e4ab;
  --radio-rim: inset 0 0 0 1px #c6c89972, inset 0 -3px 0 #10150d54, 0 2px 2px #1a1b1680;
}
html[data-boot] body,
#boot {
  background: radial-gradient(ellipse at 50% 44%, #444e33, #24271e 72%);
}
#bootLogo {
  width: min(78vw, 335px);
}
.radio-logo {
  position: relative;
  z-index: 1;
  display: block;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px #1723195c);
}
.radio-logo.logo {
  width: min(82%, calc(var(--u) * 338), 440px);
}
.radio-tuning {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  height: 28px;
}
.radio-tuning i {
  width: 5px;
  height: 25%;
  background: #a6b576;
  border-radius: 2px 2px 0 0;
  opacity: 0.7;
}
.radio-tuning i:nth-child(2) {
  height: 45%;
}
.radio-tuning i:nth-child(3) {
  height: 65%;
}
.radio-tuning i:nth-child(4) {
  height: 84%;
}
.radio-tuning i:nth-child(5) {
  height: 100%;
}
.radio-tuning i {
  scale: 1 calc(0.5 + var(--p, 0) * 0.5);
  transform-origin: bottom;
  transition: scale 160ms ease-out;
}

.plate,
.art-pill,
.btn,
.panel,
.panel .band,
.lvl,
.hcard,
.urow,
.htile {
  border-image: none;
  border-color: transparent;
}
.plate,
.art-pill,
.panel,
.panel .band,
.lvl,
.hcard,
.urow,
.htile {
  background: var(--radio-grain), var(--radio-panel);
  border-radius: calc(var(--u) * 9);
  background-origin: border-box;
  background-clip: border-box;
  box-shadow:
    0 2px 1px #20251a93,
    0 0 0 1px #2a3022;
  outline: 1px solid #bbc18b65;
  outline-offset: -3px;
}
.plate {
  --radio-panel: linear-gradient(#4c5940 0 8%, #404d36 9% 89%, #35402d 90%);
}
.art-pill {
  --radio-panel: linear-gradient(#535d42 0 8%, #455136 9% 89%, #38442e 90%);
}
.btn:is(.go, .slate, .green, .warn, .info, .off),
.btn.sq:is(.slate, .green) {
  border-image: none;
  border-color: transparent;
  border-radius: calc(var(--u) * 8);
  --dy: 0px;
  background: var(--radio-grain), var(--radio-button, linear-gradient(#667451 0 9%, #526140 10% 88%, #435236 89%));
  background-origin: border-box;
  background-clip: border-box;
  box-shadow:
    0 3px 0 #252b20,
    0 0 0 1px #292f22;
  outline: 1px solid #bbc18b68;
  outline-offset: -3px;
  color: var(--text);
}
.btn.go {
  --radio-button: linear-gradient(#ffe090 0 9%, #f6c65e 10% 87%, #e9ae4b 88%);
  color: #262116 !important;
  box-shadow:
    0 4px 0 #79502a,
    0 0 0 1px #61401b;
  outline-color: #ffd678;
}
.btn.go b {
  text-shadow: none;
}
.btn.retry-no-help {
  --radio-button: linear-gradient(#58664a, #46533c 86%, #394631 87%);
}
.btn.green {
  --radio-button: linear-gradient(#758e52 0 9%, #617847 10% 88%, #51673d 89%);
}
.btn.warn {
  --radio-button: linear-gradient(#815434, #603b29);
}
.btn:is(.off, [disabled]) {
  --radio-button: linear-gradient(#585b4d, #484b43);
  color: #e1e2d2 !important;
}
.btn:is(.off, [disabled]):disabled {
  border-image: none;
}
.btn.go[disabled] b {
  text-shadow: none;
}
button.btn:focus-visible,
.cards-nav:focus-visible,
.card:focus-visible {
  outline: 2px solid #fff0a2;
  outline-offset: 3px;
}
#start .tap {
  color: #fff3c6;
}
#corner .glyph-body {
  fill: #eeeed9;
  stroke: #272e21;
}
#corner .sound-waves {
  stroke: #d1e49e;
}
#corner .sound-mute {
  stroke: #ffd29a;
}

/* Power and structural integrity share the same monitor. */
#hud .supplies {
  grid-area: base;
  display: flex;
  min-width: 0;
  align-items: center;
  border-radius: calc(var(--u) * 8);
  background: var(--radio-grain), var(--radio-panel);
  box-shadow: var(--radio-rim);
}
#hud .supplies #energy {
  grid-area: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 4px;
  align-content: center;
  width: calc(var(--u) * 53);
  height: 100%;
  padding: 4px calc(var(--u) * 6) 5px calc(var(--u) * 8);
  border-inline-end: 1px solid #a6ac7360;
  font-variant-numeric: tabular-nums;
}
#hud #energy > .ic {
  width: clamp(10px, calc(var(--u) * 13), 20px);
  height: clamp(10px, calc(var(--u) * 13), 20px);
}
#hud #energy > b {
  min-width: 0;
  font-size: clamp(13px, calc(var(--u) * 14), 23px);
}
#hud #energy .bar {
  grid-column: 1 / -1;
  width: 100%;
  height: max(4px, calc(var(--u) * 5));
  margin-top: 3px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}
#hud #energy .ticks {
  opacity: 0.6;
}
#hud #baseBox {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  background: none;
  border-width: 0 calc(var(--u) * 7);
  box-shadow: none;
  outline: none;
}
#hud #baseBox > span {
  padding: 0;
  gap: calc(var(--u) * 4);
}
#hud #baseBox > span > .ic {
  width: min(calc(var(--u) * 17), 26px);
  height: min(calc(var(--u) * 17), 26px);
}
#hud #baseBox .bar {
  height: max(15px, calc(var(--u) * 15));
  border: 1px solid #242d1e;
  border-radius: 5px;
  overflow: hidden;
}
#hud #baseNum {
  z-index: 2;
}
#hud #baseBox .lag {
  z-index: 1;
  opacity: 0.63;
}
#hud #baseBox .fill,
#hud #energy .fill {
  inset: 0;
  border: 0;
  border-radius: 3px;
  border-image: none;
  background: linear-gradient(#b8dd82, #82af51);
}
#hud #energy .fill {
  background: linear-gradient(#dde79f, #a6c65c);
}
#hud .bar {
  border-image: none;
  background: #262d20;
}
#hud .hbtns {
  gap: clamp(5px, calc(var(--u) * 5), 10px);
}
#hud .coins-pill {
  font-variant-numeric: tabular-nums;
}

/* Separate speaker and LCD within the incoming-wave panel. */
#hud #waveBox {
  position: relative;
  border-width: 4px 5px 5px;
  border-radius: calc(var(--u) * 8);
  color: var(--radio-ink);
  background: var(--radio-grain), linear-gradient(#656d4a, #3d4531);
  box-shadow:
    inset 0 0 0 1px #adb482,
    inset 0 0 0 3px #303529,
    0 2px 2px #20261779;
  gap: 4px;
}
#hud #waveBox > span {
  border-radius: 4px;
  padding-top: 0;
  padding-inline: 5px;
  background: linear-gradient(#e2ecb9, #c7d899);
  box-shadow:
    0 0 0 1px #27341c,
    inset 0 1px 2px #64764680;
}
#hud #waveBox b,
#hud #waveBox small,
#hud #waveBox i {
  text-shadow: none;
}
#hud #waveSub {
  color: #344229;
}
#hud #waveIn {
  color: #344229;
}
.radio-speaker {
  display: none;
  align-self: center;
  flex: 0 0 calc(var(--u) * 12);
  width: calc(var(--u) * 12);
  height: 50%;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, #252b20 0 2px, transparent 2px 4px);
}
@media (min-height: 501px) and (min-aspect-ratio: 4/3) {
  #hud {
    grid-template-columns: auto minmax(120px, calc(var(--u) * 156)) minmax(148px, min(28vw, 334px)) auto;
    grid-template-areas: 'btns wave base coins' 'shops shops shops shops' 'strip strip strip strip';
    padding-inline: calc(var(--side) + var(--u) * 9);
    justify-content: center;
  }
  #hud .hbtns {
    justify-content: center;
  }
  #hud .supplies #energy {
    width: calc(var(--u) * 62);
  }
  .radio-speaker {
    display: block;
  }
  .radio-logo.logo {
    margin-top: clamp(18px, calc(var(--u) * 21), 34px);
  }
}
@media (max-width: 420px) and (max-aspect-ratio: 4/3) {
  #hud .supplies #energy {
    width: calc(var(--u) * 50);
  }
  #hud #baseBox .cst {
    gap: 1px;
  }
  #hud #waveBox {
    border-inline-width: 4px;
  }
  #hud #waveBox > span {
    padding-inline: 2px;
  }
}
@media (max-height: 500px) and (min-aspect-ratio: 4/3) {
  #hud .supplies #energy {
    width: 41px;
  }
  #hud #baseBox > span > .ic {
    display: none;
  }
  .radio-logo.logo {
    margin-top: 12px;
    max-height: 24vh;
  }
}

/* Every price and the inventory counter refer to the same battery cell. */
img[src$='/ic-mana.webp'] {
  content: url(../assets/ui/radio-charge.png);
}

/* Equipment slots and the separate signal-flare control. */
:root {
  --card-window: #e1dbb9;
  --card-window-edge: #853e0d36;
  --card-ink: #2d3427;
}
#hand {
  max-width: calc(var(--u) * 660);
  background: none;
  box-shadow: none;
  outline: none;
}
#hand .row {
  gap: max(5px, calc(var(--u) * 8));
}
#hand .card-stack {
  padding: calc(var(--u) * 5);
  border-radius: calc(var(--u) * 9);
  border: 1px solid #282d21;
  background: repeating-linear-gradient(45deg, #f5f5bd0b 0 1px, transparent 1px 3px), linear-gradient(#6a704a, #4f573a);
  box-shadow:
    inset 0 0 0 1px #c0bc847a,
    inset 0 -3px 0 #252a1c65,
    0 3px 0 #272c21;
}
#hand .card-stack.has-scroll {
  gap: 3px;
}
.card > .fr.n,
.card > .fr.s,
#pulseBtn > .fr.n {
  border-image: none;
  border: 1px solid #28291b;
  border-radius: calc(var(--u) * 6);
  box-shadow:
    inset 0 0 0 1px #efe5bc64,
    inset 0 -2px 0 #221f164d;
}
.card > .fr.n {
  background: linear-gradient(#4a5938 0 20%, #b8ae83 20% 82%, #4a5137 82%);
}
.card > .fr.s {
  background: linear-gradient(#637c43 0 20%, #d0c69b 20% 82%, #566c3c 82%);
  outline: 2px solid #d8ed9e;
  outline-offset: -2px;
}
.card .nm,
#pulseBtn .nm {
  text-shadow: 0 1px 1px #242518;
  color: #fcf5de;
}
.card .win {
  box-shadow: inset 0 0 0 1px #655b3596;
}
.card.off .win {
  background: #aaa383;
}
.card.off .cost b {
  color: #dcd5b9;
}
.card .need {
  background: #383b28;
  color: #fff1ba;
}
.card .card-key {
  color: #f5eccd;
  background: #485237;
}
#pulseBtn {
  background: var(--radio-grain), linear-gradient(#4e5740, #303829);
  box-shadow: var(--radio-rim);
  border: 1px solid #2a2d1d;
  border-radius: calc(var(--u) * 9);
}
#pulseBtn > .fr.n {
  display: none;
}
#between #nextBtn .next-bonus {
  background: #4e6240;
  color: #f6ffe3;
}
#between #nextBtn .next-time {
  background: #664719;
  color: #ffefce;
}
#between {
  max-width: calc(100vw - 16px);
}
#between .btn {
  box-sizing: border-box;
  border-inline-width: 0;
  min-width: 0;
  padding-inline: clamp(7px, 0.8vw, 13px);
}
#between .btn > span {
  gap: clamp(4px, 0.55vw, 8px);
}
#between #nextBtn > span > b {
  min-width: 0;
}
#between #nextBtn .next-bonus,
#between #nextBtn .next-time {
  flex: none;
  font-variant-numeric: tabular-nums;
}
#between #nextBtn .next-time {
  min-width: 3ch;
  justify-content: center;
}
@media (min-aspect-ratio: 4/3) and (min-height: 501px) {
  #between:not(.up) {
    width: clamp(170px, calc(var(--u) * 160), 300px);
  }
}
@media (max-aspect-ratio: 4/3) {
  #between #nextBtn {
    min-width: 0;
    font-size: clamp(12px, calc(var(--u) * 16), 21px);
  }
}
@media (max-width: 355px) and (max-aspect-ratio: 4/3) {
  #between #repairBtn > span > b {
    display: none;
  }
}
.cards-nav {
  border-color: #ddc99a;
  background: linear-gradient(#efe0ad, #c7af74);
}
#recallTip {
  color: #f3f3d8;
}
@media (min-aspect-ratio: 4/3) and (min-height: 501px) {
  #hand {
    max-width: min(100%, calc(var(--u) * 630));
    border-block-width: 2px;
  }
  #hand .card-stack.has-scroll {
    flex: 0 1 calc(var(--u) * 428);
  }
}
@media (max-aspect-ratio: 4/3) and (max-width: 490px) {
  #hand .card-stack {
    padding: 3px;
  }
  #hand .row {
    gap: 5px;
  }
}
@media (min-aspect-ratio: 4/3) and (max-height: 500px) {
  .card > .fr.n {
    background: linear-gradient(to right, #b8ae83 0 37%, #475137 37%);
  }
  .card > .fr.s {
    background: linear-gradient(to right, #d0c69b 0 37%, #597343 37%);
  }
  #hand .card-stack {
    padding: 3px;
  }
  #hand {
    max-width: min(calc(100% - 16px), max(260px, calc(100vw - 268px)), 640px);
  }
  #hand #cards .card {
    width: 96px;
    max-width: none;
    flex: 0 0 96px;
  }
  #hand #cards .card .win {
    width: 32px;
  }
  #hand #cards .card .nm {
    left: 39px;
    font-size: 11px;
  }
}

/* The same field-kit material follows the player through campaign and result screens. */
.modal {
  background: #182017ad;
}
.panel {
  border-radius: calc(var(--u) * 17);
  background: var(--radio-grain), linear-gradient(#4a5840, #3d4935 38%);
  outline: 2px solid #919a70;
  outline-offset: -5px;
  box-shadow:
    0 0 0 2px #262d21,
    0 9px 22px #10191063;
}
.panel .band {
  background: linear-gradient(#5d6d4d, #4d5c40);
  border: 2px solid #2b3527;
  padding-inline: clamp(8px, calc(var(--u) * 8), 16px);
  outline: none;
  box-shadow: 0 3px 0 #232c21;
}
.panel .band h2 {
  translate: none;
  padding-top: 0;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}
.panel[data-id='upgrades'] .band {
  background:
    linear-gradient(120deg, #4f372984, #38281ecd),
    #674a37 url(../assets/ui/shelter-title-wood.webp) center / cover;
  border-color: #38271e;
  box-shadow: 0 3px 0 #2b211a;
  width: min(78%, calc(var(--u) * 225));
  height: clamp(42px, calc(var(--u) * 44), 78px);
  top: calc(var(--u) * -25);
}
.panel > .x {
  background: linear-gradient(#66704b, #404831);
  border: 1px solid #232819;
  border-radius: 9px;
  box-shadow: var(--radio-rim);
}
.panel > .x::before,
.panel > .x::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 3px;
  border-radius: 3px;
  background: #f9f3d5;
  translate: -50% -50%;
  rotate: 45deg;
}
.panel > .x::after {
  rotate: -45deg;
}
.panel[data-id='victory'] .band {
  background: linear-gradient(#667643, #445631);
}
.panel[data-id='defeat'] .band {
  background: linear-gradient(#835737, #5a402c);
}
.hcard,
.urow,
.htile,
.lvl {
  --radio-panel: linear-gradient(#49543c, #364132);
}
.panel[data-id='upgrades'] .body {
  gap: clamp(8px, calc(var(--u) * 6), 14px);
}
.panel[data-id='upgrades'] .shop-note {
  font-size: clamp(13px, calc(var(--u) * 12), 20px);
}
.panel[data-id='upgrades'] .coinline .art-pill {
  min-height: 0;
  border-width: clamp(5px, calc(var(--u) * 4), 9px) calc(var(--u) * 10);
}
.urow .btn {
  height: clamp(42px, calc(var(--u) * 38), 64px);
  min-width: clamp(70px, calc(var(--u) * 65), 132px);
  padding: 0 clamp(8px, calc(var(--u) * 6), 14px);
  border-width: 2px;
  font-size: clamp(14px, calc(var(--u) * 14), 24px);
  color: #fff5d7;
}
.urow .btn:disabled {
  --radio-button: linear-gradient(#484c3e, #393e34);
  outline-color: #b3b5974d;
}
.urow .btn:disabled .ic {
  opacity: 0.76;
}
.urow .btn .ic[hidden] {
  display: none;
}

.bestiary-tile {
  background: #343f2e;
  border-bottom-color: #676e4d;
}
.bestiary-tile[aria-pressed='true'] {
  background: #536741;
  border-left-color: #d7e596;
}
.bestiary-showcase {
  background: radial-gradient(ellipse at center, #5d6f4f, #3a4938);
}
.bestiary-showcase[data-role='air'] {
  background: radial-gradient(ellipse at center, #647460, #415348);
}
.bestiary-showcase[data-role='boss'] {
  background: radial-gradient(ellipse at center, #805d42, #4e4233);
}
.bestiary-facts section + section {
  border-top-color: #818965;
}
.bestiary-grid,
.bestiary-detail {
  scrollbar-color: #a5ae81 #343d2d;
}
#joinCard {
  background: #3b4933;
  border-color: #a3b971;
}
#joinCard b {
  color: #edf3d5;
}
#tut {
  background: #414f36;
  border-color: #26321f;
}
#tut .skip,
#tut .tut-zoom svg {
  color: #dbe998;
}
@media (prefers-reduced-motion: reduce) {
  .radio-tuning i {
    transition-duration: 1ms;
  }
}

/* Label contrast stays constant even while the protection meter drains. */
#hud #baseNum {
  margin: auto;
  width: max-content;
  height: min(100%, 1.35em);
  padding: 0 0.35em;
  border-radius: 4px;
  background: #2a3627b8;
  color: #faf6df;
  text-shadow: none;
}
#hud #baseBox .bar {
  border-color: #283424;
}
.lang-select,
.lang-select option {
  border-color: #909a72;
  background: #465439;
  color: #f1efd6;
}
.lang-select:focus-visible {
  outline-color: #fff0a2;
}
.vol .track,
.vol .vfill {
  border: none;
  border-radius: 8px;
  background: #292f24;
  box-shadow: inset 0 0 0 1px #848b66;
}
.vol .vfill {
  background: #9bb763;
  box-shadow: none;
}
.vol .knob {
  background: linear-gradient(#ead88a, #bba758);
  border: 1px solid #3a3823;
  border-radius: 10px;
  box-shadow: 0 2px 0 #252c1d;
}
.toggle img {
  visibility: hidden;
}
.toggle::before,
.toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  border-radius: 999px;
}
.toggle::before {
  inset-inline: 0.3em;
  height: 54%;
  background: #293225;
  box-shadow: inset 0 0 0 1px #8e976c;
}
.toggle::after {
  inset-inline-start: 0.49em;
  width: 30%;
  height: 43%;
  background: #d5d2aa;
  box-shadow: 0 2px 1px #1e241a;
  transition: inset-inline-start 160ms ease;
}
.toggle[aria-checked='true']::before {
  background: #607244;
}
.toggle[aria-checked='true']::after {
  inset-inline-start: 62%;
  background: #e6db8f;
}

/* Cropped thumbnails let the portraits fill their windows without losing wide equipment. */
#cards .card .pic {
  inset: 0;
}
#cards .card .pic.hbox > img.hp {
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  inset: 0 !important;
  translate: 0 0 !important;
  object-fit: contain;
  object-position: center bottom;
}
.panel .camp-story-art {
  width: auto;
  max-width: 100%;
  height: auto;
  justify-self: center;
  aspect-ratio: auto;
  background: none;
  border: 1px solid #899062;
}

.panel[data-id='defeat'] {
  max-height: calc(100dvh - 32px);
}
.panel[data-id='defeat'] .body {
  min-height: 0;
}
#bossUrgent {
  height: auto;
  min-height: 100%;
  max-width: min(96vw, 580px);
  padding: 4px 10px;
  text-align: center;
}
body:has(#bossUrgent.show) #pulseBtn.answer {
  outline: 2px solid #ffd97a;
  outline-offset: 2px;
}
/* End of css/radio.css (complete file). */
