.match-resolution-board {
  --match-paper: rgba(246, 240, 226, 0.96);
  --match-paper-deep: rgba(228, 216, 191, 0.98);
  --match-ink: #1e1916;
  --match-muted: #6a5e51;
  --match-line: rgba(32, 26, 23, 0.14);
  --match-felt: #21332b;
  --match-felt-deep: #101915;
  --match-gold: #d1a84b;
  --match-red: #9f4840;
  --match-blue: #466e90;
  --match-shadow: 0 18px 48px rgba(6, 10, 9, 0.34);
  --match-radius: 8px;
  position: relative;
  display: grid;
  gap: 0.72rem;
  width: min(100%, 1500px);
  grid-column: 1 / -1;
  margin: 0 auto;
  padding: 0.85rem;
  max-height: none;
  overflow: visible;
  border: 1px solid rgba(255, 248, 232, 0.18);
  border-radius: var(--match-radius);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 249, 232, 0.09), transparent 18rem),
    radial-gradient(circle at 88% 14%, rgba(209, 168, 75, 0.08), transparent 16rem),
    linear-gradient(180deg, rgba(20, 31, 27, 0.97), rgba(10, 15, 13, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--match-shadow);
  color: var(--match-paper);
}

.match-phase-board-panel {
  width: min(100%, 1500px);
}

.match-phase-board-panel .board-main-column {
  display: grid;
  gap: 0.72rem;
  width: 100%;
  min-width: 0;
}

.match-phase-board-panel .match-resolution-board {
  width: 100%;
}

.match-resolution-board.phase-assign {
  max-height: none;
}

.match-resolution-board,
.match-resolution-board * {
  box-sizing: border-box;
}

.match-resolution-board .match-board-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
  padding: 0.25rem 0.2rem 0.35rem;
  padding-right: clamp(7.2rem, 10vw, 10rem);
}

.match-resolution-board .match-board-header > * {
  min-width: 0;
}

.match-resolution-board .match-board-header h2,
.match-resolution-board .match-board-header h3,
.match-resolution-board .match-board-header p {
  margin: 0;
}

.match-resolution-board .match-board-header h2 {
  color: #fff8e8;
  font-size: clamp(1.25rem, 1.9vw, 1.65rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-resolution-board .match-board-header .small,
.match-resolution-board .match-board-header p,
.match-resolution-board .match-board-header span {
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.8rem;
  line-height: 1.2;
}

.match-resolution-board .animation-toggle {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 248, 232, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(28, 42, 36, 0.96), rgba(13, 20, 17, 0.96));
  color: rgba(255, 248, 232, 0.86);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.match-resolution-board .animation-toggle:hover,
.match-resolution-board .animation-toggle:focus-visible {
  border-color: rgba(209, 168, 75, 0.72);
  color: #fff8e8;
}

.match-resolution-board .animation-toggle[aria-pressed="true"],
.match-resolution-board .animation-toggle.is-active {
  border-color: rgba(209, 168, 75, 0.76);
  background:
    linear-gradient(180deg, rgba(58, 71, 44, 0.98), rgba(22, 31, 20, 0.98));
  color: #fff8e8;
}

.match-resolution-board .match-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(12rem, 18vw, 16rem) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  min-width: 0;
  overflow: visible;
}

.match-resolution-board.phase-assign .match-board-grid {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem) minmax(0, 1fr);
}

.match-resolution-board .match-active-events,
.match-resolution-board .board-event-grid {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  overflow-x: auto;
  padding: 0.05rem 0 0.2rem;
}

.match-resolution-board .match-active-events > *,
.match-resolution-board .board-event-grid > * {
  flex: 0 0 clamp(7.1rem, 12vw, 8.4rem);
}

.match-resolution-board .event-slot {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.42rem;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(251, 247, 237, 0.96), rgba(230, 219, 193, 0.93));
  color: var(--match-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 16px rgba(0, 0, 0, 0.14);
}

.match-resolution-board .event-slot .asset-img.card {
  width: 100%;
  aspect-ratio: 63 / 88;
  object-fit: cover;
  border-radius: 4px;
  max-height: 8.2rem;
}

.match-resolution-board .match-side,
.match-resolution-board .opponent-side,
.match-resolution-board .player-side {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.56rem;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: var(--match-radius);
  background:
    linear-gradient(180deg, rgba(34, 50, 43, 0.92), rgba(16, 24, 20, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.16);
  overflow: visible;
}

.match-resolution-board .player-side {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 248, 232, 0.05), transparent 11rem),
    linear-gradient(180deg, rgba(44, 63, 52, 0.94), rgba(17, 25, 20, 0.96));
}

.match-resolution-board .opponent-side {
  background:
    radial-gradient(circle at 84% 0%, rgba(209, 168, 75, 0.06), transparent 11rem),
    linear-gradient(180deg, rgba(28, 38, 34, 0.94), rgba(13, 18, 16, 0.97));
}

.match-resolution-board .match-side > .small,
.match-resolution-board .player-side > .small,
.match-resolution-board .opponent-side > .small {
  color: rgba(255, 248, 232, 0.68);
}

.match-resolution-board .match-side h3,
.match-resolution-board .player-side h3,
.match-resolution-board .opponent-side h3 {
  margin: 0;
  color: #fff8e8;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-resolution-board .match-side h4,
.match-resolution-board .player-side h4,
.match-resolution-board .opponent-side h4 {
  margin: 0;
  color: rgba(255, 248, 232, 0.92);
  font-size: 0.84rem;
  line-height: 1.1;
}

.match-resolution-board .match-demand-divider {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.34rem 0.24rem;
  border-radius: var(--match-radius);
  border: 1px solid rgba(255, 248, 232, 0.16);
  background:
    linear-gradient(180deg, rgba(209, 168, 75, 0.12), rgba(209, 168, 75, 0.04)),
    linear-gradient(180deg, rgba(22, 31, 27, 0.98), rgba(12, 18, 15, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.match-resolution-board .match-demand-divider::before,
.match-resolution-board .match-demand-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 248, 232, 0.48), transparent);
  transform: translateX(-50%);
}

.match-resolution-board .match-demand-divider::before {
  top: 0.5rem;
  bottom: 50%;
}

.match-resolution-board .match-demand-divider::after {
  top: 50%;
  bottom: 0.5rem;
}

.match-resolution-board .match-demand-divider .small,
.match-resolution-board .match-demand-divider h4,
.match-resolution-board .match-demand-divider span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.match-resolution-board .match-demand-divider .small {
  color: rgba(255, 248, 232, 0.76);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-resolution-board .match-demand-divider strong {
  display: block;
  color: #fff8e8;
  font-size: 0.72rem;
  line-height: 1.05;
}

.match-resolution-board .match-demand-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.28rem;
  width: 100%;
  padding: 0.12rem 0;
}

.match-resolution-board .match-demand-card {
  display: grid;
  justify-items: center;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.28rem 0.22rem;
  border: 1px solid rgba(255, 248, 232, 0.15);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(35, 48, 40, 0.9), rgba(12, 18, 15, 0.9));
}

.match-resolution-board .match-demand-card .match-slots,
.match-resolution-board .match-demand-card .match-info {
  grid-area: auto;
}

.match-resolution-board .match-demand-card.current {
  border-color: rgba(209, 168, 75, 0.72);
  box-shadow: 0 0 0 2px rgba(209, 168, 75, 0.12);
}

.match-resolution-board .match-demand-card .match-info {
  font-size: 0.64rem;
  line-height: 1.12;
  text-align: center;
}

.match-resolution-board .match-demand-card button {
  padding: 0.18rem 0.34rem;
  font-size: 0.62rem;
}

.match-resolution-board.phase-assign .match-demand-stack {
  width: 100%;
  gap: 0.42rem;
}

.match-resolution-board.phase-assign .match-demand-card {
  grid-template-columns: minmax(4.7rem, auto) minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: 0.3rem 0.45rem;
  padding: 0.45rem 0.5rem;
}

.match-resolution-board.phase-assign .match-demand-card strong {
  font-size: 0.9rem;
}

.match-resolution-board.phase-assign .match-demand-card .match-slots {
  justify-content: start;
}

.match-resolution-board.phase-assign .match-demand-card .match-info {
  grid-area: auto;
  grid-column: 1 / 3;
  font-size: 0.68rem;
  text-align: left;
}

.match-resolution-board.phase-assign .match-demand-card button {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  padding: 0.34rem 0.56rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.match-resolution-board .match-talent-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  overflow-x: auto;
  padding: 0.1rem 0 0.2rem;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(209, 168, 75, 0.45) rgba(255, 248, 232, 0.08);
}

.match-resolution-board .match-talent-row > * {
  scroll-snap-align: start;
}

.match-resolution-board .match-talent-row::-webkit-scrollbar,
.match-resolution-board .match-hand-strip::-webkit-scrollbar,
.match-resolution-board .match-resolution-log::-webkit-scrollbar {
  height: 0.6rem;
}

.match-resolution-board .match-talent-row::-webkit-scrollbar-thumb,
.match-resolution-board .match-hand-strip::-webkit-scrollbar-thumb,
.match-resolution-board .match-resolution-log::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 248, 232, 0.1);
  border-radius: 999px;
  background: rgba(209, 168, 75, 0.38);
}

.match-resolution-board .assigned-talent-card,
.match-resolution-board .revealed-card {
  position: relative;
  flex: 0 0 clamp(5.8rem, 11vw, 7rem);
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  min-height: 0;
  padding: 0.38rem 0.4rem 0.34rem;
  border: 1px solid rgba(255, 248, 232, 0.16);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(251, 247, 237, 0.98), rgba(231, 220, 194, 0.95));
  color: var(--match-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.match-resolution-board .assigned-talent-card {
  align-content: start;
  animation: match-board-assign-pop 240ms cubic-bezier(0.18, 0.76, 0.26, 1.04) both;
}

.match-resolution-board .assigned-talent-card.selected {
  border-color: rgba(209, 168, 75, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 2px rgba(209, 168, 75, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.match-resolution-board .assigned-talent-card.unqualified {
  opacity: 0.62;
}

.match-resolution-board .assigned-talent-card > img.asset-img.card,
.match-resolution-board .revealed-card > img.asset-img.card {
  width: 100%;
  max-height: 92px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.match-resolution-board .assigned-talent-card strong,
.match-resolution-board .revealed-card > span {
  color: var(--match-ink);
  font-size: 0.64rem;
  line-height: 1.05;
}

.match-resolution-board .assigned-talent-card .marks {
  justify-content: center;
  margin-top: 0;
}

.match-resolution-board .assigned-talent-card button {
  padding: 0.16rem 0.32rem;
  font-size: 0.6rem;
}

.match-resolution-board .assigned-talent-card::after,
.match-resolution-board .revealed-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0.28rem;
  background: linear-gradient(90deg, rgba(209, 168, 75, 0.96), rgba(159, 72, 64, 0.72), rgba(70, 110, 144, 0.72));
}

.match-resolution-board .assigned-talent-card .mini-title,
.match-resolution-board .revealed-card .mini-title {
  color: var(--match-ink);
  font-size: 0.62rem;
  line-height: 1.08;
  text-transform: uppercase;
}

.match-resolution-board .assigned-talent-card .small,
.match-resolution-board .revealed-card .small,
.match-resolution-board .assigned-talent-card p,
.match-resolution-board .revealed-card p {
  margin: 0;
  color: var(--match-muted);
  font-size: 0.58rem;
  line-height: 1.18;
}

.match-resolution-board .revealed-card {
  animation: match-board-reveal-pop 220ms cubic-bezier(0.18, 0.76, 0.26, 1.04) both;
  transform-origin: center bottom;
}

.match-resolution-board .revealed-card .card-face,
.match-resolution-board .assigned-talent-card .card-face {
  display: grid;
  gap: 0.24rem;
}

.match-resolution-board .assigned-talent-card .lightning-bolt,
.match-resolution-board .revealed-card .lightning-bolt {
  position: absolute;
  top: -0.58rem;
  left: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid rgba(255, 248, 232, 0.22);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 248, 232, 0.94), rgba(255, 248, 232, 0.22) 40%, transparent 41%),
    linear-gradient(180deg, rgba(209, 168, 75, 0.98), rgba(159, 120, 26, 0.98));
  color: #fff8e8;
  box-shadow:
    0 0 0 2px rgba(209, 168, 75, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  animation: match-bolt-flicker 1.5s steps(2, end) infinite;
}

.match-resolution-board .assigned-talent-card .lightning-bolt::before,
.match-resolution-board .revealed-card .lightning-bolt::before {
  content: "⚡";
  font-size: 0.82rem;
  line-height: 1;
}

.match-resolution-board .match-hand-strip {
  display: flex;
  gap: 0.34rem;
  align-items: stretch;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 0.08rem;
  max-height: 9rem;
}

.match-resolution-board .match-hand-strip h3 {
  align-self: center;
  margin: 0;
}

.match-resolution-board .match-hand-strip .card-row {
  display: flex;
  gap: 0.45rem;
  overflow: visible;
}

.match-resolution-board .match-reveal-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.match-resolution-board .match-player-reveal {
  display: grid;
  gap: 0.28rem;
  min-width: clamp(7.4rem, 16vw, 9.2rem);
}

.match-resolution-board .match-player-reveal h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-resolution-board .match-hand-strip > * {
  flex: 0 0 auto;
}

.match-resolution-board .match-hand-strip .card-thumb,
.match-resolution-board .match-hand-strip .assigned-talent-card,
.match-resolution-board .match-hand-strip .revealed-card {
  flex-basis: clamp(4.7rem, 9vw, 5.6rem);
}

.match-resolution-board .match-hand-strip .card-thumb {
  background: rgba(251, 247, 237, 0.95);
  border-color: rgba(255, 248, 232, 0.24);
  max-width: 5.7rem;
}

.match-resolution-board .match-hand-strip .card-thumb:hover,
.match-resolution-board .match-hand-strip .card-thumb:focus-visible {
  transform: translateY(-0.18rem) rotate(-0.5deg);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(209, 168, 75, 0.48);
}

.match-resolution-board .match-resolution-log {
  max-height: 6.2rem;
  overflow: auto;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: var(--match-radius);
  background:
    linear-gradient(180deg, rgba(17, 25, 21, 0.92), rgba(11, 16, 14, 0.94));
  color: rgba(255, 248, 232, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.74rem;
  line-height: 1.28;
}

.match-resolution-board .match-resolution-log ol,
.match-resolution-board .match-resolution-log ul {
  margin: 0;
  padding-left: 1.1rem;
}

.match-resolution-board .match-resolution-log li + li {
  margin-top: 0.2rem;
}

@keyframes match-board-assign-pop {
  0% {
    opacity: 0;
    transform: translateY(0.42rem) scale(0.97);
  }

  70% {
    opacity: 1;
    transform: translateY(-0.08rem) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes match-board-reveal-pop {
  0% {
    opacity: 0;
    transform: translateY(0.36rem) rotate(-1.2deg) scale(0.95);
    filter: saturate(0.92);
  }

  65% {
    opacity: 1;
    transform: translateY(-0.04rem) rotate(0.6deg) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
    filter: none;
  }
}

@keyframes match-bolt-flicker {
  0%,
  100% {
    filter: brightness(1);
    transform: translateX(-50%) scale(1);
  }

  50% {
    filter: brightness(1.12);
    transform: translateX(-50%) scale(1.04);
  }
}

@media (max-width: 1120px) {
  .match-resolution-board {
    max-height: none;
  }

  .match-resolution-board .match-board-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .match-resolution-board.phase-assign .match-board-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .match-resolution-board .match-demand-divider {
    min-height: 3.25rem;
    min-width: 0;
  }

  .match-resolution-board .match-demand-divider::before,
  .match-resolution-board .match-demand-divider::after {
    left: 0.85rem;
    right: 0.85rem;
    width: auto;
    height: 1px;
    transform: none;
    background: linear-gradient(90deg, transparent, rgba(255, 248, 232, 0.48), transparent);
  }

  .match-resolution-board .match-demand-divider::before {
    top: 0.8rem;
    bottom: auto;
  }

  .match-resolution-board .match-demand-divider::after {
    top: auto;
    bottom: 0.8rem;
  }
}

@media (max-width: 760px) {
  .match-resolution-board {
    padding: 0.68rem;
    gap: 0.58rem;
  }

  .match-resolution-board .match-board-header {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .match-resolution-board .animation-toggle {
    position: static;
    justify-self: start;
    margin-top: 0.1rem;
  }

  .match-resolution-board .match-side,
  .match-resolution-board .player-side,
  .match-resolution-board .opponent-side {
    padding: 0.58rem;
  }

  .match-resolution-board .assigned-talent-card,
  .match-resolution-board .revealed-card {
    flex-basis: clamp(7rem, 38vw, 8.2rem);
  }

.match-resolution-board .match-resolution-log {
    max-height: 7.2rem;
  }
}

body.reduced-motion .match-resolution-board *,
body.reduce-motion .match-resolution-board *,
body.no-motion .match-resolution-board *,
body[data-reduced-motion="true"] .match-resolution-board *,
body[data-motion="off"] .match-resolution-board * {
  animation: none !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  .match-resolution-board *,
  .match-resolution-board *::before,
  .match-resolution-board *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
