/*
 * Mosslight: Salvage Line — camouflage mechanical wilderness theme
 * Loaded after v2-polish.css. Presentation only; runtime markup and state
 * classes remain unchanged. Cyan is reserved for laser charge energy.
 */

:root {
  color-scheme: dark;
  --bg: #12150f;
  --panel: #20241d;
  --panel-light: #2b3025;
  --line: #4b5140;
  --muted: #b5b6a4;
  --text: #efeddf;
  --accent: #dfb86e;
  --accent-dark: #4a4029;
  --gold: #e5bd73;
  --danger: #eda088;
  --v2-teal: #a9b98d;
  --v2-deep: #151812;
  --v2-soft-line: rgb(223 184 110 / 14%);
  --v2-radius: 9px;
  --v2-ink: #efeddf;
  --v2-muted: #b8b8a6;
  --v2-dim: #969988;
  --v2-moss: #a8b98a;
  --v2-moss-bright: #ced9ae;
  --v2-laser: #78d7e5;
  --v2-amber: #e1b76c;
  --v2-coral: #eca088;
  --v2-surface: #20241d;
  --v2-surface-raised: #2c3126;
  --v2-surface-inset: #121610;
  --v2-border: #505744;
  --v2-border-strong: #74785d;
  --v2-shadow: 0 15px 36px rgb(0 0 0 / 25%);
  --v2-rust: #93684b;
  --v2-khaki: #c0b893;
  --v2-gunmetal: #252a27;
}

body.v2-page {
  background:
    linear-gradient(180deg, rgb(15 18 13 / 76%) 0%, rgb(15 18 13 / 91%) 58%, #10130e 100%),
    radial-gradient(ellipse at 50% -10%, rgb(118 123 78 / 17%), transparent 52%),
    url("./assets/ui/wilderness-metal.jpg") center top / min(100%, 1920px) auto no-repeat fixed,
    linear-gradient(135deg, #252a1d, #12150f 62%, #1b1e16);
  color: var(--v2-ink);
  font-size: 15px;
  line-height: 1.55;
}

body.v2-page::before {
  z-index: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 95px, rgb(210 207 165 / 2%) 95px 96px),
    linear-gradient(180deg, transparent 68%, #10130e 100%);
  mask-image: none;
}

.v2-app {
  position: relative;
  z-index: 1;
  width: min(1420px, calc(100% - 56px));
}

.v2-page main { min-height: 68vh; }
.v2-page .scene { padding: 26px 0 16px; }
.v2-page ::selection { background: #756844; color: #fffdf2; }

/* Compact field-equipment header */
.v2-header {
  gap: 32px;
  padding: 28px 0 23px;
  border-bottom: 1px solid #4b4f3d;
}

.v2-header::after {
  width: 124px;
  height: 2px;
  background: linear-gradient(90deg, var(--v2-amber), rgb(225 183 108 / 0%));
  box-shadow: none;
}

.v2-brand h1 {
  max-width: 820px;
  color: #f2f0e4;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 730;
  letter-spacing: .035em;
  line-height: 1.12;
  text-shadow: 0 2px 12px rgb(0 0 0 / 40%);
}

.v2-brand .eyebrow {
  margin-bottom: 9px;
  color: var(--v2-khaki);
  font-size: 10px;
  letter-spacing: .17em;
}

.v2-brand-subtitle {
  margin-top: 9px;
  color: #b8b9aa;
  font-size: 13px;
  letter-spacing: .025em;
}

.v2-wallet-block {
  min-width: 174px;
  padding: 13px 17px;
  border: 1px solid #716648;
  border-radius: 7px;
  background:
    linear-gradient(105deg, rgb(225 183 108 / 7%), transparent 45%),
    linear-gradient(145deg, #323329, #22271f);
  box-shadow: inset 3px 0 #b58c4e, inset 0 1px rgb(255 255 255 / 4%), 0 8px 24px rgb(0 0 0 / 18%);
}

.v2-wallet-label {
  margin-bottom: 4px;
  color: #cbc4a8;
  font-size: 10px;
  letter-spacing: .13em;
}

#credits {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #f0cf8b;
  font-size: 24px;
  line-height: 1.2;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

#credits::before { content: none; }

/* Shared painted-metal surfaces */
.v2-page .panel {
  border-color: var(--v2-border);
  border-radius: 9px;
  background:
    linear-gradient(115deg, rgb(255 255 255 / 2%), transparent 28%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(0 0 0 / 1.5%) 3px 4px),
    linear-gradient(145deg, #242920, #1c211b);
  box-shadow: var(--v2-shadow), inset 0 1px rgb(255 255 255 / 3%), inset 0 -1px rgb(0 0 0 / 18%);
}

.v2-page .eyebrow {
  color: #b8b28d;
  font-size: 10px;
  line-height: 1.4;
}

.v2-page h2,
.v2-page h3,
.v2-page h4,
.v2-page strong { letter-spacing: -.005em; }

.v2-page button,
.v2-page a,
.v2-page [role="button"] { -webkit-tap-highlight-color: transparent; }

.v2-page button:focus-visible,
.v2-page a:focus-visible,
.v2-page [tabindex]:focus-visible {
  outline: 2px solid #edc77f;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgb(20 22 16 / 80%);
}

.v2-page .button {
  min-height: 42px;
  border-color: #626953;
  border-radius: 6px;
  background: linear-gradient(180deg, #3b4135, #2c3229);
  color: #efeddf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .015em;
  white-space: normal;
  box-shadow: inset 0 1px rgb(255 255 255 / 5%), inset 0 -1px rgb(0 0 0 / 18%);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.v2-page .button:hover:not(:disabled) {
  border-color: #8a8e6d;
  background: linear-gradient(180deg, #4a503e, #363d30);
  box-shadow: 0 5px 14px rgb(0 0 0 / 20%), inset 0 1px rgb(255 255 255 / 6%);
  transform: translateY(-1px);
}

.v2-page .button:active:not(:disabled) { transform: translateY(0); }

.v2-page .button.primary {
  border-color: #e2bd77;
  background: linear-gradient(180deg, #e4c17e, #c99e56);
  color: #26261b;
  box-shadow: inset 0 1px rgb(255 255 255 / 32%), inset 0 -1px rgb(88 59 25 / 20%);
}

.v2-page .button.primary:hover:not(:disabled) {
  border-color: #f3d695;
  background: linear-gradient(180deg, #efd091, #d5aa61);
  box-shadow: 0 5px 16px rgb(0 0 0 / 20%), inset 0 1px rgb(255 255 255 / 35%);
}

.v2-page .button.ghost {
  border-color: #505747;
  background: rgb(17 21 16 / 25%);
  color: #bdbead;
  box-shadow: none;
}

.v2-page .button:disabled,
.v2-page .module-card:disabled,
.v2-page .level-button:disabled {
  opacity: .48;
  filter: saturate(.55);
}

.v2-page .button.compact {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
}

/* Workshop briefing: broad camouflage color, quiet mechanical detail */
.v2-workshop-intro {
  gap: 30px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border-color: #64684e !important;
  background:
    radial-gradient(ellipse at 84% 8%, rgb(139 139 86 / 15%), transparent 31%),
    radial-gradient(ellipse at 69% 110%, rgb(73 88 57 / 24%), transparent 40%),
    linear-gradient(105deg, rgb(149 103 66 / 5%), transparent 23%),
    linear-gradient(110deg, #343a29, #242a20 60%, #1d231c) !important;
}

.v2-workshop-intro::before {
  top: 0;
  left: 26px;
  width: 88px;
  height: 2px;
  background: #c49b59;
  box-shadow: 18px 0 rgb(117 77 48 / 55%);
}

.v2-workshop-intro::after {
  top: -82px;
  right: 7%;
  width: 218px;
  height: 218px;
  border-color: rgb(195 191 139 / 8%);
  box-shadow: 0 0 0 34px rgb(195 191 139 / 2%), 0 0 0 70px rgb(195 191 139 / 1%);
}

.v2-workshop-intro h2 {
  margin-bottom: 9px;
  color: #f0eddd;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 680;
}

.v2-workshop-intro p:last-child {
  max-width: 760px;
  color: #c2c2b0;
  font-size: 14px;
  line-height: 1.65;
}

.v2-security-note {
  gap: 9px;
  padding: 9px 12px;
  border-color: #626c50;
  border-radius: 5px;
  background: #1c231b;
  color: #ced3ba;
  font-size: 11px;
}

.v2-status-dot {
  width: 7px;
  height: 7px;
  background: #aebb8d;
  box-shadow: 0 0 0 3px rgb(174 187 141 / 9%);
}

/* Strong, legible workshop tabs */
.v2-page section.v2-workshop-console {
  position: relative;
  overflow: hidden;
  border-color: #5c624b;
}

.v2-tabs {
  gap: 6px;
  padding: 9px 12px 0;
  border-bottom-color: #4c5341;
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, rgb(255 255 255 / 1%) 47px 48px),
    #171c16;
}

.v2-tab {
  gap: 11px;
  min-height: 56px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: #b2b4a1;
  font-size: 14px;
  font-weight: 700;
}

.v2-tab:hover {
  border-color: #4c5441;
  background: #272d23;
  color: #f0eddf;
}

.v2-tab.is-active,
.v2-tab.active,
.v2-tab[aria-selected="true"] {
  border-color: #676d52;
  border-bottom-color: #293024;
  background: linear-gradient(180deg, #353b2b, #293024);
  color: #f0d59d;
  box-shadow: inset 0 3px #d2a75f, inset 0 1px rgb(255 255 255 / 4%);
}

.v2-tab-index {
  color: #92957c;
  font-size: 10px;
  letter-spacing: .12em;
}

.v2-tab.is-active .v2-tab-index,
.v2-tab.active .v2-tab-index,
.v2-tab[aria-selected="true"] .v2-tab-index { color: #e2bc76; }

.v2-tab-panel { padding: 27px; }

.v2-section-heading {
  gap: 24px;
  margin-bottom: 22px;
}

.v2-section-heading h2 {
  color: #efeddf;
  font-size: 23px;
  font-weight: 680;
}

.v2-section-heading > span {
  max-width: 420px;
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.55;
}

.v2-subsection-heading {
  gap: 16px;
  margin-bottom: 16px;
}

.v2-subsection-heading h3,
.v2-console-heading h3 {
  color: #edebdd;
  font-size: 16px;
  font-weight: 680;
}

.v2-subsection-heading .eyebrow,
.v2-console-heading .eyebrow {
  margin-bottom: 5px;
  color: #b4ae88;
  font-size: 9px;
  letter-spacing: .15em;
}

.v2-subsection-heading > span {
  color: #b1b3a0;
  font-size: 11px;
}

/* Formation board and rugged module rack */
.v2-formation-layout {
  grid-template-columns: minmax(0, 2.15fr) minmax(270px, .85fr);
  gap: 20px;
}

.v2-formation-board,
.v2-module-tray,
.v2-cannon-spec,
.v2-cannon-parts,
.v2-stock-section,
.v2-shop-inventory {
  border-color: #505844;
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgb(135 139 88 / 5%), transparent 32%),
    linear-gradient(150deg, #282e23, #20261e);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%), inset 0 -1px rgb(0 0 0 / 15%);
}

.v2-formation-board { padding: 15px; background: #1a2019; }
.v2-module-tray { padding: 18px; }

.v2-board-topline {
  margin-bottom: 13px;
  color: #b0b39e;
  font-size: 10px;
  letter-spacing: .1em;
}

#formation-capacity {
  padding: 6px 10px;
  border-color: #73795a;
  border-radius: 5px;
  background: #353b29;
  color: #e0d8ae;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#formation-capacity.is-over-capacity {
  border-color: #a36c54;
  background: #402b22;
  color: #ffb39a;
}

.v2-canvas-frame {
  border-color: #59624c;
  border-radius: 5px;
  background: #10150f;
  box-shadow: 0 0 0 3px rgb(11 15 11 / 65%), inset 0 0 20px rgb(0 0 0 / 30%);
}

#formation-canvas,
#raid-canvas {
  border-radius: 3px;
  background: #11160f;
}

.v2-formation-instructions {
  margin-top: 14px;
  color: #b7baa8;
  font-size: 12px;
  line-height: 1.65;
}

.v2-inline-message {
  min-height: 22px;
  margin-top: 10px;
  color: #c4c5a3;
  font-size: 12px;
}

.v2-inline-message.is-error { color: var(--v2-coral); }
.v2-inline-message.is-success { color: var(--v2-moss-bright); }

.v2-item-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 11px;
}

.v2-module-grid {
  grid-template-columns: 1fr;
  max-height: 500px;
  padding-right: 5px;
  scrollbar-color: #697056 #171c15;
}

.v2-page .module-card,
.v2-page .item-card,
.v2-module-card,
.v2-item-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #535b45;
  border-radius: 6px;
  background:
    linear-gradient(105deg, rgb(144 145 91 / 7%), transparent 37%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgb(255 255 255 / 1%) 20px 21px),
    linear-gradient(145deg, #30362a, #252b22);
  color: var(--v2-ink);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%), inset 0 -1px rgb(0 0 0 / 15%);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.v2-page button.module-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.v2-page .module-card::before,
.v2-page .item-card::before,
.v2-module-card::before,
.v2-item-card::before {
  width: 3px;
  background: #777b58;
  opacity: .62;
  box-shadow: 1px 0 rgb(147 104 75 / 20%);
}

.v2-page .module-card strong,
.v2-page .item-card strong,
.v2-module-card h4,
.v2-item-card h4 {
  color: #efeddf;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.v2-page .module-card > span,
.v2-page .item-card > span {
  color: #bdbeaa;
  font-size: 12px;
  line-height: 1.45;
}

.v2-page .module-card > span { text-align: right; }

.v2-page .module-card small {
  color: #a9ad97;
  font-size: 12px;
  line-height: 1.45;
}

.v2-page .item-card > span { margin-top: 6px; }

.v2-page button.module-card:hover:not(:disabled),
.v2-page .item-card:hover,
.v2-module-card:hover,
.v2-item-card:hover {
  border-color: #85896a;
  background:
    linear-gradient(105deg, rgb(155 151 96 / 9%), transparent 40%),
    linear-gradient(145deg, #3a4030, #2b3226);
  box-shadow: 0 6px 16px rgb(0 0 0 / 18%), inset 0 1px rgb(255 255 255 / 4%);
  transform: translateY(-1px);
}

.v2-page .module-card.selected,
.v2-page .item-card.selected,
.v2-module-card.is-selected,
.v2-module-card.selected,
.v2-item-card.is-equipped {
  border-color: #c6a361;
  background:
    linear-gradient(110deg, rgb(215 177 104 / 11%), transparent 43%),
    linear-gradient(145deg, #3d402e, #2c3225);
  box-shadow: inset 0 0 0 1px rgb(225 183 108 / 9%);
}

.v2-page .module-card.selected::before,
.v2-page .item-card.selected::before,
.v2-module-card.is-selected::before,
.v2-module-card.selected::before,
.v2-item-card.is-equipped::before {
  background: var(--v2-amber);
  opacity: 1;
  box-shadow: none;
}

.v2-page .module-card:disabled {
  cursor: default;
  transform: none;
}

.v2-page .card-actions,
.v2-item-actions {
  gap: 8px;
  margin-top: 13px;
}

.v2-page .card-actions .button,
.v2-item-actions .button { flex: 1 1 92px; }

.v2-page .item-card > .button {
  width: 100%;
  margin-top: 13px;
}

.v2-page [data-lock] { color: #d0cfb9; }
.v2-page [data-sell] { border-color: #8c6c50; color: #e3c28e; }
.v2-page [data-buyback] { border-color: #7b805d; }

.v2-card-badge {
  padding: 4px 7px;
  border-radius: 4px;
  background: #454b34;
  color: #e0d7aa;
  font-size: 10px;
}

.v2-item-meta,
.v2-item-price { font-size: 12px; }
.v2-item-price { color: var(--v2-amber); }

#formation-modules > p,
#cannon-inventory > p,
#shop-inventory > p,
#buyback-list > p,
.v2-shop-grid > p,
.v2-empty-state {
  padding: 23px 16px;
  border-color: #596049;
  border-radius: 6px;
  background: rgb(20 25 18 / 42%);
  color: #b8baa6;
  font-size: 13px;
}

/* Cannon configuration */
.v2-cannon-layout {
  grid-template-columns: minmax(310px, .8fr) minmax(0, 1.45fr);
  gap: 20px;
}

.v2-cannon-spec,
.v2-cannon-parts,
.v2-stock-section,
.v2-shop-inventory { padding: 19px; }

.v2-cannon-stats { gap: 12px; }

.v2-cannon-stats .stat-row { gap: 8px; }

.v2-cannon-stats .stat-row span {
  padding: 11px 12px;
  border-color: #4d5642;
  border-radius: 5px;
  background: #1b211a;
  color: #d4d4c0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.v2-cannon-stats .stat-row:first-child span:first-child {
  border-color: #817c54;
  color: #e1c98d;
}

#upgrade-core { margin-top: 2px; }

.v2-stat {
  border-color: #4c5541;
  border-radius: 5px;
  background: #1b211a;
}

.v2-component-slot {
  border-color: #596149;
  border-radius: 6px;
  background: #2a3024;
}

/* Shop: stock, recoveries, and secured inventory have distinct hierarchy */
.v2-shop-message {
  margin: -4px 0 19px;
  padding: 10px 13px;
  border-left: 3px solid #8d835b;
  background: #1b2119;
  color: #c8c7b1;
}

.v2-shop-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(285px, .75fr);
  gap: 19px;
}

.v2-shop-offers { gap: 17px; }

.v2-stock-section { border-top-color: #74795a; }

.v2-rotating-stock {
  border-color: #6f694b;
  background:
    linear-gradient(120deg, rgb(173 144 82 / 8%), transparent 38%),
    linear-gradient(145deg, #323427, #24291f);
}

.v2-rotating-stock .eyebrow { color: #d2b77d; }

.v2-shop-inventory {
  top: 16px;
  border-top-color: #8b8057;
  background: linear-gradient(150deg, #2b3025, #20261e);
}

.v2-shop-inventory .v2-subsection-heading:not(:first-child) {
  margin-top: 22px;
  padding-top: 19px;
  border-top-color: #4e5642;
}

#shop-inventory {
  max-height: 620px;
  padding-right: 5px;
  scrollbar-color: #697056 #171c15;
}

/* Deployment controls */
.v2-operation-panel {
  padding: 24px 26px;
  border-color: #676b50 !important;
  background:
    radial-gradient(ellipse at 93% 0%, rgb(139 134 81 / 10%), transparent 30%),
    linear-gradient(145deg, #292f23, #1d231b) !important;
}

.v2-level-list { gap: 11px; }

.v2-page .level-button {
  min-height: 84px;
  padding: 15px;
  border-color: #555e47;
  border-radius: 6px;
  background: linear-gradient(145deg, #2b3226, #22281f);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
}

.v2-page .level-button strong {
  color: #e8e6d8;
  font-size: 14px;
  line-height: 1.4;
}

.v2-page .level-button span {
  margin-top: 7px;
  color: #b2b5a1;
  font-size: 12px;
  line-height: 1.4;
}

.v2-page .level-button:hover:not(:disabled) {
  border-color: #85896a;
  background: linear-gradient(145deg, #393f2e, #293024);
  box-shadow: 0 6px 15px rgb(0 0 0 / 18%);
}

.v2-page .level-button.selected {
  border-color: #c7a463;
  background: linear-gradient(145deg, #414231, #2d3326);
  box-shadow: inset 3px 0 #d3aa64;
}

.v2-page .level-button.selected strong { color: #f1d9a5; }
.v2-page .level-button.selected span { color: #ccc7aa; }

.v2-level-footer {
  gap: 26px;
  margin-top: 20px;
  padding-top: 20px;
  border-top-color: #505743;
}

.v2-selected-label {
  color: #b2b49e;
  font-size: 10px;
}

#selected-level-name {
  color: #efeddf;
  font-size: 19px;
}

.v2-level-footer p {
  color: #b6b8a4;
  font-size: 13px;
}

.v2-page .v2-deploy-button {
  min-width: 190px;
  min-height: 48px;
  padding-inline: 23px;
  font-size: 14px;
}

/* Live operation telemetry stays practical and readable */
.v2-raid-heading {
  gap: 22px;
  margin-bottom: 18px;
}

.v2-raid-heading h2 {
  font-size: clamp(22px, 2.6vw, 29px);
  font-weight: 680;
}

.v2-live-indicator {
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid #776847;
  border-radius: 5px;
  background: #2d2b1f;
  color: #e2cea0;
  font-size: 11px;
}

.v2-live-indicator > span {
  width: 7px;
  height: 7px;
  background: #ddb368;
  box-shadow: 0 0 0 3px rgb(221 179 104 / 9%);
}

.v2-raid-hud {
  margin-bottom: 15px;
  border-color: #555e48;
  background: #20261e;
}

.v2-raid-hud .hud-item {
  padding: 16px 20px;
  border-right-color: #4b5340;
}

.v2-raid-hud .hud-item:first-child { box-shadow: inset 3px 0 #a76b55; }
.v2-raid-hud .hud-item:nth-child(3) { box-shadow: inset 3px 0 #a38750; }
.v2-raid-hud .hud-item:nth-child(4) { box-shadow: inset 3px 0 #78855e; }

.v2-raid-hud .hud-item span {
  margin-bottom: 4px;
  color: #b9baa6;
  font-size: 10px;
  letter-spacing: .07em;
}

.v2-raid-hud .hud-item strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

#raid-lives { color: #f0a48d; }
#raid-wave { color: #edebdd; }
#raid-scrap { color: #e9c47f; }
#raid-loot-count { color: #c1cda6; }

.v2-page .boss-health {
  padding: 13px 17px;
  border-color: #8f604e;
  background: linear-gradient(120deg, #38271f, #22251d);
}

.boss-label { color: #efc0a5; font-size: 13px; }
.boss-track { height: 10px; border-color: #674739; background: #211711; }
#boss-fill { background: linear-gradient(90deg, #a95f46, #d9946d, #e4bc78); box-shadow: none; }

/* No texture, tint, glow, or decoration is placed over either battlefield. */
.v2-raid-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 15px;
}

.v2-raid-board {
  padding: 9px;
  border-color: #626a50;
  background: #11150f !important;
  box-shadow: 0 15px 36px rgb(0 0 0 / 28%), 0 0 0 3px rgb(14 18 13 / 65%);
}

.v2-raid-board::after {
  border-color: rgb(207 205 161 / 5%);
  border-radius: 3px;
}

.v2-raid-console {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-color: #555e47;
  background: #20261e;
}

.v2-cannon-telemetry,
.v2-carried-loot,
.v2-extraction-panel { padding: 19px; }

.v2-cannon-telemetry {
  border-bottom-color: #4b5340;
  background: linear-gradient(145deg, rgb(99 105 69 / 11%), transparent);
}

.v2-console-heading { margin-bottom: 15px; }
.v2-meter + .v2-meter { margin-top: 17px; }

.v2-meter-label {
  margin-bottom: 7px;
  color: #bdbeab;
  font-size: 12px;
}

.v2-meter-label strong {
  color: #edebdd;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.v2-meter-track {
  height: 11px;
  border-color: #4b5441;
  border-radius: 3px;
  background: #11160f;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 42%);
}

.v2-meter-fill { border-radius: 1px; }

.v2-heat-bar .v2-meter-fill,
#raid-heat-fill {
  background: linear-gradient(90deg, #c6a45c, #d88b55, #d9785e);
  box-shadow: none;
}

#raid-heat-fill.overheated,
.v2-heat-bar.is-overheated .v2-meter-fill {
  background: linear-gradient(90deg, #dc8068, #f0ae91);
  animation: v2-wilderness-overheat .7s ease-in-out infinite alternate;
}

.v2-charge-bar .v2-meter-label strong { color: #a6dfe7; }

.v2-charge-bar .v2-meter-fill,
#raid-charge-fill {
  background: linear-gradient(90deg, #3f9fac, #78d7e5);
  box-shadow: 0 0 7px rgb(120 215 229 / 18%);
}

/* Carried salvage and insurance */
.v2-carried-loot { border-bottom-color: #4b5340; }

.v2-loot-heading > span {
  padding: 4px 7px;
  border-color: #7c6945;
  border-radius: 4px;
  background: #343020;
  color: #e5c584;
  font-size: 10px;
}

.v2-loot-grid {
  gap: 8px;
  max-height: 178px;
  scrollbar-color: #697056 #171c15;
}

.v2-page .loot-chip {
  min-height: 42px;
  padding: 9px 10px;
  border-color: #535d46;
  border-radius: 5px;
  background: #2b3226;
  color: #dedecd;
  font-size: 12px;
}

.v2-page .loot-chip:hover {
  border-color: #85896a;
  background: #393f2f;
}

.v2-page .loot-chip.insured {
  border-color: #c09c5c;
  background: linear-gradient(145deg, #403a26, #303122);
  color: #f0d397;
  box-shadow: inset 3px 0 #d0a75f;
}

#raid-carried-items > span {
  border-color: #535d46;
  border-radius: 5px;
  color: #b4b7a2;
}

.v2-insured-note {
  margin-top: 11px;
  padding: 10px 11px;
  border-color: #6c6242;
  border-radius: 5px;
  background: #2b2a1e;
}

.v2-insured-note strong { color: #e3cc94; font-size: 12px; }
.v2-insured-note span { color: #c0bda7; font-size: 11px; }

/* Extraction uses amber progress, never laser cyan */
.v2-extraction-panel {
  margin-top: auto;
  border-top: 0;
  background: linear-gradient(160deg, rgb(119 105 60 / 11%), transparent);
}

.v2-extraction-status {
  min-height: 42px;
  margin-bottom: 11px;
  color: #c2c3af;
  font-size: 12px;
  line-height: 1.55;
}

.v2-extraction-progress {
  height: 8px;
  margin-bottom: 13px;
  border-color: #555b43;
  border-radius: 3px;
  background: #12160f;
}

#extraction-fill {
  background: linear-gradient(90deg, #a7874e, #e2ba70);
  box-shadow: none;
}

.v2-extraction-panel.is-extracting #extraction-fill {
  background: linear-gradient(90deg, #c09b59, #efd08e);
}

.v2-page .v2-extract-button { min-height: 46px; }

.v2-page .v2-abandon-button {
  min-height: 38px;
  margin-top: 8px;
  color: #d0aa98;
  font-size: 12px;
}

.v2-page .v2-abandon-button:hover:not(:disabled) {
  border-color: #94644f;
  background: #36251e;
  color: #f1ad94;
}

.v2-control-help {
  gap: 13px 22px;
  margin-top: 15px;
  padding: 13px 17px;
  color: #bdbeaa;
  font-size: 12px;
}

.v2-control-help kbd {
  padding: 4px 7px;
  border-color: #5b634d;
  border-radius: 4px;
  background: #30362a;
  color: #e4e2d3;
  font-size: 10px;
}

.v2-control-help .v2-control-warning { color: #ddc18a; }

/* Operation settlement */
.v2-result-card {
  max-width: 740px;
  margin: 40px auto;
  padding: clamp(28px, 5vw, 44px);
  border-color: #747657 !important;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(143 139 83 / 10%), transparent 39%),
    linear-gradient(145deg, #2c3225, #1e241c) !important;
}

.v2-result-emblem {
  width: 64px;
  height: 64px;
  border-color: #838662;
  border-radius: 8px;
  background: #293023;
  box-shadow: 0 0 0 7px rgb(190 187 133 / 3%);
  transform: rotate(45deg);
}

.v2-result-emblem span {
  border-radius: 70% 18% 65% 25%;
  background: linear-gradient(145deg, #d6d5a7, #8f9f72);
  box-shadow: none;
}

#result-title { font-size: clamp(25px, 3.5vw, 32px); }
#result-subtitle { color: #bdbfab; font-size: 14px; }
.v2-result-summary { border-top-color: #535b45; }

.v2-page .reward-row,
.v2-result-row {
  padding: 12px 5px;
  border-bottom-color: #4b5340;
  color: #bdbeaa;
  font-size: 13px;
}

.v2-page .reward-row span:last-child,
.v2-result-row strong { color: #e8e6d6; }

.v2-page .reward-row.lost span:last-child,
.v2-result-row.is-lost strong { color: var(--v2-coral); }

.v2-page .reward-row:not(.lost) span:last-child,
.v2-result-row.is-secured strong { color: #cbd6ae; }

.v2-result-actions { gap: 11px; }
.v2-result-actions .button { min-width: 155px; }

.v2-footer {
  padding: 15px 0 28px;
  color: #949886;
  font-size: 12px;
}

.v2-page .toast {
  padding: 12px 19px;
  border-color: #827453;
  border-radius: 6px;
  background: #34362a;
  box-shadow: 0 12px 32px rgb(0 0 0 / 38%), inset 3px 0 #d2a75f;
  color: #efeddf;
  font-size: 13px;
}

@keyframes v2-wilderness-overheat {
  from { opacity: .76; }
  to { opacity: 1; }
}

@media (min-width: 1500px) {
  .v2-raid-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}

@media (max-width: 1180px) {
  .v2-app { width: min(1420px, calc(100% - 40px)); }
  .v2-formation-layout,
  .v2-cannon-layout { grid-template-columns: 1fr; }
  .v2-module-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: none; }
  .v2-shop-layout { grid-template-columns: 1fr; }
  .v2-shop-inventory { position: static; }
  #shop-inventory { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: none; }
  .v2-raid-layout { grid-template-columns: 1fr; }
  .v2-raid-console { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .v2-cannon-telemetry,
  .v2-carried-loot { border-bottom: 0; }
  .v2-cannon-telemetry { border-right: 1px solid #4b5340; }
  .v2-carried-loot { border-right: 1px solid #4b5340; }
  .v2-extraction-panel { margin: 0; }
  .v2-loot-grid { grid-template-columns: 1fr; max-height: 156px; }
}

@media (max-width: 900px) {
  .v2-level-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-control-help .v2-control-warning { flex-basis: 100%; margin-left: 0; }
  .v2-raid-console { grid-template-columns: 1fr 1fr; }
  .v2-cannon-telemetry { border-bottom: 1px solid #4b5340; }
  .v2-carried-loot { border-right: 0; border-bottom: 1px solid #4b5340; }
  .v2-extraction-panel { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body.v2-page { background-attachment: scroll; }
  .v2-app { width: min(100% - 28px, 1420px); }
  .v2-page .scene { padding-top: 21px; }
  .v2-header { align-items: flex-start; gap: 18px; padding: 23px 0 20px; }
  .v2-brand h1 { font-size: clamp(25px, 6vw, 33px); }
  .v2-brand-subtitle { display: block; font-size: 12px; }
  .v2-wallet-block { min-width: 145px; margin-top: 20px; padding: 10px 13px; }
  #credits { font-size: 21px; }
  .v2-workshop-intro { align-items: flex-start; padding: 21px; }
  .v2-security-note { white-space: normal; }
  .v2-tabs { gap: 5px; padding-inline: 7px; }
  .v2-tab { flex: 1; justify-content: center; min-height: 53px; padding: 10px 8px; font-size: 12px; }
  .v2-tab-index { display: none; }
  .v2-tab-panel { padding: 21px 17px; }
  .v2-section-heading { align-items: flex-start; gap: 9px; }
  .v2-section-heading > span { max-width: none; text-align: left; }
  .v2-section-heading h2 { font-size: 22px; }
  .v2-formation-board { padding: 10px; }
  .v2-item-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .v2-operation-panel { padding: 21px; }
  .v2-level-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-level-footer { align-items: stretch; }
  .v2-page .v2-deploy-button { width: 100%; }
  .v2-raid-heading { align-items: flex-start; flex-direction: column; gap: 11px; }
  .v2-raid-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-raid-hud .hud-item:nth-child(2) { border-right: 0; }
  .v2-raid-hud .hud-item:nth-child(-n + 2) { border-bottom: 1px solid #4b5340; }
  .v2-raid-console { display: flex; }
  .v2-cannon-telemetry,
  .v2-carried-loot { border-right: 0; border-bottom: 1px solid #4b5340; }
  .v2-extraction-panel { padding-top: 19px; }
  .v2-loot-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: none; }
  .v2-control-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .v2-control-help > span { align-items: flex-start; flex-wrap: wrap; }
  .v2-control-help .v2-control-warning { grid-column: 1 / -1; }
  .v2-result-actions { flex-direction: column; }
  .v2-result-actions .button { width: 100%; }
}

@media (max-width: 480px) {
  .v2-app { width: min(100% - 20px, 1420px); }
  .v2-header { flex-direction: column; gap: 15px; }
  .v2-brand .eyebrow { font-size: 9px; letter-spacing: .13em; }
  .v2-brand h1 { font-size: 27px; }
  .v2-brand-subtitle { font-size: 12px; }
  .v2-wallet-block { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; margin: 0; text-align: left; }
  .v2-wallet-label { margin: 0; }
  #credits { font-size: 20px; text-align: right; }
  .v2-page section.panel { padding: 19px 15px; }
  .v2-page section.v2-workshop-console { padding: 0; }
  .v2-workshop-intro { flex-direction: column; gap: 15px; }
  .v2-workshop-intro h2 { font-size: 22px; }
  .v2-workshop-intro p:last-child { font-size: 13px; }
  .v2-tabs { padding-inline: 4px; }
  .v2-tab { min-height: 51px; padding-inline: 5px; font-size: 11px; }
  .v2-tab-panel { padding: 19px 11px; }
  .v2-subsection-heading { align-items: flex-start; }
  .v2-subsection-heading h3,
  .v2-console-heading h3 { font-size: 16px; }
  .v2-item-grid,
  .v2-module-grid,
  #shop-inventory { grid-template-columns: 1fr; }
  .v2-page button.module-card { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-cannon-spec,
  .v2-cannon-parts,
  .v2-stock-section,
  .v2-shop-inventory { padding: 14px; }
  .v2-cannon-stats .stat-row { grid-template-columns: 1fr 1fr; }
  .v2-operation-panel { padding: 19px 15px; }
  .v2-level-list { grid-template-columns: 1fr; }
  .v2-page .level-button { min-height: 74px; }
  .v2-raid-hud .hud-item { padding: 13px; }
  .v2-raid-hud .hud-item strong { font-size: 19px; }
  .v2-raid-board { padding: 5px; }
  .v2-raid-board::after { inset: 5px; }
  .v2-cannon-telemetry,
  .v2-carried-loot,
  .v2-extraction-panel { padding: 17px 15px; }
  .v2-control-help { grid-template-columns: 1fr; }
  .v2-control-help .v2-control-warning { grid-column: auto; }
  .v2-result-card { margin: 23px auto; }
  .v2-page .reward-row,
  .v2-result-row { gap: 12px; font-size: 12px; }
}

@media (pointer: coarse) {
  .v2-page .button,
  .v2-page .loot-chip { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-page *,
  .v2-page *::before,
  .v2-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
