@font-face {
  font-family: Lilita;
  src: url('./assets/ui/font.ttf') format('truetype');
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #0b1328;
  --panel: #1e3154;
  --panel-light: #304974;
  --blue: #52b5fc;
  --yellow: #ffce36;
  --muted: #b8c8df;
  --edge: 3px solid #0b142a;
  --shadow: 0 4px 0 #09132c;
  --font: Lilita, 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
  --copy: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: #f7faff;
  font-family: var(--copy);
  font-weight: 600;
  background: radial-gradient(ellipse at 45% -10%, #225184 0%, #182d52 48%, #101d38 100%) fixed;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #fff1a2;
  outline-offset: 2px;
  z-index: 12;
}
h1,
h2,
h3,
p {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
  user-select: none;
}
.icon {
  width: 1.13em;
  height: 1.13em;
  vertical-align: middle;
  flex: none;
  stroke-width: 2.2;
}
#announce {
  position: fixed;
  z-index: 30;
  bottom: 15px;
  left: 50%;
  transform: translate(-50%, 9px);
  max-width: 90vw;
  padding: 9px 16px;
  border-radius: 8px;
  border: 2px solid #43576e;
  background: #132037f5;
  color: white;
  box-shadow: 0 4px 13px #0006;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.13s,
    transform 0.13s;
  font-size: 14px;
}
#announce.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(660px, calc(100vw - 28px));
  max-height: min(82vh, 785px);
  padding: 0;
  border: 3px solid #101a2d;
  border-radius: 12px;
  background: #243b5f;
  color: white;
  box-shadow:
    0 6px 0 #10172a,
    0 22px 80px #090d1bbd;
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: #0b1529ae;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #2e4d7b;
  padding: 12px 16px;
  border-bottom: 2px solid #152843;
}
.dialog-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dialog-head h2 {
  font-size: 20px;
}
.close {
  padding: 4px;
  width: 34px;
  height: 34px;
  min-height: 0;
  background: #cc594f;
}
.back {
  font-size: 12px;
}
.back .icon {
  transform: rotate(180deg);
}
.dialog-body {
  overflow: auto;
  padding: 16px;
  scrollbar-color: #6185ad #1a2f4b;
}
.dialog-body h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.dialog-body p {
  font-size: 13px;
  color: #d4e1f1;
  line-height: 1.65;
}
.codex-groups {
  display: grid;
  gap: 15px;
}
.codex-row,
.target-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.codex-hero {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 2px solid #152640;
  border-bottom: 3px solid var(--rarity);
  background: #304b70;
  border-radius: 7px;
  padding: 5px;
  text-align: left;
  min-width: 0;
  font-size: 13px;
}
.codex-hero img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
}
.codex-hero span {
  min-width: 0;
}
.codex-hero b,
.codex-hero small {
  display: block;
}
.codex-hero small {
  font-size: 10px;
  font-weight: 600;
  color: #d2deeb;
  margin-top: 2px;
}
.codex-hero:not(:disabled):hover {
  background: #42628b;
}
.codex-hero:disabled {
  opacity: 0.54;
}
.hero-intro {
  display: flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  gap: 15px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--rarity), #182b46 60%), #243b5f 90%);
  border-left: 5px solid var(--rarity);
  padding: 6px 14px;
}
.hero-intro > div:first-child {
  width: 105px;
  height: 113px;
}
.hero-render {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.hero-summary .coin {
  width: 15px;
  height: 15px;
  margin: 0 3px;
}
.hero-summary h3 {
  font-size: 26px;
  margin: 2px 0;
}
.hero-summary small {
  color: var(--rarity);
}
.star-select {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.star-select .btn {
  color: var(--yellow);
  font-size: 12px;
  min-height: 24px;
  padding: 2px 6px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 12px 0 6px;
}
.stat-grid div {
  background: #1b2f4c;
  padding: 7px;
  border-radius: 5px;
}
.stat-grid small,
.stat-grid b {
  display: block;
}
.stat-grid small {
  color: #bed0e6;
  font-size: 11px;
}
.stat-grid b {
  font-size: 15px;
  margin-top: 3px;
}
.super-info,
.gear-guide > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: #1d3150;
  border-radius: 6px;
}
.super-info {
  margin-top: 9px;
}
.super-info > img,
.gear-guide img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}
.super-info b,
.gear-guide b,
.ability-choice b {
  font-size: 14px;
}
.ability-section {
  margin-top: 15px;
}
.ability-section h3 small {
  color: #b6c8dc;
  font-weight: 500;
  font-size: 11px;
  margin-left: 4px;
}
.ability-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.ability-choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  border: 2px solid #172a44;
  border-radius: 6px;
  background: #2c4567;
  padding: 8px;
}
.ability-choice.chosen {
  border-color: #ecc853;
  background: #464a55;
}
.ability-choice img {
  width: 37px;
  height: 37px;
  object-fit: contain;
  flex: none;
}
.ability-choice b,
.ability-choice small {
  display: block;
}
.ability-choice small {
  font-size: 12px;
  line-height: 1.55;
  color: #d2ddeb;
  margin-top: 4px;
}
.ability-choice .icon {
  color: var(--yellow);
}
.gear-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.gear-button img {
  height: 28px;
  width: 28px;
}
.target-list {
  margin-top: 10px;
}
.gear-guide,
.rules-list,
.match-menu {
  display: grid;
  gap: 9px;
}
.dialog-lead {
  margin-bottom: 12px;
}
.rules-list section {
  padding: 7px 0;
  border-bottom: 1px solid #395173;
}
.rules-list section:last-child {
  border: 0;
}
.rules-list h3 {
  color: #ffe38b;
  margin-bottom: 4px;
}
.match-mode {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: #304e77;
  border: 2px solid #152640;
  border-radius: 7px;
  padding: 10px;
}
.match-mode .icon {
  width: 28px;
  height: 28px;
  color: #ffdc58;
}
.match-mode b,
.match-mode small {
  display: block;
}
.match-mode small {
  font-size: 12px;
  color: #c2d5eb;
  margin-top: 3px;
}
.match-mode:hover {
  background: #3c5f8e;
}
.dialog-foot {
  margin-top: 10px;
}
.handoff {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 20px;
  gap: 14px;
}
.handoff > .icon {
  width: 54px;
  height: 54px;
  color: var(--yellow);
}
.handoff p {
  color: #c6d7e9;
}
.handoff h1 {
  font-size: 30px;
}
