:root {
  color-scheme: dark;
  --bg: #07090b;
  --metal: #1f2529;
  --metal-2: #30383e;
  --panel: #11181b;
  --line: #505a60;
  --edge: #0b0f12;
  --text: #f2f5f3;
  --muted: #a9b3b5;
  --cyan: #49f7eb;
  --green: #39d836;
  --lime: #7af054;
  --gold: #f8c14a;
  --red: #e94c41;
  --purple: #b55cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(73, 247, 235, 0.12), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(248, 193, 74, 0.1), transparent 26%),
    linear-gradient(140deg, #040506, #0a0d0f 48%, #15100c);
  color: var(--text);
  font-family: Impact, "Arial Black", "Microsoft YaHei", system-ui, sans-serif;
}

button {
  border: 1px solid #536068;
  border-radius: 6px;
  background: linear-gradient(180deg, #394247, #151b1f);
  color: var(--text);
  cursor: pointer;
  font: 900 13px/1.1 inherit;
  min-height: 34px;
  text-shadow: 0 2px 2px #000;
}

button:hover {
  filter: brightness(1.12);
}

.shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 18px;
}

.phone {
  aspect-ratio: auto;
  background: #101517;
  border: 4px solid #12181c;
  box-shadow: var(--shadow);
  height: min(1040px, calc(100vh - 36px));
  overflow: hidden;
  position: relative;
  width: min(540px, calc((100vh - 36px) * 0.52), calc(100vw - 24px));
}

canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.top-hud {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(5, 8, 10, 0.88), rgba(5, 8, 10, 0.1));
  border-bottom: 0;
  box-shadow: none;
  display: grid;
  gap: 5px;
  grid-template-columns:
    30px
    44px
    minmax(58px, 1fr)
    50px
    50px;
  left: 0;
  min-height: 64px;
  padding: 6px 7px 5px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 5;
}

.top-hud > * {
  min-width: 0;
}

.icon-btn {
  border-radius: 50%;
  font-size: 16px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  width: 30px;
}

.speed-btn {
  align-items: center;
  background: radial-gradient(circle at 50% 38%, #6c8c2e, #182415 68%);
  border: 2px solid #b7d060;
  border-radius: 50%;
  color: #fff7b0;
  display: flex;
  font-size: 12px;
  height: 32px;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.resource-pill,
.stage-title,
.hero-card,
.bottom-fort {
  border: 2px solid #4a5358;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 0 rgba(0, 0, 0, 0.34),
    0 3px 0 rgba(0, 0, 0, 0.5);
}

.stage-title {
  align-items: center;
  background: transparent;
  border-color: transparent;
  display: grid;
  justify-items: center;
  min-height: 52px;
  text-align: center;
}

.stage-title strong {
  color: #fff0ce;
  font-size: clamp(12px, 3vw, 16px);
  line-height: 0.98;
  max-width: 86px;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 0 #000;
}

.stage-title span {
  color: #e5e5e0;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 900;
}

.stage-title i {
  width: min(96px, 86%);
  height: 5px;
  border: 1px solid rgba(188, 217, 255, 0.56);
  background: rgba(0, 10, 24, 0.62);
  display: block;
  margin: 2px 0;
}

.stage-title em {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3e71ff, #9de9ff);
  box-shadow: 0 0 10px rgba(86, 164, 255, 0.55);
}

.stage-title small {
  color: #f4f8ff;
  display: block;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 2px 0 #000;
}

.battle-clock {
  align-items: center;
  display: grid;
  gap: 3px;
  justify-items: center;
}

.battle-clock b {
  color: #f8fbff;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 2px 0 #000;
}

.battle-supply {
  align-items: center;
  background: linear-gradient(180deg, rgba(117, 55, 24, 0.88), rgba(48, 20, 9, 0.82));
  border: 1px solid rgba(255, 198, 92, 0.54);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.18);
  display: grid;
  min-height: 34px;
  padding: 3px;
  text-align: center;
}

.battle-supply b {
  color: #ffe28a;
  font-size: 12px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-supply span {
  color: #f4f0dc;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
}

.resource-pill {
  align-items: center;
  background: #10171a;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: 28px 1fr;
  height: 46px;
  padding: 4px 8px;
}

.resource-pill b {
  font-size: clamp(14px, 3.8vw, 21px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.coin-icon,
.gem-icon {
  display: block;
  height: 26px;
  width: 26px;
}

.coin-icon {
  background:
    radial-gradient(circle at 35% 32%, #fff3a4 0 13%, transparent 14%),
    radial-gradient(circle, #f9c341 0 57%, #b46b1d 59% 72%, #5a3211 73%);
  border-radius: 50%;
}

.gem-icon {
  background: linear-gradient(135deg, #ffb7ff, #9c33f3 58%, #4f177d);
  clip-path: polygon(50% 0, 92% 28%, 72% 100%, 28% 100%, 8% 28%);
}

.right-hud {
  display: grid;
  gap: 6px;
  justify-items: end;
  position: absolute;
  right: 8px;
  top: 70px;
  z-index: 4;
}

.hero-card {
  align-items: center;
  background: linear-gradient(180deg, #2c363b, #11171a);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: 30px 1fr;
  padding: 4px 5px;
  width: 88px;
}

.hero-avatar {
  background:
    radial-gradient(circle at 50% 25%, #ffb6d8 0 22%, transparent 23%),
    linear-gradient(135deg, #703a86, #1c2225);
  border: 2px solid #707980;
  border-radius: 8px;
  height: 30px;
  position: relative;
}

.hero-card b,
.hero-card span {
  display: block;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
}

.hero-card span {
  color: #c5cdd0;
}

.skill-slot-list {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.round-slot {
  align-items: center;
  background:
    radial-gradient(circle at 48% 35%, rgba(255,255,255,0.22), transparent 24%),
    radial-gradient(circle at 50% 50%, #1d3132 0 45%, #0e1417 47% 67%, #8a6a2b 69% 78%, #14100b 79%);
  border-radius: 50%;
  box-shadow: 0 2px 0 #000;
  color: #bdfdff;
  display: flex;
  font-size: 15px;
  font-weight: 1000;
  height: 38px;
  justify-content: center;
  opacity: 0.9;
  position: relative;
  text-shadow: 0 2px 0 #000;
  width: 38px;
}

.round-slot.ready {
  box-shadow:
    0 2px 0 #000,
    0 0 12px rgba(73, 247, 235, 0.42);
}

.round-slot.cooling {
  color: #d8e8e8;
  filter: saturate(0.7);
}

.round-slot .skill-level {
  background: #11181b;
  border: 1px solid #596268;
  border-radius: 8px;
  bottom: -2px;
  color: #fff;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  padding: 1px 3px;
  position: absolute;
  right: -4px;
}

.round-slot .skill-cooldown {
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
  inset: 2px;
  justify-content: center;
  position: absolute;
}

.round-slot .skill-passive {
  color: #9efcff;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 7px;
  font-weight: 900;
  left: 50%;
  line-height: 1;
  position: absolute;
  top: 27px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.bottom-fort {
  background: linear-gradient(180deg, rgba(42, 50, 55, 0), rgba(13, 17, 20, 0.18));
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  bottom: 0;
  height: 118px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 3;
}

.fence {
  background:
    linear-gradient(45deg, transparent 0 42%, #30383d 43% 56%, transparent 57%),
    linear-gradient(-45deg, transparent 0 42%, #30383d 43% 56%, transparent 57%),
    linear-gradient(180deg, #4d565d, #1a2024);
  background-size: 20px 20px, 20px 20px, 100% 100%;
  border-bottom: 3px solid #090c0e;
  border-top: 3px solid #667078;
  height: 32px;
}

.base-hp {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  padding: 2px 78px 0 0;
}

.heart {
  color: #32dd47;
  font-size: 16px;
}

.base-hp b {
  color: #f4f4f0;
  font-size: 18px;
  text-shadow: 0 3px 0 #000;
}

.green-hp {
  background: #121a18;
  border: 2px solid #d1e8d1;
  height: 14px;
  margin: 4px auto 0;
  width: 68%;
}

.green-hp div {
  background: linear-gradient(90deg, #20c22e, #5dff4f);
  height: 100%;
  width: 100%;
}

.skill-modal {
  align-items: center;
  background: rgba(3, 6, 8, 0.74);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: absolute;
  z-index: 9;
}

.skill-modal[hidden] {
  display: none;
}

.skill-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.62);
  max-width: 480px;
  padding: 0;
  width: 100%;
}

.skill-kicker {
  background: linear-gradient(180deg, #ffb23d, #db5b05);
  border: 1px solid #ffcf71;
  box-shadow: 0 4px 0 rgba(70, 28, 0, 0.8);
  color: #fff9e8;
  display: block;
  font-size: 20px;
  letter-spacing: 0;
  margin: 0 auto 18px;
  padding: 7px 30px;
  text-align: center;
  text-shadow: 0 2px 0 #000;
  width: max-content;
}

.skill-panel h2 {
  color: #fff5dc;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1;
  margin: 0 0 14px;
  text-align: center;
  text-shadow: 0 3px 0 #000;
}

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

.skill-card {
  align-items: start;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255, 245, 220, 0.96) 18%, rgba(242, 229, 205, 0.98));
  border: 2px solid #e9d4a8;
  border-radius: 0 0 7px 7px;
  color: #2b1d13;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 238px;
  padding: 0 8px 12px;
  text-align: center;
  text-shadow: none;
}

.skill-card:hover {
  border-color: #ffd15d;
  filter: brightness(1.08);
}

.skill-card::before {
  align-self: stretch;
  background: linear-gradient(180deg, #8a4e21, #4d2a11);
  color: #fff6df;
  content: "战术强化";
  display: grid;
  font-size: 13px;
  min-height: 32px;
  place-items: center;
  text-shadow: 0 2px 0 #000;
  width: calc(100% + 16px);
}

.skill-icon {
  align-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.42), transparent 18%),
    radial-gradient(circle, #237dce, #15294b 65%);
  border: 3px solid #2f66a7;
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 30px;
  height: 64px;
  justify-content: center;
  margin-top: 12px;
  text-shadow: 0 2px 0 #000;
  width: 64px;
}

.skill-card strong,
.skill-card span {
  display: block;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
}

.skill-card strong {
  color: #3a210e;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.skill-card span {
  color: #22170e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 10px;
}

.skill-card .skill-icon {
  align-items: center;
  color: #fff;
  display: flex;
  font-family: Impact, "Arial Black", "Microsoft YaHei", system-ui, sans-serif;
  justify-content: center;
}

.skill-copy {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  min-width: 0;
  text-align: left;
}

.skill-card .skill-copy strong {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin: 0;
}

.skill-card .skill-copy strong em {
  color: #ffe08c;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.skill-card .skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.skill-card .skill-tags i {
  background: rgba(255, 187, 64, 0.14);
  border: 1px solid rgba(255, 187, 64, 0.34);
  border-radius: 3px;
  color: #ffe2a2;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 3px 4px;
}

.skill-card .skill-effect,
.skill-card .skill-copy small {
  display: block;
  margin: 0;
}

.skill-card .skill-effect {
  color: #f8eed7;
  font-size: 12px;
  line-height: 1.35;
}

.skill-card .skill-copy small {
  color: #b9c0ba;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.skill-panel {
  max-width: 390px;
}

.skill-kicker {
  font-size: 18px;
  margin-bottom: 12px;
  padding: 6px 28px;
}

.skill-panel h2 {
  margin-bottom: 12px;
}

.skill-grid {
  gap: 10px;
}

.skill-card {
  align-items: center;
  gap: 7px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 118px;
  padding: 12px 8px 10px;
  text-align: center;
}

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

.skill-card .skill-icon {
  height: 58px;
  margin-top: 0;
  width: 58px;
}

.skill-copy,
.skill-card .skill-copy {
  gap: 0;
  margin-top: 0;
  text-align: center;
}

.skill-card .skill-copy strong {
  align-items: center;
  display: grid;
  font-size: 13px;
  gap: 5px;
  justify-items: center;
  line-height: 1.15;
}

.skill-card .skill-copy strong em {
  width: max-content;
}

.skill-card .skill-tags {
  display: none;
}

.skill-card .skill-tags i {
  font-size: 9px;
  padding: 2px 4px;
}

.skill-card .skill-effect {
  display: none;
}

.skill-card .skill-copy small {
  display: none;
}

.skill-refresh {
  background: linear-gradient(180deg, #47e5d6, #159587);
  border: 2px solid #9dfff7;
  color: #063b3a;
  display: block;
  font-size: 16px;
  margin: 18px auto 0;
  min-height: 42px;
  min-width: 148px;
  text-shadow: none;
}

.toast {
  background: rgba(8, 11, 12, 0.92);
  border: 2px solid #556168;
  border-radius: 7px;
  color: var(--cyan);
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
  left: 50%;
  opacity: 0;
  padding: 9px 12px;
  pointer-events: none;
  position: absolute;
  top: 48%;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
  z-index: 8;
}

.toast.show {
  opacity: 1;
}

@media (max-width: 430px) {
  .shell {
    padding: 0;
  }

  .phone {
    height: 100svh;
    border-width: 0;
    max-height: none;
    width: min(100vw, 540px);
  }

  .top-hud {
    grid-template-columns: 30px 42px minmax(74px, 1fr) 48px 48px;
    gap: 4px;
    min-height: 58px;
    padding: 5px 6px;
  }

  .speed-btn {
    font-size: 12px;
    height: 30px;
    min-height: 30px;
    width: 30px;
  }

  .stage-title strong {
    font-size: 13px;
  }

  .resource-pill {
    grid-template-columns: 20px 1fr;
    height: 38px;
    padding: 4px;
  }

  .resource-pill b {
    font-size: 15px;
  }

  .coin-icon,
  .gem-icon {
    height: 20px;
    width: 20px;
  }

  .right-hud {
    top: 64px;
  }

  .hero-card {
    width: 84px;
  }

  .skill-panel {
    padding: 10px;
  }

  .skill-panel h2 {
    font-size: 15px;
  }

  .skill-card {
    grid-template-columns: 1fr;
    min-height: 112px;
    padding: 10px 7px;
  }

  .skill-icon {
    font-size: 22px;
    height: 54px;
    width: 54px;
  }

}

/* Wasteland mobile shell */
.phone {
  border: 2px solid #2e3336;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 143, 39, 0.18), transparent 24%),
    linear-gradient(180deg, #080b0c, #111719 42%, #070909);
}

.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  box-shadow:
    inset 0 0 0 1px rgba(255, 189, 72, 0.18),
    inset 0 0 34px rgba(0, 0, 0, 0.88);
}

.screen-hub canvas,
.screen-panel canvas,
.screen-level canvas {
  visibility: hidden;
}

.screen-hub .top-hud,
.screen-hub .right-hud,
.screen-hub .bottom-fort,
.screen-panel .top-hud,
.screen-panel .right-hud,
.screen-panel .bottom-fort,
.screen-level .top-hud,
.screen-level .right-hud,
.screen-level .bottom-fort {
  display: none;
}

.screen-battle .hub-screen,
.screen-battle .panel-screen,
.screen-battle .level-screen {
  display: none;
}

.hub-screen,
.panel-screen,
.level-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 5, 6, 0.15), rgba(4, 6, 7, 0.9) 70%),
    #090d0f;
}

.hub-screen::before,
.panel-screen::before,
.level-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: screen;
  opacity: 0.18;
  pointer-events: none;
}

.hub-screen::after,
.panel-screen::after,
.level-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, transparent 0 44%, rgba(0, 0, 0, 0.62) 78%);
  pointer-events: none;
}

.hub-top,
.panel-header {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(116px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.profile-block,
.hub-resources span,
.panel-resource-mini span,
.pass-card,
.side-actions button,
.bottom-nav button,
.panel-back,
.shop-tabs button,
.shop-feature,
.shop-grid article,
.weapon-card,
.character-card,
.character-growth,
.equipment-loadout article,
.equipment-materials,
.icon-board,
.mission-card,
.mission-list article,
.mail-list article,
.rank-podium article,
.rank-list article,
.friend-tools button,
.friend-list article,
.base-status,
.base-grid article {
  border: 1px solid rgba(217, 151, 47, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 190, 73, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(30, 37, 39, 0.92), rgba(8, 11, 12, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 0 rgba(0, 0, 0, 0.7),
    0 4px 14px rgba(0, 0, 0, 0.45);
}

.equipment-pack,
.equipment-pack i {
  border: 1px solid rgba(217, 151, 47, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 190, 73, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(30, 37, 39, 0.92), rgba(8, 11, 12, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 0 rgba(0, 0, 0, 0.7),
    0 4px 14px rgba(0, 0, 0, 0.45);
}

.profile-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 7px;
  min-height: 52px;
  padding: 5px 8px;
}

.portrait-mini,
.portrait-list button,
.hero-avatar {
  background-image: url("./assets/characters/armor-hunter.png");
  background-size: cover;
  background-position: center 20%;
}

.portrait-mini {
  border: 1px solid #6b6f70;
  height: 42px;
  width: 42px;
  clip-path: polygon(13% 0, 87% 0, 100% 16%, 100% 84%, 84% 100%, 16% 100%, 0 84%, 0 16%);
}

.profile-block b,
.profile-block span,
.hub-resources b,
.panel-resource-mini b,
.pass-card,
.bottom-nav button,
.side-actions button,
.panel-header h2,
.stat-stack,
.weapon-card,
.shop-grid article,
.icon-board {
  font-family: "Microsoft YaHei", "Arial Black", sans-serif;
}

.profile-block b,
.profile-block span {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.profile-block i {
  display: block;
  width: 70px;
  height: 5px;
  margin-top: 4px;
  background:
    linear-gradient(90deg, #ffb42d 0 70%, #182023 70%);
  border: 1px solid #5e4a21;
}

.hub-resources,
.panel-resource-mini {
  display: flex;
  gap: 5px;
  align-items: center;
}

.hub-resources span,
.panel-resource-mini span {
  display: grid;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 3px 7px;
  font-size: 12px;
}

.hub-resources .coin-icon,
.hub-resources .gem-icon,
.panel-resource-mini .coin-icon,
.panel-resource-mini .gem-icon,
.energy-icon {
  width: 18px;
  height: 18px;
}

.energy-icon {
  display: block;
  background: linear-gradient(160deg, #7ffcff, #1e75ff 65%, #102d5b);
  clip-path: polygon(48% 0, 80% 0, 58% 38%, 82% 38%, 34% 100%, 43% 55%, 18% 55%);
}

.pass-card {
  position: absolute;
  left: 14px;
  top: 78px;
  z-index: 3;
  width: 120px;
  min-height: 68px;
  padding: 8px;
  color: #ffe9b7;
}

.pass-card strong {
  display: block;
  font-size: 19px;
}

.pass-card span {
  color: #f0a42a;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.pass-card i {
  position: absolute;
  right: 9px;
  top: 9px;
  color: #ffffff;
  background: #192025;
  border: 1px solid #e6a33d;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.side-actions {
  position: absolute;
  right: 12px;
  top: 92px;
  z-index: 3;
  display: grid;
  gap: 8px;
}

.side-actions button {
  width: 54px;
  min-height: 46px;
  padding: 0;
  color: #f7ead2;
  font-size: 12px;
}

.hero-stage {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 4, 5, 0.1), rgba(7, 8, 8, 0.42) 62%, #050606),
    url("./assets/characters/armor-hunter.png") center top / cover no-repeat;
  z-index: 1;
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, transparent 0 28%, rgba(0, 0, 0, 0.15) 48%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, transparent 0 68%, rgba(0, 0, 0, 0.82));
}

.ash-sky,
.hero-figure,
.supply-crate {
  display: none;
}

.battle-button {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 4;
  transform: translateX(-50%);
  min-width: 250px;
  height: 66px;
  border: 2px solid #ffb94f;
  color: #fff1c6;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(255, 127, 16, 0.62) 8% 15%, transparent 16%),
    linear-gradient(180deg, #f2a329, #8b4308 54%, #301407);
  box-shadow:
    0 0 24px rgba(255, 116, 19, 0.45),
    inset 0 0 0 2px rgba(255, 230, 143, 0.3),
    inset 0 -5px 0 rgba(0, 0, 0, 0.35);
  clip-path: polygon(9% 0, 91% 0, 100% 50%, 91% 100%, 9% 100%, 0 50%);
}

.battle-button span {
  font-size: 28px;
}

.battle-button b {
  margin-left: 18px;
  font-size: 30px;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(4, 6, 7, 0.92);
  border-top: 1px solid rgba(255, 185, 79, 0.36);
}

.bottom-nav button {
  min-height: 70px;
  border-width: 0 1px 0 0;
  border-color: rgba(160, 122, 61, 0.3);
  border-radius: 0;
  color: #c7c2b7;
  background: linear-gradient(180deg, rgba(31, 37, 39, 0.72), rgba(6, 8, 9, 0.9));
  font-size: 12px;
}

.bottom-nav button span {
  display: block;
  color: #c89a45;
  font-size: 23px;
  margin-bottom: 3px;
}

.bottom-nav button.active {
  color: #ffe7a4;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 178, 42, 0.36), transparent 48%),
    linear-gradient(180deg, rgba(86, 60, 14, 0.92), rgba(10, 9, 6, 0.92));
}

.bottom-nav button {
  position: relative;
}

.bottom-nav button::after {
  background: #e31f1f;
  border: 1px solid #ffb14f;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 60, 24, 0.65);
  content: "";
  height: 8px;
  position: absolute;
  right: 18%;
  top: 8px;
  width: 8px;
}

.bottom-nav button.active::before {
  background: linear-gradient(90deg, transparent, #ffc64d, transparent);
  content: "";
  height: 3px;
  left: 14%;
  position: absolute;
  right: 14%;
  top: 0;
}

.panel-screen {
  z-index: 11;
}

.screen-panel .test-panel-toggle {
  display: none;
}

.panel-screen[hidden],
.level-screen[hidden] {
  display: none;
}

.level-screen {
  z-index: 11;
}

.level-summary {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 70px;
  z-index: 2;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(73, 247, 235, 0.28);
  background: linear-gradient(180deg, rgba(14, 27, 30, 0.9), rgba(8, 11, 12, 0.92));
  color: #dffaf6;
  font-size: 13px;
  font-weight: 800;
}

.level-grid {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 126px;
  bottom: 88px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  padding: 2px 2px 10px;
}

.level-card {
  min-height: 82px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 208, 116, 0.38);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 184, 43, 0.22), transparent 54%),
    linear-gradient(180deg, rgba(42, 51, 49, 0.96), rgba(10, 12, 12, 0.96));
  color: #fff0c8;
  font-family: "Microsoft YaHei", "Arial Black", sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 5px 12px rgba(0, 0, 0, 0.34);
}

.level-card span,
.level-card b,
.level-card small {
  display: block;
  letter-spacing: 0;
}

.level-card span {
  font-size: 12px;
  font-weight: 900;
}

.level-card b {
  margin-top: 5px;
  color: #84fff4;
  font-size: 11px;
}

.level-card small {
  margin-top: 4px;
  color: #a9b7b3;
  font-size: 10px;
}

.level-card.active {
  border-color: #50fff0;
  background:
    radial-gradient(circle at 50% 0, rgba(73, 247, 235, 0.34), transparent 58%),
    linear-gradient(180deg, rgba(45, 77, 75, 0.96), rgba(9, 18, 18, 0.98));
  color: #ffffff;
}

.level-card.boss {
  border-color: rgba(255, 105, 86, 0.62);
}

.level-card.locked {
  opacity: 0.48;
  color: #88908d;
  filter: grayscale(0.35);
}

.level-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 22px;
  z-index: 2;
}

.level-actions button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(73, 247, 235, 0.58);
  background: linear-gradient(180deg, #2aefe0, #0d7d77);
  color: #031313;
  font-size: 17px;
  font-weight: 900;
}

.result-modal {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.result-modal[hidden] {
  display: none;
}

.result-panel {
  width: min(100%, 360px);
  padding: 18px;
  border: 1px solid rgba(255, 208, 116, 0.48);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 190, 73, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(20, 31, 33, 0.98), rgba(6, 8, 9, 0.98));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  text-align: center;
}

.result-panel span {
  display: block;
  color: #ffe0a2;
  font-size: 24px;
  font-weight: 900;
}

.result-panel p {
  min-height: 42px;
  margin: 12px 0;
  color: #d7e4df;
  font-size: 14px;
  line-height: 1.5;
}

.result-panel strong {
  display: block;
  min-height: 28px;
  color: #84fff4;
  font-size: 15px;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.result-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 208, 116, 0.36);
  background: linear-gradient(180deg, #334145, #141a1b);
  color: #ffe0a0;
  font-size: 14px;
  font-weight: 800;
}

.result-actions button:disabled {
  opacity: 0.42;
}

.fake-pay-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.fake-pay-modal[hidden] {
  display: none;
}

.fake-pay-panel {
  width: min(100%, 360px);
  padding: 18px;
  border: 1px solid rgba(73, 247, 235, 0.46);
  background:
    radial-gradient(circle at 50% 0, rgba(73, 247, 235, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(18, 31, 33, 0.98), rgba(6, 8, 9, 0.98));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  text-align: center;
}

.fake-pay-panel span,
.fake-pay-panel b,
.fake-pay-panel strong {
  display: block;
}

.fake-pay-panel span {
  color: #84fff4;
  font-size: 13px;
  font-weight: 900;
}

.fake-pay-panel b {
  margin-top: 6px;
  color: #ffe0a2;
  font-size: 22px;
}

.fake-pay-panel p {
  margin: 10px 0;
  color: #d7e4df;
  font-size: 13px;
  line-height: 1.5;
}

.fake-pay-panel strong {
  min-height: 26px;
  color: #f8c14a;
  font-size: 14px;
}

.fake-pay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fake-pay-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 208, 116, 0.36);
  background: linear-gradient(180deg, #334145, #141a1b);
  color: #ffe0a0;
  font-size: 14px;
  font-weight: 800;
}

#fakePaySuccessBtn {
  border-color: rgba(73, 247, 235, 0.52);
  background: linear-gradient(180deg, #2aefe0, #0d7d77);
  color: #031313;
}

.panel-header {
  grid-template-columns: 42px 1fr auto;
}

.panel-back {
  width: 40px;
  height: 40px;
  min-height: 40px;
  font-size: 30px;
}

.panel-header h2 {
  margin: 0;
  color: #ffe0a2;
  font-size: 22px;
  text-shadow: 0 2px 0 #000;
}

.panel-content {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 68px;
  bottom: 76px;
  z-index: 2;
}

.panel-content[hidden] {
  display: none;
}

.panel-screen[data-active-panel="character"] .panel-header {
  display: none;
}

.panel-character {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: minmax(260px, 1fr) auto 58px;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.portrait-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  padding: 2px;
}

.portrait-list button {
  width: 52px;
  min-height: 62px;
  border: 1px solid #8a6a36;
  background-size: cover;
  background-position: center top;
}

.portrait-list button.active {
  box-shadow: 0 0 0 2px #f6a72a, 0 0 18px rgba(255, 155, 27, 0.45);
}

.portrait-list button[data-character="frost-commander"] { background-image: url("./assets/characters/frost-commander.png"); }
.portrait-list button[data-character="thunder-engineer"] { background-image: url("./assets/characters/thunder-engineer.png"); }
.portrait-list button[data-character="flame-cleaner"] { background-image: url("./assets/characters/flame-cleaner.png"); }
.portrait-list button[data-character="blast-vanguard"] { background-image: url("./assets/characters/blast-vanguard.png"); }
.portrait-list button[data-character="drone-pilot"] { background-image: url("./assets/characters/drone-pilot.png"); }
.portrait-list button[data-character="fortress-guard"] { background-image: url("./assets/characters/fortress-guard.png"); }
.portrait-list button[data-character="gravity-warlock"] { background-image: url("./assets/characters/gravity-warlock.png"); }
.portrait-list button[data-character="storm-runner"] { background-image: url("./assets/characters/storm-runner.png"); }
.portrait-list button[data-character="toxic-alchemist"] { background-image: url("./assets/characters/toxic-alchemist.png"); }

.character-card {
  position: relative;
  overflow: hidden;
}

.panel-character-art {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, transparent 0 52%, rgba(4, 6, 7, 0.82) 77%),
    url("./assets/characters/armor-hunter.png");
  background-size: cover;
  background-position: center top;
}

.panel-character-art span {
  display: none;
}

.stat-stack {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  padding: 12px;
  background: rgba(5, 8, 9, 0.78);
  border: 1px solid rgba(255, 180, 62, 0.42);
}

.stat-stack b {
  display: block;
  color: #f4f0e9;
  font-size: 24px;
}

.stat-stack span,
.stat-stack p {
  color: #d2d5d0;
  font-size: 12px;
  margin: 5px 0 0;
}

.stat-stack strong {
  display: block;
  color: #ffbd42;
  font-size: 17px;
  margin-top: 6px;
}

.equip-slots {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  gap: 8px;
}

.character-growth {
  grid-column: 1 / -1;
  padding: 11px;
}

.character-growth b,
.equipment-materials b {
  display: block;
  color: #fff0c8;
  font-size: 15px;
}

.character-growth span,
.character-growth p,
.equipment-loadout span,
.equipment-materials span {
  display: block;
  margin: 5px 0 0;
  color: #cfd8d4;
  font-size: 12px;
}

.character-growth i,
.equipment-materials i {
  display: block;
  height: 7px;
  margin-top: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
}

.character-growth em,
.equipment-materials em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #49f7eb, #f8c14a);
}

.equip-slots i,
.weapon-list button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #d58a27;
  background: linear-gradient(135deg, #312016, #111719);
  color: #ffd37d;
  font-style: normal;
  font-size: 11px;
}

.panel-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
}

.panel-character .panel-actions {
  grid-template-columns: repeat(2, 1fr);
}

.green-action,
.gold-action,
.blue-action {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 16px;
}

.green-action { background: linear-gradient(180deg, #4cbd3e, #1c6919); }
.gold-action { background: linear-gradient(180deg, #e6a42c, #8a4a08); }
.blue-action { background: linear-gradient(180deg, #2780a1, #103a4a); }

.panel-character {
  display: flex;
  flex-direction: column;
  gap: 7px;
  left: 0;
  right: 0;
  top: 0;
  bottom: 76px;
  overflow-y: auto;
  padding: 0 10px 10px;
  background:
    radial-gradient(circle at 30% 12%, rgba(165, 139, 96, 0.28), transparent 24%),
    radial-gradient(circle at 58% 24%, rgba(90, 205, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #13100c 0, #2b2117 41%, #1a0f08 42%, #170c07 100%);
}

.character-hero-board {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 144px;
  grid-template-rows: 82px 284px 46px;
  column-gap: 8px;
  min-height: 420px;
  margin: 0 -10px;
  padding: 14px 10px 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12) 26%, rgba(0, 0, 0, 0.28) 100%),
    radial-gradient(ellipse at 43% 76%, rgba(255, 226, 165, 0.38) 0 12%, transparent 30%),
    linear-gradient(90deg, rgba(82, 71, 51, 0.92), rgba(64, 66, 55, 0.76) 35%, rgba(56, 47, 40, 0.92)),
    linear-gradient(180deg, #413a2f, #1a120d 72%);
  border-bottom: 1px solid rgba(255, 190, 73, 0.24);
  box-shadow: inset 0 -24px 46px rgba(0, 0, 0, 0.36);
}

.character-hero-board::before {
  content: "";
  position: absolute;
  inset: 86px 20px 56px 74px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 10% 90%, rgba(0, 0, 0, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 46% 46% 34% 34%;
  pointer-events: none;
}

.character-hero-board::after {
  content: "";
  position: absolute;
  left: 102px;
  right: 170px;
  bottom: 48px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 232, 187, 0.5), rgba(181, 133, 69, 0.14) 52%, transparent 72%);
  pointer-events: none;
}

.character-topline {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 68px minmax(120px, 1fr);
  grid-template-rows: 38px 32px;
  column-gap: 8px;
  align-items: center;
}

.character-profile-chip {
  position: relative;
  grid-row: 1 / 3;
  width: 64px;
  height: 64px;
}

.character-profile-chip .portrait-mini {
  width: 62px;
  height: 62px;
  border: 3px solid #ffb32e;
  border-radius: 50%;
  clip-path: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.58);
}

.profile-level {
  position: absolute;
  z-index: 2;
  left: -2px;
  top: -2px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #ffe794;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffcf32, #f06a0c);
  color: #fff7d5;
  font-size: 13px;
  text-shadow: 0 2px 1px #823300;
}

.character-titlebar {
  display: grid;
  align-content: end;
  gap: 4px;
  min-width: 0;
}

.character-titlebar b {
  overflow: hidden;
  color: #fff4e2;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 2px 2px #000;
}

.character-titlebar i {
  display: block;
  width: min(190px, 100%);
  height: 11px;
  border: 1px solid rgba(0, 0, 0, 0.72);
  background: #070605;
  transform: skewX(-18deg);
}

.character-titlebar em {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #35d6ff 0 5px, #54e9ff 5px 10px);
}

.character-currency-strip {
  grid-column: 2 / 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.character-currency-strip span {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) 18px;
  align-items: center;
  min-width: 0;
  height: 28px;
  padding: 2px 3px;
  border-radius: 16px;
  background: rgba(18, 10, 5, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 216, 135, 0.18), 0 2px 7px rgba(0, 0, 0, 0.32);
}

.character-currency-strip .coin-icon,
.character-currency-strip .gem-icon,
.character-currency-strip .meat-icon {
  width: 22px;
  height: 22px;
}

.meat-icon {
  display: inline-block;
  background:
    radial-gradient(circle at 70% 20%, #fff0dd 0 15%, transparent 16%),
    radial-gradient(circle at 42% 54%, #ffb07f 0 44%, #b2352f 45% 72%, transparent 73%);
  border-radius: 40% 55% 45% 52%;
}

.character-currency-strip b {
  overflow: hidden;
  color: #fff5dc;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.character-currency-strip em {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffdd64, #bd5b12);
  color: #fff7ca;
  font-size: 13px;
  font-style: normal;
}

.character-side-tools {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 2 / 4;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 58px;
}

.character-side-tools button {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 5px 2px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 34%, rgba(255, 231, 155, 0.34), transparent 42%),
    linear-gradient(180deg, #765128, #3c2515);
  color: #f8e4c4;
  font-size: 15px;
  line-height: 1.15;
  writing-mode: vertical-rl;
  box-shadow: inset 0 1px 0 rgba(255, 244, 196, 0.22), 0 4px 12px rgba(0, 0, 0, 0.38);
}

.character-side-tools span {
  margin-bottom: 2px;
  font-size: 18px;
  writing-mode: horizontal-tb;
}

.panel-character .portrait-list {
  position: relative;
  z-index: 3;
  grid-column: 2 / 3;
  grid-row: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 38px;
  gap: 5px;
  align-content: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 7px;
  border-radius: 12px;
  background: rgba(49, 28, 13, 0.58);
}

.panel-character .portrait-list button {
  width: 38px;
  min-height: 38px;
  border: 1px solid rgba(255, 201, 97, 0.4);
  border-radius: 9px;
  background-size: cover;
  background-position: center top;
}

.panel-character .portrait-list button.active {
  background-color: #ffbf36;
  box-shadow: 0 0 0 2px #ffcf43, 0 0 16px rgba(255, 155, 27, 0.55);
}

.panel-character .character-card {
  position: relative;
  z-index: 2;
  grid-column: 2 / 3;
  grid-row: 2;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.panel-character .character-card::after {
  content: "";
  position: relative;
  display: block;
  width: 72%;
  height: 24px;
  margin: 240px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 201, 104, 0.42), transparent 70%);
}

.panel-character-art {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 4px;
  width: min(245px, 118%);
  height: 292px;
  background-image:
    radial-gradient(circle at 42% 26%, rgba(78, 238, 255, 0.26), transparent 16%),
    linear-gradient(180deg, transparent 0 70%, rgba(4, 6, 7, 0.18) 92%),
    url("./assets/characters/armor-hunter.png");
  background-size: cover, cover, contain;
  background-repeat: no-repeat;
  background-position: center, center, center bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
}

.panel-character-art::before,
.panel-character-art::after {
  content: "";
  position: absolute;
  width: 56px;
  height: 16px;
  background: linear-gradient(90deg, transparent, #42e5ff 42% 62%, transparent);
  filter: drop-shadow(0 0 9px rgba(66, 229, 255, 0.76));
  transform: rotate(-28deg);
}

.panel-character-art::before {
  left: -4px;
  top: 92px;
}

.panel-character-art::after {
  right: 8px;
  top: 132px;
  transform: rotate(25deg);
}

.character-rank-badge {
  position: absolute;
  z-index: 4;
  right: 2px;
  top: 92px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 58px;
  color: #ffe7b5;
  font-size: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(129, 138, 143, 0.92));
  clip-path: polygon(50% 0, 94% 22%, 85% 76%, 50% 100%, 15% 76%, 6% 22%);
  text-shadow: 0 2px 2px #321500;
}

.character-gem-shortcut {
  position: absolute;
  z-index: 5;
  right: -2px;
  top: 150px;
  display: grid;
  grid-template-columns: 30px auto;
  align-items: center;
  width: 76px;
  min-height: 48px;
  padding: 4px 8px;
  border: 0;
  border-radius: 24px;
  background: rgba(76, 61, 40, 0.8);
  color: #fff0c7;
  font-size: 15px;
}

.character-gem-shortcut span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 238, 195, 0.16);
  color: #fff3cf;
}

.panel-character .stat-stack {
  position: absolute;
  z-index: 4;
  left: 50%;
  right: auto;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 170px;
  min-height: 38px;
  padding: 2px 34px 4px 42px;
  border: 0;
  background:
    radial-gradient(circle at 20px 18px, #ffe850 0 12px, #ff7a00 13px 22px, transparent 23px),
    linear-gradient(90deg, #ee7719, #b84008);
  clip-path: polygon(12% 8%, 90% 8%, 100% 50%, 90% 92%, 10% 92%, 0 50%);
  transform: translateX(-50%);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
}

.panel-character .stat-stack span,
.panel-character .stat-stack p {
  display: none;
}

.panel-character .stat-stack strong {
  display: block;
  margin: 0;
  color: #fff5d3;
  font-size: 21px;
  letter-spacing: 0;
  text-shadow: 0 3px 1px #6a2400;
}

.panel-character .stat-stack strong::after {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  border: 2px solid rgba(255, 246, 205, 0.82);
  border-radius: 50%;
  color: #fff2c8;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
}

.panel-character .equip-slots {
  position: relative;
  z-index: 4;
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 88px;
  gap: 8px;
  align-content: start;
}

.panel-character .equip-slots button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 7px 5px 5px;
  border: 2px solid rgba(31, 24, 18, 0.84);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 34%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 3px, transparent 3px 6px),
    linear-gradient(180deg, #6f675e, #2c2924 68%, #17120e);
  color: #fff5d0;
  box-shadow: inset 0 0 0 1px rgba(255, 211, 126, 0.18), 0 4px 8px rgba(0, 0, 0, 0.34);
}

.panel-character .equip-slots button.equipped {
  border-color: rgba(73, 247, 235, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(73, 247, 235, 0.25),
    0 0 18px rgba(73, 247, 235, 0.18);
}

.panel-character .equip-slots button::after,
.character-forge-button i,
.character-merge-button i,
.bag-tabs button::after,
.bag-item::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid #ffb73e;
  border-radius: 50%;
  background: #e92214;
  box-shadow: 0 0 6px rgba(255, 40, 10, 0.7);
}

.panel-character .equip-slots button::after {
  right: -5px;
  top: -6px;
}

.panel-character .equip-slots b {
  position: absolute;
  left: 2px;
  top: 2px;
  padding: 1px 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffbf39, #e16a0d);
  color: #fff8d8;
  font-size: 10px;
}

.panel-character .equip-slots em {
  position: absolute;
  right: 4px;
  bottom: 18px;
  color: #fff2cf;
  font-size: 12px;
  font-style: normal;
}

.panel-character .equip-slots i {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  display: block;
  width: auto;
  height: 10px;
  border: 0;
  background:
    radial-gradient(circle, rgba(21, 15, 10, 0.9) 0 3px, transparent 4px) 0 0 / 16px 10px repeat-x;
}

.gear-icon {
  position: relative;
  display: block;
  width: 44px;
  height: 43px;
  background: var(--gear-image) center / contain no-repeat;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.54));
}

.gear-icon::before {
  content: none;
}

.gear-icon.helm { --gear-image: url("./assets/items/gear-helm.svg"); }
.gear-icon.arm { --gear-image: url("./assets/items/gear-arm.svg"); }
.gear-icon.armor { --gear-image: url("./assets/items/gear-armor.svg"); }
.gear-icon.leg { --gear-image: url("./assets/items/gear-leg.svg"); }
.gear-icon.boot { --gear-image: url("./assets/items/gear-boot.svg"); }
.gear-icon.glove { --gear-image: url("./assets/items/gear-glove.svg"); }

.panel-character .equip-slots button.socket-selected {
  border-color: rgba(255, 215, 81, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 81, 0.42),
    0 0 18px rgba(255, 156, 27, 0.3);
}

.panel-character .equip-slots .gear-gem-sockets {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  height: 13px;
  pointer-events: none;
}

.panel-character .equip-slots .gear-gem-sockets i {
  position: relative;
  inset: auto;
  display: grid;
  place-items: center;
  width: auto;
  height: 13px;
  border: 1px solid rgba(255, 216, 125, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(37, 33, 30, 0.94), rgba(8, 8, 8, 0.96));
  color: #111;
  font-size: 8px;
  line-height: 1;
  pointer-events: auto;
}

.panel-character .equip-slots .gear-gem-sockets i.filled {
  border-color: rgba(255, 190, 65, 0.92);
  background:
    radial-gradient(circle at 42% 34%, rgba(255, 255, 255, 0.8), transparent 26%),
    conic-gradient(from 20deg, #ff7a38, #ffd751, #49f7eb, #925cff, #ff7a38);
  color: #1b0d04;
  text-shadow: none;
}

.panel-character .equip-slots .gear-gem-sockets i.active {
  outline: 2px solid #49f7eb;
  box-shadow: 0 0 10px rgba(73, 247, 235, 0.55);
}

.character-plan-tabs {
  position: relative;
  z-index: 4;
  grid-column: 1 / 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(4, 38px) minmax(74px, 1fr) 34px 38px 38px;
  gap: 4px;
  align-items: center;
  height: 44px;
  padding: 4px 7px;
  border-radius: 12px 12px 4px 4px;
  background: rgba(73, 45, 22, 0.72);
}

.character-plan-tabs button,
.character-plan-tabs strong {
  display: grid;
  place-items: center;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(119, 91, 59, 0.68);
  color: #f8e3c2;
  font-size: 16px;
}

.character-plan-tabs button.active {
  background: linear-gradient(180deg, #ffd84f, #f49816);
  color: #3d2308;
  text-shadow: none;
}

.character-plan-tabs strong {
  justify-content: start;
  padding-left: 8px;
  background: linear-gradient(180deg, #f6ebcc, #998a69);
  color: #483018;
  font-size: 15px;
  text-shadow: none;
}

.character-plan-tabs .gear-plan {
  border-radius: 50%;
  background: #c9b98e;
  color: #5d4e38;
  text-shadow: none;
}

.character-forge-button {
  position: relative;
  z-index: 4;
  grid-column: 3 / 4;
  grid-row: 3;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffd751, #ff9c1b);
  color: #5b2f00;
  font-size: 20px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
  box-shadow: 0 5px 0 #9a520a, 0 8px 12px rgba(0, 0, 0, 0.35);
}

.character-forge-button i {
  right: -5px;
  top: -7px;
}

.panel-character .character-growth {
  display: grid;
  gap: 5px;
  min-height: 52px;
  padding: 8px 10px;
  border-color: rgba(120, 71, 30, 0.66);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 134, 31, 0.16), transparent 52%),
    rgba(26, 13, 7, 0.96);
}

.panel-character .character-growth b {
  font-size: 14px;
}

.panel-character .character-growth span,
.panel-character .character-growth p {
  margin-top: 3px;
  color: #d9c4a3;
  font-size: 11px;
}

.panel-character .panel-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.character-backpack {
  display: grid;
  gap: 8px;
  padding: 0 0 8px;
  background: rgba(24, 12, 7, 0.96);
}

.character-backpack-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px 132px;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 5px 0;
}

.character-backpack-head b {
  color: #d69a61;
  font-size: 20px;
  text-shadow: 0 2px 1px #000;
}

.character-backpack-head b::before {
  content: "⊘ ";
  color: #7d4a20;
}

.character-backpack-head button {
  position: relative;
  min-height: 40px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #756952, #403626);
  color: #f3e1c4;
  font-size: 16px;
}

.character-backpack-head button[data-character-filter]::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 8px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 11px solid #d9cdb6;
}

.character-merge-button {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd751, #ff9c1b) !important;
  color: #5b2f00 !important;
  font-size: 18px !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

.character-merge-button i {
  right: -5px;
  top: -6px;
}

.backpack-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  min-height: 310px;
}

.bag-item {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 2px solid #6d2016;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 216, 114, 0.16), transparent 24%),
    linear-gradient(180deg, #3a160f, #160907);
  box-shadow: inset 0 0 0 1px rgba(255, 206, 91, 0.2), 0 3px 5px rgba(0, 0, 0, 0.4);
}

.bag-item.equipped {
  border-color: #49f7eb;
  box-shadow:
    inset 0 0 0 2px rgba(73, 247, 235, 0.28),
    0 0 16px rgba(73, 247, 235, 0.24);
}

.bag-item.selected {
  transform: translateY(-2px);
  border-color: #ffd751;
  box-shadow:
    inset 0 0 0 2px rgba(255, 215, 81, 0.36),
    0 0 18px rgba(255, 156, 27, 0.34);
}

.bag-item:disabled {
  cursor: not-allowed;
  filter: grayscale(0.75);
  opacity: 0.52;
}

.bag-item.disabled {
  cursor: not-allowed;
  filter: grayscale(0.75);
  opacity: 0.52;
}

.bag-item::after {
  right: -6px;
  top: -7px;
}

.bag-item span,
.bag-item img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
}

.bag-item span {
  clip-path: polygon(28% 0, 74% 0, 100% 28%, 88% 88%, 50% 100%, 12% 88%, 0 28%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 20% 72%, rgba(255, 255, 255, 0.45)),
    radial-gradient(circle at 46% 45%, #ff777f, #cf263e 66%, #6b0f17);
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.48));
}

.bag-item.prism span {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.75), transparent 20% 72%, rgba(255, 255, 255, 0.46)),
    conic-gradient(from 25deg, #ff7078, #ffd75e, #36f2df, #7f77ff, #ff7078);
}

.bag-item.amber {
  border-color: #a26c10;
}

.bag-item.amber span {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 20% 72%, rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at 46% 45%, #ffd384, #e98323 66%, #884000);
}

.bag-item b {
  position: absolute;
  left: 3px;
  top: 1px;
  color: #ffd23b;
  font-size: 12px;
  line-height: 1;
}

.bag-item em {
  position: absolute;
  right: 3px;
  bottom: 1px;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.bag-item i {
  position: absolute;
  left: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.64);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}

.bag-item-action {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  min-height: 24px;
  border: 1px solid rgba(255, 235, 166, 0.9);
  border-radius: 5px;
  background: linear-gradient(180deg, #ffd95a, #e77b11);
  color: #3b2104;
  font-size: 12px;
  font-weight: 800;
  text-shadow: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.bag-item-action:disabled {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, #5c5344, #2a241d);
  color: #b4a184;
}

.bag-item.selected .bag-item-action ~ i {
  opacity: 0;
}

.bag-detail {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 102px;
  gap: 9px;
  align-items: center;
  min-height: 84px;
  padding: 8px;
  border: 1px solid rgba(217, 151, 47, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 190, 73, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(58, 31, 18, 0.96), rgba(20, 9, 6, 0.98));
}

.bag-detail-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 215, 81, 0.58);
  border-radius: 6px;
  background:
    var(--item-image) center / 82% 82% no-repeat,
    radial-gradient(circle at 48% 40%, rgba(255, 255, 255, 0.5), transparent 22%),
    linear-gradient(180deg, #7b2019, #220b08);
  color: #fff0c8;
  font-size: 24px;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.28);
}

.bag-detail b,
.bag-detail span,
.bag-detail p {
  display: block;
  margin: 0;
}

.bag-detail b {
  color: #fff0c8;
  font-size: 15px;
}

.bag-detail span {
  margin-top: 3px;
  color: #49f7eb;
  font-size: 11px;
}

.bag-detail p {
  margin-top: 4px;
  color: #d9cdb6;
  font-size: 11px;
  line-height: 1.35;
}

.bag-detail button {
  min-height: 42px;
  border: 2px solid #ffc94e;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd75d, #c56a05);
  color: #3b2104;
  font-size: 13px;
  text-shadow: none;
}

.bag-detail button:disabled {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #514838, #2b241b);
  color: #a99b85;
}

.bag-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  min-height: 48px;
  border-top: 1px solid rgba(255, 156, 27, 0.32);
  background: #120b07;
}

.bag-tabs button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: #c6b99f;
  color: #3b2d20;
  font-size: 18px;
  text-shadow: none;
}

.bag-tabs button.active {
  background: linear-gradient(180deg, #ffb22a, #ef7a14);
  color: #fff6df;
  text-shadow: 0 2px 1px #6a2600;
}

.bag-tabs button.active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 18px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.bag-tabs button::after {
  right: 14px;
  top: -7px;
}

.panel-equipment {
  display: grid;
  grid-template-columns: 1fr 58px;
  grid-template-rows: minmax(190px, 1fr) auto auto 62px 54px;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 10px;
}

.weapon-card {
  display: grid;
  grid-template-rows: 54% 1fr;
  overflow: hidden;
  padding: 10px;
}

.weapon-art {
  background:
    radial-gradient(circle at 55% 45%, rgba(255, 119, 28, 0.36), transparent 26%),
    linear-gradient(150deg, transparent 20%, #e27a1d 21% 30%, #24292b 31% 60%, #0a0d0e 61%);
  filter: drop-shadow(0 0 18px rgba(255, 109, 19, 0.45));
}

.weapon-art-frost {
  background:
    radial-gradient(circle at 55% 45%, rgba(169, 247, 255, 0.42), transparent 28%),
    linear-gradient(150deg, transparent 18%, #9feeff 19% 29%, #27353b 30% 62%, #091012 63%);
  filter: drop-shadow(0 0 18px rgba(169, 247, 255, 0.46));
}

.weapon-art-thunder {
  background:
    radial-gradient(circle at 52% 46%, rgba(255, 246, 168, 0.45), transparent 26%),
    linear-gradient(150deg, transparent 19%, #fff36d 20% 28%, #34405a 29% 62%, #0b0d16 63%);
  filter: drop-shadow(0 0 18px rgba(255, 241, 97, 0.48));
}

.weapon-art-void {
  background:
    radial-gradient(circle at 54% 45%, rgba(175, 103, 255, 0.45), transparent 29%),
    linear-gradient(150deg, transparent 18%, #9d65ff 19% 29%, #252034 30% 62%, #09070f 63%);
  filter: drop-shadow(0 0 18px rgba(177, 92, 255, 0.5));
}

.weapon-art-drone {
  background:
    radial-gradient(circle at 52% 46%, rgba(73, 247, 235, 0.38), transparent 28%),
    linear-gradient(150deg, transparent 18%, #49f7eb 19% 29%, #24373a 30% 62%, #071012 63%);
  filter: drop-shadow(0 0 18px rgba(73, 247, 235, 0.44));
}

.weapon-card b {
  display: block;
  color: #ffad35;
  font-size: 22px;
}

.weapon-card span,
.weapon-card p {
  display: block;
  color: #d7d2c8;
  font-size: 13px;
  margin: 6px 0 0;
}

.weapon-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.weapon-list button.active {
  box-shadow: 0 0 0 2px #f6a72a, 0 0 18px rgba(255, 155, 27, 0.45);
}

.equipment-loadout,
.equipment-materials,
.equipment-pack {
  grid-column: 1 / -1;
}

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

.equipment-loadout article {
  min-height: 66px;
  padding: 9px;
}

.equipment-loadout b {
  display: block;
  color: #f4f0e9;
  font-size: 13px;
}

.equipment-materials {
  padding: 11px;
}

.equipment-pack {
  align-items: center;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 62px;
  overflow: hidden;
  padding: 7px;
  position: relative;
  z-index: 1;
}

.panel-equipment > .panel-actions {
  position: relative;
  z-index: 2;
}

.equipment-pack b {
  color: #ffe0a4;
  display: block;
  font-size: 12px;
  line-height: 1.15;
  margin: 0;
}

.equipment-pack div {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42px;
  grid-template-columns: none;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0;
  scrollbar-width: none;
}

.equipment-pack div::-webkit-scrollbar {
  display: none;
}

.equipment-pack i {
  align-items: center;
  aspect-ratio: auto;
  color: transparent;
  display: flex;
  font-style: normal;
  font-size: 13px;
  height: 42px;
  justify-content: center;
  min-width: 0;
  position: relative;
  width: 42px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 74% 74%;
}

.equipment-pack i::after {
  display: none;
  bottom: 2px;
  color: #fff;
  content: "1级";
  font-family: "Microsoft YaHei", system-ui, sans-serif;
  font-size: 8px;
  position: absolute;
  right: 2px;
}

.equipment-pack i[data-tier="purple"] {
  background:
    var(--pack-image, url("./assets/items/chip-core.svg")) center / 74% 74% no-repeat,
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.24), transparent 20%),
    linear-gradient(180deg, #7b35ce, #2b174c);
}

.equipment-pack i[data-tier="orange"] {
  background:
    var(--pack-image, url("./assets/items/gear-armor.svg")) center / 74% 74% no-repeat,
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.28), transparent 20%),
    linear-gradient(180deg, #ff8f25, #5e250b);
}

.equipment-pack i[data-tier="blue"] {
  background:
    var(--pack-image, url("./assets/items/mat-coolant.svg")) center / 74% 74% no-repeat,
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.22), transparent 20%),
    linear-gradient(180deg, #2f90de, #0b315e);
}

.equipment-pack i:nth-child(1) { --pack-image: url("./assets/items/gear-arm.svg"); }
.equipment-pack i:nth-child(2) { --pack-image: url("./assets/items/chip-core.svg"); }
.equipment-pack i:nth-child(3) { --pack-image: url("./assets/items/gear-armor.svg"); }
.equipment-pack i:nth-child(4) { --pack-image: url("./assets/items/gear-boot.svg"); }
.equipment-pack i:nth-child(5) { --pack-image: url("./assets/items/gear-helm.svg"); }
.equipment-pack i:nth-child(6) { --pack-image: url("./assets/items/mat-bolt.svg"); }
.equipment-pack i:nth-child(7) { --pack-image: url("./assets/items/mat-core.svg"); }
.equipment-pack i:nth-child(8) { --pack-image: url("./assets/items/mat-fiber.svg"); }
.equipment-pack i:nth-child(9) { --pack-image: url("./assets/items/gear-boot.svg"); }
.equipment-pack i:nth-child(10) { --pack-image: url("./assets/items/mat-alloy.svg"); }
.equipment-pack i:nth-child(11) { --pack-image: url("./assets/items/gear-armor.svg"); }
.equipment-pack i:nth-child(12) { --pack-image: url("./assets/items/mat-coolant.svg"); }

.panel-shop {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
}

.shop-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  align-content: start;
}

.shop-tabs button {
  min-height: 48px;
  color: #d8d2c6;
}

.shop-tabs button.active {
  color: #ffe6a0;
  background: linear-gradient(180deg, #a66b16, #25170a);
}

.shop-feature {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 150px;
  overflow: hidden;
  padding: 14px;
  position: relative;
  background:
    radial-gradient(circle at 18% 42%, rgba(255,255,255,0.35), transparent 8%),
    radial-gradient(circle at 24% 48%, rgba(255, 203, 84, 0.75), transparent 18%),
    linear-gradient(112deg, #ffbd35 0 38%, #25231d 39% 72%, #111 73%);
}

.shop-feature::before {
  background:
    linear-gradient(135deg, #ffd572, #93611d 48%, #171717 49%),
    linear-gradient(35deg, transparent 25%, rgba(255,255,255,0.28) 26% 31%, transparent 32%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
  content: "";
  height: 92px;
  left: 16px;
  position: absolute;
  top: 34px;
  transform: rotate(-10deg);
  width: 126px;
}

.shop-feature em {
  color: #fff0c8;
  font-size: 14px;
  font-style: normal;
  grid-column: 1 / -1;
  padding-left: 140px;
  position: relative;
  z-index: 1;
}

.shop-feature b {
  color: #fff0c8;
  font-size: 28px;
  justify-self: end;
  position: relative;
  text-shadow: 0 3px 0 #000;
  z-index: 1;
}

.shop-feature span {
  grid-column: 1 / -1;
  color: #dff8ff;
  font-size: 12px;
  justify-self: end;
  max-width: 270px;
  position: relative;
  text-align: right;
  z-index: 1;
}

.shop-feature button {
  grid-column: 2;
  grid-row: 2;
  min-height: 34px;
  padding: 0 18px;
  border: 2px solid #ffda71;
  background: linear-gradient(180deg, #ffd75d, #d07608);
  color: #3b2104;
  font-size: 13px;
  position: relative;
  text-shadow: none;
  z-index: 1;
}

.shop-grid {
  align-content: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding-bottom: 8px;
}

.shop-feature.is-hidden,
.shop-grid article.is-hidden {
  display: none;
}

.shop-grid article {
  min-height: 156px;
  padding: 8px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 249, 231, 0.96), rgba(255, 226, 174, 0.92) 55%, rgba(226, 111, 8, 0.92));
  color: #3a210e;
  text-shadow: none;
}

.shop-grid article i {
  display: block;
  width: 74px;
  height: 54px;
  margin: 4px auto 10px;
  background:
    var(--shop-image, url("./assets/items/shop-pack.svg")) center / contain no-repeat,
    linear-gradient(180deg, #5b6970, #1c2529),
    radial-gradient(circle, #3fbfff, transparent);
  border: 2px solid #c48627;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.3), 0 8px 14px rgba(0, 0, 0, 0.38);
}

.shop-grid article[data-shop-item="weapon_pack"] i,
.shop-grid article[data-shop-item="fire_calibration"] i { --shop-image: url("./assets/items/gear-arm.svg"); }
.shop-grid article[data-shop-item="hero_pack"] i { --shop-image: url("./assets/items/gem-prism.svg"); }
.shop-grid article[data-shop-item="frost_core"] i { --shop-image: url("./assets/items/mat-crystal.svg"); }
.shop-grid article[data-shop-item="daily_supply"] i { --shop-image: url("./assets/items/mat-alloy.svg"); }
.shop-grid article[data-shop-item="advanced_supply"] i,
.shop-grid article[data-shop-item="limited_pack"] i,
.shop-grid article[data-shop-item="growth_pack"] i { --shop-image: url("./assets/items/shop-pack.svg"); }

.shop-grid article b,
.shop-grid article span {
  display: block;
  font-size: 12px;
}

.shop-grid article b {
  color: #3a210e;
}

.shop-grid article span {
  color: #6a270d;
  margin-top: 7px;
}

.shop-grid article button {
  width: 100%;
  min-height: 32px;
  margin-top: 9px;
  border: 2px solid #ffc94e;
  background: linear-gradient(180deg, #ffd75d, #c56a05);
  color: #3b2104;
  font-size: 12px;
  text-shadow: none;
}

.panel-base {
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto repeat(2, minmax(132px, 1fr));
  overflow-y: auto;
  padding-bottom: 10px;
}

.base-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 11px;
}

.base-status b {
  display: block;
  color: #fff0c8;
  font-size: 18px;
}

.base-status span {
  display: block;
  margin-top: 5px;
  color: #d2d8d3;
  font-size: 12px;
}

.base-status button,
.base-grid button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 218, 113, 0.72);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd75d, #c56a05);
  color: #3b2104;
  font-size: 12px;
  text-shadow: none;
}

.base-status button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

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

.base-grid article {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 9px;
}

.base-grid b,
.base-grid span {
  display: block;
}

.base-grid b {
  color: #f4f0e9;
  font-size: 14px;
}

.base-grid span {
  margin-top: 4px;
  color: #84fff4;
  font-size: 12px;
}

.base-grid i,
.mission-card i,
.mission-list i {
  display: block;
  height: 7px;
  margin-top: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
}

.base-grid i::before {
  content: "";
  display: block;
  width: var(--fill);
  height: 100%;
  background: linear-gradient(90deg, #49f7eb, #f8c14a);
}

.base-status button:disabled,
.base-grid button:disabled,
.mail-list button:disabled,
.friend-tools button:disabled,
.friend-list button:disabled {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #514838, #2b241b);
  color: #a99b85;
}

.icon-board {
  padding: 12px;
}

.icon-board h3 {
  margin: 0 0 12px;
  color: #f0e8d9;
  font-size: 16px;
  text-align: center;
}

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

.icon-grid i {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 50%;
  border: 2px solid #38474d;
  background: radial-gradient(circle, rgba(255, 165, 38, 0.28), #101719 64%);
  font-style: normal;
  font-size: 24px;
}

.resource-icons i {
  background: radial-gradient(circle, rgba(73, 247, 235, 0.24), #101719 64%);
}

.panel-missions,
.panel-mail,
.panel-rank,
.panel-friends {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-bottom: 10px;
}

.panel-missions {
  grid-template-rows: auto 1fr;
}

.mission-card,
.mission-list article,
.mail-list article,
.rank-list article,
.friend-list article {
  padding: 11px;
}

.mission-primary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
}

.mission-primary strong {
  align-self: center;
  color: #49f7eb;
  font-size: 12px;
  grid-column: 2;
  grid-row: 3;
  text-align: right;
}

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

.mission-stats article {
  min-height: 58px;
  padding: 8px 6px;
  border: 1px solid rgba(217, 151, 47, 0.34);
  background: linear-gradient(180deg, rgba(255, 190, 73, 0.13), rgba(8, 11, 12, 0.9));
  text-align: center;
}

.mission-stats b,
.mission-stats span {
  display: block;
}

.mission-stats b {
  color: #fff0c8;
  font-size: 16px;
}

.mission-stats span {
  margin-top: 4px;
  color: #99a8a3;
  font-size: 11px;
}

.mission-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}

.mission-card b,
.mission-list b,
.mail-list b,
.friend-list b {
  display: block;
  color: #fff0c8;
  font-size: 15px;
}

.mission-card span,
.mission-list span,
.mission-card small,
.mission-list small,
.mail-list span,
.friend-list span,
.rank-list i {
  display: block;
  margin-top: 5px;
  color: #cfd8d4;
  font-size: 12px;
  font-style: normal;
}

.mission-card small,
.mission-list small {
  color: #f8c14a;
  font-size: 11px;
  grid-column: 1;
}

.mission-card button,
.mission-list button,
.mail-list button,
.friend-list button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(73, 247, 235, 0.42);
  background: linear-gradient(180deg, #243e42, #0c1718);
  color: #8ffdf4;
  font-size: 12px;
}

.mission-card button:not(:disabled),
.mission-list button:not(:disabled),
.mail-list button:not(:disabled),
.friend-tools button:not(:disabled),
.friend-list button:not(:disabled) {
  border-color: rgba(255, 218, 113, 0.72);
  background: linear-gradient(180deg, #ffd75d, #c56a05);
  color: #3b2104;
}

.mission-card button:disabled,
.mission-list button:disabled {
  opacity: 0.72;
}

.mission-card i,
.mission-list i {
  grid-column: 1 / -1;
}

.mission-card em,
.mission-list em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #49f7eb, #f8c14a);
}

.mission-list,
.mail-list,
.friend-list,
.rank-list {
  display: grid;
  gap: 8px;
}

.mission-list article.complete {
  border-color: rgba(73, 247, 235, 0.56);
}

.mission-card.claimed,
.mission-list article.claimed,
.mail-list article.claimed,
.friend-list article.claimed {
  filter: saturate(0.75);
}

.mail-list article,
.friend-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
}

.mail-list span,
.friend-list span {
  grid-column: 1;
}

.mail-list button,
.friend-list button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.rank-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.rank-podium article {
  min-height: 112px;
  padding: 10px 6px;
  text-align: center;
}

.rank-podium article.first {
  min-height: 142px;
  border-color: rgba(73, 247, 235, 0.54);
}

.rank-podium span,
.rank-podium b,
.rank-podium i {
  display: block;
}

.rank-podium span {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 208, 116, 0.46);
  color: #0b1112;
  background: #f8c14a;
  font-weight: 900;
}

.rank-podium b,
.rank-list span {
  color: #fff0c8;
  font-size: 13px;
}

.rank-podium i {
  margin-top: 7px;
  color: #84fff4;
  font-size: 12px;
  font-style: normal;
}

.rank-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 10px;
  align-items: center;
}

.rank-list b {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #f8c14a;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 208, 116, 0.22);
}

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

.friend-tools button {
  min-height: 44px;
  color: #ffe0a0;
  font-size: 13px;
}

.test-panel-toggle {
  position: absolute;
  left: 12px;
  bottom: 90px;
  z-index: 30;
  width: 54px;
  height: 32px;
  border: 1px solid rgba(73, 247, 235, 0.5);
  background: rgba(8, 14, 16, 0.72);
  color: #8ffdf4;
  font-size: 11px;
  letter-spacing: 0;
}

.test-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 128px;
  z-index: 35;
  padding: 12px;
  border: 1px solid rgba(73, 247, 235, 0.42);
  background:
    linear-gradient(180deg, rgba(12, 22, 24, 0.96), rgba(7, 10, 12, 0.94)),
    radial-gradient(circle at 20% 0, rgba(73, 247, 235, 0.18), transparent 34%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.test-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-panel header span,
.test-panel p {
  color: #9aa9a7;
  font-size: 11px;
}

.test-panel header strong {
  display: block;
  margin-top: 2px;
  color: #ffcf74;
  font-size: 15px;
}

.test-panel header button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #151a1b;
  color: #f0e8d9;
}

.test-panel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.test-panel-stats div {
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.test-panel-stats dt {
  color: #87928f;
  font-size: 10px;
}

.test-panel-stats dd {
  margin: 4px 0 0;
  color: #f4f7f1;
  font-size: 15px;
  font-weight: 800;
}

.test-panel-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.test-panel-actions button {
  min-height: 38px;
  padding: 0 6px;
  border: 1px solid rgba(255, 208, 116, 0.32);
  background: linear-gradient(180deg, #334145, #141a1b);
  color: #ffe0a0;
  font-size: 11px;
}

.test-panel-ad-actions button:first-child {
  border-color: rgba(73, 247, 235, 0.46);
  color: #8ffdf4;
}

.test-qr-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 4px 8px;
  align-items: center;
  margin-top: 9px;
  padding: 8px;
  border: 1px solid rgba(73, 247, 235, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

.test-qr-card b,
.test-qr-card span {
  display: block;
}

.test-qr-card b {
  color: #ffcf74;
  font-size: 12px;
}

.test-qr-card span {
  overflow: hidden;
  color: #b9c8c5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-qr-card i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #f0e8d9;
  background:
    linear-gradient(90deg, #111 25%, transparent 25% 50%, #111 50% 75%, transparent 75%),
    linear-gradient(#111 25%, transparent 25% 50%, #111 50% 75%, transparent 75%),
    #f0e8d9;
  background-size: 12px 12px;
  color: transparent;
  font-style: normal;
}

.feedback-modal {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.64);
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
  padding: 18px;
  border: 1px solid rgba(73, 247, 235, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 28, 31, 0.98), rgba(8, 10, 12, 0.98)),
    radial-gradient(circle at 20% 0, rgba(73, 247, 235, 0.22), transparent 34%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.feedback-panel span {
  color: #49f7eb;
  font-size: 12px;
}

.feedback-panel b {
  color: #fff0c8;
  font-size: 20px;
}

.feedback-panel label {
  display: grid;
  gap: 5px;
  color: #b9c8c5;
  font-size: 12px;
}

.feedback-panel input,
.feedback-panel textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
  color: #f4f7f1;
  font: inherit;
  font-size: 13px;
  padding: 9px;
}

.feedback-panel textarea {
  resize: vertical;
}

.feedback-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feedback-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 208, 116, 0.42);
  background: linear-gradient(180deg, #334145, #141a1b);
  color: #ffe0a0;
}

.feedback-actions button:last-child {
  border-color: rgba(255, 218, 113, 0.72);
  background: linear-gradient(180deg, #ffd75d, #c56a05);
  color: #3b2104;
}

button,
[role="button"],
.shop-grid article,
.shop-feature,
.equipment-pack i,
.icon-board .icon-grid i,
.rank-podium article,
.rank-list article,
.pass-card,
.supply-crate,
.profile-block,
.hub-resources span,
.character-currency-strip span,
.panel-resource-mini span,
.battle-supply {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:active,
[role="button"]:active,
.shop-grid article:active,
.shop-feature:active,
.equipment-pack i:active,
.icon-board .icon-grid i:active,
.rank-podium article:active,
.rank-list article:active {
  transform: translateY(1px) scale(0.985);
}

button:focus-visible,
[role="button"]:focus-visible,
.shop-grid article:focus-visible,
.shop-feature:focus-visible,
.equipment-pack i:focus-visible,
.icon-board .icon-grid i:focus-visible,
.rank-podium article:focus-visible,
.rank-list article:focus-visible {
  outline: 2px solid rgba(255, 190, 70, 0.95);
  outline-offset: 2px;
}

.is-selected {
  border-color: rgba(255, 196, 68, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(255, 166, 38, 0.45), 0 0 22px rgba(255, 126, 28, 0.18) !important;
}

.interaction-pulse {
  animation: interactionPulse 0.26s ease-out;
}

@keyframes interactionPulse {
  0% { transform: scale(0.97); filter: brightness(1.15); }
  100% { transform: scale(1); filter: brightness(1); }
}

.equipment-pack i,
.icon-board .icon-grid i {
  user-select: none;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.shop-grid article,
.shop-feature,
.rank-podium article,
.rank-list article,
.pass-card,
.supply-crate,
.profile-block,
.hub-resources span,
.character-currency-strip span,
.panel-resource-mini span,
.battle-supply {
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.hub-resources span:hover,
.character-currency-strip span:hover,
.panel-resource-mini span:hover,
.battle-supply:hover,
.pass-card:hover,
.supply-crate:hover,
.profile-block:hover,
.equipment-pack i:hover,
.icon-board .icon-grid i:hover,
.shop-grid article:hover,
.shop-feature:hover,
.rank-podium article:hover,
.rank-list article:hover {
  filter: brightness(1.08);
}

@media (max-width: 430px) {
  .hub-top,
  .panel-header {
    left: 8px;
    right: 8px;
    top: 8px;
  }

  .hub-resources span:nth-child(3) {
    display: none;
  }

  .battle-button {
    bottom: 78px;
    min-width: 220px;
  }

  .panel-content {
    left: 8px;
    right: 8px;
  }

  .test-panel {
    left: 8px;
    right: 8px;
  }
}
