﻿:root {
  color-scheme: light;
  --red: #e86a9c;
  --red-dark: #cf4c84;
  --ink: #171b20;
  --muted: #7a828e;
  --line: #ecd7e1;
  --soft: #fff4f8;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  color: var(--white);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  background:
    linear-gradient(90deg, rgba(44, 20, 32, 0.92) 0 20%, rgba(60, 28, 45, 0.82) 44%, rgba(92, 42, 70, 0.76) 100%),
    radial-gradient(circle at 72% 14%, rgba(255, 168, 205, 0.30), transparent 38%),
    linear-gradient(145deg, #2f1322 0%, #4a2038 52%, #6a3150 100%);
  background-attachment: fixed;
}

body.route-pending .gate-root,
body.route-pending .gate-modal,
body.route-pending .app-shell,
body.route-pending #detailModal,
body.route-pending #outfitterModal,
body.gate-page .app-shell,
body.gate-page #detailModal,
body.gate-page #outfitterModal,
body.app-page .gate-root,
body.app-page .gate-modal {
  display: none;
}

body.gate-page {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #fff4f8;
}

.gate-root {
  display: grid;
  place-items: center;
  min-height: 100vh;
  width: 100%;
}

.gate-open-button {
  width: min(320px, calc(100vw - 48px));
  height: 76px;
  padding: 0 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--red);
  box-shadow: 0 18px 38px rgba(207, 76, 132, 0.28);
  font-size: 26px;
  font-weight: 700;
}

.gate-open-button:hover,
.gate-open-button:focus-visible {
  outline: 0;
  transform: translateY(-1px);
  background: var(--red-dark);
  box-shadow: 0 22px 46px rgba(207, 76, 132, 0.34);
}

.gate-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 8, 14, 0.46);
}

.gate-modal[hidden] {
  display: none;
}

.gate-dialog {
  width: min(360px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 248, 252, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.gate-dialog h1 {
  margin: 0 0 16px;
  color: var(--red-dark);
  font-size: 20px;
  line-height: 1.2;
}

.gate-code-input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
}

.gate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.gate-actions button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.gate-cancel-button {
  color: var(--ink);
  background: #fff;
}

.gate-confirm-button {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
  font-weight: 700;
}

.gate-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: #ba315f;
  font-size: 13px;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: auto minmax(820px, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 32px 40px 30px 16px;
}

.settings-card {
  align-self: start;
  display: grid;
  grid-template-columns: 324px;
  column-gap: 24px;
  color: var(--ink);
  background: rgba(255, 248, 252, 0.98);
  border-radius: 4px;
  padding: 16px 24px 22px;
  box-shadow: var(--shadow);
}

.settings-card.buff-open {
  grid-template-columns: 324px 430px;
  width: 806px;
}

.settings-section {
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.settings-section:last-of-type {
  border-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: start;
  min-height: 32px;
  gap: 8px;
}

.section-title h2 {
  margin: 0;
  margin-right: auto;
  color: var(--red);
  font-size: 16px;
  font-weight: 700;
}

.section-title.compact h2 {
  font-size: 15px;
}

.field-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin-top: 8px;
}

.field-row > span {
  color: #111820;
  font-weight: 700;
}

select,
input[type="number"],
input[type="text"],
input[type="search"] {
  width: 100%;
  height: 32px;
  padding: 5px 10px;
  border: 1px solid #e7c7d6;
  border-radius: 3px;
  color: #222a33;
  background-color: #fff;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

button {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.small-button,
.ghost-button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e9c8d7;
  color: #2a3440;
  background: #fff;
}

.red-fill {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.accent-small {
  color: var(--red);
  border-color: #ff9a96;
}

.quick-menu {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.quick-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  user-select: none;
}

.quick-menu summary::-webkit-details-marker {
  display: none;
}

.quick-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 112px;
  padding: 6px 0;
  border: 1px solid #d9dce2;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(37, 44, 54, 0.16);
}

.quick-menu-panel button {
  height: 32px;
  padding: 0 14px;
  color: #2a3440;
  background: #fff;
  border-radius: 0;
  text-align: left;
  white-space: nowrap;
}

.quick-menu-panel button:hover,
.quick-menu-panel button:focus-visible {
  outline: 0;
  background: #f5f7fa;
}

.outline-button {
  height: 32px;
  border: 1px solid #e9c8d7;
  color: #222a33;
  background: #fff;
}

.accent-outline {
  color: var(--red);
  border-color: var(--red);
}

.primary-button {
  grid-column: 1 / -1;
  height: 40px;
  color: #fff;
  background: var(--red);
  font-weight: 700;
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inline-check,
.merge-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #313944;
  font-size: 13px;
  white-space: nowrap;
}

.inline-check input,
.merge-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}

.stats-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
}

.stat-row span {
  font-weight: 700;
}

.stat-row input {
  height: 31px;
  padding: 5px 10px;
  border: 1px solid #e7c7d6;
  background: #fff7fa;
}

.stat-row .suffix {
  position: absolute;
}

.result-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(560px, 58%) minmax(420px, 42%);
  grid-template-rows: 54px 150px minmax(520px, 1fr);
  grid-template-areas:
    "header header"
    "total bars"
    "attr bars";
  column-gap: 34px;
  row-gap: 18px;
  padding-top: 0;
}

.buff-detail-pane {
  grid-column: 2;
  grid-row: 1 / span 4;
  padding: 0 12px 0 12px;
  border-left: 1px solid var(--line);
}

.buff-detail-head,
.team-buff-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.buff-detail-head h2,
.team-buff-head h2 {
  margin: 0;
  margin-right: auto;
  color: var(--red);
  font-size: 16px;
}

.buff-select-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.buff-select-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 0;
}

.buff-select-row > span {
  font-weight: 700;
}

.cell-select {
  height: 32px;
  padding-left: 10px;
  border: 1px solid #e7c7d6;
  border-radius: 5px;
  background-color: #fff;
}

.buff-combo {
  position: relative;
  min-width: 0;
}

.buff-combo-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 9px 0 10px;
  color: #2a3440;
  text-align: left;
}

.buff-combo-arrow {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  line-height: 1;
}

.buff-combo-arrow::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-right: 1.35px solid #c8cdd4;
  border-bottom: 1.35px solid #c8cdd4;
  transform: rotate(45deg);
}

.buff-combo.open .buff-combo-arrow::before {
  top: 5px;
  transform: rotate(225deg);
}

.buff-combo.open .buff-combo-button {
  border-color: var(--red);
}

.buff-combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 310px;
  padding: 6px 0;
  overflow-y: auto;
  border: 1px solid #e3d7dc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(37, 44, 54, 0.18);
}

.buff-combo.open .buff-combo-menu {
  display: block;
}

.buff-combo-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 30px;
  padding: 5px 12px;
  color: #2a3440;
  background: #fff;
  border-radius: 0;
  text-align: left;
}

.buff-combo-option span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buff-combo-option:hover,
.buff-combo-option:focus-visible {
  outline: 0;
  background: #f8eef1;
}

.buff-combo-option.selected {
  background: #fff1ee;
  font-weight: 700;
}

.buff-combo-option-gear {
  min-height: 34px;
  padding: 4px 8px;
  grid-template-columns: minmax(0, 1fr);
}

.buff-combo-option-gear > .outfit-gear-option-content {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.buff-combo-option-gear.selected {
  background: #ded1df;
}

.buff-combo-option .outfit-gear-option-content,
.gear-select .outfit-gear-option-content {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 76px 54px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  color: #4b525d;
  font-weight: 400;
}

.buff-combo-option .outfit-gear-option-content.compact,
.gear-select .outfit-gear-option-content.compact {
  grid-template-columns: 22px minmax(0, 1fr) 0 54px;
}

.outfit-gear-icon {
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1px solid #151515;
  border-radius: 3px;
  background:
    radial-gradient(circle at 35% 30%, rgba(162, 124, 208, 0.68), transparent 34%),
    radial-gradient(circle at 66% 68%, rgba(58, 190, 171, 0.42), transparent 30%),
    #050607;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.outfit-gear-main {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outfit-gear-name {
  color: #7d25b3;
  font-weight: 700;
}

.outfit-gear-name-orange {
  color: #d97706;
}

.outfit-gear-effect {
  color: #e11d48;
  font-weight: 700;
}

.outfit-gear-attrs,
.outfit-gear-meta {
  color: #5f6670;
  font-weight: 400;
}

.outfit-gear-compare-slot {
  min-width: 76px;
  color: #707986;
  text-align: right;
  white-space: nowrap;
}

.outfit-gear-compare-slot .buff-option-metric {
  min-width: 0;
}

.outfit-gear-option-content.compact .outfit-gear-compare-slot {
  display: none;
}

.outfit-gear-grade {
  color: #555d68;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.buff-option-metric {
  min-width: 64px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.buff-option-metric.positive,
.buff-option-metric.percent {
  color: #18a058;
}

.buff-option-metric.negative {
  color: var(--red);
}

.buff-option-metric.neutral {
  color: #707986;
}

.team-buff-head {
  margin-top: 12px;
}

.buff-icon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  border: 0;
  align-content: start;
}

.team-select-row {
  grid-template-columns: 84px minmax(0, 1fr);
}

.stage-header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 0 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.stage-header h1 {
  margin: 0;
  font-size: 18px;
}

.stage-header span {
  display: none;
}

.fight-time {
  font-weight: 700;
}

.hero-result {
  display: contents;
}

.total-block {
  grid-area: total;
  position: relative;
  align-self: start;
  padding-top: 26px;
}

.total-number {
  display: inline-block;
  color: #fff;
  font-size: 64px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0;
}

.detail-button {
  margin-left: 14px;
  padding: 8px 12px;
  color: #fff;
  background: var(--red);
  font-weight: 700;
  vertical-align: 16px;
}

.total-block p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.skill-bars {
  grid-area: bars;
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 9px;
  padding-top: 134px;
}

.skill-bar {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
}

.skill-bar-name,
.skill-bar-value {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.skill-bar-track {
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.skill-bar-fill {
  height: 100%;
  background: var(--red);
}

.charts-row {
  display: contents;
}

.chart-panel {
  grid-area: attr;
  min-height: 520px;
  padding: 0 0 12px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 36px;
  margin-bottom: 8px;
}

.chart-title-row h2 {
  margin: 0;
  font-size: 17px;
}

.chart-tabs {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.chart-tab {
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-right: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
}

.chart-tab:first-child {
  border-radius: 4px 0 0 4px;
}

.chart-tab:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0 4px 4px 0;
}

.chart-tab.active {
  color: var(--red);
  background: #fff;
}

.vertical-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 28px;
  height: 386px;
  padding: 18px 18px 34px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(rgba(255,255,255,0.14) 1px, transparent 1px) 0 0 / 100% 25%;
}

.vertical-bar {
  display: grid;
  grid-template-rows: 22px 1fr 22px;
  align-items: end;
  justify-items: center;
  height: 100%;
  min-width: 48px;
}

.vertical-bar strong {
  font-size: 13px;
}

.vertical-fill {
  width: 48px;
  min-height: 2px;
  background: var(--red);
}

.vertical-label {
  margin-top: 8px;
  color: #fff;
  font-weight: 700;
}

.modal.hidden,
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
}

#outfitterModal {
  display: grid;
  place-items: center;
  padding: 16px;
}

#detailModal {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.detail-dialog {
  position: relative;
  width: min(1000px, calc(100vw - 150px));
  max-height: calc(100vh - 120px);
  margin: 86px auto 0;
  color: #222a33;
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

#detailModal .detail-dialog {
  margin: 86px auto 0;
}

.outfitter-dialog {
  position: relative;
  width: min(1180px, calc(100vw - 48px));
  min-height: 720px;
  max-height: calc(100vh - 32px);
  margin: 0;
  color: #222a33;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.outfitter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 58px;
  padding: 14px 22px 8px;
}

.outfitter-title-row,
.outfitter-actions,
.side-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.outfitter-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.outfitter-title-row h2,
.gear-head-row h3,
.side-section-head h3,
.outfitter-plan-panel h3 {
  margin: 0;
  color: var(--red);
  font-size: 16px;
}

.icon-small-button {
  width: 28px;
  height: 28px;
  border: 1px solid #e9c8d7;
  color: #54606e;
  background: #fff;
}

.outfitter-body {
  display: grid;
  grid-template-columns: minmax(650px, 1fr) 380px;
  gap: 18px;
  padding: 0 22px 14px;
}

.gear-table-panel {
  min-width: 0;
}

.gear-head-row {
  display: grid;
  grid-template-columns: 42px 504px 182px;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.gear-head-row h3:first-child {
  grid-column: 1 / 3;
}

.gear-list {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}

.gear-row {
  display: grid;
  grid-template-columns: 42px 504px 182px;
  align-items: center;
  gap: 10px;
}

.gear-slot {
  font-weight: 700;
}

.gear-select,
.gear-mini-select {
  height: 32px;
  border: 1px solid #d4d8de;
  border-radius: 6px;
  color: #303842;
  background-color: #fff;
}

.gear-select {
  min-width: 0;
}

.outfit-combo {
  width: 100%;
}

.outfit-combo .gear-select,
.outfit-combo .gear-mini-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0 10px;
  font: inherit;
  text-align: left;
}

.outfit-combo .gear-select [data-outfit-current] {
  flex: 1;
  min-width: 0;
}

.outfit-combo .gear-select .outfit-gear-option-content {
  height: 100%;
}

.outfit-combo .buff-combo-menu {
  max-height: 320px;
}

.outfit-combo.drop-up .buff-combo-menu {
  top: auto;
  bottom: calc(100% + 4px);
}

.outfitter-plan-panel {
  width: 304px;
  margin-top: 28px;
}

.outfitter-plan-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.outfitter-plan-controls select {
  height: 32px;
  border: 1px solid #f0b5cb;
  border-radius: 4px;
  background-color: #fff;
  color: #303842;
}

.outfitter-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.outfitter-side-top {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 0;
}

.outfitter-side-top .side-section-head {
  min-height: 40px;
}

.big-enchant-panel,
.stone-panel {
  min-width: 0;
}

.big-enchant-list,
.stone-list {
  display: grid;
  gap: 9px;
  margin-top: 4px;
}

.big-enchant-row {
  display: block;
}

.outfitter-stat-box {
  border: 1px solid #d9dde4;
  padding: 10px;
  background: #fff;
}

.big-enchant-panel,
.stone-panel {
  border: 0;
  padding: 0;
  background: transparent;
}

.stone-panel .side-section-head {
  margin-bottom: 0;
}

.stone-panel .side-section-head h3 {
  white-space: nowrap;
}

.stone-panel select,
.big-enchant-panel select {
  height: 32px;
}

.stone-row {
  display: block;
}

.outfitter-stat-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 0;
}

.outfit-stat-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.outfit-stat-item span {
  color: #4c5560;
}

.outfit-stat-item strong {
  color: #202832;
}

.outfit-stat-item strong.rise {
  color: #17a34a;
}

.outfit-stat-item strong.fall {
  color: #e23d3d;
}

.outfitter-value-placeholder {
  min-height: 166px;
  border: 2px solid #f4b133;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
}

.damage-compare-label {
  margin: 0;
  color: #e23d3d;
  font-size: 24px;
  font-weight: 700;
}

.damage-compare-card {
  margin-top: 6px;
  border: 1px solid #cfd4db;
  border-radius: 10px;
  text-align: center;
  color: #5c636d;
  font-size: 42px;
  line-height: 1.25;
}

.damage-compare-row {
  margin-top: 8px;
}

.damage-compare-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 28px;
}

.damage-compare-change {
  color: #17a34a;
  font-size: 28px;
  font-weight: 700;
}

.damage-compare-change.fall {
  color: #e23d3d;
}

.damage-compare-after {
  color: #1ca357;
}

.outfitter-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 22px 22px;
  margin-left: auto;
}

.outfit-empty-value {
  color: #9aa2ad;
}

.moyi-import-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

.moyi-import-dialog {
  width: min(620px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.moyi-import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px;
  border-bottom: 1px solid #eef0f3;
}

.moyi-import-header h3 {
  margin: 0;
  color: var(--red);
  font-size: 17px;
}

.moyi-import-body {
  min-height: 190px;
  padding: 0 20px 20px;
}

.moyi-import-textarea {
  width: 100%;
  min-height: 76px;
  margin-top: 16px;
  resize: vertical;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  padding: 12px;
  color: #202832;
  font-size: 14px;
  line-height: 1.55;
}

.moyi-import-textarea::placeholder {
  color: #b2b7bf;
}

.moyi-import-hint {
  margin: 8px 0 0;
  color: #8a5464;
  font-size: 13px;
}

.moyi-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.moyi-import-loading,
.moyi-import-message {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #202832;
  font-size: 16px;
}

.moyi-import-message {
  flex-direction: column;
}

.moyi-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid rgba(198, 120, 205, 0.32);
  border-top-color: #b66fc3;
  animation: moyi-spin 0.8s linear infinite;
}

@keyframes moyi-spin {
  to {
    transform: rotate(360deg);
  }
}

.moyi-import-result {
  padding-top: 16px;
}

.moyi-import-success,
.moyi-import-failure {
  margin: 0 0 12px;
  color: #17a34a;
  font-size: 18px;
  font-weight: 700;
}

.moyi-import-failure {
  color: var(--red);
}

.moyi-import-note {
  margin: 10px 0 0;
  color: #8a5464;
  font-size: 13px;
}

.plan-name-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.plan-name-dialog {
  width: min(320px, calc(100vw - 48px));
  padding: 18px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.plan-name-dialog h3 {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 16px;
}

.plan-name-dialog input {
  width: 100%;
  height: 34px;
  border: 1px solid #f0b5cb;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 14px;
}

.plan-name-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 8px;
}

.detail-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-tabs {
  display: flex;
  gap: 6px;
}

.detail-tab {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d8dde5;
  color: #2c3440;
  background: #fff;
}

.detail-tab.active {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.close-button {
  width: 30px;
  height: 30px;
  color: #747d88;
  background: #fff;
  font-size: 26px;
  line-height: 1;
}

.detail-body {
  padding: 0 22px 26px;
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.detail-toolbar h2 {
  margin: 0;
  color: var(--red);
  font-size: 18px;
}

.table-wrap {
  max-height: 620px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  padding: 7px 8px;
  border-bottom: 1px solid #eef0f3;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--red);
  background: #fff;
  font-weight: 700;
}

td.numeric,
th.numeric {
  text-align: right;
}

.row-bar {
  background: linear-gradient(90deg, rgba(238, 64, 56, 0.28) var(--w), transparent var(--w));
}

.tag {
  display: inline-block;
  min-width: 60px;
}

.muted {
  color: var(--muted);
}

.formula-list {
  display: grid;
  gap: 10px;
}

.formula-item {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.formula-item h3 {
  margin: 0;
  padding: 9px 10px;
  color: var(--red);
  background: #fbf2f1;
}

.formula-item pre {
  margin: 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.45;
  background: #fff;
}

.buff-detail-head button {
  white-space: nowrap;
  min-width: 78px;
}





