/*
 * Mosslight: Salvage Line — visual polish layer
 * Loaded after v2.css. This file only refines presentation; all markup,
 * element IDs, and runtime state classes remain unchanged.
 */

:root {
  --v2-ink: #f0f6e9;
  --v2-muted: #a7b8ac;
  --v2-dim: #81978a;
  --v2-moss: #c4ef91;
  --v2-moss-bright: #dcffad;
  --v2-laser: #79e6c1;
  --v2-amber: #f0ca79;
  --v2-coral: #ff9b8f;
  --v2-surface: #111e18;
  --v2-surface-raised: #17271f;
  --v2-surface-inset: #0a1410;
  --v2-border: #304b3d;
  --v2-border-strong: #49684f;
  --v2-shadow: 0 18px 45px rgb(0 0 0 / 24%);
}

body.v2-page {
  background:
    linear-gradient(180deg, rgb(5 12 9 / 34%) 0%, #08110d 72%, #07100c 100%),
    radial-gradient(ellipse at 50% -12%, rgb(112 164 105 / 18%), transparent 48%),
    radial-gradient(ellipse at 3% 34%, rgb(53 120 91 / 13%), transparent 38%),
    radial-gradient(ellipse at 98% 24%, rgb(121 230 193 / 8%), transparent 34%),
    url("./assets/workshop-atmosphere.jpg") center top / min(100%, 1920px) auto no-repeat fixed,
    #08110d;
  color: var(--v2-ink);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.v2-page::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgb(196 239 145 / 2.5%) 1px, transparent 1px) 0 0 / 96px 100%,
    linear-gradient(180deg, transparent 70%, #08110d 100%);
  mask-image: none;
}

.v2-app {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 64px));
}

.v2-page main { min-height: 68vh; }
.v2-page .scene { padding: 30px 0 16px; }
.v2-page ::selection { background: #62884d; color: #fff; }

/* Header and currency */
.v2-header {
  position: relative;
  gap: 36px;
  padding: 34px 0 28px;
  border-bottom: 1px solid rgb(121 230 193 / 18%);
}

.v2-header::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 148px;
  height: 2px;
  background: linear-gradient(90deg, var(--v2-laser), transparent);
  box-shadow: 0 0 12px rgb(121 230 193 / 24%);
  content: "";
}

.v2-brand h1 {
  color: #f3f8ed;
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 760;
  letter-spacing: .025em;
  line-height: 1.08;
  text-shadow: 0 2px 22px rgb(0 0 0 / 45%);
}

.v2-brand .eyebrow {
  margin-bottom: 12px;
  color: var(--v2-laser);
  font-size: 11px;
  letter-spacing: .2em;
}

.v2-brand-subtitle {
  margin-top: 12px;
  color: #b0c0b3;
  font-size: 14px;
  letter-spacing: .04em;
}

.v2-wallet-block {
  position: relative;
  min-width: 174px;
  padding: 14px 18px;
  border: 1px solid #625a3c;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(49 46 28 / 94%), rgb(20 28 20 / 96%));
  box-shadow: inset 3px 0 0 rgb(240 202 121 / 55%), 0 10px 28px rgb(0 0 0 / 20%);
}

.v2-wallet-label {
  margin-bottom: 4px;
  color: #c4bfa7;
  font-size: 11px;
  letter-spacing: .13em;
}

#credits {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #ffe09a;
  font-size: 25px;
  line-height: 1.2;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

#credits::before { content: none; }

/* Shared surfaces and type */
.v2-page .panel {
  border-color: var(--v2-border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgb(20 34 27 / 98%), rgb(12 24 18 / 98%));
  box-shadow: var(--v2-shadow), inset 0 1px rgb(255 255 255 / 3%);
}

.v2-page .eyebrow {
  color: #9bcf86;
  font-size: 11px;
  line-height: 1.35;
}

.v2-page h2,
.v2-page h3,
.v2-page h4,
.v2-page strong { letter-spacing: -.01em; }

.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 var(--v2-moss-bright);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgb(121 230 193 / 14%);
}

.v2-page .button {
  min-height: 42px;
  border-color: #466452;
  border-radius: 8px;
  background: linear-gradient(180deg, #294235, #20372b);
  color: #eef6e8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: inset 0 1px rgb(255 255 255 / 4%);
  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: #6f9270;
  background: linear-gradient(180deg, #355342, #294534);
  box-shadow: 0 6px 18px rgb(0 0 0 / 18%), inset 0 1px rgb(255 255 255 / 5%);
  transform: translateY(-1px);
}

.v2-page .button:active:not(:disabled) { transform: translateY(0); }

.v2-page .button.primary {
  border-color: #c9f39a;
  background: linear-gradient(135deg, #d3f7a4, #a9d97b);
  color: #142416;
  box-shadow: 0 7px 20px rgb(143 193 101 / 13%), inset 0 1px rgb(255 255 255 / 40%);
}

.v2-page .button.primary:hover:not(:disabled) {
  border-color: #e2ffc0;
  background: linear-gradient(135deg, #e0ffb9, #b8e68b);
  box-shadow: 0 8px 24px rgb(143 193 101 / 22%);
}

.v2-page .button.ghost {
  border-color: #3a5545;
  background: transparent;
  color: #b3c3b6;
  box-shadow: none;
}

.v2-page .button:disabled,
.v2-page .module-card:disabled,
.v2-page .level-button:disabled {
  opacity: .5;
  filter: saturate(.55);
}

.v2-page .button.compact {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
}

/* Workshop introduction */
.v2-workshop-intro {
  gap: 32px;
  margin-bottom: 20px;
  padding: 26px 28px;
  border-color: #426149 !important;
  background:
    linear-gradient(90deg, rgb(121 230 193 / 8%), transparent 24%),
    radial-gradient(circle at 88% 20%, rgb(196 239 145 / 10%), transparent 29%),
    linear-gradient(110deg, #1b3427, #101e17 74%) !important;
}

.v2-workshop-intro::before {
  position: absolute;
  top: 0;
  left: 28px;
  width: 96px;
  height: 2px;
  background: var(--v2-laser);
  box-shadow: 0 0 14px rgb(121 230 193 / 35%);
  content: "";
}

.v2-workshop-intro::after {
  top: -78px;
  right: 7%;
  width: 220px;
  height: 220px;
  border-color: rgb(196 239 145 / 9%);
  box-shadow: 0 0 0 36px rgb(196 239 145 / 2.5%), 0 0 0 72px rgb(196 239 145 / 1.5%);
}

.v2-workshop-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 680;
}

.v2-workshop-intro p:last-child {
  max-width: 770px;
  color: #b4c4b7;
  font-size: 14px;
  line-height: 1.7;
}

.v2-security-note {
  gap: 10px;
  padding: 10px 14px;
  border-color: rgb(121 230 193 / 27%);
  background: #0d1c15;
  color: #c2d8ca;
  font-size: 12px;
}

.v2-status-dot {
  width: 8px;
  height: 8px;
  background: #8ce4b9;
  box-shadow: 0 0 0 4px rgb(140 228 185 / 8%), 0 0 12px rgb(140 228 185 / 45%);
}

/* Workshop tabs */
.v2-page section.v2-workshop-console {
  position: relative;
  overflow: hidden;
  border-color: #3b5946;
}

.v2-tabs {
  gap: 8px;
  padding: 10px 14px 0;
  border-bottom-color: #334e3e;
  background: #0c1712;
}

.v2-tab {
  gap: 12px;
  min-height: 58px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: #a1b3a6;
  font-size: 14px;
  font-weight: 700;
}

.v2-tab:hover {
  border-color: rgb(121 230 193 / 14%);
  background: #13241b;
  color: #eef6e8;
}

.v2-tab.is-active,
.v2-tab.active,
.v2-tab[aria-selected="true"] {
  border-color: #3f604a;
  border-bottom-color: #14231b;
  background: linear-gradient(180deg, #1b3024, #14231b);
  color: var(--v2-moss-bright);
  box-shadow: inset 0 2px var(--v2-laser), 0 -8px 24px rgb(121 230 193 / 3%);
}

.v2-tab-index {
  color: #829b88;
  font-size: 11px;
  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: var(--v2-laser); }

.v2-tab-panel { padding: 30px; }

.v2-section-heading {
  gap: 24px;
  margin-bottom: 24px;
}

.v2-section-heading h2 {
  font-size: 25px;
  font-weight: 680;
}

.v2-section-heading > span {
  max-width: 420px;
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.6;
}

.v2-subsection-heading {
  gap: 16px;
  margin-bottom: 17px;
}

.v2-subsection-heading h3,
.v2-console-heading h3 {
  color: #edf5e7;
  font-size: 17px;
  font-weight: 680;
}

.v2-subsection-heading .eyebrow,
.v2-console-heading .eyebrow {
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .16em;
}

.v2-subsection-heading > span {
  color: #a7b9aa;
  font-size: 12px;
}

/* Formation and module rack */
.v2-formation-layout {
  grid-template-columns: minmax(0, 2.15fr) minmax(270px, .85fr);
  gap: 22px;
}

.v2-formation-board,
.v2-module-tray,
.v2-cannon-spec,
.v2-cannon-parts,
.v2-stock-section,
.v2-shop-inventory {
  border-color: #314d3c;
  border-radius: 12px;
  background: linear-gradient(150deg, #14251c, #101e17);
  box-shadow: inset 0 1px rgb(255 255 255 / 2.5%);
}

.v2-formation-board { padding: 16px; }
.v2-module-tray { padding: 19px; }

.v2-board-topline {
  margin-bottom: 14px;
  color: #a0b4a4;
  font-size: 11px;
  letter-spacing: .1em;
}

#formation-capacity {
  padding: 6px 10px;
  border-color: #4a6a4b;
  border-radius: 6px;
  background: #1d3323;
  color: #d2f4a6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#formation-capacity.is-over-capacity {
  border-color: #92564d;
  background: #38221d;
  color: #ffada2;
}

.v2-canvas-frame {
  border-color: #416049;
  border-radius: 8px;
  background: #08120d;
  box-shadow: 0 0 0 3px rgb(7 16 11 / 70%), inset 0 0 26px rgb(0 0 0 / 35%);
}

#formation-canvas,
#raid-canvas {
  border-radius: 6px;
  background: #0a1510;
}

.v2-formation-instructions {
  margin-top: 15px;
  color: #acbdb0;
  font-size: 13px;
  line-height: 1.65;
}

.v2-inline-message {
  min-height: 22px;
  margin-top: 11px;
  color: #91dfc2;
  font-size: 13px;
}

.v2-inline-message.is-error { color: var(--v2-coral); }
.v2-inline-message.is-success { color: var(--v2-moss); }

.v2-item-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.v2-module-grid {
  grid-template-columns: 1fr;
  max-height: 500px;
  padding-right: 5px;
  scrollbar-color: #52715a #0d1812;
}

/* Runtime module, inventory, and shop cards */
.v2-page .module-card,
.v2-page .item-card,
.v2-module-card,
.v2-item-card {
  position: relative;
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #365342;
  border-radius: 10px;
  background: linear-gradient(145deg, #1c3025, #14251c);
  color: var(--v2-ink);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
  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 {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: #4b7155;
  content: "";
  opacity: .55;
}

.v2-page .module-card strong,
.v2-page .item-card strong,
.v2-module-card h4,
.v2-item-card h4 {
  display: block;
  margin: 0;
  color: #eef6e8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.v2-page .module-card > span,
.v2-page .item-card > span {
  display: block;
  color: #a8baac;
  font-size: 12px;
  line-height: 1.45;
}

.v2-page .module-card > span { text-align: right; }

.v2-page .module-card small {
  grid-column: 1 / -1;
  color: #91a797;
  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: #668764;
  background: linear-gradient(145deg, #243c2c, #192c20);
  box-shadow: 0 8px 20px rgb(0 0 0 / 16%), 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: #b7e888;
  background: linear-gradient(145deg, #2a452f, #1b3021);
  box-shadow: inset 0 0 0 1px rgb(196 239 145 / 12%), 0 0 20px rgb(196 239 145 / 5%);
}

.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-moss);
  opacity: 1;
  box-shadow: 0 0 10px rgb(196 239 145 / 30%);
}

.v2-page .module-card:disabled {
  cursor: default;
  transform: none;
}

.v2-page .card-actions,
.v2-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.v2-page .card-actions .button,
.v2-item-actions .button { flex: 1 1 92px; }

.v2-page .item-card > .button {
  width: 100%;
  margin-top: 14px;
}

.v2-page [data-lock] { color: #c4d0c5; }
.v2-page [data-sell] { border-color: #746444; color: #eed293; }
.v2-page [data-buyback] { border-color: #66835c; }

.v2-card-badge {
  padding: 4px 7px;
  background: #2d4934;
  color: #d1f2a6;
  font-size: 10px;
}

.v2-item-meta,
.v2-item-price { font-size: 12px; }

#formation-modules > p,
#cannon-inventory > p,
#shop-inventory > p,
#buyback-list > p,
.v2-shop-grid > p,
.v2-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 16px;
  border: 1px dashed #3c5946;
  border-radius: 9px;
  background: rgb(8 19 13 / 32%);
  color: #a9baac;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* Cannon specifications */
.v2-cannon-layout {
  grid-template-columns: minmax(310px, .8fr) minmax(0, 1.45fr);
  gap: 22px;
}

.v2-cannon-spec,
.v2-cannon-parts,
.v2-stock-section,
.v2-shop-inventory { padding: 20px; }

.v2-cannon-stats { gap: 12px; }

.v2-cannon-stats .stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.v2-cannon-stats .stat-row span {
  padding: 11px 12px;
  border: 1px solid #314c3b;
  border-radius: 7px;
  background: #0f1e16;
  color: #d2dfd1;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.v2-cannon-stats .stat-row:first-child span:first-child {
  border-color: #58754f;
  color: var(--v2-moss);
}

#upgrade-core {
  width: 100%;
  margin-top: 2px;
}

.v2-stat { padding: 12px; }
.v2-stat span { font-size: 11px; }
.v2-stat strong { font-size: 17px; }

/* Shop */
.v2-shop-message {
  margin: -4px 0 20px;
  padding: 11px 13px;
  border-left: 2px solid #567c60;
  background: #0e1d15;
  color: #b8cabd;
}

.v2-shop-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(285px, .75fr);
  gap: 20px;
}

.v2-shop-offers { gap: 18px; }

.v2-rotating-stock {
  border-color: #5c5a3d;
  background: linear-gradient(145deg, #252b1d, #142219);
}

.v2-rotating-stock .eyebrow { color: var(--v2-amber); }

.v2-shop-inventory {
  top: 18px;
  border-top-color: #5b7557;
}

.v2-shop-inventory .v2-subsection-heading:not(:first-child) {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #304b3b;
}

#shop-inventory {
  max-height: 620px;
  padding-right: 5px;
  scrollbar-color: #52715a #0d1812;
}

/* Operation selection */
.v2-operation-panel {
  padding: 26px 28px;
  border-color: #486344 !important;
  background:
    radial-gradient(circle at 92% 0%, rgb(196 239 145 / 5%), transparent 30%),
    linear-gradient(145deg, #14251b, #0f1e16) !important;
}

.v2-level-list { gap: 12px; }

.v2-page .level-button {
  min-height: 88px;
  padding: 16px;
  border-color: #395743;
  border-radius: 9px;
  background: linear-gradient(145deg, #192c21, #132219);
  box-shadow: inset 0 1px rgb(255 255 255 / 2%);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.v2-page .level-button strong {
  color: #e6f0e1;
  font-size: 14px;
  line-height: 1.4;
}

.v2-page .level-button span {
  margin-top: 8px;
  color: #a2b5a6;
  font-size: 12px;
  line-height: 1.4;
}

.v2-page .level-button:hover:not(:disabled) {
  border-color: #6b8b63;
  background: linear-gradient(145deg, #243b29, #192d1f);
  box-shadow: 0 7px 18px rgb(0 0 0 / 16%);
}

.v2-page .level-button.selected {
  border-color: #b9e989;
  background: linear-gradient(145deg, #2c472f, #1d3322);
  box-shadow: inset 3px 0 var(--v2-moss), 0 0 20px rgb(196 239 145 / 5%);
}

.v2-page .level-button.selected strong { color: #e4ffc5; }
.v2-page .level-button.selected span { color: #bfd2b6; }

.v2-level-footer {
  gap: 28px;
  margin-top: 22px;
  padding-top: 22px;
  border-top-color: #354f3c;
}

.v2-selected-label {
  margin-bottom: 6px;
  color: #9eb2a2;
  font-size: 11px;
}

#selected-level-name {
  color: #eff8e8;
  font-size: 20px;
}

.v2-level-footer p {
  color: #a8baac;
  font-size: 13px;
}

.v2-page .v2-deploy-button {
  min-width: 196px;
  min-height: 50px;
  padding-inline: 24px;
  font-size: 14px;
}

/* Live operation heading and HUD */
.v2-raid-heading {
  gap: 24px;
  margin-bottom: 20px;
}

.v2-raid-heading h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 680;
}

.v2-live-indicator {
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #675838;
  border-radius: 20px;
  background: #211f14;
  color: #e4cd99;
  font-size: 12px;
}

.v2-live-indicator > span {
  width: 8px;
  height: 8px;
  background: #f1c66e;
  box-shadow: 0 0 0 4px rgb(241 198 110 / 8%), 0 0 12px rgb(241 198 110 / 42%);
}

.v2-raid-hud {
  margin-bottom: 16px;
  border-color: #3c5844;
  background: #101f17;
}

.v2-raid-hud .hud-item {
  position: relative;
  padding: 17px 22px;
  border-right-color: #314b3a;
}

.v2-raid-hud .hud-item:first-child { box-shadow: inset 2px 0 #b5655c; }
.v2-raid-hud .hud-item:nth-child(3) { box-shadow: inset 2px 0 #8b7845; }
.v2-raid-hud .hud-item:nth-child(4) { box-shadow: inset 2px 0 #4e9d84; }

.v2-raid-hud .hud-item span {
  margin-bottom: 5px;
  color: #a9baac;
  font-size: 11px;
  letter-spacing: .07em;
}

.v2-raid-hud .hud-item strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

#raid-lives { color: #ffaaa0; }
#raid-wave { color: #e7f2e1; }
#raid-scrap { color: #f4d48a; }
#raid-loot-count { color: #96e4c8; }

.v2-page .boss-health {
  padding: 14px 18px;
  border-color: #80576f;
  background: linear-gradient(120deg, #2d1c28, #171e18);
}

.boss-label { color: #f1c6e1; font-size: 14px; }
.boss-track { height: 11px; border: 1px solid #55374d; background: #1b121a; }
#boss-fill { background: linear-gradient(90deg, #bd659f, #f0b4ce, #f4d58b); }

/* Battlefield stays crisp and visually isolated from decorative effects. */
.v2-raid-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.v2-raid-board {
  padding: 10px;
  border-color: #4a6b4e;
  background: #07110c !important;
  box-shadow: 0 18px 44px rgb(0 0 0 / 30%), 0 0 0 3px rgb(7 17 12 / 70%);
}

.v2-raid-board::after {
  border-color: rgb(196 239 145 / 6%);
  border-radius: 4px;
}

.v2-raid-console {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-color: #3c5945;
  background: #101f17;
}

.v2-cannon-telemetry,
.v2-carried-loot,
.v2-extraction-panel { padding: 20px; }

.v2-cannon-telemetry {
  border-bottom: 1px solid #304a39;
  background: linear-gradient(145deg, rgb(34 54 39 / 48%), transparent);
}

.v2-console-heading { margin-bottom: 16px; }

.v2-meter + .v2-meter { margin-top: 18px; }

.v2-meter-label {
  margin-bottom: 8px;
  color: #b0c0b3;
  font-size: 12px;
}

.v2-meter-label strong {
  color: #edf5e7;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.v2-meter-track {
  height: 12px;
  border-color: #3a5140;
  border-radius: 4px;
  background: #07110c;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 45%);
}

.v2-meter-fill { border-radius: 2px; }

.v2-heat-bar .v2-meter-fill,
#raid-heat-fill {
  background: linear-gradient(90deg, #d7b45f, #ed8c5f, #f07567);
  box-shadow: 0 0 10px rgb(240 117 103 / 20%);
}

#raid-heat-fill.overheated,
.v2-heat-bar.is-overheated .v2-meter-fill {
  background: linear-gradient(90deg, #ff806f, #ffb0a1);
  animation: v2-polish-overheat .65s ease-in-out infinite alternate;
}

.v2-charge-bar .v2-meter-fill,
#raid-charge-fill {
  background: linear-gradient(90deg, #4eb69b, #9fe3aa, #d0f598);
  box-shadow: 0 0 12px rgb(121 230 193 / 24%);
}

/* Loot and insured item state */
.v2-carried-loot {
  border-bottom: 1px solid #304a39;
}

.v2-loot-heading > span {
  padding: 4px 7px;
  border-color: #76633a;
  background: #292516;
  color: #f0cf81;
  font-size: 10px;
  letter-spacing: .05em;
}

.v2-loot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 178px;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-color: #52715a #0d1812;
}

.v2-page .loot-chip {
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #3b5945;
  border-radius: 7px;
  background: #17291e;
  color: #dce8d8;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.v2-page .loot-chip:hover {
  border-color: #7a9363;
  background: #223725;
}

.v2-page .loot-chip.insured {
  border-color: #c4a75d;
  background: linear-gradient(145deg, #38331e, #262719);
  color: #ffe2a0;
  box-shadow: inset 2px 0 #e4c66f;
}

#raid-carried-items > span {
  grid-column: 1 / -1;
  padding: 13px;
  border: 1px dashed #3a5442;
  border-radius: 7px;
  color: #9fb1a3;
  font-size: 12px;
  text-align: center;
}

.v2-insured-note {
  gap: 4px;
  margin-top: 12px;
  padding: 11px 12px;
  border-color: #5d5737;
  background: #211f14;
}

.v2-insured-note strong { color: #ecd594; font-size: 12px; }
.v2-insured-note span { color: #b8b49f; font-size: 11px; line-height: 1.5; }

/* Extraction */
.v2-extraction-panel {
  margin-top: auto;
  border-top: 0;
  background: linear-gradient(160deg, rgb(37 65 45 / 45%), transparent);
}

.v2-extraction-status {
  min-height: 42px;
  margin-bottom: 12px;
  color: #b4c5b7;
  font-size: 12px;
  line-height: 1.55;
}

.v2-extraction-progress {
  height: 8px;
  margin-bottom: 14px;
  border: 1px solid #334d3c;
  border-radius: 3px;
  background: #07110c;
}

#extraction-fill {
  background: linear-gradient(90deg, #60cbb0, #c9f194);
  box-shadow: 0 0 12px rgb(121 230 193 / 26%);
}

.v2-page .v2-extract-button {
  min-height: 46px;
  font-size: 13px;
}

.v2-page .v2-abandon-button {
  min-height: 38px;
  margin-top: 9px;
  color: #c9a9a1;
  font-size: 12px;
}

.v2-page .v2-abandon-button:hover:not(:disabled) {
  border-color: #81544b;
  background: #2c1c18;
  color: #ffaca0;
}

.v2-control-help {
  gap: 14px 24px;
  margin-top: 16px;
  padding: 14px 18px;
  color: #b2c1b5;
  font-size: 12px;
}

.v2-control-help kbd {
  padding: 5px 8px;
  border-color: #46634e;
  background: #1c3023;
  color: #e5f0df;
  font-size: 11px;
}

.v2-control-help .v2-control-warning { color: #e0c582; }

/* Settlement */
.v2-result-card {
  max-width: 760px;
  margin: 48px auto;
  padding: clamp(30px, 5vw, 48px);
  border-color: #58754d !important;
  background:
    radial-gradient(circle at 50% 0%, rgb(196 239 145 / 8%), transparent 38%),
    linear-gradient(145deg, #172b1f, #0f1e16) !important;
}

.v2-result-emblem {
  width: 70px;
  height: 70px;
  border-color: #6b8b59;
  background: #16271b;
  box-shadow: 0 0 0 9px rgb(196 239 145 / 3%), 0 0 38px rgb(196 239 145 / 9%);
}

#result-title { font-size: clamp(28px, 4vw, 36px); }
#result-subtitle { color: #b1c2b4; font-size: 14px; }

.v2-result-summary { border-top-color: #38523e; }

.v2-page .reward-row,
.v2-result-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 5px;
  border-bottom: 1px solid #304a38;
  color: #afc0b2;
  font-size: 13px;
}

.v2-page .reward-row span:last-child,
.v2-result-row strong {
  color: #e9f2e3;
  font-weight: 700;
  text-align: right;
}

.v2-page .reward-row.lost span:last-child,
.v2-result-row.is-lost strong { color: var(--v2-coral); }

.v2-result-actions { gap: 12px; }
.v2-result-actions .button { min-width: 160px; }

.v2-footer {
  padding: 16px 0 30px;
  color: #829588;
  font-size: 12px;
}

.v2-page .toast {
  padding: 12px 20px;
  border-color: #6c8a5c;
  border-radius: 9px;
  background: #1c3424;
  box-shadow: 0 14px 38px rgb(0 0 0 / 40%), inset 2px 0 var(--v2-laser);
  color: #edf6e7;
  font-size: 13px;
}

@keyframes v2-polish-overheat {
  from { filter: brightness(.85); opacity: .78; }
  to { filter: brightness(1.2); opacity: 1; }
}

@media (min-width: 1500px) {
  .v2-raid-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}

@media (max-width: 1180px) {
  .v2-app { width: min(1440px, calc(100% - 40px)); }
  .v2-formation-layout,
  .v2-cannon-layout { grid-template-columns: 1fr; }
  .v2-module-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 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(210px, 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 #304a39; }
  .v2-carried-loot { border-right: 1px solid #304a39; }
  .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 #304a39; }
  .v2-carried-loot { border-right: 0; border-bottom: 1px solid #304a39; }
  .v2-extraction-panel { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body.v2-page { background-attachment: scroll; }
  .v2-app { width: min(100% - 28px, 1440px); }
  .v2-page .scene { padding-top: 22px; }
  .v2-header { align-items: flex-start; gap: 20px; padding: 24px 0 22px; }
  .v2-brand h1 { font-size: clamp(26px, 6.5vw, 36px); }
  .v2-brand-subtitle { display: block; font-size: 13px; }
  .v2-wallet-block { min-width: 146px; margin-top: 22px; padding: 11px 14px; }
  #credits { font-size: 21px; }
  .v2-workshop-intro { align-items: flex-start; padding: 22px; }
  .v2-security-note { white-space: normal; }
  .v2-tabs { gap: 5px; padding-inline: 8px; }
  .v2-tab { flex: 1; justify-content: center; min-height: 54px; padding: 10px 8px; font-size: 12px; }
  .v2-tab-index { display: none; }
  .v2-tab-panel { padding: 22px 18px; }
  .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: 23px; }
  .v2-formation-board { padding: 11px; }
  .v2-item-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .v2-operation-panel { padding: 22px; }
  .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: 12px; }
  .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 #304a39; }
  .v2-raid-console { display: flex; }
  .v2-cannon-telemetry,
  .v2-carried-loot { border-right: 0; border-bottom: 1px solid #304a39; }
  .v2-extraction-panel { padding-top: 20px; }
  .v2-loot-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); max-height: none; }
  .v2-control-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .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, 1440px); }
  .v2-header { flex-direction: column; gap: 16px; }
  .v2-brand .eyebrow { font-size: 10px; letter-spacing: .14em; }
  .v2-brand-subtitle { font-size: 12px; }
  .v2-wallet-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin: 0; text-align: left; }
  .v2-wallet-label { margin: 0; }
  #credits { font-size: 21px; text-align: right; }
  .v2-page section.panel { padding: 20px 16px; }
  .v2-page section.v2-workshop-console { padding: 0; }
  .v2-workshop-intro { flex-direction: column; gap: 16px; }
  .v2-workshop-intro h2 { font-size: 24px; }
  .v2-workshop-intro p:last-child { font-size: 13px; }
  .v2-tabs { padding-inline: 5px; }
  .v2-tab { min-height: 52px; font-size: 11px; }
  .v2-tab-panel { padding: 20px 12px; }
  .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: 15px; }
  .v2-cannon-stats .stat-row { grid-template-columns: 1fr 1fr; }
  .v2-operation-panel { padding: 20px 16px; }
  .v2-level-list { grid-template-columns: 1fr; }
  .v2-page .level-button { min-height: 76px; }
  .v2-raid-hud .hud-item { padding: 14px; }
  .v2-raid-hud .hud-item span { font-size: 10px; }
  .v2-raid-hud .hud-item strong { font-size: 20px; }
  .v2-raid-board { padding: 5px; }
  .v2-raid-board::after { inset: 5px; }
  .v2-cannon-telemetry,
  .v2-carried-loot,
  .v2-extraction-panel { padding: 18px 16px; }
  .v2-control-help { grid-template-columns: 1fr; }
  .v2-control-help .v2-control-warning { grid-column: auto; }
  .v2-result-card { margin: 24px auto; }
  .v2-page .reward-row,
  .v2-result-row { gap: 12px; font-size: 12px; }
}

@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;
  }
}
