:root {
  color-scheme: dark;
  --base: #101716;
  --deep: #0b100f;
  --panel: #192320;
  --panel2: #202d28;
  --line: #35443b;
  --muted: #a3b2a7;
  --white: #edf1df;
  --lime: #d2ed87;
  --mint: #78dbba;
  --amber: #f7ce82;
  --font: 'Barlow Semi Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --scale: 1;
}
* {
  box-sizing: border-box;
}
html,
body,
#shell,
#battle {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  background: var(--base);
  color: var(--white);
  font: 15px var(--font);
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
svg {
  flex: none;
}
button {
  border: 0;
}
button:hover:not(:disabled) {
  filter: brightness(1.13);
}
[hidden] {
  display: none !important;
}
.frame {
  height: 100%;
  display: grid;
  grid-template-columns: clamp(170px, 17vw, 248px) 1fr;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #121c19;
  display: flex;
  flex-direction: column;
  padding: 27px 16px 18px;
  gap: 7px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 4px 42px;
}
.logomark {
  width: 38px;
  height: 41px;
  background: #d1eb96;
  clip-path: polygon(50% 0, 95% 22%, 95% 76%, 50% 100%, 5% 76%, 5% 22%);
  display: grid;
  place-items: center;
  color: #233626;
  flex: none;
}
.brand strong {
  display: block;
  font: 800 clamp(16px, 1.35vw, 22px) var(--font);
  letter-spacing: 0.065em;
}
.brand small,
.micro {
  display: block;
  font: 10px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand small {
  font-size: 8px;
  margin-top: 3px;
  letter-spacing: 0.21em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  color: var(--muted);
  padding: 13px 10px;
  border-radius: 4px;
  font-weight: 600;
}
.nav.active {
  background: #2c3d2c;
  color: var(--lime);
  box-shadow: inset 2px 0 var(--lime);
}
.nav:hover {
  background: #23312a;
}
.sidebottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.usercard {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  background: none;
  text-align: left;
  padding: 7px;
}
.avatar {
  background: #304438;
  border: 1px solid #576d53;
  display: grid;
  place-items: center;
  color: var(--lime);
  width: 35px;
  height: 35px;
  border-radius: 4px;
  flex-shrink: 0;
}
.usercard strong,
.usercard small {
  display: block;
}
.usercard small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.content {
  overflow: auto;
  padding: 0 clamp(18px, 3vw, 54px) 32px;
  background: radial-gradient(ellipse at 68% 0%, #24302655, transparent 58%), var(--base);
}
.topbar {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
}
.topbar > div,
.row,
.end,
.data,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar h1 {
  font-size: 21px;
  letter-spacing: -0.03em;
  margin: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 100%;
  box-shadow: 0 0 7px #cce68166;
}
.hero {
  position: relative;
  isolation: isolate;
  min-height: 290px;
  height: clamp(285px, 49vh, 560px);
  overflow: hidden;
  border: 1px solid #566448;
  background: #354d3c url('./art/portada.webp') center 48% / cover;
  border-radius: 6px;
}
.hero:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, #121d18ee 0%, #14221c99 20%, transparent 66%),
    linear-gradient(90deg, #11251988, transparent 59%);
  z-index: -1;
}
.hero .herobody {
  position: absolute;
  bottom: clamp(23px, 3.8vw, 52px);
  left: clamp(20px, 3vw, 46px);
  right: 12px;
}
.hero .micro {
  color: #d8ebad;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  text-shadow: 0 1px 5px #000;
}
.hero h2 {
  margin: 8px 0 7px;
  font: 800 clamp(36px, 5.1vw, 76px) / 1 var(--font);
  letter-spacing: -0.06em;
  text-shadow: 0 2px 20px #0006;
}
.hero p {
  margin: 0 0 20px;
  color: #e3e7d8;
  font-size: 15px;
}
.hero-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 7px;
  align-items: center;
  background: #12201ac9;
  border: 1px solid #9fae8055;
  color: #e7efd5;
  padding: 7px 10px;
  font: 10px var(--mono);
  border-radius: 3px;
}
.primary,
.secondary,
.danger,
.tiny,
.unitbtn,
.swatch,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 4px;
}
.primary,
.secondary,
.danger {
  padding: 10px 16px;
  font-weight: 700;
  min-height: 39px;
}
.primary {
  background: var(--lime);
  color: #182218;
}
.secondary,
.tiny,
.chip {
  background: #26332c;
  color: var(--white);
  border: 1px solid #425246;
}
.danger {
  background: #613d36;
  color: #ffe8dd;
}
.tiny {
  width: 36px;
  height: 35px;
  padding: 0;
}
.hero .primary {
  padding: 12px 19px;
}
.sectionline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 23px 0 12px;
}
.sectionline h2 {
  font-size: 17px;
  margin: 0;
}
.opgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.opcard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1a2520;
  border: 1px solid var(--line);
  padding: 20px;
  text-align: left;
  border-radius: 5px;
}
.opcard > i {
  background: #2a3d32;
  border: 1px solid #4b604b;
  border-radius: 5px;
  color: var(--lime);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.opcard strong,
.opcard small {
  display: block;
}
.opcard strong {
  font-size: 17px;
}
.opcard small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.opcard > svg:last-child {
  margin-left: auto;
  color: #93a591;
}
.footerline {
  font: 10px var(--mono);
  color: #829488;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.footerline span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#shade {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #07100dcc;
  display: grid;
  place-items: center;
  padding: clamp(6px, 2.2vw, 34px);
  backdrop-filter: blur(5px);
}
#panel {
  width: min(670px, 96vw);
  max-height: 96%;
  display: flex;
  flex-direction: column;
  background: #18231e;
  border: 1px solid #52634e;
  border-radius: 7px;
  box-shadow: 0 22px 65px #0008;
  overflow: hidden;
}
.mhead,
.mfoot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 15px 20px;
}
.mhead {
  border-bottom: 1px solid var(--line);
}
.mhead h2 {
  font-size: 22px;
  letter-spacing: -0.035em;
  margin: 0;
}
.mbody {
  overflow: auto;
  padding: 17px 20px;
}
.mfoot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.mbody > p:first-child {
  margin-top: 0;
}
.mbody p,
.blurb {
  color: #bac8bb;
  line-height: 1.55;
}
.mbody h3 {
  margin: 15px 0 9px;
}
.pair,
.formgrid,
.catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.formgrid {
  align-items: end;
}
label.label,
.label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
input,
select {
  min-width: 0;
  background: #101b16;
  border: 1px solid #485b4d;
  color: var(--white);
  border-radius: 4px;
  padding: 8px 10px;
}
input[type='range'] {
  width: 100%;
  padding: 0;
  accent-color: var(--lime);
}
.range {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 1.5fr 44px;
  gap: 15px;
  align-items: center;
  margin: 15px 0;
}
.range output {
  font: 13px var(--mono);
  color: var(--lime);
  text-align: right;
}
.hint,
.empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.hint {
  background: #243228;
  padding: 10px 13px;
  border-left: 2px solid #829765;
  margin: 12px 0;
}
.empty {
  padding: 15px 0;
}
.listrow,
.entitycard,
.statbox {
  background: #202d25;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px;
}
.listrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0;
}
.listrow b,
.listrow small {
  display: block;
}
.listrow small,
.entitycard small {
  color: var(--muted);
  margin-top: 3px;
}
.swatch {
  width: 29px;
  height: 29px;
  background: var(--c);
  border: 3px solid transparent;
  color: #14251e;
}
.swatch.chosen {
  outline: 2px solid #eff6db;
  outline-offset: 1px;
}
.wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.statbox small,
.statbox strong {
  display: block;
}
.statbox small {
  font-size: 12px;
  color: var(--muted);
}
.statbox strong {
  font: 22px var(--mono);
  margin-top: 4px;
}
.guide-illu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: radial-gradient(ellipse, #344c36, #1a2921 68%);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 108px;
  padding: 5px;
}
.guide-illu img {
  width: 88px;
  height: 81px;
  object-fit: contain;
  image-rendering: auto;
}
.guidesteps {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.guide-dot {
  flex: 1;
  background: #334138;
  height: 6px;
  border-radius: 3px;
  padding: 0;
}
.guide-dot.on {
  background: var(--lime);
}
.entitycard {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.entitycard img {
  width: 50px;
  height: 45px;
  object-fit: contain;
}
.entitycard span,
.entitycard small {
  display: block;
}
.chip {
  padding: 5px 9px;
  font-size: 12px;
}
.chip.active {
  color: var(--lime);
  border-color: var(--lime);
}
.chatlog {
  max-height: 110px;
  overflow: auto;
  background: #111b17;
  border-radius: 4px;
  padding: 6px 10px;
}
.chatlog p {
  margin: 3px 0;
  font-size: 13px;
}
.formrow {
  display: flex;
  gap: 7px;
}
.formrow input {
  flex: 1;
}
.error {
  color: #ffb390;
}
.ok {
  color: var(--lime);
}
#toast {
  position: fixed;
  z-index: 40;
  bottom: max(15px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #18271df5;
  border: 1px solid #738667;
  padding: 10px 16px;
  border-radius: 4px;
  box-shadow: 0 6px 20px #0008;
  max-width: 85vw;
  text-align: center;
  font-size: 14px;
  pointer-events: none;
}
#battle {
  position: absolute;
  inset: 0;
  background: #111d18;
  --s: var(--scale);
}
#field {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
#hud > *,
#radar {
  pointer-events: auto;
}
.glass {
  background: #101b18ee;
  border: 1px solid #6c8571;
  box-shadow: 0 3px 14px #0006;
  border-radius: 5px;
}
.resources,
.watch,
.radarbuttons,
.tools,
.battlebottom,
.orders,
.hintline {
  position: absolute;
}
.resources {
  top: max(9px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 2px;
}
.res {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  font: 700 calc(15px * var(--s)) var(--mono);
  color: var(--white);
  background: transparent;
}
.res + .res {
  border-left: 1px solid #556355;
}
.res .min {
  color: #63e2d2;
}
.res .din {
  color: #e6bf67;
}
.res .pow {
  color: #ead881;
}
.watch {
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font: 600 16px var(--mono);
}
#radar {
  position: absolute;
  top: 10px;
  right: max(10px, env(safe-area-inset-right));
  width: clamp(115px, 14vw, 200px);
  height: clamp(85px, 10.5vw, 150px);
  background: #12221d;
  border: 1px solid #83a48d;
  border-radius: 5px;
  cursor: pointer;
  touch-action: manipulation;
}
#radar.big {
  width: min(58vw, 530px);
  height: min(68vh, 390px);
  z-index: 7;
}
.radarbuttons {
  top: calc(clamp(85px, 10.5vw, 150px) + 18px);
  right: max(10px, env(safe-area-inset-right));
  display: flex;
  gap: 5px;
}
.tools {
  left: max(10px, env(safe-area-inset-left));
  top: 63px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100% - 155px);
  overflow: auto;
}
.tiletool,
.unitbtn {
  padding: 2px;
  background: #17251fec;
  border: 1px solid #64755c;
  border-radius: 4px;
  position: relative;
}
.tiletool {
  width: calc(49px * var(--s));
  height: calc(43px * var(--s));
}
.tiletool img,
.unitbtn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.tiletool.active,
.unitbtn.active,
.orderbtn.active {
  border-color: var(--lime);
  background: #36452a;
}
.battlebottom {
  bottom: max(9px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  max-width: calc(100% - 140px);
  padding: 5px;
  overflow: auto;
}
.unitbtn {
  width: calc(52px * var(--s));
  height: calc(43px * var(--s));
  flex: none;
}
.unitbtn i {
  position: absolute;
  bottom: 2px;
  left: 4px;
  height: 3px;
  background: var(--lime);
}
.orders {
  bottom: max(72px, calc(64px * var(--s)));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 130px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cmdbar {
  display: flex;
  gap: 3px;
  padding: 4px;
  max-width: 100%;
  overflow-x: auto;
}
.orderbtn {
  font: 600 calc(12px * var(--s)) var(--font);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  white-space: nowrap;
  background: #25382b;
  border: 1px solid #485849;
  border-radius: 3px;
}
.selinfo {
  background: #0b1713d9;
  padding: 5px 9px;
  border-radius: 3px;
  font: 11px var(--mono);
  max-width: 100%;
}
.hintline {
  top: 57px;
  left: 50%;
  transform: translateX(-50%);
  background: #132018ea;
  max-width: 47%;
  padding: 5px 10px;
  text-align: center;
  border-radius: 3px;
  font-size: 12px;
}
.confirmflag {
  color: var(--lime);
}
.mini {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.battle-toast #toast {
  bottom: 135px;
}
#battle button:focus:not(:focus-visible) {
  outline: 0;
}
@media (min-width: 1500px) {
  .hero {
    height: 54vh;
  }
  .opcard {
    padding: 25px;
  }
}
@media (max-width: 850px) {
  .frame {
    grid-template-columns: 68px 1fr;
  }
  .sidebar {
    padding: 17px 9px 10px;
    align-items: center;
  }
  .brand {
    margin: 0 0 18px;
  }
  .brand > div:last-child,
  .nav span,
  .usercard > span:last-child {
    display: none;
  }
  .nav {
    justify-content: center;
    padding: 12px;
  }
  .sidebottom {
    width: 100%;
  }
  .usercard {
    justify-content: center;
  }
  .content {
    padding: 0 17px 17px;
  }
  .topbar {
    height: 53px;
    margin-bottom: 12px;
  }
  .opcard {
    padding: 12px;
  }
  .topbar h1 {
    font-size: 18px;
  }
  .hero {
    min-height: 200px;
    height: 49vh;
  }
  .sectionline {
    margin: 13px 0 8px;
  }
  .hero .herobody {
    bottom: 18px;
  }
  .hero p {
    margin-bottom: 12px;
  }
  .tools {
    top: 55px;
  }
  .resources .res {
    font-size: 13px;
    padding: 3px 5px;
  }
  .radarbuttons .tiny {
    width: 30px;
    height: 28px;
  }
  .tiletool {
    width: 40px;
    height: 34px;
  }
  .unitbtn {
    width: 40px;
    height: 34px;
  }
  .battlebottom {
    bottom: 5px;
  }
  .orders {
    bottom: 55px;
  }
  .watch {
    font-size: 13px;
  }
  .guide-illu {
    min-height: 75px;
  }
  .guide-illu img {
    height: 65px;
  }
  .mhead,
  .mfoot {
    padding: 8px 14px;
  }
  .mbody {
    padding: 10px 14px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .sidebar {
    padding-top: 10px;
  }
  .brand {
    margin-bottom: 8px;
  }
  .nav {
    padding: 8px;
  }
  .topbar {
    height: 42px;
    margin-bottom: 9px;
  }
  .hero {
    height: 51vh;
    min-height: 145px;
  }
  .hero h2 {
    font-size: clamp(27px, 4vw, 48px);
    margin: 4px 0;
  }
  .hero p {
    margin: 3px 0 8px;
    font-size: 12px;
  }
  .hero .herobody {
    bottom: 11px;
  }
  .hero .primary {
    padding: 6px 11px;
    min-height: 30px;
  }
  .hero-tag {
    top: 9px;
    right: 10px;
  }
  .sectionline {
    margin: 9px 0 5px;
  }
  .opcard {
    padding: 8px 12px;
  }
  .opcard > i {
    width: 32px;
    height: 32px;
  }
  .opcard strong {
    font-size: 14px;
  }
  .opcard small {
    font-size: 10px;
  }
  .footerline {
    margin-top: 6px;
  }
  .mhead h2 {
    font-size: 18px;
  }
  .mfoot .primary,
  .mfoot .secondary {
    min-height: 30px;
    padding: 5px 10px;
  }
  .guidesteps {
    margin: 7px 0;
  }
  .guide-illu {
    min-height: 54px;
  }
  .guide-illu img {
    height: 50px;
  }
  .guide-illu + p {
    margin: 6px 0;
  }
  .tools {
    max-height: calc(100% - 118px);
    gap: 3px;
  }
  .tiletool {
    height: 30px;
  }
  .radarbuttons {
    top: calc(clamp(85px, 10.5vw, 150px) + 13px);
  }
  .orders {
    bottom: 46px;
  }
  .selinfo {
    font-size: 9px;
  }
  .hintline {
    top: 41px;
    font-size: 10px;
  }
  .unitbtn {
    height: 29px;
  }
  .orderbtn {
    padding: 4px 6px;
  }
  .guide-illu svg {
    height: 18px;
  }
}
@media (max-width: 530px) and (orientation: portrait) {
  .frame {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    gap: 2px;
  }
  .brand {
    margin: 0 auto 0 0;
  }
  .brand > div:last-child {
    display: block;
  }
  .brand strong {
    font-size: 13px;
  }
  .brand small {
    display: none;
  }
  .logomark {
    width: 28px;
    height: 30px;
  }
  .nav {
    width: auto;
    padding: 8px;
  }
  .sidebottom {
    display: none;
  }
  .content {
    padding: 0 12px 17px;
  }
  .frame {
    grid-template-rows: 50px 1fr;
  }
  .opgrid {
    grid-template-columns: 1fr;
  }
  .hero {
    height: 44vh;
  }
  .hero h2 {
    font-size: 35px;
  }
  .formgrid,
  .pair {
    grid-template-columns: 1fr;
  }
  .hintline {
    top: 94px;
  }
  .watch {
    left: 10px;
    top: 49px;
    transform: none;
  }
  .tools {
    top: 144px;
  }
  .orders {
    max-width: 90%;
  }
  .battlebottom {
    max-width: 95%;
  }
  .hero-tag {
    font-size: 9px;
  }
}

@media (min-width: 851px) and (max-width: 1120px) {
  .frame {
    grid-template-columns: 176px 1fr;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .brand {
    gap: 6px;
    margin-left: 0;
    margin-right: 0;
  }
  .brand strong {
    font-size: 15px;
    letter-spacing: 0.025em;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  .logomark {
    width: 31px;
    height: 34px;
  }
  .nav {
    font-size: 14px;
    gap: 8px;
  }
}
.formgrid > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.tools {
  touch-action: none;
}
