﻿:root {
  --bg: #f2f2f4;
  --panel: #ededf3;
  --panel-strong: #fff;
  --line: #b5b9c8;
  --line-soft: #d5d8e3;
  --text: #23242d;
  --muted: #6f7487;
  --nav: #0b0d12;
  --nav-active: #353944;
  --accent: #8582da;
  --accent-soft: #d8d8fb;
  --shadow: 0 2px 6px rgba(18, 22, 33, 0.08);
  --radius: 4px;
  --font-ui: "Segoe UI", Tahoma, sans-serif;
  --home-background-image: url("/data/background.png");
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 17px; }
button, input { font: inherit; }

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 0 8px 0 0;
  background: var(--nav);
  color: #fff;
  position: relative;
  z-index: 120;
}

.brand {
  width: 108px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.brand-home {
  width: 61px;
  height: 61px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.brand-home:hover {
  background: rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 61px;
  height: 61px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.topnav {
  display: flex;
  align-self: stretch;
}
.topnav-tab {
  min-width: 116px;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: #cbd0de;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
}
.topnav-tab.active { background: var(--nav-active); color: #fff; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.language-switch select,
.server-switch select {
  min-width: 86px;
  padding: 6px 28px 6px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 4px;
  background: #1a1d25;
  color: #fff;
  cursor: pointer;
}

.language-switch select {
  min-width: 72px;
}

.global-search {
  width: 160px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 4px;
  background: #1a1d25;
  color: #fff;
}

.global-search-wrap {
  position: relative;
}

.global-search-results {
  position: absolute;
  z-index: 140;
  top: calc(100% + 6px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 86px));
  overflow-y: auto;
  border: 1px solid #b9becd;
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.global-search-results:empty {
  display: none;
}

.global-search-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 50px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #d0d2db;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.global-search-result:last-child {
  border-bottom: 0;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  background: #ececef;
}

.global-search-result strong {
  font-size: 17px;
  line-height: 1.15;
}

.global-search-result .tiny-preview {
  width: 66px;
  height: 36px;
}

.global-search-results .empty-panel {
  margin: 0;
  border: 0;
  background: #fff;
  color: var(--muted);
}

.app-shell { padding: 10px 8px 26px; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(242, 242, 244, 0.94);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-overlay.is-determinate .loading-bar span {
  width: var(--loading-progress, 0%);
  animation: none;
  transform: none;
  transition: width 120ms linear;
}

.loading-card {
  width: min(560px, calc(100vw - 32px));
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 36px rgba(18, 22, 33, 0.16);
  text-align: center;
}

.loading-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.loading-title {
  color: #1f2430;
  font-size: 22px;
  font-weight: 700;
}

.loading-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.loading-bar {
  position: relative;
  height: 8px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8dce8;
}

.loading-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3859d5, #64a0ff);
  animation: loading-slide 1.05s ease-in-out infinite;
}

.loading-progress {
  min-height: 20px;
  margin-top: 8px;
  color: #565d71;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

@keyframes loading-slide {
  0% { transform: translateX(-105%); }
  55% { transform: translateX(80%); }
  100% { transform: translateX(240%); }
}

.view { display: none; }
.view.active { display: block; }

#home-view {
  position: relative;
  min-height: calc(100vh - 62px);
  isolation: isolate;
  background: linear-gradient(180deg, #fafafa 0%, #f2f2f4 320px, #f2f2f4 100%);
}

#home-view::before {
  content: "";
  position: absolute;
  inset: -10px -8px 0;
  z-index: 0;
  background: transparent var(--home-background-image) center 10px / min(1000px, 94vw) auto no-repeat;
  mix-blend-mode: multiply;
  filter: grayscale(1);
  opacity: 0.18;
  pointer-events: none;
}

.home-hero {
  position: relative;
  z-index: 1;
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  margin: -10px -8px 34px;
  padding: 44px 16px 58px;
  border-bottom: 0;
  overflow: visible;
  background: transparent;
}

.home-logo {
  position: relative;
  z-index: 1;
  width: 159px;
  height: 159px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.home-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f6f6f6;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.52),
    0 0 4px rgba(0, 0, 0, 0.36);
}

.home-hero h1 span {
  margin-left: 5px;
  color: #8c8f9a;
  font-size: 19px;
  font-weight: 700;
  text-shadow: none;
}

.home-guide {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto 54px;
  line-height: 1.45;
}

.home-guide h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #858994;
  font-size: 25px;
}

.home-guide p {
  margin: 0 0 18px;
}

.rights-note {
  color: #6e7486;
  font-size: 15px;
}

.home-guide a {
  color: #2446c4;
  font-weight: 600;
  text-decoration: none;
}

.home-guide a:hover {
  text-decoration: underline;
}

.surface-panel {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.surface-heading,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.surface-heading h2,
.section-title h2 { margin: 0; font-size: 21px; }

.help-panel { font-size: 17px; color: var(--muted); }
.jump-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-link {
  padding: 0;
  border: 0;
  background: none;
  color: #2e48c0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.jump-pill {
  padding: 4px 10px;
  border-radius: 999px;
}

.premium-jump {
  background: #eef0ff;
  color: #3440aa;
}

.test-jump {
  background: #fff0f1;
  color: #b23a4b;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
}

.radio-pill input { margin: 0; }
.nation-block { margin: 24px 0; }
#nation-tree,
#parameter-output {
  overflow: visible;
}
.premium-block,
.test-block {
  padding-top: 8px;
}

.premium-block {
  border-top: 2px solid #d8ddff;
}

.test-block {
  border-top: 2px dashed #efb9c0;
}

.section-headline {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #707483;
  font-size: 23px;
}

.research-calculator {
  margin: -4px 0 14px;
}

.research-calc-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  background: #f7f8fc;
}

.research-calc-title {
  font-weight: 700;
  color: #232735;
  margin-right: 4px;
}

.research-calc-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 16px;
}

.research-calc-field select {
  min-width: 190px;
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid #aeb6ca;
  border-radius: 3px;
  background: #fff;
  font: inherit;
}

.research-calc-result {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.research-calc-result strong {
  color: #243a9b;
}

.research-calc-muted {
  color: var(--muted);
}

.research-calc-warning {
  color: #9b3131;
  font-weight: 700;
}

.research-path {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.research-path-arrow {
  padding: 0 5px;
  color: #69708a;
}

.research-path-ship {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  color: #606a83;
  font: inherit;
  cursor: pointer;
}

.research-path-ship:hover span {
  color: #203aa4;
  text-decoration: underline;
}

.premium-headline {
  color: #2c3c96;
}

.test-headline {
  color: #a23a49;
}

.tech-tree-board {
  position: relative;
  min-width: 100%;
}

.tech-tree-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.tech-tree-lines {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.tech-edge {
  fill: none;
  stroke: #d0cfe9;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tech-edge.is-research-path {
  stroke: #6574d8;
  stroke-width: 8;
}

.tree-lane-label {
  position: absolute;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 4px;
}

.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(144px, 144px));
  gap: 12px;
}

.tier-group {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.ship-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 152px));
  gap: 14px;
}

.tier-group-label {
  font-size: 23px;
  font-weight: 700;
  color: #2a2d39;
  line-height: 1;
  padding-top: 6px;
  text-align: center;
}

.ship-node {
  display: grid;
  gap: 8px;
  width: 144px;
  height: 102px;
  padding: 7px 7px 9px;
  border: 1px solid #757a8b;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3f3f5 0%, #d9dce5 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.ship-node.tree-node { position: absolute; }
.ship-node:hover { border-color: #4d61c8; }
.ship-node.is-research-path {
  border-color: #5364d4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 0 0 2px rgba(83,100,212,0.18);
}
.ship-node.is-research-start {
  border-color: #14854a;
}
.ship-node.is-research-target {
  border-color: #b45028;
}

.ship-research-card {
  display: none;
}

.floating-ship-research-card {
  position: fixed;
  display: block;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 9px 10px;
  border: 1px solid #717171;
  border-radius: 2px;
  background: #ffffff;
  color: #050505;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 5000;
  text-align: left;
}

.ship-research-tooltip-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.ship-research-tooltip-divider {
  margin: 7px 0 9px;
  border-top: 1px solid #979797;
}

.ship-research-tooltip-body {
  display: grid;
  gap: 4px;
}

.ship-research-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}

.ship-research-tooltip-row.is-sub {
  margin-left: 4px;
  font-size: 14px;
}

.ship-research-tooltip-row strong {
  font-weight: 700;
}

.ship-preview,
.modal-preview {
  width: 100%;
  object-fit: contain;
  background: transparent;
}

.ship-preview { height: 54px; }
.modal-preview {
  width: 118%;
  max-width: none;
  height: 190px;
  margin-bottom: 8px;
}
.tiny-preview { width: 44px; height: 28px; object-fit: contain; }
.ship-preview-fallback {
  display: grid;
  place-items: center;
  color: #6c7185;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff, #edf1f7);
}

.ship-name {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.subtab-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.subtab {
  padding: 0;
  border: 0;
  background: none;
  color: #8b8f9f;
  font-weight: 700;
  cursor: pointer;
}

.subtab.active { color: #2f3b67; }

.join-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: #4f5668;
  font: inherit;
  cursor: pointer;
}

.join-toggle:hover {
  color: #203aa4;
  text-decoration: underline;
}

.join-toggle.active {
  color: #203aa4;
  font-weight: 700;
}

.picker-pane {
  position: relative;
  display: none;
}
.picker-pane.active { display: block; }

.filter-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-line-title {
  font-size: 18px;
  font-weight: 600;
}

.chip-row { display: grid; gap: 4px; }
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
}

.check-pill input { margin: 0; }
.filter-inline-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.tier-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dual-range {
  position: relative;
  width: min(360px, 100%);
  height: 26px;
  --range-left: 0%;
  --range-right: 100%;
}

.dual-range-track,
.dual-range-fill {
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 999px;
}

.dual-range-track { background: #dadcf2; }
.dual-range-fill {
  left: var(--range-left);
  right: calc(100% - var(--range-right));
  background: var(--accent);
}

.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  pointer-events: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #989cb5;
  background: #fff;
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #989cb5;
  background: #fff;
  pointer-events: auto;
}

.select-toolbar {
  position: relative;
  z-index: 72;
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.select-toolbar input {
  width: 240px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.soft-button {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.selection-summary {
  display: none;
}

.search-results,
.selection-list {
  display: grid;
  gap: 6px;
}

.search-results {
  position: absolute;
  z-index: 70;
  top: 42px;
  left: 0;
  width: min(300px, calc(100vw - 48px));
  max-height: min(560px, calc(100vh - 160px));
  overflow-y: auto;
  gap: 0;
  margin: 0;
  border: 1px solid #b9becd;
  background: #fff;
  box-shadow: 0 8px 22px rgba(19, 23, 32, 0.18);
}

.search-results:empty {
  display: none;
}

.search-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 50px;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #d0d2db;
  background: #fff;
}

.search-result:last-child {
  border-bottom: 0;
}

.selected-ship-header,
.selected-ship-row {
  display: grid;
  grid-template-columns: 82px minmax(130px, max-content) 44px 56px minmax(90px, max-content) 28px;
  column-gap: 12px;
  align-items: center;
  justify-content: start;
}

.selected-ship-header {
  padding: 0 0 4px;
  color: #565d71;
  font-size: 13px;
  font-weight: 700;
}

.selected-ship-row {
  padding: 2px 0;
  border: 0;
  background: transparent;
}

.selected-ship-header span:nth-child(3),
.selected-ship-header span:nth-child(4),
.selected-ship-header span:nth-child(5),
.selected-ship-meta {
  text-align: left;
}

.selected-ship-row .tiny-preview {
  width: 72px;
  height: 38px;
}

.search-result {
  cursor: pointer;
  text-align: left;
}

.search-result-copy {
  display: grid;
  gap: 1px;
}

.search-result-copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.search-match {
  padding: 0 1px;
  background: #f2dede;
  color: inherit;
}

.selected-ship-link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.selected-ship-link:hover {
  color: #3846aa;
  text-decoration: underline;
}

.search-result .tiny-preview {
  width: 66px;
  height: 36px;
}

.selected-ship-meta {
  font-size: 17px;
  color: #000;
}

.remove-chip {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.remove-chip:hover {
  color: #5d6475;
}

.config-row,
.parameter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 17px;
}

.parameter-display { margin-top: 26px; }
.parameter-section {
  margin-bottom: 18px;
  overflow: visible;
}
.parameter-section h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #707483;
  font-size: 23px;
}

.param-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.param-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.param-table th,
.param-table td {
  padding: 8px 10px;
  border-bottom: 0;
  text-align: left;
  font-size: 17px;
  vertical-align: top;
}

.param-table thead th {
  background: var(--panel);
  font-weight: 700;
}

.param-table tbody tr.param-row-clickable {
  cursor: pointer;
  transition: background-color 120ms ease;
}

.param-table tbody tr:nth-child(even) td {
  background: #f5f6fb;
}

.param-table tbody tr.param-row-clickable:hover td {
  background: #f5f8ff;
}

.param-ship-alt {
  color: #7f8798;
  font-size: 16px;
  font-weight: 400;
}

.param-sort-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.param-sort-button:hover {
  color: #3048b2;
}

.param-sort-button.active {
  color: #3048b2;
}

.param-table td:first-child,
.param-table th:first-child {
  width: 42px;
  white-space: nowrap;
}

.param-table th:nth-child(2),
.param-table td:nth-child(2) {
  width: 140px;
}

.param-table th:nth-child(4),
.param-table td:nth-child(4) {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
}

.param-table th:nth-child(5),
.param-table td:nth-child(5) {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
}

.param-table th:nth-child(3),
.param-table td:nth-child(3) {
  width: 44px;
}

.param-table-general {
  table-layout: fixed;
  min-width: 1780px;
}

.param-table-general th:nth-child(6),
.param-table-general td:nth-child(6),
.param-table-general th:nth-child(7),
.param-table-general td:nth-child(7),
.param-table-general th:nth-child(8),
.param-table-general td:nth-child(8) {
  width: 80px;
  min-width: 80px;
}

.param-table-general th:nth-child(9),
.param-table-general td:nth-child(9),
.param-table-general th:nth-child(10),
.param-table-general td:nth-child(10),
.param-table-general th:nth-child(11),
.param-table-general td:nth-child(11),
.param-table-general th:nth-child(12),
.param-table-general td:nth-child(12),
.param-table-general th:nth-child(13),
.param-table-general td:nth-child(13),
.param-table-general th:nth-child(14),
.param-table-general td:nth-child(14),
.param-table-general th:nth-child(15),
.param-table-general td:nth-child(15),
.param-table-general th:nth-child(16),
.param-table-general td:nth-child(16) {
  width: 108px;
  min-width: 108px;
}

.param-table-general th:nth-child(14),
.param-table-general td:nth-child(14),
.param-table-general th:nth-child(16),
.param-table-general td:nth-child(16) {
  width: 124px;
  min-width: 124px;
}

.param-table-general th:nth-child(4),
.param-table-general td:nth-child(4) {
  width: 102px;
  min-width: 102px;
}

.param-table-general th:nth-child(5),
.param-table-general td:nth-child(5) {
  width: 112px;
  min-width: 112px;
}

.param-table-general th:nth-child(6),
.param-table-general td:nth-child(6) {
  width: 64px;
  min-width: 64px;
}

.param-table-general th:nth-child(8),
.param-table-general td:nth-child(8) {
  width: 74px;
  min-width: 74px;
}

.param-table-general th:nth-child(9),
.param-table-general td:nth-child(9) {
  width: 96px;
  min-width: 96px;
}

.param-table-general th:nth-child(14),
.param-table-general td:nth-child(14) {
  width: 98px;
  min-width: 98px;
}

.param-table-general th.combat-instruction-col,
.param-table-general td.combat-instruction-col {
  width: 154px;
  min-width: 154px;
}

.param-table-general th.combat-instruction-col,
.param-table-general th.combat-instruction-col .param-sort-button {
  white-space: nowrap;
}

.param-table-general .param-sort-button {
  line-height: 1.15;
}

.param-table-general th {
  line-height: 1.15;
}

.consumable-icon {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.consumable-cell,
.consumable-head,
.consumable-stats,
.modal-consumables,
.modal-consumable {
  display: grid;
}

.consumable-cell { gap: 6px; min-width: 0; }
.consumable-cell-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.consumable-head {
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}
.consumable-head strong { display: block; }
.consumable-head strong,
.consumable-head div,
.consumable-stats span {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.consumable-head span,
.consumable-stats span,
.na-cell {
  color: #8b92a3;
  font-size: inherit;
  font-style: italic;
}
.consumable-stats { gap: 2px; }

.consumables-table th.consumables-divider-col,
.consumables-table td.consumables-divider-col {
  border-left: 0;
  box-shadow: inset 1px 0 0 #a6afc2;
}

.consumables-table td {
  white-space: nowrap;
}

.consumables-table {
  min-width: 1200px;
}

.consumables-table th:nth-child(2),
.consumables-table td:nth-child(2) {
  width: 170px;
  min-width: 170px;
}

.consumables-table th:nth-child(3),
.consumables-table td:nth-child(3) {
  width: 52px;
  min-width: 52px;
}

.consumables-table th:nth-child(4),
.consumables-table td:nth-child(4) {
  width: 96px;
  min-width: 96px;
}

.consumables-table th:nth-child(5),
.consumables-table td:nth-child(5) {
  width: 92px;
  min-width: 92px;
}

.consumables-table th.consumables-col-main,
.consumables-table td.consumables-col-main {
  width: 72px;
  text-align: center;
}

.consumables-table th.consumables-col-duration,
.consumables-table td.consumables-col-duration,
.consumables-table th.consumables-col-reload,
.consumables-table td.consumables-col-reload {
  width: 74px;
  text-align: center;
}

.consumables-table th.consumables-col-time,
.consumables-table td.consumables-col-time,
.consumables-table th.consumables-col-repair,
.consumables-table td.consumables-col-repair,
.consumables-table th.consumables-col-dispersion,
.consumables-table td.consumables-col-dispersion,
.consumables-table th.consumables-col-radius,
.consumables-table td.consumables-col-radius,
.consumables-table th.consumables-col-range,
.consumables-table td.consumables-col-range,
.consumables-table th.consumables-col-speed,
.consumables-table td.consumables-col-speed,
.consumables-table th.consumables-col-dps,
.consumables-table td.consumables-col-dps {
  width: 78px;
  text-align: center;
}

.consumables-table .modal-consumable-choice {
  width: 44px;
  min-height: 40px;
}

.consumables-table .modal-consumable-choice-icon {
  width: 31px;
  height: 31px;
}

.consumables-table .modal-consumable-count {
  top: -2px;
  right: -3px;
}

.detail-hover-wrap {
  position: relative;
  display: inline-block;
}

.detail-hover-trigger {
  display: inline-block;
}

.detail-hover-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  z-index: 50;
  text-align: left;
}

.detail-hover-wrap:hover .detail-hover-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.param-table-wrap .detail-hover-wrap:hover .detail-hover-card,
#modal-content .detail-hover-wrap:hover .detail-hover-card {
  display: none;
}

.floating-detail-hover-card.detail-hover-card {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 6px;
  left: auto;
  top: auto;
  transform: none;
  opacity: 1;
  pointer-events: none;
  z-index: 5000;
}

.detail-hover-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
}

.detail-hover-line-label {
  color: var(--muted);
}

.detail-hover-line-value {
  font-weight: 600;
  color: var(--text);
}

.stat-help-wrap {
  max-width: 100%;
}

.stat-help-trigger {
  cursor: help;
}

.stat-help-card.detail-hover-card {
  min-width: 220px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 9px 11px;
  color: #111111;
  font-size: 16px;
  line-height: 1.45;
  white-space: normal;
}

.floating-detail-hover-card.stat-help-card {
  max-width: min(340px, calc(100vw - 32px));
}

.stat-help-text {
  display: block;
}

.empty-panel {
  padding: 16px;
  border: 1px dashed var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 17px;
}

.empty-panel.compact { padding: 10px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  overflow-x: visible;
  padding: 8px 0;
}

.modal.hidden { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.52);
}

.modal-card {
  position: relative;
  width: min(980px, calc(100vw - 24px));
  margin: 0 auto 8px;
  overflow: visible;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 26px 60px rgba(14, 18, 28, 0.25);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #444955;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.modal-hero { padding: 18px 24px 8px; text-align: center; }
.modal-hero h2 { margin: 0 0 8px; font-size: 25px; }
.modal-hero p { margin: 0; color: var(--muted); font-size: 17px; }

.modal-tree-nav {
  margin-top: 10px;
}

.modal-tree-nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 17px;
}

.modal-tree-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d768d;
  font: inherit;
  cursor: pointer;
}

.modal-tree-link:hover {
  color: #3846aa;
  text-decoration: underline;
}

.modal-tree-nav-arrow {
  color: #81889a;
}

.modal-top {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
  align-items: start;
  padding: 0 24px 4px;
}

.modal-top-media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

.modal-top-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.modal-modules-wrap {
  display: flex;
  justify-content: center;
  padding: 0 24px 8px;
  position: relative;
  z-index: 40;
}

.modal-module-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px 15px;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 40;
}

.modal-module-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.modal-module-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: #9a7f7f;
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  z-index: 1;
  pointer-events: auto;
}

.modal-module-icon:hover,
.modal-module-icon:focus-visible {
  z-index: 40;
}

.modal-module-icon img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  opacity: 0.92;
  pointer-events: none;
  filter:
    drop-shadow(0 0 1px rgba(72, 85, 96, 0.9))
    drop-shadow(0 0 1px rgba(72, 85, 96, 0.45));
}

.modal-module-icon.is-unselected img {
  opacity: 0.42;
}

.modal-module-icon.is-selected img {
  opacity: 0.96;
  filter:
    drop-shadow(0 0 1px rgba(72, 85, 96, 0.95))
    drop-shadow(0 0 3px rgba(72, 85, 96, 0.55));
}

.modal-module-icon span {
  font-size: 26px;
}

.module-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  min-width: 0;
  max-width: min(460px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid #8c8c8c;
  border-radius: 3px;
  background: rgba(255, 255, 255, 1);
  color: #111111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.12s ease;
  text-align: left;
}

.modal-module-icon:hover .module-tooltip {
  opacity: 1;
}

.module-tooltip-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.module-tooltip-type {
  margin-top: 110x;
  color: var(--muted);
  font-size: 16px;
}

.module-tooltip-divider {
  margin: 10px 0 8px;
  border-top: 1px solid #bdbdbd;
}

.module-tooltip-details {
  display: grid;
  gap: 18px;
  font-size: 11px;
  line-height: 1.2;
}

.module-tooltip-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.module-tooltip .module-tooltip-label {
  color: #444444;
  font-size: 20px !important;
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.2;
}

.module-tooltip .module-tooltip-value {
  color: #111111;
  font-size: 20px !important;
  font-weight: 700;
  text-align: right;
  line-height: 1.2;
}

.stat-hover {
  position: relative;
  display: inline-block;
  cursor: default;
}

.stat-hover-marker {
  margin-left: 2px;
  font-size: 12px;
  line-height: 1;
  vertical-align: super;
}

.stat-hover-card {
  position: absolute;
  display: none;
  right: calc(100% + 8px);
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  min-width: 0;
  max-width: min(420px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid #8c8c8c;
  border-radius: 3px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.12s ease;
  text-align: left;
  white-space: normal;
}

.stat-hover:hover .stat-hover-card {
  display: block;
  opacity: 1;
}

.param-table-wrap .stat-hover:hover .stat-hover-card {
  display: none;
  opacity: 0;
}

.floating-stat-hover-card.stat-hover-card {
  position: fixed;
  display: block;
  left: auto;
  right: auto;
  top: auto;
  transform: none;
  width: max-content;
  min-width: 0;
  max-width: min(560px, calc(100vw - 32px));
  opacity: 1;
  pointer-events: none;
  z-index: 5000;
}

.floating-stat-hover-card .weapon-description-line {
  align-items: baseline;
  gap: 7px;
}

.stat-hover-line {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

.stat-hover-line-label {
  color: #111111;
  font-size: 18px;
  font-weight: 400;
  flex: 0 1 auto;
}

.stat-hover-line-value {
  color: #111111;
  font-weight: 700;
  font-size: 18px;
  text-align: right;
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.weapon-description-hover .stat-hover-card {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  transform: none;
  width: max-content;
  min-width: 0;
  max-width: min(560px, calc(100vw - 32px));
}

.weapon-description-hover .stat-hover-line {
  align-items: baseline;
  justify-content: flex-start;
  gap: 7px;
}

.weapon-description-count {
  color: #111111;
  font-family: inherit;
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  flex: 0 0 auto;
}

.weapon-description-name {
  color: #111111;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  white-space: normal;
  flex: 1 1 auto;
}

.secondary-description-part {
  color: var(--weapon-group-color, inherit);
  font-weight: 600;
}

.secondary-description-hover .weapon-description-count,
.secondary-description-hover .weapon-description-name {
  color: var(--weapon-group-color, #111111);
}


.modal-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  justify-content: center;
  position: relative;
  top: 1px;
  z-index: 25;
  pointer-events: auto;
}

.modal-switch {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #7b7d88;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  font-size: 17px;
  position: relative;
  z-index: 26;
  pointer-events: auto;
}

.modal-switch.active {
  color: #2f3b67;
  font-weight: 700;
  border-bottom-color: #fff;
}

.modal-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 18px;
  margin: 0 24px 24px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: visible;
}

.modal-panel-single {
  grid-template-columns: 1fr;
}

.modal-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.modal-panel-header h3 {
  margin: 0;
  font-size: 22px;
}

.modal-panel-header span {
  color: var(--muted);
  font-size: 17px;
}

.modal-spec-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
}

.modal-spec-columns.is-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-spec-columns.is-one-column {
  grid-template-columns: minmax(0, 1fr);
}

.modal-stat-card {
  border-top: 2px solid #1a1a1a;
  padding-top: 8px;
}

.modal-stat-card h4 {
  margin: 0 0 8px;
  font-size: 19px;
}

.modal-stat-card table {
  width: 100%;
  border-collapse: collapse;
}

.modal-stat-card td {
  padding: 4px 0;
  font-size: 17px;
  vertical-align: top;
}

.modal-stat-card td:first-child {
  color: var(--muted);
  width: 50%;
}

.modal-stat-card td.modal-stat-label-strong {
  color: var(--text);
  font-weight: 700;
}

.combat-instruction-card {
  margin-bottom: 14px;
}

.combat-instruction-card table {
  width: auto;
  table-layout: auto;
}

.combat-instruction-card td:first-child {
  width: auto;
  padding-right: 14px;
  white-space: nowrap;
}

.combat-instruction-card td:last-child {
  white-space: nowrap;
  text-align: right;
}

.combat-instruction-name {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

.combat-instruction-icon-stack {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 0 10px;
}

.combat-instruction-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.combat-instruction-icon-bg {
  opacity: 0.95;
}

.combat-instruction-icon-fg {
  z-index: 1;
}

.param-table th.combat-instruction-col {
  width: 96px;
  min-width: 96px;
  white-space: normal;
  line-height: 1.15;
}

.param-table td.combat-instruction-col {
  width: 96px;
  min-width: 96px;
  white-space: nowrap;
}

.param-table .salvo-series-col {
  width: 1%;
  white-space: nowrap;
}

.combat-instruction-value-positive {
  color: #1f9f57;
  font-weight: 600;
}

.combat-instruction-value-negative {
  color: #c24848;
  font-weight: 600;
}

.arc-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.arc-panel,
.trajectory-graph,
.dispersion-graph {
  width: 100%;
  height: auto;
}

.arc-label {
  fill: #757575;
  font-size: 17px;
}

.trajectory-wrap {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.shell-dispersion-control {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 16px;
}

.shell-dispersion-shot-input {
  width: 82px;
  height: 30px;
  padding: 3px 8px;
  border: 1px solid #b9c1d1;
  border-radius: 3px;
  background: #fff;
  color: var(--text);
  text-align: right;
}

.trajectory-range {
  justify-self: end;
  color: var(--muted);
  font-size: 17px;
}

.shell-dispersion-graph {
  max-width: 820px;
  justify-self: center;
  margin-top: 4px;
  overflow: visible;
}

.shell-dispersion-ellipse {
  fill: #eeeeee;
  stroke: #d2d2d2;
  stroke-width: 1.4;
}

.shell-dispersion-dot {
  fill: #c94d4d;
}

.shell-dispersion-measure {
  stroke: #bdbdbd;
  stroke-width: 1.4;
}

.shell-dispersion-label {
  fill: #747474;
  font-size: 17px;
  font-weight: 600;
}

.ship-angle-panel {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  width: 100%;
  overflow: visible;
}

.ship-angle-panel-pair {
  align-items: flex-start;
  gap: 26px;
  flex-wrap: wrap;
}

.ship-angle-image {
  display: block;
  width: auto !important;
  max-width: 100%;
  height: 325px !important;
  max-height: 325px;
  object-fit: contain;
}

.ship-angle-diagram {
  display: block;
  width: min(390px, 100%);
  height: auto;
  overflow: visible;
}

.firepower-diagram {
  display: block;
  width: min(390px, 100%);
  height: auto;
  overflow: visible;
}

.firepower-area {
  fill: #cf6a6f;
  opacity: 0.62;
  stroke: #cf6a6f;
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.firepower-grid-line {
  stroke: #81686b;
  stroke-width: 1.1;
  opacity: 0.34;
  pointer-events: none;
}

.firepower-ring {
  fill: none;
  stroke: #686d76;
  stroke-width: 1;
  opacity: 0.32;
  pointer-events: none;
}

.firepower-ring.outer {
  stroke: #333;
  stroke-width: 1.3;
  stroke-dasharray: 5 5;
  opacity: 0.85;
}

.firepower-full-boundary {
  stroke: #333;
  stroke-width: 2;
  opacity: 0.82;
  pointer-events: none;
}

.firepower-full-label {
  fill: #5b606b;
  font-size: 17px;
  font-weight: 600;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  pointer-events: none;
}

.firepower-silhouette {
  opacity: 0.96;
}

.firepower-hover-target {
  fill: transparent;
  pointer-events: all;
}

.firepower-hover-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

.firepower-diagram.is-hovering .firepower-hover-overlay {
  opacity: 1;
}

.firepower-hover-line {
  stroke: #2f3338;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  opacity: 0.9;
}

.firepower-hover-dot {
  fill: #2f3338;
  stroke: #fff;
  stroke-width: 1.4;
}

.firepower-hover-box {
  fill: rgba(255, 255, 255, 0.94);
  stroke: #aeb5c1;
  stroke-width: 1;
}

.firepower-hover-text {
  fill: #4b5160;
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
}

.firepower-hover-text.strong {
  fill: #2f3338;
  font-size: 14px;
  font-weight: 700;
}

.ship-angle-sector {
  fill: #cf6a6f;
  stroke: none;
}

.ship-angle-sector-group {
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.secondary-angle-diagram .ship-angle-sector-group {
  opacity: 0.26;
}

.ship-angle-diagram.has-active .ship-angle-sector-group {
  opacity: 0.08;
}

.secondary-angle-diagram.has-active .ship-angle-sector-group {
  opacity: 0.04;
}

.ship-angle-diagram.has-active .ship-angle-sector-group.active,
.ship-angle-sector-group.active {
  opacity: 1;
}

.ship-angle-range-circle {
  fill: #cf6a6f;
  opacity: 0.18;
  pointer-events: none;
}

.ship-angle-sector-hover {
  opacity: 0.56;
  pointer-events: none;
}

.ship-angle-turret:hover .ship-angle-sector-hover,
.ship-angle-turret:focus .ship-angle-sector-hover {
  opacity: 0.56;
}

.ship-angle-hover-circle {
  fill: none;
  stroke: #333;
  stroke-width: 1.3;
  stroke-dasharray: 5 5;
  opacity: 1;
  pointer-events: none;
}

.ship-angle-fixed-circle {
  fill: none;
  stroke: #333;
  stroke-width: 1.3;
  stroke-dasharray: 5 5;
  opacity: 0.85;
  pointer-events: none;
}

.ship-angle-sector-boundary {
  display: none;
  stroke: #333;
  stroke-width: 1.6;
  opacity: 0;
  pointer-events: none;
}

.ship-angle-silhouette {
  pointer-events: none;
}

.ship-angle-centerline {
  stroke: #333;
  stroke-width: 1.7;
  stroke-dasharray: 7 5;
  pointer-events: none;
}

.ship-angle-bow-arrow {
  fill: none;
  stroke: #333;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ship-angle-hit-target {
  fill: transparent;
  cursor: pointer;
  pointer-events: all;
}

.ship-angle-dot {
  fill: var(--weapon-dot-color, #3f4548);
  stroke: #dedede;
  stroke-width: 1.5;
  pointer-events: none;
  transition: fill 120ms ease, stroke 120ms ease, transform 120ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.ship-angle-turret:hover .ship-angle-dot,
.ship-angle-turret:focus .ship-angle-dot {
  fill: var(--weapon-dot-hover-color, #2b3033);
  stroke: #ffffff;
  transform: scale(1.18);
}

.ship-angle-diagram.has-firepower-angle .ship-angle-turret.firepower-unavailable .ship-angle-dot {
  fill: #8d9399;
  stroke: #d7dadd;
  opacity: 0.72;
  transform: none;
}

.ship-angle-diagram.has-firepower-angle .ship-angle-sector-group.firepower-unavailable {
  opacity: 0.08;
}

.ship-angle-sector-label,
.ship-angle-hover-label,
.ship-angle-hover-range {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.ship-angle-sector-label {
  fill: #5b606b;
  font-size: 18px;
  font-weight: 600;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
}

.ship-angle-hover-label,
.ship-angle-hover-range {
  fill: #4a4e5c;
  text-anchor: middle;
}

.ship-angle-hover-label {
  font-size: 17px;
  font-weight: 600;
}

.ship-angle-hover-range {
  font-size: 14px;
}

.ship-angle-turret:hover .ship-angle-sector-label,
.ship-angle-turret:focus .ship-angle-sector-label,
.ship-angle-turret:hover .ship-angle-hover-label,
.ship-angle-turret:focus .ship-angle-hover-label,
.ship-angle-turret:hover .ship-angle-hover-range,
.ship-angle-turret:focus .ship-angle-hover-range,
.ship-angle-turret:hover .ship-angle-hover-circle,
.ship-angle-turret:focus .ship-angle-hover-circle {
  opacity: 1;
}

.modal-side {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.modal-side .modal-consumables {
  min-width: 0;
}

.modal-side .modal-consumable {
  min-width: 0;
}

.modal-side .modal-consumable strong,
.modal-side .modal-consumable span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-profile-error {
  margin: 0 auto 12px;
  max-width: 720px;
  color: #a33b3b;
  font-size: 16px;
  text-align: center;
}

.badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef0ff;
  color: #3846aa;
  font-size: 16px;
}

.modal-consumables { gap: 8px; }
.modal-consumables-card {
  margin-top: 10px;
}
.modal-slot-list {
  display: grid;
  gap: 12px;
}
.modal-slot-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}
.modal-slot-label {
  font-size: 18px;
}
.modal-consumable-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.aircraft-consumables-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.modal-consumable-choice {
  position: relative;
  width: 62px;
  min-height: 62px;
  display: grid;
  place-items: center;
}
.modal-consumable-choice:hover {
  z-index: 40;
}
.modal-consumable-choice-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.modal-consumable-choice-fallback {
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  background: #fafbff;
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
}
.modal-consumable-count {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ffffff;
  color: #202020;
  font-size: 18px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.consumable-hover-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  width: max-content;
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  color: #111;
  text-align: left;
  z-index: 50;
}
.modal-consumable-choice:hover .consumable-hover-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.param-table-wrap .modal-consumable-choice:hover .consumable-hover-card {
  display: none;
}
.floating-consumable-hover-card.consumable-hover-card {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: auto;
  top: auto;
  transform: none;
  pointer-events: none;
  z-index: 5000;
}
.consumable-hover-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.consumable-hover-description {
  font-size: 16px;
  line-height: 1.45;
  color: #333;
  white-space: normal;
}
.consumable-hover-divider {
  border-top: 1px solid var(--line-soft);
}
.consumable-hover-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
}
.consumable-hover-line-label {
  font-size: 16px;
  color: #111;
}
.consumable-hover-line-value {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}
.consumable-hover-line-value-positive {
  color: #15803d;
}
.summary-copy {
  margin-bottom: 12px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-height: calc(1.6em * 7);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  white-space: normal;
  scrollbar-width: thin;
}

.summary-copy p {
  margin: 0 0 10px;
}

.summary-copy p:last-child {
  margin-bottom: 0;
}
.modal-consumable {
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  background: #fafbff;
}

.modal-consumable span { display: block; font-size: 16px; color: var(--muted); }

.param-ship-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.param-ship-link:hover {
  color: #3048b2;
  text-decoration: underline;
}

.parameter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parameter-range-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.parameter-range-control span {
  font-size: 20px;
}

.parameter-range-engine {
  font-size: 15px;
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #cfd3ea;
  color: #5d6489;
}

.parameter-range-engine.is-wasm {
  color: #2f6a3d;
  border-color: #b7d8bf;
  background: #eef8f0;
}

.parameter-range-engine.is-fallback {
  color: #8a5c1b;
  border-color: #e4c99b;
  background: #fff5e8;
}

.parameter-range-spinner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.parameter-range-spinner strong {
  font-size: 20px;
  font-weight: 500;
  color: var(--muted);
}

.parameter-range-buttons {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.parameter-range-button {
  width: 16px;
  height: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}

.parameter-range-button::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.parameter-range-button.up::before {
  top: 0;
  border-bottom: 8px solid #888;
}

.parameter-range-button.down::before {
  bottom: 0;
  border-top: 8px solid #b0b0b0;
}

.parameter-range-button:hover::before {
  filter: brightness(0.85);
}

.modal-range-control {
  justify-self: end;
}

.modal-range-control span,
.modal-range-control .parameter-range-spinner strong {
  font-size: 17px;
}

@media (max-width: 980px) {
  .modal-top,
  .modal-panel,
  .modal-spec-columns,
  .arc-visuals { grid-template-columns: 1fr; }

  .select-toolbar,
  .tier-strip { flex-wrap: wrap; }

  .search-result { grid-template-columns: auto 1fr; }
  .selected-ship-header,
  .selected-ship-row {
    grid-template-columns: 72px minmax(110px, 1fr) 38px 48px minmax(70px, 1fr) 28px;
    column-gap: 8px;
  }
}
