:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e7edf2;
  --line-strong: #19c889;
  --text: #17212b;
  --muted: #7b8794;
  --green: #10bf7a;
  --green-soft: #e9fbf3;
  --blue: #4a88ff;
  --red: #e4664f;
  --shadow: 0 20px 60px rgba(29, 45, 61, 0.08);
  --radius: 8px;
  --top-frame-height: 620px;
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 191, 122, 0.08), transparent 360px),
    radial-gradient(circle at 88% 10%, rgba(74, 136, 255, 0.08), transparent 420px),
    linear-gradient(180deg, #fbfcfe 0%, #f5f8fb 52%, #f7fafc 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #1fc98a, #0eac6f);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  border-color: #0fb474;
  box-shadow: 0 10px 24px rgba(16, 191, 122, 0.14);
}

button.nav-active,
.segmented button,
.weapon-row,
.attachment-card button,
.ghost-button,
.icon-button,
.saved-list button {
  color: var(--text);
  background: #ffffff;
}

.site-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  padding: 0 30px 30px;
}

.topbar {
  position: static;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 -30px 18px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 4px 24px rgba(28, 43, 56, 0.05);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 3px;
  border: 1px solid rgba(16, 191, 122, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 70% 18%, rgba(245, 165, 36, 0.12), transparent 44%),
    #ffffff;
  box-shadow:
    0 10px 24px rgba(17, 24, 39, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block strong {
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.brand-block span {
  color: #28323c;
  font-size: 13px;
  font-weight: 700;
}

.main-nav {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.main-nav button {
  min-height: 72px;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  color: #344150;
  background: transparent;
  box-shadow: none;
}

.main-nav button:hover,
.main-nav .nav-active {
  color: var(--green);
  box-shadow: inset 0 -3px 0 var(--green);
}

.top-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.top-meta span,
.search-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.search-pill {
  min-width: 240px;
  text-align: left;
}

.workbench {
  display: grid;
  grid-template-columns: 300px minmax(620px, 1fr) 470px;
  grid-template-rows: var(--top-frame-height) auto auto;
  grid-template-areas:
    "weapons center slots"
    "detail detail detail"
    "build build build";
  gap: 18px;
  align-items: stretch;
}

.center-stack {
  grid-area: center;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.middle-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.detail-dock {
  grid-area: detail;
  min-width: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.weapon-panel {
  grid-area: weapons;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 18px;
}

.stage-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  padding: 22px 28px 0;
  overflow: hidden;
}

.slot-panel {
  grid-area: slots;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 20px;
}

.attachment-panel,
.current-attachment-panel {
  padding: 18px;
}

.build-panel {
  grid-area: build;
  padding: 18px;
}

.stats-panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 252, 0.94)),
    radial-gradient(circle at 8% 0%, rgba(16, 191, 122, 0.08), transparent 260px);
}

.game-detail-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid rgba(129, 152, 166, 0.38);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(19, 30, 37, 0.94), rgba(28, 38, 47, 0.9)),
    radial-gradient(circle at 52% 58%, rgba(47, 66, 77, 0.62), transparent 330px);
  color: #c3ccd1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 18px 80px rgba(0, 0, 0, 0.18);
}

.game-detail-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(126, 151, 164, 0.12) 45% 46%, transparent 47%),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.04) 13px 14px);
  pointer-events: none;
}

.game-detail-shell::after {
  content: "";
  position: absolute;
  left: 26%;
  top: 12%;
  width: 430px;
  height: 430px;
  border: 2px solid rgba(95, 123, 139, 0.14);
  border-radius: 50%;
  box-shadow: inset 0 0 0 36px rgba(95, 123, 139, 0.03);
  pointer-events: none;
}

.game-detail-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px 7px;
  color: #dbe4e8;
}

.game-detail-head span {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.game-detail-head strong {
  color: #a9b5bd;
  font-size: 13px;
}

.game-detail-line {
  position: relative;
  z-index: 1;
  height: 8px;
  margin: 0 16px;
  border-top: 1px solid rgba(168, 185, 196, 0.34);
  border-bottom: 1px solid rgba(39, 64, 78, 0.72);
  background: linear-gradient(90deg, rgba(38, 112, 168, 0.9), rgba(201, 216, 225, 0.72) 28%, rgba(201, 216, 225, 0.18) 92%, rgba(255, 119, 37, 0.82));
}

.game-detail-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 255px minmax(360px, 1fr) minmax(330px, 0.72fr);
  min-height: 500px;
}

.game-stat-nav {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 34px 24px;
  border-right: 1px solid rgba(111, 130, 141, 0.2);
  background: rgba(9, 18, 23, 0.28);
}

.game-stat-nav button {
  min-height: 58px;
  justify-content: flex-start;
  border: 1px solid rgba(177, 190, 197, 0.36);
  border-radius: 0;
  background: rgba(18, 29, 34, 0.74);
  color: #a9b3b9;
  padding: 0 20px;
  text-align: left;
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.game-stat-nav button.active {
  border-color: rgba(219, 229, 234, 0.86);
  color: #eef5f6;
  background:
    linear-gradient(90deg, rgba(72, 91, 97, 0.72), rgba(31, 47, 54, 0.74)),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(43, 165, 199, 0.12) 13px 14px);
}

.game-stat-main {
  padding: 34px 34px 28px;
}

.game-stat-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.game-stat-title h3 {
  margin: 0;
  color: #e4edf0;
  font-size: 22px;
  font-weight: 900;
}

.game-stat-title strong {
  color: #d4dde2;
  font-size: 23px;
  font-weight: 800;
}

.game-stat-gauge {
  height: 4px;
  margin: 10px 0 14px;
  background: rgba(161, 174, 181, 0.22);
}

.game-stat-gauge i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #cdd7dc, #7f8d96);
}

.game-stat-main p {
  max-width: 700px;
  margin: 0 0 18px;
  color: #8e9aa2;
  font-size: 15px;
  line-height: 1.7;
}

.game-stat-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(147, 162, 172, 0.22);
}

.game-stat-main h4 {
  margin: 0 0 12px;
  color: #cbd5da;
  font-size: 18px;
}

.game-detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-detail-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 8px;
  color: #9aa6ad;
  font-size: 15px;
}

.game-detail-list li::before {
  content: "-";
  margin-right: 8px;
  color: #b3c0c6;
}

.game-detail-list span {
  min-width: 0;
}

.game-detail-list strong {
  color: #ccd5da;
  font-size: 17px;
  font-weight: 800;
}

.game-effect-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 9px;
}

.game-effect-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(137, 154, 164, 0.22);
  background: rgba(11, 21, 27, 0.26);
  padding: 8px 10px;
}

.game-effect-list span {
  color: #c7d0d5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-effect-list strong {
  color: #e1ecec;
}

.game-effect-list small {
  grid-column: 1 / -1;
  color: #6f7e87;
  font-size: 11px;
}

.game-effect-list em {
  grid-column: 1 / -1;
  color: #8a979d;
  font-size: 11px;
  font-style: normal;
}

.game-effect-list .positive strong {
  color: #2de6a1;
}

.game-effect-list .negative strong {
  color: #ff8d7f;
}

.game-empty {
  color: #8b98a0;
  border: 1px dashed rgba(148, 164, 174, 0.25);
  padding: 12px;
}

.game-stat-visual {
  padding: 34px 24px 28px 0;
}

.game-visual-title {
  margin-bottom: 14px;
  color: #cbd5da;
  font-size: 18px;
  font-weight: 900;
}

.game-damage-visual {
  min-height: 390px;
  display: grid;
  place-items: center;
  background: rgba(50, 65, 73, 0.24);
}

.game-damage-visual .body-damage {
  grid-template-columns: 150px 1fr;
  width: 100%;
  max-width: 360px;
}

.game-damage-visual .body-figure {
  transform: scale(1.42);
}

.game-damage-visual .body-damage li,
.game-damage-visual .body-damage strong {
  color: #b9c4ca;
  font-size: 14px;
}

.recoil-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 390px;
}

.recoil-column {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(65, 80, 88, 0.32), rgba(26, 39, 46, 0.48));
}

.recoil-column::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48px;
  width: 92px;
  height: 190px;
  transform: translateX(-50%);
  border-radius: 50% 50% 18px 18px;
  background: rgba(144, 158, 166, 0.09);
}

.recoil-column i {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aab5bb;
}

.recoil-column.active-path i {
  background: #23c98d;
}

.visual-legend {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  color: #89959c;
  font-size: 13px;
}

.visual-legend span::before,
.visual-legend strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #aab5bb;
}

.visual-legend strong {
  color: #9eb4ae;
  font-weight: 700;
}

.visual-legend strong::before {
  background: #23c98d;
}

.speed-visual {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 390px;
}

.speed-visual div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  color: #b7c1c7;
  font-size: 15px;
}

.speed-visual div i {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, #2de6a1, rgba(45, 230, 161, 0.12));
}

.breath-visual {
  position: relative;
  min-height: 390px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(135, 151, 160, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(135, 151, 160, 0.18) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    rgba(48, 63, 72, 0.22);
}

.scope-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(184, 198, 205, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.scope-ring.outer {
  width: 250px;
  height: 250px;
  background: rgba(9, 19, 25, 0.22);
}

.scope-ring.middle {
  width: 98px;
  height: 98px;
  border-color: rgba(45, 230, 161, 0.86);
}

.scope-ring.inner {
  width: 54px;
  height: 54px;
  border-color: rgba(220, 234, 239, 0.8);
}

.breath-visual span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #2de6a1;
  box-shadow: 0 0 0 12px rgba(45, 230, 161, 0.14);
}

.breath-visual.hipfire .scope-ring.outer {
  width: 260px;
  height: 260px;
  border-color: rgba(232, 83, 74, 0.5);
}

.panel-title,
.stage-head,
.hero-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title span,
.stage-head span {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.panel-title strong,
.stage-head p,
.muted,
.weapon-row span,
.attachment-card span,
.selected-list span,
.saved-list span,
.kv span {
  color: var(--muted);
  font-size: 13px;
}

.stage-head {
  align-items: flex-start;
}

.stage-head h1 {
  margin: 2px 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.stage-actions {
  display: none;
}

.field {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.field:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 191, 122, 0.1);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.segmented button {
  color: #465565;
  font-size: 13px;
}

.segmented .active,
.weapon-row.active,
.slot-card.active,
.attachment-card.active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px rgba(16, 191, 122, 0.08);
}

.weapon-list,
.attachment-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 306px);
  overflow: auto;
  padding-right: 4px;
}

.weapon-row {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--text);
  padding: 10px 38px 10px 10px;
  position: relative;
}

.weapon-row::before {
  display: none;
}

.weapon-row-thumb {
  width: 82px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 234, 240, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(247, 250, 252, 0.9), #ffffff 36%, #ffffff 64%, rgba(247, 250, 252, 0.9));
  overflow: hidden;
}

.weapon-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 8px 12px rgba(15, 39, 53, 0.12));
}

.weapon-row-thumb span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weapon-row-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.weapon-row-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.weapon-row-copy > span {
  line-height: 1.35;
}

.weapon-row.active::after {
  content: "✓";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.weapon-row strong,
.attachment-card strong {
  word-break: keep-all;
  overflow-wrap: normal;
}

.weapon-panel .weapon-list {
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.stage {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
  padding: 22px 30px 16px;
  border-radius: var(--radius);
  background: #fefefe;
  overflow: hidden;
}

.stage-weapon-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #fefefe;
  overflow: visible;
}

.stage-weapon-photo img {
  width: min(91%, 1030px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: translateY(-8px);
  mix-blend-mode: multiply;
  filter: none;
}

.weapon-svg,
.slot-lines,
.hero-section {
  display: none;
}

.stage-slots {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.stage-added-region {
  position: relative;
  z-index: 4;
  min-height: 90px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 253, 251, 0.96), rgba(239, 251, 245, 0.92));
}

.stage-added-strip {
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  padding: 2px 2px 8px;
}

.stage-added-scroll {
  width: 30px;
  height: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #07885e;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.stage-added-scroll:hover {
  border-color: #10b981;
  background: #effdf6;
}

.stage-added-card {
  flex: 0 0 clamp(136px, calc((100% - 30px) / 4), 176px);
  min-width: 136px;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "badge copy"
    "source source";
  gap: 4px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(16, 185, 129, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #172334;
  text-align: left;
  box-shadow: none;
  scroll-snap-align: start;
}

.stage-added-card:hover,
.stage-added-card.active {
  border-color: #10b981;
  background: #effdf6;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.14);
}

.stage-added-badge {
  grid-area: badge;
  width: max-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.13);
  color: #008b5d;
  font-size: 10px;
  font-weight: 900;
}

.stage-added-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.stage-added-copy small,
.stage-added-source {
  color: #516070;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-added-copy strong {
  color: #0f2735;
  font-size: 12px;
  line-height: 1.16;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.stage-added-source {
  grid-area: source;
  color: #0a8f60;
}

.slot-node {
  position: absolute;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #172334;
  display: block;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  overflow: visible;
}

.slot-node-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 2px, transparent 3px),
    linear-gradient(180deg, #22d391, #079b64);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), 0 10px 22px rgba(6, 95, 70, 0.22);
  transform: translate(-50%, -50%);
}

.slot-node-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 138px;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "badge slot"
    "name name";
  gap: 2px 6px;
  padding: 7px 9px 8px;
  border: 1px solid rgba(16, 185, 129, 0.58);
  border-radius: 8px;
  background: rgba(240, 253, 247, 0.94);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
  transform: translate(var(--label-x, 14px), var(--label-y, -42px));
  backdrop-filter: blur(12px);
}

.slot-node-card::before {
  content: "";
  position: absolute;
  top: 20px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.7);
}

.slot-node.label-right .slot-node-card::before {
  left: -18px;
}

.slot-node.label-left .slot-node-card::before {
  right: -18px;
}

.slot-node-slot {
  grid-area: slot;
  align-self: center;
  color: #516070;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-node strong {
  grid-area: name;
  color: #111827;
  font-size: 11px;
  line-height: 1.18;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.slot-node em {
  grid-area: badge;
  align-self: center;
  width: max-content;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #008b5d;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.slot-node.filled .slot-node-card {
  border-color: rgba(16, 185, 129, 0.68);
}

.slot-node.added .slot-node-card {
  background:
    linear-gradient(180deg, rgba(240, 253, 247, 0.98), rgba(229, 251, 240, 0.94));
}

.slot-node.active .slot-node-pin {
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.22), 0 12px 24px rgba(6, 95, 70, 0.26);
}

.slot-node.active .slot-node-card {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.16), 0 18px 34px rgba(15, 23, 42, 0.16);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: 10px -28px 0;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.stat-strip div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
}

.stat-strip span {
  color: #516070;
  font-size: 13px;
}

.stat-strip strong {
  color: #0f2735;
  font-size: 22px;
}

.stat-strip small {
  color: var(--green);
}

.stage-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 10px -28px 0;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.stage-stat-card {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 9px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stage-stat-card:nth-child(5n) {
  border-right: 0;
}

.stage-stat-card span {
  color: #516070;
  font-size: 12px;
}

.stage-stat-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.stage-stat-card strong {
  color: #0f2735;
  font-size: 16px;
  line-height: 1.1;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 12px;
}

.slot-panel .slot-grid {
  min-height: 0;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.slot-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  color: var(--text);
  background: #ffffff;
  padding: 10px;
  isolation: isolate;
}

.slot-card-thumb {
  width: 100%;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #8794a3;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
}

.slot-card-thumb img {
  max-width: 100%;
  max-height: 34px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 8px 12px rgba(15, 39, 53, 0.1));
}

.slot-card-thumb.empty {
  border-color: rgba(226, 234, 240, 0.9);
  background: rgba(255, 255, 255, 0.58);
  padding: 2px 4px;
}

.slot-card span {
  color: var(--muted);
  font-size: 13px;
}

.slot-card strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  min-height: 36px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.slot-card.filled strong {
  color: #0b8f61;
}

.slot-card.added {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(180deg, #ffffff 0%, #effdf7 100%);
}

.slot-badge {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-conflicts {
  margin-top: 12px;
  border: 1px solid rgba(244, 63, 94, 0.22);
  border-radius: var(--radius);
  background: #fff7f7;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.slot-conflicts strong {
  color: #be123c;
  font-size: 13px;
}

.slot-conflicts span {
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.35;
}

.slot-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
  margin-top: 16px;
}

.scheme-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.scheme-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.scheme-summary span,
.hero-kpis span,
.hero-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.scheme-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.filter-grid,
.build-inputs {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.attachment-list {
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  max-height: 230px;
}

.attachment-card {
  min-height: 104px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.attachment-card.name-only {
  min-height: 116px;
  align-content: stretch;
  text-align: left;
  color: var(--text);
  background: #fff;
  box-shadow: none;
  padding: 10px 12px 12px;
  isolation: isolate;
}

.attachment-card-image {
  min-height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  overflow: hidden;
}

.attachment-card-image img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 8px 12px rgba(15, 39, 53, 0.12));
}

.attachment-card-image.empty {
  border-color: rgba(226, 234, 240, 0.9);
  background: rgba(255, 255, 255, 0.58);
}

.attachment-card-image.empty small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attachment-card.name-only strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.attachment-card > div:first-child {
  display: grid;
  gap: 4px;
}

.attachment-card button {
  width: 100%;
  min-height: 32px;
  color: var(--green);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips span {
  border: 1px solid #e9eef3;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #536170;
  font-size: 12px;
  line-height: 1.35;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.chips .effect-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  border-radius: 8px;
  padding: 7px 9px;
}

.effect-chip em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.effect-chip strong {
  color: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.effect-chip small {
  grid-column: 1 / -1;
  color: #7b8996;
  font-size: 11px;
  line-height: 1.3;
}

.chips .positive {
  color: #0b9d68;
  border-color: #bfeedd;
  background: #effbf6;
}

.chips .negative {
  color: var(--red);
  border-color: #ffd7ce;
  background: #fff5f2;
}

.current-card p,
.detail-stack p {
  color: #667380;
  line-height: 1.55;
}

.panel-title.small {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.detail-stack {
  display: grid;
  gap: 10px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-section {
  display: grid;
  gap: 8px;
}

.detail-section h4 {
  margin: 0;
  color: #0f2433;
  font-size: 13px;
  font-weight: 900;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.drawer-detail .kv {
  min-height: 62px;
  align-content: space-between;
  align-items: start;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, var(--drawer-card-alpha, 0.92));
}

.drawer-detail .kv strong {
  align-self: end;
  font-size: 17px;
}

.falloff {
  display: grid;
  gap: 5px;
  border: 1px solid #f2e4bd;
  border-radius: var(--radius);
  padding: 9px;
  color: #8b6b15;
  background: #fffbef;
  font-size: 12px;
}

.cycle-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-tabs {
  display: flex;
  gap: 26px;
  margin: -6px 0 14px;
  border-bottom: 1px solid var(--line);
}

.stat-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  color: #647282;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.stat-tabs button.active {
  color: var(--green);
  box-shadow: inset 0 -2px 0 var(--green);
}

.current-impact-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(180px, 0.55fr) minmax(360px, 1.4fr);
  gap: 12px;
  align-items: start;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid rgba(16, 191, 122, 0.2);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, rgba(16, 191, 122, 0.14), transparent 270px),
    linear-gradient(135deg, #f8fffc, #ffffff 55%, #f5fbff);
  box-shadow: 0 16px 34px rgba(22, 43, 54, 0.06);
}

.impact-copy,
.impact-direct,
.impact-bars-wrap {
  min-width: 0;
}

.impact-copy span,
.tile-impact > span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.impact-copy strong {
  display: block;
  margin: 4px 0;
  color: #102333;
  font-size: 18px;
  line-height: 1.25;
}

.impact-copy small,
.impact-copy p,
.compact-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.impact-copy p {
  margin: 8px 0 0;
}

.impact-direct {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

.impact-direct div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(218, 229, 236, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 9px 10px;
}

.impact-direct span {
  color: #687787;
  font-size: 12px;
}

.impact-direct strong {
  font-size: 15px;
  white-space: nowrap;
}

.effect-bars {
  display: grid;
  gap: 7px;
}

.effect-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid #dce8ee;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 10px;
}

.effect-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  opacity: 0.16;
  border-radius: inherit;
}

.effect-bar span,
.effect-bar strong {
  position: relative;
  z-index: 1;
  font-size: 12px;
  line-height: 1.2;
}

.effect-bar span {
  min-width: 0;
  overflow: hidden;
  color: #425262;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.effect-bar strong {
  color: #162b3a;
  white-space: nowrap;
}

.effect-bar.positive {
  border-color: rgba(16, 191, 122, 0.26);
}

.effect-bar.positive i {
  background: var(--green);
}

.effect-bar.negative {
  border-color: rgba(239, 93, 75, 0.24);
}

.effect-bar.negative i {
  background: var(--red);
}

.effect-bar.neutral i {
  background: #88a0b2;
}

.stat-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-overview div {
  min-height: 82px;
  border: 1px solid #dfe9ef;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.stat-overview span,
.stat-overview small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-overview strong {
  display: block;
  margin: 5px 0 2px;
  color: #102333;
  font-size: 24px;
  line-height: 1;
}

.analysis-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.analysis-board.light-analysis {
  align-items: stretch;
}

.analysis-tile {
  min-height: 310px;
  border: 1px solid #dde7ee;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #fbfdfc);
  padding: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(29, 45, 61, 0.04);
}

.analysis-tile.focus {
  border-color: rgba(16, 191, 122, 0.48);
  box-shadow: 0 18px 38px rgba(16, 191, 122, 0.12);
}

.analysis-tile h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

.analysis-tile h3::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--green);
}

.analysis-tile p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.analysis-tile > strong {
  display: block;
  margin-bottom: 6px;
  color: #0d2535;
  font-size: 28px;
  line-height: 1;
}

.tile-impact {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f6;
}

.tile-impact .effect-bars {
  margin-top: 7px;
}

.tile-impact .effect-bar {
  min-height: 24px;
  padding: 5px 8px;
}

.light-impact {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f6;
}

.light-impact > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.light-impact span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin-top: 6px;
  border: 1px solid rgba(16, 191, 122, 0.22);
  border-radius: 999px;
  background: rgba(16, 191, 122, 0.08);
  color: #0d8b61;
  padding: 5px 9px;
  font-size: 12px;
}

.light-impact small {
  grid-column: 1 / -1;
  color: #7b8996;
  font-size: 11px;
  line-height: 1.25;
}

.light-impact em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.light-impact span.negative {
  border-color: rgba(239, 93, 75, 0.22);
  background: rgba(239, 93, 75, 0.08);
  color: #d85a48;
}

.light-impact span.neutral {
  border-color: rgba(120, 140, 154, 0.22);
  background: rgba(120, 140, 154, 0.08);
  color: #647282;
}

.light-impact b {
  color: inherit;
}

.light-impact p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-chart {
  width: 100%;
  height: 128px;
  border: 1px solid rgba(16, 191, 122, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 253, 250, 0.92)),
    linear-gradient(90deg, rgba(227, 235, 240, 0.5) 1px, transparent 1px),
    linear-gradient(180deg, rgba(227, 235, 240, 0.5) 1px, transparent 1px);
  background-size: auto, 25% 33%, 25% 33%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.detail-chart .falloff-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 8px rgba(16, 191, 122, 0.18));
}

.detail-chart .falloff-area {
  fill: url("#falloffArea");
  stroke: none;
}

.detail-chart .chart-grid line {
  stroke: #e3ebf0;
  stroke-width: 1.5;
}

.falloff-point circle {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 3;
}

.falloff-point text,
.falloff-distance {
  fill: #0d8b61;
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.falloff-distance {
  fill: #607382;
  font-size: 10.5px;
  font-weight: 800;
}

.falloff-panel {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.falloff-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(16, 191, 122, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.falloff-row {
  display: grid;
  grid-template-columns: minmax(50px, 0.75fr) minmax(74px, 1.35fr) minmax(40px, 0.65fr) minmax(50px, 0.75fr);
  align-items: center;
  min-height: 34px;
  border-top: 1px solid rgba(226, 236, 242, 0.9);
  color: #4d5c69;
  font-size: 11.5px;
}

.falloff-row:first-child {
  border-top: 0;
}

.falloff-row span,
.falloff-row strong {
  min-width: 0;
  padding: 7px 6px;
  overflow-wrap: normal;
  word-break: keep-all;
}

.falloff-row span:nth-child(2) {
  overflow-wrap: anywhere;
  word-break: normal;
}

.falloff-head {
  min-height: 30px;
  background: linear-gradient(180deg, rgba(16, 191, 122, 0.1), rgba(16, 191, 122, 0.04));
  color: #0d8b61;
  font-weight: 900;
}

.falloff-row strong {
  justify-self: stretch;
  color: #0d8b61;
  font-weight: 950;
  text-align: right;
}

.mini-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 11px;
}

.body-damage {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.body-figure {
  position: relative;
  width: 78px;
  height: 170px;
  margin: 0 auto;
  opacity: 0.82;
}

.body-figure span {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, #e7f1ed, #b6c8c2);
  border: 1px solid #9dafaa;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.45);
}

.body-figure .head {
  top: 4px;
  left: 28px;
  width: 24px;
  height: 28px;
  border-radius: 50%;
}

.body-figure .torso {
  top: 36px;
  left: 21px;
  width: 36px;
  height: 68px;
  border-radius: 14px 14px 10px 10px;
}

.body-figure .arm {
  top: 42px;
  width: 14px;
  height: 66px;
  border-radius: 10px;
}

.body-figure .arm.left {
  left: 4px;
  transform: rotate(11deg);
}

.body-figure .arm.right {
  right: 4px;
  transform: rotate(-11deg);
}

.body-figure .leg {
  top: 100px;
  width: 16px;
  height: 66px;
  border-radius: 10px;
}

.body-figure .leg.left {
  left: 22px;
}

.body-figure .leg.right {
  right: 22px;
}

.body-damage ul,
.detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.body-damage li,
.detail-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #677483;
  font-size: 12px;
}

.body-damage strong,
.detail-list strong {
  color: #4b5967;
  font-weight: 700;
  white-space: nowrap;
}

.analysis-tile.body-tile {
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 145, 237, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-color: rgba(37, 145, 237, 0.18);
  box-shadow: 0 18px 42px rgba(30, 104, 170, 0.08);
}

.analysis-tile.body-tile h3 {
  color: #1688ef;
  font-size: 18px;
  font-weight: 950;
}

.analysis-tile.body-tile h3::after {
  width: 42px;
  height: 3px;
  background: #1688ef;
}

.body-damage-showcase {
  display: block;
}

.body-stage {
  position: relative;
  min-height: 304px;
  margin-top: 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 255, 0.8)),
    radial-gradient(circle at 50% 44%, rgba(37, 145, 237, 0.08), transparent 46%);
  overflow: hidden;
}

.body-panel-icon,
.body-menu-dot {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  color: #1688ef;
  background: rgba(37, 145, 237, 0.1);
}

.body-panel-icon {
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-weight: 950;
}

.body-menu-dot {
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.body-damage-showcase .tactical-figure {
  position: absolute;
  left: 50%;
  top: 22px;
  z-index: 2;
  width: 134px;
  height: 258px;
  transform: translateX(-50%);
  opacity: 1;
  filter: drop-shadow(0 14px 16px rgba(27, 54, 78, 0.2));
  object-fit: contain;
  object-position: center bottom;
}

.body-soldier-img {
  user-select: none;
  pointer-events: none;
}

.damage-callout {
  position: absolute;
  z-index: 4;
  min-width: 62px;
  max-width: 74px;
  border: 1px solid rgba(37, 145, 237, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(28, 65, 102, 0.12);
  padding: 8px 10px;
}

.damage-callout span {
  display: block;
  color: #1688ef;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.damage-callout strong {
  display: block;
  margin-top: 5px;
  color: #1688ef;
  font-size: 23px;
  font-weight: 950;
  line-height: 0.95;
}

.damage-callout.head {
  top: 28px;
  right: 8px;
}

.damage-callout.torso {
  top: 66px;
  left: 8px;
}

.damage-callout.abdomen {
  top: 160px;
  right: 8px;
}

.damage-callout.arms {
  top: 96px;
  right: 8px;
}

.damage-callout.legs {
  bottom: 34px;
  left: 8px;
}

.damage-line {
  position: absolute;
  z-index: 3;
  height: 1px;
  background: #1688ef;
  transform-origin: left center;
}

.damage-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1688ef;
  box-shadow: 0 0 0 3px rgba(37, 145, 237, 0.12);
}

.damage-line.head {
  top: 58px;
  left: calc(50% + 15px);
  right: 78px;
  width: auto;
}

.damage-line.torso {
  top: 94px;
  left: 74px;
  width: max(28px, calc(50% - 93px));
}

.damage-line.torso::before {
  left: auto;
  right: -4px;
}

.damage-line.abdomen {
  top: 134px;
  left: calc(50% + 4px);
  width: clamp(42px, calc(50% - 48px), 78px);
  height: 48px;
  background: transparent;
  border-left: 1px solid #1688ef;
  border-bottom: 1px solid #1688ef;
  border-radius: 0 0 0 8px;
}

.damage-line.arms {
  top: 129px;
  left: calc(50% + 48px);
  right: 78px;
  width: auto;
  transform: rotate(-6deg);
}

.damage-line.legs {
  bottom: 74px;
  left: 74px;
  width: max(24px, calc(50% - 104px));
}

.damage-line.legs::before {
  left: auto;
  right: -4px;
}

.body-footnote {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(37, 145, 237, 0.12);
  color: #1688ef;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-list.two-col {
  grid-template-columns: 1fr 1fr;
}

.detail-list.two-col li {
  grid-template-columns: 1fr;
  gap: 2px;
}

.recoil-list li {
  grid-template-columns: minmax(0, 1fr) 54px auto;
}

.dot-meter {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.dot-meter i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9d3dd;
}

.dot-meter i.active {
  background: var(--green);
}

.gauge {
  width: 92px;
  height: 46px;
  margin: 16px auto 0;
  border-radius: 92px 92px 0 0;
  position: relative;
  overflow: hidden;
  background: conic-gradient(from 270deg at 50% 100%, rgba(16, 191, 122, 0.5) 0 var(--gauge-arc, 90deg), #dfe6ed 0 180deg, transparent 0);
}

.gauge::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: -1px;
  height: 35px;
  border-radius: 74px 74px 0 0;
  background: #fff;
}

.gauge span {
  position: absolute;
  z-index: 1;
  bottom: -4px;
  left: 36px;
  width: 42px;
  height: 3px;
  background: #98a7b4;
  transform: rotate(var(--gauge-angle, -38deg));
  transform-origin: left center;
  transition: transform 180ms ease;
}

.radar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
}

.radar {
  position: relative;
  width: 92px;
  height: 92px;
  border: 1px solid #dfe7ed;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(16, 191, 122, 0.08), transparent 32%),
    radial-gradient(circle, transparent 0 25%, #eef3f6 26% 27%, transparent 28% 50%, #eef3f6 51% 52%, transparent 53%),
    conic-gradient(from 0deg, transparent 0 24%, #eef3f6 24% 25%, transparent 25% 49%, #eef3f6 49% 50%, transparent 50% 74%, #eef3f6 74% 75%, transparent 75%);
}

.radar span {
  position: absolute;
  left: var(--radar-left, 26px);
  top: var(--radar-top, 26px);
  width: var(--radar-size, 40px);
  height: var(--radar-size, 40px);
  border: 2px solid rgba(16, 191, 122, 0.55);
  border-radius: 50% 45% 52% 40%;
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease;
}

.radar i {
  position: absolute;
  left: var(--radar-dot-left, 46px);
  top: var(--radar-dot-top, 46px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  transform: translate(-50%, -50%);
  transition: left 180ms ease, top 180ms ease;
}

.cycle-strip div,
.analysis-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.cycle-strip span,
.analysis-card span,
.analysis-card p,
.analysis-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.cycle-strip strong,
.analysis-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(120px, 0.55fr));
  gap: 10px;
  margin-bottom: 14px;
}

.analysis-card {
  min-height: 116px;
}

.analysis-card.wide {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.analysis-card.wide strong {
  font-size: 28px;
  color: #102333;
}

.analysis-card:not(.wide) {
  display: grid;
  align-content: center;
  gap: 6px;
}

.analysis-card:not(.wide) strong {
  font-size: 24px;
}

.damage-chart {
  width: 100%;
  height: 120px;
}

.damage-chart path {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.damage-chart line {
  stroke: #dce5ec;
  stroke-width: 2;
}

.stat-table {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
}

.stat-table.compact {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.stats-panel .stat-table.compact {
  display: none;
}

.stat-head {
  display: none;
}

.stat-row {
  min-height: 122px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.stat-table.compact .stat-row {
  min-height: 104px;
  padding: 12px;
}

.stat-row span:first-child {
  color: var(--text);
  font-weight: 900;
}

.stat-row span:nth-child(2)::before {
  content: "基础 ";
  color: var(--muted);
}

.stat-row span:nth-child(3)::before {
  content: "变化 ";
  color: var(--muted);
}

.stat-row strong::before {
  content: "合计 ";
  color: var(--muted);
  font-weight: 400;
}

.stat-row strong,
.positive-text {
  color: var(--green);
}

.negative-text {
  color: var(--red);
}

.selected-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.selected-list div,
.saved-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 10px;
}

.selected-list div {
  display: grid;
  gap: 5px;
}

.saved-list {
  display: grid;
  gap: 8px;
}

.saved-list article {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.saved-list strong,
.saved-list span {
  display: block;
}

.soft-empty,
.empty-state {
  border: 1px dashed #d8e0e8;
  color: var(--muted);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  height: min(678px, 100vh);
  z-index: 40;
  background: transparent;
}

.drawer-backdrop::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 100%;
  background: rgba(18, 30, 43, 0.24);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.attachment-drawer {
  position: fixed;
  top: 14px;
  left: 26px;
  right: 26px;
  bottom: auto;
  z-index: 41;
  width: auto;
  height: min(650px, calc(100vh - 28px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, var(--drawer-bg-alpha, 0.7));
  backdrop-filter: blur(16px) saturate(120%);
  box-shadow: 0 34px 90px rgba(28, 43, 56, 0.22);
  padding: 18px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.drawer-head span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.drawer-head h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.drawer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: auto;
}

.drawer-opacity-control {
  min-width: 232px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  border: 1px solid rgba(210, 223, 232, var(--drawer-surface-alpha, 0.82));
  border-radius: var(--radius);
  background: rgba(255, 255, 255, var(--drawer-surface-alpha, 0.82));
  padding: 8px 10px;
}

.drawer-opacity-control small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.drawer-opacity-control input {
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
}

.drawer-opacity-control strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.drawer-tools {
  display: grid;
  grid-template-columns: 220px minmax(220px, 1fr);
  gap: 10px;
}

.drawer-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
}

.drawer-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-height: none;
  min-height: 0;
  overflow: auto;
  align-content: start;
  align-items: start;
  padding: 2px 6px 2px 2px;
}

.drawer-detail {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 253, var(--drawer-card-alpha, 0.92));
  padding: 18px;
  scrollbar-gutter: stable;
}

.drawer-detail-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.drawer-detail .panel-title.small {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-detail .panel-title.small strong {
  max-width: 52%;
  white-space: normal;
  text-align: right;
  line-height: 1.35;
}

.drawer-detail .detail-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.drawer-detail .detail-meta-grid,
.drawer-detail .wide-section {
  grid-column: 1 / -1;
}

.drawer-detail .detail-section {
  align-content: start;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, var(--drawer-card-alpha, 0.92));
}

.drawer-detail .positive-section,
.drawer-detail .negative-section,
.drawer-detail .wide-section {
  grid-column: 1 / -1;
}

.drawer-detail .wide-section {
  min-height: auto;
}

.drawer-detail .chips {
  align-content: start;
}

.drawer-detail .chips span {
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  flex: 1 1 220px;
}

.drawer-detail .detail-stack p {
  margin: 0;
  color: #536170;
}

.attachment-drawer .field,
.attachment-drawer .attachment-card.name-only,
.attachment-drawer .soft-empty {
  background: rgba(255, 255, 255, var(--drawer-card-alpha, 0.92));
}

.attachment-drawer .attachment-card.name-only.active {
  background: rgba(224, 250, 239, var(--drawer-card-alpha, 0.92));
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.remove-attachment-button {
  min-height: 44px;
  border: 1px solid rgba(239, 93, 75, 0.38);
  background: rgba(239, 93, 75, 0.06);
  color: var(--red);
  font-weight: 900;
}

.remove-attachment-button:hover:not(:disabled) {
  border-color: rgba(239, 93, 75, 0.72);
  background: rgba(239, 93, 75, 0.11);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.empty-state {
  margin: 48px;
}

@media (min-width: 1800px) {
  .stage {
    gap: 14px;
    padding: 18px 42px 18px;
  }

  .stage-weapon-photo {
    align-items: center;
    padding: 0 70px 96px;
  }

  .stage-weapon-photo img {
    width: min(68%, 920px);
    max-height: 245px;
    transform: translateY(-22px);
  }

  .stage-added-region {
    min-height: 82px;
  }
}

@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  }

  .top-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .workbench {
    grid-template-columns: 280px minmax(520px, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "weapons center"
      "weapons slots"
      "detail detail"
      "build build";
    align-items: start;
  }

  .center-stack,
  .weapon-panel,
  .stage-panel,
  .slot-panel {
    height: auto;
  }

  .stage {
    min-height: 300px;
    height: auto;
  }

  .slot-panel {
    position: static;
  }

  .detail-dock {
    grid-template-columns: 1fr;
  }

  .cycle-strip,
  .analysis-grid,
  .analysis-board {
    grid-template-columns: 1fr 1fr;
  }

  .game-detail-body {
    grid-template-columns: 220px minmax(320px, 1fr);
  }

  .game-stat-visual {
    grid-column: 2;
    padding: 0 34px 28px;
  }

  .current-impact-panel {
    grid-template-columns: 1fr 1fr;
  }

  .impact-bars-wrap {
    grid-column: 1 / -1;
  }

  .analysis-card.wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .site-shell {
    padding: 0 14px 18px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    margin: 0 -14px 14px;
    padding: 14px;
  }

  .main-nav {
    grid-column: 1;
    justify-self: center;
    justify-content: center;
    overflow: auto;
  }

  .workbench,
  .middle-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "weapons"
      "center"
      "slots"
      "detail"
      "build";
  }

  .weapon-panel {
    position: static;
  }

  .slot-grid,
  .attachment-list,
  .stat-strip,
  .stat-table,
  .stat-table.compact,
  .drawer-list,
  .analysis-board,
  .stat-overview {
    grid-template-columns: 1fr 1fr;
  }

  .current-impact-panel {
    grid-template-columns: 1fr;
  }

  .game-detail-body {
    grid-template-columns: 1fr;
  }

  .game-stat-nav {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    overflow: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(111, 130, 141, 0.2);
  }

  .game-stat-nav button {
    min-height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }

  .game-stat-main,
  .game-stat-visual {
    grid-column: auto;
    padding: 22px;
  }

  .game-effect-list,
  .recoil-visual {
    grid-template-columns: 1fr;
  }

  .game-detail-shell {
    min-height: 0;
  }

  .impact-bars-wrap {
    grid-column: auto;
  }

  .stage {
    min-height: 210px;
  }

  .stage-added-strip {
    gap: 8px;
    min-height: 0;
    padding: 2px 2px 8px;
  }

  .stage-added-card {
    flex-basis: 148px;
    min-height: 54px;
    padding: 7px 8px;
  }

  .slot-node-card {
    width: 112px;
    min-height: 44px;
    padding: 6px 8px;
  }

  .slot-node-slot {
    font-size: 9px;
  }

  .slot-node strong {
    font-size: 10px;
  }

  .slot-node em {
    padding: 1px 4px;
    font-size: 8px;
  }

  .slot-node[data-slot="上贴片"] .slot-node-card {
    transform: translate(-64px, -48px);
  }

  .slot-node[data-slot="增高座瞄具"] .slot-node-card {
    transform: translate(-52px, 2px);
  }

  .slot-node[data-slot="战术设备"] .slot-node-card {
    transform: translate(12px, -58px);
  }

  .slot-node[data-slot="提把座"] .slot-node-card {
    transform: translate(-118px, 10px);
  }

  .attachment-drawer {
    top: 14px;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    height: auto;
  }

  .drawer-head {
    flex-direction: column;
  }

  .drawer-head-actions {
    width: 100%;
    margin-left: 0;
  }

  .drawer-opacity-control {
    min-width: 0;
    flex: 1;
  }

  .drawer-body {
    grid-template-columns: 1fr;
  }

  .drawer-detail {
    max-height: 360px;
  }
}

@media (max-width: 640px) {
  .slot-grid,
  .attachment-list,
  .stat-strip,
  .stat-table,
  .stat-table.compact,
  .cycle-strip,
  .analysis-grid,
  .analysis-board,
  .filter-grid,
  .build-inputs,
  .slot-actions,
  .scheme-summary,
  .drawer-tools,
  .drawer-list,
  .analysis-card.wide,
  .stat-overview {
    grid-template-columns: 1fr;
  }

  .current-impact-panel {
    padding: 12px;
  }

  .game-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-detail-head span {
    font-size: 18px;
  }

  .game-stat-title {
    grid-template-columns: 1fr;
  }

  .game-detail-list li {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .game-detail-list strong {
    grid-column: 2;
  }

  .drawer-detail .detail-stack,
  .drawer-detail .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .game-damage-visual .body-damage {
    grid-template-columns: 1fr;
  }

  .stage-added-region {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 6px;
    padding: 8px;
  }

  .stage-added-scroll {
    width: 26px;
    height: 44px;
    min-height: 44px;
  }

  .stage-added-card {
    flex-basis: min(154px, 74vw);
  }

  .weapon-row {
    grid-template-columns: 1fr;
  }

  .weapon-row::before,
  .weapon-row.active::after {
    display: none;
  }
}


