:root {
  color-scheme: dark;
  --ink: #111311;
  --header: #171a17;
  --panel: #1e221e;
  --panel-raised: #272c27;
  --line: #454b43;
  --line-soft: #333832;
  --text: #f3efe1;
  --muted: #aaa99f;
  --gold: #d8ad51;
  --gold-bright: #f1cc70;
  --green: #416453;
  --burgundy: #74404a;
  --blue: #4e6879;
  --common: #9ca49d;
  --rare: #6aa6c8;
  --epic: #ad78c5;
  --legendary: #e2b44f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body,
button {
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

button svg,
a svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

[hidden] {
  display: none !important;
}

.game-app {
  display: grid;
  width: 100%;
  height: 100dvh;
  grid-template-rows: 66px minmax(0, 1fr);
  background: var(--ink);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 42px minmax(260px, 1fr) minmax(460px, 620px) minmax(142px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #e8e4d7;
  background: var(--panel);
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover:not(:disabled) {
  border-color: #716c5d;
  background: var(--panel-raised);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.icon-button .mute-line {
  display: none;
}

.icon-button.is-muted .sound-wave {
  display: none;
}

.icon-button.is-muted .mute-line {
  display: block;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.brand strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small,
.metrics span,
.eyebrow,
.result-header p,
.collection-header p {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.brand-seal {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #856c39;
  border-radius: 50%;
  color: #211b10;
  background: var(--gold);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 800;
}

.metrics {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metrics > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  padding: 0 14px;
  border-right: 1px solid var(--line-soft);
}

.metrics > div:last-child {
  border-right: 0;
}

.metrics strong {
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.collection-button,
.battle-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #766139;
  border-radius: 5px;
  color: #f0d58c;
  background: #2b2519;
  cursor: pointer;
}

.collection-button svg,
.battle-button svg {
  width: 18px;
  height: 18px;
}

.battle-button {
  border-color: #754c55;
  color: #efc7cf;
  background: #2f2024;
}

.battle-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.summoning-hall {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(250px, 320px) minmax(360px, 1fr) minmax(270px, 340px);
  overflow: hidden;
  background: #171b18;
  isolation: isolate;
}

.hall-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #202620;
}

.hall-backdrop::before {
  position: absolute;
  inset: 0 0 auto;
  height: 58%;
  background: #27342f;
  content: "";
}

.hall-backdrop::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  border-top: 1px solid #465044;
  background:
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(9, 12, 10, 0.22) 120px 122px),
    #1a1e1a;
  content: "";
}

.window {
  position: absolute;
  top: 50px;
  width: 112px;
  height: 235px;
  border: 9px solid #161b18;
  border-radius: 55px 55px 4px 4px;
  background: #4d6570;
  box-shadow: inset 0 0 0 2px #76888a;
}

.window::before,
.window::after {
  position: absolute;
  background: #1c2422;
  content: "";
}

.window::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 5px;
  transform: translateX(-50%);
}

.window::after {
  top: 48%;
  right: 0;
  left: 0;
  height: 5px;
}

.window-one {
  left: 10%;
}

.window-two {
  left: 50%;
  transform: translateX(-50%);
}

.window-three {
  right: 10%;
}

.candle {
  position: absolute;
  width: 3px;
  height: 31px;
  background: #e5dcb8;
  box-shadow: 0 0 15px 3px rgba(235, 185, 83, 0.28);
  animation: float 4s ease-in-out infinite;
}

.candle::before {
  position: absolute;
  top: -12px;
  left: -3px;
  width: 9px;
  height: 12px;
  border-radius: 50% 50% 45% 45%;
  background: #f0b84d;
  content: "";
}

.candle-one {
  top: 20%;
  left: 38%;
}

.candle-two {
  top: 13%;
  left: 62%;
  animation-delay: -1.6s;
}

.candle-three {
  top: 31%;
  left: 47%;
  animation-delay: -2.4s;
}

.candle-four {
  top: 24%;
  left: 73%;
  animation-delay: -0.8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

.pool-panel,
.history-panel {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 28px 24px;
  background: rgba(20, 23, 20, 0.92);
  backdrop-filter: blur(6px);
}

.pool-panel {
  border-right: 1px solid var(--line);
}

.pool-panel h1 {
  margin: 5px 0 22px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 31px;
  font-weight: 600;
}

.pool-copy {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
}

.featured-card {
  display: grid;
  width: 100%;
  min-height: 75px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #816933;
  border-radius: 6px;
  color: inherit;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--featured-art, #55462f), #171a17 52%), #2b261a 68%);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 150ms ease;
}

.featured-card:hover {
  border-color: #bd9847;
}

.featured-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid #8f7334;
  border-radius: 50%;
  color: #f1cc70;
  background: #1d1b15;
  font-size: 24px;
}

.featured-card div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.featured-card strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-card small {
  color: var(--muted);
  font-size: 10px;
}

.featured-card b {
  color: var(--legendary);
  font-size: 10px;
}

.featured-side {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.featured-side svg {
  width: 15px;
  height: 15px;
  color: #a9935c;
}

.featured-rule {
  margin: 8px 0 0;
  color: #c5b57e;
  font-size: 9px;
  line-height: 1.45;
}

.rates {
  display: grid;
  margin: 18px 0 0;
}

.rates div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-bottom: 1px solid var(--line-soft);
}

.rates dt {
  color: var(--muted);
  font-size: 11px;
}

.rates dd {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.pity {
  display: grid;
  gap: 7px;
  margin-top: 24px;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.pity span {
  color: var(--muted);
  font-size: 10px;
}

.pity strong {
  color: #e7d397;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.pity i {
  display: block;
  height: 8px;
  grid-column: 1 / -1;
  border: 1px solid #5f5741;
  background: #25251f;
}

.pity i b {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 180ms ease;
}

.guarantee {
  margin: 12px 0 0;
  color: #c7b681;
  font-size: 10px;
}

.draw-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: center;
  justify-items: center;
  padding: 24px;
}

.magic-ring {
  position: relative;
  display: grid;
  width: min(360px, 58vh);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(216, 173, 81, 0.32);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 22px rgba(10, 13, 11, 0.18),
    0 0 60px rgba(216, 173, 81, 0.08);
}

.magic-ring::before,
.magic-ring::after {
  position: absolute;
  border: 1px solid rgba(234, 210, 147, 0.22);
  border-radius: 50%;
  content: "";
}

.magic-ring::before {
  inset: 13%;
}

.magic-ring::after {
  inset: 28%;
}

.magic-ring > i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(240, 195, 92, 0.85);
}

.magic-ring > i:nth-child(1) {
  top: -6px;
  left: 50%;
}

.magic-ring > i:nth-child(2) {
  top: 50%;
  right: -6px;
}

.magic-ring > i:nth-child(3) {
  bottom: -6px;
  left: 50%;
}

.magic-ring > i:nth-child(4) {
  top: 50%;
  left: -6px;
}

.magic-ring.is-drawing {
  animation: ringPulse 850ms ease-in-out infinite;
}

@keyframes ringPulse {
  50% {
    border-color: rgba(241, 204, 112, 0.75);
    box-shadow:
      inset 0 0 0 22px rgba(10, 13, 11, 0.18),
      0 0 85px rgba(216, 173, 81, 0.26);
  }
}

.deck {
  position: relative;
  display: block;
  width: 124px;
  height: 180px;
  perspective: 800px;
}

.deck-card {
  position: absolute;
  inset: 0;
  border: 2px solid #c9a956;
  border-radius: 8px;
  background:
    linear-gradient(45deg, transparent 46%, rgba(216, 173, 81, 0.18) 47% 53%, transparent 54%),
    #26231b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.deck-card::before {
  position: absolute;
  inset: 10px;
  border: 1px solid #7f6c3c;
  border-radius: 5px;
  content: "";
}

.deck-middle {
  transform: rotate(-7deg) translate(-12px, 5px);
}

.deck-back {
  transform: rotate(8deg) translate(13px, 6px);
}

.deck-front {
  display: grid;
  place-items: center;
}

.deck-front em {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #a98b42;
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 35px;
  font-style: normal;
}

.magic-ring.is-drawing .deck-front {
  animation: deckLift 650ms ease-in-out infinite alternate;
}

@keyframes deckLift {
  to {
    transform: translateY(-15px) rotateY(10deg);
  }
}

.draw-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 16px 0 18px;
  text-align: center;
}

.draw-copy p {
  margin: 0;
  color: #c8b77f;
  font-size: 10px;
}

.draw-copy strong {
  font-family: Georgia, "Songti SC", serif;
  font-size: 22px;
  font-weight: 500;
}

.draw-actions {
  display: flex;
  gap: 11px;
}

.draw-button {
  position: relative;
  display: flex;
  min-width: 164px;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid;
  border-radius: 6px;
  cursor: pointer;
}

.draw-button:disabled {
  cursor: default;
  filter: grayscale(0.65);
  opacity: 0.48;
}

.single-draw {
  border-color: #68746c;
  background: #2d3731;
}

.ten-draw {
  border-color: #9c7936;
  color: #241c0e;
  background: var(--gold);
}

.draw-label {
  display: grid;
  gap: 3px;
  text-align: left;
}

.draw-label small {
  font-size: 10px;
}

.draw-label strong {
  font-size: 13px;
}

.single-draw svg {
  color: #ebd27f;
}

.guaranteed-mark {
  display: grid;
  height: 24px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid #7e602a;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
}

.history-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
}

.history-panel > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.history-panel h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

.text-button {
  padding: 3px 0;
  border: 0;
  color: #b9ad87;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.32;
}

.history-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.history-list {
  min-height: 0;
  overflow-y: auto;
}

.empty-history {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #777c75;
}

.empty-history span {
  font-size: 27px;
}

.empty-history p {
  margin: 0;
  font-size: 11px;
}

.history-item {
  display: grid;
  min-height: 66px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.history-symbol {
  display: grid;
  width: 36px;
  height: 42px;
  place-items: center;
  border: 1px solid;
  border-radius: 4px;
  background: #232722;
  font-size: 18px;
}

.history-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.history-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy small {
  color: var(--muted);
  font-size: 9px;
}

.history-rarity {
  font-size: 9px;
}

.rarity-common {
  --rarity: var(--common);
  --metal: #aeb5af;
  --metal-dark: #555f59;
  --glow: rgba(174, 181, 175, 0.18);
}

.rarity-rare {
  --rarity: var(--rare);
  --metal: #83c5e8;
  --metal-dark: #315f7b;
  --glow: rgba(74, 164, 214, 0.28);
}

.rarity-epic {
  --rarity: var(--epic);
  --metal: #c89cdd;
  --metal-dark: #68467c;
  --glow: rgba(174, 106, 205, 0.32);
}

.rarity-legendary {
  --rarity: var(--legendary);
  --metal: #f1cf73;
  --metal-dark: #866423;
  --glow: rgba(226, 180, 79, 0.4);
}

.rarity-common .history-symbol,
.rarity-rare .history-symbol,
.rarity-epic .history-symbol,
.rarity-legendary .history-symbol {
  border-color: var(--rarity);
  color: var(--rarity);
}

.history-rarity {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--rarity);
}

.history-up {
  padding: 2px 4px;
  border-radius: 2px;
  color: #241b0b;
  background: var(--gold);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.lineup {
  display: grid;
  gap: 9px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.lineup > span {
  color: var(--muted);
  font-size: 10px;
}

.lineup > strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.lineup-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.lineup-slot {
  display: grid;
  aspect-ratio: 0.72;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--rarity, #6d726d);
  background: #222622;
  font-size: 17px;
}

.result-layer,
.collection-layer,
.battle-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 8, 0.86);
  backdrop-filter: blur(7px);
}

.result-dialog,
.collection-dialog,
.battle-dialog {
  display: grid;
  width: min(1180px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid #625d4e;
  border-radius: 7px;
  background: #191c19;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.result-dialog {
  grid-template-rows: 66px minmax(0, 1fr) 42px;
}

.result-header,
.collection-header,
.battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.result-header h2,
.collection-header h2,
.battle-header h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.result-header p,
.collection-header p,
.battle-header p {
  margin: 0;
  color: #c6af6d;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.secondary-button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid #6a634f;
  border-radius: 5px;
  color: #ddd5bd;
  background: #292b25;
  cursor: pointer;
}

.result-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(5, minmax(122px, 1fr));
  align-content: center;
  gap: 16px;
  overflow-y: auto;
  padding: 22px;
  perspective: 1400px;
}

.result-grid.is-single {
  grid-template-columns: minmax(180px, 250px);
  justify-content: center;
}

.result-tip {
  display: grid;
  margin: 0;
  place-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.card-shell {
  min-width: 0;
  aspect-ratio: 0.7;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
}

.card-shell:disabled {
  cursor: default;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.card-shell.is-revealed .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid;
  border-radius: 8px;
  backface-visibility: hidden;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.44),
    0 0 18px var(--glow, transparent);
}

.card-back {
  display: grid;
  place-items: center;
  border-color: #b18f45;
  background:
    linear-gradient(45deg, transparent 46%, rgba(216, 173, 81, 0.12) 47% 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(216, 173, 81, 0.08) 47% 53%, transparent 54%),
    #29251c;
}

.card-back::before {
  position: absolute;
  inset: 9px;
  border: 1px solid #79683e;
  border-radius: 5px;
  content: "";
}

.card-back::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(207, 170, 79, 0.42);
  border-radius: 50% 50% 12px 12px;
  content: "";
}

.card-back span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px double #b6974a;
  border-radius: 50%;
  color: #e3bd5f;
  background: #1c1a15;
  box-shadow: 0 0 24px rgba(216, 173, 81, 0.16);
  font-family: Georgia, serif;
  font-size: 32px;
}

.card-front {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 5px;
  border-color: var(--metal);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--metal-dark), #111 58%), #171a17 55%),
    #171a17;
  transform: rotateY(180deg);
}

.card-front::before {
  position: absolute;
  inset: 4px;
  z-index: 4;
  border: 1px solid color-mix(in srgb, var(--metal), transparent 35%);
  border-radius: 5px;
  box-shadow:
    inset 0 0 0 2px rgba(10, 12, 10, 0.48),
    inset 0 0 18px var(--glow);
  content: "";
  pointer-events: none;
}

.card-front::after {
  position: absolute;
  inset: 8px;
  z-index: 4;
  border: 1px solid color-mix(in srgb, var(--metal-dark), transparent 45%);
  border-radius: 3px;
  content: "";
  pointer-events: none;
}

.card-foil {
  position: absolute;
  inset: -45%;
  z-index: 3;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.05) 44%,
    color-mix(in srgb, var(--rarity), transparent 68%) 49%,
    rgba(255, 255, 255, 0.12) 53%,
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transform: translateX(-35%) rotate(8deg);
}

.rarity-epic .card-foil,
.rarity-legendary .card-foil {
  opacity: 0.58;
  animation: foilSweep 4.8s ease-in-out infinite;
}

.rarity-legendary .card-front {
  box-shadow:
    0 13px 30px rgba(0, 0, 0, 0.46),
    0 0 25px rgba(226, 180, 79, 0.35);
}

@keyframes foilSweep {
  0%,
  26% {
    transform: translateX(-48%) rotate(8deg);
  }
  58%,
  100% {
    transform: translateX(48%) rotate(8deg);
  }
}

.card-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 2px 2px 0;
  border: 1px solid color-mix(in srgb, var(--metal-dark), transparent 15%);
  border-radius: 4px 4px 2px 2px;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rarity), transparent 72%), transparent 40%),
    linear-gradient(155deg, color-mix(in srgb, var(--art-bg), #fff 7%), color-mix(in srgb, var(--art-bg), #080a09 45%));
}

.card-art::before,
.card-art::after {
  position: absolute;
  content: "";
}

.card-art::before {
  width: 118%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--rarity), transparent 48%);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgba(5, 8, 6, 0.08),
    inset 0 0 0 19px color-mix(in srgb, var(--rarity), transparent 78%);
}

.card-art::after {
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 64%, rgba(255, 255, 255, 0.3) 0 1px, transparent 2px),
    radial-gradient(circle at 25% 70%, rgba(255, 255, 255, 0.26) 0 1px, transparent 2px);
  opacity: 0.7;
}

.card-rarity,
.card-stars,
.card-subtitle,
.card-count,
.card-level-badge,
.card-up-badge,
.card-new {
  position: absolute;
  z-index: 5;
}

.card-rarity {
  top: 8px;
  left: 50%;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--metal), transparent 38%);
  border-radius: 8px;
  color: #f7f0dc;
  background: rgba(15, 17, 15, 0.7);
  font-size: 7px;
  font-weight: 800;
  transform: translateX(-50%);
}

.card-stars {
  top: 9px;
  right: 8px;
  color: var(--metal);
  font-size: 6px;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.card-level-badge {
  top: 8px;
  left: 8px;
  min-width: 30px;
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--metal), transparent 35%);
  border-radius: 3px;
  color: #f4ecd4;
  background: rgba(13, 16, 13, 0.76);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 7px;
  font-style: normal;
  text-align: center;
}

.card-count + .card-level-badge {
  top: 29px;
}

.card-portrait {
  position: relative;
  z-index: 2;
  display: grid;
  width: 62%;
  max-width: 105px;
  aspect-ratio: 0.86;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--metal), transparent 22%);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rarity), transparent 64%), transparent 46%),
    rgba(13, 17, 14, 0.48);
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.32),
    0 0 20px var(--glow);
}

.type-character .card-portrait {
  border-radius: 50% 50% 36% 36%;
}

.type-spell .card-portrait {
  aspect-ratio: 1;
  border-radius: 50%;
  transform: rotate(12deg);
}

.type-spell .card-portrait > * {
  transform: rotate(-12deg);
}

.type-artifact .card-portrait {
  width: 55%;
  aspect-ratio: 1;
  border-radius: 7px;
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
}

.card-portrait > i {
  position: absolute;
  inset: 10%;
  border: 1px solid color-mix(in srgb, var(--rarity), transparent 28%);
  border-radius: inherit;
}

.card-portrait > i::before,
.card-portrait > i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  height: 1px;
  background: color-mix(in srgb, var(--rarity), transparent 54%);
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-portrait > i::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.card-symbol {
  position: relative;
  z-index: 2;
  color: color-mix(in srgb, var(--metal), #fff 8%);
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(32px, 4.5vw, 58px);
  text-shadow:
    0 2px 0 color-mix(in srgb, var(--metal-dark), #000 30%),
    0 0 14px var(--glow);
}

.card-new {
  top: 25px;
  right: 8px;
  padding: 3px 5px;
  border-radius: 3px;
  color: #241c0c;
  background: var(--gold-bright);
  font-size: 8px;
  font-weight: 900;
}

.card-up-badge {
  top: 46px;
  right: 8px;
  padding: 3px 5px;
  border: 1px solid #d5a839;
  border-radius: 3px;
  color: #21180a;
  background: #f1cc70;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(226, 180, 79, 0.4);
}

.card-subtitle {
  right: 8px;
  bottom: 7px;
  left: 8px;
  overflow: hidden;
  color: rgba(245, 240, 222, 0.78);
  font-family: Georgia, "Songti SC", serif;
  font-size: 8px;
  font-style: normal;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.card-info {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  min-height: 72px;
  padding: 9px 10px 10px;
  border-top: 1px solid color-mix(in srgb, var(--metal), transparent 34%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--metal-dark), transparent 74%), transparent),
    #171a17;
}

.card-info strong {
  overflow: hidden;
  color: #f5f0df;
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--metal);
  font-size: 8px;
  font-weight: 800;
}

.card-type i {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--metal), transparent 38%);
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
}

.card-power {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #f1e7c9;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.card-power small {
  color: var(--muted);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 7px;
  font-weight: 500;
}

.collection-dialog {
  height: min(760px, calc(100dvh - 36px));
  grid-template-rows: 66px 54px minmax(0, 1fr);
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.collection-toolbar > span {
  color: var(--muted);
  font-size: 10px;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tabs button {
  height: 31px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.tabs button.is-active {
  border-color: #74613a;
  color: #f0d58c;
  background: #2b261b;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-content: start;
  gap: 13px;
  overflow-y: auto;
  padding: 18px;
}

.collection-card {
  min-width: 0;
  aspect-ratio: 0.7;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  transition:
    filter 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.collection-card:hover:not(.is-locked) {
  transform: translateY(-3px);
}

.collection-card.is-locked {
  cursor: default;
  filter: grayscale(1);
  opacity: 0.38;
}

.collection-card .card-front {
  position: relative;
  width: 100%;
  height: 100%;
  transform: none;
}

.card-count {
  top: 8px;
  left: 8px;
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  color: #fff;
  background: rgba(15, 17, 15, 0.72);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rarity-epic .card-foil,
  .rarity-legendary .card-foil {
    animation: none;
  }
}

.battle-dialog {
  width: min(1120px, 100%);
  height: min(720px, calc(100dvh - 36px));
  grid-template-rows: 66px 72px minmax(0, 1fr) 70px;
}

.upgrade-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 8, 0.9);
  backdrop-filter: blur(8px);
}

.upgrade-dialog {
  display: grid;
  width: min(780px, 100%);
  max-height: calc(100dvh - 36px);
  grid-template-rows: 66px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #625d4e;
  border-radius: 7px;
  background: #191c19;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.upgrade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.upgrade-header p {
  margin: 0;
  color: #c6af6d;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.upgrade-header h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.upgrade-content {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 30px;
  overflow-y: auto;
  padding: 28px;
}

.upgrade-preview {
  width: min(270px, 100%);
  aspect-ratio: 0.7;
  align-self: center;
  justify-self: center;
}

.upgrade-preview .card-front {
  position: relative;
  width: 100%;
  height: 100%;
  transform: none;
}

.upgrade-details {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 12px;
}

.upgrade-kicker {
  margin: 0;
  color: var(--gold);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.upgrade-details h3 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 27px;
}

.upgrade-subtitle {
  margin: -5px 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.upgrade-level {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.upgrade-level > span {
  color: var(--muted);
  font-size: 10px;
}

.upgrade-level > strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.level-pips {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.level-pips i {
  display: block;
  height: 7px;
  border: 1px solid #474c45;
  background: #282c27;
}

.level-pips i.is-active {
  border-color: #8d7235;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(216, 173, 81, 0.25);
}

.upgrade-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.upgrade-stats > div {
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.upgrade-stats > div:last-child {
  border-right: 0;
}

.upgrade-stats span {
  color: var(--muted);
  font-size: 8px;
}

.upgrade-stats strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.upgrade-cost {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 13px 14px;
  border: 1px solid #665638;
  border-radius: 5px;
  background: #28251d;
}

.upgrade-cost > span {
  color: #d7c796;
  font-size: 10px;
}

.upgrade-cost > strong {
  color: var(--gold-bright);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
}

.upgrade-cost > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
}

.upgrade-button {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #9c7936;
  border-radius: 5px;
  color: #241c0e;
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.upgrade-button:disabled {
  cursor: default;
  filter: grayscale(0.55);
  opacity: 0.48;
}

.upgrade-button svg {
  width: 18px;
  height: 18px;
}

.battle-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.battle-header-meta > span {
  color: var(--muted);
  font-size: 10px;
}

.battle-header-meta b {
  color: var(--gold-bright);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.battle-brief {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: #20231f;
}

.battle-brief > div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 20px;
  border-right: 1px solid var(--line);
}

.battle-brief > div:last-child {
  border-right: 0;
}

.battle-brief span {
  color: var(--muted);
  font-size: 9px;
}

.battle-brief strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-board {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(260px, 1fr) 170px minmax(260px, 1fr);
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  background: #171a17;
}

.battle-side {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 34px minmax(0, 1fr);
}

.battle-side > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.battle-side > header strong {
  color: #e5dcc2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.battle-team {
  display: grid;
  min-height: 0;
  align-content: center;
  gap: 9px;
}

.battle-card {
  position: relative;
  display: grid;
  min-height: 62px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--rarity), transparent 38%);
  border-radius: 5px;
  background: color-mix(in srgb, var(--battle-art), #171a17 42%);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.battle-card-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--rarity);
  border-radius: 50%;
  color: var(--rarity);
  background: rgba(16, 18, 16, 0.56);
  font-size: 21px;
}

.battle-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.battle-card-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-card-copy small {
  color: var(--muted);
  font-size: 9px;
}

.battle-card > b {
  color: #e7dfca;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.battle-card.is-active {
  border-color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(216, 173, 81, 0.2);
  transform: translateX(7px);
}

.enemy-side .battle-card.is-active {
  transform: translateX(-7px);
}

.battle-card.is-hit {
  border-color: #b95659;
  opacity: 0.48;
  transform: translateX(-9px);
}

.enemy-side .battle-card.is-hit {
  transform: translateX(9px);
}

.battle-card.is-round-winner {
  border-color: #d8ad51;
  box-shadow: inset 4px 0 0 #d8ad51;
}

.battle-center {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 17px;
  text-align: center;
}

.battle-score {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.battle-score strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 33px;
}

.battle-score span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.battle-emblem {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid #76613a;
  border-radius: 50%;
  color: var(--gold-bright);
  background: #27241c;
  font-family: Georgia, serif;
  font-size: 24px;
  box-shadow: inset 0 0 0 8px #1b1d19;
}

.battle-center p {
  min-height: 31px;
  margin: 0;
  color: #c8c2af;
  font-size: 10px;
  line-height: 1.55;
}

.battle-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  background: #20231f;
}

.battle-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.battle-start-button {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #9c7936;
  border-radius: 5px;
  color: #241c0e;
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.battle-start-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.battle-start-button svg {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 80;
  min-width: 210px;
  padding: 11px 16px;
  border: 1px solid #8b7137;
  border-radius: 5px;
  color: #251d0e;
  background: var(--gold-bright);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

@media (max-width: 1050px) {
  .game-app {
    grid-template-rows: 106px minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 56px 50px;
    gap: 0 9px;
    padding: 0 12px;
  }

  .metrics {
    grid-area: 2 / 1 / 3 / 4;
    width: calc(100% + 24px);
    height: 50px;
    margin-left: -12px;
  }

  .metrics > div {
    padding: 0 10px;
  }

  .summoning-hall {
    grid-template-columns: 230px minmax(340px, 1fr) 250px;
  }

  .pool-panel,
  .history-panel {
    padding: 20px 16px;
  }

  .magic-ring {
    width: min(300px, 48vh);
  }
}

@media (max-width: 800px) {
  html,
  body {
    overflow: auto;
  }

  .game-app {
    min-height: 100dvh;
    height: auto;
  }

  .summoning-hall {
    min-height: calc(100dvh - 106px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(520px, 1fr) auto;
    overflow: visible;
  }

  .pool-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pool-panel > .eyebrow,
  .pool-panel > h1,
  .pool-panel > .pool-copy,
  .pool-panel > .featured-card {
    grid-column: 1;
  }

  .rates {
    grid-area: 1 / 2 / 5 / 3;
    margin: 0;
  }

  .pity,
  .guarantee {
    grid-column: 1 / -1;
  }

  .draw-stage {
    min-height: 520px;
  }

  .history-panel {
    min-height: 390px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .history-list {
    max-height: 260px;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    align-content: start;
  }
}

@media (max-width: 520px) {
  .brand-seal,
  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 13px;
  }

  .collection-button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .battle-button,
  .collection-button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .battle-button span,
  .collection-button span {
    display: none;
  }

  .metrics span {
    font-size: 8px;
  }

  .metrics strong {
    font-size: 12px;
  }

  .metrics > div {
    padding: 0 7px;
  }

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

  .rates {
    grid-area: auto;
    grid-column: 1;
    margin-top: 14px;
  }

  .pool-panel h1 {
    font-size: 27px;
  }

  .draw-stage {
    min-height: 470px;
    padding: 18px 12px;
  }

  .magic-ring {
    width: min(280px, 78vw);
  }

  .draw-actions {
    width: 100%;
    gap: 8px;
  }

  .draw-button {
    min-width: 0;
    flex: 1;
    padding: 0 11px;
  }

  .result-layer,
  .collection-layer,
  .battle-layer,
  .upgrade-layer {
    padding: 0;
  }

  .result-dialog,
  .collection-dialog,
  .battle-dialog,
  .upgrade-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .result-grid.is-single {
    grid-template-columns: minmax(180px, 230px);
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    padding: 12px;
  }

  .collection-toolbar {
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }

  .tabs {
    width: 100%;
  }

  .tabs button {
    flex: 1;
    padding: 0 5px;
  }

  .upgrade-dialog {
    grid-template-rows: 60px minmax(0, 1fr);
  }

  .upgrade-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .upgrade-preview {
    width: min(230px, 70vw);
  }

  .upgrade-details {
    align-content: start;
  }
}

@media (max-width: 700px) {
  .battle-dialog {
    grid-template-rows: 60px 66px minmax(0, 1fr) 64px;
  }

  .battle-header {
    padding: 0 14px;
  }

  .battle-brief > div {
    padding: 0 10px;
  }

  .battle-brief strong {
    font-size: 11px;
  }

  .battle-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 13px;
    padding: 13px;
    overflow-y: auto;
  }

  .battle-side {
    grid-template-rows: 27px auto;
  }

  .battle-team {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    gap: 5px;
  }

  .battle-card {
    min-height: 94px;
    grid-template-columns: 1fr;
    grid-template-rows: 34px minmax(0, 1fr) auto;
    justify-items: center;
    gap: 4px;
    padding: 7px 4px;
    text-align: center;
  }

  .battle-card-symbol {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .battle-card-copy {
    width: 100%;
  }

  .battle-card-copy strong {
    font-size: 9px;
  }

  .battle-card-copy small {
    font-size: 8px;
  }

  .battle-card > b {
    font-size: 9px;
  }

  .battle-card.is-active,
  .enemy-side .battle-card.is-active {
    transform: translateY(-5px);
  }

  .battle-card.is-hit,
  .enemy-side .battle-card.is-hit {
    transform: translateY(4px);
  }

  .battle-center {
    grid-template-columns: 1fr 58px 1fr;
    gap: 9px;
  }

  .battle-score {
    grid-column: 1 / -1;
    width: min(260px, 100%);
  }

  .battle-score strong {
    font-size: 24px;
  }

  .battle-emblem {
    grid-column: 2;
    width: 54px;
    height: 54px;
    font-size: 17px;
  }

  .battle-center p {
    grid-column: 1 / -1;
  }

  .battle-footer {
    padding: 0 13px;
  }

  .battle-footer p {
    max-width: 50%;
  }
}
