:root {
  --bg: #d8c9af;
  --paper: #f3e5cc;
  --ink: #261c13;
  --muted: #6d604f;
  --line: rgba(160, 103, 42, 0.44);
  --red: #aa332d;
  --gold: #b9822a;
  --green: #2f7567;
  --blue: #2d678f;
  --shadow: 0 14px 32px rgba(32, 22, 12, 0.2);
}

@font-face {
  font-family: "SgzInkTitle";
  src: url("./assets/fonts/MaShanZheng-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SgzHeroInk";
  src: url("./assets/fonts/LongCang-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SgzHeroStele";
  src: url("./assets/fonts/ZCOOLXiaoWei-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: clip;
  scrollbar-gutter: stable;
  background: var(--bg);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("./assets/chaos-heroes-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(226, 211, 184, 0.42), rgba(216, 201, 175, 0.62) 46%, rgba(206, 188, 158, 0.78)),
    radial-gradient(circle at 18% 12%, rgba(185, 130, 42, 0.18), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(109, 42, 30, 0.16), transparent 30%);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

.app {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 14px 12px 88px;
}

.screen {
  display: none;
}

.screen[hidden] {
  display: none !important;
}

.screen.is-active {
  display: block;
}

.topbar,
.battle-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 14px;
  border-bottom: 2px solid rgba(196, 142, 63, 0.28);
}

.battle-top {
  justify-content: flex-start;
}

.eyebrow,
h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

h1 {
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.06;
  color: #24170f;
  text-shadow: 0 1px 0 rgba(255, 244, 220, 0.72);
}

.battle-ink-title {
  position: relative;
  width: fit-content;
  padding: 0 16px 8px 0;
  color: #18120e;
  font-family: "SgzHeroStele", "STKaiti", "KaiTi", serif;
  font-size: clamp(34px, 8vw, 54px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  background: linear-gradient(180deg, #18120e 0%, #3a281e 58%, #54241e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.62px rgba(24, 18, 14, 0.66);
  filter: drop-shadow(0 1px 0 rgba(255, 245, 215, 0.52)) drop-shadow(0 2px 1px rgba(32, 21, 15, 0.13));
  transform: skewX(-2deg);
  transform-origin: left bottom;
  text-shadow: none;
}

.battle-ink-title::after {
  content: "";
  position: absolute;
  left: -2px;
  right: 4px;
  bottom: 1px;
  height: 7px;
  border-radius: 72% 28% 66% 34% / 48% 56% 44% 52%;
  background: linear-gradient(90deg, rgba(18, 13, 10, 0.72), rgba(45, 29, 21, 0.35), rgba(135, 38, 29, 0.14), rgba(18, 13, 10, 0));
  opacity: 0.84;
  z-index: -1;
}

.battle-ink-title::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(74, 38, 29, 0.66);
  box-shadow:
    -4px 17px 0 -2px rgba(25, 18, 14, 0.52),
    7px 27px 0 -3px rgba(128, 42, 34, 0.48);
  pointer-events: none;
}

h2 {
  font-size: 18px;
  color: #2d1d12;
}

h3 {
  font-size: 17px;
  color: #2d1d12;
}

.tool-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 246, 229, 0.9);
  color: var(--red);
  font-size: 25px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.scenario-picker {
  position: relative;
  z-index: 40;
}

.scenario-trigger {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(70px, auto) 12px;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  min-height: 40px;
  padding: 4px 8px 4px 6px;
  overflow: hidden;
  appearance: none;
  border: 1px solid rgba(101, 53, 24, 0.78);
  border-radius: 10px;
  color: #f9edcf;
  background:
    linear-gradient(135deg, rgba(255, 232, 166, 0.13), transparent 38%),
    linear-gradient(180deg, #6f3022 0%, #4c2019 54%, #351712 100%);
  box-shadow: 0 4px 12px rgba(45, 24, 13, 0.25), inset 0 0 0 1px rgba(255, 231, 170, 0.16);
  cursor: pointer;
}

.scenario-trigger::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -13px;
  width: 70px;
  height: 38px;
  border: 2px solid rgba(236, 192, 105, 0.12);
  border-radius: 50%;
  transform: rotate(-12deg);
  pointer-events: none;
}

.scenario-seal {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #6b241b;
  background: linear-gradient(180deg, #f7df9f, #bd772f);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 16px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(105, 44, 24, 0.3), 0 1px 3px rgba(20, 9, 5, 0.4);
}

.scenario-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.05;
}

.scenario-copy small {
  margin-bottom: 3px;
  color: rgba(255, 237, 200, 0.68);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.scenario-copy strong {
  overflow: hidden;
  color: #fff2cd;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(35, 13, 8, 0.8);
}

.scenario-chevron {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-right: 2px solid #edca80;
  border-bottom: 2px solid #edca80;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease;
}

.scenario-trigger[aria-expanded="true"] .scenario-chevron {
  transform: translateY(3px) rotate(225deg);
}

.scenario-trigger:focus-visible {
  outline: 2px solid rgba(183, 54, 39, 0.28);
  outline-offset: 2px;
}

.scenario-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(218px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid rgba(102, 54, 27, 0.78);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 249, 232, 0.94), rgba(244, 224, 183, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(122, 72, 31, 0.04) 10px 11px);
  box-shadow: 0 12px 28px rgba(50, 27, 14, 0.3), inset 0 0 0 2px rgba(255, 253, 239, 0.68);
  transform-origin: top right;
  animation: scenario-menu-in 0.16s ease-out;
}

.scenario-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 23px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(102, 54, 27, 0.72);
  border-left: 1px solid rgba(102, 54, 27, 0.72);
  background: #fbefd4;
  transform: rotate(45deg);
}

.scenario-option {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 6px 8px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  color: #4d2b1b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.scenario-option + .scenario-option {
  margin-top: 3px;
  border-top: 1px dashed rgba(116, 73, 35, 0.18);
}

.scenario-option:hover,
.scenario-option:focus-visible {
  outline: none;
  background: rgba(183, 74, 50, 0.1);
}

.scenario-option.is-selected {
  color: #fff4d3;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.16), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #58231c);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.18), 0 2px 6px rgba(75, 33, 20, 0.17);
}

.scenario-option-seal {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.35);
  border-radius: 50%;
  color: #773121;
  background: linear-gradient(180deg, #f7df9f, #d5a453);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 215, 0.42);
}

.scenario-option > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.scenario-option strong {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  line-height: 1.15;
}

.scenario-option small {
  margin-top: 3px;
  color: rgba(80, 46, 28, 0.64);
  font-size: 9px;
  white-space: nowrap;
}

.scenario-option.is-selected small {
  color: rgba(255, 239, 201, 0.72);
}

.scenario-option i {
  color: transparent;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.scenario-option.is-selected i {
  color: #f6d78a;
}

@keyframes scenario-menu-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings,
.team-panel,
.result-team,
.results,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.88), rgba(241, 221, 188, 0.86)),
    rgba(245, 230, 201, 0.84);
  backdrop-filter: blur(2px);
  box-shadow: var(--shadow);
}

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

.settings label {
  color: #432619;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 249, 234, 0.9);
}

.settings label > span {
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 247, 226, 0.68);
  box-shadow: 0 1px 0 rgba(95, 54, 29, 0.14);
}

.battle-setting {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.battle-setting-title {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  border-radius: 8px;
  color: #32160f;
  background: rgba(255, 248, 230, 0.86);
  box-shadow: 0 1px 2px rgba(73, 38, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 1px 0 #fffdf5, 0 0 3px rgba(255, 250, 232, 0.96);
  white-space: nowrap;
}

.battle-setting-title i {
  display: grid;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  place-items: center;
  color: #fff1cf;
  background: linear-gradient(180deg, #a9513e, #713025);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 159, 0.34), 0 1px 2px rgba(61, 25, 16, 0.28);
  font-size: 12px;
  font-style: normal;
  text-shadow: 0 1px 0 #3c160f;
}

.setting-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.setting-select {
  position: relative;
  min-width: 0;
}

.setting-select-trigger,
.setting-stepper {
  width: 100%;
  min-height: 41px;
  border: 1px solid rgba(106, 55, 30, 0.58);
  border-radius: 9px;
  color: #4b2618;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), transparent 42%),
    linear-gradient(180deg, rgba(255, 247, 220, 0.98), rgba(220, 183, 119, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -2px 0 rgba(104, 57, 29, 0.13),
    0 2px 4px rgba(74, 39, 20, 0.18);
}

.setting-select-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 12px;
  cursor: pointer;
}

.setting-select-trigger strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-select-trigger small,
.setting-number-value small {
  color: #8c5f39;
  font-size: 11px;
  font-weight: 900;
}

.setting-chevron {
  width: 8px;
  height: 8px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 2px solid #7c3e2b;
  border-bottom: 2px solid #7c3e2b;
  transition: transform 160ms ease;
}

.setting-select.is-open {
  z-index: 30;
}

.setting-select.is-open .setting-select-trigger {
  border-color: #8b3328;
  box-shadow: inset 0 0 0 1px rgba(157, 54, 39, 0.18), 0 3px 8px rgba(67, 29, 18, 0.24);
}

.setting-select.is-open .setting-chevron {
  transform: translateY(2px) rotate(225deg);
}

.setting-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  min-width: 94px;
  padding: 5px;
  border: 1px solid rgba(91, 43, 24, 0.65);
  border-radius: 9px;
  background: rgba(250, 237, 207, 0.98);
  box-shadow: 0 7px 16px rgba(46, 23, 13, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.battle-setting:last-child .setting-select-menu {
  right: 0;
  left: auto;
}

.setting-select-menu button {
  width: 100%;
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  color: #5b3420;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.setting-select-menu button + button {
  margin-top: 3px;
  border-top: 1px dashed rgba(116, 73, 35, 0.22);
}

.setting-select-menu button:hover,
.setting-select-menu button:focus-visible {
  outline: none;
  background: rgba(210, 164, 91, 0.26);
}

.setting-select-menu button.is-selected {
  color: #fff4d2;
  background: linear-gradient(180deg, #b85743, #7d3027);
  text-shadow: 0 1px 0 #431811;
}

.setting-stepper {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  overflow: hidden;
}

.setting-stepper > button {
  padding: 0;
  border: 0;
  color: #743324;
  background: rgba(138, 69, 43, 0.08);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.setting-stepper > button:first-child {
  border-right: 1px solid rgba(108, 57, 31, 0.22);
}

.setting-stepper > button:last-child {
  border-left: 1px solid rgba(108, 57, 31, 0.22);
}

.setting-stepper > button:active {
  color: #fff0cd;
  background: #8a3a2c;
}

.setting-number-value {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 249, 231, 0.38);
}

.setting-number-value input {
  width: min(66px, calc(100% - 20px));
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #4b2618;
  background: transparent;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: none;
}

.setting-select[data-setting-select="runs"] .setting-select-trigger small {
  font-size: 14px;
  line-height: 1;
}

.setting-number-value small {
  font-size: 14px;
  line-height: 1;
}

.setting-number-value:focus-within {
  background: rgba(255, 255, 245, 0.68);
}

label {
  display: grid;
  gap: 6px;
  min-width: 130px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--ink);
  padding: 0 9px;
}

option {
  background: #fff8ec;
  color: #261c13;
}

.single-board,
.versus-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.team-panel,
.result-team,
.panel {
  padding: 12px;
}

.team-head {
  display: grid;
  grid-template-columns: auto minmax(150px, 260px);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.my-team-head {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 136px);
  gap: 3px;
}

.my-team-tab-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.my-team-tabs {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 31px);
  flex: 0 1 auto;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x;
  scroll-snap-type: x proximity;
}

.my-team-tabs::-webkit-scrollbar { display: none; }

.my-team-tabs button,
.my-team-add {
  flex: 0 0 auto;
  border: 1px solid rgba(110, 61, 32, 0.44);
  border-radius: 7px;
  background: rgba(255, 248, 232, 0.76);
  color: #6b3522;
  font-size: 13px;
  font-weight: 900;
}

.my-team-tabs button {
  max-width: 116px;
  padding: 7px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  scroll-snap-align: start;
}

.my-team-tabs button.is-selected {
  border-color: rgba(116, 65, 29, 0.76);
  color: #fff7d4;
  background: linear-gradient(180deg, #d39432, #a9681f);
  text-shadow: 0 1px 0 #52240b;
}

.my-team-tabs button.is-selected[data-faction="wei"] { border-color: #294f7e; background: linear-gradient(180deg, #6c9bcb, #315b91); }
.my-team-tabs button.is-selected[data-faction="shu"] { border-color: #2e6341; background: linear-gradient(180deg, #79b884, #3f7951); }
.my-team-tabs button.is-selected[data-faction="wu"] { border-color: #7e302b; background: linear-gradient(180deg, #d87862, #9c4139); }
.my-team-tabs button.is-selected[data-faction="qun"] { border-color: #666965; background: linear-gradient(180deg, #c5c6bf, #81847f); }
.my-team-tabs button.is-selected[data-faction="han"] { border-color: #704d1c; background: linear-gradient(180deg, #c9a15e, #8b6128); }
.my-team-tabs button.is-selected[data-faction="mixed"] { border-color: #624738; background: linear-gradient(180deg, #aa8e78, #735847); }

.my-team-add {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #7d9a68, #4d704d);
  font-size: 22px;
  line-height: 1;
}

.my-team-add::before {
  content: "+";
  position: absolute;
  top: 47%;
  left: 50%;
  color: #fff3c4;
  transform: translate(-50%, -50%);
  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.my-team-add[data-faction="wei"] { border-color: #294f7e; background: linear-gradient(180deg, #6c9bcb, #315b91); }
.my-team-add[data-faction="shu"] { border-color: #2e6341; background: linear-gradient(180deg, #79b884, #3f7951); }
.my-team-add[data-faction="wu"] { border-color: #7e302b; background: linear-gradient(180deg, #d87862, #9c4139); }
.my-team-add[data-faction="qun"] { border-color: #666965; background: linear-gradient(180deg, #c5c6bf, #81847f); }
.my-team-add[data-faction="han"] { border-color: #704d1c; background: linear-gradient(180deg, #c9a15e, #8b6128); }
.my-team-add[data-faction="mixed"] { border-color: #624738; background: linear-gradient(180deg, #aa8e78, #735847); }

/* 我方“选择队伍”随当前队伍阵营变色，缩小后把更多空间留给标签页。 */
#sideAScreen .preset-trigger,
#sideBScreen .preset-trigger {
  width: min(136px, 29vw);
  min-height: 32px;
  padding: 6px 9px 6px 32px;
  border-radius: 12px;
  font-size: 13px;
}

#sideAScreen .preset-trigger::before,
#sideBScreen .preset-trigger::before {
  left: 7px;
  width: 20px;
  height: 20px;
  font-size: 11px;
}

#sideAScreen .preset-trigger[data-faction="wei"], #sideBScreen .preset-trigger[data-faction="wei"] { background: linear-gradient(180deg, #5d8cbd, #315b91 56%, #24456f); }
#sideAScreen .preset-trigger[data-faction="shu"], #sideBScreen .preset-trigger[data-faction="shu"] { background: linear-gradient(180deg, #6fa77a, #3f7951 56%, #2c5a3c); }
#sideAScreen .preset-trigger[data-faction="wu"], #sideBScreen .preset-trigger[data-faction="wu"] { background: linear-gradient(180deg, #c86655, #9c4139 56%, #76302c); }
#sideAScreen .preset-trigger[data-faction="qun"], #sideBScreen .preset-trigger[data-faction="qun"] { background: linear-gradient(180deg, #b7b8b0, #7d807b 56%, #575a57); }
#sideAScreen .preset-trigger[data-faction="han"], #sideBScreen .preset-trigger[data-faction="han"] { background: linear-gradient(180deg, #bb9150, #8b6128 56%, #68461c); }
#sideAScreen .preset-trigger[data-faction="mixed"], #sideBScreen .preset-trigger[data-faction="mixed"] { background: linear-gradient(180deg, #9b8370, #735847 56%, #563e31); }

.lineup-row,
.battle-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(154px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lineup-row::-webkit-scrollbar,
.battle-row::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.general-card,
.battle-card {
  min-width: 154px;
  border: 1px solid rgba(185, 130, 42, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(235, 210, 170, 0.96));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56), 0 8px 20px rgba(42, 30, 14, 0.1);
}

.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1.08 / 1;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #fff;
  background-color: #cba76e;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -42px 48px rgba(24, 16, 8, 0.52);
  overflow: hidden;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 237, 188, 0.42);
  border-radius: 7px;
  pointer-events: none;
}

.level-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 44px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 235, 170, 0.76);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(107, 40, 26, 0.92), rgba(64, 24, 18, 0.92));
  color: #ffe6a8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 8px rgba(18, 8, 4, 0.26);
}

.lineup-role-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 42px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 235, 170, 0.76);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(151, 45, 30, 0.96), rgba(92, 24, 20, 0.96));
  color: #fff0bd;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.56);
  box-shadow: 0 2px 8px rgba(18, 8, 4, 0.26);
}

.general-card[data-index="1"] .lineup-role-badge,
.general-card[data-index="2"] .lineup-role-badge {
  border-color: rgba(216, 231, 215, 0.7);
  background: linear-gradient(180deg, rgba(61, 89, 78, 0.94), rgba(35, 58, 51, 0.94));
  color: #eef5df;
}

.portrait-name {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  z-index: 1;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.card-main {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
}

.name-row strong,
.battle-card strong {
  color: #2d1d12;
}

.camp {
  min-width: 28px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), #741f1c);
  font-size: 12px;
  font-weight: 900;
}

.stats,
.book-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.book-trigger,
.skill-trigger {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid rgba(185, 130, 42, 0.44);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.96), rgba(238, 215, 177, 0.86));
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.skill-trigger {
  cursor: pointer;
}

.skill-trigger.is-invalid {
  position: relative;
  padding-right: 46px;
  border-color: rgba(159, 63, 47, 0.78);
  background: linear-gradient(180deg, rgba(255, 239, 228, 0.98), rgba(242, 202, 184, 0.9));
}

.skill-trigger.is-invalid::after {
  content: "失效";
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 2px 4px;
  border-radius: 4px;
  color: #fff7e8;
  background: #a13e2d;
  font-size: 11px;
  font-weight: 900;
}

.book-selected,
.skill-selected {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  color: #5b241d;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-trigger .book-note {
  display: none;
}

.equipment-trigger {
  display: block;
  align-items: center;
  width: 100%;
  min-height: 24px;
  padding: 1px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #39271b;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.equipment-trigger.has-equipment {
  background: transparent;
}

.equipment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  overflow: hidden;
  color: #70422d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.equipment-trait-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 28px;
  padding: 2px 3px;
  overflow: hidden;
  border: 1px solid rgba(66, 35, 21, 0.38);
  border-radius: 4px 8px 4px 8px;
  color: #fff2cf;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #9d4432, #69271f);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 1px rgba(32, 15, 9, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 172, 0.22),
    0 1px 2px rgba(61, 34, 18, 0.16);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-all;
}

.equipment-trait-tag::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 226, 157, 0.13);
  border-radius: 3px 6px 3px 6px;
  pointer-events: none;
}

.equipment-trait-tag[data-part="weapon"] {
  background:
    linear-gradient(135deg, rgba(255, 235, 195, 0.17), transparent 36%),
    linear-gradient(180deg, #a84735, #6d251f);
}

.equipment-trait-tag[data-part="armor"] {
  background:
    linear-gradient(135deg, rgba(255, 236, 181, 0.16), transparent 36%),
    linear-gradient(180deg, #8e6739, #5a3b22);
}

.equipment-trait-tag[data-part="mount"] {
  background:
    linear-gradient(135deg, rgba(231, 247, 213, 0.14), transparent 36%),
    linear-gradient(180deg, #567868, #304e43);
}

.equipment-trait-tag[data-part="treasure"] {
  background:
    linear-gradient(135deg, rgba(255, 229, 183, 0.15), transparent 36%),
    linear-gradient(180deg, #766083, #4d3958);
}

.equipment-trait-tag.equipment-trait-empty {
  color: #f4efe5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #8b8a84, #5f605d);
  text-shadow: 0 1px 1px rgba(31, 31, 29, 0.62);
}

.grade-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.grade-tabs button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 251, 242, 0.9);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  opacity: 0.82;
}

.grade-tabs button.is-selected {
  border-color: var(--red);
  background: linear-gradient(180deg, #fff0d5, #ddb46f);
  color: #8d2a24;
  box-shadow: inset 0 0 0 1px rgba(185, 130, 42, 0.26);
  opacity: 1;
}

.attribute-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid rgba(170, 51, 45, 0.28);
  border-radius: 7px;
  background: rgba(255, 244, 218, 0.8);
  color: #8b3025;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.red-stars {
  color: #b13a2c;
  font-size: 20px;
  letter-spacing: 4px;
  line-height: 1;
  white-space: nowrap;
}

.stats .is-boosted {
  color: #a52d25;
  font-weight: 900;
}

.general-card .stats {
  cursor: pointer;
}

.book-picker {
  width: min(720px, calc(100vw - 24px));
  position: relative;
  overflow: hidden;
  border-color: rgba(105, 48, 26, 0.54);
  background:
    linear-gradient(90deg, rgba(29, 18, 12, 0.36), rgba(255, 246, 226, 0.16) 30% 70%, rgba(29, 18, 12, 0.42)),
    url("./assets/dialog-bg-book-v3.jpg?v=20260808") center / cover no-repeat,
    linear-gradient(180deg, rgba(246, 229, 195, 0.72), rgba(227, 200, 154, 0.78));
}

.book-picker::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(26, 16, 11, 0.58), rgba(26, 16, 11, 0.08) 34%, rgba(255, 246, 226, 0.02) 50%, rgba(26, 16, 11, 0.08) 66%, rgba(26, 16, 11, 0.58)),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(72, 38, 22, 0.1) 27px, transparent 28px),
    radial-gradient(ellipse at 5% 86%, rgba(25, 18, 12, 0.82) 0 13%, transparent 14%),
    radial-gradient(ellipse at 95% 86%, rgba(25, 18, 12, 0.82) 0 13%, transparent 14%),
    linear-gradient(180deg, transparent 0 64%, rgba(29, 17, 11, 0.38) 100%);
  opacity: 0.58;
  pointer-events: none;
}

.book-picker::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(100deg, rgba(255, 246, 220, 0.08) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 50% 44%, rgba(255, 219, 151, 0.24), transparent 26%),
    conic-gradient(from 240deg at 7% 84%, transparent 0 18%, rgba(177, 117, 42, 0.28) 19% 21%, transparent 22% 48%, rgba(177, 117, 42, 0.24) 49% 51%, transparent 52%),
    conic-gradient(from 60deg at 93% 84%, transparent 0 18%, rgba(177, 117, 42, 0.28) 19% 21%, transparent 22% 48%, rgba(177, 117, 42, 0.24) 49% 51%, transparent 52%);
  pointer-events: none;
}

.book-picker > * {
  position: relative;
  z-index: 1;
}

.book-picker .picker-head h3 {
  color: #fff4dd;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(83, 31, 16, 0.8);
}

.picker.skill-picker {
  width: min(760px, calc(100vw - 24px));
  max-height: min(84vh, 760px);
  padding: 11px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.68), rgba(242, 221, 181, 0.56)),
    url("./assets/dialog-bg-skill-chibi-sandbox-v1.png?v=20260813") center / 100% 100% no-repeat,
    #f4ead2;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.58);
}

.picker.skill-picker::before {
  display: none;
}

.picker.skill-picker > * {
  position: relative;
  z-index: 1;
}

.picker.skill-picker .picker-head {
  margin-bottom: 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.skill-picker .picker-head h3 {
  margin-bottom: 3px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.picker.skill-picker .picker-head .skill-picker-summary {
  color: rgba(255, 239, 202, 0.76);
}

.picker.skill-picker .picker-head .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.skill-picker .picker-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.equipment-picker {
  width: min(560px, calc(100vw - 24px));
  height: min(86vh, 780px);
  max-height: min(86vh, 780px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border-color: rgba(91, 52, 30, 0.58);
  background:
    linear-gradient(90deg, rgba(255, 250, 235, 0.58), rgba(255, 247, 226, 0.38) 48%, rgba(255, 250, 235, 0.58)),
    url("./assets/dialog-bg-equipment-weapons-chibi-portrait-v2.png?v=20260817") center / 100% 100% no-repeat,
    #eee0bf;
}

.equipment-picker .picker-head h3 {
  color: #57291c;
}

.equipment-picker-summary {
  margin: 3px 0 0;
  color: rgba(86, 48, 27, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.equipment-picker-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.equipment-picker-tabs button {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: center;
  gap: 2px 5px;
  padding: 6px;
  border: 1px solid rgba(119, 77, 39, 0.35);
  border-radius: 8px;
  color: #4f2b1c;
  background: rgba(255, 251, 239, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.equipment-picker-tabs button > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff1c9;
  background: #72402c;
  font-size: 11px;
}

.equipment-picker-tabs button small {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
  color: #87654d;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-picker-tabs button.is-selected {
  border-color: #9e3829;
  color: #7d211c;
  background: linear-gradient(180deg, #fff0d5, #d8a859);
}

.equipment-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(54vh, 490px);
  overflow: auto;
  padding: 9px;
  border: 1px solid rgba(105, 61, 30, 0.25);
  border-radius: 8px;
  background: rgba(67, 43, 26, 0.16);
}

.equipment-picker-grid button {
  min-height: 66px;
  padding: 9px 10px;
  border: 1px solid rgba(127, 80, 39, 0.35);
  border-radius: 8px;
  color: #3f2618;
  background: rgba(255, 252, 242, 0.9);
  text-align: left;
}

.equipment-picker-grid button.is-selected {
  border-color: #a43628;
  background: linear-gradient(180deg, #fff0d5, #d8a859);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 219, 0.62);
}

.equipment-picker-grid button.is-unavailable {
  filter: grayscale(0.8);
  opacity: 0.5;
}

.equipment-picker-grid strong,
.equipment-picker-grid span,
.equipment-picker-grid small {
  display: block;
}

.equipment-picker-grid strong {
  color: #69251e;
  font-size: 15px;
}

.equipment-picker-grid strong em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff1cc;
  background: #8f3227;
  font-size: 9px;
  font-style: normal;
  vertical-align: 2px;
}

.equipment-picker-grid span {
  margin-top: 4px;
  color: #6b4c38;
  font-size: 11px;
  line-height: 1.35;
}

.equipment-picker-grid small {
  margin-top: 3px;
  color: #9a3b30;
  font-size: 10px;
}

.equipment-confirm {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
}

.skill-picker-summary {
  margin: 0;
  color: rgba(86, 48, 27, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.skill-picker-search {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  margin: 0 0 10px;
  padding: 4px 6px;
  border: 1px solid rgba(116, 66, 33, 0.42);
  border-radius: 10px;
  background: rgba(255, 250, 237, 0.76);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.1), 0 2px 7px rgba(70, 36, 19, 0.08);
}

.skill-picker-search > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff2cf;
  background: linear-gradient(180deg, #9f4b38, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.skill-picker-search input {
  min-width: 0;
  height: 30px;
  padding: 0;
  appearance: none;
  border: 0;
  outline: 0;
  color: #49261a;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.skill-picker-search input::placeholder {
  color: rgba(89, 55, 33, 0.52);
}

.skill-picker-search input::-webkit-search-cancel-button {
  display: none;
}

.skill-picker-search:focus-within {
  border-color: rgba(145, 55, 39, 0.72);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.08), 0 0 0 2px rgba(164, 67, 46, 0.12);
}

#clearSkillPickerSearch {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #784134;
  background: rgba(132, 74, 48, 0.12);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

#clearSkillPickerSearch[hidden] {
  visibility: hidden;
}

.skill-picker-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 72px;
  margin: 0;
  place-items: center;
  border: 1px dashed rgba(237, 197, 121, 0.42);
  border-radius: 8px;
  color: rgba(255, 244, 216, 0.86);
  background: rgba(42, 25, 16, 0.2);
  font-size: 13px;
  font-weight: 800;
}

.picker.team-score-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: min(86vh, 760px);
  position: relative;
  overflow: auto;
  padding-top: 18px;
  border-color: rgba(107, 43, 27, 0.5);
  background:
    linear-gradient(90deg, rgba(47, 20, 14, 0.12), rgba(255, 248, 230, 0.16) 24% 76%, rgba(47, 20, 14, 0.12)),
    linear-gradient(180deg, rgba(255, 250, 236, 0.26), rgba(238, 213, 171, 0.22)),
    url("./assets/dialog-bg-score-chibi-v2.png?v=20260820") center / cover no-repeat;
}

.picker.team-score-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(38, 17, 12, 0.08), transparent 22% 78%, rgba(38, 17, 12, 0.08)),
    radial-gradient(circle at 50% 44%, rgba(255, 246, 224, 0.24), rgba(255, 246, 224, 0.05) 48%, transparent 74%);
  pointer-events: none;
}

.picker.team-score-dialog > * {
  position: relative;
  z-index: 1;
}

.team-score-dialog header {
  min-height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 48px 0 0;
  margin-bottom: 10px;
}

.team-score-dialog header h2 {
  color: #421713;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: 0;
}

.team-score-dialog #closeTeamScore {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 3;
  transform: translateY(-50%);
  background: rgba(255, 248, 230, 0.96);
}

.team-score-body {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.team-score-summary {
  display: none;
}

.tier-medal {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 8px;
  color: #fff5df;
  background: linear-gradient(135deg, #cf4b33, #781f1a 60%, #31120e);
  font-size: 28px;
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 158, 0.32);
}

.team-score-summary strong {
  display: block;
  color: #7e241d;
  font-size: 36px;
  line-height: 1;
}

.team-score-summary span {
  color: var(--muted);
  font-weight: 900;
}

.radar-chart {
  width: min(300px, 100%);
  aspect-ratio: 1;
  overflow: visible;
  transform: translateX(22px);
}

.team-score-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.radar-panel {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 8px 18px 8px 8px;
  border: 1px solid rgba(126, 36, 29, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.48);
}

.radar-score-badge {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 86px;
  padding: 7px 8px;
  border: 1px solid rgba(126, 36, 29, 0.2);
  border-radius: 8px;
  background: rgba(255, 248, 230, 0.72);
}

.radar-score-badge strong {
  color: #8f261f;
  font-size: 24px;
  line-height: 1;
}

.radar-score-badge span {
  color: #4c281b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.radar-grid polygon {
  fill: none;
  stroke: rgba(126, 36, 29, 0.18);
  stroke-width: 1;
}

.radar-grid line {
  stroke: rgba(126, 36, 29, 0.22);
  stroke-width: 1;
}

.radar-grid text {
  fill: #6f201a;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

.radar-area {
  fill: rgba(201, 61, 43, 0.28);
  stroke: none;
}

.radar-line {
  fill: none;
  stroke: #a72c23;
  stroke-width: 3;
  stroke-linejoin: round;
}

.score-dimensions {
  display: none;
}

.score-dimensions span {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(126, 36, 29, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  text-align: center;
}

.score-dimensions em,
.score-dimensions strong {
  display: block;
  font-style: normal;
}

.score-dimensions em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.score-dimensions strong {
  color: #7e241d;
  font-size: 20px;
}

.score-notes {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.matchup-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.matchup-tables section {
  padding: 8px;
  border: 1px solid rgba(126, 36, 29, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.56);
}

.matchup-tables h3 {
  margin: 0 0 6px;
  color: #6f201a;
  font-size: 15px;
}

.matchup-tables table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.matchup-tables th,
.matchup-tables td {
  padding: 6px 5px;
  border-bottom: 1px solid rgba(126, 36, 29, 0.12);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  overflow-wrap: anywhere;
}

.matchup-tables th:last-child,
.matchup-tables td:last-child {
  width: 54px;
  text-align: right;
  white-space: nowrap;
}

.matchup-tables th {
  color: var(--muted);
  font-weight: 900;
}

.book-picker-layout {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
}

.book-type-tabs,
.book-choice-grid {
  display: grid;
  gap: 8px;
}

.book-type-tabs {
  gap: 5px;
  grid-auto-rows: minmax(24px, 1fr);
  height: 100%;
}

.book-type-tabs button,
.book-choice-grid button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.92);
  color: var(--ink);
  font-weight: 900;
}

.book-type-tabs button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 13px;
  line-height: 1.1;
}

.book-type-tabs button.is-selected,
.book-choice-grid button.is-selected {
  border-color: var(--red);
  background: linear-gradient(180deg, #fff0d5, #d8a859);
  color: #7d211c;
}

.book-choice-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(151, 91, 36, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 234, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.book-choice-panel h4 {
  margin: 0;
  color: #632018;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.book-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.book-choice-grid button {
  min-height: 58px;
  padding: 8px 9px;
  text-align: left;
}

.book-choice-grid strong,
.book-choice-grid span {
  display: block;
}

.book-choice-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.book-confirm {
  margin-top: 4px;
}

.book-empty-tip {
  grid-column: 1 / -1;
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(160, 103, 42, 0.5);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.skill-picker-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
  padding: 6px;
  border: 1px solid rgba(116, 66, 33, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 233, 0.6);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.07);
}

.skill-picker-tabs button {
  min-height: 32px;
  padding: 4px 3px;
  border: 1px solid rgba(123, 75, 40, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.72);
  color: #5a3020;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(74, 41, 22, 0.05);
}

.skill-picker-tabs button.is-selected {
  border-color: rgba(91, 40, 24, 0.76);
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 36%),
    linear-gradient(135deg, #8b3b2c, #58231c);
  color: #fff2ce;
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.14), 0 2px 5px rgba(71, 31, 19, 0.15);
}

.skill-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.5);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.skill-picker-grid button {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 6px 8px;
  border: 1px solid rgba(119, 70, 35, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.78);
  color: #452519;
  text-align: left;
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.45);
}

.skill-picker-grid button::before {
  content: "法";
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.32);
  border-radius: 50%;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.skill-picker-grid button::after {
  content: "";
  color: #f5d487;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.skill-picker-grid button:hover {
  border-color: rgba(143, 55, 39, 0.5);
  background: rgba(255, 246, 224, 0.96);
}

.skill-picker-grid button.is-selected {
  border-color: rgba(89, 39, 23, 0.82);
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  color: #fff3d2;
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
}

.skill-picker-grid button.is-selected::after {
  content: "✓";
}

.skill-picker-grid button.is-used {
  border-style: dashed;
  border-color: rgba(150, 59, 43, 0.62);
  background: rgba(250, 226, 195, 0.9);
  color: #823326;
}

.skill-picker-grid button.is-used::after {
  content: "移";
  color: #a04a37;
  font-family: "KaiTi", "STKaiti", serif;
}

.skill-picker-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-picker-grid strong {
  font-size: 14px;
  font-weight: 900;
}

.attribute-picker {
  width: min(620px, calc(100vw - 24px));
  position: relative;
  overflow: hidden;
  border-color: rgba(74, 37, 22, 0.72);
  background:
    url("./assets/dialog-bg-attribute-chibi-go-v1.png?v=20260813") center / 100% 100% no-repeat,
    #f6eed9;
}

.attribute-picker::before,
.attribute-picker::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.attribute-picker::before {
  display: none;
}

.attribute-picker::after {
  display: none;
}

.attribute-picker > * {
  position: relative;
  z-index: 1;
}

.attribute-picker .picker-head h3,
.attribute-subtitle {
  color: #512818;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.88);
}

.attribute-subtitle {
  margin-top: 3px;
  font-size: 12px;
}

.attribute-picker-body {
  display: grid;
  gap: 12px;
  padding: 2px;
}

.attribute-hero {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 12px 10px 10px;
  border: 1px solid rgba(127, 69, 31, 0.32);
  border-radius: 8px;
  background: rgba(255, 248, 228, 0.9);
}

.attribute-ribbon {
  color: #9a3827;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.attribute-hero strong {
  color: #301d13;
  font-size: 22px;
}

.attribute-hero span:last-child {
  color: #715844;
  font-size: 12px;
}

.red-star-picker {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 2px 0 4px;
}

.red-star-picker button {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(151, 54, 41, 0.3);
  font-weight: 900;
}

.red-star-picker button span {
  display: block;
  font-size: 39px;
  line-height: 1;
}

.red-star-picker button.is-selected {
  border-color: transparent;
  background: transparent;
  color: #b52d28;
  text-shadow: 0 1px 0 #ffe3b5, 0 2px 2px rgba(75, 22, 16, 0.4);
}

.attribute-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(151, 91, 36, 0.24);
  border-radius: 8px;
  background: rgba(255, 249, 232, 0.92);
}

.attribute-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 112px;
  align-items: center;
  gap: 8px;
}

.attribute-label {
  display: grid;
  gap: 2px;
}

.attribute-label strong {
  color: #3b2418;
  font-size: 14px;
}

.attribute-label span {
  color: #2d1d12;
  font-size: 19px;
  font-weight: 900;
}

.attribute-label .is-boosted {
  color: #a52d25;
}

.attribute-row input[type="range"] {
  width: 100%;
  min-height: 26px;
  accent-color: #a53228;
  touch-action: pan-y;
}

.attribute-stepper {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
}

.attribute-stepper strong {
  min-width: 34px;
  color: #8d2a24;
  font-size: 16px;
  text-align: center;
}

.attribute-step {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(160, 103, 42, 0.42);
  border-radius: 7px;
  background: #fff4da;
  color: #8d2a24;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.attribute-confirm {
  margin-top: 0;
}

.vs-mark {
  justify-self: center;
  width: 54px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.primary {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #d85a3e, #84251f 58%, #431512);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.sgz-action-btn {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 2px 2px rgba(21, 12, 4, 0.78);
  line-height: 1;
}

.lineup-actions .sgz-action-btn,
.result-actions .sgz-action-btn,
.member-upgrade-card .sgz-action-btn,
.team-score-btn {
  isolation: isolate;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  min-height: 0;
  width: 100%;
  aspect-ratio: 2020 / 450;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff4c8;
  background: url("./assets/btn-battle-unified-v12.png") center / 100% 100% no-repeat;
  filter: none;
  box-shadow: none;
  text-indent: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sgz-action-iron {
  color: #fff0c5;
  text-shadow: 0 2px 2px rgba(45, 11, 4, 0.86);
}

.sgz-action-iron:hover {
  filter: brightness(1.08) saturate(1.05);
}

.sgz-action-imperial {
  color: #fff5ce;
  text-shadow: 0 1px 0 #4a2509, 0 2px 2px rgba(61, 28, 5, 0.82);
  filter: none;
  box-shadow: none;
}

.sgz-action-imperial:hover {
  filter: brightness(1.13) saturate(1.08);
  transform: translateY(-1px);
}

.member-upgrade-card .sgz-action-imperial {
  min-width: 0;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1600 / 200;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("./assets/btn-unified-member-v10.png") center / 100% 100% no-repeat;
  white-space: nowrap;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secondary {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.9);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.lineup-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(116px, 15.2vw, 195px);
  gap: 10px;
  align-items: stretch;
  margin-top: 12px;
}

.lineup-actions .primary {
  margin-top: 0;
}

@media (max-width: 520px) {
  .picker.hall-of-fame-dialog .hall-of-fame-setup {
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 6px;
  }

  .picker.hall-of-fame-dialog .hall-of-fame-generate {
    padding-left: 34px;
    font-size: 13px;
  }

  .picker.hall-of-fame-dialog .hall-of-fame-generate::before {
    left: 7px;
    width: 21px;
    height: 21px;
    font-size: 11px;
  }

  .lineup-actions {
    grid-template-columns: minmax(0, 1fr) 31vw;
    gap: 2.5vw;
  }

  .team-score-btn span {
    font-size: 3vw;
  }

  .team-score-btn strong {
    margin-top: 0.5vw;
    font-size: 4.6vw;
  }

  .member-upgrade-card {
    grid-template-columns: minmax(0, 1fr) 38vw;
    gap: 2vw;
  }
}

.picker.hall-of-fame-dialog .hall-hero-strip {
  flex: 0 0 92px;
  position: relative;
  display: grid;
  place-items: end center;
  margin: 0 1px 8px;
  overflow: hidden;
  border: 1px solid rgba(75, 26, 16, 0.72);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(32, 12, 7, 0.03), rgba(42, 14, 8, 0.68)),
    url("./assets/hall-of-fame-bg-chibi-v1.png?v=20260822") center 18% / 100% auto no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 145, 0.25), 0 3px 8px rgba(42, 16, 8, 0.2);
}

.picker.hall-of-fame-dialog .hall-hero-strip::before,
.picker.hall-of-fame-dialog .hall-hero-strip::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 31%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 121, 0.72));
}

.picker.hall-of-fame-dialog .hall-hero-strip::before { left: 6%; }
.picker.hall-of-fame-dialog .hall-hero-strip::after { right: 6%; transform: scaleX(-1); }

.picker.hall-of-fame-dialog .hall-hero-strip > span {
  position: relative;
  z-index: 1;
  margin-bottom: 2px;
  padding: 2px 10px;
  color: #ffe5a0;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 4px rgba(31, 8, 4, 0.92);
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-hero-strip {
    flex-basis: 80px;
  }
}

/* 军师联盟保持两列，四个入口组成 2×2 工作台。 */
.strategist-action.hall-of-fame-entry {
  background-image: url("./assets/strategist-hall-entry-chibi-v5.png?v=20260823");
  background-image: image-set(
    url("./assets/strategist-hall-entry-chibi-v5.png?v=20260823") 1x,
    url("./assets/strategist-hall-entry-chibi-v5@2x.png?v=20260823") 2x
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-color: rgba(143, 92, 40, 0.45);
}

.hall-of-fame-entry .strategist-action-mark {
  border-color: rgba(255, 221, 137, 0.76);
  color: #fff0bc;
  background: radial-gradient(circle, rgba(167, 67, 43, 0.98), rgba(83, 29, 24, 0.98));
}

@media (max-width: 620px) {
  .strategist-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .strategist-workbench .strategist-action {
    min-height: 82px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .strategist-workbench .strategist-action-mark {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .strategist-workbench .strategist-action strong {
    font-size: 16px;
  }

  .strategist-workbench .strategist-action em {
    font-size: 10px;
    line-height: 1.25;
  }
}

.picker.hall-of-fame-dialog {
  width: min(760px, calc(100vw - 24px));
  height: min(90vh, 860px);
  max-height: min(90vh, 860px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  padding: 11px;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.77), rgba(242, 221, 181, 0.69)),
    url("./assets/dialog-bg-skill-chibi-sandbox-v1.png?v=20260813") center / 100% 100% no-repeat,
    #f4ead2;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.58);
}

.picker.hall-of-fame-dialog[open] {
  display: flex;
  flex-direction: column;
}

.picker.hall-of-fame-dialog .hall-of-fame-head {
  flex: 0 0 auto;
  margin-bottom: 9px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.hall-of-fame-dialog .hall-of-fame-head h3 {
  margin: 0 0 2px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 21px;
  letter-spacing: 0.08em;
}

.picker.hall-of-fame-dialog .hall-of-fame-head p {
  margin: 0;
  color: rgba(255, 239, 202, 0.76);
  font-size: 11px;
  font-weight: 800;
}

.picker.hall-of-fame-dialog .hall-of-fame-head .tool-btn {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.hall-of-fame-dialog .hall-of-fame-head .tool-btn > span {
  transform: translateY(-1px);
}

.hall-of-fame-setup {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 138px);
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(116, 66, 33, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 233, 0.61);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.07);
}

.hall-of-fame-upload {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(119, 70, 35, 0.3);
  border-radius: 8px;
  color: #542b1d;
  background: rgba(255, 252, 242, 0.8);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.45);
}

.picker.hall-of-fame-dialog .hall-of-fame-generate {
  position: relative;
  min-width: 0;
  min-height: 52px;
  padding: 0 10px 0 39px;
  border: 2px solid #4b2718;
  border-radius: 14px;
  color: #fff7d2;
  background:
    radial-gradient(ellipse at 11% 84%, rgba(255, 207, 155, 0.16) 0 6px, transparent 7px),
    radial-gradient(ellipse at 89% 21%, rgba(255, 207, 155, 0.13) 0 7px, transparent 8px),
    linear-gradient(180deg, #cf5143 0%, #b63c32 52%, #963127 100%);
  font-family: "Microsoft YaHei", serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 #552207;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.25), 0 3px 5px rgba(65, 34, 18, 0.24);
}

.picker.hall-of-fame-dialog .hall-of-fame-generate::before {
  content: "榜";
  position: absolute;
  left: 9px;
  top: 50%;
  display: grid;
  width: 23px;
  height: 23px;
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 1px solid rgba(81, 40, 21, 0.76);
  border-radius: 50% 50% 45% 45%;
  color: #fff1bf;
  background: rgba(112, 38, 27, 0.42);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 12px;
  line-height: 1;
}

.picker.hall-of-fame-dialog .hall-of-fame-generate:disabled {
  cursor: not-allowed;
  filter: grayscale(0.34);
  opacity: 0.52;
}

.picker.hall-of-fame-dialog .hall-of-fame-generate:not(:disabled):active {
  transform: translateY(1px);
  filter: brightness(0.94);
}

.hall-of-fame-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hall-of-fame-upload > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.32);
  border-radius: 50%;
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 16px;
  font-weight: 900;
}

.hall-of-fame-upload strong,
.hall-of-fame-upload small {
  display: block;
}

.hall-of-fame-upload strong { font-size: 13px; }
.hall-of-fame-upload small {
  margin-top: 2px;
  overflow: hidden;
  color: #87664d;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-of-fame-upload > em {
  padding: 5px 8px;
  border: 1px solid rgba(139, 57, 39, 0.28);
  border-radius: 7px;
  color: #752e23;
  background: linear-gradient(180deg, #fae7b7, #dfb766);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.hall-of-fame-upload.is-ready {
  border-color: rgba(112, 130, 72, 0.62);
  background: linear-gradient(180deg, rgba(249, 248, 222, 0.96), rgba(226, 225, 178, 0.88));
}

.hall-of-fame-result {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 9px;
  margin-top: 9px;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 55, 32, 0.46) transparent;
}

.hall-of-fame-empty {
  place-items: center;
  align-content: center;
  border: 1px dashed rgba(116, 66, 33, 0.3);
  border-radius: 10px;
  color: #795b46;
  background: rgba(255, 249, 233, 0.54);
  text-align: center;
}

.hall-of-fame-empty > div {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.hall-of-fame-empty span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  font-weight: 900;
}

.hall-of-fame-empty small { font-size: 11px; }

.hall-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.hall-summary > div {
  min-height: 52px;
  display: grid;
  place-content: center;
  padding: 6px;
  border: 1px solid rgba(119, 70, 35, 0.27);
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 252, 242, 0.88), rgba(239, 219, 179, 0.76));
}

.hall-summary strong,
.hall-summary span { display: block; }
.hall-summary strong { color: #783025; font-size: 17px; }
.hall-summary span { margin-top: 2px; color: #846750; font-size: 10px; font-weight: 900; }

.hall-formula {
  margin: 0;
  padding: 6px 8px;
  border: 1px dashed rgba(116, 66, 33, 0.25);
  border-radius: 8px;
  color: #795b46;
  background: rgba(255, 250, 237, 0.54);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.hall-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.hall-podium-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(119, 70, 35, 0.3);
  border-radius: 9px;
  background: rgba(255, 252, 242, 0.84);
  box-shadow: 0 2px 6px rgba(73, 39, 20, 0.08);
}

.hall-podium-card > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff5d5;
  background: #8d3c2d;
  font-size: 13px;
  font-weight: 1000;
}

.hall-podium-1 {
  border-color: rgba(164, 101, 25, 0.54);
  background: linear-gradient(180deg, #fff2c9, #e5bd67);
}

.hall-podium-2 { background: linear-gradient(180deg, #fffdf3, #ded3b7); }
.hall-podium-3 { background: linear-gradient(180deg, #fff0dc, #dcb387); }
.hall-podium-card div { min-width: 0; }
.hall-podium-card div strong,
.hall-podium-card div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-podium-card div strong { color: #542b1d; font-size: 12px; }
.hall-podium-card div small { color: #85654c; font-size: 9px; }
.hall-podium-card > b { color: #8b3025; font-size: 14px; }
.hall-podium-card > .hall-title { grid-column: 2 / -1; justify-self: start; }

.hall-ranking-list {
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.52);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.08);
}

.hall-ranking-list > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.hall-ranking-list h4 {
  margin: 0;
  color: #542b1d;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
}

.hall-ranking-list > header span { color: #8a6a50; font-size: 9px; font-weight: 800; }
.hall-ranking-list > div { display: grid; gap: 4px; }

.hall-ranking-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 27px minmax(92px, 1fr) 72px 64px 47px 45px;
  align-items: center;
  gap: 6px;
  min-height: 43px;
  padding: 5px 7px;
  border: 1px solid rgba(119, 70, 35, 0.22);
  border-radius: 7px;
  color: #563526;
  background: rgba(255, 252, 242, 0.78);
}

.hall-rank-number { color: #8d3c2d; text-align: center; }
.hall-member-copy { min-width: 0; }
.hall-member-copy strong,
.hall-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-member-copy strong { color: #4e2b1d; font-size: 12px; }
.hall-member-copy small { color: #8a6c53; font-size: 9px; }
.hall-ranking-row > span { color: #5b3b2c; font-size: 10px; font-weight: 900; text-align: right; }
.hall-ranking-row > span small { display: block; color: #9a7c63; font-size: 8px; }
.hall-ratio { color: #8b3025; font-size: 13px; text-align: right; }

.hall-title {
  min-width: 38px;
  padding: 3px 5px;
  border-radius: 999px;
  color: #fff5d7;
  background: #8d3c2d;
  font-style: normal;
  font-size: 9px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
}

.hall-title.is-war { background: #a96226; }
.hall-title.is-breaker { background: #8a4c34; }
.hall-title.is-general { background: #6d6540; }
.hall-title.is-elite { background: #4f7451; }
.hall-title.is-pillar { background: #52677d; }
.hall-title.is-brave { background: #806b56; }
.hall-title.is-new { background: #8a8278; }

@media (max-width: 620px) {
  .picker.hall-of-fame-dialog {
    height: min(92vh, 860px);
    max-height: min(92vh, 860px);
    padding: 9px;
  }

  .hall-ranking-row {
    grid-template-columns: 24px minmax(84px, 1fr) 61px 56px 42px 42px;
    gap: 4px;
    padding: 5px;
  }

  .hall-podium-card {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .hall-podium-card > b {
    grid-column: 2;
  }

  .hall-podium-card > .hall-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  .hall-podium { grid-template-columns: 1fr; }
  .hall-podium-card { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
  .hall-podium-card > b,
  .hall-podium-card > .hall-title { grid-column: auto; }
  .hall-ranking-row { grid-template-columns: 23px minmax(80px, 1fr) 52px 39px 40px; }
  .hall-ranking-row > span:nth-of-type(2) { display: none; }
  .hall-ranking-list > header span { display: none; }
}

/* 封神榜威仪主题：原创Q版武将群像、战旗、烽火与金属榜单。 */
.picker.hall-of-fame-dialog {
  border: 1px solid rgba(80, 32, 20, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 246, 219, 0.18), rgba(244, 221, 174, 0.28)),
    url("./assets/hall-of-fame-bg-chibi-v1.png?v=20260822") center / 100% 100% no-repeat,
    #e8ca91;
  box-shadow:
    0 20px 46px rgba(28, 14, 8, 0.48),
    inset 0 0 0 2px rgba(255, 235, 173, 0.58),
    inset 0 0 34px rgba(91, 36, 19, 0.2);
}

.picker.hall-of-fame-dialog::before,
.picker.hall-of-fame-dialog::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 66px;
  height: 66px;
  pointer-events: none;
  opacity: 0.72;
}

.picker.hall-of-fame-dialog::before {
  left: 2px;
  top: 2px;
  border-left: 3px double rgba(106, 43, 24, 0.76);
  border-top: 3px double rgba(106, 43, 24, 0.76);
  border-radius: 12px 0 0;
}

.picker.hall-of-fame-dialog::after {
  right: 2px;
  bottom: 2px;
  border-right: 3px double rgba(106, 43, 24, 0.76);
  border-bottom: 3px double rgba(106, 43, 24, 0.76);
  border-radius: 0 0 12px;
}

.picker.hall-of-fame-dialog > * {
  position: relative;
  z-index: 1;
}

.picker.hall-of-fame-dialog .hall-of-fame-head {
  min-height: 54px;
  padding: 7px 9px;
  border-color: rgba(52, 17, 11, 0.94);
  background:
    radial-gradient(circle at 76% 46%, rgba(255, 199, 91, 0.2), transparent 28%),
    repeating-linear-gradient(104deg, rgba(255, 227, 157, 0.05) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #7c281f, #321511 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 111, 0.22),
    inset 0 -7px 14px rgba(24, 7, 4, 0.22),
    0 4px 10px rgba(42, 17, 9, 0.26);
}

.picker.hall-of-fame-dialog .hall-of-fame-head > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
}

.picker.hall-of-fame-dialog .hall-of-fame-head > div::before {
  content: "封";
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 220, 132, 0.58);
  border-radius: 50%;
  color: #651f17;
  background:
    radial-gradient(circle at 34% 28%, #fff2b8, transparent 25%),
    linear-gradient(180deg, #f2cc70, #b9752d);
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 247, 198, 0.7);
  box-shadow: inset 0 0 0 2px rgba(255, 245, 192, 0.28), 0 2px 7px rgba(25, 7, 4, 0.36);
}

.picker.hall-of-fame-dialog .hall-of-fame-head h3 {
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
}

.picker.hall-of-fame-dialog .hall-of-fame-head p {
  overflow: hidden;
  color: rgba(255, 228, 172, 0.78);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker.hall-of-fame-dialog .hall-of-fame-setup {
  border-color: rgba(111, 58, 27, 0.38);
  background: rgba(255, 246, 218, 0.76);
  backdrop-filter: blur(1px);
}

.picker.hall-of-fame-dialog .hall-of-fame-upload {
  border-color: rgba(117, 56, 29, 0.42);
  background: linear-gradient(90deg, rgba(255, 249, 227, 0.94), rgba(233, 203, 145, 0.84));
}

.picker.hall-of-fame-dialog .hall-of-fame-result {
  padding: 2px 4px 3px 2px;
}

.picker.hall-of-fame-dialog .hall-summary > div {
  border-color: rgba(112, 50, 27, 0.38);
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 203, 90, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 244, 209, 0.93), rgba(221, 181, 103, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 246, 207, 0.56), 0 3px 7px rgba(64, 29, 14, 0.11);
}

.picker.hall-of-fame-dialog .hall-summary strong {
  color: #72251c;
  font-size: 19px;
}

.picker.hall-of-fame-dialog .hall-formula {
  border-color: rgba(106, 48, 25, 0.34);
  color: #653a25;
  background: rgba(255, 242, 207, 0.82);
  text-shadow: 0 1px 0 rgba(255, 252, 231, 0.8);
}

.picker.hall-of-fame-dialog .hall-podium-card {
  overflow: hidden;
  border-width: 1px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 249, 220, 0.62),
    0 4px 10px rgba(58, 25, 12, 0.16);
}

.picker.hall-of-fame-dialog .hall-podium-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -28px;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(104, 46, 23, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 239, 186, 0.1), 0 0 0 14px rgba(103, 45, 23, 0.05);
}

.picker.hall-of-fame-dialog .hall-podium-1 {
  border-color: rgba(143, 82, 18, 0.72);
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 248, 190, 0.76), transparent 31%),
    linear-gradient(155deg, #fff0a9, #d49a32);
}

.picker.hall-of-fame-dialog .hall-podium-2 {
  border-color: rgba(104, 92, 75, 0.58);
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 255, 248, 0.78), transparent 30%),
    linear-gradient(155deg, #f7f3e4, #c7bda4);
}

.picker.hall-of-fame-dialog .hall-podium-3 {
  border-color: rgba(139, 75, 38, 0.62);
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 236, 206, 0.74), transparent 30%),
    linear-gradient(155deg, #f6d4ad, #bf7946);
}

.picker.hall-of-fame-dialog .hall-podium-card > span {
  border: 1px solid rgba(255, 224, 144, 0.36);
  background: linear-gradient(180deg, #9d3a2b, #571d18);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 166, 0.16), 0 2px 5px rgba(44, 14, 8, 0.24);
}

.picker.hall-of-fame-dialog .hall-ranking-list {
  border-color: rgba(96, 40, 21, 0.42);
  background: rgba(255, 244, 214, 0.76);
  backdrop-filter: blur(1px);
}

.picker.hall-of-fame-dialog .hall-ranking-list h4 {
  color: #5d2018;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 21px;
  font-weight: 500;
}

.picker.hall-of-fame-dialog .hall-ranking-row {
  border-color: rgba(116, 55, 28, 0.25);
  background: rgba(255, 249, 228, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 239, 0.42);
}

.picker.hall-of-fame-dialog .hall-ranking-row:nth-child(-n + 3) {
  border-color: rgba(143, 64, 31, 0.42);
  background: linear-gradient(90deg, rgba(255, 235, 181, 0.95), rgba(248, 217, 156, 0.88));
}

.picker.hall-of-fame-dialog .hall-title {
  border: 1px solid rgba(255, 230, 161, 0.2);
  box-shadow: inset 0 0 0 1px rgba(47, 15, 9, 0.1), 0 1px 3px rgba(48, 17, 9, 0.15);
}

/* 前三甲独立武将头像将台：冠军居中并略高，亚军、季军分列两侧。 */
.picker.hall-of-fame-dialog .hall-podium {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "second first third";
  align-items: end;
  gap: 8px;
  padding-top: 8px;
}

.picker.hall-of-fame-dialog .hall-podium-card {
  min-height: 154px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: start;
  gap: 3px 5px;
  padding: 10px 8px 8px;
  text-align: center;
}

.picker.hall-of-fame-dialog .hall-podium-1 {
  grid-area: first;
  min-height: 166px;
  padding-top: 7px;
}

.picker.hall-of-fame-dialog .hall-podium-2 { grid-area: second; }
.picker.hall-of-fame-dialog .hall-podium-3 { grid-area: third; }

.picker.hall-of-fame-dialog .hall-podium-rank {
  position: absolute;
  z-index: 3;
  left: 8px;
  top: 8px;
  width: 27px;
  height: 27px;
}

.picker.hall-of-fame-dialog .hall-podium-avatar {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 239, 180, 0.88);
  border-radius: 50%;
  background-color: #8a3a26;
  background-image: url("./assets/hall-of-fame-bg-chibi-v1.png?v=20260822");
  background-repeat: no-repeat;
  filter: saturate(1.08) brightness(1.12);
  box-shadow:
    0 0 0 2px rgba(102, 42, 21, 0.72),
    0 5px 11px rgba(55, 20, 10, 0.3),
    inset 0 0 10px rgba(255, 213, 112, 0.2);
}

.picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-avatar {
  width: 76px;
  height: 76px;
  border-color: #ffe79a;
  background-size: 360% auto;
  background-position: 87% 18%;
  box-shadow:
    0 0 0 3px rgba(153, 89, 20, 0.82),
    0 0 14px rgba(255, 195, 62, 0.55),
    0 6px 12px rgba(55, 20, 10, 0.34);
}

.picker.hall-of-fame-dialog .hall-podium-2 .hall-podium-avatar {
  background-size: 350% auto;
  background-position: 12% 18%;
}

.picker.hall-of-fame-dialog .hall-podium-3 .hall-podium-avatar {
  background-size: 350% auto;
  background-position: 0 92%;
}

.picker.hall-of-fame-dialog .hall-podium-copy {
  grid-column: 1 / -1;
  width: 100%;
}

.picker.hall-of-fame-dialog .hall-podium-copy strong {
  color: #4d2017;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  font-weight: 1000;
}

.picker.hall-of-fame-dialog .hall-podium-copy small {
  margin-top: 1px;
  color: #816047;
  font-size: 9px;
}

.picker.hall-of-fame-dialog .hall-podium-score {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.picker.hall-of-fame-dialog .hall-podium-score small {
  color: #8a674d;
  font-size: 8px;
  font-weight: 900;
}

.picker.hall-of-fame-dialog .hall-podium-score b {
  color: #8b2d22;
  font-size: 14px;
}

.picker.hall-of-fame-dialog .hall-podium-card > .hall-title {
  grid-column: auto;
  align-self: center;
  justify-self: end;
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-podium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "second first third";
    gap: 5px;
  }

  .picker.hall-of-fame-dialog .hall-podium-card,
  .picker.hall-of-fame-dialog .hall-podium-1 {
    min-height: 142px;
    padding: 8px 4px 6px;
  }

  .picker.hall-of-fame-dialog .hall-podium-avatar {
    width: 54px;
    height: 54px;
  }

  .picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-avatar {
    width: 62px;
    height: 62px;
  }

  .picker.hall-of-fame-dialog .hall-podium-rank {
    left: 5px;
    top: 5px;
    width: 23px;
    height: 23px;
    font-size: 11px;
  }

  .picker.hall-of-fame-dialog .hall-podium-copy strong { font-size: 12px; }
  .picker.hall-of-fame-dialog .hall-podium-score small { display: none; }
  .picker.hall-of-fame-dialog .hall-podium-score b { font-size: 12px; }
  .picker.hall-of-fame-dialog .hall-podium-card > .hall-title {
    min-width: 32px;
    padding-inline: 3px;
    font-size: 8px;
  }
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-of-fame-head h3 {
    font-size: 22px;
  }

  .picker.hall-of-fame-dialog .hall-of-fame-head p {
    max-width: 220px;
  }
}

/* 封神榜改为名次将台：不使用通用头像，突出冠军、亚军、季军与成员名称。 */
.picker.hall-of-fame-dialog .hall-of-fame-head h3 { font-size: 28px; }
.picker.hall-of-fame-dialog .hall-of-fame-head p { font-size: 12px; }
.picker.hall-of-fame-dialog .hall-of-fame-upload strong { font-size: 15px; }
.picker.hall-of-fame-dialog .hall-of-fame-upload small { font-size: 11px; }
.picker.hall-of-fame-dialog .hall-summary strong { font-size: 21px; }
.picker.hall-of-fame-dialog .hall-summary span { font-size: 11px; }
.picker.hall-of-fame-dialog .hall-formula { font-size: 11px; }

.picker.hall-of-fame-dialog .hall-podium-card,
.picker.hall-of-fame-dialog .hall-podium-1 {
  min-height: 194px;
  padding: 10px 9px 9px;
}

.picker.hall-of-fame-dialog .hall-podium-1 {
  min-height: 206px;
  padding-top: 7px;
}

.picker.hall-of-fame-dialog .hall-podium-medal {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  width: 112px;
  min-height: 108px;
  display: grid;
  place-content: center;
  border: 0;
  border-radius: 0;
  color: #ffe6a3;
  background: none;
  filter: none;
  box-shadow: none;
  text-align: center;
}

.picker.hall-of-fame-dialog .hall-podium-medal::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  background: url("./assets/hall-rank-command-token-v1.png?v=20260822") center / contain no-repeat;
  filter: drop-shadow(0 5px 5px rgba(53, 20, 9, 0.3));
}

.picker.hall-of-fame-dialog .hall-podium-medal::after {
  display: none;
}

.picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-medal {
  width: 124px;
  min-height: 120px;
  filter: none;
}

.picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-medal::before {
  filter:
    saturate(1.16) brightness(1.06)
    drop-shadow(0 0 7px rgba(255, 191, 48, 0.48))
    drop-shadow(0 6px 5px rgba(53, 20, 9, 0.34));
}

.picker.hall-of-fame-dialog .hall-podium-2 .hall-podium-medal {
  color: #fff6d7;
  filter: none;
}

.picker.hall-of-fame-dialog .hall-podium-2 .hall-podium-medal::before {
  filter:
    grayscale(0.76) brightness(1.12)
    drop-shadow(0 5px 5px rgba(43, 37, 31, 0.3));
}

.picker.hall-of-fame-dialog .hall-podium-3 .hall-podium-medal {
  color: #ffe1b5;
  filter: none;
}

.picker.hall-of-fame-dialog .hall-podium-3 .hall-podium-medal::before {
  filter:
    sepia(0.42) saturate(0.82) brightness(0.92)
    drop-shadow(0 5px 5px rgba(64, 28, 14, 0.32));
}

.picker.hall-of-fame-dialog .hall-podium-medal strong,
.picker.hall-of-fame-dialog .hall-podium-medal small {
  position: relative;
  z-index: 1;
  display: block;
}

.picker.hall-of-fame-dialog .hall-podium-medal strong {
  color: inherit;
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow:
    -1px 0 rgba(54, 15, 8, 0.92),
    1px 0 rgba(54, 15, 8, 0.92),
    0 -1px rgba(54, 15, 8, 0.92),
    0 1px rgba(54, 15, 8, 0.92),
    0 2px 3px rgba(32, 8, 4, 0.88);
}

.picker.hall-of-fame-dialog .hall-podium-medal small {
  margin-top: 4px;
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0.78;
  text-shadow: 0 1px 2px rgba(35, 9, 5, 0.92);
}

.picker.hall-of-fame-dialog .hall-podium-copy strong { font-size: 17px; }
.picker.hall-of-fame-dialog .hall-podium-copy small { font-size: 11px; }
.picker.hall-of-fame-dialog .hall-podium-score small { font-size: 10px; }
.picker.hall-of-fame-dialog .hall-podium-score b { font-size: 17px; }
.picker.hall-of-fame-dialog .hall-podium-card > .hall-title {
  min-width: 43px;
  padding: 4px 7px;
  font-size: 10px;
}

.picker.hall-of-fame-dialog .hall-ranking-list h4 { font-size: 23px; }
.picker.hall-of-fame-dialog .hall-ranking-list > header span { font-size: 11px; }
.picker.hall-of-fame-dialog .hall-ranking-row {
  grid-template-columns: 34px minmax(110px, 1fr) 68px 52px;
  gap: 8px;
  min-height: 50px;
  padding: 6px 9px;
}

.picker.hall-of-fame-dialog .hall-rank-number { font-size: 14px; }
.picker.hall-of-fame-dialog .hall-member-copy strong { font-size: 15px; }
.picker.hall-of-fame-dialog .hall-member-copy small { font-size: 11px; }
.picker.hall-of-fame-dialog .hall-ratio { font-size: 16px; }
.picker.hall-of-fame-dialog .hall-ranking-row > .hall-title {
  min-width: 43px;
  padding: 4px 6px;
  font-size: 10px;
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-of-fame-head h3 { font-size: 24px; }
  .picker.hall-of-fame-dialog .hall-podium-card,
  .picker.hall-of-fame-dialog .hall-podium-1 {
    min-height: 170px;
    padding-inline: 4px;
  }

  .picker.hall-of-fame-dialog .hall-podium-medal {
    width: 82px;
    min-height: 80px;
  }

  .picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-medal {
    width: 90px;
    min-height: 88px;
  }

  .picker.hall-of-fame-dialog .hall-podium-medal strong { font-size: 14px; }
  .picker.hall-of-fame-dialog .hall-podium-medal small { font-size: 7px; }
  .picker.hall-of-fame-dialog .hall-podium-copy strong { font-size: 13px; }
  .picker.hall-of-fame-dialog .hall-podium-copy small { font-size: 10px; }
  .picker.hall-of-fame-dialog .hall-podium-score b { font-size: 14px; }

  .picker.hall-of-fame-dialog .hall-ranking-row {
    grid-template-columns: 28px minmax(90px, 1fr) 50px 43px;
    gap: 5px;
    min-height: 48px;
    padding-inline: 6px;
  }

  .picker.hall-of-fame-dialog .hall-member-copy strong { font-size: 14px; }
  .picker.hall-of-fame-dialog .hall-member-copy small { font-size: 10px; }
  .picker.hall-of-fame-dialog .hall-ratio { font-size: 14px; }
  .picker.hall-of-fame-dialog .hall-ranking-row > .hall-title {
    min-width: 38px;
    padding-inline: 4px;
    font-size: 9px;
  }
}

/* 封神榜前三甲使用原创人物头像：金甲统帅、银甲先锋、赤甲骁将。 */
.picker.hall-of-fame-dialog .hall-podium-card,
.picker.hall-of-fame-dialog .hall-podium-1 {
  min-height: 178px;
  padding: 9px 8px 8px;
}

.picker.hall-of-fame-dialog .hall-podium-1 {
  min-height: 190px;
  padding-top: 7px;
}

.picker.hall-of-fame-dialog .hall-podium-avatar {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  width: 86px;
  height: 86px;
  border: 3px solid rgba(245, 237, 219, 0.94);
  border-radius: 50%;
  background-color: #7d4933;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: none;
  box-shadow:
    0 0 0 2px rgba(85, 42, 27, 0.7),
    0 6px 13px rgba(52, 23, 13, 0.3),
    inset 0 0 0 1px rgba(255, 248, 220, 0.44);
}

.picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-avatar {
  width: 100px;
  height: 100px;
  border-color: #ffe59a;
  background-image: url("./assets/hall-avatar-commander-gold-v1.png?v=20260822");
  background-position: center;
  background-size: cover;
  box-shadow:
    0 0 0 3px rgba(151, 84, 19, 0.84),
    0 0 16px rgba(255, 190, 55, 0.52),
    0 7px 14px rgba(52, 23, 13, 0.34);
}

.picker.hall-of-fame-dialog .hall-podium-2 .hall-podium-avatar {
  border-color: #f2eee6;
  background-image: url("./assets/hall-avatar-vanguard-silver-v2.png?v=20260822");
  background-position: center;
  background-size: cover;
  box-shadow:
    0 0 0 2px rgba(91, 94, 100, 0.74),
    0 6px 13px rgba(44, 43, 42, 0.3);
}

.picker.hall-of-fame-dialog .hall-podium-3 .hall-podium-avatar {
  border-color: #f1c59d;
  background-image: url("./assets/hall-avatar-general-red-v2.png?v=20260822");
  background-position: center;
  background-size: cover;
  box-shadow:
    0 0 0 2px rgba(130, 55, 30, 0.76),
    0 6px 13px rgba(62, 24, 15, 0.3);
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-podium-card,
  .picker.hall-of-fame-dialog .hall-podium-1 {
    min-height: 160px;
    padding: 7px 4px 6px;
  }

  .picker.hall-of-fame-dialog .hall-podium-1 {
    min-height: 170px;
  }

  .picker.hall-of-fame-dialog .hall-podium-avatar {
    width: 68px;
    height: 68px;
  }

  .picker.hall-of-fame-dialog .hall-podium-1 .hall-podium-avatar {
    width: 78px;
    height: 78px;
  }
}

/* 封神榜称号改为古代军牌：切角、双层描边与两侧铆钉。 */
.picker.hall-of-fame-dialog .hall-title {
  position: relative;
  min-width: 52px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 228, 151, 0.72);
  border-radius: 3px;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
  color: #fff3cb;
  background:
    linear-gradient(105deg, rgba(255, 239, 183, 0.16), transparent 34%, rgba(29, 9, 5, 0.18) 70%),
    linear-gradient(180deg, #9b4631, #6d251e 56%, #481711);
  box-shadow:
    inset 0 0 0 2px rgba(58, 18, 11, 0.34),
    inset 0 1px 0 rgba(255, 238, 184, 0.35),
    0 2px 4px rgba(49, 20, 12, 0.22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 1px 1px rgba(35, 8, 5, 0.9);
  white-space: nowrap;
}

.picker.hall-of-fame-dialog .hall-title::before,
.picker.hall-of-fame-dialog .hall-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e5bd6e;
  box-shadow: 0 0 0 1px rgba(49, 18, 10, 0.68), inset 0 1px rgba(255, 244, 190, 0.8);
  transform: translateY(-50%);
}

.picker.hall-of-fame-dialog .hall-title::before { left: 5px; }
.picker.hall-of-fame-dialog .hall-title::after { right: 5px; }

.picker.hall-of-fame-dialog .hall-title.is-killer {
  border-color: #ffe29a;
  color: #fff0ad;
  background:
    linear-gradient(105deg, rgba(255, 242, 166, 0.3), transparent 34%, rgba(73, 12, 8, 0.2) 70%),
    linear-gradient(180deg, #b9412c, #832319 57%, #52100d);
  box-shadow:
    inset 0 0 0 2px rgba(96, 23, 12, 0.42),
    inset 0 1px 0 rgba(255, 240, 169, 0.56),
    0 0 7px rgba(229, 157, 45, 0.38),
    0 2px 4px rgba(49, 20, 12, 0.24);
}

.picker.hall-of-fame-dialog .hall-title.is-war {
  border-color: #f0c778;
  color: #fff1c7;
  background:
    linear-gradient(105deg, rgba(255, 238, 171, 0.22), transparent 36%, rgba(63, 27, 8, 0.14) 72%),
    linear-gradient(180deg, #b8752d, #85501d 58%, #59300f);
}

.picker.hall-of-fame-dialog .hall-title.is-breaker {
  border-color: #d9a177;
  background: linear-gradient(180deg, #95513b, #6f3027 58%, #4a1d19);
}

.picker.hall-of-fame-dialog .hall-title.is-general {
  border-color: #c7b679;
  background: linear-gradient(180deg, #817746, #5f582f 58%, #403a1d);
}

.picker.hall-of-fame-dialog .hall-title.is-elite {
  border-color: #a9c38c;
  background: linear-gradient(180deg, #5e845d, #3f623f 58%, #29462c);
}

.picker.hall-of-fame-dialog .hall-title.is-pillar {
  border-color: #a9bdcc;
  background: linear-gradient(180deg, #647b8d, #465e72 58%, #304456);
}

.picker.hall-of-fame-dialog .hall-title.is-brave {
  border-color: #c7aa85;
  background: linear-gradient(180deg, #866d55, #65503e 58%, #443427);
}

.picker.hall-of-fame-dialog .hall-title.is-new {
  border-color: #c0bbb2;
  background: linear-gradient(180deg, #817e78, #605d58 58%, #43413d);
}

.picker.hall-of-fame-dialog .hall-podium-card > .hall-title,
.picker.hall-of-fame-dialog .hall-ranking-row > .hall-title {
  min-width: 52px;
  height: 25px;
  padding: 0 12px;
  font-size: 12px;
}

@media (max-width: 440px) {
  .picker.hall-of-fame-dialog .hall-podium-card > .hall-title,
  .picker.hall-of-fame-dialog .hall-ranking-row > .hall-title {
    min-width: 46px;
    height: 23px;
    padding: 0 10px;
    font-size: 11px;
  }
}

/* 评分弹窗仅为标题和底部评语增加局部宣纸底，保留原创背景的可见度。 */
.picker.team-score-dialog header h2 {
  display: inline-flex;
  min-height: 42px;
  padding: 5px 14px 5px 12px;
  align-items: center;
  border: 1px solid rgba(111, 54, 30, 0.34);
  border-left: 4px solid #873628;
  border-radius: 8px;
  color: #5c211a;
  background: rgba(255, 247, 224, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 246, 0.68), 0 2px 7px rgba(56, 27, 17, 0.14);
  font-size: 32px;
  text-shadow: 0 1px 0 rgba(255, 255, 247, 0.94);
}

.picker.team-score-dialog .score-notes {
  justify-self: center;
  width: fit-content;
  max-width: calc(100% - 20px);
  padding: 7px 14px;
  border: 1px solid rgba(111, 54, 30, 0.3);
  border-radius: 999px;
  color: #58261d;
  background: rgba(255, 248, 228, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 247, 0.66), 0 2px 6px rgba(51, 25, 16, 0.12);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 255, 247, 0.9);
}

@media (max-width: 520px) {
  .picker.team-score-dialog header h2 {
    min-height: 38px;
    padding: 4px 11px 4px 9px;
    font-size: 27px;
  }

  .picker.team-score-dialog .score-notes {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.team-score-btn {
  position: relative;
  overflow: visible;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  aspect-ratio: 570 / 220;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #fff8d5;
  background: url("./assets/btn-unified-score-v10.png") center / 100% 100% no-repeat;
  box-shadow: none;
  font-weight: 900;
  padding: 0;
  white-space: nowrap;
  text-shadow: 0 1px 0 #173627, 0 2px 2px rgba(5, 35, 27, 0.72);
}

.team-score-copy {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.8vw;
  line-height: 1.1;
  transform: translateX(-0.8vw);
}

/* Labels are baked into the approved Q-version button artwork. */
.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron,
.member-upgrade-card .sgz-action-imperial {
  color: transparent;
  text-shadow: none;
}

.team-score-copy {
  display: none;
}

.team-score-copy > span,
.team-score-btn strong {
  display: inline;
}

.team-score-copy > span {
  font-size: 12px;
}

.team-score-btn strong {
  margin: 0;
  font-size: 19px;
  color: #fff2a5;
  text-shadow: 0 1px 0 #173627, 0 2px 2px rgba(5, 35, 27, 0.72);
}

.primary:active,
.secondary:active,
.team-score-btn:active,
.tool-btn:active,
.portrait:active {
  transform: translateY(1px);
}

/* Final button system: CSS-drawn, so every available layout size stays crisp. */
.lineup-actions {
  grid-template-columns: minmax(0, 1fr) clamp(124px, 15.2vw, 195px);
  align-items: center;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron,
.team-score-btn,
.member-upgrade-card .sgz-action-imperial {
  box-sizing: border-box;
  min-height: 0;
  aspect-ratio: auto;
  border: 2px solid #f5c866;
  border-radius: 11px;
  box-shadow:
    inset 0 0 0 2px rgba(89, 43, 13, 0.58),
    inset 0 1px 0 rgba(255, 244, 192, 0.56),
    0 3px 7px rgba(58, 29, 7, 0.28);
  color: #fff7d2;
  font-family: "Microsoft YaHei", serif;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 0 #552207, 0 0 5px rgba(255, 244, 183, 0.25);
  overflow: hidden;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  width: 100%;
  height: clamp(54px, 5.7vw, 72px);
  padding: 0 18px;
  font-size: clamp(16px, 1.45vw, 21px);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 227, 138, 0.32), transparent 28%),
    linear-gradient(180deg, #b94223 0%, #8b1e11 51%, #641108 100%);
}

.team-score-btn {
  width: 100%;
  height: clamp(54px, 5.7vw, 72px);
  padding: 0 8px;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 228, 138, 0.28), transparent 24%),
    linear-gradient(180deg, #38796d 0%, #185349 52%, #103a34 100%);
}

.team-score-copy {
  display: inline-flex;
  transform: none;
  justify-content: center;
  width: 100%;
}

.team-score-copy > span {
  display: block;
  font-size: clamp(13px, 1.1vw, 16px);
  color: #fff7d2;
}

.team-score-btn strong { display: none; }

.member-upgrade-card .sgz-action-imperial {
  width: 100%;
  height: clamp(40px, 3.8vw, 50px);
  padding: 0 12px;
  font-size: clamp(15px, 1.35vw, 19px);
  background:
    radial-gradient(ellipse at 16% 0%, rgba(255, 237, 169, 0.4), transparent 30%),
    linear-gradient(180deg, #c18a29 0%, #986117 52%, #70410e 100%);
}

.lineup-actions .sgz-action-iron:hover,
.result-actions .sgz-action-iron:hover,
.team-score-btn:hover,
.member-upgrade-card .sgz-action-imperial:hover {
  filter: brightness(1.08) saturate(1.04);
}

@media (max-width: 520px) {
  .lineup-actions { grid-template-columns: minmax(0, 1fr) 32vw; }
  .lineup-actions .sgz-action-iron,
  .result-actions .sgz-action-iron,
  .team-score-btn { height: 48px; }
}

.battle-lineups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.battle-lineups .result-team {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.battle-lineups .result-team:first-child {
  background-image:
    linear-gradient(180deg, rgba(255, 250, 232, 0.38), rgba(255, 250, 232, 0.12)),
    url("./assets/battle-report-ally-ink-v3.webp");
}

.battle-lineups .result-team:last-child {
  background-image:
    linear-gradient(180deg, rgba(255, 250, 232, 0.38), rgba(255, 250, 232, 0.12)),
    url("./assets/battle-report-enemy-ink-v3.webp");
}

/* 与“选择阵容”弹窗一致：背景图上覆盖独立的 15% 白纱。 */
.battle-lineups .result-team::before,
.battle-report-continuous::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.15);
}

.battle-lineups .result-team > *,
.battle-report-continuous > * {
  position: relative;
  z-index: 1;
}

.battle-lineups .result-team > h2 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.94), 0 0 8px rgba(255, 255, 255, 0.82);
}

.battle-lineups .battle-card {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(242, 224, 194, 0.82));
  backdrop-filter: none;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.result-actions .primary {
  margin-top: 0;
}

.battle-card {
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.battle-card .mini-portrait {
  height: 82px;
  border-radius: 8px;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0 8px 8px;
  color: #fff;
  background-color: #cba76e;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 -32px 36px rgba(24, 16, 8, 0.56);
}

.results {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  overflow-x: auto;
}

.battle-report-continuous {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(160, 103, 42, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.38), rgba(255, 250, 232, 0.12)),
    url("./assets/battle-report-continuous-ink-v4.webp") center 48% / cover no-repeat;
  box-shadow: var(--shadow);
}

.battle-report-continuous .results,
.battle-report-continuous .detail-grid > .panel {
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.battle-report-continuous .results {
  border-radius: 0;
  background: rgba(255, 255, 255, 0.14);
}

.battle-report-continuous .metric {
  background: rgba(255, 255, 255, 0.48);
}

.battle-report-continuous .detail-grid {
  margin-top: 0;
  padding-top: 6px;
}

.battle-report-continuous .detail-grid > .panel {
  border-radius: 0;
  background: rgba(255, 255, 255, 0.44);
}

.metric {
  min-height: 76px;
  display: grid;
  gap: 5px;
  padding: 11px;
  background: rgba(255, 251, 244, 0.88);
}

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

.metric strong {
  font-size: 21px;
}

.detail-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
}

.detail-grid > .panel {
  min-width: 0;
}

.battle-round-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 7px;
  margin-top: 12px;
  padding: 2px 1px 3px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
}

.battle-round-tabs.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.battle-round-tabs::-webkit-scrollbar {
  display: none;
}

.battle-round-tabs button {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(160, 103, 42, 0.4);
  border-radius: 9px;
  background: rgba(255, 251, 244, 0.78);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: inherit;
}

.battle-round-tabs button.is-preparation {
  min-width: 78px;
}

.battle-round-tabs button.is-selected {
  color: #fff3dc;
  border-color: rgba(93, 31, 22, 0.56);
  background: linear-gradient(180deg, #6a2d23, #24130f);
  box-shadow: inset 0 0 0 1px rgba(230, 181, 95, 0.22);
}

.battle-log {
  max-height: 310px;
  overflow: auto;
  padding-left: 22px;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.62;
  text-shadow: none;
}

.battle-log li:not(.battle-action-start) {
  margin: 2px 0;
}

.battle-log .battle-damage-number {
  color: #d45b54;
  font-weight: 400;
}

.battle-log .battle-heal-number {
  color: #4fa879;
  font-weight: 400;
}

.battle-log .battle-action-start {
  margin: 8px 0 3px -22px;
  padding: 4px 9px;
  border-left: 3px solid transparent;
  border-radius: 3px;
  font-weight: 900;
  list-style: none;
}

.battle-log .battle-action-start.is-ally {
  border-left-color: #287565;
  background: rgba(40, 117, 101, 0.13);
  color: #1f5f53;
}

.battle-log .battle-action-start.is-enemy {
  border-left-color: #a33a30;
  background: rgba(163, 58, 48, 0.12);
  color: #7a281f;
}

.battle-unit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 8px 4px;
}

.battle-unit-stats div {
  min-width: 0;
  border: 1px solid rgba(162, 105, 39, 0.24);
  border-radius: 6px;
  background: rgba(255, 248, 235, 0.72);
  padding: 5px 3px;
  text-align: center;
}

.battle-unit-stats span,
.battle-skill-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.battle-unit-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.battle-skill-stats {
  display: grid;
  gap: 4px;
  padding: 4px 8px 10px;
}

.battle-skill-stats span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  border-bottom: 1px solid rgba(162, 105, 39, 0.18);
  padding-bottom: 3px;
  line-height: 1.25;
}

.battle-skill-stats .basic-attack-stat {
  color: #7e241d;
  font-weight: 900;
}

.battle-skill-stats .basic-attack-stat span {
  color: var(--muted);
}

.battle-skill-stats strong {
  min-width: 0;
  color: #7e241d;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.battle-clash-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 226, 132, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(24, 13, 8, 0.7), rgba(54, 25, 13, 0.82));
  opacity: 0;
  pointer-events: none;
}

.battle-clash-overlay:not(.is-playing) {
  display: none;
}

.battle-clash-overlay.is-playing {
  display: grid;
  animation: chargeOverlay 1200ms ease both;
}

.battle-charge-stage {
  position: relative;
  width: min(820px, 100vw);
  height: min(470px, 76vh);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, transparent 0 62%, rgba(63, 31, 16, 0.28) 63% 65%, rgba(36, 20, 13, 0.58) 66% 100%),
    radial-gradient(ellipse at 50% 62%, rgba(255, 204, 99, 0.15), transparent 44%);
}

.battle-charge-stage::before,
.battle-charge-stage::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  pointer-events: none;
}

.battle-charge-stage::before {
  bottom: 32%;
  height: 24%;
  opacity: 0.48;
  background:
    linear-gradient(135deg, transparent 0 14%, #15100c 15% 22%, transparent 23% 31%, #26170f 32% 45%, transparent 46% 54%, #17100c 55% 69%, transparent 70% 78%, #2d1a10 79% 90%, transparent 91%);
  clip-path: polygon(0 100%, 0 72%, 10% 60%, 18% 22%, 28% 66%, 38% 46%, 49% 76%, 61% 26%, 72% 70%, 84% 38%, 100% 74%, 100% 100%);
}

.battle-charge-stage::after {
  bottom: 0;
  height: 36%;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(213, 150, 70, 0.26), transparent 22%),
    radial-gradient(ellipse at 84% 66%, rgba(213, 150, 70, 0.23), transparent 24%),
    linear-gradient(180deg, transparent, rgba(16, 10, 7, 0.24));
  z-index: 4;
}

.charge-sky-mark {
  position: absolute;
  left: 50%;
  top: 7%;
  width: min(50vw, 250px);
  height: min(50vw, 250px);
  border: 2px solid rgba(230, 164, 70, 0.1);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 20px rgba(230, 164, 70, 0.025), 0 0 62px rgba(255, 184, 72, 0.08);
}

.charge-army {
  --army-main: #9a3327;
  --army-dark: #4c1714;
  --army-light: #e5a55f;
  position: absolute;
  z-index: 5;
  bottom: 8%;
  width: 46%;
  height: 68%;
  opacity: 0;
}

.charge-army-left {
  z-index: 6;
  left: 0;
  transform: translateX(-115%);
}

.charge-army-right {
  z-index: 5;
  right: 0;
  --army-main: #2d5970;
  --army-dark: #142f40;
  --army-light: #8bb5c6;
  transform: translateX(115%);
}

.battle-clash-overlay.is-playing .charge-army-left {
  animation: armyChargeLeft 1100ms cubic-bezier(.16, .76, .22, 1) both;
}

.battle-clash-overlay.is-playing .charge-army-right {
  animation: armyChargeRight 1100ms cubic-bezier(.16, .76, .22, 1) both;
}

.charge-flag {
  position: absolute;
  z-index: 8;
  top: 2%;
  left: 9%;
  width: 64px;
  height: 104px;
  transform-origin: 50% 100%;
  animation: chargeFlagWave 340ms ease-in-out infinite alternate;
}

.charge-army-right .charge-flag {
  left: auto;
  right: 9%;
}

.charge-flag::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  width: 5px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #603318, #e0a85a 45%, #6c371a);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.46);
}

.charge-flag i {
  position: absolute;
  left: 14px;
  top: 8px;
  width: 50px;
  height: 55px;
  background: linear-gradient(135deg, var(--army-light), var(--army-main) 42%, var(--army-dark));
  clip-path: polygon(0 0, 100% 7%, 76% 50%, 100% 93%, 0 100%);
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.36));
}

.charge-flag b {
  position: absolute;
  z-index: 1;
  left: 26px;
  top: 19px;
  color: #ffe8a3;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(40, 13, 8, 0.72);
}

.charge-warrior-group {
  position: absolute;
  z-index: 3;
  left: -16%;
  bottom: -3%;
  width: clamp(320px, 56vw, 456px);
  aspect-ratio: 1;
  transform-origin: 52% 82%;
}

.charge-army-right .charge-warrior-group {
  left: auto;
  right: -16%;
  transform: scaleX(-1);
}

.charge-army.army-spear .charge-warrior-group {
  left: -2%;
}

.charge-army-right.army-spear .charge-warrior-group {
  left: auto;
  right: -2%;
}

.charge-army.army-cavalry .charge-warrior-group,
.charge-army.army-bow .charge-warrior-group,
.charge-army.army-shield .charge-warrior-group {
  left: -38%;
  bottom: 7%;
  width: clamp(470px, 72vw, 590px);
  aspect-ratio: 2.42 / 1;
  transform-origin: 52% 86%;
}

.charge-army-right.army-cavalry .charge-warrior-group,
.charge-army-right.army-bow .charge-warrior-group,
.charge-army-right.army-shield .charge-warrior-group {
  left: auto;
  right: -38%;
}

.charge-army.army-cavalry .charge-warrior-group {
  bottom: 4%;
  width: clamp(500px, 76vw, 630px);
}

.charge-warrior-group::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 23% 8% 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(182, 57, 33, 0.28), rgba(182, 57, 33, 0.08) 45%, transparent 72%);
  filter: blur(10px);
}

.charge-army-right .charge-warrior-group::before {
  background: radial-gradient(ellipse, rgba(51, 115, 147, 0.32), rgba(51, 115, 147, 0.08) 45%, transparent 72%);
}

.charge-warrior-frame {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 9px 7px rgba(0, 0, 0, 0.52));
  transform-origin: 50% 82%;
  will-change: opacity, transform;
}

.charge-warrior-frame-a { opacity: 1; }
.charge-warrior-frame-b { opacity: 0; }

.battle-clash-overlay.is-playing .charge-warrior-frame-a {
  animation: chargeStrideFrameA 280ms steps(1, end) infinite;
}

.battle-clash-overlay.is-playing .charge-warrior-frame-b {
  animation: chargeStrideFrameB 280ms steps(1, end) infinite;
}

.battle-clash-overlay.is-playing .charge-army-right .charge-warrior-frame-a,
.battle-clash-overlay.is-playing .charge-army-right .charge-warrior-frame-b {
  animation-delay: -140ms;
}

.charge-soldier {
  position: absolute;
  bottom: 44px;
  width: 112px;
  height: 148px;
  transform-origin: 50% 88%;
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, 0.5));
  animation: chargeGeneralStride 320ms ease-in-out infinite alternate;
}

.charge-army-right .charge-soldier {
  animation-name: chargeGeneralStrideRight;
}

.charge-soldier-back { left: -2%; bottom: 36px; transform: scale(0.74) rotate(-4deg); opacity: 0.78; }
.charge-soldier-main { left: 19%; bottom: 50px; transform: scale(1.02); z-index: 3; }
.charge-soldier-front { left: 48%; bottom: 28px; transform: scale(0.88) rotate(3deg); z-index: 4; }
.charge-army-right .charge-soldier-back { left: auto; right: -2%; transform: scale(0.74) rotate(4deg); }
.charge-army-right .charge-soldier-main { left: auto; right: 19%; transform: scale(1.02); }
.charge-army-right .charge-soldier-front { left: auto; right: 48%; transform: scale(0.88) rotate(-3deg); }

.charge-portrait {
  position: absolute;
  inset: 0 0 17px;
  display: block;
  overflow: hidden;
  border: 3px solid #c8994f;
  border-radius: 48% 48% 18px 18px;
  background-color: #2b1b14;
  background-position: center 13%;
  background-size: 138% auto;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255, 229, 158, 0.28),
    inset 0 -28px 22px rgba(28, 12, 8, 0.62),
    0 7px 0 -2px var(--army-dark),
    0 9px 13px rgba(0, 0, 0, 0.5);
  clip-path: polygon(50% 0, 91% 12%, 100% 43%, 92% 88%, 74% 100%, 26% 100%, 8% 88%, 0 43%, 9% 12%);
}

.charge-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 226, 142, 0.12), transparent 24% 70%, rgba(25, 11, 7, 0.24)),
    linear-gradient(180deg, transparent 56%, rgba(25, 11, 7, 0.5));
}

.charge-general-name {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 4px;
  min-width: 82%;
  padding: 4px 7px 3px;
  border: 1px solid rgba(255, 218, 133, 0.62);
  border-radius: 999px;
  color: #fff0bd;
  background: linear-gradient(180deg, var(--army-main), var(--army-dark));
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.46), inset 0 1px rgba(255, 226, 146, 0.24);
}

.charge-general-name.is-long {
  font-size: 12px;
  letter-spacing: -0.04em;
}

.charge-soldier-main::before {
  content: "主";
  position: absolute;
  z-index: 6;
  left: -5px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 2px solid #f3cf7a;
  border-radius: 50%;
  color: #ffeab0;
  background: #7c211a;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  font-weight: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.56);
}

.charge-weapon {
  position: absolute;
  z-index: 6;
  left: 82px;
  top: 68px;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edc57b, #633719 48%, #1f1510 54%, #bd7a38);
  transform: rotate(-13deg);
  transform-origin: left center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.58));
}

.charge-army-right .charge-weapon {
  left: auto;
  right: 82px;
  transform: scaleX(-1) rotate(-13deg);
  transform-origin: right center;
}

.charge-weapon::after {
  content: "";
  position: absolute;
  right: -13px;
  top: -6px;
  width: 18px;
  height: 16px;
  background: linear-gradient(135deg, #fff1b4, #9e9d90 45%, #454843);
  clip-path: polygon(0 38%, 100% 0, 72% 50%, 100% 100%, 0 62%);
  filter: drop-shadow(0 0 3px rgba(255, 221, 129, 0.56));
}

.charge-army.army-cavalry .charge-weapon {
  width: 60px;
  height: 18px;
  top: 62px;
  border-radius: 70% 4px 70% 8px;
  background: linear-gradient(160deg, #fff0b0, #9c9a88 48%, #393b37 54%, #d7b368);
  clip-path: polygon(0 37%, 100% 0, 82% 55%, 27% 100%);
}

.charge-army.army-cavalry .charge-weapon::after {
  display: none;
}

.charge-army.army-shield .charge-weapon {
  left: 80px;
  top: 62px;
  width: 44px;
  height: 50px;
  border: 3px solid #d7a052;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle, #efc56f 0 13%, var(--army-main) 15% 62%, var(--army-dark) 64%);
  transform: rotate(-10deg);
}

.charge-army-right.army-shield .charge-weapon {
  left: auto;
  right: 80px;
  transform: rotate(10deg);
}

.charge-army.army-shield .charge-weapon::after {
  display: none;
}

.charge-army.army-bow .charge-weapon {
  left: 79px;
  top: 47px;
  width: 54px;
  height: 70px;
  border: 4px solid #d9a653;
  border-left-color: transparent;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 0 47%, #e6c98e 48% 51%, transparent 52%);
  transform: rotate(5deg);
}

.charge-army-right.army-bow .charge-weapon {
  left: auto;
  right: 79px;
  transform: scaleX(-1) rotate(5deg);
}

.charge-army.army-bow .charge-weapon::after {
  right: -36px;
  top: 28px;
  width: 74px;
  height: 3px;
  background: linear-gradient(90deg, #71401f 0 82%, #e4c57d 83%);
  clip-path: none;
}

.charge-army.army-siege .charge-weapon {
  left: 80px;
  top: 63px;
  width: 70px;
  height: 9px;
  background: linear-gradient(180deg, #d29a50, #5c321b);
  transform: rotate(-18deg);
}

.charge-army-right.army-siege .charge-weapon {
  left: auto;
  right: 80px;
  transform: scaleX(-1) rotate(-18deg);
}

.charge-army.army-siege .charge-weapon::after {
  right: -8px;
  top: -15px;
  width: 28px;
  height: 30px;
  border: 2px solid #3a2518;
  border-radius: 4px;
  background: linear-gradient(135deg, #bd8b4a, #4c2a1b);
  clip-path: none;
}

.charge-army-label {
  position: absolute;
  bottom: 0;
  left: 17%;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #ffe8ad;
  font-family: "STKaiti", "KaiTi", serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.78);
}

.charge-army-right .charge-army-label {
  left: auto;
  right: 17%;
}

.charge-army-label span { font-size: 24px; }
.charge-army-label small { color: rgba(255, 241, 202, 0.84); font-size: 13px; letter-spacing: 0.08em; }

.charge-dust {
  position: absolute;
  z-index: -1;
  bottom: 36px;
  width: 130px;
  height: 72px;
}

.charge-dust-left { left: -2%; }
.charge-dust-right { right: -2%; }

.charge-dust i {
  position: absolute;
  bottom: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(211, 160, 91, 0.34);
  filter: blur(2px);
  animation: chargeDust 420ms ease-out infinite;
}

.charge-dust i:nth-child(2) { left: 35px; bottom: 11px; width: 64px; height: 57px; animation-delay: -140ms; }
.charge-dust i:nth-child(3) { left: 82px; width: 38px; height: 38px; animation-delay: -280ms; }

.charge-impact {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 49%;
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.charge-impact b {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  color: #54150f;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 78px;
  font-weight: 1000;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-8deg) scale(0.25);
  -webkit-text-stroke: 2px #ffe28a;
  text-shadow: 0 3px 0 #f4b641, 0 7px 12px rgba(33, 8, 5, 0.85), 0 0 22px rgba(255, 195, 65, 0.8);
}

.battle-clash-overlay.is-playing .charge-impact b {
  animation: chargeWarWord 740ms 480ms cubic-bezier(.2, .86, .18, 1.1) both;
}

.charge-spark {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(from 8deg, transparent 0 6%, #ffe56e 7% 9%, transparent 10% 18%, #f07824 19% 22%, transparent 23% 35%, #fff0a0 36% 39%, transparent 40% 55%, #e75020 56% 60%, transparent 61% 74%, #ffd34e 75% 78%, transparent 79%);
  mask-image: radial-gradient(circle, transparent 0 23%, #000 26% 66%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, transparent 0 23%, #000 26% 66%, transparent 70%);
}

.battle-clash-overlay.is-playing .charge-spark-a { animation: chargeSpark 500ms 480ms ease-out both; }
.battle-clash-overlay.is-playing .charge-spark-b { animation: chargeSpark 520ms 530ms ease-out both reverse; }

.charge-smoke {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  opacity: 0;
  background: rgba(218, 181, 126, 0.62);
  box-shadow: -42px 18px 0 rgba(198, 153, 94, 0.48), 39px 23px 0 rgba(225, 192, 143, 0.48), 4px -34px 0 rgba(184, 135, 80, 0.36);
}

.battle-clash-overlay.is-playing .charge-smoke-a { animation: chargeSmokeA 520ms 490ms ease-out both; }
.battle-clash-overlay.is-playing .charge-smoke-b { animation: chargeSmokeB 550ms 530ms ease-out both; }

@keyframes chargeOverlay {
  0% { opacity: 0; }
  7%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes chargeStrideFrameA {
  0%, 49.999% { opacity: 1; transform: translateY(0) rotate(-0.8deg); }
  50%, 100% { opacity: 0; transform: translateY(2px) rotate(0.6deg); }
}

@keyframes chargeStrideFrameB {
  0%, 49.999% { opacity: 0; transform: translateY(0) rotate(-0.8deg); }
  50%, 100% { opacity: 1; transform: translateY(-2px) rotate(0.6deg); }
}

@keyframes armyChargeLeft {
  0% { opacity: 0; transform: translateX(-115%); }
  8% { opacity: 1; }
  52% { opacity: 1; transform: translateX(7%); }
  61% { transform: translateX(0); }
  78% { opacity: 1; transform: translateX(3%); }
  100% { opacity: 0; transform: translateX(-12%); }
}

@keyframes armyChargeRight {
  0% { opacity: 0; transform: translateX(115%); }
  8% { opacity: 1; }
  52% { opacity: 1; transform: translateX(-7%); }
  61% { transform: translateX(0); }
  78% { opacity: 1; transform: translateX(-3%); }
  100% { opacity: 0; transform: translateX(12%); }
}

@keyframes chargeGeneralStride {
  from { margin-bottom: 0; }
  to { margin-bottom: 3px; }
}

@keyframes chargeGeneralStrideRight {
  from { margin-bottom: 0; }
  to { margin-bottom: 3px; }
}

@keyframes chargeFlagWave {
  from { rotate: -3deg; }
  to { rotate: 4deg; }
}

@keyframes chargeDust {
  0% { opacity: 0; transform: translate(0, 9px) scale(0.45); }
  42% { opacity: 0.72; }
  100% { opacity: 0; transform: translate(-30px, -15px) scale(1.4); }
}

@keyframes chargeWarWord {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(0.25); }
  22% { opacity: 1; transform: translate(-50%, -50%) rotate(4deg) scale(1.2); }
  45% { transform: translate(-50%, -50%) rotate(-3deg) scale(0.96); }
  78% { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(5deg) scale(1.24); }
}

@keyframes chargeSpark {
  0% { opacity: 0; transform: rotate(0deg) scale(0.18); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(48deg) scale(1.65); }
}

@keyframes chargeSmokeA {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  24% { opacity: 0.88; }
  100% { opacity: 0; transform: translate(-120%, -118%) scale(2.2); }
}

@keyframes chargeSmokeB {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25); }
  22% { opacity: 0.72; }
  100% { opacity: 0; transform: translate(36%, -88%) scale(2.5); }
}

@media (max-width: 520px) {
  .battle-charge-stage { height: min(410px, 72vh); }
  .charge-army { width: 53%; }
  .charge-soldier { width: 96px; height: 132px; }
  .charge-soldier-main { left: 16%; }
  .charge-soldier-back { left: -8%; }
  .charge-soldier-front { left: 44%; }
  .charge-army-right .charge-soldier-main { right: 16%; }
  .charge-army-right .charge-soldier-back { right: -8%; }
  .charge-army-right .charge-soldier-front { right: 44%; }
  .charge-general-name { font-size: 13px; }
  .charge-general-name.is-long { font-size: 11px; }
  .charge-weapon { left: 70px; }
  .charge-army-right .charge-weapon { left: auto; right: 70px; }
  .charge-army-label span { font-size: 20px; }
  .charge-impact b { font-size: 66px; }
  .charge-warrior-group { left: -27%; width: 350px; bottom: -1%; }
  .charge-army-right .charge-warrior-group { left: auto; right: -27%; }
  .charge-army.army-spear .charge-warrior-group { left: 5%; }
  .charge-army-right.army-spear .charge-warrior-group { left: auto; right: 5%; }
  .charge-army.army-cavalry .charge-warrior-group,
  .charge-army.army-bow .charge-warrior-group,
  .charge-army.army-shield .charge-warrior-group {
    left: -48%;
    bottom: 8%;
    width: 455px;
  }
  .charge-army-right.army-cavalry .charge-warrior-group,
  .charge-army-right.army-bow .charge-warrior-group,
  .charge-army-right.army-shield .charge-warrior-group {
    left: auto;
    right: -48%;
  }
  .charge-army.army-cavalry .charge-warrior-group {
    bottom: 5%;
    width: 480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .battle-clash-overlay.is-playing { animation-duration: 420ms; }
  .battle-clash-overlay.is-playing .charge-army-left { animation: none; opacity: 1; transform: translateX(0); }
  .battle-clash-overlay.is-playing .charge-army-right { animation: none; opacity: 1; transform: translateX(0); }
  .charge-soldier,
  .charge-dust i,
  .charge-flag { animation: none; }
  .battle-clash-overlay.is-playing .charge-warrior-frame-a { animation: none; opacity: 1; }
  .battle-clash-overlay.is-playing .charge-warrior-frame-b { animation: none; opacity: 0; }
  .battle-clash-overlay.is-playing .charge-impact b { animation: chargeWarWord 420ms ease both; }
}

.picker {
  width: min(760px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 230, 201, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.picker::backdrop {
  background: rgba(20, 16, 11, 0.45);
}

.picker.book-picker {
  width: min(720px, calc(100vw - 24px));
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(255, 251, 236, 0.54), rgba(255, 251, 236, 0.06) 28% 65%, rgba(255, 251, 236, 0.22));
}

.picker.book-picker::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("./assets/dialog-bg-book-chibi-study-v1.png?v=20260813") center / 100% 100% no-repeat;
  transform: scaleX(-1);
  pointer-events: none;
}

.picker.book-picker::before {
  display: none;
}

.picker.attribute-picker {
  width: min(620px, calc(100vw - 24px));
  background:
    url("./assets/dialog-bg-attribute-chibi-go-v1.png?v=20260813") center / 100% 100% no-repeat,
    #f6eed9;
}

.picker.draw-record-dialog {
  width: min(700px, calc(100vw - 24px));
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(250, 238, 211, 0.95), rgba(225, 195, 145, 0.94)),
    radial-gradient(circle at 82% 8%, rgba(170, 51, 45, 0.18), transparent 32%);
}

.picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.draw-record-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.draw-clear-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.camp-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.camp-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 244, 0.82);
  color: var(--muted);
  font-weight: 900;
}

.camp-tabs button.is-selected {
  color: #8d2a24;
  border-color: rgba(170, 51, 45, 0.58);
  background: linear-gradient(180deg, #fff0d5, #ddb46f);
  box-shadow: inset 0 0 0 1px rgba(185, 130, 42, 0.24);
}

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
}

.roster button {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 244, 0.92);
  color: var(--ink);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  padding: 8px;
  font-weight: 900;
}

.roster button.is-used,
.roster button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.82);
}

.roster button.is-used small {
  color: #8a3b2f;
}

.roster-avatar {
  display: grid;
  place-items: end center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(160, 103, 42, 0.36);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  color: rgba(255, 248, 224, 0.9);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  padding-bottom: 6px;
  text-shadow: 0 2px 5px rgba(20, 12, 6, 0.7);
  box-shadow: inset 0 -22px 28px rgba(24, 16, 8, 0.24);
}

.roster-avatar.camp-魏 { background-color: #4c6084; }
.roster-avatar.camp-蜀 { background-color: #367e56; }
.roster-avatar.camp-吴 { background-color: #98443c; }
.roster-avatar.camp-群 { background-color: #765c96; }
.roster-avatar.camp-汉 { background-color: #a9742d; }

.roster button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.draw-record-summary {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.draw-record-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.draw-slot {
  position: relative;
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 8px 5px 6px;
  border: 1px solid rgba(151, 91, 36, 0.34);
  border-radius: 8px;
  color: #5a3321;
  background:
    linear-gradient(180deg, rgba(255, 251, 242, 0.96), rgba(236, 213, 177, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.draw-slot::before {
  content: attr(data-index);
  position: absolute;
  left: 6px;
  top: 4px;
  color: rgba(96, 60, 34, 0.38);
  font-size: 10px;
  font-weight: 1000;
}

.draw-slot.is-empty {
  border-style: dashed;
  color: rgba(88, 84, 76, 0.72);
  background:
    linear-gradient(180deg, rgba(224, 222, 216, 0.9), rgba(181, 177, 168, 0.82));
}

.draw-slot.is-empty .draw-slot-time {
  display: none;
}

.draw-slot.is-next {
  border-style: solid;
  border-color: rgba(184, 111, 35, 0.72);
  color: #7a2a1e;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 235, 154, 0.36), transparent 42%),
    linear-gradient(180deg, rgba(255, 238, 188, 0.96), rgba(214, 151, 63, 0.86));
  box-shadow:
    0 0 12px rgba(196, 116, 39, 0.18),
    inset 0 0 0 1px rgba(255, 250, 222, 0.5);
}

.draw-slot.is-next .draw-slot-name {
  color: #7a241c;
}

.draw-slot.is-locked {
  cursor: not-allowed;
  opacity: 0.58;
}

.draw-slot-name {
  color: #321c12;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.1;
  text-align: center;
}

.draw-slot-time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.draw-slot-core {
  position: absolute;
  right: 5px;
  top: 4px;
  padding: 1px 4px;
  border-radius: 999px;
  color: #5a160f;
  background: linear-gradient(180deg, #ffe8a8, #e5ad42);
  font-size: 9px;
  font-weight: 1000;
}

.draw-slot.is-core {
  border-color: rgba(153, 77, 40, 0.58);
  color: #542a1c;
  background:
    url("./assets/draw-core-bg-chibi-v5.png?v=20260815-core-chibi-4") 72% center / cover no-repeat,
    #e5b999;
  box-shadow:
    0 0 12px rgba(132, 69, 39, 0.16),
    inset 0 0 0 1px rgba(255, 255, 244, 0.48);
}

.draw-slot.is-core .draw-slot-name {
  color: #542319;
  text-shadow: 0 1px 0 rgba(255, 251, 235, 0.82);
}

.draw-slot.is-core .draw-slot-time {
  color: rgba(79, 42, 26, 0.78);
}

/* 右侧人物保持完整，核心武将名与时间略向左避让。 */
.draw-slot.is-core .draw-slot-name,
.draw-slot.is-core .draw-slot-time {
  transform: translateX(-11px);
}

.draw-record-pager {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.draw-record-pager span {
  color: #5b3421;
  font-size: 15px;
  font-weight: 1000;
  text-align: center;
}

.draw-record-tip {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.feature-screen {
  min-height: calc(100vh - 126px);
}

.feature-hero {
  position: relative;
  min-height: 180px;
  display: grid;
  align-content: end;
  gap: 8px;
  margin: 2px -2px 14px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: #fff8e8;
  box-shadow: var(--shadow);
}

.feature-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 12, 8, 0.08), rgba(18, 12, 8, 0.76)),
    url("./assets/chaos-heroes-bg.png") center / cover;
  z-index: -2;
}

.feature-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--hero-figures, none) right center / auto 108% no-repeat;
  z-index: -1;
  opacity: 1;
  filter: brightness(0.84) contrast(1.18) saturate(1.08);
}

.feature-hero h1 {
  position: relative;
  width: fit-content;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #15100c;
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: clamp(40px, 9.4vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  padding: 0 20px 12px 2px;
  background:
    linear-gradient(180deg, #2e241b 0%, #070504 54%, #44231b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: skewX(-2deg) scaleY(1.02);
  transform-origin: left bottom;
  text-shadow: none;
}

.hero-title-latin {
  color: #0d0907;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92em;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #0d0907;
  transform: translateY(-1px);
}

.feature-hero h1::before {
  content: "";
  position: absolute;
  left: -4px;
  right: 4px;
  bottom: 2px;
  height: 9px;
  border-radius: 72% 28% 66% 34% / 48% 56% 44% 52%;
  background:
    linear-gradient(90deg, rgba(18, 13, 10, 0.78), rgba(38, 24, 18, 0.42), rgba(129, 34, 27, 0.18), rgba(18, 13, 10, 0));
  opacity: 0.9;
  z-index: -1;
}

.feature-hero h1::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(125, 28, 23, 0.62);
  box-shadow:
    -5px 18px 0 -6px rgba(22, 15, 11, 0.44),
    6px 27px 0 -7px rgba(125, 28, 23, 0.42);
}

.feature-hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 245, 224, 0.86);
  font-size: 15px;
  line-height: 1.5;
}

.ai-screen .feature-hero::before {
  background:
    linear-gradient(180deg, rgba(19, 34, 28, 0.12), rgba(20, 28, 18, 0.78)),
    url("./assets/chaos-heroes-bg.png") center / cover;
}

.ai-screen .feature-hero {
  --hero-figures: url("./assets/hero-ai-figures.png");
}

.strategist-screen .feature-hero::before {
  background:
    linear-gradient(180deg, rgba(24, 24, 48, 0.08), rgba(26, 19, 45, 0.8)),
    url("./assets/chaos-heroes-bg.png") center / cover;
}

.strategist-screen .feature-hero {
  --hero-figures: url("./assets/hero-strategy-figures.png");
}

.profile-screen .feature-hero::before {
  background:
    linear-gradient(180deg, rgba(64, 36, 18, 0.08), rgba(62, 34, 14, 0.78)),
    url("./assets/chaos-heroes-bg.png") center / cover;
}

.profile-screen .feature-hero {
  --hero-figures: url("./assets/hero-profile-figures.png");
}

.feature-grid {
  display: grid;
  gap: 10px;
}

.feature-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.93), rgba(236, 212, 176, 0.9));
  box-shadow: var(--shadow);
}

.feature-card strong {
  color: #2d1d12;
  font-size: 17px;
}

.feature-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.strategist-workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strategist-action {
  position: relative;
  isolation: isolate;
  min-height: 86px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(177, 117, 42, 0.48);
  border-radius: 8px;
  overflow: hidden;
  color: #fff0c2;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(25, 13, 10, 0.88), rgba(94, 29, 22, 0.5) 54%, rgba(22, 13, 10, 0.66)),
    url("./assets/strategy-draw-bg.jpg?v=20260809-draw-bg-1") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.strategist-action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(100deg, rgba(255, 230, 166, 0.08) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 88% 64%, rgba(255, 212, 104, 0.18), transparent 28%);
  opacity: 0.9;
}

.copper-entry {
  background:
    linear-gradient(90deg, rgba(35, 24, 14, 0.9), rgba(111, 73, 28, 0.48) 54%, rgba(28, 20, 12, 0.7)),
    url("./assets/strategy-copper-bg.png?v=20260809-draw-bg-1") center / cover no-repeat;
}

.attendance-entry {
  background-image: url("./assets/strategist-attendance-entry-chibi-v5.png?v=20260823");
  background-image: image-set(
    url("./assets/strategist-attendance-entry-chibi-v5.png?v=20260823") 1x,
    url("./assets/strategist-attendance-entry-chibi-v5@2x.png?v=20260823") 2x
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-color: rgba(143, 92, 40, 0.45);
}

.attendance-entry .strategist-action-mark {
  border-color: rgba(221, 225, 184, 0.78);
  color: #f1ecc5;
  background: radial-gradient(circle, rgba(70, 105, 67, 0.96), rgba(31, 51, 31, 0.98));
}

.picker.battle-attendance-dialog {
  width: min(820px, calc(100vw - 20px));
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 14px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(252, 245, 226, 0.93), rgba(237, 218, 180, 0.95)),
    url("./assets/dialog-bg-campaign-v2.jpg") center top / cover no-repeat;
}

.picker.battle-attendance-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 8%, rgba(136, 38, 31, 0.11), transparent 27%),
    repeating-linear-gradient(102deg, rgba(95, 66, 36, 0.035) 0 1px, transparent 1px 11px);
}

.attendance-head {
  margin-bottom: 12px;
}

.attendance-head h3 {
  margin: 0;
  color: #422519;
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 30px;
  font-weight: 500;
}

.attendance-head p {
  margin: 3px 0 0;
  color: #886f58;
  font-size: 12px;
  font-weight: 700;
}

.attendance-setup {
  padding: 12px;
  border: 1px solid rgba(148, 101, 54, 0.34);
  border-radius: 10px;
  background: rgba(255, 251, 239, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.attendance-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.attendance-file-card {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #a67a48;
  border-radius: 9px;
  color: #513923;
  background: linear-gradient(180deg, rgba(255, 253, 244, 0.92), rgba(242, 224, 188, 0.82));
  cursor: pointer;
}

.attendance-file-card:has(input:focus-visible) {
  outline: 2px solid rgba(143, 48, 39, 0.46);
  outline-offset: 2px;
}

.attendance-file-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.attendance-file-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(110, 56, 39, 0.46);
  border-radius: 50%;
  color: #fff3ce;
  background: linear-gradient(180deg, #a64b3d, #743027);
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 22px;
}

.attendance-file-card:nth-child(2) .attendance-file-mark {
  background: linear-gradient(180deg, #667b49, #3f532f);
}

.attendance-file-card strong,
.attendance-file-card small {
  display: block;
}

.attendance-file-card strong {
  font-size: 15px;
}

.attendance-file-card small {
  margin-top: 4px;
  overflow: hidden;
  color: #8c7258;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-file-card.is-ready {
  border-style: solid;
  border-color: #72804f;
  background: linear-gradient(180deg, rgba(249, 250, 230, 0.94), rgba(226, 230, 188, 0.86));
}

.attendance-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.attendance-rule-row > label > span:first-child {
  display: block;
  margin-bottom: 5px;
  color: #6a4a32;
  font-size: 12px;
  font-weight: 900;
}

.attendance-threshold-field {
  height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #b48a5b;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 253, 244, 0.9);
}

.attendance-threshold-field input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: #482d20;
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.attendance-threshold-field em {
  padding: 0 12px;
  border-left: 1px dashed rgba(141, 96, 54, 0.44);
  color: #806249;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.attendance-compare-btn {
  min-height: 42px;
  border-radius: 8px;
}

.attendance-rule-tip {
  margin: 7px 0 0;
  color: #8a7058;
  font-size: 11px;
  font-weight: 700;
}

.attendance-result {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.attendance-result-empty {
  min-height: 130px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(143, 97, 52, 0.42);
  border-radius: 10px;
  color: #80684e;
  text-align: center;
  background: rgba(255, 250, 235, 0.62);
}

.attendance-result-empty > div {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.attendance-result-empty span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff2cb;
  background: #8d3c31;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 22px;
}

.attendance-result-empty strong { color: #563a27; }
.attendance-result-empty small { font-size: 11px; }

.attendance-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.attendance-stat {
  min-width: 0;
  padding: 9px 6px;
  border: 1px solid rgba(145, 96, 52, 0.28);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 251, 239, 0.76);
}

.attendance-stat strong,
.attendance-stat span {
  display: block;
}

.attendance-stat strong {
  color: #71352d;
  font-size: 20px;
}

.attendance-stat span {
  margin-top: 2px;
  color: #846c56;
  font-size: 10px;
  font-weight: 800;
}

.attendance-interval {
  margin: -3px 0 0;
  color: #7b624c;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.attendance-section {
  padding: 11px;
  border: 1px solid rgba(145, 96, 52, 0.28);
  border-radius: 10px;
  background: rgba(255, 251, 239, 0.72);
}

.attendance-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.attendance-section-head h4 {
  margin: 0;
  color: #4e3022;
  font-size: 16px;
}

.attendance-section-head span {
  color: #98795c;
  font-size: 10px;
  font-weight: 800;
}

.attendance-clan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.attendance-clan-card {
  padding: 9px;
  border: 1px solid rgba(136, 88, 48, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 254, 247, 0.88), rgba(239, 222, 187, 0.72));
}

.attendance-clan-card header,
.attendance-clan-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.attendance-clan-card header strong {
  overflow: hidden;
  color: #4d3022;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-clan-card header span {
  flex: 0 0 auto;
  color: #8f3a30;
  font-size: 12px;
  font-weight: 900;
}

.attendance-clan-progress {
  height: 6px;
  margin: 7px 0;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(102, 72, 45, 0.16);
}

.attendance-clan-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d3b31, #c37e3f);
}

.attendance-clan-card footer {
  color: #856b53;
  font-size: 10px;
  font-weight: 800;
}

.attendance-clan-unqualified {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(139, 91, 50, 0.27);
}

.attendance-clan-unqualified > b {
  display: block;
  margin-bottom: 6px;
  color: #71382e;
  font-size: 11px;
}

.attendance-name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.attendance-name-chips span {
  padding: 4px 7px;
  border: 1px solid rgba(135, 73, 47, 0.24);
  border-radius: 999px;
  color: #654533;
  background: rgba(255, 252, 242, 0.86);
  font-size: 11px;
  font-weight: 800;
}

.attendance-clan-unqualified em {
  color: #71814f;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.attendance-name-chips .is-under { border-color: rgba(165, 122, 62, 0.34); }
.attendance-name-chips .is-absent { border-color: rgba(154, 71, 59, 0.34); }
.attendance-name-chips .is-abnormal { border-color: rgba(112, 101, 93, 0.4); }

.attendance-warning {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(153, 77, 48, 0.3);
  border-radius: 7px;
  color: #744434;
  background: rgba(255, 237, 210, 0.82);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .strategist-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker.battle-attendance-dialog { padding: 10px; }
  .attendance-rule-row { grid-template-columns: 1fr; }
  .attendance-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attendance-clan-grid { grid-template-columns: 1fr; }
}

/* 战役考勤：统一为选择战法弹窗的轻质金纸与朱红标题体系。 */
.picker.battle-attendance-dialog {
  width: min(760px, calc(100vw - 24px));
  height: min(90vh, 860px);
  max-height: min(90vh, 860px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  padding: 11px;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.75), rgba(242, 221, 181, 0.66)),
    url("./assets/dialog-bg-skill-chibi-sandbox-v1.png?v=20260813") center / 100% 100% no-repeat,
    #f4ead2;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.58);
}

.picker.battle-attendance-dialog[open] {
  display: flex;
  flex-direction: column;
}

.picker.battle-attendance-dialog::before {
  display: none;
}

.picker.battle-attendance-dialog > * {
  position: relative;
  z-index: 1;
}

.picker.battle-attendance-dialog .attendance-head {
  flex: 0 0 auto;
  margin-bottom: 9px;
  padding: 7px 8px 7px 10px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.battle-attendance-dialog .attendance-head > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
}

.picker.battle-attendance-dialog .attendance-head > div::before {
  content: "勤";
  grid-row: 1 / 3;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 224, 153, 0.38);
  border-radius: 50%;
  color: #7a3024;
  background: linear-gradient(180deg, #fae9bb, #d7a756);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 251, 224, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.42);
}

.picker.battle-attendance-dialog .attendance-head h3 {
  margin: 0 0 1px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.picker.battle-attendance-dialog .attendance-head p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 239, 202, 0.76);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker.battle-attendance-dialog .attendance-head .tool-btn {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.battle-attendance-dialog .attendance-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.battle-attendance-dialog .attendance-setup {
  flex: 0 0 auto;
  padding: 9px;
  border: 1px solid rgba(116, 66, 33, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 233, 0.61);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.07);
}

.picker.battle-attendance-dialog .attendance-file-grid {
  gap: 7px;
}

.picker.battle-attendance-dialog .attendance-file-card {
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(119, 70, 35, 0.3);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.45);
}

.picker.battle-attendance-dialog .attendance-file-card:hover {
  border-color: rgba(143, 55, 39, 0.5);
  background: rgba(255, 246, 224, 0.96);
}

.picker.battle-attendance-dialog .attendance-file-mark {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(121, 67, 29, 0.32);
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-size: 15px;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.picker.battle-attendance-dialog .attendance-file-card:nth-child(2) .attendance-file-mark {
  color: #fff0cd;
  background: linear-gradient(180deg, #768654, #4d6037);
}

.picker.battle-attendance-dialog .attendance-file-card strong {
  color: #542b1d;
  font-size: 13px;
}

.picker.battle-attendance-dialog .attendance-file-card small {
  margin-top: 2px;
  color: #8a6b50;
  font-size: 10px;
}

.picker.battle-attendance-dialog .attendance-file-card.is-ready {
  border-color: rgba(112, 130, 72, 0.62);
  background: linear-gradient(180deg, rgba(249, 248, 222, 0.96), rgba(226, 225, 178, 0.88));
}

.picker.battle-attendance-dialog .attendance-rule-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.62fr);
  gap: 8px;
  margin-top: 8px;
}

.picker.battle-attendance-dialog .attendance-rule-row > label > span:first-child {
  margin-bottom: 4px;
  color: #673b29;
  font-size: 11px;
}

.picker.battle-attendance-dialog .attendance-threshold-field {
  height: 37px;
  border-color: rgba(116, 66, 33, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 237, 0.78);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.08);
}

.picker.battle-attendance-dialog .attendance-threshold-field input {
  color: #552a1d;
  font-size: 16px;
}

.picker.battle-attendance-dialog .attendance-threshold-field em {
  color: #795642;
  font-size: 11px;
}

.picker.battle-attendance-dialog .attendance-compare-btn {
  min-height: 37px;
  border: 1px solid rgba(91, 42, 24, 0.82);
  border-radius: 8px;
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 36%),
    linear-gradient(135deg, #8b3b2c, #58231c);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.14), 0 2px 5px rgba(71, 31, 19, 0.15);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
}

.picker.battle-attendance-dialog .attendance-rule-tip {
  margin: 5px 0 0;
  color: #8a6a50;
  font-size: 10px;
}

.picker.battle-attendance-dialog .attendance-result {
  min-height: 0;
  flex: 1 1 auto;
  gap: 9px;
  margin-top: 9px;
  padding: 0 3px 2px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 55, 32, 0.46) transparent;
}

.picker.battle-attendance-dialog .attendance-result-empty {
  min-height: 110px;
  border-color: rgba(116, 66, 33, 0.3);
  background: rgba(255, 249, 233, 0.54);
}

.picker.battle-attendance-dialog .attendance-result-empty span {
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.battle-attendance-dialog .attendance-overview {
  gap: 6px;
}

.picker.battle-attendance-dialog .attendance-stat {
  min-height: 52px;
  display: grid;
  place-content: center;
  padding: 6px;
  border-color: rgba(119, 70, 35, 0.27);
  background:
    radial-gradient(circle at 82% 18%, rgba(169, 63, 43, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 242, 0.88), rgba(239, 219, 179, 0.76));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 247, 0.4), 0 2px 5px rgba(73, 39, 20, 0.06);
}

.picker.battle-attendance-dialog .attendance-stat strong {
  color: #783025;
  font-size: 18px;
}

.picker.battle-attendance-dialog .attendance-interval {
  margin: 0;
  padding: 6px 8px;
  border: 1px dashed rgba(116, 66, 33, 0.25);
  border-radius: 8px;
  color: #795b46;
  background: rgba(255, 250, 237, 0.54);
}

.picker.battle-attendance-dialog .attendance-merit-leader {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(139, 57, 39, 0.48);
  border-radius: 10px;
  background:
    radial-gradient(circle at 86% 34%, rgba(255, 221, 136, 0.26), transparent 34%),
    linear-gradient(135deg, rgba(255, 244, 214, 0.96), rgba(224, 187, 111, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 252, 232, 0.62), 0 3px 8px rgba(86, 42, 23, 0.12);
}

.picker.battle-attendance-dialog .attendance-merit-crown {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 19px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.battle-attendance-dialog .attendance-merit-copy {
  min-width: 0;
}

.picker.battle-attendance-dialog .attendance-merit-copy small,
.picker.battle-attendance-dialog .attendance-merit-copy strong,
.picker.battle-attendance-dialog .attendance-merit-copy em {
  display: block;
}

.picker.battle-attendance-dialog .attendance-merit-copy small {
  color: #8b5d3e;
  font-size: 10px;
  font-weight: 900;
}

.picker.battle-attendance-dialog .attendance-merit-copy strong {
  margin-top: 2px;
  overflow: hidden;
  color: #64291f;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker.battle-attendance-dialog .attendance-merit-copy em {
  margin-top: 1px;
  color: #87664d;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.picker.battle-attendance-dialog .attendance-merit-leader > b {
  color: #8b3025;
  font-size: 20px;
  white-space: nowrap;
}

.picker.battle-attendance-dialog .attendance-merit-leader > b {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  line-height: 1;
}

.picker.battle-attendance-dialog .attendance-merit-leader .attendance-leader-value-label {
  color: inherit;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  opacity: 0.82;
  text-shadow: none;
}

.picker.battle-attendance-dialog .attendance-merit-leader > b > span {
  color: inherit;
  font: inherit;
  line-height: 1;
}

.picker.battle-attendance-dialog .attendance-section {
  padding: 9px;
  border-color: rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.52);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.08);
}

.picker.battle-attendance-dialog .attendance-section-head {
  margin-bottom: 7px;
}

.picker.battle-attendance-dialog .attendance-section-head h4 {
  color: #542b1d;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
}

.picker.battle-attendance-dialog .attendance-clan-card {
  padding: 8px;
  border-color: rgba(119, 70, 35, 0.28);
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.06), inset 0 0 0 1px rgba(255, 255, 247, 0.4);
}

.picker.battle-attendance-dialog .attendance-clan-progress {
  height: 5px;
  margin: 6px 0;
}

.picker.battle-attendance-dialog .attendance-clan-progress i {
  background: linear-gradient(90deg, #8d3c2d, #d19a4c);
}

.picker.battle-attendance-dialog .attendance-clan-unqualified {
  margin-top: 7px;
  padding-top: 7px;
}

.picker.battle-attendance-dialog .attendance-name-chips span {
  border-color: rgba(139, 57, 39, 0.23);
  color: #64291f;
  background: linear-gradient(180deg, rgba(255, 241, 204, 0.92), rgba(232, 204, 146, 0.82));
}

@media (max-width: 620px) {
  .picker.battle-attendance-dialog {
    height: min(92vh, 860px);
    max-height: min(92vh, 860px);
    padding: 9px;
  }

  .picker.battle-attendance-dialog .attendance-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picker.battle-attendance-dialog .attendance-rule-row {
    grid-template-columns: minmax(0, 1fr) 138px;
  }
}

@media (max-width: 440px) {
  .picker.battle-attendance-dialog .attendance-file-grid,
  .picker.battle-attendance-dialog .attendance-rule-row {
    grid-template-columns: 1fr;
  }

  .picker.battle-attendance-dialog .attendance-head p {
    max-width: 210px;
  }

  .picker.battle-attendance-dialog .attendance-merit-leader {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .picker.battle-attendance-dialog .attendance-merit-crown {
    width: 34px;
    height: 34px;
  }

  .picker.battle-attendance-dialog .attendance-merit-leader > b {
    font-size: 16px;
  }
}

/* 战役考勤威仪主题：与封神榜统一的赤金标题、双线边角和点卯军帐背景。 */
.picker.battle-attendance-dialog {
  border: 1px solid rgba(80, 32, 20, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 246, 219, 0.2), rgba(244, 221, 174, 0.32)),
    url("./assets/battle-attendance-bg-rollcall-v1.png?v=20260822") center top / 100% 100% no-repeat,
    #e8ca91;
  box-shadow:
    0 20px 46px rgba(28, 14, 8, 0.48),
    inset 0 0 0 2px rgba(255, 235, 173, 0.58),
    inset 0 0 34px rgba(91, 36, 19, 0.2);
}

.picker.battle-attendance-dialog::before,
.picker.battle-attendance-dialog::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 66px;
  height: 66px;
  display: block;
  pointer-events: none;
  opacity: 0.72;
}

.picker.battle-attendance-dialog::before {
  left: 2px;
  top: 2px;
  border-left: 3px double rgba(106, 43, 24, 0.76);
  border-top: 3px double rgba(106, 43, 24, 0.76);
  border-radius: 12px 0 0;
}

.picker.battle-attendance-dialog::after {
  right: 2px;
  bottom: 2px;
  border-right: 3px double rgba(106, 43, 24, 0.76);
  border-bottom: 3px double rgba(106, 43, 24, 0.76);
  border-radius: 0 0 12px;
}

.picker.battle-attendance-dialog .attendance-head {
  min-height: 54px;
  padding: 7px 9px;
  border-color: rgba(52, 17, 11, 0.94);
  background:
    radial-gradient(circle at 76% 46%, rgba(255, 199, 91, 0.2), transparent 28%),
    repeating-linear-gradient(104deg, rgba(255, 227, 157, 0.05) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #7c281f, #321511 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 210, 111, 0.22),
    inset 0 -7px 14px rgba(24, 7, 4, 0.22),
    0 4px 10px rgba(42, 17, 9, 0.26);
}

.picker.battle-attendance-dialog .attendance-head > div {
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 9px;
}

.picker.battle-attendance-dialog .attendance-head > div::before {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 220, 132, 0.58);
  color: #651f17;
  background:
    radial-gradient(circle at 34% 28%, #fff2b8, transparent 25%),
    linear-gradient(180deg, #f2cc70, #b9752d);
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 20px;
  text-shadow: 0 1px 0 rgba(255, 247, 198, 0.7);
  box-shadow: inset 0 0 0 2px rgba(255, 245, 192, 0.28), 0 2px 7px rgba(25, 7, 4, 0.36);
}

.picker.battle-attendance-dialog .attendance-head h3 {
  color: #fff4d8;
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
}

.picker.battle-attendance-dialog .attendance-head p {
  color: rgba(255, 228, 172, 0.78);
}

.picker.battle-attendance-dialog .attendance-head .tool-btn {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 220, 132, 0.58);
  color: #651f17;
  background:
    radial-gradient(circle at 34% 28%, #fff2b8, transparent 25%),
    linear-gradient(180deg, #f2cc70, #b9752d);
  box-shadow: inset 0 0 0 2px rgba(255, 245, 192, 0.28), 0 2px 7px rgba(25, 7, 4, 0.36);
}

.picker.battle-attendance-dialog .attendance-setup {
  border-color: rgba(111, 58, 27, 0.38);
  background: rgba(255, 246, 218, 0.8);
  box-shadow: inset 0 1px 5px rgba(76, 42, 22, 0.08), 0 3px 8px rgba(53, 23, 12, 0.1);
  backdrop-filter: blur(1px);
}

.picker.battle-attendance-dialog .attendance-file-card {
  border-color: rgba(117, 56, 29, 0.42);
  background:
    radial-gradient(circle at 88% 24%, rgba(255, 218, 124, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(255, 249, 227, 0.96), rgba(233, 203, 145, 0.87));
  box-shadow: inset 0 0 0 1px rgba(255, 249, 220, 0.48), 0 3px 7px rgba(64, 29, 14, 0.1);
}

.picker.battle-attendance-dialog .attendance-file-card:nth-child(2) {
  background:
    radial-gradient(circle at 88% 24%, rgba(157, 175, 103, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(255, 249, 227, 0.96), rgba(220, 214, 157, 0.88));
}

.picker.battle-attendance-dialog .attendance-rule-row {
  padding-top: 8px;
  border-top: 1px dashed rgba(111, 58, 27, 0.28);
}

.picker.battle-attendance-dialog .attendance-threshold-field {
  border-color: rgba(117, 56, 29, 0.42);
  background: linear-gradient(90deg, rgba(255, 249, 227, 0.94), rgba(239, 216, 170, 0.88));
}

.picker.battle-attendance-dialog .attendance-compare-btn {
  border-color: rgba(52, 17, 11, 0.88);
  background:
    repeating-linear-gradient(104deg, rgba(255, 227, 157, 0.05) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #8f3327, #4e1b16 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 111, 0.2), 0 3px 8px rgba(53, 23, 12, 0.18);
}

.picker.battle-attendance-dialog .attendance-result-empty {
  border: 1px dashed rgba(96, 40, 21, 0.36);
  background: rgba(255, 244, 214, 0.34);
  backdrop-filter: blur(0.5px);
}

.picker.battle-attendance-dialog .attendance-result-empty > div {
  padding: 14px 18px;
  border: 1px solid rgba(111, 58, 27, 0.24);
  border-radius: 10px;
  background: rgba(255, 246, 220, 0.72);
  box-shadow: 0 4px 12px rgba(60, 27, 14, 0.09);
}

.picker.battle-attendance-dialog .attendance-stat {
  border-color: rgba(112, 50, 27, 0.38);
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 203, 90, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 244, 209, 0.93), rgba(221, 181, 103, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 246, 207, 0.56), 0 3px 7px rgba(64, 29, 14, 0.11);
}

.picker.battle-attendance-dialog .attendance-interval {
  border-color: rgba(106, 48, 25, 0.34);
  color: #653a25;
  background: rgba(255, 242, 207, 0.82);
  text-shadow: 0 1px 0 rgba(255, 252, 231, 0.8);
}

.picker.battle-attendance-dialog .attendance-merit-leader {
  border-color: rgba(143, 82, 18, 0.68);
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 248, 190, 0.72), transparent 32%),
    linear-gradient(155deg, rgba(255, 240, 169, 0.96), rgba(212, 154, 50, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 249, 220, 0.62), 0 4px 10px rgba(58, 25, 12, 0.16);
}

.picker.battle-attendance-dialog .attendance-section {
  border-color: rgba(96, 40, 21, 0.42);
  background: rgba(255, 244, 214, 0.78);
  backdrop-filter: blur(1px);
}

.picker.battle-attendance-dialog .attendance-section-head h4 {
  color: #5d2018;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 22px;
  font-weight: 500;
}

.picker.battle-attendance-dialog .attendance-clan-card {
  border-color: rgba(116, 55, 28, 0.25);
  background: rgba(255, 249, 228, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 239, 0.42), 0 3px 7px rgba(64, 29, 14, 0.08);
}

/* 战役考勤信息层级：压缩合格规则，突出榜首与门阀名。 */
.picker.battle-attendance-dialog .attendance-setup {
  padding: 8px 9px 6px;
}

.picker.battle-attendance-dialog .attendance-rule-row {
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
}

.picker.battle-attendance-dialog .attendance-rule-row > label {
  min-width: 0;
}

.picker.battle-attendance-dialog .attendance-rule-row > label > span:first-child {
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1;
}

.picker.battle-attendance-dialog .attendance-threshold-field {
  height: 40px;
  border-radius: 8px;
}

.picker.battle-attendance-dialog .attendance-threshold-field input {
  padding: 0 9px;
  font-size: 15px;
}

.picker.battle-attendance-dialog .attendance-threshold-field em {
  padding: 0 10px;
  font-size: 10px;
}

.picker.battle-attendance-dialog .attendance-compare-btn {
  position: relative;
  min-height: 40px;
  height: 40px;
  padding: 0 8px 0 34px;
  border: 2px solid #4b2718;
  border-radius: 12px;
  color: #fff7d2;
  background:
    radial-gradient(ellipse at 11% 84%, rgba(255, 207, 155, 0.16) 0 5px, transparent 6px),
    radial-gradient(ellipse at 89% 21%, rgba(255, 207, 155, 0.13) 0 6px, transparent 7px),
    linear-gradient(180deg, #cf5143 0%, #b63c32 52%, #963127 100%);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #552207;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.25), 0 3px 5px rgba(65, 34, 18, 0.24);
}

.picker.battle-attendance-dialog .attendance-compare-btn::before {
  content: "统";
  position: absolute;
  left: 8px;
  top: 50%;
  display: grid;
  width: 21px;
  height: 21px;
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 1px solid rgba(81, 40, 21, 0.76);
  border-radius: 50% 50% 45% 45%;
  color: #fff1bf;
  background: rgba(112, 38, 27, 0.42);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 11px;
  line-height: 1;
}

.picker.battle-attendance-dialog .attendance-rule-tip {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.3;
}

.picker.battle-attendance-dialog .attendance-action-buttons {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(84px, 1fr) minmax(84px, 1fr);
  gap: 7px;
  align-items: end;
}

.picker.battle-attendance-dialog .attendance-share-btn {
  position: relative;
  min-height: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px 0 34px;
  border: 2px solid #4b2718;
  border-radius: 12px;
  color: #fff7d2;
  background:
    radial-gradient(ellipse at 83% 75%, rgba(226, 243, 190, 0.15) 0 5px, transparent 6px),
    linear-gradient(180deg, #568f72 0%, #39745b 52%, #295d49 100%);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #552207;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.25), 0 3px 5px rgba(65, 34, 18, 0.24);
}

.picker.battle-attendance-dialog .attendance-share-btn::before {
  content: "传";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 21px;
  height: 21px;
  display: grid;
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 1px solid rgba(44, 74, 52, 0.78);
  border-radius: 50% 50% 45% 45%;
  color: #fff1bf;
  background: rgba(25, 69, 52, 0.45);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 11px;
  line-height: 1;
}

.picker.battle-attendance-dialog .attendance-share-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.5;
}

.picker.battle-attendance-dialog .attendance-merit-leader {
  position: relative;
  min-height: 72px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 10px 13px;
  overflow: hidden;
  border: 2px solid rgba(210, 151, 55, 0.88);
  background:
    linear-gradient(90deg, rgba(48, 8, 5, 0.84) 0%, rgba(76, 18, 10, 0.6) 31%, rgba(72, 18, 9, 0.06) 45%, rgba(72, 18, 9, 0.06) 56%, rgba(58, 12, 7, 0.58) 72%, rgba(35, 5, 4, 0.84) 100%),
    linear-gradient(180deg, rgba(255, 207, 104, 0.04), rgba(39, 7, 5, 0.25)),
    url("./assets/attendance-merit-warrior-bg-v2.png?v=20260822") center 46% / cover no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255, 231, 151, 0.28),
    inset 0 -10px 20px rgba(49, 9, 5, 0.22),
    0 5px 13px rgba(68, 27, 12, 0.28);
}

.picker.battle-attendance-dialog .attendance-merit-leader::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 221, 126, 0.42);
  border-radius: 7px;
  pointer-events: none;
}

.picker.battle-attendance-dialog .attendance-merit-crown {
  width: 44px;
  height: 44px;
  position: relative;
  border: 2px solid #f5d77f;
  color: #fff0b9;
  background: radial-gradient(circle at 38% 28%, #bd5940, #681d18 68%);
  font-size: 22px;
  text-shadow: 0 1px 2px rgba(45, 10, 5, 0.72);
  box-shadow:
    inset 0 0 0 2px rgba(255, 235, 159, 0.22),
    0 0 0 3px rgba(137, 56, 20, 0.18),
    0 3px 9px rgba(72, 25, 9, 0.28);
}

.picker.battle-attendance-dialog .attendance-merit-copy {
  position: relative;
}

.picker.battle-attendance-dialog .attendance-merit-copy strong {
  margin-top: 0;
  color: #fff0bd;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(44, 7, 4, 0.95), 0 0 8px rgba(109, 30, 15, 0.72);
}

.picker.battle-attendance-dialog .attendance-merit-copy em {
  margin-top: 3px;
  color: #f2d39b;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(40, 7, 4, 0.92);
}

.picker.battle-attendance-dialog .attendance-merit-leader > b {
  position: relative;
  padding: 7px 10px;
  border: 1px solid rgba(255, 221, 128, 0.58);
  border-radius: 7px;
  color: #ffe8a6;
  background: linear-gradient(135deg, #9b382a, #5b1c17);
  font-size: 21px;
  text-shadow: 0 1px 2px rgba(49, 11, 6, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 174, 0.13), 0 3px 8px rgba(73, 24, 10, 0.22);
}

.picker.battle-attendance-dialog .attendance-clan-card header {
  align-items: center;
}

.picker.battle-attendance-dialog .attendance-clan-card header strong {
  display: inline-flex;
  min-height: 28px;
  max-width: 72%;
  align-items: center;
  padding: 3px 11px 3px 9px;
  border: 1px solid rgba(229, 181, 91, 0.7);
  border-radius: 5px 14px 14px 5px;
  color: #ffe9ad;
  background:
    repeating-linear-gradient(104deg, rgba(255, 227, 157, 0.05) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, #8e3025, #501914);
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(43, 10, 5, 0.74);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 143, 0.12), 0 2px 6px rgba(72, 24, 12, 0.17);
}

.picker.battle-attendance-dialog .attendance-clan-card header span {
  color: #7e281f;
  font-size: 12px;
}

@media (max-width: 440px) {
  .picker.battle-attendance-dialog .attendance-head h3 { font-size: 24px; }
  .picker.battle-attendance-dialog .attendance-head > div { grid-template-columns: 36px minmax(0, 1fr); }
  .picker.battle-attendance-dialog .attendance-head > div::before { width: 34px; height: 34px; }
  .picker.battle-attendance-dialog .attendance-merit-leader {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
  }
  .picker.battle-attendance-dialog .attendance-merit-copy strong { font-size: 18px; }
  .picker.battle-attendance-dialog .attendance-merit-leader > b { padding: 6px 8px; font-size: 18px; }
  .picker.battle-attendance-dialog .attendance-rule-row { grid-template-columns: 1fr; }
  .picker.battle-attendance-dialog .attendance-action-buttons { width: 100%; }
}

/* 战役考勤分享图预览。 */
.picker.attendance-share-dialog {
  width: min(94vw, 620px);
  max-width: 620px;
  height: min(90vh, 900px);
  max-height: 900px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(72, 26, 16, 0.94);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 246, 218, 0.9), rgba(229, 195, 132, 0.92)),
    url("./assets/battle-attendance-bg-rollcall-v1.png?v=20260822") center top / cover no-repeat;
  box-shadow: 0 22px 48px rgba(28, 12, 7, 0.52), inset 0 0 0 2px rgba(255, 234, 172, 0.5);
}

.picker.attendance-share-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.picker.attendance-share-dialog .attendance-share-head {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px solid rgba(49, 14, 10, 0.92);
  border-radius: 10px;
  background:
    repeating-linear-gradient(104deg, rgba(255, 227, 157, 0.05) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #7c281f, #321511 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 111, 0.2), 0 4px 10px rgba(42, 17, 9, 0.25);
}

.picker.attendance-share-dialog .attendance-share-head h3 {
  color: #fff1ce;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.picker.attendance-share-dialog .attendance-share-head p {
  color: rgba(255, 225, 166, 0.76);
}

.picker.attendance-share-dialog .attendance-share-head .tool-btn {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 220, 132, 0.58);
  color: #651f17;
  background: linear-gradient(180deg, #f2cc70, #b9752d);
}

.attendance-share-preview {
  min-height: 0;
  flex: 1 1 auto;
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(91, 41, 22, 0.42);
  border-radius: 10px;
  background: rgba(49, 21, 13, 0.78);
  box-shadow: inset 0 0 18px rgba(14, 5, 3, 0.34);
  scrollbar-width: thin;
  scrollbar-color: rgba(223, 175, 88, 0.66) transparent;
}

.attendance-share-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #ead09b;
  box-shadow: 0 5px 16px rgba(12, 4, 2, 0.36);
}

.attendance-share-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.attendance-share-actions .primary {
  width: min(66%, 300px);
  min-height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8f3327, #4e1b16 72%);
}

.copper-entry:disabled {
  cursor: not-allowed;
  opacity: 0.86;
}

.strategist-action-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 218, 132, 0.72);
  border-radius: 50%;
  color: #ffe7a8;
  background: radial-gradient(circle, rgba(179, 50, 38, 0.92), rgba(77, 23, 18, 0.96));
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 0 18px rgba(255, 194, 86, 0.22), inset 0 0 0 4px rgba(255, 238, 188, 0.1);
}

.strategist-action strong,
.strategist-action em {
  display: block;
  font-style: normal;
}

.strategist-action strong {
  color: #ffe3a0;
  font-size: 21px;
  line-height: 1.12;
}

.strategist-action em {
  margin-top: 5px;
  color: rgba(255, 246, 222, 0.84);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.ai-workbench {
  display: grid;
  gap: 12px;
}

.ai-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid #c49a62;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8eccf, #eed9ae);
  box-shadow: inset 0 1px 0 #fff9e9, 0 5px 14px rgba(72, 39, 18, 0.09);
}

.ai-mode-tab {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 58px;
  padding: 7px 10px;
  border: 1px solid rgba(135, 91, 53, 0.2);
  border-radius: 9px;
  background: rgba(255, 252, 243, 0.72);
  color: #795d45;
  text-align: left;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.ai-mode-tab > span:last-child {
  min-width: 0;
}

.ai-mode-tab strong,
.ai-mode-tab small {
  display: block;
}

.ai-mode-tab strong {
  color: #573a28;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: none;
}

.ai-mode-tab small {
  margin-top: 3px;
  overflow: hidden;
  color: #91765f;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.ai-mode-seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d1a66f;
  border-radius: 9px;
  background: #fff8e8;
  color: #8b4a2d;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 22px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #fffdf5;
}

.ai-mode-tab.is-selected {
  border-color: #7f2925;
  background: linear-gradient(135deg, #ad4137, #792824);
  box-shadow: 0 4px 10px rgba(94, 35, 27, 0.2), inset 0 1px #c85b4d;
}

.ai-mode-tab.is-selected strong {
  color: #fff9e9;
}

.ai-mode-tab.is-selected small {
  color: #f7dfbe;
}

.ai-mode-tab.is-selected .ai-mode-seal {
  border-color: #edce96;
  background: #f7e5be;
  color: #87332b;
  box-shadow: inset 0 0 0 1px #fff3d7;
}

.ai-mode-tab:active {
  background-color: rgba(236, 216, 180, 0.9);
}

.ai-mode-panel[hidden] {
  display: none !important;
}

.battle-report-analyzer {
  display: grid;
  gap: 12px;
}

.battle-report-upload-card,
.battle-report-result-card {
  position: relative;
  overflow: hidden;
}

.battle-report-upload-card::before,
.battle-report-result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 92% 12%, rgba(170, 48, 33, 0.12), transparent 32%),
    radial-gradient(circle at 6% 90%, rgba(47, 91, 73, 0.1), transparent 34%);
  pointer-events: none;
}

.battle-report-upload-btn {
  min-width: 98px;
}

.battle-report-preview {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 116px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 18px;
  overflow: hidden;
  border: 1px dashed rgba(144, 87, 40, 0.48);
  border-radius: 10px;
  background: rgba(255, 250, 238, 0.64);
  color: #604633;
  text-align: center;
}

.battle-report-preview.has-image {
  min-height: 174px;
  cursor: zoom-in;
}

.battle-report-preview.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--battle-report-image);
  background-position: center;
  background-size: cover;
}

.battle-report-preview.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(22, 15, 10, 0.28), rgba(22, 15, 10, 0.72));
}

.battle-report-preview.has-image strong,
.battle-report-preview.has-image small {
  max-width: 90%;
  overflow: hidden;
  color: #fff1d2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.88);
}

.battle-report-preview strong {
  font-size: 16px;
}

.battle-report-preview small {
  color: #8b725d;
  font-size: 12px;
}

.battle-report-awaiting-seal {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(154, 64, 49, 0.4);
  border-radius: 50%;
  background: rgba(173, 56, 45, 0.09);
  color: #9e4435;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 26px;
}

.battle-report-preview-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 232, 190, 0.48);
  border-radius: 999px;
  background: rgba(69, 40, 24, 0.72);
  color: #fff0cd;
  font-size: 11px;
}

.battle-report-correction {
  margin-top: 9px;
  padding: 0 10px;
  border: 1px dashed rgba(139, 83, 42, 0.32);
  border-radius: 8px;
  background: rgba(255, 249, 234, 0.5);
}

.battle-report-correction summary {
  padding: 9px 0;
  color: #76513a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.battle-report-correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 0 7px;
}

.battle-report-correction label {
  display: grid;
  gap: 5px;
}

.battle-report-correction label > span {
  color: #5d3b2b;
  font-size: 12px;
  font-weight: 900;
}

.battle-report-correction textarea {
  min-height: 58px;
  padding: 8px;
  resize: vertical;
  border: 1px solid rgba(131, 81, 45, 0.3);
  border-radius: 7px;
  background: rgba(255, 253, 245, 0.72);
  color: #4c3426;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.battle-report-correction > small {
  display: block;
  padding: 0 0 9px;
  color: #92745d;
  font-size: 10px;
}

.battle-report-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr;
  gap: 8px;
  margin-top: 10px;
}

.battle-report-actions button {
  min-height: 42px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 900;
}

.battle-report-clear {
  border: 1px solid rgba(119, 88, 62, 0.32);
  background: rgba(247, 239, 222, 0.78);
  color: #765c48;
}

.battle-report-analyze {
  border: 1px solid rgba(135, 47, 38, 0.55);
  background: linear-gradient(180deg, #b74338, #7f2923);
  color: #fff1d1;
  box-shadow: 0 6px 15px rgba(94, 34, 27, 0.17);
}

.battle-report-actions button:disabled {
  opacity: 0.42;
  box-shadow: none;
}

.battle-report-result-head {
  align-items: flex-start;
}

.battle-report-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(150, 84, 38, 0.28);
  border-radius: 999px;
  background: rgba(244, 228, 195, 0.8);
  color: #895b37;
  font-size: 12px;
  font-weight: 900;
}

.battle-report-result-empty {
  display: grid;
  grid-template-columns: 1fr 18px 1fr 18px 1fr;
  align-items: center;
  gap: 5px;
  padding: 12px 4px 4px;
}

.battle-report-result-empty > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  color: #624936;
  text-align: center;
}

.battle-report-result-empty > div > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #9f4236;
  color: #fff0d0;
  font-size: 13px;
  font-weight: 900;
}

.battle-report-result-empty strong {
  font-size: 13px;
}

.battle-report-result-empty small {
  color: #90745d;
  font-size: 10px;
  line-height: 1.35;
}

.battle-report-result-empty > i {
  height: 1px;
  background: rgba(139, 75, 38, 0.32);
}

.battle-report-awaiting-service {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(142, 76, 40, 0.38);
  border-radius: 9px;
  background: rgba(255, 249, 234, 0.66);
}

.battle-report-awaiting-service strong {
  color: #5e3828;
  font-size: 16px;
}

.battle-report-awaiting-service p {
  margin: 4px 0 0;
  color: #80634f;
  font-size: 12px;
  line-height: 1.55;
}

.battle-report-analysis-loading {
  min-height: 116px;
  display: grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  column-gap: 10px;
  color: #634330;
  text-align: left;
}

.battle-report-analysis-loading i {
  grid-row: 1 / 3;
  align-self: center;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(151, 76, 47, 0.2);
  border-top-color: #a33c31;
  border-radius: 50%;
  animation: uploadLoadingSpin 780ms linear infinite;
}

.battle-report-analysis-loading strong {
  align-self: end;
  font-size: 14px;
}

.battle-report-analysis-loading small {
  align-self: start;
  margin-top: 3px;
  color: #8a6c55;
  font-size: 11px;
}

.battle-report-analysis-error {
  padding: 14px;
  border: 1px dashed rgba(156, 57, 47, 0.42);
  border-radius: 8px;
  background: rgba(255, 242, 226, 0.68);
}

.battle-report-analysis-error strong {
  color: #8d302a;
  font-size: 15px;
}

.battle-report-analysis-error p {
  margin: 5px 0 0;
  color: #795b47;
  font-size: 12px;
  line-height: 1.55;
}

.battle-report-analysis-result {
  display: grid;
  gap: 10px;
}

.battle-report-outcome {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(138, 82, 42, 0.3);
  border-radius: 8px;
  background: rgba(247, 229, 194, 0.66);
}

.battle-report-outcome span {
  color: #8a5a36;
  font-size: 11px;
  font-weight: 900;
}

.battle-report-outcome strong {
  color: #8d2e29;
  font-family: "SgzInkTitle", "KaiTi", serif;
  font-size: 18px;
}

.battle-report-outcome small {
  justify-self: end;
  color: #8a6c55;
  font-size: 10px;
}

.battle-report-sides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.battle-report-side-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(137, 82, 43, 0.34);
  border-radius: 9px;
  background: rgba(255, 250, 238, 0.66);
}

.battle-report-side-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(139, 85, 45, 0.28);
}

.battle-report-side-card > header > span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #8e3c32;
  color: #fff0d1;
  font-size: 10px;
  font-weight: 900;
}

.battle-report-side-card:nth-child(2) > header > span {
  background: #3f6656;
}

.battle-report-side-card > header strong {
  overflow: hidden;
  color: #533629;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-report-side-card > header small {
  color: #91725b;
  font-size: 9px;
  white-space: nowrap;
}

.battle-report-generals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.battle-report-general-chip {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.battle-report-general-chip img {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(144, 86, 42, 0.42);
  border-radius: 50%;
  object-fit: cover;
  background: #ead8b5;
}

.battle-report-general-chip strong {
  max-width: 100%;
  overflow: hidden;
  color: #5b3a2a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-report-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.battle-report-skills > span:not(.battle-report-unrecognized) {
  padding: 3px 6px;
  border: 1px solid rgba(146, 84, 40, 0.24);
  border-radius: 999px;
  background: rgba(239, 220, 182, 0.7);
  color: #674531;
  font-size: 9px;
  line-height: 1.2;
}

.battle-report-unrecognized {
  grid-column: 1 / -1;
  padding: 10px 0;
  color: #9a7c64;
  font-size: 11px;
  text-align: center;
}

.battle-report-diagnosis-block {
  padding: 10px 11px;
  border-left: 3px solid #9e3a31;
  border-radius: 0 8px 8px 0;
  background: rgba(255, 247, 230, 0.64);
}

.battle-report-diagnosis-block.is-advice {
  border-left-color: #41705d;
  background: rgba(239, 247, 231, 0.58);
}

.battle-report-diagnosis-block h3 {
  margin: 0;
  color: #60382a;
  font-size: 14px;
}

.battle-report-diagnosis-block ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding-left: 18px;
}

.battle-report-diagnosis-block li {
  color: #654a38;
  font-size: 12px;
  line-height: 1.55;
}

.battle-report-analysis-note {
  margin: 0;
  padding-top: 7px;
  border-top: 1px dashed rgba(139, 85, 45, 0.28);
  color: #92755e;
  font-size: 10px;
  line-height: 1.45;
}

/* 战报诊断：将识别结果收束为两块可直接阅读、执行的结论。 */
.battle-report-result-card {
  isolation: isolate;
  border: 1px solid rgba(123, 72, 39, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 250, 237, 0.97), rgba(243, 226, 191, 0.93)),
    #f5e6c7;
  box-shadow: 0 9px 24px rgba(91, 54, 32, 0.14), inset 0 1px rgba(255, 255, 255, 0.82);
}

.battle-report-result-card::before {
  z-index: 0;
  background:
    radial-gradient(circle at 94% 4%, rgba(155, 50, 38, 0.12), transparent 28%),
    linear-gradient(115deg, transparent 0 72%, rgba(111, 67, 35, 0.045) 72% 73%, transparent 73% 100%);
}

.battle-report-result-card > * {
  position: relative;
  z-index: 1;
}

.battle-report-result-head {
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px dashed rgba(119, 73, 42, 0.3);
  align-items: center;
}

.battle-report-result-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #4e2d22;
  font-size: 20px;
  letter-spacing: 0.08em;
}

.battle-report-result-head h2::before {
  content: "诊";
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px 3px 8px 3px;
  background: linear-gradient(145deg, #a94337, #792a25);
  box-shadow: 0 3px 8px rgba(102, 37, 30, 0.22), inset 0 0 0 1px rgba(255, 229, 180, 0.2);
  color: #ffe7b3;
  font-family: STKaiti, KaiTi, serif;
  font-size: 19px;
  letter-spacing: 0;
}

.battle-report-result-head p {
  margin-left: 36px;
  color: #81634d;
  font-size: 11px;
}

.battle-report-status {
  border-color: rgba(55, 103, 79, 0.32);
  background: linear-gradient(180deg, rgba(238, 247, 225, 0.96), rgba(213, 232, 199, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
  color: #3f6d56;
}

.battle-report-analysis-result {
  gap: 13px;
}

.battle-report-diagnosis-block {
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(154, 66, 52, 0.26);
  border-left: 1px solid rgba(154, 66, 52, 0.26);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255, 249, 235, 0.96), rgba(249, 228, 202, 0.88));
  box-shadow: 0 5px 14px rgba(98, 48, 35, 0.08), inset 3px 0 #a74438;
}

.battle-report-diagnosis-block.is-advice {
  border-color: rgba(60, 107, 82, 0.28);
  border-left-color: rgba(60, 107, 82, 0.28);
  background: linear-gradient(145deg, rgba(247, 250, 230, 0.97), rgba(222, 237, 207, 0.9));
  box-shadow: 0 5px 14px rgba(48, 87, 67, 0.08), inset 3px 0 #477760;
}

.battle-report-diagnosis-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-report-diagnosis-title > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9f3e34;
  color: #ffebbd;
  font-family: STKaiti, KaiTi, serif;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(93, 38, 31, 0.2);
}

.battle-report-diagnosis-block.is-advice .battle-report-diagnosis-title > span {
  background: #47745e;
  color: #f2efd1;
  box-shadow: 0 2px 6px rgba(48, 80, 62, 0.19);
}

.battle-report-diagnosis-block h3 {
  color: #4f2e24;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.battle-report-diagnosis-block.is-advice h3 {
  color: #315744;
}

.battle-report-diagnosis-block ul {
  counter-reset: report-point;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.battle-report-diagnosis-block li {
  counter-increment: report-point;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(151, 86, 58, 0.15);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.72);
  color: #51382d;
  font-size: 13px;
  line-height: 1.55;
}

.battle-report-diagnosis-block li::before {
  content: counter(report-point);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(159, 62, 52, 0.12);
  color: #91392f;
  font-size: 11px;
  font-weight: 900;
}

.battle-report-diagnosis-block.is-advice li {
  border-color: rgba(64, 108, 84, 0.16);
  background: rgba(253, 255, 244, 0.74);
  color: #354c3f;
}

.battle-report-diagnosis-block.is-advice li::before {
  background: rgba(71, 116, 94, 0.13);
  color: #3b6852;
}

@media (max-width: 430px) {
  .ai-mode-tab {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 7px;
  }

  .ai-mode-seal {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }

  .ai-mode-tab strong {
    font-size: 16px;
  }

  .battle-report-result-empty {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .battle-report-result-empty > i {
    width: 1px;
    height: 10px;
    justify-self: center;
  }

  .battle-report-correction-grid,
  .battle-report-sides {
    grid-template-columns: 1fr;
  }

  .battle-report-side-card > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .battle-report-side-card > header small {
    grid-column: 2;
  }
}

.ai-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-btn {
  min-width: 92px;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(170, 51, 45, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, #b43a31, #7e251f);
  color: #fff3de;
  box-shadow: 0 8px 18px rgba(68, 28, 12, 0.18);
}

.upload-btn input {
  display: none;
}

.upload-preview {
  position: relative;
  isolation: isolate;
  min-height: 116px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px dashed rgba(160, 103, 42, 0.45);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.6);
}

.upload-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 34px auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  column-gap: 10px;
  padding: 14px;
  border-radius: inherit;
  background: rgba(255, 250, 238, 0.88);
  backdrop-filter: blur(3px);
  color: #62271e;
  text-align: left;
}

.upload-loading i {
  grid-row: 1 / 3;
  align-self: center;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 3px solid rgba(157, 87, 38, 0.22);
  border-top-color: #a9362e;
  border-radius: 50%;
  animation: uploadLoadingSpin 780ms linear infinite;
}

.upload-loading strong {
  align-self: end;
  font-size: 14px;
  line-height: 1.25;
}

.upload-loading small {
  align-self: start;
  margin-top: 2px;
  color: #80634f;
  font-size: 11px;
  line-height: 1.25;
}

@keyframes uploadLoadingSpin {
  to { transform: rotate(360deg); }
}

.upload-preview > span {
  grid-column: 1 / -1;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  place-items: center;
  white-space: nowrap;
}

.upload-empty-state {
  grid-column: 1 / -1;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  color: #604633;
  text-align: center;
}

.upload-empty-state strong {
  font-size: 16px;
  line-height: 1.25;
}

.upload-empty-state small {
  color: #8b725d;
  font-size: 12px;
  line-height: 1.35;
}

.upload-preview span,
.empty-tip {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.upload-thumb {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.upload-thumb:active {
  transform: scale(0.97);
}

.upload-thumb small {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 5px;
  background: rgba(22, 14, 8, 0.68);
  color: #fff4df;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-image-viewer {
  width: min(94vw, 1100px);
  max-width: 94vw;
  max-height: 92vh;
  padding: 42px 12px 10px;
  border: 1px solid rgba(238, 211, 157, 0.5);
  border-radius: 10px;
  background: rgba(18, 13, 10, 0.96);
  color: #fff2d6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.upload-image-viewer::backdrop {
  background: rgba(8, 6, 4, 0.82);
  backdrop-filter: blur(2px);
}

.upload-image-viewer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 82px);
  object-fit: contain;
  border-radius: 6px;
}

.upload-image-viewer p {
  margin: 8px 36px 0;
  overflow: hidden;
  color: rgba(255, 242, 214, 0.84);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-image-viewer-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 232, 190, 0.5);
  border-radius: 50%;
  background: rgba(92, 42, 29, 0.94);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 244, 215, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.upload-image-viewer-close::before,
.upload-image-viewer-close::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 8px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff2d6;
}

.upload-image-viewer-close::before {
  transform: rotate(45deg);
}

.upload-image-viewer-close::after {
  transform: rotate(-45deg);
}

.upload-image-viewer-close:hover {
  transform: rotate(6deg) scale(1.06);
  background: #7b3026;
}

.upload-image-viewer-close:active {
  transform: scale(0.92);
}

.manual-roster {
  margin-top: 10px;
}

.manual-roster textarea {
  min-height: 74px;
  padding: 9px;
  resize: vertical;
}

.detected-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detected-chip {
  display: inline-grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 9px 4px 4px;
  border: 1px solid rgba(185, 130, 42, 0.45);
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.82);
  color: var(--ink);
  font-weight: 900;
}

.detected-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.ocr-raw {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-raw summary {
  cursor: pointer;
}

.ocr-raw pre {
  max-height: 140px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 8px;
  border: 1px solid rgba(185, 130, 42, 0.28);
  border-radius: 8px;
  background: rgba(62, 42, 24, 0.08);
  white-space: pre-wrap;
}

.ai-team-results {
  display: grid;
  gap: 14px;
}

.ai-recommend-list {
  display: grid;
  gap: 10px;
}

.ai-recommend-group {
  display: grid;
  gap: 9px;
}

.ai-recommend-group + .ai-recommend-group {
  margin-top: 4px;
}

.ai-recommend-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-recommend-group-head .tag-aaa {
  padding: 5px 12px;
  font-size: 15px;
}

.ai-recommend-group-head em {
  color: #8d2a24;
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}

.ai-team-card {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(185, 130, 42, 0.48);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.78);
}

.ai-team-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ai-team-title strong {
  font-size: 17px;
}

.ai-score {
  color: #8d2a24;
  font-size: 13px;
  font-weight: 900;
}

/* 标签aaa：可复用的小标签样式，之前用于 AI 推荐卡片分类徽标。 */
.tag-aaa {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgba(185, 130, 42, 0.42);
  border-radius: 6px;
  background: rgba(244, 222, 165, 0.64);
  color: #6f3a16;
  font-size: 12px;
  font-weight: 900;
}

.ai-team-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ai-unit {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.ai-unit img {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(185, 130, 42, 0.45);
  border-radius: 8px;
  object-fit: cover;
}

.ai-unit strong {
  font-size: 13px;
}

.ai-unit small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.ai-team-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 10px;
  align-items: start;
}

.ai-team-footer.without-actions {
  grid-template-columns: 1fr;
}

.ai-team-commentary {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(185, 130, 42, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.72);
}

.ai-team-commentary strong {
  color: #5b241d;
  font-size: 13px;
}

.ai-team-commentary p {
  color: #5f5144;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.38;
}

.ai-team-commentary b {
  color: #8d2a24;
}

.ai-team-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  align-self: start;
}

.ai-team-actions button {
  width: 100%;
  min-height: 34px;
  height: 34px;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1;
}

.ai-team-actions .primary {
  margin-top: 0;
}

.ai-team-actions .sgz-action-btn {
  min-height: 34px;
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-image: none;
  background: #72140c url("./assets/btn-redgold-junling.png") center / 100% 100% no-repeat;
  background-clip: border-box;
  font-size: 12px;
}

.ai-score-action {
  box-shadow: none;
}

.ai-score-action span,
.ai-score-action strong {
  display: inline;
  line-height: 1;
}

.ai-score-action span {
  font-size: 12px;
}

.ai-score-action strong {
  margin-top: 0;
  margin-left: 3px;
  font-size: 13px;
}

.profile-member-panel {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}

.member-status-card,
.member-upgrade-card,
.member-orders-card,
.admin-entry-card {
  border: 1px solid rgba(143, 82, 36, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.86);
  box-shadow: var(--shadow);
  padding: 16px;
}

.member-upgrade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 38vw, 320px);
  gap: 14px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 250, 238, 0.92), rgba(238, 212, 166, 0.84)),
    radial-gradient(circle at 86% 18%, rgba(161, 44, 34, 0.14), transparent 34%);
}

.admin-entry-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(55, 31, 22, 0.94), rgba(118, 46, 33, 0.9)),
    radial-gradient(circle at 84% 24%, rgba(255, 203, 100, 0.22), transparent 34%);
  color: #ffe9b8;
}

.admin-entry-card h2,
.admin-entry-card p {
  margin: 0;
}

.admin-entry-card h2 {
  color: #ffe0a0;
  font-size: 22px;
}

.admin-entry-card p {
  margin-top: 5px;
  color: rgba(255, 245, 221, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.member-user-code {
  display: inline-flex;
  width: fit-content;
  margin: 8px 0 4px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 221, 142, 0.34);
  border-radius: 6px;
  background: rgba(22, 13, 10, 0.34);
  color: #ffe6aa;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
  cursor: pointer;
  text-align: left;
}

.member-upgrade-card h2,
.member-upgrade-card p,
.member-orders-card h2 {
  margin: 0;
}

.admin-center-dialog {
  width: min(900px, calc(100vw - 24px));
  max-height: min(86vh, 760px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.96), rgba(231, 203, 158, 0.94));
}

.admin-center-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-center-dialog header h2,
.admin-center-dialog header p {
  margin: 0;
}

.admin-center-dialog header h2 {
  color: #421713;
  font-size: 30px;
}

.admin-center-dialog header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.admin-tabs button {
  min-height: 36px;
  border: 1px solid rgba(151, 91, 36, 0.34);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.88);
  color: #5d3623;
  font-size: 13px;
  font-weight: 1000;
}

.admin-tabs button.is-selected {
  border-color: rgba(170, 51, 45, 0.58);
  background: linear-gradient(180deg, #fff0d5, #d7a656);
  color: #86251f;
}

.admin-table-wrap {
  max-height: min(56vh, 460px);
  overflow: auto;
  border: 1px solid rgba(151, 91, 36, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.82);
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(151, 91, 36, 0.16);
  color: #382317;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #6c3526;
  background: rgba(238, 216, 178, 0.96);
  font-weight: 1000;
}

.admin-actions-cell {
  min-width: 210px;
  white-space: nowrap;
}

.admin-actions-cell button {
  margin: 0 4px 4px 0;
  min-height: 28px;
  border: 1px solid rgba(151, 91, 36, 0.38);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff3d8, #dca85b);
  color: #5a2419;
  font-size: 12px;
  font-weight: 1000;
}

.admin-action-dialog {
  width: min(520px, calc(100vw - 24px));
  background: linear-gradient(180deg, rgba(255, 249, 236, 0.98), rgba(236, 212, 171, 0.96));
}

.admin-action-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-action-dialog header h2 {
  margin: 0;
  color: #4d2317;
  font-size: 24px;
}

.admin-action-dialog header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-action-body {
  display: grid;
  gap: 12px;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-action-grid button,
.admin-confirm-actions button,
.admin-remark-box button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(151, 91, 36, 0.34);
  font-weight: 1000;
}

.admin-action-grid button {
  background: linear-gradient(180deg, #fff5dd, #d6a355);
  color: #5e2818;
}

.admin-remark-box {
  display: grid;
  gap: 10px;
}

.admin-remark-box textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(151, 91, 36, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: #372217;
  font-size: 14px;
  font-family: inherit;
}

.admin-confirm-box p {
  margin: 0;
  color: #4b2a1d;
  font-size: 14px;
  font-weight: 800;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-confirm-actions .danger {
  background: linear-gradient(180deg, #d95d4f, #a62f27);
  color: #fff6f4;
}

.admin-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.member-upgrade-card h2,
.member-orders-card h2 {
  color: #4c281b;
  font-size: 22px;
}

.member-upgrade-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.member-status-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 18px;
  align-items: center;
  min-height: 136px;
  color: #fff1cf;
  background:
    linear-gradient(90deg, rgba(40, 17, 12, 0.88) 0%, rgba(70, 25, 16, 0.7) 46%, rgba(22, 13, 10, 0.42) 100%),
    radial-gradient(circle at 18% 18%, rgba(255, 204, 104, 0.2), transparent 32%),
    url("./assets/member-status-heroes.jpg?v=20260809-member-bg-1") center / cover no-repeat;
}

.member-status-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 223, 144, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 144, 0.16), transparent 64%);
}

.member-status-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  align-content: center;
}

.member-status-card .eyebrow {
  color: #ffd27a;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 2px 4px rgba(42, 12, 8, 0.66);
}

.member-status-card h2,
.member-status-card p {
  margin: 0;
}

.member-status-card h2 {
  color: #ffe3a4;
  font-size: 28px;
  line-height: 1.12;
}

.member-status-card p {
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 219, 142, 0.18);
  border-radius: 999px;
  color: rgba(255, 246, 222, 0.9);
  background: rgba(255, 238, 191, 0.08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

#memberStatusBadge {
  position: relative;
  z-index: 1;
  min-width: 68px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 219, 142, 0.36);
  border-radius: 8px;
  color: #ffe1a0;
  background: rgba(255, 236, 180, 0.1);
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.member-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.member-benefits span {
  padding: 5px 7px;
  border: 1px solid rgba(143, 82, 36, 0.18);
  border-radius: 999px;
  color: #7b2b21;
  background: rgba(255, 248, 232, 0.76);
  font-size: 12px;
  font-weight: 900;
}

.member-upgrade-card .primary {
  margin: 0;
  min-height: 52px;
}

.member-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-plans button,
.order-item {
  border: 1px solid rgba(143, 82, 36, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.84);
  padding: 10px;
}

.member-plans span,
.member-plans strong,
.member-plans em {
  display: block;
}

.member-plans span,
.order-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-plans button {
  width: 100%;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.member-plans button:hover {
  border-color: rgba(151, 46, 36, 0.44);
  transform: translateY(-1px);
}

.member-plans-dialog {
  width: min(620px, calc(100vw - 24px));
  background:
    linear-gradient(135deg, rgba(255, 250, 236, 0.96), rgba(230, 202, 156, 0.9)),
    radial-gradient(circle at 82% 14%, rgba(154, 36, 28, 0.18), transparent 34%);
}

.member-plans-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.member-plans strong {
  margin-top: 4px;
  font-size: 18px;
}

.member-plans em {
  margin-top: 6px;
  color: #9b271f;
  font-size: 24px;
  font-style: normal;
  font-weight: 1000;
}

.order-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-item strong {
  display: block;
  color: #6f201a;
  margin-bottom: 4px;
}

.member-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
}

.member-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(1220px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(232, 184, 96, 0.52);
  background:
    linear-gradient(180deg, rgba(70, 42, 22, 0.92), rgba(32, 20, 12, 0.96)),
    rgba(42, 28, 16, 0.94);
  box-shadow: 0 -10px 26px rgba(32, 20, 12, 0.26);
  backdrop-filter: blur(8px);
}

.nav-item {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-items: center;
  justify-items: start;
  border: 1px solid rgba(232, 184, 96, 0.32);
  border-radius: 8px;
  background: rgba(255, 242, 212, 0.08);
  color: rgba(255, 241, 208, 0.78);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  padding: 0 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 6px 14px rgba(16, 10, 6, 0.16);
}

.nav-item::before,
.nav-item::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.nav-item::before {
  inset: 0;
  z-index: -2;
  opacity: 0.9;
}

.nav-item::after {
  z-index: -1;
  opacity: 0.84;
}

.nav-item > span:last-child {
  position: relative;
  z-index: 1;
  width: calc(100% - 46px);
  max-width: calc(100% - 46px);
  margin: 0 44px 0 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-family: "STKaiti", "KaiTi", "FangSong", "Microsoft YaHei", serif;
  font-size: 19px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-shadow: none;
}

.nav-strategy > span:last-child {
  font-size: 18px;
}

@media (max-width: 380px) {
  .book-picker-layout {
    grid-template-columns: 1fr;
  }

  .skill-picker-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .skill-picker-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .book-type-tabs {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 24px;
    height: auto;
  }

  .book-type-tabs button {
    min-height: 24px;
    padding-block: 2px;
  }

  .book-choice-grid {
    grid-template-columns: 1fr;
  }

  .attribute-row {
    grid-template-columns: 64px minmax(0, 1fr) 100px;
    gap: 6px;
  }

  .attribute-step {
    width: 28px;
    height: 28px;
  }

  .red-star-picker {
    gap: 5px;
  }

  .red-star-picker button {
    min-height: 40px;
  }

  .bottom-nav {
    gap: 4px;
    padding-inline: 6px;
  }

  .nav-item {
    min-height: 54px;
  }

  .nav-item > span:last-child {
    width: calc(100% - 36px);
    max-width: calc(100% - 36px);
    margin: 0 34px 0 0;
    padding-inline: 0;
    font-size: 16px;
  }

  .nav-strategy > span:last-child {
    font-size: 15px;
  }
}

.nav-ai::before {
  background:
    linear-gradient(135deg, rgba(34, 82, 62, 0.9), rgba(20, 44, 35, 0.94)),
    repeating-linear-gradient(90deg, rgba(245, 214, 142, 0.13) 0 8px, transparent 8px 16px);
}

.nav-ai::after {
  right: -18px;
  bottom: -13px;
  width: 76px;
  height: 56px;
  transform: rotate(-11deg);
  background: url("./assets/nav-ai-scroll.svg") center / contain no-repeat;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.36)) saturate(0.9);
}

.nav-battle::before {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 228, 138, 0.32), transparent 23%),
    linear-gradient(135deg, rgba(142, 32, 28, 0.95), rgba(56, 18, 14, 0.98));
}

.nav-battle::after {
  right: -18px;
  bottom: -13px;
  width: 82px;
  height: 58px;
  transform: rotate(-7deg);
  background: url("./assets/nav-battle-swords.svg") center / contain no-repeat;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.52)) saturate(1.1);
}

.nav-strategy::before {
  background:
    radial-gradient(circle at 70% 26%, rgba(220, 204, 255, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(48, 48, 112, 0.92), rgba(30, 24, 68, 0.98));
}

.nav-strategy::after {
  right: -18px;
  bottom: -16px;
  width: 84px;
  height: 64px;
  background: url("./assets/nav-strategy-fan.svg") center / contain no-repeat;
  transform: rotate(-9deg);
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.36));
}

.nav-profile::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 220, 128, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(148, 88, 28, 0.94), rgba(58, 32, 12, 0.98));
}

.nav-profile::after {
  right: -10px;
  top: 15px;
  width: 64px;
  height: 76px;
  transform: rotate(-7deg);
  background: url("./assets/nav-profile-stamp.svg") center / contain no-repeat;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.36)) saturate(1.12);
}

.nav-item.is-active {
  color: #fff4d8;
  border-color: rgba(255, 217, 132, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 232, 172, 0.2), rgba(185, 130, 42, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 232, 172, 0.24), 0 0 18px rgba(255, 206, 100, 0.2);
}

.nav-item.is-active::before {
  opacity: 1;
}

.nav-item.is-active > span:last-child {
  background: transparent;
  border-color: transparent;
}

@media (min-width: 900px) {
  .versus-board {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
  }

  .result-actions {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .detail-grid,
  .battle-lineups {
    grid-template-columns: repeat(2, 1fr);
  }

  .vs-mark {
    margin-top: 132px;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ai-workbench {
    grid-template-columns: 1fr 1fr;
  }

  .ai-recommend-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .team-score-dialog header h2 {
    font-size: 24px;
  }

  .strategist-action {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 82px;
    padding: 14px;
  }

  .strategist-action-mark {
    width: 46px;
    height: 46px;
    font-size: 26px;
  }

  .strategist-action strong {
    font-size: 22px;
  }

  .matchup-tables th:last-child,
  .matchup-tables td:last-child {
    width: 46px;
  }

  .member-upgrade-card {
    grid-template-columns: 1fr;
  }
}

/* Chibi 三国按钮：深棕描边 + 小徽记，不使用任何拉伸位图。 */
.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron,
.team-score-btn,
.member-upgrade-card .sgz-action-imperial,
.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  border: 2px solid #4b2718;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.28), 0 3px 5px rgba(65, 34, 18, 0.25);
  isolation: isolate;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: clamp(44px, 5.5vw, 76px);
  padding-right: 22px;
  background:
    radial-gradient(circle at 10% 75%, rgba(255, 217, 155, 0.13) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 26%, rgba(255, 217, 155, 0.12) 0 5px, transparent 6px),
    linear-gradient(180deg, #cf5143 0%, #b63c32 52%, #963127 100%);
}

.team-score-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: clamp(28px, 3vw, 42px);
  padding-right: 8px;
  background:
    radial-gradient(circle at 90% 75%, rgba(231, 242, 190, 0.14) 0 4px, transparent 5px),
    linear-gradient(180deg, #568f72 0%, #39745b 52%, #295d49 100%);
}

.member-upgrade-card .sgz-action-imperial {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 38px;
  background:
    radial-gradient(circle at 88% 25%, rgba(255, 237, 167, 0.18) 0 4px, transparent 5px),
    linear-gradient(180deg, #e1a63c 0%, #c68627 52%, #aa6c1d 100%);
}

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.team-score-btn::before,
.member-upgrade-card .sgz-action-imperial::before {
  content: "战";
  position: absolute;
  left: clamp(12px, 1.5vw, 22px);
  top: 50%;
  z-index: -1;
  display: grid;
  width: clamp(25px, 3vw, 38px);
  height: clamp(25px, 3vw, 38px);
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 2px solid rgba(81, 40, 21, 0.76);
  border-radius: 50% 50% 45% 45%;
  color: #fff1bf;
  background: rgba(112, 38, 27, 0.42);
  font-size: clamp(13px, 1.45vw, 18px);
  font-weight: 900;
  text-shadow: 0 1px 0 #55220f;
}

.team-score-btn::before { content: "策"; left: clamp(9px, 1vw, 15px); background: rgba(25, 69, 52, 0.45); }
.member-upgrade-card .sgz-action-imperial::before { content: "冠"; left: 13px; width: 25px; height: 25px; font-size: 13px; background: rgba(122, 71, 14, 0.4); }

.ai-team-actions {
  gap: 7px;
}

.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  position: relative;
  min-height: 36px;
  height: 36px;
  padding: 0 7px 0 34px;
  color: #fff4ca;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 #54210d;
}

.ai-team-actions .sgz-action-btn {
  background: linear-gradient(180deg, #ca5042 0%, #ad372d 55%, #903027 100%);
}

.ai-team-actions .team-score-btn {
  background: linear-gradient(180deg, #579276 0%, #39755d 55%, #2a604c 100%);
}

.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before {
  left: 8px;
  width: 21px;
  height: 21px;
  font-size: 11px;
}

.ai-team-actions .team-score-btn::before { content: "策"; }

.ai-team-actions .team-score-btn span {
  display: block;
  width: 100%;
  color: #fff4ca;
  font-size: 12px;
  line-height: 1;
}

/* Approved Q-draft assets: drum, scroll and crown are taken from the design sheet. */
.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.team-score-btn::before,
.member-upgrade-card .sgz-action-imperial::before,
.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before {
  content: "";
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-shadow: none;
}

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.ai-team-actions .sgz-action-btn::before {
  background-image: url("./assets/chibi-drum-v46.png");
}

.team-score-btn::before,
.ai-team-actions .team-score-btn::before {
  content: "";
  background-image: url("./assets/chibi-scroll-v46.png");
}

.member-upgrade-card .sgz-action-imperial::before {
  content: "";
  background-image: url("./assets/chibi-crown-v46.png");
}

/* Use the approved design buttons as complete images — no icon extraction or tiled pieces. */
.lineup-actions {
  grid-template-columns: minmax(0, 1fr) clamp(168px, 18vw, 260px);
  align-items: center;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  width: min(100%, 328px);
  justify-self: center;
  height: 76px;
  aspect-ratio: 1750 / 408;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: transparent;
  text-shadow: none;
  background: url("./assets/btn-complete-battle-v52-trim.png") center / 100% 100% no-repeat;
}

.team-score-btn {
  height: 76px;
  aspect-ratio: 645 / 207;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: url("./assets/btn-whole-score-v53-trim.png") center / 100% 100% no-repeat;
}

.member-upgrade-card .sgz-action-imperial {
  width: min(100%, 320px);
  justify-self: center;
  height: 76px;
  aspect-ratio: 1701 / 404;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: transparent;
  text-shadow: none;
  background: url("./assets/btn-complete-member-v52-trim.png") center / 100% 100% no-repeat;
}

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.team-score-btn::before,
.member-upgrade-card .sgz-action-imperial::before { display: none; }

/* AI card buttons retain the complete design, but use the compact score/battle proportions. */
.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: transparent;
  text-shadow: none;
}

.ai-team-actions .sgz-action-btn {
  aspect-ratio: 1750 / 408;
  background: url("./assets/btn-complete-battle-v52-trim.png") center / 100% 100% no-repeat;
}

.ai-team-actions .team-score-btn {
  aspect-ratio: 645 / 207;
  background: url("./assets/btn-whole-score-v53-trim.png") center / 100% 100% no-repeat;
}

.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before { display: none; }

.team-score-copy,
.ai-team-actions .team-score-btn span,
.ai-team-actions .team-score-btn strong { display: none; }

@media (max-width: 520px) {
  .lineup-actions { grid-template-columns: minmax(0, 1fr) 34vw; }
  .lineup-actions .sgz-action-iron,
  .result-actions .sgz-action-iron,
  .team-score-btn { height: 48px; }
  .lineup-actions .sgz-action-iron,
  .result-actions .sgz-action-iron { width: min(100%, 207px); }
}

/* Restored simple Q-style: no gold rim, no embedded illustration/icon assets. */
.lineup-actions {
  grid-template-columns: minmax(0, 1fr) clamp(124px, 15.2vw, 195px);
  align-items: center;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron,
.team-score-btn,
.member-upgrade-card .sgz-action-imperial,
.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  box-sizing: border-box;
  border: 2px solid #4b2718;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.25), 0 3px 5px rgba(65, 34, 18, 0.24);
  color: #fff7d2;
  font-family: "Microsoft YaHei", serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 #552207;
  overflow: hidden;
  background-image: none;
}

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  width: 100%;
  justify-self: stretch;
  height: 64px;
  aspect-ratio: auto;
  padding: 0 18px;
  font-size: clamp(16px, 1.45vw, 21px);
  background:
    radial-gradient(ellipse at 11% 84%, rgba(255, 207, 155, 0.16) 0 6px, transparent 7px),
    radial-gradient(ellipse at 89% 21%, rgba(255, 207, 155, 0.13) 0 7px, transparent 8px),
    linear-gradient(180deg, #cf5143 0%, #b63c32 52%, #963127 100%);
}

.team-score-btn {
  width: 100%;
  height: 64px;
  aspect-ratio: auto;
  padding: 0 8px;
  background:
    radial-gradient(ellipse at 83% 75%, rgba(226, 243, 190, 0.15) 0 5px, transparent 6px),
    linear-gradient(180deg, #568f72 0%, #39745b 52%, #295d49 100%);
}

.team-score-copy {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  transform: none;
}

.team-score-copy > span {
  display: block;
  color: #fff7d2;
  font-size: clamp(13px, 1.1vw, 16px);
}

.team-score-btn strong { display: none; }

.member-upgrade-card .sgz-action-imperial {
  width: 100%;
  justify-self: stretch;
  height: 50px;
  aspect-ratio: auto;
  padding: 0 12px;
  font-size: clamp(15px, 1.35vw, 19px);
  background:
    radial-gradient(ellipse at 86% 22%, rgba(255, 236, 164, 0.18) 0 5px, transparent 6px),
    linear-gradient(180deg, #e1a63c 0%, #c68627 52%, #aa6c1d 100%);
}

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.team-score-btn::before,
.member-upgrade-card .sgz-action-imperial::before,
.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before { display: none; }

.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  width: 100%;
  min-height: 36px;
  height: 36px;
  aspect-ratio: auto;
  padding: 0 7px;
  color: #fff7d2;
  font-size: 12px;
  background-image: none;
}

.ai-team-actions .sgz-action-btn { background: linear-gradient(180deg, #ca5042 0%, #ad372d 55%, #903027 100%); }
.ai-team-actions .team-score-btn { background: linear-gradient(180deg, #579276 0%, #39755d 55%, #2a604c 100%); }
.ai-team-actions .team-score-btn span { display: block; color: #fff7d2; font-size: 12px; }

/* Restore the small Q-style action seals from the earlier approved version. */
.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron,
.team-score-btn,
.member-upgrade-card .sgz-action-imperial,
.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn { position: relative; }

.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron { padding-left: clamp(44px, 5.5vw, 76px); }
.team-score-btn { padding-left: clamp(28px, 3vw, 42px); }
.member-upgrade-card .sgz-action-imperial { padding-left: 38px; }

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before,
.team-score-btn::before,
.member-upgrade-card .sgz-action-imperial::before,
.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before {
  content: "战";
  position: absolute;
  left: clamp(12px, 1.5vw, 22px);
  top: 50%;
  z-index: 1;
  display: grid;
  width: clamp(25px, 3vw, 38px);
  height: clamp(25px, 3vw, 38px);
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 2px solid rgba(81, 40, 21, 0.76);
  border-radius: 50% 50% 45% 45%;
  color: #fff1bf;
  background: rgba(112, 38, 27, 0.42);
  font-size: clamp(13px, 1.45vw, 18px);
  font-weight: 900;
  text-shadow: 0 1px 0 #55220f;
}

.team-score-btn::before,
.ai-team-actions .team-score-btn::before { content: "策"; background: rgba(25, 69, 52, 0.45); }
.member-upgrade-card .sgz-action-imperial::before { content: "冠"; left: 13px; width: 25px; height: 25px; font-size: 13px; background: rgba(122, 71, 14, 0.4); }

.ai-team-actions .sgz-action-btn,
.ai-team-actions .team-score-btn {
  min-width: 0;
  height: 32px;
  padding: 0 4px 0 25px;
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}
.ai-team-actions .sgz-action-btn::before,
.ai-team-actions .team-score-btn::before {
  left: 6px;
  width: 15px;
  height: 15px;
  border-width: 1px;
  font-size: 9px;
}

/* Keep the “策” seal and rating label in independent lanes. */
.team-score-btn {
  padding: 0;
}

.team-score-btn::before {
  left: 11px;
  width: 31px;
  height: 31px;
  font-size: 15px;
}

.team-score-copy {
  position: absolute;
  inset: 0 5px 0 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.team-score-copy > span {
  white-space: nowrap;
}

.ai-team-actions .team-score-btn {
  padding: 0;
}

.ai-team-actions .team-score-btn span {
  padding-left: 19px;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}

/* Q版三国人物互动卡片背景：保留控件区的清晰阅读空间。 */
.ai-upload {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: url("./assets/card-bg-ai-upload-chibi-v1.png") right center / cover no-repeat;
}

.ai-upload > * {
  position: relative;
  z-index: 1;
}

.ai-upload::before,
.member-upgrade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.38);
}

.member-upgrade-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: url("./assets/card-bg-member-upgrade-chibi-v1.png") center / cover no-repeat;
}

.member-upgrade-card > * {
  position: relative;
  z-index: 1;
}

.member-upgrade-card .sgz-action-imperial {
  color: #fff7d2;
  text-shadow: 0 2px 0 #552207;
  background:
    radial-gradient(ellipse at 86% 22%, rgba(255, 236, 164, 0.18) 0 5px, transparent 6px),
    linear-gradient(180deg, #e1a63c 0%, #c68627 52%, #aa6c1d 100%);
}

.member-upgrade-card .sgz-action-imperial::before {
  content: "冠";
  display: grid;
}

/* 对战区：清晰箭雨掠过云层，火焰仅保留在箭尾。 */
.settings,
.team-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.settings::before,
.team-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.56;
  background: url("./assets/battle-continuous-tall-fire-arrows-v4.png") center top / 100% 850px no-repeat;
  mix-blend-mode: multiply;
}

.settings > *,
.team-panel > * {
  position: relative;
  z-index: 1;
}

/* 自绘下拉面板需要越过参数卡边缘显示。 */
#sideAScreen .settings {
  z-index: 20;
  overflow: visible;
}

@media (max-width: 520px) {
  .settings {
    gap: 5px;
    padding: 9px 7px;
  }

  .battle-setting-title {
    gap: 3px;
    padding: 2px 5px 2px 2px;
    font-size: 13px;
  }

  .battle-setting-title i {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .setting-select-trigger,
  .setting-stepper {
    min-height: 38px;
  }

  .setting-select-trigger {
    padding: 0 7px;
  }

  .setting-select-trigger strong {
    font-size: 14px;
  }

  .setting-stepper {
    grid-template-columns: 25px minmax(0, 1fr) 25px;
  }

  .setting-stepper > button {
    font-size: 17px;
  }

  .setting-number-value {
    gap: 1px;
  }

  .setting-number-value input {
    width: min(54px, calc(100% - 13px));
    font-size: 13px;
  }

  .setting-number-value small,
  .setting-select-trigger small {
    font-size: 9px;
  }

  .setting-select[data-setting-select="runs"] .setting-select-trigger small {
    font-size: 12px;
  }

  .setting-number-value small {
    font-size: 12px;
  }
}

.team-panel::before {
  opacity: 0.58;
  /* 与上方模拟次数卡连续：88px 卡高 + 12px 卡间距。 */
  background-position: center -100px;
  background-size: 100% 850px;
}

#sideAScreen .team-panel::after {
  content: none;
}

#sideBScreen .team-panel::before {
  filter: none;
}

/* 三个配将弹窗保留人物背景，只加一层轻白纱降低干扰。 */
.picker.attribute-picker::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.34);
}

.picker.attribute-picker > * {
  position: relative;
  z-index: 1;
}

/* 兵书选项格微透出人物背景，保留文字与边框的清晰度。 */
.book-choice-panel {
  background: rgba(255, 248, 234, 0.58);
}

.book-type-tabs button,
.book-choice-grid button {
  background: rgba(255, 250, 240, 0.64);
}

/* “选择兵书”与“选择战法”使用同一标题色。 */
.book-picker .picker-head h3 {
  color: #57291c;
  text-shadow: 0 1px 0 rgba(255, 249, 229, 0.86);
}

/* 对战预设阵容：由下拉框改为带兵种筛选的阵容弹窗。 */
.preset-trigger {
  width: min(154px, 38vw);
  min-height: 38px;
  justify-self: end;
  padding: 7px 12px 7px 37px;
  position: relative;
  border: 2px solid #4b2718;
  border-radius: 14px;
  color: #fff7d2;
  background:
    radial-gradient(ellipse at 11% 84%, rgba(255, 215, 163, 0.14) 0 5px, transparent 6px),
    radial-gradient(ellipse at 89% 21%, rgba(255, 215, 163, 0.10) 0 6px, transparent 7px),
    repeating-linear-gradient(100deg, rgba(255, 230, 181, 0.06) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #a94a3c 0%, #84372e 54%, #682b27 100%);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 0 #552207;
  box-shadow: inset 0 1px 0 rgba(255, 248, 215, 0.25), 0 3px 5px rgba(65, 34, 18, 0.24);
}

.preset-trigger::before {
  content: "阵";
  position: absolute;
  left: 9px;
  top: 50%;
  display: grid;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) rotate(-8deg);
  place-items: center;
  border: 1px solid rgba(255, 237, 180, 0.78);
  border-radius: 50%;
  color: #fff1c9;
  background: rgba(74, 36, 24, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 0 #3e1d16;
}


.picker.team-picker {
  width: min(760px, calc(100vw - 24px));
  max-height: min(84vh, 760px);
  position: relative;
  overflow: visible;
  isolation: isolate;
  border-color: rgba(105, 48, 26, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 250, 232, 0.38), rgba(255, 250, 232, 0.12)),
    url("./assets/dialog-bg-team-select-muster-top-v5.png") center / 100% 100% no-repeat,
    #f4ead2;
}

.picker.team-picker::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.15);
}

.picker.team-picker::after {
  content: none;
}

.picker.team-picker > * {
  position: relative;
  z-index: 3;
}

.team-picker .picker-head h3 {
  margin-bottom: 3px;
  color: #57291c;
  text-shadow: 0 1px 0 rgba(255, 249, 229, 0.86);
}

/* 与选择战法一致：顶部不滚动，只有队伍列表本身可滚动。 */
.team-picker .picker-head {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  padding: 0;
  background: none;
}

.team-picker-summary {
  margin: 0;
  color: rgba(86, 48, 27, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.team-picker-tabs {
  display: grid;
  position: relative;
  top: auto;
  z-index: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  background: none;
}

.team-picker-tabs button {
  min-height: 38px;
  border: 1px solid rgba(132, 76, 35, 0.34);
  border-radius: 8px;
  color: #5b2b1d;
  background: rgba(255, 249, 233, 0.68);
  font-size: 14px;
  font-weight: 900;
}

.team-picker-tabs button.is-selected {
  border-color: rgba(151, 65, 39, 0.64);
  color: #7a291e;
  background: linear-gradient(180deg, rgba(255, 238, 196, 0.90), rgba(215, 161, 83, 0.88));
}

.team-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(130, 73, 33, 0.22);
  border-radius: 10px;
  background: rgba(255, 250, 237, 0.54);
  max-height: min(58vh, 520px);
  overflow-y: auto;
}

.team-preset-card {
  min-height: 82px;
  padding: 10px 12px;
  border: 1px solid rgba(132, 76, 35, 0.30);
  border-radius: 9px;
  color: #492619;
  background: rgba(255, 252, 244, 0.72);
  text-align: left;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.team-preset-card strong,
.team-preset-card span,
.team-preset-card em {
  display: block;
}

.team-preset-title {
  flex: 0 0 88px;
  max-width: 88px;
  display: grid !important;
  gap: 4px;
}

.team-preset-title strong {
  overflow: hidden;
  color: #6f2c20;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-preset-title small {
  color: #8f5c2b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.team-preset-line {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.team-preset-generals {
  display: flex !important;
  align-items: flex-start;
  flex: 1 1 auto;
  gap: 14px;
  min-width: 0;
}

.team-preset-general {
  display: grid !important;
  justify-items: center;
  gap: 3px;
  min-width: 54px;
}

.team-preset-avatar {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(108, 59, 29, 0.46);
  border-radius: 50%;
  background-color: #d2aa6f;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 2px rgba(255, 246, 214, 0.54), 0 2px 4px rgba(73, 38, 21, 0.16);
}

.team-preset-general em {
  max-width: 62px;
  overflow: hidden;
  color: #765440;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-preset-select {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(117, 49, 34, 0.72);
  border-radius: 8px;
  color: #fff6d8;
  background: linear-gradient(180deg, #c84c3f, #9d3028);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 0 #552207;
}

.team-preset-card.is-selected {
  border-color: rgba(132, 76, 35, 0.30);
  color: #492619;
  background: rgba(255, 252, 244, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.team-preset-card.is-selected .team-preset-select {
  border-color: rgba(123, 75, 22, 0.86);
  color: #fff7d2;
  text-shadow: 0 1px 0 #4a2509, 0 2px 2px rgba(61, 28, 5, 0.7);
  background:
    radial-gradient(ellipse at 86% 22%, rgba(255, 236, 164, 0.18) 0 5px, transparent 6px),
    linear-gradient(180deg, #e1a63c 0%, #c68627 52%, #aa6c1d 100%);
}

/* 队伍卡以完整军旗底图为底：蓝、绿、朱红三栏按阵营裁取。 */
.team-preset-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.team-preset-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  content: "";
  background: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.87));
  pointer-events: none;
}

.team-preset-card::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: url("./assets/team-faction-war-banners-v1.png") 0 center / 300% auto no-repeat;
  opacity: 0.64;
  pointer-events: none;
}

.team-preset-card > .team-preset-line {
  position: relative;
  z-index: 1;
}

.team-preset-card.team-faction-wei {
  --team-flag: #3f70a8;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(63, 112, 168, 0.30), rgba(101, 142, 187, 0.14) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-shu {
  --team-flag: #3e7d58;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(62, 125, 88, 0.30), rgba(95, 151, 112, 0.14) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-wu {
  --team-flag: #b64d43;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(182, 77, 67, 0.29), rgba(205, 111, 92, 0.13) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-qun {
  --team-flag: #7d638d;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(125, 99, 141, 0.27), rgba(151, 124, 164, 0.12) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-han {
  --team-flag: #a57839;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(165, 120, 57, 0.28), rgba(193, 151, 87, 0.13) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-mixed {
  --team-flag: #8b7458;
  background:
    repeating-linear-gradient(103deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(139, 116, 88, 0.24), rgba(166, 144, 113, 0.11) 48%, rgba(255, 252, 244, 0.78) 100%);
}

.team-preset-card.team-faction-wei::after { background-position: 0 center; }
.team-preset-card.team-faction-shu::after { background-position: 50% center; }
.team-preset-card.team-faction-wu::after { background-position: 100% center; }

/* 把军旗直接铺进卡片底色，避免伪元素在个别浏览器中被卡片层遮住。 */
.team-preset-card.team-faction-wei,
.team-preset-card.team-faction-shu,
.team-preset-card.team-faction-wu {
  background-repeat: no-repeat;
  background-size: auto, 300% auto;
}

.team-preset-card.team-faction-wei {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.26), rgba(255, 252, 244, 0.52)),
    url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 0 center;
}

.team-preset-card.team-faction-shu {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.26), rgba(255, 252, 244, 0.52)),
    url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 50% center;
}

.team-preset-card.team-faction-wu {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.26), rgba(255, 252, 244, 0.52)),
    url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 100% center;
}

.team-preset-card.team-faction-wei::after,
.team-preset-card.team-faction-shu::after,
.team-preset-card.team-faction-wu::after {
  display: none;
}

/* 群、汉使用第二张双栏军旗图：上半苍紫群旗，下半赭金汉旗。 */
.team-preset-card.team-faction-qun,
.team-preset-card.team-faction-han {
  background-repeat: no-repeat;
  background-size: auto, 100% auto;
}

.team-preset-card.team-faction-qun {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.30), rgba(255, 252, 244, 0.54)),
    url("./assets/team-faction-war-banners-qun-han-v1.png");
  background-position: 0 0, 0 0;
}

.team-preset-card.team-faction-han {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.28), rgba(255, 252, 244, 0.52)),
    url("./assets/team-faction-war-banners-qun-han-v1.png");
  background-position: 0 0, 0 100%;
}

/* 其余混编队伍保持中性旗色，不借用单一阵营的军旗画面。 */
.team-preset-card.team-faction-qun::after,
.team-preset-card.team-faction-han::after,
.team-preset-card.team-faction-mixed::after {
  display: none;
}

/* 整卡保留淡色军旗；左栏使用简洁燕尾旗，队伍名直接叠在旗面。 */
.team-preset-card.team-faction-wei,
.team-preset-card.team-faction-shu,
.team-preset-card.team-faction-wu,
.team-preset-card.team-faction-qun,
.team-preset-card.team-faction-han,
.team-preset-card.team-faction-mixed {
  background-repeat: no-repeat;
}

.team-preset-card.team-faction-wei,
.team-preset-card.team-faction-shu,
.team-preset-card.team-faction-wu {
  background-size: auto, 300% auto;
}

.team-preset-card.team-faction-wei {
  background-image: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 0 center;
}

.team-preset-card.team-faction-shu {
  background-image: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 50% center;
}

.team-preset-card.team-faction-wu {
  background-image: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), url("./assets/team-faction-war-banners-v1.png");
  background-position: 0 0, 100% center;
}

.team-preset-card.team-faction-qun,
.team-preset-card.team-faction-han {
  background-size: auto, 100% auto;
}

.team-preset-card.team-faction-qun {
  background-image: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), url("./assets/team-faction-war-banners-qun-han-v1.png");
  background-position: 0 0, 0 0;
}

/* 群阵营采用苍灰白军旗，和魏蓝、蜀绿、吴红明确区分。 */
.team-picker .team-preset-card.team-faction-qun {
  --team-flag: #7b807c;
  background-image:
    linear-gradient(90deg, rgba(255, 253, 247, 0.74), rgba(255, 253, 247, 0.88)),
    url("./assets/team-faction-war-banner-qun-v2.png");
  /* 原图比例更高，放大横向范围，让战旗长度与其余阵营卡片一致。 */
  background-size: auto, 132% auto;
  background-position: 0 0, 0 center;
}

.team-preset-card.team-faction-han {
  background-image: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), url("./assets/team-faction-war-banners-qun-han-v1.png");
  background-position: 0 0, 0 100%;
}

.team-preset-card.team-faction-mixed {
  background: linear-gradient(90deg, rgba(255, 252, 244, 0.78), rgba(255, 252, 244, 0.90)), #d9c8ae;
}

.team-preset-card::before,
.team-preset-card::after,
.team-preset-flag {
  display: none !important;
}

.team-preset-title {
  position: relative;
  flex-basis: 108px;
  max-width: 108px;
  min-height: 66px;
  gap: 4px;
  padding-top: 4px;
}

.team-preset-title::before {
  position: absolute;
  z-index: 0;
  top: 1px;
  left: 0;
  width: 102px;
  height: 38px;
  content: "";
  border: 1px solid rgba(85, 47, 24, 0.7);
  border-left: 4px solid rgba(82, 47, 25, 0.94);
  border-radius: 2px 16px 18px 3px;
  clip-path: polygon(0 2%, 18% 4%, 36% 1%, 54% 6%, 72% 4%, 88% 9%, 99% 5%, 97% 28%, 100% 48%, 96% 66%, 99% 86%, 87% 94%, 69% 91%, 52% 97%, 34% 92%, 17% 96%, 0 93%);
  background:
    linear-gradient(146deg, rgba(255, 255, 255, 0.28) 0 15%, transparent 30% 54%, rgba(55, 25, 15, 0.16) 76% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--team-flag) 76%, white), var(--team-flag));
  box-shadow: inset 0 1px 0 rgba(255, 246, 211, 0.32), 0 1px 2px rgba(63, 33, 17, 0.2);
}

.team-preset-title::after {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: -3px;
  width: 3px;
  height: 66px;
  content: "";
  border-radius: 3px;
  background: linear-gradient(90deg, #5c3018, #d4a75a 48%, #6a381c);
  box-shadow: 0 0 0 1px rgba(67, 35, 17, 0.32);
}

.team-preset-title strong {
  position: relative;
  z-index: 1;
  width: 98px;
  padding: 9px 8px 6px 12px;
  overflow: hidden;
  color: #fff6d4;
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(57, 27, 14, 0.9);
  white-space: nowrap;
}

.team-preset-title small {
  position: relative;
  z-index: 1;
  width: 98px;
  margin-top: 2px;
  color: #8f5c2b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 520px) {
  .team-preset-title { flex-basis: 84px; max-width: 84px; }
  .team-preset-title::before { width: 78px; height: 32px; }
  .team-preset-title::after { height: 58px; }
  .team-preset-title strong { width: 74px; padding: 8px 5px 5px 9px; font-size: 12px; }
  .team-preset-title small { width: 74px; font-size: 11px; }
}

.team-picker-empty {
  grid-column: 1 / -1;
  margin: 8px 0;
  color: #765440;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 520px) {
  .my-team-head { grid-template-columns: minmax(0, 1fr) 82px; gap: 3px; }
  .my-team-tabs button { max-width: 88px; padding: 7px 8px; font-size: 12px; }
  .my-team-add { width: 27px; height: 27px; border-radius: 50%; font-size: 20px; }
#sideAScreen .preset-trigger,
#sideBScreen .preset-trigger { width: 82px; min-height: 29px; padding: 5px 6px 5px 27px; font-size: 12px; }
#sideAScreen .preset-trigger::before,
#sideBScreen .preset-trigger::before { left: 5px; width: 18px; height: 18px; font-size: 10px; }
  .preset-trigger { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
  .team-preset-title { flex-basis: 64px; max-width: 64px; }
  .team-preset-title strong { font-size: 13px; }
  .team-preset-title small { font-size: 10px; }
  .team-preset-line { gap: 7px; }
  .team-preset-generals { gap: 7px; }
  .team-preset-avatar { width: 42px; height: 42px; }
  .team-preset-general { min-width: 42px; }
  .team-preset-general em { max-width: 46px; font-size: 11px; }
  .team-preset-select { min-width: 52px; }
}

@media (max-width: 720px) {
  .ai-upload { background-position: 74% center; }
  .member-upgrade-card { background-position: center; }
}

/* Battle screen hierarchy: primary battle action is deliberately larger than its score action. */
.lineup-actions .sgz-action-iron,
.result-actions .sgz-action-iron {
  padding-left: clamp(54px, 6.4vw, 86px);
  font-size: clamp(19px, 1.7vw, 24px);
}

.lineup-actions .sgz-action-iron::before,
.result-actions .sgz-action-iron::before {
  left: clamp(14px, 1.8vw, 26px);
  width: clamp(34px, 3.7vw, 46px);
  height: clamp(34px, 3.7vw, 46px);
  font-size: clamp(17px, 1.75vw, 22px);
}

@media (max-width: 520px) {
  .lineup-actions { grid-template-columns: minmax(0, 1fr) 32vw; }
  .lineup-actions .sgz-action-iron,
  .result-actions .sgz-action-iron,
  .team-score-btn { width: 100%; height: 44px; }
}

@media (max-width: 520px) {
  .equipment-picker-tabs { gap: 4px; }
  .equipment-picker-tabs button { min-height: 48px; padding: 4px 2px; font-size: 11px; }
  .equipment-picker-tabs button > span { width: 21px; height: 21px; font-size: 10px; }
  .equipment-picker-grid { grid-template-columns: 1fr; max-height: 55vh; }
  .equipment-picker-grid button { min-height: 58px; }
}

/* 兵书弹窗与剧本下拉框、战法弹窗统一为宣纸与朱红印章视觉。 */
.picker.book-picker {
  width: min(720px, calc(100vw - 24px));
  max-height: min(86vh, 780px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.66), rgba(238, 214, 174, 0.52)),
    url("./assets/dialog-bg-book-v3.jpg?v=20260808") center / cover no-repeat,
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.book-picker::before,
.picker.book-picker::after {
  display: none;
}

.picker.book-picker .picker-head {
  margin-bottom: 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.book-picker .picker-head h3 {
  margin: 0;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.book-picker .picker-head .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.book-picker .picker-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.book-picker .book-picker-layout {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 9px;
}

.picker.book-picker .book-type-tabs {
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(112, 62, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 248, 230, 0.54);
  box-shadow: inset 0 1px 5px rgba(77, 42, 21, 0.1);
}

.picker.book-picker .book-type-tabs button {
  min-height: 32px;
  padding: 4px 3px;
  border: 1px solid rgba(123, 75, 40, 0.24);
  border-radius: 8px;
  color: #593021;
  background: rgba(255, 252, 242, 0.74);
  font-size: 15px;
  font-weight: 1000;
  box-shadow: 0 1px 2px rgba(74, 41, 22, 0.05);
}

.picker.book-picker .book-type-tabs button.is-selected {
  border-color: rgba(91, 40, 24, 0.76);
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 36%),
    linear-gradient(135deg, #8b3b2c, #58231c);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.14), 0 2px 5px rgba(71, 31, 19, 0.15);
}

.picker.book-picker .book-choice-panel {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.48);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.picker.book-picker .book-choice-panel h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5b2d20;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 16px;
}

.picker.book-picker .book-choice-panel h4::before {
  content: "书";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff2cf;
  background: linear-gradient(180deg, #9f4b38, #6b2b22);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.book-picker .book-choice-grid {
  gap: 7px;
}

.picker.book-picker .book-choice-grid button {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 17px;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 8px;
  min-height: 43px;
  padding: 6px 8px;
  border: 1px solid rgba(119, 70, 35, 0.28);
  border-radius: 8px;
  color: #452519;
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.42);
}

.picker.book-picker .book-choice-grid button::before {
  content: "书";
  display: grid;
  grid-row: 1;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.32);
  border-radius: 50%;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.picker.book-picker .book-choice-grid button::after {
  content: "";
  grid-column: 3;
  grid-row: 1;
  color: #f5d487;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.picker.book-picker .book-choice-grid strong {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker.book-picker .book-choice-grid span {
  grid-column: 2 / 4;
  grid-row: 2;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(79, 48, 30, 0.68);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker.book-picker .book-choice-grid button.is-selected {
  border-color: rgba(89, 39, 23, 0.82);
  color: #fff3d2;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
}

.picker.book-picker .book-choice-grid button.is-selected::after {
  content: "✓";
}

.picker.book-picker .book-choice-grid button.is-selected span {
  color: rgba(255, 239, 202, 0.72);
}

.picker.book-picker .book-confirm {
  min-height: 39px;
  margin-top: 2px;
  border: 1px solid rgba(89, 39, 23, 0.82);
  border-radius: 9px;
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
}

@media (max-width: 380px) {
  .picker.book-picker .book-picker-layout {
    grid-template-columns: 1fr;
  }

  .picker.book-picker .book-type-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 30px;
    height: auto;
  }

  .picker.book-picker .book-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* 红度与属性弹窗沿用朱红、宣纸和圆形印章体系。 */
.picker.attribute-picker {
  width: min(620px, calc(100vw - 24px));
  max-height: min(88vh, 780px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.64), rgba(238, 214, 174, 0.5)),
    url("./assets/dialog-bg-attribute-chibi-go-v1.png?v=20260813") center / 100% 100% no-repeat,
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.attribute-picker::before,
.picker.attribute-picker::after {
  display: none;
}

.picker.attribute-picker .picker-head {
  margin-bottom: 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.attribute-picker .picker-head h3 {
  margin: 0 0 3px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.attribute-picker .attribute-subtitle {
  margin: 0;
  color: rgba(255, 239, 202, 0.76);
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.58);
}

.picker.attribute-picker .picker-head .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.attribute-picker .picker-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.attribute-picker .attribute-picker-body {
  gap: 9px;
  padding: 0;
}

.picker.attribute-picker .attribute-hero {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  grid-template-rows: repeat(2, auto);
  justify-items: start;
  gap: 1px 9px;
  padding: 7px 9px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.62);
  box-shadow: inset 0 1px 5px rgba(76, 42, 22, 0.09);
}

.picker.attribute-picker .attribute-hero::before {
  content: "将";
  display: grid;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  align-self: center;
  place-items: center;
  border-radius: 50%;
  color: #fff2cf;
  background: linear-gradient(180deg, #9f4b38, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.attribute-picker .attribute-hero strong,
.picker.attribute-picker .attribute-hero span:last-child {
  grid-column: 2;
}

.picker.attribute-picker .attribute-ribbon {
  color: #8c3a2c;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.picker.attribute-picker .attribute-hero strong {
  color: #4b271a;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
  line-height: 1.1;
}

.picker.attribute-picker .attribute-hero span:last-child {
  color: rgba(76, 46, 28, 0.7);
  font-size: 10px;
}

.picker.attribute-picker .red-star-picker {
  display: grid;
  grid-template-columns: 30px repeat(5, minmax(0, 46px));
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(111, 63, 31, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.52);
}

.picker.attribute-picker .red-star-picker::before {
  content: "红";
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff2cf;
  background: linear-gradient(180deg, #9f4b38, #6b2b22);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.attribute-picker .red-star-picker button {
  display: grid;
  width: 100%;
  min-height: 48px;
  place-items: center;
}

.picker.attribute-picker .red-star-picker button span {
  font-size: 40px;
  line-height: 1;
  transform: translateY(-2px);
}

.picker.attribute-picker .attribute-list {
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.48);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.picker.attribute-picker .attribute-row {
  grid-template-columns: 70px minmax(0, 1fr) 108px;
  gap: 7px;
  min-height: 48px;
  padding: 5px 7px;
  border: 1px solid rgba(119, 70, 35, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.72);
  box-shadow: 0 1px 4px rgba(73, 39, 20, 0.05);
}

.picker.attribute-picker .attribute-label {
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.picker.attribute-picker .attribute-label::before {
  content: "";
  display: grid;
  grid-row: 1;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.3);
  border-radius: 50%;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 16px;
  font-weight: 900;
}

.picker.attribute-picker .attribute-label span {
  grid-column: 2;
}

.picker.attribute-picker .attribute-label[data-attribute-label="force"]::before {
  content: "武";
}

.picker.attribute-picker .attribute-label[data-attribute-label="intel"]::before {
  content: "智";
}

.picker.attribute-picker .attribute-label[data-attribute-label="command"]::before {
  content: "统";
}

.picker.attribute-picker .attribute-label[data-attribute-label="speed"]::before {
  content: "速";
}

.picker.attribute-picker .attribute-label span {
  font-size: 17px;
  line-height: 1;
}

.picker.attribute-picker .attribute-row input[type="range"] {
  height: 24px;
  appearance: none;
  accent-color: #8b3b2c;
  background: transparent;
}

.picker.attribute-picker .attribute-row input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9b4433, #d5a458);
  box-shadow: inset 0 1px 2px rgba(64, 30, 17, 0.26);
}

.picker.attribute-picker .attribute-row input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 2px solid #6a2b21;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8e3ab, #d29b45);
  box-shadow: 0 2px 4px rgba(57, 27, 16, 0.26);
}

.picker.attribute-picker .attribute-stepper {
  grid-template-columns: 28px minmax(30px, 1fr) 28px;
  gap: 4px;
}

.picker.attribute-picker .attribute-stepper strong {
  color: #743026;
  font-size: 15px;
}

.picker.attribute-picker .attribute-step {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0 0 2px;
  place-items: center;
  border: 1px solid rgba(112, 60, 29, 0.42);
  border-radius: 50%;
  color: #fff1cb;
  background: linear-gradient(180deg, #954333, #67281f);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.13), 0 2px 4px rgba(63, 29, 17, 0.15);
}

.picker.attribute-picker .attribute-confirm {
  width: clamp(220px, 72%, 340px);
  min-height: 39px;
  margin-top: 0;
  justify-self: center;
  border: 1px solid rgba(89, 39, 23, 0.82);
  border-radius: 9px;
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
}

@media (max-width: 380px) {
  .picker.attribute-picker .attribute-row {
    grid-template-columns: 66px minmax(0, 1fr) 96px;
    padding-inline: 5px;
  }

  .picker.attribute-picker .red-star-picker {
    grid-template-columns: 27px repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .picker.attribute-picker .red-star-picker button span {
    font-size: 36px;
  }
}

/* 选择阵容弹窗统一为朱红标题、宣纸底纹；队伍卡片内部保持原布局。 */
.picker.team-picker {
  width: min(760px, calc(100vw - 24px));
  max-height: min(86vh, 780px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.62), rgba(238, 214, 174, 0.48)),
    url("./assets/dialog-bg-team-select-muster-top-v5.png") center / 100% 100% no-repeat,
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.team-picker::before,
.picker.team-picker::after {
  display: none;
}

.picker.team-picker .picker-head {
  position: relative;
  z-index: 2;
  margin: 0 0 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.team-picker .picker-head h3 {
  margin: 0 0 3px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.team-picker .team-picker-summary {
  color: rgba(255, 239, 202, 0.76);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.58);
}

.picker.team-picker .picker-head .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.team-picker .picker-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.team-picker .team-picker-tabs {
  position: relative;
  z-index: 2;
  gap: 6px;
  margin: 0 0 9px;
  padding: 6px;
  border: 1px solid rgba(116, 66, 33, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 233, 0.6);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.07);
}

.picker.team-picker .team-picker-tabs button {
  min-height: 34px;
  padding: 4px 3px;
  border: 1px solid rgba(123, 75, 40, 0.24);
  border-radius: 8px;
  color: #5a3020;
  background: rgba(255, 252, 242, 0.72);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(74, 41, 22, 0.05);
}

.picker.team-picker .team-picker-tabs button.is-selected {
  border-color: rgba(91, 40, 24, 0.76);
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 36%),
    linear-gradient(135deg, #8b3b2c, #58231c);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.14), 0 2px 5px rgba(71, 31, 19, 0.15);
}

.picker.team-picker .team-picker-grid {
  position: relative;
  z-index: 2;
  gap: 9px;
  max-height: min(60vh, 540px);
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.5);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

/* 选择特技弹窗：保留武器人物背景，统一朱红标题与宣纸控件。 */
.picker.equipment-picker {
  width: min(600px, calc(100vw - 24px));
  height: min(86vh, 780px);
  max-height: min(86vh, 780px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.62), rgba(238, 214, 174, 0.46)),
    url("./assets/dialog-bg-equipment-weapons-chibi-portrait-v2.png?v=20260817") center / 100% 100% no-repeat,
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.equipment-picker .picker-head {
  margin-bottom: 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.equipment-picker .picker-head h3 {
  margin: 0 0 3px;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.equipment-picker .equipment-picker-summary {
  color: rgba(255, 239, 202, 0.76);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.58);
}

.picker.equipment-picker .picker-head .tool-btn,
.picker.member-plans-dialog > header .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.equipment-picker .picker-head .tool-btn > span,
.picker.member-plans-dialog > header .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.equipment-picker .equipment-picker-tabs {
  gap: 6px;
  margin-bottom: 9px;
  padding: 6px;
  border: 1px solid rgba(116, 66, 33, 0.28);
  border-radius: 10px;
  background: rgba(255, 249, 233, 0.6);
  box-shadow: inset 0 1px 4px rgba(85, 48, 24, 0.07);
}

.picker.equipment-picker .equipment-picker-tabs button {
  min-height: 42px;
  padding: 5px 3px;
  border: 1px solid rgba(123, 75, 40, 0.24);
  border-radius: 8px;
  color: #5a3020;
  background: rgba(255, 252, 242, 0.72);
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(74, 41, 22, 0.05);
}

.picker.equipment-picker .equipment-picker-tabs button > span {
  width: 25px;
  height: 25px;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  box-shadow: inset 0 0 0 1px rgba(121, 67, 29, 0.26);
}

.picker.equipment-picker .equipment-picker-tabs button.is-selected {
  border-color: rgba(91, 40, 24, 0.76);
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 36%),
    linear-gradient(135deg, #8b3b2c, #58231c);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.14), 0 2px 5px rgba(71, 31, 19, 0.15);
}

.picker.equipment-picker .equipment-picker-grid {
  gap: 7px;
  max-height: min(55vh, 500px);
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.5);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.picker.equipment-picker .equipment-picker-grid button {
  border-color: rgba(119, 70, 35, 0.28);
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.45);
}

.picker.equipment-picker .equipment-picker-grid button.is-selected {
  border-color: rgba(89, 39, 23, 0.82);
  color: #fff3d2;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
}

.picker.equipment-picker .equipment-picker-grid button.is-selected strong,
.picker.equipment-picker .equipment-picker-grid button.is-selected span,
.picker.equipment-picker .equipment-picker-grid button.is-selected small {
  color: #fff0ca;
}

.picker.equipment-picker .equipment-confirm {
  min-height: 39px;
  margin-top: 9px;
  border: 1px solid rgba(89, 39, 23, 0.82);
  border-radius: 9px;
  color: #fff2ce;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, #8d3c2d, #57221b);
  box-shadow: inset 0 0 0 1px rgba(255, 225, 155, 0.16), 0 3px 7px rgba(67, 29, 18, 0.17);
  text-shadow: 0 1px 1px rgba(41, 17, 10, 0.72);
}

/* 购买会员弹窗：采用同一标题与宣纸选项体系。 */
.picker.member-plans-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: min(86vh, 720px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    radial-gradient(circle at 86% 18%, rgba(185, 116, 40, 0.15), transparent 30%),
    linear-gradient(180deg, rgba(255, 251, 239, 0.98), rgba(238, 214, 174, 0.94)),
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.member-plans-dialog > header {
  margin: 0 0 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.member-plans-dialog > header h2 {
  margin: 0;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.member-plans-dialog .member-plans {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.56);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.picker.member-plans-dialog .member-plans button {
  position: relative;
  min-height: 96px;
  padding: 11px 12px 10px 48px;
  overflow: hidden;
  border: 1px solid rgba(119, 70, 35, 0.28);
  border-radius: 9px;
  color: #452519;
  background:
    radial-gradient(circle at 92% 18%, rgba(190, 126, 50, 0.14), transparent 29%),
    rgba(255, 252, 242, 0.8);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.45);
}

.picker.member-plans-dialog .member-plans button::before {
  content: "会";
  position: absolute;
  top: 50%;
  left: 11px;
  display: grid;
  width: 28px;
  height: 28px;
  transform: translateY(-50%) rotate(-6deg);
  place-items: center;
  border: 1px solid rgba(121, 67, 29, 0.32);
  border-radius: 50%;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.picker.member-plans-dialog .member-plans button:hover {
  border-color: rgba(89, 39, 23, 0.64);
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 221, 136, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(255, 244, 214, 0.96), rgba(227, 187, 119, 0.88));
}

.picker.member-plans-dialog .member-plans span {
  color: #8b5c36;
  font-size: 11px;
}

.picker.member-plans-dialog .member-plans strong {
  color: #5c291d;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 18px;
}

.picker.member-plans-dialog .member-plans em {
  color: #923226;
  font-size: 22px;
  text-shadow: 0 1px 0 rgba(255, 247, 221, 0.9);
}

@media (max-width: 520px) {
  .picker.equipment-picker .equipment-picker-tabs button {
    min-height: 40px;
  }

  .picker.member-plans-dialog .member-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picker.member-plans-dialog .member-plans button {
    min-height: 88px;
    padding: 9px 8px 8px 40px;
  }

  .picker.member-plans-dialog .member-plans button::before {
    left: 8px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}

/* 会员套餐徽记与右上角推荐角标按套餐区分。 */
.picker.member-plans-dialog .member-plans button::before {
  content: "会";
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="month"]::before {
  content: "月";
  color: #285b49;
  background: linear-gradient(180deg, #dce9c3, #9eb779);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="quarter"]::before {
  content: "季";
  color: #7b2e24;
  background: linear-gradient(180deg, #f3cf9b, #d89b55);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="year"]::before {
  content: "年";
  color: #77531e;
  background: linear-gradient(180deg, #f7e19e, #d4aa47);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="lifetime"]::before {
  content: "终";
  color: #56365f;
  background: linear-gradient(180deg, #e0d1e4, #ad8ab5);
}

.picker.member-plans-dialog .member-plans button > span:first-child {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  width: auto;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid rgba(86, 48, 28, 0.16);
  border-radius: 999px;
  color: #6f4930;
  background: rgba(224, 195, 137, 0.7);
  font-size: 10px;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="month"] > span:first-child {
  color: #315b49;
  background: rgba(196, 219, 176, 0.88);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="quarter"] > span:first-child {
  color: #7a3026;
  background: rgba(239, 193, 140, 0.9);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="year"] > span:first-child {
  color: #76501c;
  background: rgba(240, 212, 126, 0.9);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="lifetime"] > span:first-child {
  color: #57375e;
  background: rgba(214, 194, 218, 0.9);
}

/* 兵书弹窗减少深色面积：选中项使用浅金宣纸，仅标题与确认按钮保留朱红。 */
.picker.book-picker .book-type-tabs button.is-selected {
  border-color: rgba(139, 57, 39, 0.6);
  color: #762d22;
  background:
    radial-gradient(circle at 84% 22%, rgba(173, 70, 48, 0.1), transparent 34%),
    linear-gradient(180deg, #fae7b7, #dfb766);
  text-shadow: 0 1px 0 rgba(255, 250, 229, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 218, 0.5), 0 2px 5px rgba(83, 43, 22, 0.11);
}

.picker.book-picker .book-choice-grid button.is-selected {
  border-color: rgba(139, 57, 39, 0.58);
  color: #64291f;
  background:
    radial-gradient(circle at 88% 20%, rgba(151, 52, 39, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 241, 204, 0.96), rgba(229, 194, 125, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 251, 228, 0.58), 0 2px 6px rgba(75, 38, 20, 0.1);
}

.picker.book-picker .book-choice-grid button.is-selected::before {
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.book-picker .book-choice-grid button.is-selected::after {
  color: #8b3428;
}

.picker.book-picker .book-choice-grid button.is-selected strong,
.picker.book-picker .book-choice-grid button.is-selected span {
  color: #64291f;
}

/* 特技弹窗采用与兵书一致的浅金选中态。 */
.picker.equipment-picker .equipment-picker-tabs button.is-selected {
  border-color: rgba(139, 57, 39, 0.6);
  color: #762d22;
  background:
    radial-gradient(circle at 84% 22%, rgba(173, 70, 48, 0.1), transparent 34%),
    linear-gradient(180deg, #fae7b7, #dfb766);
  text-shadow: 0 1px 0 rgba(255, 250, 229, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 218, 0.5), 0 2px 5px rgba(83, 43, 22, 0.11);
}

.picker.equipment-picker .equipment-picker-tabs button.is-selected > span {
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.equipment-picker .equipment-picker-grid button.is-selected {
  border-color: rgba(139, 57, 39, 0.58);
  color: #64291f;
  background:
    radial-gradient(circle at 88% 20%, rgba(151, 52, 39, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 241, 204, 0.96), rgba(229, 194, 125, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 251, 228, 0.58), 0 2px 6px rgba(75, 38, 20, 0.1);
}

.picker.equipment-picker .equipment-picker-grid button.is-selected strong,
.picker.equipment-picker .equipment-picker-grid button.is-selected span,
.picker.equipment-picker .equipment-picker-grid button.is-selected small {
  color: #64291f;
}

/* 战法弹窗采用与兵书、特技一致的浅金选中态。 */
.picker.skill-picker .skill-picker-tabs button.is-selected {
  border-color: rgba(139, 57, 39, 0.6);
  color: #762d22;
  background:
    radial-gradient(circle at 84% 22%, rgba(173, 70, 48, 0.1), transparent 34%),
    linear-gradient(180deg, #fae7b7, #dfb766);
  text-shadow: 0 1px 0 rgba(255, 250, 229, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 218, 0.5), 0 2px 5px rgba(83, 43, 22, 0.11);
}

.picker.skill-picker .skill-picker-grid button.is-selected {
  border-color: rgba(139, 57, 39, 0.58);
  color: #64291f;
  background:
    radial-gradient(circle at 88% 20%, rgba(151, 52, 39, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 241, 204, 0.96), rgba(229, 194, 125, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 251, 228, 0.58), 0 2px 6px rgba(75, 38, 20, 0.1);
}

.picker.skill-picker .skill-picker-grid button.is-selected::before {
  color: #fff0cd;
  background: linear-gradient(180deg, #a14b39, #6b2b22);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 155, 0.26);
}

.picker.skill-picker .skill-picker-grid button.is-selected::after {
  color: #8b3428;
}

.picker.skill-picker .skill-picker-grid button.is-selected strong {
  color: #64291f;
}

/* 红度与属性的增减按钮改成浅金印章按钮。 */
.picker.attribute-picker .attribute-step {
  border-color: rgba(139, 75, 35, 0.45);
  color: #742f24;
  background: linear-gradient(180deg, #f8e4aa, #d8ab59);
  text-shadow: 0 1px 0 rgba(255, 251, 227, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 213, 0.52), 0 2px 4px rgba(63, 29, 17, 0.13);
}

.picker.attribute-picker .attribute-step:hover,
.picker.attribute-picker .attribute-step:focus-visible {
  border-color: rgba(123, 48, 34, 0.62);
  background: linear-gradient(180deg, #fbeab7, #e0b866);
}

/* 上线所需的合规与帮助入口：先展示结构，资料以后统一替换。 */
.compliance-card {
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(124, 66, 31, 0.3);
  border-radius: 10px;
  background:
    linear-gradient(112deg, rgba(255, 253, 244, 0.94), rgba(239, 218, 177, 0.88)),
    repeating-linear-gradient(15deg, transparent 0 22px, rgba(107, 65, 34, 0.035) 23px 24px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 248, 0.62);
}

.compliance-card-head {
  align-items: center;
  margin-bottom: 6px;
}

.compliance-card-head h2,
.compliance-card-head .eyebrow {
  margin: 0;
}

.compliance-card-head h2 {
  margin-top: 2px;
  color: #55261c;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 22px;
}

.compliance-card-head .eyebrow {
  color: #9a4c34;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.compliance-draft-badge {
  padding: 4px 9px;
  border: 1px dashed rgba(145, 72, 42, 0.55);
  border-radius: 999px;
  color: #813629;
  background: rgba(255, 239, 204, 0.75);
  font-size: 11px;
  font-weight: 900;
}

.compliance-card-tip {
  margin: 0 0 12px;
  color: #795d48;
  font-size: 12px;
  line-height: 1.65;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compliance-grid button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(117, 66, 34, 0.23);
  border-radius: 8px;
  color: #4f2e21;
  background: rgba(255, 252, 241, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66), 0 2px 4px rgba(65, 35, 19, 0.05);
  text-align: left;
}

.compliance-grid button:hover,
.compliance-grid button:focus-visible {
  border-color: rgba(128, 48, 34, 0.5);
  background: linear-gradient(180deg, rgba(255, 245, 215, 0.98), rgba(232, 202, 143, 0.9));
}

.compliance-grid button > span {
  grid-row: 1 / 3;
  display: grid;
  width: 30px;
  height: 30px;
  align-self: center;
  place-items: center;
  border: 1px solid rgba(103, 43, 29, 0.38);
  border-radius: 50%;
  color: #fff0ce;
  background: linear-gradient(145deg, #9b4634, #5f281f);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 221, 151, 0.12);
}

.compliance-grid button strong {
  align-self: end;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compliance-grid button em {
  align-self: start;
  color: #92745d;
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}

.filing-placeholder {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px dashed rgba(120, 69, 36, 0.42);
  border-radius: 8px;
  color: #65402d;
  background: rgba(246, 231, 197, 0.62);
  font-size: 11px;
  text-align: left;
}

.filing-placeholder strong {
  color: #9b3e2e;
}

.filing-placeholder em {
  justify-self: end;
  color: #8b644a;
  font-style: normal;
}

.upload-privacy-note {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(108, 67, 38, 0.32);
  color: #6f5948;
  font-size: 11px;
  line-height: 1.5;
}

.upload-privacy-note button,
.member-plan-consent button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: #8a3529;
  background: transparent;
  font-size: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.member-plan-legal {
  margin-top: 9px;
  padding: 9px 10px 7px;
  border: 1px dashed rgba(112, 62, 32, 0.34);
  border-radius: 8px;
  color: #6b4d38;
  background: rgba(255, 250, 235, 0.64);
  font-size: 11px;
}

.member-plan-consent {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  align-items: center;
}

.member-plan-consent label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 800;
}

.member-plan-consent input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #85382b;
}

.member-plan-legal p {
  margin: 5px 0 0 21px;
  color: #95745d;
  line-height: 1.45;
}

.picker.compliance-dialog {
  width: min(650px, calc(100vw - 24px));
  max-height: min(88vh, 760px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 6%, rgba(160, 57, 38, 0.12), transparent 29%),
    linear-gradient(180deg, rgba(255, 252, 242, 0.99), rgba(237, 214, 175, 0.97));
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.compliance-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 9px;
  padding: 8px 9px 8px 12px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.compliance-dialog > header h2,
.picker.compliance-dialog > header p {
  margin: 0;
}

.picker.compliance-dialog > header h2 {
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 21px;
  letter-spacing: 0.06em;
}

.picker.compliance-dialog > header p {
  margin-top: 2px;
  color: rgba(255, 240, 206, 0.74);
  font-size: 10px;
}

.picker.compliance-dialog > header .tool-btn {
  flex: 0 0 auto;
  color: #fff0c8;
}

.compliance-body {
  max-height: calc(min(88vh, 760px) - 88px);
  padding: 9px;
  overflow-y: auto;
  border: 1px solid rgba(111, 63, 31, 0.28);
  border-radius: 10px;
  background: rgba(255, 252, 241, 0.74);
  box-shadow: inset 0 1px 7px rgba(76, 42, 22, 0.1);
}

.compliance-draft-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(153, 64, 42, 0.45);
  border-radius: 8px;
  color: #74412f;
  background: #f9e5b9;
  font-size: 11px;
  line-height: 1.45;
}

.compliance-draft-notice strong {
  flex: 0 0 auto;
  color: #973c2d;
}

.compliance-intro {
  margin: 10px 3px;
  color: #644937;
  font-size: 12px;
  line-height: 1.65;
}

.compliance-section-list {
  display: grid;
  gap: 7px;
}

.compliance-section-list section {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(118, 72, 42, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 248, 0.68);
}

.compliance-section-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #fff0cf;
  background: linear-gradient(145deg, #944231, #61291f);
  font-size: 10px;
  font-weight: 900;
}

.compliance-section-list h3,
.compliance-section-list p {
  margin: 0;
}

.compliance-section-list h3 {
  color: #5f2c20;
  font-size: 14px;
}

.compliance-section-list p {
  margin-top: 4px;
  color: #735743;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-line;
}

.compliance-update-line {
  margin: 10px 3px 2px;
  color: #9a795e;
  font-size: 10px;
  text-align: right;
}

@media (max-width: 520px) {
  .compliance-card {
    padding: 12px;
  }

  .compliance-grid {
    gap: 6px;
  }

  .compliance-grid button {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 7px;
    min-height: 54px;
    padding: 7px;
  }

  .compliance-grid button > span {
    width: 27px;
    height: 27px;
    font-size: 13px;
  }

  .compliance-grid button strong {
    font-size: 13px;
  }

  .filing-placeholder {
    grid-template-columns: auto 1fr;
  }

  .filing-placeholder em {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .upload-privacy-note {
    align-items: flex-start;
  }

  .compliance-draft-notice {
    align-items: flex-start;
  }
}

/* 合规详情弹窗完全沿用“选择兵书”的宣纸、朱红标题与浅金选项卡体系。 */
.picker.compliance-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: min(86vh, 780px);
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.66), rgba(238, 214, 174, 0.52)),
    url("./assets/dialog-bg-book-v3.jpg?v=20260808") center / cover no-repeat,
    #efe0be;
  box-shadow: 0 18px 42px rgba(39, 22, 13, 0.38), inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.compliance-dialog::before,
.picker.compliance-dialog::after {
  display: none;
}

.picker.compliance-dialog > .picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.compliance-dialog > .picker-head h2 {
  margin: 0;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.compliance-dialog > .picker-head p {
  margin: 2px 0 0;
  color: rgba(255, 240, 206, 0.72);
  font-size: 10px;
}

.picker.compliance-dialog > .picker-head .tool-btn {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border-color: rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

.picker.compliance-dialog > .picker-head .tool-btn > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.picker.compliance-dialog .compliance-body {
  max-height: calc(min(86vh, 780px) - 78px);
  padding: 8px;
  border: 1px solid rgba(111, 63, 31, 0.3);
  border-radius: 10px;
  background: rgba(255, 249, 232, 0.48);
  box-shadow: inset 0 1px 6px rgba(76, 42, 22, 0.11);
}

.picker.compliance-dialog .compliance-draft-notice {
  min-height: 38px;
  border: 1px solid rgba(123, 75, 40, 0.28);
  border-radius: 8px;
  color: #593021;
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.42);
}

.picker.compliance-dialog .compliance-draft-notice strong {
  display: inline-flex;
  min-height: 25px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(121, 67, 29, 0.32);
  border-radius: 999px;
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.picker.compliance-dialog .compliance-intro {
  margin: 8px 3px;
  padding-left: 9px;
  border-left: 3px solid #8a392a;
  color: #5b3627;
  font-weight: 800;
}

.picker.compliance-dialog .compliance-section-list {
  gap: 7px;
}

.picker.compliance-dialog .compliance-section-list section {
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 8px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(119, 70, 35, 0.28);
  border-radius: 8px;
  color: #452519;
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 2px 5px rgba(73, 39, 20, 0.07), inset 0 0 0 1px rgba(255, 255, 247, 0.42);
}

.picker.compliance-dialog .compliance-section-index {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(121, 67, 29, 0.32);
  color: #783021;
  background: linear-gradient(180deg, #f5dfa5, #d2a052);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 11px;
  box-shadow: inset 0 0 0 2px rgba(255, 249, 219, 0.38);
}

.picker.compliance-dialog .compliance-section-list h3 {
  color: #452519;
  font-size: 14px;
}

.picker.compliance-dialog .compliance-section-list p {
  color: rgba(79, 48, 30, 0.74);
  font-size: 11px;
  line-height: 1.58;
}

.picker.compliance-dialog .compliance-update-line {
  margin: 8px 3px 1px;
  padding-top: 7px;
  border-top: 1px dashed rgba(111, 63, 31, 0.32);
  color: #765641;
}

/* 会员套餐卡补全有效期、支付方式与权益摘要，避免四宫格内容过空。 */
.picker.member-plans-dialog .member-plans button {
  min-height: 104px;
  padding: 12px 12px 11px 50px;
  isolation: isolate;
}

.picker.member-plans-dialog .member-plans button::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18px;
  bottom: -24px;
  width: 86px;
  height: 86px;
  border: 10px double rgba(131, 75, 35, 0.09);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(131, 75, 35, 0.035);
  pointer-events: none;
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="month"] {
  background:
    radial-gradient(circle at 90% 82%, rgba(91, 132, 93, 0.13), transparent 36%),
    rgba(255, 252, 242, 0.84);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="quarter"] {
  background:
    radial-gradient(circle at 90% 82%, rgba(178, 89, 54, 0.13), transparent 36%),
    rgba(255, 252, 242, 0.84);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="year"] {
  background:
    radial-gradient(circle at 90% 82%, rgba(183, 137, 35, 0.15), transparent 36%),
    rgba(255, 252, 242, 0.84);
}

.picker.member-plans-dialog .member-plans button[data-buy-plan="lifetime"] {
  background:
    radial-gradient(circle at 90% 82%, rgba(112, 73, 124, 0.14), transparent 36%),
    rgba(255, 252, 242, 0.84);
}

.picker.member-plans-dialog .member-plan-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.picker.member-plans-dialog .member-plan-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  padding-right: 46px;
}

.picker.member-plans-dialog .member-plan-name-row strong {
  margin: 0;
  color: #5c291d;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 19px;
  line-height: 1.15;
}

.picker.member-plans-dialog .member-plan-duration {
  display: inline-flex;
  min-height: 18px;
  padding: 1px 6px;
  align-items: center;
  border: 1px solid rgba(120, 73, 39, 0.2);
  border-radius: 999px;
  color: #79563d;
  background: rgba(244, 226, 187, 0.62);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.picker.member-plans-dialog .member-plan-price-row {
  display: flex;
  gap: 7px;
  align-items: baseline;
}

.picker.member-plans-dialog .member-plan-price-row em {
  margin: 0;
  color: #923226;
  font-size: 23px;
  line-height: 1.05;
}

.picker.member-plans-dialog .member-plan-summary {
  margin: 1px 0 0;
  padding-top: 6px;
  overflow: hidden;
  border-top: 1px dashed rgba(112, 66, 35, 0.28);
  color: #70503a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .picker.member-plans-dialog .member-plans button {
    min-height: 98px;
    padding: 10px 8px 8px 40px;
  }

  .picker.member-plans-dialog .member-plan-name-row {
    padding-right: 34px;
  }

  .picker.member-plans-dialog .member-plan-name-row strong {
    font-size: 17px;
  }

  .picker.member-plans-dialog .member-plan-price-row em {
    font-size: 21px;
  }

  .picker.member-plans-dialog .member-plan-summary {
    font-size: 9px;
  }
}

/* 会员状态卡：Q 版三国人物互动新背景，左侧保留信息安全区。 */
.member-status-card {
  min-height: 160px;
  grid-template-columns: minmax(0, 1fr) 72px;
  background:
    linear-gradient(90deg, rgba(35, 14, 11, 0.92) 0%, rgba(54, 20, 15, 0.79) 40%, rgba(38, 17, 13, 0.42) 60%, rgba(25, 12, 10, 0.13) 100%),
    url("./assets/member-status-chibi-v2.png?v=20260819") right center / 115% auto no-repeat,
    #3b1712;
}

.member-status-card .member-status-copy {
  max-width: 62%;
}

.member-status-card::after {
  right: -46px;
  top: -48px;
  border-color: rgba(255, 226, 157, 0.14);
  background: radial-gradient(circle, rgba(255, 223, 144, 0.11), transparent 64%);
}

@media (max-width: 520px) {
  .member-status-card {
    min-height: 156px;
    background-position: center, right center;
  }

  .member-status-card .member-status-copy {
    max-width: 64%;
  }
}

/* VIP 改为会员名称旁的小徽章，避免遮挡右侧 Q 版人物。 */
.member-status-card {
  grid-template-columns: minmax(0, 1fr);
}

.member-status-card #memberStatusBadge {
  position: absolute;
  z-index: 2;
  top: 49px;
  left: 104px;
  right: auto;
  min-width: 44px;
  width: auto;
  padding: 5px 9px;
  border-color: rgba(255, 220, 137, 0.46);
  border-radius: 999px;
  color: #ffe4a3;
  background: linear-gradient(180deg, rgba(128, 69, 25, 0.82), rgba(82, 38, 22, 0.86));
  font-size: 12px;
  letter-spacing: 0.05em;
  box-shadow: inset 0 0 0 1px rgba(255, 237, 183, 0.14), 0 2px 5px rgba(27, 11, 8, 0.25);
}

@media (max-width: 520px) {
  .member-status-card #memberStatusBadge {
    top: 48px;
    left: 96px;
  }
}

/* 队伍评分标题改为与兵书弹窗一致的完整朱红标题栏。 */
.picker.team-score-dialog > header {
  min-height: 48px;
  margin: 0 0 10px;
  padding: 6px 50px 6px 12px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  background:
    radial-gradient(circle at 78% 50%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(134, 58, 44, 0.96), rgba(84, 34, 27, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 229, 164, 0.13), 0 3px 9px rgba(61, 29, 17, 0.18);
}

.picker.team-score-dialog > header h2 {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff2cf;
  background: transparent;
  box-shadow: none;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.78);
}

.picker.team-score-dialog #closeTeamScore {
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 224, 153, 0.38);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 21px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

@media (max-width: 520px) {
  .picker.team-score-dialog > header h2 {
    font-size: 24px;
  }
}

/* 评分弹窗不再使用整层白色遮罩，仅保留暖色暗角，让原画更清晰。 */
.picker.team-score-dialog::before {
  background:
    linear-gradient(90deg, rgba(67, 30, 18, 0.13), transparent 24% 76%, rgba(67, 30, 18, 0.13)),
    radial-gradient(circle at 50% 44%, rgba(205, 151, 68, 0.1), transparent 67%);
}

.picker.team-score-dialog > header {
  min-height: 48px;
  margin: 0 0 10px;
  padding: 5px 50px 5px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.picker.team-score-dialog > header h2 {
  color: #5b211a;
  background: transparent;
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: 0.07em;
  text-shadow:
    -1px 0 rgba(255, 250, 233, 0.94),
    1px 0 rgba(255, 250, 233, 0.94),
    0 -1px rgba(255, 250, 233, 0.94),
    0 1px rgba(255, 250, 233, 0.94),
    0 3px 5px rgba(67, 28, 18, 0.2);
}

@media (max-width: 520px) {
  .picker.team-score-dialog > header h2 {
    font-size: 27px;
  }
}

/* 军师联盟入口：四张统一的浅金宣纸 Q 版系列图。 */
.strategist-action.draw-record-entry {
  background-image: url("./assets/strategist-draw-entry-chibi-v6.png?v=20260823");
  background-image: image-set(
    url("./assets/strategist-draw-entry-chibi-v6.png?v=20260823") 1x,
    url("./assets/strategist-draw-entry-chibi-v6@2x.png?v=20260823") 2x
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-color: rgba(143, 92, 40, 0.45);
}

.strategist-action.draw-record-entry::before {
  background: none;
  opacity: 0;
}

.strategist-action.draw-record-entry strong {
  color: #5d2719;
  text-shadow: 0 1px 0 rgba(255, 247, 218, 0.92), 0 2px 4px rgba(109, 65, 27, 0.2);
}

.strategist-action.draw-record-entry em {
  color: #765038;
  text-shadow: 0 1px 0 rgba(255, 248, 224, 0.86);
}

/* 抽卡记录弹窗：四周陈列兵器与点将人物，中部留给记录格。 */
.picker.draw-record-dialog {
  width: min(700px, calc(100vw - 24px));
  max-height: min(86vh, 780px);
  position: relative;
  isolation: isolate;
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(96, 47, 26, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.26), rgba(242, 221, 181, 0.2)),
    url("./assets/dialog-bg-draw-record-chibi-v1.png?v=20260820") center / 100% 100% no-repeat,
    #ead1a5;
  box-shadow:
    0 18px 42px rgba(39, 22, 13, 0.38),
    inset 0 0 0 2px rgba(255, 252, 235, 0.56);
}

.picker.draw-record-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(61, 28, 17, 0.08), transparent 14% 86%, rgba(61, 28, 17, 0.08)),
    radial-gradient(circle at 50% 48%, rgba(255, 246, 221, 0.1), transparent 66%);
}

.picker.draw-record-dialog .picker-head {
  min-height: 49px;
  margin-bottom: 9px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(91, 42, 24, 0.72);
  border-radius: 10px;
  color: #fff0cc;
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 220, 141, 0.13), transparent 34%),
    linear-gradient(135deg, #863a2c, #54221b);
  box-shadow:
    inset 0 0 0 1px rgba(255, 229, 164, 0.13),
    0 3px 9px rgba(61, 29, 17, 0.18);
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.draw-record-dialog .picker-head h3 {
  margin: 0;
  color: #fff4d8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(47, 18, 10, 0.72);
}

.picker.draw-record-dialog .draw-record-summary {
  margin-top: 3px;
  color: rgba(255, 239, 202, 0.76);
  font-size: 11px;
}

.picker.draw-record-dialog .draw-record-head-actions {
  flex: 0 0 auto;
  gap: 7px;
}

.picker.draw-record-dialog .draw-clear-btn {
  flex: 0 0 auto;
  width: auto;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 224, 153, 0.34);
  border-radius: 8px;
  color: #672a21;
  background: linear-gradient(180deg, #f8e5b2, #d6a252);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.4), 0 2px 5px rgba(38, 18, 10, 0.2);
}

.picker.draw-record-dialog #closeDrawRecord {
  display: grid;
  flex: 0 0 32px;
  min-width: 32px;
  max-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 224, 153, 0.34);
  border-radius: 50%;
  color: #6c2c22;
  background: linear-gradient(180deg, #f9e6b4, #d5a151);
  font-size: 22px;
  line-height: 1;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 251, 224, 0.44), 0 2px 5px rgba(38, 18, 10, 0.24);
}

/* 抽卡内容使用局部宣纸承托，不遮住四周人物和兵器。 */
.picker.draw-record-dialog .draw-record-grid {
  padding: 6px;
  border: 1px solid rgba(104, 57, 31, 0.24);
  border-radius: 10px;
  background: rgba(255, 248, 229, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 244, 0.24),
    0 3px 10px rgba(61, 31, 17, 0.06);
}

.picker.draw-record-dialog .draw-slot {
  border-color: rgba(126, 74, 37, 0.44);
  background: linear-gradient(180deg, rgba(255, 252, 243, 0.82), rgba(235, 211, 174, 0.76));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 1px 3px rgba(71, 38, 21, 0.1);
}

.picker.draw-record-dialog .draw-slot.is-empty {
  color: rgba(73, 60, 48, 0.88);
  background: linear-gradient(180deg, rgba(244, 239, 226, 0.76), rgba(213, 202, 181, 0.68));
}

.picker.draw-record-dialog .draw-slot.is-next {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 235, 154, 0.34), transparent 42%),
    linear-gradient(180deg, rgba(255, 240, 195, 0.9), rgba(221, 165, 80, 0.84));
}

.picker.draw-record-dialog .draw-slot.is-core {
  border-color: rgba(167, 101, 53, 0.58);
  background:
    linear-gradient(90deg, rgba(255, 248, 226, 0.08), transparent 58%, rgba(238, 205, 151, 0.08)),
    url("./assets/draw-core-bg-chibi-v8.png?v=20260820") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 249, 225, 0.64),
    0 0 7px rgba(178, 117, 55, 0.14);
}

.picker.draw-record-dialog .draw-slot.is-core::before {
  display: none;
}

.picker.draw-record-dialog .draw-slot.is-core .draw-slot-name {
  color: #4d2b1d;
  transform: translate(-6px, 4px);
  text-shadow:
    -1px 0 rgba(255, 251, 235, 0.92),
    1px 0 rgba(255, 251, 235, 0.92),
    0 -1px rgba(255, 251, 235, 0.92),
    0 1px rgba(255, 251, 235, 0.92),
    0 2px 3px rgba(87, 52, 29, 0.16);
}

.picker.draw-record-dialog .draw-slot.is-core .draw-slot-time {
  color: #76543c;
  transform: translate(-6px, 4px);
  text-shadow: 0 1px 0 rgba(255, 252, 238, 0.9);
}

.picker.draw-record-dialog .draw-record-pager {
  margin-top: 8px;
  padding: 4px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.picker.draw-record-dialog .draw-record-pager button {
  min-height: 38px;
  border: 1px solid rgba(116, 53, 29, 0.62);
  border-radius: 8px;
  color: #64271f;
  background: linear-gradient(180deg, #f3d47e, #c88c34);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 251, 227, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 243, 191, 0.56), 0 2px 5px rgba(63, 29, 17, 0.18);
}

.picker.draw-record-dialog .draw-record-pager button:disabled {
  opacity: 0.78;
  color: #68402b;
  border-color: rgba(116, 67, 37, 0.46);
  background: linear-gradient(180deg, #ead394, #c49b58);
}

.picker.draw-record-dialog .draw-record-pager span {
  color: #4d281b;
  text-shadow: 0 1px 0 rgba(255, 251, 235, 0.88);
}

.picker.draw-record-dialog .draw-record-tip {
  margin: 6px 0 0;
  padding: 3px 8px 1px;
  border: 0;
  border-radius: 0;
  color: #4b2418;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-shadow:
    -1px 0 rgba(255, 246, 220, 0.94),
    1px 0 rgba(255, 246, 220, 0.94),
    0 -1px rgba(255, 246, 220, 0.94),
    0 1px rgba(255, 246, 220, 0.94),
    0 2px 4px rgba(48, 20, 12, 0.26);
  box-shadow: none;
}

@media (max-width: 520px) {
  .picker.draw-record-dialog .draw-record-grid {
    gap: 5px;
    padding: 5px;
  }

  .picker.draw-record-dialog .draw-record-pager {
    grid-template-columns: 88px minmax(0, 1fr) 88px;
  }
}

/* 对战武将配置控件：统一为克制、专业的军令铭牌体系。 */
.general-card .attribute-trigger,
.general-card .book-trigger,
.general-card .skill-trigger,
.general-card .grade-tabs {
  box-sizing: border-box;
}

/* 红度：朱漆星阶铭牌。 */
.general-card .attribute-trigger {
  position: relative;
  min-height: 38px;
  justify-content: flex-start;
  padding: 5px 8px 5px 35px;
  overflow: hidden;
  border: 1px solid rgba(118, 50, 35, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(153, 45, 34, 0.08), transparent 24%),
    repeating-linear-gradient(135deg, rgba(123, 61, 36, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #fff6df 0%, #ead2a6 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 251, 225, 0.72),
    inset 0 -3px 0 rgba(122, 47, 31, 0.08),
    0 2px 4px rgba(67, 35, 20, 0.12);
  cursor: pointer;
}

.general-card .attribute-trigger::before {
  content: "红";
  position: absolute;
  left: 7px;
  top: 50%;
  display: grid;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) rotate(-5deg);
  place-items: center;
  border: 1px solid #6c261e;
  border-radius: 5px 8px 5px 8px;
  color: #ffe7a5;
  background: linear-gradient(145deg, #b53d31, #74231d);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 #531710;
  box-shadow: inset 0 0 0 1px rgba(255, 220, 137, 0.2);
}

.general-card .red-stars {
  color: #a92f27;
  font-size: 17px;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #fff3c7, 0 1px 2px rgba(92, 27, 20, 0.18);
}

/* 兵种适性：四枚等级军印，选中等级使用对应金属色。 */
.general-card .grade-tabs {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(88, 62, 39, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(91, 65, 42, 0.2), rgba(255, 246, 220, 0.52));
  box-shadow: inset 0 1px 3px rgba(58, 33, 18, 0.14), 0 1px 0 rgba(255, 251, 232, 0.68);
}

.general-card .grade-tabs button {
  position: relative;
  min-height: 27px;
  padding: 0;
  border: 1px solid rgba(114, 82, 49, 0.35);
  border-radius: 5px;
  color: #725f4b;
  background: linear-gradient(180deg, #fffaf0, #e8d6b6);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  opacity: 1;
}

.general-card .grade-tabs button.is-selected {
  color: #ffefb1;
  text-shadow: 0 1px 0 rgba(55, 19, 12, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 227, 145, 0.28), 0 2px 4px rgba(65, 31, 17, 0.2);
}

.general-card .grade-tabs button[data-grade="S"].is-selected {
  border-color: #70241d;
  background: linear-gradient(180deg, #bd4939, #81271f);
}

.general-card .grade-tabs button[data-grade="A"].is-selected {
  border-color: #6f4e21;
  background: linear-gradient(180deg, #b58a42, #795727);
}

.general-card .grade-tabs button[data-grade="B"].is-selected {
  border-color: #435d5c;
  background: linear-gradient(180deg, #718b87, #465f5c);
}

.general-card .grade-tabs button[data-grade="C"].is-selected {
  border-color: #4f4942;
  background: linear-gradient(180deg, #7a7167, #524b44);
}

/* 兵书：青铜竹简签。 */
.general-card .book-trigger {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 6px 24px 6px 38px;
  overflow: hidden;
  border: 1px solid rgba(72, 91, 62, 0.62);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(71, 91, 61, 0.045) 0 1px, transparent 1px 15px),
    linear-gradient(180deg, #f7f2d9 0%, #d8d6ad 100%);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 236, 0.58), 0 2px 4px rgba(51, 59, 37, 0.13);
  cursor: pointer;
}

.general-card .book-trigger::before {
  content: "书";
  position: absolute;
  left: 7px;
  top: 50%;
  display: grid;
  width: 23px;
  height: 27px;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid #3f5944;
  border-radius: 3px 7px 3px 7px;
  color: #f6e8b2;
  background: linear-gradient(160deg, #687e5d, #3c5548);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 0 #26372d;
}

.general-card .book-trigger::after,
.general-card .skill-trigger::after {
  content: "›";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-52%);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.general-card .book-trigger::after { color: rgba(49, 75, 51, 0.62); }

.general-card .book-selected {
  display: -webkit-box;
  overflow: hidden;
  color: #354b38;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 战法：朱红军令签，与兵书在颜色和职能上明确区分。 */
.general-card .skill-trigger {
  position: relative;
  min-height: 43px;
  display: flex;
  align-items: center;
  padding: 6px 24px 6px 38px;
  overflow: hidden;
  border: 1px solid rgba(125, 58, 39, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(143, 47, 34, 0.07), transparent 34%),
    repeating-linear-gradient(135deg, rgba(112, 61, 37, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #fff7e7 0%, #ead4ac 100%);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 232, 0.65), 0 2px 4px rgba(76, 36, 22, 0.12);
}

.general-card .skill-trigger::before {
  content: "法";
  position: absolute;
  left: 7px;
  top: 50%;
  display: grid;
  width: 23px;
  height: 27px;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid #72271f;
  border-radius: 7px 3px 7px 3px;
  color: #ffe8ae;
  background: linear-gradient(160deg, #ad4234, #70251f);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 0 #4d1712;
}

.general-card .skill-trigger::after { color: rgba(115, 43, 31, 0.58); }

.general-card .skill-selected {
  color: #5e291f;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.25;
}

.general-card .skill-trigger[data-selected-skill=""] {
  border-style: dashed;
  background: linear-gradient(180deg, rgba(250, 246, 235, 0.92), rgba(221, 211, 188, 0.88));
}

.general-card .skill-trigger[data-selected-skill=""]::before {
  filter: grayscale(0.7);
  opacity: 0.72;
}

.general-card .skill-trigger.is-invalid {
  padding-right: 48px;
  border-color: rgba(159, 63, 47, 0.82);
  background: linear-gradient(180deg, #fff0e4, #e8bba8);
}

.general-card .attribute-trigger:active,
.general-card .book-trigger:active,
.general-card .skill-trigger:active,
.general-card .grade-tabs button:active {
  transform: translateY(1px);
  filter: brightness(0.97);
}

.general-card .attribute-trigger:focus-visible,
.general-card .book-trigger:focus-visible,
.general-card .skill-trigger:focus-visible,
.general-card .grade-tabs button:focus-visible {
  outline: 2px solid rgba(158, 55, 41, 0.52);
  outline-offset: 1px;
}

/* 武将军籍卡 v2：原创战场底图、阵营腰封与军务信息层级。 */
.general-card {
  --camp-accent: #7d5040;
  --camp-accent-dark: #43261e;
  position: relative;
  isolation: isolate;
  min-width: 154px;
  overflow: hidden;
  border: 2px solid #5d321f;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 244, 208, 0.04) 0 28%, rgba(255, 244, 214, 0.22) 40%, rgba(255, 243, 210, 0.42) 100%),
    url("./assets/general-card-dossier-bg-v1.png?v=20260822") center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 218, 139, 0.48),
    inset 0 0 20px rgba(57, 28, 15, 0.18),
    0 7px 15px rgba(43, 24, 13, 0.22);
}

.general-card[data-camp="蜀"] { --camp-accent: #477d52; --camp-accent-dark: #25452f; }
.general-card[data-camp="魏"] { --camp-accent: #4b6f8d; --camp-accent-dark: #263f58; }
.general-card[data-camp="吴"] { --camp-accent: #a64a3e; --camp-accent-dark: #672921; }
.general-card[data-camp="群"] { --camp-accent: #777267; --camp-accent-dark: #45413b; }
.general-card[data-camp="汉"] { --camp-accent: #a27b35; --camp-accent-dark: #62481f; }

.general-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 3;
  border: 1px solid rgba(255, 224, 151, 0.38);
  border-radius: 8px;
  pointer-events: none;
}

.general-card::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 0;
  z-index: 4;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--camp-accent), #e2bb65, var(--camp-accent), transparent);
  pointer-events: none;
}

.general-card .portrait {
  aspect-ratio: 0.95 / 1;
  border-bottom: 3px solid var(--camp-accent);
  background-position: center 20%;
  box-shadow:
    inset 0 -68px 58px rgba(22, 13, 7, 0.72),
    inset 0 0 0 1px rgba(255, 225, 157, 0.2),
    0 4px 8px rgba(44, 22, 11, 0.22);
}

.general-card .portrait::after {
  inset: 7px;
  border: 1px solid rgba(255, 219, 137, 0.62);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(73, 34, 18, 0.48);
}

.general-card .portrait-name {
  display: none;
}

.general-card .lineup-role-badge,
.general-card .level-badge {
  top: 9px;
  min-width: 0;
  border: 1px solid rgba(255, 221, 135, 0.82);
  color: #ffedb1;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 184, 0.15), 0 3px 7px rgba(17, 8, 4, 0.34);
}

.general-card .lineup-role-badge {
  left: 9px;
  width: 30px;
  height: 30px;
  display: grid;
  padding: 0;
  place-items: center;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(150deg, var(--camp-accent), var(--camp-accent-dark));
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
}

.general-card[data-index="1"] .lineup-role-badge,
.general-card[data-index="2"] .lineup-role-badge {
  border-color: rgba(255, 221, 135, 0.82);
  color: #ffedb1;
  background: linear-gradient(150deg, var(--camp-accent), var(--camp-accent-dark));
}

.general-card .level-badge {
  right: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(75, 42, 24, 0.92), rgba(40, 22, 14, 0.94));
  font-size: 10px;
}

.general-card .card-main {
  position: relative;
  z-index: 1;
  gap: 6px;
  padding: 7px 8px 9px;
  background:
    linear-gradient(180deg, rgba(255, 247, 219, 0.54), rgba(235, 206, 153, 0.32)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(94, 54, 31, 0.035) 28px, transparent 29px);
}

.general-card .name-row {
  position: relative;
  min-height: 31px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 27px;
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 10px;
  overflow: hidden;
  border: 1px solid rgba(70, 39, 23, 0.66);
  border-radius: 7px;
  background: linear-gradient(90deg, var(--camp-accent-dark), var(--camp-accent));
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.2), 0 2px 4px rgba(52, 27, 15, 0.16);
}

.general-card .name-row::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 226, 154, 0.16);
  border-radius: 5px;
  pointer-events: none;
}

.general-card .name-row .general-name {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #fff1c2;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(35, 16, 9, 0.72);
  white-space: nowrap;
}

.general-card .camp {
  position: relative;
  z-index: 1;
  min-width: 23px;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(255, 235, 177, 0.68);
  border-radius: 50%;
  color: var(--camp-accent-dark);
  background: linear-gradient(180deg, #ffe8a7, #cda85e);
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(42, 21, 11, 0.28);
}

.general-card .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(99, 60, 34, 0.42);
  border-radius: 7px;
  background: rgba(255, 247, 220, 0.76);
  box-shadow: inset 0 1px 3px rgba(78, 45, 25, 0.1);
}

.general-card .stats > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 3px 1px;
  border-right: 1px solid rgba(111, 70, 41, 0.18);
  color: #523b29;
  line-height: 1;
}

.general-card .stats > span:last-child { border-right: 0; }

.general-card .stats em {
  color: #8c7156;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.general-card .stats strong {
  color: #513021;
  font-size: 12px;
  font-weight: 900;
}

.general-card .stats > span[data-stat="force"] strong { color: #a3342a; }
.general-card .stats > span[data-stat="intel"] strong { color: #405e80; }
.general-card .stats > span[data-stat="command"] strong { color: #7b572c; }
.general-card .stats > span[data-stat="speed"] strong { color: #3f6d64; }
.general-card .stats > span.is-boosted strong {
  color: #b12620;
  text-shadow: 0 1px 0 #fff1be;
}

.general-card .attribute-trigger {
  min-height: 34px;
  background:
    linear-gradient(90deg, rgba(153, 45, 34, 0.09), transparent 24%),
    linear-gradient(180deg, rgba(255, 246, 219, 0.9), rgba(226, 197, 146, 0.84));
}

.general-card .grade-tabs {
  min-height: 32px;
  background: rgba(91, 65, 42, 0.19);
}

.general-card .book-trigger {
  min-height: 43px;
  background:
    repeating-linear-gradient(90deg, rgba(71, 91, 61, 0.04) 0 1px, transparent 1px 15px),
    linear-gradient(180deg, rgba(247, 242, 217, 0.92), rgba(205, 206, 164, 0.88));
}

.general-card .skill-trigger {
  min-height: 40px;
  background:
    linear-gradient(90deg, rgba(143, 47, 34, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 247, 231, 0.92), rgba(228, 200, 151, 0.88));
}

.general-card .equipment-trigger {
  min-height: 25px;
  padding: 0 1px;
}

@media (max-width: 430px) {
  .general-card .card-main { padding-inline: 6px; }
  .general-card .name-row .general-name { font-size: 14px; }
  .general-card .stats { gap: 1px; padding-inline: 2px; }
  .general-card .stats strong { font-size: 11px; }
  .general-card .red-stars { font-size: 15px; }
}

/* 武将卡深色控件方案：玄铁属性、墨绿兵书、赤铜战法。 */
.general-card .stats {
  border-color: rgba(190, 146, 82, 0.62);
  background:
    repeating-linear-gradient(135deg, rgba(255, 226, 159, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(67, 47, 34, 0.96), rgba(35, 27, 22, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(255, 224, 154, 0.11),
    inset 0 7px 12px rgba(255, 210, 122, 0.035),
    0 2px 5px rgba(45, 23, 13, 0.22);
}

.general-card .stats > span {
  border-right-color: rgba(239, 200, 128, 0.16);
}

.general-card .stats em { color: #c7aa79; }
.general-card .stats strong { color: #f3deb0; }
.general-card .stats > span[data-stat="force"] strong { color: #f08b72; }
.general-card .stats > span[data-stat="intel"] strong { color: #9fc4e8; }
.general-card .stats > span[data-stat="command"] strong { color: #e4be76; }
.general-card .stats > span[data-stat="speed"] strong { color: #9bcdb8; }
.general-card .stats > span.is-boosted strong {
  color: #ff9b7f;
  text-shadow: 0 1px 2px rgba(42, 12, 8, 0.72);
}

.general-card .attribute-trigger {
  border-color: rgba(211, 151, 75, 0.72);
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 205, 113, 0.12), transparent 34%),
    repeating-linear-gradient(125deg, rgba(255, 224, 154, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #7f3028 0%, #4f211d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 224, 144, 0.12),
    inset 0 -4px 0 rgba(33, 12, 10, 0.18),
    0 2px 5px rgba(57, 23, 16, 0.25);
}

.general-card .attribute-trigger::before {
  border-color: rgba(255, 216, 126, 0.66);
  color: #7b281f;
  background: linear-gradient(180deg, #f2cf7b, #b78035);
  text-shadow: 0 1px 0 rgba(255, 241, 188, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 196, 0.28), 0 1px 3px rgba(34, 12, 8, 0.36);
}

.general-card .red-stars {
  color: #ffd578;
  text-shadow: 0 1px 0 #5e1b16, 0 0 5px rgba(255, 193, 90, 0.22);
}

.general-card .book-trigger {
  border-color: rgba(186, 159, 91, 0.68);
  background:
    repeating-linear-gradient(90deg, rgba(245, 220, 143, 0.055) 0 1px, transparent 1px 15px),
    radial-gradient(circle at 88% 22%, rgba(201, 214, 145, 0.13), transparent 34%),
    linear-gradient(180deg, #526b53 0%, #2e4538 100%);
  box-shadow:
    inset 0 0 0 1px rgba(242, 224, 159, 0.12),
    inset 0 -4px 0 rgba(18, 35, 27, 0.16),
    0 2px 5px rgba(28, 43, 31, 0.22);
}

.general-card .book-trigger::before {
  border-color: rgba(238, 207, 126, 0.68);
  color: #34483a;
  background: linear-gradient(180deg, #e4c978, #aa8a3e);
  text-shadow: 0 1px 0 rgba(255, 239, 176, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 242, 186, 0.24), 0 1px 3px rgba(17, 32, 24, 0.34);
}

.general-card .book-trigger::after { color: rgba(255, 223, 144, 0.8); }

.general-card .book-selected {
  color: #fff0bf;
  text-shadow: 0 1px 1px rgba(19, 34, 25, 0.72);
}

.general-card .skill-trigger {
  border-color: rgba(205, 145, 78, 0.7);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 194, 103, 0.12), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 219, 147, 0.04) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, #8a3d30 0%, #56251f 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 145, 0.12),
    inset 0 -4px 0 rgba(43, 13, 11, 0.17),
    0 2px 5px rgba(56, 23, 16, 0.23);
}

.general-card .skill-trigger::before {
  border-color: rgba(255, 217, 129, 0.68);
  color: #73251d;
  background: linear-gradient(180deg, #edcb76, #b17d35);
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.64);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 193, 0.24), 0 1px 3px rgba(40, 12, 9, 0.36);
}

.general-card .skill-trigger::after { color: rgba(255, 223, 145, 0.8); }

.general-card .skill-selected {
  color: #fff0c2;
  text-shadow: 0 1px 1px rgba(48, 15, 11, 0.76);
}

.general-card .skill-trigger[data-selected-skill=""] {
  border-color: rgba(125, 106, 80, 0.52);
  background: linear-gradient(180deg, #696159, #433e39);
}

.general-card .skill-trigger.is-invalid {
  border-color: rgba(255, 174, 112, 0.82);
  background: linear-gradient(180deg, #8f4a3c, #5b2923);
}

/* 武将卡收色方案：大面积使用中性军籍纸，功能色只保留在徽记。 */
.general-card .stats {
  border-color: rgba(119, 79, 43, 0.62);
  background:
    repeating-linear-gradient(135deg, rgba(255, 229, 164, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #4b3729 0%, #2f251e 100%);
}

.general-card .stats em { color: #cbb083; }
.general-card .stats strong,
.general-card .stats > span[data-stat] strong {
  color: #f0d8a4;
  text-shadow: 0 1px 1px rgba(31, 18, 11, 0.64);
}

.general-card .stats > span.is-boosted strong {
  color: #f1b876;
  text-shadow: 0 1px 1px rgba(42, 20, 11, 0.66);
}

.general-card .attribute-trigger,
.general-card .book-trigger,
.general-card .skill-trigger {
  border-color: rgba(125, 83, 42, 0.58);
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 255, 239, 0.52), transparent 34%),
    repeating-linear-gradient(135deg, rgba(105, 64, 33, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(255, 245, 218, 0.96), rgba(222, 194, 144, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 231, 0.62),
    inset 0 -3px 0 rgba(86, 48, 26, 0.07),
    0 2px 4px rgba(55, 29, 16, 0.15);
}

.general-card .attribute-trigger::before {
  border-color: #74271f;
  color: #ffe3a2;
  background: linear-gradient(150deg, #ad4033, #72241e);
  text-shadow: 0 1px 0 #4d1712;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 146, 0.18);
}

.general-card .red-stars {
  color: #a93229;
  text-shadow: 0 1px 0 #fff0bd, 0 1px 2px rgba(83, 27, 19, 0.16);
}

.general-card .book-trigger::before {
  border-color: #415a46;
  color: #f3e5ae;
  background: linear-gradient(160deg, #6d8063, #40574a);
  text-shadow: 0 1px 0 #29382f;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 174, 0.14);
}

.general-card .book-selected {
  color: #433527;
  text-shadow: 0 1px 0 rgba(255, 250, 226, 0.72);
}

.general-card .book-trigger::after { color: rgba(73, 82, 56, 0.66); }

.general-card .skill-trigger::before {
  border-color: #762a21;
  color: #ffe3a4;
  background: linear-gradient(160deg, #ad4637, #742820);
  text-shadow: 0 1px 0 #4e1712;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 151, 0.16);
}

.general-card .skill-selected {
  color: #493227;
  text-shadow: 0 1px 0 rgba(255, 250, 228, 0.72);
}

.general-card .skill-trigger::after { color: rgba(117, 55, 36, 0.58); }

.general-card .skill-trigger[data-selected-skill=""] {
  border-color: rgba(124, 91, 58, 0.46);
  background: linear-gradient(180deg, #eee5d2, #d1c1a3);
}

.general-card .skill-trigger.is-invalid {
  border-color: rgba(158, 73, 53, 0.7);
  background: linear-gradient(180deg, #f1d7c6, #d8ae96);
}

.general-card .grade-tabs button[data-grade].is-selected {
  border-color: #6c4a25;
  color: #fff0bd;
  background: linear-gradient(180deg, #9d783f, #68491f);
  text-shadow: 0 1px 0 rgba(53, 29, 12, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 234, 169, 0.22), 0 2px 4px rgba(55, 31, 17, 0.18);
}

.general-card .equipment-trait-tag,
.general-card .equipment-trait-tag[data-part],
.general-card .equipment-trait-tag.equipment-trait-empty {
  border-color: rgba(111, 79, 48, 0.62);
  color: #f7e7bd;
  background:
    linear-gradient(135deg, rgba(255, 239, 193, 0.1), transparent 36%),
    linear-gradient(180deg, #756a58, #4b443a);
  text-shadow: 0 1px 1px rgba(32, 23, 17, 0.62);
}

/* 兵种适性改为沉稳青灰；卡片红度星级使用五等分网格。 */
.general-card .grade-tabs button[data-grade].is-selected {
  border-color: #39535a;
  color: #fff0bd;
  background: linear-gradient(180deg, #66838a, #3c555b);
  text-shadow: 0 1px 0 rgba(24, 40, 43, 0.78);
  box-shadow: inset 0 0 0 1px rgba(224, 239, 220, 0.18), 0 2px 4px rgba(37, 52, 50, 0.2);
}

.general-card .attribute-trigger {
  justify-content: stretch;
}

.general-card .red-stars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 0;
  letter-spacing: 0;
  text-align: center;
}

.general-card .red-stars > i {
  display: block;
  width: 100%;
  color: #a93229;
  font-style: normal;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 #fff0bd, 0 1px 2px rgba(83, 27, 19, 0.16);
}

.general-card .red-stars > i:not(.is-filled) {
  color: rgba(121, 82, 52, 0.52);
  text-shadow: 0 1px 0 rgba(255, 246, 219, 0.72);
}

/* 兵种军印使用购买会员按钮同款金黄；属性栏使用明亮的军籍玉简。 */
.general-card .grade-tabs button[data-grade].is-selected {
  border-color: #4b2718;
  color: #fff4ca;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 237, 167, 0.18) 0 3px, transparent 4px),
    linear-gradient(180deg, #e1a63c 0%, #c68627 52%, #aa6c1d 100%);
  text-shadow: 0 1px 0 #5b2d0d;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 215, 0.28),
    inset 0 0 0 1px rgba(255, 224, 134, 0.12),
    0 2px 4px rgba(65, 34, 18, 0.22);
}

.general-card .stats {
  gap: 2px;
  padding: 3px;
  border-color: rgba(139, 96, 43, 0.7);
  background:
    repeating-linear-gradient(135deg, rgba(112, 70, 31, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #ecd8ad 0%, #cfae73 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 249, 219, 0.7),
    inset 0 -3px 0 rgba(108, 64, 27, 0.08),
    0 2px 4px rgba(60, 34, 16, 0.14);
}

.general-card .stats > span {
  gap: 3px;
  padding: 4px 1px 3px;
  border: 0;
  border-right: 1px solid rgba(111, 72, 34, 0.24);
  background: linear-gradient(180deg, rgba(255, 249, 224, 0.48), rgba(255, 239, 198, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 253, 234, 0.48);
}

.general-card .stats > span:last-child {
  border-right: 0;
}

.general-card .stats em {
  color: #705338;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 246, 213, 0.9);
}

.general-card .stats strong,
.general-card .stats > span[data-stat] strong {
  color: #3f2b1c;
  font-size: 12px;
  text-shadow: 0 1px 0 rgba(255, 244, 202, 0.82);
}

.general-card .stats > span.is-boosted strong {
  color: #9d3027;
  text-shadow: 0 1px 0 rgba(255, 238, 190, 0.88);
}

/* 已选特技恢复按装备部位区分；仅空特技保持中性灰色。 */
.general-card .equipment-trait-tag[data-part="weapon"] {
  border-color: rgba(105, 38, 29, 0.72);
  color: #fff0c8;
  background:
    linear-gradient(135deg, rgba(255, 235, 195, 0.17), transparent 36%),
    linear-gradient(180deg, #a84735, #6d251f);
}

.general-card .equipment-trait-tag[data-part="armor"] {
  border-color: rgba(91, 58, 28, 0.72);
  color: #fff0c8;
  background:
    linear-gradient(135deg, rgba(255, 236, 181, 0.16), transparent 36%),
    linear-gradient(180deg, #8e6739, #5a3b22);
}

.general-card .equipment-trait-tag[data-part="mount"] {
  border-color: rgba(42, 73, 60, 0.76);
  color: #eef2d5;
  background:
    linear-gradient(135deg, rgba(231, 247, 213, 0.14), transparent 36%),
    linear-gradient(180deg, #567868, #304e43);
}

.general-card .equipment-trait-tag[data-part="treasure"] {
  border-color: rgba(75, 50, 86, 0.76);
  color: #f5e9c8;
  background:
    linear-gradient(135deg, rgba(255, 229, 183, 0.15), transparent 36%),
    linear-gradient(180deg, #766083, #4d3958);
}

.general-card .equipment-trait-tag.equipment-trait-empty {
  border-color: rgba(91, 82, 69, 0.68);
  color: #f4efe5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(180deg, #8b8a84, #5f605d);
}

/* 攻城考勤：助攻统计与攻城军令主题。 */
.siege-attendance-entry {
  background-image: url("./assets/strategist-siege-entry-chibi-v1.png?v=20260823");
  background-image: image-set(
    url("./assets/strategist-siege-entry-chibi-v1.png?v=20260823") 1x,
    url("./assets/strategist-siege-entry-chibi-v1@2x.png?v=20260823") 2x
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-color: rgba(133, 78, 35, 0.5);
}

.siege-attendance-entry::before {
  background: linear-gradient(
    90deg,
    rgba(255, 246, 218, 0.78) 0%,
    rgba(249, 224, 174, 0.62) 38%,
    rgba(239, 192, 121, 0.24) 58%,
    rgba(128, 51, 24, 0.04) 76%,
    transparent 84%
  ) !important;
  opacity: 1 !important;
}

.siege-attendance-entry .strategist-action-mark {
  border-color: rgba(255, 213, 127, 0.82);
  color: #ffe9b3;
  background: radial-gradient(circle at 36% 30%, #b65b34, #5a261b 70%);
}

.strategist-action.siege-attendance-entry strong {
  color: #552116;
  text-shadow: 0 1px 0 rgba(255, 247, 218, 0.94), 0 2px 4px rgba(94, 48, 22, 0.28);
}

.picker.siege-attendance-dialog {
  border-color: rgba(92, 46, 25, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 239, 205, 0.44), rgba(219, 167, 102, 0.5)),
    url("./assets/battle-attendance-bg-rollcall-v1.png?v=20260822") center top / 100% 100% no-repeat,
    #d8aa6b;
  box-shadow:
    0 20px 46px rgba(44, 18, 10, 0.5),
    inset 0 0 0 2px rgba(255, 225, 167, 0.54),
    inset 0 0 34px rgba(87, 38, 18, 0.2);
}

.picker.siege-attendance-dialog .attendance-head {
  border-color: rgba(125, 66, 34, 0.86);
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 187, 92, 0.18), transparent 34%),
    linear-gradient(135deg, #8b4328, #3e1c15);
}

.picker.siege-attendance-dialog .attendance-head > div::before {
  content: "攻";
  color: #542416;
  background: linear-gradient(180deg, #f6cd80, #bd7134);
}

.picker.siege-attendance-dialog .attendance-head .tool-btn {
  color: #542416;
  background: linear-gradient(180deg, #f6cd80, #bd7134);
}

.picker.siege-attendance-dialog .siege-rule-row {
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.picker.siege-attendance-dialog #siegeThreshold {
  appearance: textfield;
  -moz-appearance: textfield;
}

.picker.siege-attendance-dialog #siegeThreshold::-webkit-inner-spin-button,
.picker.siege-attendance-dialog #siegeThreshold::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.picker.siege-attendance-dialog .siege-action-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 1fr);
  gap: 7px;
  width: 100%;
  margin: 0;
}

.picker.siege-attendance-dialog .attendance-compare-btn {
  border-color: #6b2d20;
  background:
    radial-gradient(circle at 82% 50%, rgba(255, 202, 107, 0.17), transparent 36%),
    linear-gradient(135deg, #a3492e, #68271f);
}

.picker.siege-attendance-dialog .attendance-compare-btn::before {
  border-color: rgba(100, 39, 28, 0.9);
  background: rgba(130, 50, 31, 0.45);
}

.picker.siege-attendance-dialog .attendance-share-btn {
  border-color: #6c2d20;
  color: #fff1c9;
  background: linear-gradient(180deg, #a94a31 0%, #873523 52%, #68271e 100%);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 1px rgba(44, 12, 7, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, 0.26), 0 3px 5px rgba(65, 29, 17, 0.24);
  -webkit-font-smoothing: antialiased;
}

.picker.siege-attendance-dialog .attendance-share-btn::before {
  border-color: rgba(255, 220, 150, 0.58);
  color: #ffe6ad;
  background: rgba(89, 29, 20, 0.72);
  text-shadow: none;
}

.picker.siege-attendance-dialog .attendance-share-btn:disabled {
  border-color: rgba(118, 83, 55, 0.64);
  color: #7c6249;
  background: linear-gradient(180deg, #e8d9b9, #cdbb99);
  filter: none;
  opacity: 0.84;
  text-shadow: 0 1px 0 rgba(255, 250, 232, 0.92);
}

.picker.siege-attendance-dialog .attendance-share-btn:disabled::before {
  border-color: rgba(112, 82, 56, 0.48);
  color: #87684b;
  background: rgba(213, 194, 158, 0.9);
}

.picker.siege-attendance-dialog .attendance-stat {
  border-color: rgba(128, 70, 34, 0.3);
  background: rgba(255, 242, 214, 0.88);
}

.picker.siege-attendance-dialog .attendance-section-head h4 {
  color: #6c2b1b;
}

.siege-assist-leader {
  position: relative;
  isolation: isolate;
  min-height: 94px !important;
  grid-template-columns: 50px minmax(0, 1fr) auto !important;
  overflow: hidden;
  border-color: rgba(115, 57, 29, 0.72) !important;
  background:
    linear-gradient(90deg, rgba(48, 19, 13, 0.34), rgba(49, 19, 12, 0.02) 31%, rgba(49, 19, 12, 0.02) 70%, rgba(49, 19, 12, 0.28)),
    image-set(
      url("./assets/siege-assist-leader-battle-v2.png?v=20260823") 1x,
      url("./assets/siege-assist-leader-battle-v2@2x.png?v=20260823") 2x
    ) center / cover no-repeat !important;
  box-shadow: inset 0 0 14px rgba(67, 25, 13, 0.3), 0 5px 13px rgba(68, 27, 12, 0.22) !important;
}

.siege-assist-leader .siege-assist-mark {
  color: #ffe8a8 !important;
  background: radial-gradient(circle at 38% 28%, #bb6035, #64251b 68%) !important;
}

.siege-assist-leader .attendance-merit-copy {
  position: relative;
  z-index: 1;
  max-width: none;
  padding-left: 0;
}

.siege-assist-leader .attendance-merit-copy strong {
  color: #fff1c7 !important;
  font-size: 18px !important;
  text-shadow: 0 2px 4px rgba(24, 7, 4, 0.98);
}

.siege-assist-leader .attendance-merit-copy em {
  color: #f0c78c !important;
  text-shadow: 0 1px 3px rgba(24, 7, 4, 0.98);
}

.siege-assist-leader > b {
  position: relative;
  z-index: 1;
  padding: 7px 10px !important;
  border-color: rgba(247, 195, 107, 0.66) !important;
  color: #ffe2a0 !important;
  background: rgba(80, 29, 17, 0.82) !important;
  text-shadow: 0 2px 3px rgba(25, 6, 3, 0.98) !important;
}

.siege-clan-card > header strong {
  padding: 3px 9px;
  border: 1px solid rgba(222, 177, 83, 0.72);
  border-radius: 999px;
  color: #fff0bd;
  background: linear-gradient(180deg, #82432c, #52271f);
  font-size: 14px;
}

.siege-clan-card > footer {
  align-items: center;
  margin-top: 7px;
  padding: 6px 8px;
  border: 1px dashed rgba(112, 70, 34, 0.28);
  border-radius: 7px;
  color: #74573a;
  background: rgba(247, 234, 198, 0.54);
}

.picker.siege-attendance-dialog .attendance-name-chips span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border-color: rgba(142, 61, 40, 0.3);
  color: #64291f;
  background: linear-gradient(180deg, rgba(255, 241, 204, 0.96), rgba(232, 199, 130, 0.88));
}

.picker.siege-attendance-dialog .attendance-name-chips span em {
  color: #9d372b;
  font-size: 10px;
  font-style: normal;
}

.picker.siege-share-dialog .attendance-share-head {
  background: linear-gradient(135deg, #8b4328, #3e1c15);
}

.picker.siege-share-dialog .attendance-share-head .tool-btn {
  border-color: rgba(255, 224, 153, 0.42);
  color: #572417;
  background: linear-gradient(180deg, #f6cd80, #bd7134);
}

.picker.siege-share-dialog .attendance-share-actions .primary {
  background: linear-gradient(180deg, #b95b35, #762b21);
}

@media (max-width: 440px) {
  .picker.siege-attendance-dialog .siege-rule-row {
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .picker.siege-attendance-dialog .siege-action-buttons {
    grid-template-columns: minmax(0, 1fr) 68px;
  }

  .siege-assist-leader {
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    min-height: 88px !important;
  }
}

/* 禁地考勤：焦土巡查主题。 */
.forbidden-entry {
  background-image: url("./assets/strategist-forbidden-entry-chibi-v5.png?v=20260823");
  background-image: image-set(
    url("./assets/strategist-forbidden-entry-chibi-v5.png?v=20260823") 1x,
    url("./assets/strategist-forbidden-entry-chibi-v5@2x.png?v=20260823") 2x
  );
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-color: rgba(143, 92, 40, 0.45);
}

.forbidden-entry .strategist-action-mark {
  border-color: rgba(244, 190, 115, 0.8);
  color: #ffe2ad;
  background: radial-gradient(circle, rgba(154, 82, 36, 0.98), rgba(66, 31, 19, 0.98));
}

/* 军师联盟入口使用卡片级局部蒙层，保留右侧画面并保证左侧标题清晰。 */
.strategist-action.attendance-entry::before,
.strategist-action.forbidden-entry::before,
.strategist-action.hall-of-fame-entry::before {
  background: linear-gradient(
    90deg,
    rgba(255, 246, 218, 0.72) 0%,
    rgba(250, 229, 184, 0.58) 38%,
    rgba(244, 213, 157, 0.26) 57%,
    rgba(242, 204, 139, 0.06) 72%,
    rgba(242, 204, 139, 0) 82%
  );
  opacity: 1;
}

.strategist-action.draw-record-entry::before {
  background: linear-gradient(
    90deg,
    rgba(255, 246, 218, 0.72) 0%,
    rgba(250, 229, 184, 0.58) 38%,
    rgba(244, 213, 157, 0.26) 57%,
    rgba(242, 204, 139, 0.06) 72%,
    rgba(242, 204, 139, 0) 82%
  );
  opacity: 1;
}

.strategist-action.attendance-entry strong,
.strategist-action.forbidden-entry strong,
.strategist-action.hall-of-fame-entry strong {
  color: #5d2719;
  text-shadow: 0 1px 0 rgba(255, 247, 218, 0.92), 0 2px 4px rgba(109, 65, 27, 0.2);
}

.strategist-action.attendance-entry em,
.strategist-action.forbidden-entry em,
.strategist-action.hall-of-fame-entry em {
  color: #765038;
  text-shadow: 0 1px 0 rgba(255, 248, 224, 0.86);
}

/* 军师联盟入口保持简洁，只展示徽记与功能标题。 */
.strategist-workbench .strategist-action em {
  display: none;
}

.strategist-workbench .strategist-action {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 11px;
}

.strategist-workbench .strategist-action-mark {
  width: 52px;
  height: 52px;
  font-size: 30px;
  border-width: 2px;
  box-shadow:
    0 3px 9px rgba(69, 31, 18, 0.3),
    0 0 0 3px rgba(255, 239, 190, 0.2),
    inset 0 0 0 3px rgba(255, 239, 190, 0.12);
}

.strategist-workbench .strategist-action > span:not(.strategist-action-mark) {
  min-width: 0;
  justify-self: start;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.strategist-workbench .strategist-action strong {
  color: #4b1d12;
  font-family: "SgzInkTitle", "KaiTi", "STKaiti", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.07em;
  -webkit-text-stroke: 0.25px rgba(69, 24, 12, 0.68);
  text-shadow:
    -1px 0 rgba(255, 247, 215, 0.9),
    1px 0 rgba(255, 247, 215, 0.9),
    0 -1px rgba(255, 247, 215, 0.9),
    0 1px rgba(255, 247, 215, 0.9),
    0 2px 3px rgba(68, 28, 15, 0.42),
    0 0 8px rgba(255, 235, 183, 0.34);
}

.picker.forbidden-attendance-dialog {
  border-color: rgba(88, 43, 24, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 236, 198, 0.28), rgba(204, 139, 77, 0.4)),
    url("./assets/battle-attendance-bg-rollcall-v1.png?v=20260822") center top / 100% 100% no-repeat,
    #d5a365;
  box-shadow:
    0 20px 46px rgba(42, 17, 9, 0.5),
    inset 0 0 0 2px rgba(255, 224, 167, 0.52),
    inset 0 0 34px rgba(83, 34, 17, 0.2);
}

.picker.forbidden-attendance-dialog .attendance-head {
  border-color: rgba(112, 56, 30, 0.86);
  background:
    radial-gradient(circle at 82% 52%, rgba(255, 190, 105, 0.16), transparent 34%),
    linear-gradient(135deg, #783b24, #321a13);
}

.picker.forbidden-attendance-dialog .attendance-head > div::before {
  content: "禁";
  color: #5a2818;
  background: linear-gradient(180deg, #f4c77f, #b66b2e);
}

.picker.forbidden-attendance-dialog .attendance-head .tool-btn {
  color: #5a2818;
  background: linear-gradient(180deg, #f4c77f, #b66b2e);
}

.picker.forbidden-attendance-dialog .attendance-file-card:nth-child(2) {
  border-color: rgba(137, 72, 37, 0.52);
  background:
    radial-gradient(circle at 88% 24%, rgba(181, 94, 45, 0.16), transparent 32%),
    linear-gradient(90deg, rgba(255, 244, 216, 0.96), rgba(226, 181, 119, 0.88));
}

.picker.forbidden-attendance-dialog .attendance-file-card:nth-child(2) .attendance-file-mark {
  color: #ffefce;
  background: linear-gradient(180deg, #bd7136, #793a21);
}

.picker.forbidden-attendance-dialog .forbidden-rule-row {
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.picker.forbidden-attendance-dialog #forbiddenThreshold {
  appearance: textfield;
  -moz-appearance: textfield;
}

.picker.forbidden-attendance-dialog #forbiddenThreshold::-webkit-inner-spin-button,
.picker.forbidden-attendance-dialog #forbiddenThreshold::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.picker.forbidden-attendance-dialog .forbidden-action-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 1fr);
  gap: 7px;
  width: 100%;
  margin: 0;
}

.picker.forbidden-attendance-dialog .attendance-compare-btn {
  background:
    radial-gradient(circle at 82% 50%, rgba(190, 231, 196, 0.17), transparent 36%),
    linear-gradient(135deg, #477a68, #244b42);
  border-color: #264d43;
}

.picker.forbidden-attendance-dialog .attendance-compare-btn::before {
  border-color: rgba(31, 77, 64, 0.88);
  background: rgba(25, 91, 72, 0.48);
}

.picker.forbidden-attendance-dialog .attendance-share-btn {
  border-color: rgba(112, 55, 28, 0.84);
  color: #ffedcb;
  background: linear-gradient(180deg, #c17a38, #82401f);
}

.picker.forbidden-attendance-dialog .forbidden-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.picker.forbidden-attendance-dialog .forbidden-overview .attendance-stat:nth-child(2) strong {
  color: #98382a;
}

.picker.forbidden-attendance-dialog .attendance-stat {
  border-color: rgba(116, 57, 30, 0.3);
  background: rgba(255, 240, 208, 0.84);
}

.picker.forbidden-attendance-dialog .attendance-section-head h4 {
  color: #6b2c1b;
}

.forbidden-power-leader {
  position: relative;
  isolation: isolate;
  min-height: 92px !important;
  grid-template-columns: 50px minmax(0, 1fr) auto !important;
  overflow: hidden;
  border-color: rgba(111, 54, 28, 0.7) !important;
  background:
    linear-gradient(90deg, rgba(85, 39, 19, 0.68), rgba(85, 39, 19, 0.08) 38%, rgba(85, 39, 19, 0.03) 61%, rgba(85, 39, 19, 0.66)),
    url("./assets/forbidden-land-slave-bg-v3.png?v=20260822") center 48% / cover no-repeat !important;
  box-shadow: inset 0 0 12px rgba(75, 32, 15, 0.24), 0 5px 13px rgba(68, 27, 12, 0.2) !important;
}

.forbidden-power-leader .attendance-merit-copy {
  position: relative;
  z-index: 1;
  max-width: none;
  padding-left: 0;
}

.forbidden-power-leader .forbidden-land-mark {
  color: #ffeab4 !important;
  background: radial-gradient(circle at 38% 28%, #bc6438, #63261b 68%) !important;
}

.forbidden-power-leader .attendance-merit-copy strong {
  color: #fff0c6 !important;
  font-size: 18px !important;
  text-shadow: 0 2px 4px rgba(24, 7, 4, 0.96);
}

.forbidden-power-leader .attendance-merit-copy em {
  color: #ecc28c !important;
  text-shadow: 0 1px 3px rgba(24, 7, 4, 0.96);
}

.forbidden-power-leader > b {
  position: relative;
  z-index: 1;
  padding: 7px 9px !important;
  border-color: rgba(248, 196, 112, 0.62) !important;
  color: #ffe4a6 !important;
  background: rgba(74, 27, 15, 0.78) !important;
  text-shadow: 0 2px 3px rgba(25, 6, 3, 0.96) !important;
}

.forbidden-clan-card > header strong {
  padding: 3px 9px;
  border: 1px solid rgba(221, 184, 90, 0.7);
  border-radius: 999px;
  color: #fff0bd;
  background: linear-gradient(180deg, #6e642e, #3d371d);
  font-size: 14px;
}

.forbidden-clan-card > header span {
  color: #8e3528;
  font-weight: 900;
}

.forbidden-clan-card > footer {
  align-items: center;
  margin-top: 7px;
  padding: 6px 8px;
  border: 1px dashed rgba(112, 80, 36, 0.26);
  border-radius: 7px;
  color: #745b3b;
  background: rgba(246, 236, 199, 0.48);
}

.forbidden-clan-card > footer b {
  color: #96372a;
}

.picker.forbidden-attendance-dialog .attendance-name-chips span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border-color: rgba(139, 57, 39, 0.3);
  color: #64291f;
  background: linear-gradient(180deg, rgba(255, 239, 197, 0.96), rgba(229, 196, 125, 0.86));
}

.picker.forbidden-attendance-dialog .attendance-name-chips span em {
  color: #9d372b;
  font-size: 10px;
  font-style: normal;
}

.forbidden-audit-note {
  margin: 0;
  padding: 7px 9px;
  border: 1px dashed rgba(93, 102, 49, 0.34);
  border-radius: 8px;
  color: #657046;
  background: rgba(239, 241, 205, 0.62);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.forbidden-audit-note {
  border-color: rgba(117, 77, 36, 0.28);
  color: #80664a;
  background: rgba(255, 248, 224, 0.6);
}

.forbidden-all-clear {
  min-height: 104px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 10px;
  padding: 12px 16px;
  border: 1px solid rgba(91, 108, 53, 0.46);
  border-radius: 10px;
  color: #526133;
  background: linear-gradient(180deg, rgba(247, 248, 218, 0.94), rgba(222, 226, 177, 0.88));
}

.forbidden-all-clear > span {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f5edc1;
  background: linear-gradient(180deg, #768454, #4a5c36);
  font: 900 22px "KaiTi", serif;
}

.forbidden-all-clear strong {
  font-size: 14px;
}

.forbidden-all-clear small {
  color: #7d7659;
  font-size: 10px;
}

.picker.forbidden-share-dialog .attendance-share-head {
  background: linear-gradient(135deg, #783b24, #321a13);
}

.picker.forbidden-share-dialog .attendance-share-head .tool-btn {
  border-color: rgba(255, 224, 153, 0.42);
  color: #5a2818;
  background: linear-gradient(180deg, #f4c77f, #b66b2e);
}

.picker.forbidden-share-dialog .attendance-share-actions .primary {
  background: linear-gradient(180deg, #c17a38, #82401f);
}

@media (max-width: 440px) {
  .picker.forbidden-attendance-dialog .forbidden-rule-row {
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .picker.forbidden-attendance-dialog .forbidden-action-buttons {
    grid-template-columns: minmax(0, 1fr) 68px;
  }

  .forbidden-power-leader {
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    min-height: 88px !important;
  }

  .picker.forbidden-attendance-dialog .forbidden-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 军师联盟入口：去掉圆形徽记，以短题签突出标题并释放背景画面。 */
.strategist-workbench .strategist-action {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.strategist-workbench .strategist-action::before {
  background: linear-gradient(
    90deg,
    rgba(255, 249, 227, 0.94) 0%,
    rgba(255, 241, 205, 0.86) 34%,
    rgba(247, 218, 166, 0.58) 52%,
    rgba(245, 216, 170, 0.3) 70%,
    rgba(255, 239, 207, 0.22) 84%,
    rgba(255, 244, 219, 0.2) 100%
  ) !important;
  opacity: 1 !important;
}

.strategist-workbench .strategist-action strong,
.strategist-action.attendance-entry strong,
.strategist-action.forbidden-entry strong,
.strategist-action.siege-attendance-entry strong,
.strategist-action.hall-of-fame-entry strong,
.strategist-action.draw-record-entry strong {
  color: #42170e;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.035em;
  -webkit-text-stroke: 0;
  text-shadow:
    0 1px 0 rgba(255, 251, 231, 0.98),
    0 2px 2px rgba(65, 24, 12, 0.3);
}

.strategist-workbench .strategist-action > span:not(.strategist-action-mark) {
  width: fit-content;
  max-width: 100%;
  padding: 8px 13px 8px 11px;
  border: 1px solid rgba(103, 43, 25, 0.58);
  border-left: 3px solid rgba(214, 159, 71, 0.9);
  border-radius: 5px 13px 13px 5px;
  background: linear-gradient(90deg, rgba(79, 25, 18, 0.94), rgba(112, 43, 27, 0.86) 72%, rgba(125, 56, 30, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 155, 0.24),
    0 2px 5px rgba(60, 24, 13, 0.25);
}

.strategist-workbench .strategist-action strong,
.strategist-action.attendance-entry strong,
.strategist-action.forbidden-entry strong,
.strategist-action.siege-attendance-entry strong,
.strategist-action.hall-of-fame-entry strong,
.strategist-action.draw-record-entry strong {
  color: #fff0bf;
  font-size: 32px;
  text-shadow: 0 1px 0 rgba(70, 20, 13, 0.95), 0 2px 2px rgba(36, 10, 7, 0.66);
}

@media (max-width: 620px) {
  .strategist-workbench .strategist-action {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .strategist-workbench .strategist-action > span:not(.strategist-action-mark) {
    padding: 7px 9px 7px 8px;
  }

  .strategist-workbench .strategist-action strong,
  .strategist-action.attendance-entry strong,
  .strategist-action.forbidden-entry strong,
  .strategist-action.siege-attendance-entry strong,
  .strategist-action.hall-of-fame-entry strong,
  .strategist-action.draw-record-entry strong {
    font-size: 26px;
    letter-spacing: 0.02em;
  }
}

/* 顶部视觉覆盖：三大功能页采用墨金标题与高对比宣纸说明条。 */
.feature-screen .feature-hero {
  --hero-accent: #8b3a28;
  --hero-title-start: #26140e;
  --hero-title-end: #7a2d1d;
  gap: 10px;
}

.ai-screen .feature-hero {
  --hero-accent: #7c3028;
  --hero-title-start: #2b1713;
  --hero-title-end: #8a3527;
}

.strategist-screen .feature-hero {
  --hero-accent: #7c3028;
  --hero-title-start: #2b1713;
  --hero-title-end: #8a3527;
}

.profile-screen .feature-hero {
  --hero-accent: #7c3028;
  --hero-title-start: #2b1713;
  --hero-title-end: #8a3527;
}

.feature-screen .feature-hero h1 {
  padding: 0 24px 12px 2px;
  color: var(--hero-title-start);
  font-family: "SgzInkTitle", "FZKai-Z03", "KaiTi", "STKaiti", serif;
  font-size: clamp(42px, 9.8vw, 68px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.025em;
  background: linear-gradient(180deg, var(--hero-title-start) 5%, var(--hero-title-end) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.35px rgba(255, 222, 150, 0.34);
  filter: drop-shadow(0 1px 0 rgba(255, 244, 210, 0.6));
  transform: skewX(-2deg) scaleY(1.04);
}

.feature-screen .feature-hero .hero-title-latin {
  color: var(--hero-title-start);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82em;
  font-weight: 900;
  background: linear-gradient(180deg, var(--hero-title-start), var(--hero-title-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-screen .feature-hero h1::before {
  left: -2px;
  right: 0;
  bottom: 1px;
  height: 8px;
  background: linear-gradient(90deg, var(--hero-accent), rgba(171, 112, 45, 0.56) 58%, transparent 100%);
  opacity: 0.82;
}

.feature-screen .feature-hero h1::after {
  right: -4px;
  top: 5px;
  width: 11px;
  height: 11px;
  background: var(--hero-accent);
  box-shadow:
    -4px 17px 0 -6px rgba(72, 38, 21, 0.54),
    6px 25px 0 -7px rgba(132, 72, 31, 0.48);
}

.feature-screen .feature-hero p:not(.eyebrow) {
  width: fit-content;
  max-width: min(650px, calc(100% - 8px));
  margin: 0;
  padding: 4px 18px 4px 8px;
  border: 0;
  border-left: 2px solid rgba(124, 48, 40, 0.48);
  border-radius: 0 11px 11px 0;
  color: #625446;
  background: linear-gradient(90deg, rgba(248, 235, 204, 0.7), rgba(245, 225, 184, 0.4) 68%, transparent 100%);
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.42;
  text-shadow: 0 1px 0 rgba(255, 250, 231, 0.7);
}

@media (max-width: 620px) {
  .feature-screen .feature-hero {
    min-height: 180px;
    padding: 16px 14px;
  }

  .feature-screen .feature-hero h1 {
    font-size: clamp(42px, 12vw, 57px);
  }

  .feature-screen .feature-hero p:not(.eyebrow) {
    max-width: 100%;
    padding: 4px 12px 4px 7px;
    font-size: 12px;
  }
}

/* 顶部标题覆盖：无底板的古籍碑刻题字。 */
.feature-screen .feature-hero h1 {
  min-height: 0;
  padding: 0 4px 8px 2px;
  border: 0;
  border-radius: 0;
  color: #18120e;
  font-family: "SgzHeroStele", "STKaiti", "KaiTi", serif;
  font-size: clamp(42px, 9.2vw, 62px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.055em;
  background: linear-gradient(180deg, #18120e 0%, #3a281e 58%, #54241e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.62px rgba(24, 18, 14, 0.66);
  box-shadow: none;
  filter: drop-shadow(0 1px 0 rgba(255, 245, 215, 0.52)) drop-shadow(0 2px 1px rgba(32, 21, 15, 0.13));
  transform: scaleY(1.02);
  transform-origin: left bottom;
  text-shadow: none;
}

.feature-screen .feature-hero .hero-title-latin {
  color: #18120e;
  font-family: Georgia, "Times New Roman", serif;
  margin-right: 1px;
  font-size: 0.68em;
  font-weight: 900;
  background: linear-gradient(180deg, #18120e 0%, #3a281e 58%, #54241e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateY(-2px);
}

.feature-screen .feature-hero h1::before {
  content: "";
  position: absolute;
  left: -2px;
  right: 4px;
  bottom: 1px;
  height: 7px;
  display: block;
  border-radius: 72% 28% 66% 34% / 48% 56% 44% 52%;
  background: linear-gradient(90deg, rgba(18, 13, 10, 0.72), rgba(45, 29, 21, 0.35), rgba(135, 38, 29, 0.14), rgba(18, 13, 10, 0));
  opacity: 0.84;
  z-index: -1;
}

.feature-screen .feature-hero h1::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 7px;
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: rgba(74, 38, 29, 0.66);
  box-shadow:
    -4px 17px 0 -2px rgba(25, 18, 14, 0.52),
    7px 27px 0 -3px rgba(128, 42, 34, 0.48);
  pointer-events: none;
}

@media (max-width: 620px) {
  .feature-screen .feature-hero h1 {
    min-height: 0;
    padding: 0 4px 8px 2px;
    font-size: clamp(40px, 10.8vw, 53px);
  }
}
