.lost-outpost-game {
  --lo-ink: #16231f;
  --lo-muted: #607069;
  --lo-line: rgba(61, 83, 72, 0.25);
  --lo-panel: rgba(247, 250, 245, 0.9);
  --lo-panel-strong: #f9fcf7;
  --lo-olive: #47704f;
  --lo-olive-dark: #294934;
  --lo-cyan: #3a95a2;
  --lo-amber: #d2963b;
  --lo-red: #ac4242;
  color: var(--lo-ink);
  display: grid;
  gap: 16px;
  isolation: isolate;
  position: relative;
}

.dark .lost-outpost-game {
  --lo-ink: #eff7ed;
  --lo-muted: #acbcb2;
  --lo-line: rgba(180, 209, 189, 0.2);
  --lo-panel: rgba(13, 25, 21, 0.9);
  --lo-panel-strong: #12231d;
  --lo-olive: #75a881;
  --lo-olive-dark: #9ac9a3;
  --lo-cyan: #73c9d2;
  --lo-amber: #edb85c;
  --lo-red: #ef7a72;
}

.lost-outpost-game .lo-hero,
.lost-outpost-game .lo-briefing,
.lost-outpost-game .lo-resource-bar article,
.lost-outpost-game .lo-simulation-bar,
.lost-outpost-game .lo-battlefield-panel,
.lost-outpost-game .lo-sidebar > section,
.lost-outpost-game .lo-selection-panel,
.lost-outpost-game .lo-debug {
  backdrop-filter: blur(20px);
  background: var(--lo-panel);
  border: 1px solid var(--lo-line);
  box-shadow: 0 20px 60px rgba(18, 34, 27, 0.13);
}

.lost-outpost-game .lo-hero {
  align-items: center;
  background:
    linear-gradient(105deg, rgba(31, 63, 44, 0.91), rgba(36, 71, 61, 0.77)),
    repeating-linear-gradient(
      135deg,
      transparent 0 24px,
      rgba(255, 255, 255, 0.04) 24px 26px
    );
  border-color: rgba(176, 219, 185, 0.24);
  border-radius: 28px;
  color: #f6fff5;
  display: flex;
  justify-content: space-between;
  min-height: 178px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}

.lost-outpost-game .lo-hero::after {
  border: 18px double rgba(205, 238, 209, 0.13);
  border-radius: 50%;
  content: "";
  height: 190px;
  pointer-events: none;
  position: absolute;
  right: 27%;
  top: -50px;
  transform: rotate(20deg);
  width: 190px;
}

.lost-outpost-game .lo-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.92;
  margin: 8px 0 14px;
}

.lost-outpost-game .lo-hero p {
  color: #d7e8d9;
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  line-height: 1.55;
  margin: 0;
  max-width: 700px;
}

.lost-outpost-game .lo-hero-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 335px;
  position: relative;
  z-index: 2;
}

.lost-outpost-game .lo-hero-actions button {
  min-height: 44px;
}

.lost-outpost-game .lo-command-deck {
  display: grid;
  gap: 12px;
}

.lost-outpost-game .lo-resource-bar {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.lost-outpost-game .lo-resource-bar article {
  border-radius: 16px;
  display: grid;
  min-width: 0;
  padding: 12px 14px;
}

.lost-outpost-game .lo-resource-bar article[data-low-power="true"] {
  border-color: var(--lo-red);
  box-shadow: inset 0 0 0 1px var(--lo-red);
}

.lost-outpost-game .lo-resource-bar span,
.lost-outpost-game .lo-resource-bar small {
  color: var(--lo-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lost-outpost-game .lo-resource-bar span {
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lost-outpost-game .lo-resource-bar strong {
  color: var(--lo-olive-dark);
  font-size: clamp(1.08rem, 2vw, 1.46rem);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lost-outpost-game .lo-resource-bar small {
  font-size: 0.71rem;
}

.lost-outpost-game .lo-simulation-bar {
  align-items: center;
  border-radius: 17px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 11px;
}

.lost-outpost-game .lo-sim-actions,
.lost-outpost-game .lo-battle-actions,
.lost-outpost-game .lo-speed {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lost-outpost-game .lo-speed {
  background: color-mix(in srgb, var(--lo-ink) 7%, transparent);
  border-radius: 12px;
  padding: 4px;
}

.lost-outpost-game .lo-speed button,
.lost-outpost-game .lo-tab-list button,
.lost-outpost-game .lo-selection-actions button,
.lost-outpost-game .lo-mobile-command-row button,
.lost-outpost-game .lo-card-grid button,
.lost-outpost-game .lo-debug button {
  background: transparent;
  border: 1px solid var(--lo-line);
  border-radius: 9px;
  color: var(--lo-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  min-height: 39px;
  padding: 7px 10px;
}

.lost-outpost-game .lo-speed button[aria-pressed="true"],
.lost-outpost-game .lo-tab-list button[aria-selected="true"],
.lost-outpost-game .lo-selection-actions button[aria-pressed="true"],
.lost-outpost-game .lo-mobile-command-row button[aria-pressed="true"] {
  background: var(--lo-olive-dark);
  border-color: var(--lo-olive-dark);
  color: #fff;
}

.lost-outpost-game button:focus-visible,
.lost-outpost-game input:focus-visible,
.lost-outpost-game select:focus-visible,
.lost-outpost-game canvas:focus-visible {
  outline: 3px solid #f1c15c;
  outline-offset: 3px;
}

.lost-outpost-game button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.lost-outpost-game .lo-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.8fr) minmax(310px, 0.7fr);
}

.lost-outpost-game .lo-battlefield-panel,
.lost-outpost-game .lo-sidebar > section,
.lost-outpost-game .lo-selection-panel {
  border-radius: 20px;
}

.lost-outpost-game .lo-battlefield-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
}

.lost-outpost-game .lo-canvas-shell {
  background: #101b16;
  border: 1px solid rgba(174, 220, 183, 0.25);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.lost-outpost-game .lo-canvas {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  max-height: 72vh;
  touch-action: none;
  width: 100%;
}

.lost-outpost-game .lo-boss-bar {
  background: rgba(18, 14, 14, 0.92);
  border: 1px solid rgba(255, 131, 110, 0.5);
  border-radius: 11px;
  color: #fff;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(120px, auto) minmax(180px, 1fr) auto;
  left: 50%;
  max-width: min(660px, calc(100% - 24px));
  padding: 8px 12px;
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  width: 76%;
}

.lost-outpost-game .lo-boss-bar progress {
  accent-color: #d34d40;
  width: 100%;
}

.lost-outpost-game .lo-canvas-alert {
  background: rgba(27, 37, 31, 0.94);
  border: 1px solid #e5b858;
  border-radius: 9px;
  bottom: 12px;
  color: #fff7d8;
  font-size: 0.82rem;
  font-weight: 800;
  left: 50%;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  position: absolute;
  transform: translateX(-50%);
}

.lost-outpost-game .lo-status {
  align-items: center;
  background: color-mix(in srgb, var(--lo-panel-strong) 92%, transparent);
  border: 1px solid var(--lo-line);
  border-left: 4px solid var(--lo-olive);
  border-radius: 13px;
  display: grid;
  gap: 11px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 58px;
  padding: 9px 12px;
}

.lost-outpost-game .lo-status[data-state="warning"],
.lost-outpost-game .lo-status[data-state="defeat"] {
  border-left-color: var(--lo-red);
}

.lost-outpost-game .lo-status[data-state="victory"] {
  border-left-color: var(--lo-amber);
}

.lost-outpost-game .lo-status-mark {
  align-items: center;
  background: var(--lo-olive-dark);
  border: 2px solid #d6c579;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 0.57rem;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.lost-outpost-game .lo-status p,
.lost-outpost-game .lo-panel-note {
  color: var(--lo-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 2px 0 0;
}

.lost-outpost-game .lo-mobile-command-row {
  display: none;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lost-outpost-game .lo-selection-panel {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.85fr) minmax(170px, 0.6fr) minmax(
      240px,
      1.45fr
    );
  padding: 12px 14px;
}

.lost-outpost-game .lo-selection-panel h2,
.lost-outpost-game .lo-panel-heading h2,
.lost-outpost-game .lo-tabs h2 {
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 2px 0;
}

.lost-outpost-game .lo-selection-panel p {
  color: var(--lo-muted);
  font-size: 0.75rem;
  margin: 0;
}

.lost-outpost-game .lo-selection-stats,
.lost-outpost-game .lo-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lost-outpost-game .lo-selection-stats span {
  background: color-mix(in srgb, var(--lo-olive) 9%, transparent);
  border-radius: 7px;
  font-size: 0.71rem;
  padding: 5px 7px;
}

.lost-outpost-game .lo-selection-actions {
  justify-content: flex-end;
}

.lost-outpost-game .lo-selection-actions button {
  min-height: 34px;
  padding: 5px 7px;
}

.lost-outpost-game .lo-sidebar {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lost-outpost-game .lo-sidebar > section {
  padding: 13px;
}

.lost-outpost-game .lo-panel-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.lost-outpost-game .lo-panel-heading > span {
  color: var(--lo-muted);
  font-size: 0.69rem;
  font-weight: 800;
}

.lost-outpost-game [data-lo-minimap] {
  background: #16261d;
  border: 1px solid var(--lo-line);
  border-radius: 10px;
  display: block;
  height: auto;
  touch-action: none;
  width: 100%;
}

.lost-outpost-game .lo-objectives ol,
.lost-outpost-game .lo-queue {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lost-outpost-game .lo-objectives li,
.lost-outpost-game .lo-queue li {
  border-left: 3px solid var(--lo-amber);
  color: var(--lo-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  padding-left: 8px;
}

.lost-outpost-game .lo-objectives li[data-complete="true"] {
  border-left-color: var(--lo-olive);
  opacity: 0.72;
  text-decoration: line-through;
}

.lost-outpost-game .lo-tab-list {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

.lost-outpost-game .lo-tab-list button {
  min-height: 36px;
  padding: 5px 4px;
}

.lost-outpost-game .lo-card-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}

.lost-outpost-game .lo-card-grid button {
  align-items: start;
  display: grid;
  gap: 1px;
  justify-items: start;
  min-height: 62px;
  padding: 7px 8px;
  text-align: left;
}

.lost-outpost-game .lo-card-grid button:hover,
.lost-outpost-game .lo-card-grid button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--lo-olive) 15%, transparent);
  border-color: var(--lo-olive);
}

.lost-outpost-game .lo-card-grid button strong {
  font-size: 0.76rem;
}

.lost-outpost-game .lo-card-grid button small {
  color: var(--lo-muted);
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.3;
}

.lost-outpost-game .lo-card-grid button span {
  color: var(--lo-olive-dark);
  font-size: 0.67rem;
}

.lost-outpost-game .lo-briefing {
  align-items: stretch;
  background:
    radial-gradient(
      circle at 10% 5%,
      rgba(81, 128, 91, 0.18),
      transparent 26rem
    ),
    var(--lo-panel);
  border-radius: 24px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  padding: clamp(22px, 4vw, 42px);
}

.lost-outpost-game .lo-briefing h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 7px 0 13px;
}

.lost-outpost-game .lo-briefing-copy > p,
.lost-outpost-game .lo-deployment-card > p {
  color: var(--lo-muted);
  line-height: 1.6;
}

.lost-outpost-game .lo-faction-cards {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.lost-outpost-game .lo-faction-cards article {
  align-items: center;
  background: color-mix(in srgb, var(--lo-panel-strong) 92%, transparent);
  border: 1px solid var(--lo-line);
  border-radius: 14px;
  display: grid;
  gap: 11px;
  grid-template-columns: auto 1fr;
  padding: 12px;
}

.lost-outpost-game .lo-faction-cards p {
  color: var(--lo-muted);
  font-size: 0.79rem;
  line-height: 1.45;
  margin: 2px 0 0;
}

.lost-outpost-game .lo-emblem,
.lost-outpost-game .lo-result-mark {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-size: 0.62rem;
  font-weight: 950;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.lost-outpost-game .lo-emblem-fdf {
  background-image: var(--lo-emblems-url);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  border: 0;
}

.lost-outpost-game .lo-emblem-red {
  background-image: var(--lo-emblems-url);
  background-position: right center;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  border: 0;
}

.lost-outpost-game .lo-deployment-card {
  align-content: start;
  background: color-mix(in srgb, var(--lo-panel-strong) 95%, transparent);
  border: 1px solid var(--lo-line);
  border-radius: 18px;
  display: grid;
  gap: 15px;
  padding: 20px;
}

.lost-outpost-game .lo-deployment-card h2 {
  font-size: 1.45rem;
  margin: 4px 0 0;
}

.lost-outpost-game .lo-deployment-card label:not(.lo-check) {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
}

.lost-outpost-game .lo-check {
  align-items: center;
  display: flex;
  font-size: 0.79rem;
  gap: 8px;
}

.lost-outpost-game .lo-check input {
  accent-color: var(--lo-olive-dark);
  height: 19px;
  width: 19px;
}

.lost-outpost-game .lo-dialog {
  background: var(--lo-panel-strong);
  border: 1px solid var(--lo-line);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  color: var(--lo-ink);
  max-height: min(86vh, 820px);
  max-width: min(900px, calc(100vw - 24px));
  overflow: auto;
  padding: 22px;
  width: 100%;
}

.lost-outpost-game .lo-dialog::backdrop {
  backdrop-filter: blur(5px);
  background: rgba(5, 12, 8, 0.72);
}

.lost-outpost-game .lo-dialog-heading,
.lost-outpost-game .lo-dialog-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.lost-outpost-game .lo-dialog h2 {
  margin: 4px 0 8px;
}

.lost-outpost-game .lo-dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.lost-outpost-game .lo-manual-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 15px;
}

.lost-outpost-game .lo-manual-grid section {
  background: color-mix(in srgb, var(--lo-olive) 7%, transparent);
  border-radius: 13px;
  padding: 13px;
}

.lost-outpost-game .lo-manual-grid h3 {
  margin: 0 0 7px;
}

.lost-outpost-game .lo-manual-grid ul {
  color: var(--lo-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
  padding-left: 18px;
}

.lost-outpost-game .lo-tutorial-dialog {
  max-width: 540px;
}

.lost-outpost-game .lo-result-dialog {
  align-items: center;
  display: none;
  gap: 20px;
  grid-template-columns: auto 1fr;
  max-width: 620px;
}

.lost-outpost-game .lo-result-dialog[open] {
  display: grid;
}

.lost-outpost-game .lo-result-dialog .lo-dialog-actions {
  grid-column: 1 / -1;
}

.lost-outpost-game .lo-result-mark {
  background: var(--lo-olive-dark);
  border: 5px double #ead47a;
  color: #fff;
  height: 82px;
  width: 82px;
}

.lost-outpost-game .lo-result-dialog dl {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lost-outpost-game .lo-result-dialog dl div {
  background: color-mix(in srgb, var(--lo-olive) 9%, transparent);
  border-radius: 8px;
  padding: 6px 8px;
}

.lost-outpost-game .lo-debug {
  background: rgba(5, 14, 10, 0.95);
  border-color: rgba(140, 218, 163, 0.35);
  border-radius: 14px;
  bottom: 12px;
  color: #c6ffd3;
  max-height: 46vh;
  max-width: min(430px, calc(100vw - 24px));
  overflow: auto;
  padding: 11px;
  position: fixed;
  right: 12px;
  width: 100%;
  z-index: 900;
}

.lost-outpost-game .lo-debug-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.lost-outpost-game .lo-debug button {
  border-color: rgba(140, 218, 163, 0.35);
  color: #c6ffd3;
  min-height: 32px;
}

.lost-outpost-game .lo-debug pre {
  font-size: 0.68rem;
  line-height: 1.45;
  margin: 8px 0 0;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .lost-outpost-game .lo-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lost-outpost-game .lo-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-tabs {
    grid-column: 1 / -1;
  }

  .lost-outpost-game .lo-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .lost-outpost-game .lo-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .lost-outpost-game .lo-hero-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .lost-outpost-game .lo-resource-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-simulation-bar,
  .lost-outpost-game .lo-selection-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .lost-outpost-game .lo-simulation-bar {
    flex-direction: column;
  }

  .lost-outpost-game .lo-sim-actions,
  .lost-outpost-game .lo-battle-actions,
  .lost-outpost-game .lo-selection-actions {
    justify-content: center;
  }

  .lost-outpost-game .lo-mobile-command-row {
    display: grid;
  }

  .lost-outpost-game .lo-mobile-command-row button,
  .lost-outpost-game .lo-selection-actions button,
  .lost-outpost-game .lo-tab-list button,
  .lost-outpost-game .lo-speed button {
    min-height: 44px;
  }

  .lost-outpost-game .lo-briefing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) and (orientation: landscape) {
  body:has(.lost-outpost-game) .nav-subdropdown {
    left: auto;
    right: 100%;
  }

  .lost-outpost-game .lo-resource-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-canvas {
    aspect-ratio: auto;
    height: min(58svh, 460px);
  }

  .lost-outpost-game .lo-mobile-command-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .lost-outpost-game .lo-hero,
  .lost-outpost-game .lo-briefing {
    border-radius: 18px;
    padding: 20px 16px;
  }

  .lost-outpost-game .lo-resource-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-sidebar,
  .lost-outpost-game .lo-manual-grid {
    grid-template-columns: 1fr;
  }

  .lost-outpost-game .lo-tabs {
    grid-column: auto;
  }

  .lost-outpost-game .lo-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-boss-bar {
    grid-template-columns: 1fr auto;
    width: calc(100% - 20px);
  }

  .lost-outpost-game .lo-boss-bar progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .lost-outpost-game .lo-result-dialog[open] {
    grid-template-columns: 1fr;
  }

  .lost-outpost-game .lo-result-mark {
    height: 62px;
    width: 62px;
  }
}

@media (max-width: 420px) {
  .lost-outpost-game .lo-mobile-command-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-tab-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lost-outpost-game .lo-dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lost-outpost-game *,
  .lost-outpost-game *::before,
  .lost-outpost-game *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
