.turn-strip {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(118, 171, 240, 0.56);
  background: linear-gradient(180deg, rgb(16, 28, 49) 0%, rgb(11, 22, 38) 100%);
  box-shadow: inset 0 1px 0 rgba(214, 232, 255, 0.08);
}

.match-shell {
  position: relative;
  width: 100%;
  height: 100%;
  --match-view-scale: 1;
  --match-interface-drop: 60px;
  --board-slot-size: 172px;
  --hero-avatar-base-size: 96px;
  --hero-avatar-scale: 1.69;
  --your-avatar-offset-x: 12px;
  --your-avatar-offset-y: -20px;
  --hero-avatar-hit-size: calc(var(--hero-avatar-base-size) * var(--hero-avatar-scale));
  --hero-target-width: calc((var(--hero-avatar-hit-size) + 44px) * 4);
  --board-row-width: calc((7 * var(--board-slot-size)) + (6 * var(--board-hand-gap)));
  --board-tray-width: calc(var(--board-row-width) + 24px);
  --hand-card-width: 190px;
  --hand-card-height: calc(var(--hand-card-width) * 7 / 5);
  --board-hand-gap: 10px;
  --scene-base-top-pad: calc(8px + (var(--match-interface-drop) * 0.40));
  --scene-base-bottom-pad: calc(8px + (var(--match-interface-drop) * 0.04));
  --lane-neutral-gap: calc(var(--board-slot-size) * 0.50);
  --enemy-neutral-extra-gap: calc(var(--board-slot-size) * 0.12);
  --player-lane-slot-lift: calc(var(--board-slot-size) * 0.60);
  --user-hero-offset-x: 0px;
  --user-hero-offset-y: 22px;
  --max-hand-size: 7;
  --hero-stat-medallion-size: 69px;
  --hero-stat-medallion-icon-size: 20px;
  --hero-stat-medallion-value-size: 24px;
  --hero-stat-medallion-value-gap: 3px;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.match-scale-debug {
  position: fixed;
  top: 10px;
  right: 58px;
  z-index: 2147483646;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(175, 130, 74, 0.54);
  background: rgba(12, 16, 24, 0.86);
  color: #f1ddb6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.match-floating-layer {
  position: fixed;
  inset: 0;
  z-index: 2605;
  pointer-events: none;
}

.match-shell * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.match-meta-panel {
  border: 1px solid rgba(242, 168, 70, 0.62);
  border-radius: 12px;
  background: linear-gradient(145deg, rgb(18, 31, 52) 0%, rgb(33, 20, 16) 100%);
  padding: 10px;
  margin-bottom: 12px;
}

.match-meta-panel h3 {
  margin: 0;
  color: #f6e3c4;
}

.match-vs {
  margin: 6px 0 0;
  color: #ffd39a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.match-content {
  position: relative;
  height: 100%;
  width: 100%;
  margin: 0 auto;
  transition: filter 180ms ease, opacity 180ms ease;
}

.roguelike-modifiers-panel {
  position: absolute;
  top: 86px;
  right: 18px;
  z-index: 1;
  width: min(320px, 28vw);
  padding: 12px 14px;
  border: 1px solid rgba(132, 189, 255, 0.52);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.9) 0%, rgba(12, 28, 49, 0.94) 100%);
  box-shadow: 0 18px 34px rgba(3, 7, 14, 0.34);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.battlefield-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.roguelike-modifiers-kicker {
  margin: 0 0 8px;
  color: #8ecbff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.roguelike-scaling-summary p,
.roguelike-modifier-copy,
.roguelike-modifier-name {
  margin: 0;
}

.roguelike-scaling-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  color: #d8ebff;
  font-size: 12px;
  line-height: 1.45;
}

.roguelike-modifiers-list {
  display: grid;
  gap: 8px;
}

.roguelike-modifier-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(132, 189, 255, 0.22);
  background: rgba(24, 40, 66, 0.78);
}

.roguelike-modifier-name {
  color: #f3f8ff;
  font-size: 12px;
  font-weight: 800;
}

.roguelike-modifier-copy {
  margin-top: 3px;
  color: #c6dcf4;
  font-size: 11px;
  line-height: 1.45;
}

.match-shell.match-ended .match-content {
  filter: blur(6px) saturate(0.86);
  opacity: 0.52;
  pointer-events: none;
  user-select: none;
}

.match-end-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1400;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 198, 110, 0.18) 0%, rgba(255, 198, 110, 0) 26%),
    radial-gradient(circle at 50% 28%, rgba(255, 174, 68, 0.24) 0%, rgba(9, 15, 27, 0.88) 62%),
    rgba(7, 12, 22, 0.78);
  backdrop-filter: blur(7px) saturate(0.9);
}

.match-end-overlay[hidden] {
  display: none !important;
}

.match-flow-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 2600;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 198, 114, 0.1) 0%, rgba(255, 198, 114, 0) 28%),
    rgba(8, 13, 24, 0.76);
  backdrop-filter: blur(7px) saturate(0.92);
}

#cycle-overlay {
  z-index: 3200;
  background: rgba(8, 13, 24, 0.12);
  backdrop-filter: none;
}

.match-flow-overlay[hidden] {
  display: none !important;
}

.match-mobile-rotate {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 3400;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 196, 102, 0.16) 0%, rgba(255, 196, 102, 0) 28%),
    rgba(8, 13, 24, 0.92);
  backdrop-filter: blur(8px) saturate(0.94);
}

.match-mobile-rotate-panel {
  width: min(420px, 100%);
  padding: 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(171, 121, 61, 0.78);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 212, 140, 0.14), rgba(255, 212, 140, 0) 34%),
    linear-gradient(180deg, rgba(68, 44, 20, 0.97) 0%, rgba(28, 17, 10, 0.99) 100%);
  box-shadow:
    0 28px 58px rgba(7, 4, 2, 0.58),
    inset 0 1px 0 rgba(255, 230, 181, 0.14);
  text-align: center;
}

.match-mobile-rotate-panel h3 {
  margin: 10px 0 0;
  color: #fff2de;
  font-size: clamp(28px, 7vw, 34px);
}

.match-flow-panel {
  position: relative;
  overflow: hidden;
  width: min(760px, 96%);
  border-radius: 28px;
  padding: 28px 28px 24px;
  border: 1px solid rgba(162, 116, 58, 0.76);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 213, 146, 0.14), rgba(255, 213, 146, 0) 32%),
    linear-gradient(180deg, rgba(68, 44, 20, 0.96) 0%, rgba(28, 17, 10, 0.98) 100%);
  box-shadow:
    0 34px 72px rgba(7, 4, 2, 0.58),
    inset 0 1px 0 rgba(255, 230, 181, 0.14),
    inset 0 0 0 1px rgba(255, 194, 108, 0.06);
}

.match-flow-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 20px;
  border: 1px solid rgba(215, 170, 94, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 232, 193, 0.05) 0%, rgba(255, 232, 193, 0) 18%),
    linear-gradient(90deg, rgba(96, 62, 28, 0.24) 0%, rgba(96, 62, 28, 0) 18%, rgba(96, 62, 28, 0) 82%, rgba(96, 62, 28, 0.24) 100%);
  pointer-events: none;
}

.match-flow-panel > * {
  position: relative;
  z-index: 1;
}

.match-flow-panel .eyebrow,
.match-end-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(226, 183, 110, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 227, 175, 0.16) 0%, rgba(255, 227, 175, 0) 42%),
    linear-gradient(180deg, rgba(93, 60, 28, 0.78) 0%, rgba(56, 34, 16, 0.9) 100%);
  color: #f4d9aa;
  letter-spacing: 0.14em;
  box-shadow: inset 0 1px 0 rgba(255, 234, 197, 0.14);
}

.match-flow-panel h3,
.match-end-panel h3 {
  position: relative;
}

.match-flow-panel h3::after,
.match-end-panel h3::after {
  content: "";
  display: block;
  width: 92px;
  max-width: 46%;
  height: 2px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(237, 192, 118, 0.88), rgba(0, 0, 0, 0));
}

.match-flow-copy,
.match-flow-timer {
  margin: 10px auto 0;
  text-align: center;
  color: #edd9b8;
  max-width: 44ch;
  line-height: 1.45;
}

.match-flow-timer {
  font-weight: 700;
  color: #ffd98d;
}

.match-flow-panel .button-row {
  justify-content: center;
  margin-top: 18px;
}

.cycle-flow-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, 98%);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 40px);
  margin: 0;
}

.cycle-flow-panel:has(#cycle-selection.cycle-selection-discard) {
  width: min(1060px, 96%);
}

.cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) {
  width: min(560px, 94%);
}

.cycle-flow-panel-positioned {
  transform: none;
}

.cycle-flow-panel-head {
  cursor: grab;
  user-select: none;
}

.cycle-flow-panel.cycle-flow-panel-dragging .cycle-flow-panel-head {
  cursor: grabbing;
}

.cycle-flow-panel #cycle-selection {
  margin-top: 18px;
  padding: 14px 12px;
  border-radius: 24px;
  border: 1px solid rgba(178, 129, 66, 0.46);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 219, 154, 0.08) 0%, rgba(255, 219, 154, 0) 34%),
    linear-gradient(180deg, rgba(23, 14, 9, 0.5) 0%, rgba(14, 9, 6, 0.64) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 172, 0.08),
    inset 0 0 0 1px rgba(255, 193, 102, 0.04);
}

.cycle-flow-panel #cycle-selection.cycle-selection-discard {
  grid-template-columns: repeat(auto-fit, minmax(140px, 140px));
  justify-content: center;
  justify-items: center;
  gap: 10px;
  overflow: visible;
  max-height: none;
}

.cycle-flow-panel #cycle-selection.cycle-selection-discard .flow-card .hand-card {
  width: 140px;
  min-height: 192px;
  flex: 0 0 140px;
}

.cycle-flow-panel #cycle-selection.cycle-selection-pick {
  grid-template-columns: repeat(2, var(--hand-card-width));
  justify-content: center;
  justify-items: center;
  gap: 18px;
}

.cycle-flow-panel #cycle-selection.cycle-selection-pick .flow-card .hand-card {
  width: var(--hand-card-width);
  min-height: var(--hand-card-height);
  flex: 0 0 var(--hand-card-width);
}

.cycle-close-btn {
  min-width: 168px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  border: 1px solid rgba(184, 137, 73, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 228, 175, 0.12) 0%, rgba(255, 228, 175, 0) 26%),
    linear-gradient(180deg, rgba(86, 58, 28, 0.94) 0%, rgba(48, 31, 17, 0.98) 100%);
  color: #f6e6c5;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 900;
  box-shadow:
    0 12px 20px rgba(18, 11, 5, 0.28),
    inset 0 1px 0 rgba(255, 232, 191, 0.16),
    inset 0 -3px 6px rgba(17, 10, 5, 0.22);
}

.cycle-close-btn:hover:not(:disabled) {
  border-color: rgba(209, 161, 96, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 234, 191, 0.16) 0%, rgba(255, 234, 191, 0) 26%),
    linear-gradient(180deg, rgba(101, 68, 34, 0.96) 0%, rgba(57, 37, 20, 0.99) 100%);
  color: #fff6e4;
  transform: translateY(-1px);
}

.mulligan-confirm-btn {
  min-width: 232px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 16px;
  border: 1px solid rgba(255, 204, 109, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 230, 171, 0.22) 0%, rgba(255, 230, 171, 0) 24%),
    linear-gradient(180deg, rgba(236, 165, 57, 0.98) 0%, rgba(170, 94, 23, 0.98) 100%);
  color: #fff6e1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 900;
  box-shadow:
    0 14px 24px rgba(79, 36, 6, 0.34),
    0 0 0 1px rgba(99, 49, 8, 0.24),
    inset 0 1px 0 rgba(255, 238, 191, 0.42),
    inset 0 -4px 7px rgba(115, 53, 9, 0.24);
}

.mulligan-confirm-btn:hover:not(:disabled) {
  border-color: rgba(255, 219, 134, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 239, 188, 0.28) 0%, rgba(255, 239, 188, 0) 24%),
    linear-gradient(180deg, rgba(245, 182, 76, 0.98) 0%, rgba(185, 109, 29, 0.98) 100%);
  color: #fffdf8;
  transform: translateY(-1px);
}

.mulligan-neutral-preview {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: -6px;
  margin-bottom: 10px;
}

.mulligan-neutral-preview-label {
  margin: 0;
  color: rgba(245, 229, 196, 0.92);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mulligan-neutral-board-scroll-wrap {
  padding: 2px 10px 4px;
}

.mulligan-neutral-board-grid {
  --neutral-slot-size: clamp(88px, 12vw, 116px);
}

.match-end-panel {
  position: relative;
  overflow: hidden;
  width: min(520px, 94%);
  border: 1px solid rgba(171, 119, 55, 0.82);
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 130, 0.22), rgba(255, 210, 130, 0) 34%),
    linear-gradient(180deg, rgba(72, 46, 21, 0.98) 0%, rgba(28, 18, 10, 0.98) 100%);
  box-shadow:
    0 36px 82px rgba(6, 4, 2, 0.62),
    inset 0 1px 0 rgba(255, 227, 178, 0.18),
    inset 0 0 0 1px rgba(255, 192, 101, 0.06);
  padding: 28px 26px 24px;
  text-align: center;
  transform: translateY(0) scale(1);
  animation: match-end-panel-in 340ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.match-end-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 0;
  pointer-events: none;
  border: 1px solid rgba(220, 171, 91, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 238, 206, 0.06), rgba(255, 238, 206, 0) 24%),
    linear-gradient(90deg, rgba(96, 62, 28, 0.22) 0%, rgba(96, 62, 28, 0) 18%, rgba(96, 62, 28, 0) 82%, rgba(96, 62, 28, 0.22) 100%);
  opacity: 0.9;
}

.match-end-panel h3 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 4.2vw, 40px);
  letter-spacing: -0.01em;
  color: #fff2de;
  text-shadow: 0 4px 20px rgba(47, 22, 8, 0.56);
}

.match-end-subtitle {
  margin: 0 auto 18px;
  color: #ead5b3;
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.45;
}

.match-end-rewards.is-reward-row {
  margin-top: 4px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(192, 143, 76, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 226, 164, 0.08) 0%, rgba(255, 226, 164, 0) 34%),
    linear-gradient(180deg, rgba(23, 14, 8, 0.42) 0%, rgba(16, 10, 6, 0.62) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  color: #f7fbff;
}

.match-end-reward-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.match-end-reward-value {
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  color: #f7fbff;
}

.match-end-reward-value-xp {
  color: #dff3ff;
  text-shadow:
    0 0 10px rgba(88, 196, 255, 0.42),
    0 0 20px rgba(88, 196, 255, 0.26);
}

.match-end-reward-value-currency {
  color: #fff2d4;
  text-shadow:
    0 0 10px rgba(255, 196, 82, 0.42),
    0 0 20px rgba(255, 196, 82, 0.26);
}

.match-end-reward-value-pack {
  color: #ffe8c8;
  text-shadow:
    0 0 10px rgba(255, 214, 150, 0.36),
    0 0 20px rgba(255, 214, 150, 0.22);
}

.match-end-reward-xp {
  font-size: 26px;
  line-height: 1;
  color: #7cc7ff;
  font-weight: 900;
}

.match-end-reward-currency-icon {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
  margin-left: 0;
  transform: translate(-4px, 2px);
}

.match-end-reward-item-pack {
  gap: 10px;
}

.match-end-reward-pack-icon {
  width: 42px;
  height: 56px;
  display: block;
  object-fit: contain;
}

.match-end-reward-pack-name {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
  color: #f2ddbf;
  max-width: 12ch;
  text-align: left;
}

.match-end-rewards {
  min-height: 24px;
}

.match-end-roguelike {
  display: grid;
  gap: 14px;
  margin: 10px 0 6px;
  text-align: left;
}

.match-end-roguelike-summary,
.match-end-trinket-card {
  border-radius: 18px;
  border: 1px solid rgba(192, 143, 76, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 226, 164, 0.08) 0%, rgba(255, 226, 164, 0) 34%),
    linear-gradient(180deg, rgba(23, 14, 8, 0.42) 0%, rgba(16, 10, 6, 0.62) 100%);
  padding: 14px 16px;
}

.match-end-roguelike-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9a35f;
}

.match-end-roguelike-line,
.match-end-trinket-copy,
.match-end-trinket-name {
  margin: 0;
}

.match-end-roguelike-line {
  color: #f4e6cb;
  font-size: 14px;
  line-height: 1.45;
}

.match-end-trinket-choices {
  display: grid;
  gap: 10px;
}

.match-end-trinket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.match-end-trinket-card {
  display: grid;
  gap: 10px;
}

.match-end-trinket-name {
  color: #fff3db;
  font-size: 16px;
  font-weight: 800;
}

.match-end-trinket-copy {
  color: #d9c4a2;
  font-size: 13px;
  line-height: 1.45;
}

.match-end-trinket-card .btn-link {
  width: 100%;
}

.match-end-actions {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.match-end-actions .btn-link {
  width: 100%;
  min-height: 52px;
  border-color: rgba(255, 199, 106, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 224, 158, 0.2) 0%, rgba(255, 224, 158, 0) 24%),
    linear-gradient(180deg, rgba(236, 165, 57, 0.98) 0%, rgba(170, 94, 23, 0.98) 100%);
  color: #fff7e8;
  box-shadow:
    0 14px 24px rgba(79, 36, 6, 0.34),
    0 0 0 1px rgba(99, 49, 8, 0.24),
    inset 0 1px 0 rgba(255, 233, 178, 0.44),
    inset 0 -4px 7px rgba(115, 53, 9, 0.24);
}

.match-end-actions .btn-link:hover {
  border-color: rgba(255, 214, 135, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 234, 180, 0.24) 0%, rgba(255, 234, 180, 0) 24%),
    linear-gradient(180deg, rgba(245, 182, 76, 0.98) 0%, rgba(185, 109, 29, 0.98) 100%);
  color: #fffdf8;
}

.match-end-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.match-end-secondary-actions .ghost-link {
  min-height: 48px;
  border-color: rgba(157, 118, 67, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 229, 177, 0.12) 0%, rgba(255, 229, 177, 0) 28%),
    linear-gradient(180deg, rgba(84, 58, 31, 0.88) 0%, rgba(48, 31, 18, 0.92) 100%);
  color: #f6e7ca;
  box-shadow:
    0 10px 18px rgba(23, 13, 6, 0.28),
    inset 0 1px 0 rgba(255, 228, 185, 0.16);
}

.match-end-secondary-actions .ghost-link:hover {
  border-color: rgba(196, 151, 90, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 233, 188, 0.16) 0%, rgba(255, 233, 188, 0) 28%),
    linear-gradient(180deg, rgba(100, 68, 36, 0.9) 0%, rgba(58, 38, 22, 0.94) 100%);
}

.match-end-reveal {
  opacity: 0;
  transform: translateY(6px);
}

.match-end-panel.is-visible .match-end-reveal {
  animation: match-end-reveal-in 260ms ease forwards;
  animation-delay: calc(var(--reveal-step, 0) * 110ms);
}

.match-end-overlay[data-result="victory"] .match-end-panel {
  border-color: rgba(104, 193, 122, 0.82);
  background:
    radial-gradient(circle at 50% 0%, rgba(130, 219, 138, 0.24), rgba(130, 219, 138, 0) 34%),
    linear-gradient(180deg, rgba(37, 62, 35, 0.99) 0%, rgba(17, 30, 17, 0.99) 100%);
  box-shadow: 0 34px 68px rgba(6, 16, 8, 0.68), inset 0 1px 0 rgba(188, 243, 174, 0.18);
}

.match-end-overlay[data-result="victory"] .match-end-panel h3 {
  color: #ddffef;
  text-shadow: 0 0 20px rgba(74, 255, 158, 0.56);
}

.match-end-overlay[data-result="defeat"] .match-end-panel {
  border-color: rgba(185, 92, 72, 0.82);
  background:
    radial-gradient(circle at 50% 0%, rgba(209, 106, 88, 0.24), rgba(209, 106, 88, 0) 34%),
    linear-gradient(180deg, rgba(74, 35, 29, 0.99) 0%, rgba(33, 15, 13, 0.99) 100%);
  box-shadow: 0 34px 68px rgba(20, 7, 6, 0.68), inset 0 1px 0 rgba(236, 172, 158, 0.16);
}

.match-end-overlay[data-result="defeat"] .match-end-panel h3 {
  color: #ffe1da;
  text-shadow: 0 0 20px rgba(255, 92, 62, 0.56);
}

.match-end-overlay[data-result="defeat"] .match-end-subtitle {
  color: #ffd4ca;
}

.match-end-overlay[data-result="draw"] .match-end-panel {
  border-color: rgba(156, 170, 199, 0.58);
}

@keyframes match-end-panel-in {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes match-end-reveal-in {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 560px) {
  .match-end-secondary-actions {
    grid-template-columns: 1fr;
  }
  .match-end-rewards.is-reward-row,
  .match-end-reward-value,
  .match-end-reward-xp {
    font-size: 22px;
  }
  .match-end-reward-currency-icon {
    width: 40px;
    height: 40px;
  }
  .turn-hud-fixed {
    min-width: 0;
    min-height: 48px;
    padding: 0 12px;
  }
  .turn-hud-fixed .turn-indicator,
  .turn-hud-fixed .turn-timer {
    font-size: 14px;
  }
}

body.match-overlay-open {
  overflow-x: hidden;
  overflow-y: hidden;
}

.turn-banner {
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 180ms ease, transform 180ms ease;
}

.turn-banner-show {
  opacity: 1;
  transform: translateY(0);
}

.turn-banner-you {
  color: #0f7446;
}

.turn-banner-center {
  position: fixed;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(0.92);
  margin: 0;
  padding: 10px 16px;
  z-index: 2450;
  border-radius: 12px;
  background: rgba(10, 58, 37, 0.78);
  border: 1px solid rgba(113, 241, 182, 0.62);
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: 0.06em;
  color: #dfffea;
  text-shadow: 0 0 18px rgba(108, 241, 180, 0.5);
  box-shadow: 0 0 22px rgba(62, 183, 124, 0.24);
  pointer-events: none;
}

.turn-banner-show.turn-banner-center {
  transform: translate(-50%, -50%) scale(1);
}

.turn-banner-warning {
  background: rgba(96, 40, 14, 0.9);
  border-color: rgba(255, 184, 96, 0.9);
  color: #fff1cf;
  text-shadow: 0 0 18px rgba(255, 187, 84, 0.52);
  box-shadow: 0 0 28px rgba(255, 149, 64, 0.28);
}

.turn-banner-opp {
  color: #2c5e98;
}

.incoming-spell-preview {
  position: fixed;
  left: 50%;
  top: 16%;
  transform: translate(-50%, -14px) scale(0.95);
  opacity: 0;
  z-index: 2420;
  display: grid;
  grid-template-columns: 112px auto;
  align-items: center;
  gap: 18px;
  min-width: 420px;
  max-width: min(760px, calc(100vw - 28px));
  padding: 18px 22px;
  border-radius: 26px;
  border: 1px solid rgba(170, 118, 65, 0.86);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 211, 142, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(70, 45, 22, 0.98) 0%, rgba(31, 18, 11, 0.99) 100%);
  box-shadow:
    0 26px 56px rgba(17, 8, 4, 0.54),
    inset 0 1px 0 rgba(255, 228, 185, 0.14),
    inset 0 0 0 1px rgba(255, 196, 112, 0.05);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.incoming-spell-preview::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 19px;
  border: 1px solid rgba(220, 171, 92, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 236, 205, 0.05), rgba(255, 236, 205, 0) 22%),
    linear-gradient(90deg, rgba(96, 62, 28, 0.22) 0%, rgba(96, 62, 28, 0) 18%, rgba(96, 62, 28, 0) 82%, rgba(96, 62, 28, 0.22) 100%);
  pointer-events: none;
}

.incoming-spell-preview-show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.incoming-spell-preview-text-only {
  grid-template-columns: minmax(0, 1fr);
  min-width: 520px;
}

.incoming-spell-preview-art {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(222, 176, 104, 0.52);
  background: rgba(34, 20, 10, 0.88);
  box-shadow:
    0 14px 26px rgba(13, 6, 2, 0.32),
    inset 0 1px 0 rgba(255, 225, 176, 0.12);
}

.incoming-spell-preview-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.incoming-spell-preview-text {
  margin: 0;
  color: #f7e8cc;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
}

.incoming-spell-preview-detail {
  margin: 0;
  color: rgba(246, 232, 203, 0.86);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.incoming-spell-preview-text-only .incoming-spell-preview-text {
  width: 100%;
  text-align: center;
}

.incoming-spell-preview-text-only .incoming-spell-preview-detail {
  text-align: center;
}

.turn-indicator,
.turn-timer {
  margin: 0;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
}

.turn-hud-fixed {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 168px;
  min-height: 52px;
  display: grid;
  gap: 0;
  place-items: center;
  justify-items: center;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(168, 133, 79, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 227, 170, 0.08) 0%, rgba(255, 227, 170, 0) 26%),
    linear-gradient(180deg, rgba(43, 32, 20, 0.92) 0%, rgba(24, 18, 11, 0.98) 100%);
  box-shadow:
    0 10px 20px rgba(16, 11, 7, 0.24),
    0 0 0 1px rgba(68, 44, 22, 0.18),
    inset 0 1px 0 rgba(255, 236, 204, 0.14),
    inset 0 -3px 6px rgba(18, 11, 6, 0.24);
  pointer-events: none;
}

.turn-hud-fixed .turn-timer {
  display: none;
}

.turn-hud-fixed::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 11px;
  border: 1px solid rgba(212, 173, 104, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 241, 214, 0.05) 0%, rgba(255, 241, 214, 0) 36%),
    linear-gradient(90deg, rgba(104, 71, 33, 0.18) 0%, rgba(104, 71, 33, 0) 16%, rgba(104, 71, 33, 0) 84%, rgba(104, 71, 33, 0.18) 100%);
  pointer-events: none;
}

.turn-hud-fixed > * {
  position: relative;
  z-index: 1;
}

.turn-hud-fixed[hidden] {
  display: none !important;
}

.turn-indicator {
  color: #d7e6ff;
}

.turn-indicator-you {
  color: #62ff9d;
}

.turn-indicator-opp {
  color: #ff6b5f;
}

.turn-timer {
  color: #c5dbff;
}

.turn-timer-warn {
  color: #b36816;
}

.turn-timer-danger {
  color: #b02d2d;
}

.battlefield {
  position: relative;
  display: grid;
  grid-template-columns: max-content;
  gap: 0;
  align-items: start;
  justify-content: center;
  width: max-content;
  --match-side-panel-width: 320px;
  --match-side-panel-gap: 14px;
}

.battlefield::after {
  content: none;
}

.battlefield-fit {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: grid;
  justify-items: center;
  align-items: start;
}

.battlefield-scale {
  position: relative;
  transform: translate(var(--match-view-shift-x, 0px), var(--match-view-shift-y, 0px)) scale(var(--match-view-scale));
  transform-origin: top center;
}

.battlefield.side-panel-collapsed {
  grid-template-columns: max-content;
}

.battlefield.side-panel-collapsed .battlefield-main {
  width: max-content;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

.battlefield.side-panel-collapsed .match-log-zone {
  display: none;
}

.battlefield-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: max-content;
  min-width: 0;
  aspect-ratio: var(--match-board-aspect, 1.7778);
  min-height: calc((var(--board-tray-width) + 20px) / var(--match-board-aspect, 1.7778));
  padding-left: 10px;
  padding-right: 10px;
  padding-top: var(--scene-base-top-pad);
  padding-bottom: var(--scene-base-bottom-pad);
  isolation: isolate;
  overflow: visible;
}

.battlefield-main > * {
  position: relative;
  z-index: 1;
}

.battlefield-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 236, 206, 0.05), rgba(255, 236, 206, 0) 18%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.06), rgba(8, 14, 24, 0.12)),
    var(--match-board-image, url("/static/gameboard.png"));
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 100% 100%, 100% 100%, cover;
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 210, 0.1),
    inset 0 -3px 0 rgba(22, 12, 8, 0.46),
    0 10px 24px rgba(4, 8, 16, 0.2),
    0 24px 48px rgba(4, 8, 16, 0.24);
}

.battlefield-main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: 20px;
  border: 1px solid rgba(215, 180, 120, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 214, 146, 0.06),
    0 16px 34px rgba(3, 7, 15, 0.34),
    0 32px 64px rgba(3, 7, 15, 0.3),
    inset 0 1px 0 rgba(255, 235, 204, 0.05),
    inset 0 0 0 6px rgba(29, 18, 12, 0.1);
}

.board-ambience {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px;
  opacity: 1;
  filter: saturate(1.18);
}

.board-ambience::before,
.board-ambience::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0.42;
}

.board-ambience::before {
  bottom: 4%;
  height: 28%;
  background:
    radial-gradient(circle at 16% 62%, rgba(196, 182, 160, 0.28) 0%, rgba(196, 182, 160, 0.14) 18%, rgba(196, 182, 160, 0) 46%),
    radial-gradient(circle at 50% 56%, rgba(182, 171, 154, 0.18) 0%, rgba(182, 171, 154, 0.1) 20%, rgba(182, 171, 154, 0) 48%),
    radial-gradient(circle at 84% 58%, rgba(174, 163, 146, 0.26) 0%, rgba(174, 163, 146, 0.12) 20%, rgba(174, 163, 146, 0) 48%),
    linear-gradient(180deg, rgba(192, 180, 161, 0.02) 0%, rgba(192, 180, 161, 0.16) 44%, rgba(192, 180, 161, 0.02) 100%);
  filter: blur(20px);
  animation: board-ambience-fog-bank 15s ease-in-out infinite;
}

.board-ambience::after {
  top: 10%;
  height: 22%;
  background:
    radial-gradient(circle at 20% 50%, rgba(206, 194, 175, 0.14) 0%, rgba(206, 194, 175, 0.07) 28%, rgba(206, 194, 175, 0) 60%),
    radial-gradient(circle at 78% 48%, rgba(196, 186, 170, 0.16) 0%, rgba(196, 186, 170, 0.08) 28%, rgba(196, 186, 170, 0) 60%);
  filter: blur(24px);
  animation: board-ambience-fog-drift-soft 18s ease-in-out infinite;
}

.board-ambience-emitter {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(var(--ambience-scale, 1));
  opacity: 0;
  animation:
    board-ambience-pulse 7.8s ease-in-out infinite,
    board-ambience-drift 8.4s ease-in-out infinite;
  animation-delay: var(--ambience-delay, 0s), var(--ambience-delay, 0s);
}

.board-ambience-emitter::before,
.board-ambience-emitter::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: inherit;
  transform: translate(-50%, -50%);
}

.board-ambience-emitter.is-ember::before {
  width: 30px;
  height: 30px;
  background:
    radial-gradient(circle, rgba(255, 240, 188, 1) 0%, rgba(255, 201, 98, 0.92) 36%, rgba(193, 92, 18, 0.38) 72%, rgba(193, 92, 18, 0) 100%);
  box-shadow:
    0 0 32px rgba(255, 184, 74, 0.88),
    0 0 74px rgba(153, 62, 11, 0.48);
}

.board-ambience-emitter.is-ember::after {
  width: 76px;
  height: 76px;
  background:
    radial-gradient(circle, rgba(255, 171, 73, 0.46) 0%, rgba(145, 60, 16, 0.22) 48%, rgba(27, 14, 10, 0) 78%);
  filter: blur(2.4px);
}

.board-ambience-emitter.is-spark {
  width: 48px;
  height: 48px;
  animation:
    board-ambience-spark-flicker 2.2s ease-in-out infinite,
    board-ambience-spark-loop 4.8s linear infinite;
  animation-delay: var(--ambience-delay, 0s), var(--ambience-delay, 0s);
}

.board-ambience-emitter.is-spark::before {
  width: 10px;
  height: 10px;
  background:
    radial-gradient(circle, rgba(255, 246, 204, 1) 0%, rgba(255, 214, 124, 0.96) 34%, rgba(246, 139, 47, 0.58) 68%, rgba(246, 139, 47, 0) 100%);
  box-shadow:
    0 0 10px rgba(255, 202, 98, 0.92),
    0 0 22px rgba(204, 86, 18, 0.42);
}

.board-ambience-emitter.is-spark::after {
  width: 24px;
  height: 24px;
  background:
    radial-gradient(circle, rgba(255, 180, 84, 0.26) 0%, rgba(180, 74, 24, 0.12) 46%, rgba(32, 14, 8, 0) 82%);
  filter: blur(1.6px);
}

.board-ambience-emitter.is-arc::before {
  width: 24px;
  height: 24px;
  background:
    radial-gradient(circle, rgba(217, 247, 255, 1) 0%, rgba(123, 221, 255, 0.94) 34%, rgba(69, 153, 224, 0.4) 70%, rgba(69, 153, 224, 0) 100%);
  box-shadow:
    0 0 30px rgba(117, 222, 255, 0.86),
    0 0 68px rgba(55, 113, 181, 0.42);
}

.board-ambience-emitter.is-arc::after {
  width: 84px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(104, 210, 255, 0.38) 0%, rgba(104, 210, 255, 0.18) 40%, rgba(104, 210, 255, 0) 76%);
  filter: blur(3px);
}

.board-ambience-emitter.is-mist::before {
  width: 74px;
  height: 74px;
  background:
    radial-gradient(circle, rgba(232, 214, 176, 0.34) 0%, rgba(145, 120, 90, 0.18) 52%, rgba(25, 18, 13, 0) 100%);
  filter: blur(3.6px);
}

.board-ambience-emitter.is-mist::after {
  width: 132px;
  height: 48px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(224, 212, 188, 0.22) 0%, rgba(129, 118, 96, 0.1) 42%, rgba(17, 13, 10, 0) 78%);
  filter: blur(8px);
}

.board-ambience-emitter.is-fog {
  width: 220px;
  height: 104px;
  animation:
    board-ambience-fog-drift 14s ease-in-out infinite,
    board-ambience-fog-breathe 10.4s ease-in-out infinite;
  animation-delay: var(--ambience-delay, 0s), var(--ambience-delay, 0s);
}

.board-ambience-emitter.is-fog::before {
  width: 220px;
  height: 86px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(205, 194, 176, 0.24) 0%, rgba(157, 145, 128, 0.16) 40%, rgba(33, 25, 19, 0) 78%);
  filter: blur(12px);
}

.board-ambience-emitter.is-fog::after {
  width: 280px;
  height: 118px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(187, 178, 164, 0.16) 0%, rgba(131, 120, 109, 0.1) 42%, rgba(25, 20, 17, 0) 78%);
  filter: blur(20px);
}

.board-ambience-emitter.is-smoke {
  width: 118px;
  height: 118px;
  animation:
    board-ambience-smoke-billow 9.8s ease-in-out infinite,
    board-ambience-drift 10.4s ease-in-out infinite;
  animation-delay: var(--ambience-delay, 0s), var(--ambience-delay, 0s);
}

.board-ambience-emitter.is-smoke::before {
  width: 94px;
  height: 94px;
  background:
    radial-gradient(circle, rgba(168, 145, 120, 0.22) 0%, rgba(102, 84, 67, 0.16) 42%, rgba(31, 24, 19, 0) 78%);
  filter: blur(6px);
}

.board-ambience-emitter.is-smoke::after {
  width: 128px;
  height: 128px;
  background:
    radial-gradient(circle, rgba(133, 115, 96, 0.16) 0%, rgba(84, 72, 60, 0.12) 44%, rgba(28, 22, 18, 0) 78%);
  filter: blur(11px);
}

@keyframes board-ambience-pulse {
  0%,
  100% {
    opacity: 0.48;
  }
  18% {
    opacity: 1;
  }
  48% {
    opacity: 0.72;
  }
  72% {
    opacity: 1;
  }
}

@keyframes board-ambience-drift {
  0% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.96));
  }
  35% {
    transform: translate(calc(-50% + var(--ambience-drift-x, 0px)), calc(-50% - (var(--ambience-drift-y, 8px) * 0.4))) scale(var(--ambience-scale, 1));
  }
  68% {
    transform: translate(calc(-50% - (var(--ambience-drift-x, 0px) * 0.5)), calc(-50% - var(--ambience-drift-y, 8px))) scale(calc(var(--ambience-scale, 1) * 1.04));
  }
  100% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.97));
  }
}

@keyframes board-ambience-spark-flicker {
  0%,
  100% {
    opacity: 0.4;
  }
  25% {
    opacity: 1;
  }
  55% {
    opacity: 0.62;
  }
  78% {
    opacity: 0.92;
  }
}

@keyframes board-ambience-spark-loop {
  0% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.88));
  }
  20% {
    transform: translate(
      calc(-50% + var(--spark-path-x1, 4px)),
      calc(-50% - var(--spark-path-y1, 6px))
    ) scale(calc(var(--ambience-scale, 1) * 1.02));
  }
  45% {
    transform: translate(
      calc(-50% + var(--spark-path-x2, -6px)),
      calc(-50% - var(--spark-path-y2, 14px))
    ) scale(calc(var(--ambience-scale, 1) * 1.06));
  }
  68% {
    transform: translate(
      calc(-50% + var(--spark-path-x3, 5px)),
      calc(-50% - var(--spark-path-y3, 9px))
    ) scale(calc(var(--ambience-scale, 1) * 0.98));
  }
  84% {
    transform: translate(
      calc(-50% - (var(--spark-path-x1, 4px) * 0.45)),
      calc(-50% - (var(--spark-path-y1, 6px) * 0.35))
    ) scale(calc(var(--ambience-scale, 1) * 0.92));
  }
  100% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.88));
  }
}

@keyframes board-ambience-smoke-billow {
  0%,
  100% {
    opacity: 0.28;
  }
  24% {
    opacity: 0.46;
  }
  56% {
    opacity: 0.36;
  }
  82% {
    opacity: 0.52;
  }
}

@keyframes board-ambience-fog-bank {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateX(18px);
    opacity: 0.48;
  }
}

@keyframes board-ambience-fog-drift {
  0% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.98));
  }
  35% {
    transform: translate(calc(-50% + 14px), calc(-50% - 4px)) scale(var(--ambience-scale, 1));
  }
  70% {
    transform: translate(calc(-50% - 10px), calc(-50% - 8px)) scale(calc(var(--ambience-scale, 1) * 1.03));
  }
  100% {
    transform: translate(-50%, -50%) scale(calc(var(--ambience-scale, 1) * 0.99));
  }
}

@keyframes board-ambience-fog-drift-soft {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.24;
  }
  50% {
    transform: translateX(-16px);
    opacity: 0.38;
  }
}

@keyframes board-ambience-fog-breathe {
  0%,
  100% {
    opacity: 0.22;
  }
  40% {
    opacity: 0.38;
  }
  72% {
    opacity: 0.3;
  }
}

.battlefield-shake {
  animation: battlefield-shake 420ms ease-in-out;
}

.battlefield-targeting .board-card {
  opacity: 0.45;
  filter: saturate(0.85);
}

.battlefield-targeting .active-attacker,
.battlefield-targeting .target-valid {
  opacity: 1;
  filter: none;
}

.match-zone {
  border: 1px solid rgba(248, 177, 78, 0.82);
  border-radius: var(--radius);
  background: transparent;
  padding: 10px 16px;
  box-shadow:
    inset 0 1px 0 rgba(235, 240, 250, 0.05),
    inset 0 -12px 20px rgba(6, 9, 16, 0.1),
    0 10px 20px rgba(5, 8, 16, 0.1);
}

.lane {
  position: relative;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  z-index: 1;
}

#opponent-lane {
  overflow: visible;
}

#player-lane {
  overflow: visible;
}

#opponent-lane,
#player-lane {
  transform: translateY(var(--match-interface-drop));
}

#neutral-lane {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  z-index: 2;
}

#opponent-lane,
#player-lane {
  padding: 0;
  border: 0;
  box-shadow: none;
}

#opponent-lane {
  margin-bottom: 0;
  transform: translateY(calc(var(--match-interface-drop) - var(--lane-neutral-gap) - var(--enemy-neutral-extra-gap)));
}

#player-lane {
  margin-top: 0;
  transform: translateY(calc(var(--match-interface-drop) + var(--lane-neutral-gap)));
}

#opponent-lane::after,
#player-lane::after {
  content: none;
}

#opponent-lane::before,
#player-lane::before {
  content: none;
}

#player-lane .button-row {
  transform: translateY(calc(var(--match-interface-drop) * -0.72));
}

.lane-player {
  overflow: hidden;
}

#player-lane.lane-player {
  overflow: visible;
}

#neutral-lane {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-top: 2px;
  padding-bottom: 2px;
}

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

.lane::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.lane::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(225, 190, 132, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 204, 0.012),
    inset 0 0 0 8px rgba(12, 16, 26, 0.006);
}

.lane-opponent::before {
  background:
    linear-gradient(180deg, rgba(255, 232, 198, 0.004), rgba(255, 232, 198, 0) 18%),
    repeating-linear-gradient(
      135deg,
      rgba(165, 214, 244, 0.0015) 0 3px,
      rgba(165, 214, 244, 0) 3px 14px
    ),
    linear-gradient(180deg, rgba(69, 166, 229, 0.022) 0%, rgba(21, 34, 58, 0) 42%);
}

.lane-player::before {
  background:
    linear-gradient(180deg, rgba(255, 232, 198, 0.004), rgba(255, 232, 198, 0) 18%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 211, 155, 0.0015) 0 3px,
      rgba(255, 211, 155, 0) 3px 14px
    ),
    linear-gradient(0deg, rgba(243, 154, 64, 0.022) 0%, rgba(21, 34, 58, 0) 42%);
}

.match-zone h3 {
  margin: 0;
}

.your-hero-name,
.opponent-hero-name {
  color: #fffaf2;
}

.player-hero-side {
  position: relative;
  overflow: visible;
}

#opponent-hero-name,
#your-hero-name {
  position: absolute;
  width: max-content;
  max-width: min(260px, 28vw);
  min-height: 32px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 231, 196, 0.12);
  background:
    linear-gradient(180deg, rgba(22, 30, 45, 0.94), rgba(10, 16, 27, 0.9));
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(8px);
  text-shadow:
    -1px 0 0 rgba(0, 0, 0, 0.92),
    1px 0 0 rgba(0, 0, 0, 0.92),
    0 -1px 0 rgba(0, 0, 0, 0.92),
    0 1px 0 rgba(0, 0, 0, 0.92),
    -1px -1px 0 rgba(0, 0, 0, 0.88),
    1px -1px 0 rgba(0, 0, 0, 0.88),
    -1px 1px 0 rgba(0, 0, 0, 0.88),
    1px 1px 0 rgba(0, 0, 0, 0.88);
  box-shadow:
    0 8px 18px rgba(4, 8, 16, 0.22),
    inset 0 1px 0 rgba(255, 246, 228, 0.06);
  white-space: nowrap;
}

#opponent-hero-name::before,
#your-hero-name::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 3px;
  opacity: 1;
}

#opponent-hero-name::after,
#your-hero-name::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
}

#opponent-hero-name {
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  text-align: left;
  color: #ffe7dc;
  background:
    linear-gradient(90deg, rgba(120, 46, 38, 0.56), rgba(17, 24, 38, 0.94) 22%),
    linear-gradient(180deg, rgba(22, 30, 45, 0.94), rgba(10, 16, 27, 0.9));
}

#opponent-hero-name::before {
  left: -5px;
  background: linear-gradient(180deg, rgba(255, 147, 116, 0.98), rgba(184, 76, 58, 0.86));
}

#opponent-hero-name::after {
  left: -11px;
  background: rgba(255, 147, 116, 0.92);
}

#your-hero-name {
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
  color: #e3efff;
  background:
    linear-gradient(270deg, rgba(56, 97, 166, 0.58), rgba(17, 24, 38, 0.94) 22%),
    linear-gradient(180deg, rgba(22, 30, 45, 0.94), rgba(10, 16, 27, 0.9));
}

#your-hero-name::before {
  right: -5px;
  background: linear-gradient(180deg, rgba(129, 184, 255, 0.98), rgba(72, 118, 197, 0.88));
}

#your-hero-name::after {
  right: -11px;
  background: rgba(129, 184, 255, 0.92);
}

.board-corner-controls {
  position: absolute;
  top: calc(var(--scene-base-top-pad) + 54px);
  left: 16px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(210, 173, 122, 0.18);
  background:
    linear-gradient(180deg, rgba(34, 23, 17, 0.66) 0%, rgba(18, 12, 10, 0.82) 100%);
  box-shadow:
    0 12px 24px rgba(7, 4, 3, 0.2),
    inset 0 1px 0 rgba(255, 232, 205, 0.08);
  backdrop-filter: blur(6px);
}

.match-overlay-quit-btn {
  position: relative;
  pointer-events: auto;
}

#concede-btn.match-overlay-quit-btn {
  min-width: 116px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  border-color: rgba(188, 114, 93, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 183, 166, 0.12) 0%, rgba(255, 183, 166, 0) 24%),
    linear-gradient(180deg, rgba(110, 46, 37, 0.96) 0%, rgba(74, 30, 24, 0.98) 100%);
  box-shadow:
    0 8px 16px rgba(24, 9, 7, 0.22),
    0 0 0 1px rgba(52, 19, 15, 0.18),
    inset 0 1px 0 rgba(255, 208, 194, 0.12);
  text-transform: uppercase;
  font-weight: 800;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.match-zone h4 {
  margin: 8px 0 6px;
  color: #eaf5ff;
}

.hero-panel {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: visible;
}

.enemy-profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.enemy-profile-avatar {
  --hero-avatar-translate-x: 3px;
  --hero-avatar-translate-y: 0px;
  width: var(--hero-avatar-base-size);
  height: var(--hero-avatar-base-size);
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 146, 114, 0.85);
  box-shadow: 0 0 0 1px rgba(94, 41, 25, 0.65);
  background: rgba(50, 31, 31, 0.8);
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
  transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(var(--hero-avatar-scale));
  transform-origin: left center;
}

.enemy-profile-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffe9df;
  font-size: 18px;
  font-weight: 700;
}

.enemy-profile-name {
  margin: 0;
  color: #ffd9c9;
  font-size: 19px;
  font-weight: 700;
}

.your-profile-strip {
  --hero-avatar-translate-x: var(--your-avatar-offset-x);
  --hero-avatar-translate-y: var(--your-avatar-offset-y);
  --hero-health-band-bottom: 12%;
  position: relative;
  width: calc(var(--hero-avatar-hit-size) + 24px);
  min-width: calc(var(--hero-avatar-hit-size) + 24px);
  min-height: calc(var(--hero-avatar-hit-size) + 24px);
  margin-bottom: 2px;
  overflow: visible;
}

.opponent-profile-strip {
  margin-bottom: 2px;
}

.opponent-portrait-wrap {
  position: relative;
  --opponent-avatar-offset-x: 12px;
  --opponent-avatar-offset-y: calc((var(--hero-avatar-hit-size) - var(--hero-avatar-base-size)) / 2);
  --hero-avatar-translate-x: var(--opponent-avatar-offset-x);
  --hero-avatar-translate-y: var(--opponent-avatar-offset-y);
  --hero-health-band-bottom: 12%;
  --opponent-avatar-target-top: calc(
    var(--opponent-avatar-offset-y) - ((var(--hero-avatar-scale) - 1) * var(--hero-avatar-base-size) / 2)
  );
  width: calc(var(--hero-avatar-hit-size) + 24px);
  min-width: calc(var(--hero-avatar-hit-size) + 24px);
  min-height: calc(var(--hero-avatar-hit-size) + 24px);
  overflow: visible;
}

.your-profile-avatar {
  --hero-avatar-translate-x: var(--your-avatar-offset-x);
  --hero-avatar-translate-y: var(--your-avatar-offset-y);
  border-color: rgba(126, 165, 228, 0.85);
  box-shadow: 0 0 0 1px rgba(28, 58, 104, 0.7);
  background: rgba(29, 43, 74, 0.8);
}

.your-profile-fallback {
  --hero-avatar-translate-x: var(--your-avatar-offset-x);
  --hero-avatar-translate-y: var(--your-avatar-offset-y);
  color: #dbe9ff;
}

.player-board-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) max-content;
  gap: 10px;
  align-items: start;
  position: relative;
  z-index: 1;
  width: max-content;
  min-width: 100%;
}

#player-lane > .player-board-row {
  grid-template-columns: max-content;
  gap: 0;
  width: max-content;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
  transform: translateY(calc(-1 * var(--player-lane-slot-lift)));
}

#opponent-lane > .player-board-row {
  grid-template-columns: max-content;
  grid-template-areas:
    "hero"
    "board";
  justify-items: center;
  gap: 0;
  width: max-content;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

.hero-health-band {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--hero-avatar-base-size);
  height: var(--hero-avatar-base-size);
  transform: none;
  transform-origin: left center;
  border-radius: 50%;
  clip-path: circle(49.4% at 50% 50%);
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
  z-index: 7;
}

.hero-health-band::before {
  content: "";
  position: absolute;
  left: 1.2%;
  right: 1.2%;
  bottom: var(--hero-health-band-bottom, 12%);
  height: 16px;
  border-top: 1px solid rgba(126, 214, 255, 0.32);
  border-bottom: 1px solid rgba(126, 214, 255, 0.32);
  border-left: 0;
  border-right: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(8, 16, 30, 0.9) 0%, rgba(6, 12, 22, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(214, 236, 255, 0.1),
    0 4px 10px rgba(4, 10, 22, 0.28);
  z-index: 1;
}

.hero-health-band-fill {
  position: absolute;
  left: 1.2%;
  bottom: calc(var(--hero-health-band-bottom, 12%) + 1px);
  height: 14px;
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(142, 29, 29, 0.98) 0%, rgba(212, 58, 47, 0.98) 52%, rgba(240, 111, 74, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 190, 0.32),
    0 0 8px rgba(234, 90, 66, 0.24);
  transition: width 220ms ease;
  z-index: 2;
}

.hero-health-band-value {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--hero-health-band-bottom, 12%);
  height: 16px;
  display: grid;
  place-items: center;
  color: #f7f2e6;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow:
    -1px 0 0 rgba(0, 0, 0, 0.92),
    1px 0 0 rgba(0, 0, 0, 0.92),
    0 -1px 0 rgba(0, 0, 0, 0.92),
    0 1px 0 rgba(0, 0, 0, 0.92),
    -1px -1px 0 rgba(0, 0, 0, 0.88),
    1px -1px 0 rgba(0, 0, 0, 0.88),
    -1px 1px 0 rgba(0, 0, 0, 0.88),
    1px 1px 0 rgba(0, 0, 0, 0.88);
  pointer-events: none;
  z-index: 4;
}

.hero-health-band::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px rgba(20, 14, 10, 0.5),
    inset 0 0 0 3px rgba(255, 236, 204, 0.08);
  pointer-events: none;
  z-index: 3;
}

#your-stats.hero-stats,
#opponent-stats.hero-stats {
  display: none !important;
}

#player-lane .player-hero-side {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 0) translate(var(--user-hero-offset-x), var(--user-hero-offset-y));
  z-index: 4;
  overflow: visible;
}

#opponent-lane .player-hero-side {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  grid-area: hero;
  justify-self: center;
  align-self: start;
  margin-top: 140px;
  margin-bottom: -26px;
  z-index: 4;
  overflow: visible;
}

#player-lane .player-board-side {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: visible;
}

#opponent-lane .player-board-side {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: visible;
  grid-area: board;
}

#opponent-hero-target,
#opponent-profile-fallback,
#opponent-profile-image {
  pointer-events: auto;
}

.neutral-board-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.neutral-board-side {
  display: grid;
  justify-items: center;
  --neutral-slot-size: calc(var(--board-slot-size) * 0.72);
  gap: 4px;
}

.player-hero-side .hero-panel {
  margin-bottom: 0;
}

.player-board-side .zone-note {
  margin-bottom: 2px;
}

.player-board-side .hand-instructions {
  margin-bottom: 14px;
  display: none;
}

.player-board-side {
  position: relative;
  min-width: 0;
  overflow-x: visible;
  overflow-y: visible;
}

.board-scroll-wrap {
  position: relative;
  width: max-content;
  min-width: 0;
  overflow: visible;
  overflow-y: visible;
  padding: 8px 12px 12px;
}

#opponent-lane .board-scroll-wrap,
#player-lane .board-scroll-wrap {
  padding: 0;
}

.board-scroll-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 236, 205, 0.1), rgba(255, 236, 205, 0) 18%),
    linear-gradient(90deg, rgba(214, 177, 115, 0.12), rgba(214, 177, 115, 0) 10%, rgba(214, 177, 115, 0) 90%, rgba(214, 177, 115, 0.12)),
    linear-gradient(145deg, rgba(92, 55, 30, 0.72), rgba(38, 22, 13, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 210, 0.14),
    inset 0 -3px 0 rgba(21, 12, 8, 0.46),
    inset 0 0 0 2px rgba(120, 74, 39, 0.45),
    0 14px 24px rgba(5, 8, 15, 0.16);
}

.board-scroll-wrap::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 8px;
  bottom: 6px;
  border-radius: 999px;
  pointer-events: none;
  border: 1px solid rgba(236, 204, 144, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 241, 214, 0.06), rgba(255, 241, 214, 0) 20%),
    linear-gradient(145deg, rgba(19, 27, 42, 0.08), rgba(7, 12, 20, 0.18));
  box-shadow:
    inset 0 0 0 10px rgba(10, 15, 23, 0.14),
    inset 0 1px 0 rgba(255, 240, 214, 0.08),
    inset 0 -10px 12px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(120, 74, 39, 0.18);
}

.hero-stats {
  margin: 10px 0 0;
  color: #e7ceaa;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  white-space: pre-line;
}

#your-stats.hero-stats {
  position: absolute;
  left: auto;
  right: -32px;
  top: 50%;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  white-space: normal;
  pointer-events: none;
  transform: translateY(-50%);
}

#opponent-stats.hero-stats {
  position: absolute;
  left: -10px;
  right: -2px;
  bottom: -16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0;
  white-space: normal;
  pointer-events: none;
}

#your-stats.hero-stats .hero-stat-medallion,
#opponent-stats.hero-stats .hero-stat-medallion {
  transform: translate(15px, -15px);
}

#your-stats.hero-stats .hero-stat-medallion {
  transform: none;
}

.hero-stat-medallion {
  display: grid;
  justify-items: center;
  align-content: center;
  width: var(--hero-stat-medallion-size);
  height: var(--hero-stat-medallion-size);
  border-radius: 999px;
  border: 2px solid rgba(214, 176, 108, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 235, 194, 0.12) 0%, rgba(255, 235, 194, 0) 28%),
    linear-gradient(180deg, rgba(60, 40, 22, 0.96) 0%, rgba(28, 18, 10, 0.98) 100%);
  box-shadow:
    0 10px 20px rgba(14, 8, 4, 0.28),
    inset 0 1px 0 rgba(255, 239, 208, 0.2),
    inset 0 -4px 8px rgba(16, 10, 5, 0.3);
}

.hero-stat-medallion-icon {
  font-size: var(--hero-stat-medallion-icon-size);
  font-weight: 900;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.hero-stat-medallion-value {
  margin-top: var(--hero-stat-medallion-value-gap);
  font-size: var(--hero-stat-medallion-value-size);
  font-weight: 900;
  line-height: 1;
}

.hero-stat-medallion-value,
.hand-card-stat-value,
.board-minion-bubble-value {
  text-shadow:
    -1px 0 0 rgba(0, 0, 0, 0.92),
    1px 0 0 rgba(0, 0, 0, 0.92),
    0 -1px 0 rgba(0, 0, 0, 0.92),
    0 1px 0 rgba(0, 0, 0, 0.92),
    -1px -1px 0 rgba(0, 0, 0, 0.88),
    1px -1px 0 rgba(0, 0, 0, 0.88),
    -1px 1px 0 rgba(0, 0, 0, 0.88),
    1px 1px 0 rgba(0, 0, 0, 0.88);
}

.hero-stat-medallion-health .hero-stat-medallion-icon {
  color: #ffb4a6;
}

.hero-stat-medallion-health .hero-stat-medallion-value {
  color: #ffb4a6;
}

.hero-hand {
  margin: 0;
}

.zone-note {
  font-size: 13px;
  color: #dcf0ff;
  margin: 0 0 10px;
}

.board-grid,
.hand-grid {
  display: grid;
  gap: var(--board-hand-gap);
  margin-bottom: 10px;
}

.board-grid {
  grid-template-columns: repeat(7, var(--board-slot-size));
  justify-content: start;
  width: max-content;
  min-width: 0;
  margin-top: 2px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.neutral-board-grid {
  grid-template-columns: repeat(2, var(--neutral-slot-size));
  justify-content: center;
  gap: calc(var(--board-hand-gap) * 0.75);
  margin-top: 0;
}

.neutral-board-scroll-wrap {
  margin: 0 auto;
  padding: 2px 10px 4px;
}

.neutral-board-scroll-wrap::before {
  inset: 2px;
}

.neutral-board-scroll-wrap::after {
  left: 12px;
  right: 12px;
  top: 12px;
  bottom: 7px;
}

.neutral-board-side h4 {
  margin-bottom: 2px;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.neutral-board-grid .board-slot {
  width: var(--neutral-slot-size);
  min-width: var(--neutral-slot-size);
}

.hand-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 10px;
  overflow-x: visible;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 25px;
  padding-bottom: 25px;
  margin-top: 8px;
  margin-bottom: 0;
  min-width: 0;
  flex: 0 1 auto;
}

.hand-grid.hand-grid-fan {
  align-items: flex-end;
  padding-top: 6px;
  padding-bottom: 0;
  transform: none;
}

.hand-grid.hand-grid-fan .hand-card {
  transform-origin: 50% 100%;
  transition: transform 170ms ease, margin 170ms ease, filter 170ms ease;
}

.hand-grid.hand-grid-fan .hand-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: -120px;
}

.hand-grid.hand-grid-fan .hand-card:not(.hand-card-dragging):not(.hand-card-draw-enter) {
  transform:
    translate(var(--hand-fan-x, 0px), var(--hand-fan-y, 0px))
    rotate(var(--hand-fan-rotate, 0deg));
}

.hand-grid.hand-grid-fan .hand-card:not(.hand-card-dragging):not(.hand-card-draw-enter):hover {
  transform:
    translate(var(--hand-fan-x, 0px), calc(var(--hand-fan-y, 0px) - 100px))
    rotate(0deg)
    scale(1.26);
  z-index: 500 !important;
}

.hand-cards-wrap.hand-cards-wrap-fan {
  overflow: visible;
  height: calc(var(--hand-card-height) * 0.80);
  align-self: end;
  transform: translateY(47px);
  contain: layout;
}

.hand-cards-wrap.hand-cards-wrap-fan .hand-grid.hand-grid-fan {
  padding-top: 0;
}

.hand-grid-mobile-stacked {
  justify-content: center;
  overflow-x: visible;
}

.hand-grid-mobile-stacked .hand-card {
  transition: transform 140ms ease, margin 140ms ease, box-shadow 140ms ease;
}

.hand-grid-mobile-stacked .hand-card:active {
  transform: translateY(-8px);
}

.hand-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.hand-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 10px;
  min-width: 0;
  position: relative;
  z-index: 4;
}

.hand-action-stack {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  position: relative;
  margin-top: 6px;
  transform: translateY(-70px);
  padding: 14px 14px 16px;
  border-radius: 24px;
  border: 1px solid rgba(147, 114, 62, 0.56);
  background:
    linear-gradient(180deg, rgba(52, 34, 17, 0.82) 0%, rgba(28, 18, 10, 0.9) 100%);
  box-shadow:
    0 18px 30px rgba(9, 6, 3, 0.3),
    inset 0 1px 0 rgba(255, 221, 168, 0.14),
    inset 0 0 0 1px rgba(255, 201, 117, 0.06);
  overflow: hidden;
}

.hand-action-stack::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 18px;
  border: 1px solid rgba(214, 169, 89, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 222, 159, 0.08) 0%, rgba(255, 222, 159, 0) 34%),
    linear-gradient(180deg, rgba(96, 63, 27, 0.24) 0%, rgba(37, 24, 13, 0.12) 100%);
  pointer-events: none;
}

.hand-action-stack > * {
  position: relative;
  z-index: 1;
}

.your-coins-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 154px;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(192, 154, 84, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 229, 162, 0.1) 0%, rgba(255, 229, 162, 0) 26%),
    linear-gradient(180deg, rgba(58, 40, 18, 0.92) 0%, rgba(31, 22, 12, 0.98) 100%);
  box-shadow:
    0 10px 18px rgba(14, 9, 4, 0.22),
    inset 0 1px 0 rgba(255, 240, 204, 0.14),
    inset 0 -3px 6px rgba(16, 10, 5, 0.22);
}

.your-coins-badge-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: translateY(1px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.your-coins-badge-value {
  color: #ffe39a;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

.hand-cards-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: calc(
    (var(--max-hand-size) * var(--hand-card-width)) +
    ((var(--max-hand-size) - 1) * var(--board-hand-gap)) +
    64px
  );
  flex: 0 0 auto;
}

.hand-deck-count {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 35px), calc(-50% + 5px));
  margin: 0;
  color: #e9f4ff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-shadow:
    -2px 0 0 rgba(0, 0, 0, 0.92),
    2px 0 0 rgba(0, 0, 0, 0.92),
    0 -2px 0 rgba(0, 0, 0, 0.92),
    0 2px 0 rgba(0, 0, 0, 0.92),
    -1px -1px 0 rgba(0, 0, 0, 0.92),
    1px -1px 0 rgba(0, 0, 0, 0.92),
    -1px 1px 0 rgba(0, 0, 0, 0.92),
    1px 1px 0 rgba(0, 0, 0, 0.92),
    0 0 8px rgba(112, 186, 255, 0.18);
  text-align: center;
  pointer-events: none;
  z-index: 3406;
}

.hand-card {
  border: 1px solid rgba(114, 195, 252, 0.58);
  border-radius: 14px;
  background: rgba(36, 56, 92, 0.86);
  padding: 5px;
  user-select: none;
  -webkit-user-select: none;
}

.hand-card {
  width: var(--hand-card-width);
  flex: 0 0 var(--hand-card-width);
  min-height: var(--hand-card-height);
  padding: 0;
  position: relative;
  overflow: visible;
  border-radius: 24px;
  display: grid;
  grid-template-rows: minmax(96px, 1fr) auto;
  align-items: stretch;
  justify-content: stretch;
  background: transparent;
  box-shadow: none;
  transform-style: flat;
  perspective: none;
  will-change: transform, opacity;
}

@keyframes handCardDrawEnter {
  0% {
    opacity: 1;
    transform:
      perspective(2200px)
      translateX(calc(var(--hand-draw-origin-x) * 1.18))
      translateY(calc(var(--hand-draw-origin-y) * 1.14))
      rotateX(6deg)
      rotateZ(-18deg)
      scale(0.5);
  }
  52% {
    opacity: 1;
    transform:
      perspective(2200px)
      translateX(calc(var(--hand-draw-origin-x) * 0.54))
      translateY(calc(var(--hand-draw-origin-y) * 0.56 - 22px))
      rotateX(8deg)
      rotateZ(-13deg)
      scale(0.74);
  }
  76% {
    opacity: 1;
    transform:
      perspective(2200px)
      translateX(24px)
      translateY(-9px)
      rotateX(1deg)
      rotateZ(-1deg)
      scale(1.08);
  }
  90% {
    opacity: 1;
    transform:
      perspective(2200px)
      translateX(20px)
      translateY(-8px)
      rotateX(0deg)
      rotateZ(1deg)
      scale(1.05);
  }
  100% {
    opacity: 1;
    transform:
      perspective(2200px)
      translateX(0)
      translateY(0)
      rotateX(0deg)
      rotateZ(0deg)
      scale(1);
  }
}

.hand-card-draw-enter {
  --hand-draw-origin-x: min(46vw, 520px);
  --hand-draw-origin-y: 34px;
  animation: handCardDrawEnter 1300ms cubic-bezier(0.24, 0.86, 0.24, 1) both;
  animation-delay: var(--hand-draw-delay, 0ms);
  transform-origin: right center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  filter: drop-shadow(0 16px 22px rgba(8, 12, 20, 0.36));
  will-change: transform, opacity, filter;
}

.hand-card-draw-enter > * {
  backface-visibility: hidden;
  transform: rotateY(180deg) translateZ(1px);
  animation: handCardDrawFlipFront 1300ms cubic-bezier(0.24, 0.86, 0.24, 1) both;
  animation-delay: var(--hand-draw-delay, 0ms);
}

.hand-card-draw-enter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 24px;
  border: 2px solid rgba(183, 138, 84, 0.88);
  background:
    url("/static/mythorus-logo.png"),
    linear-gradient(180deg, rgba(255, 236, 205, 0.12), rgba(255, 236, 205, 0.02) 26%),
    radial-gradient(circle at top, rgba(214, 150, 75, 0.3), transparent 44%),
    linear-gradient(180deg, rgba(68, 46, 24, 0.995) 0%, rgba(22, 14, 10, 0.995) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: center 30%, center center, center top, center center;
  background-size: 74px auto, 100% 100%, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 1px 0 rgba(240, 205, 156, 0.1),
    0 14px 28px rgba(10, 7, 4, 0.32);
  opacity: 1;
  backface-visibility: hidden;
  transform: rotateY(0deg) translateZ(2px);
  animation: handCardDrawFlipBack 1300ms cubic-bezier(0.24, 0.86, 0.24, 1) both;
  animation-delay: var(--hand-draw-delay, 0ms);
}

@keyframes handCardDrawFlipFront {
  0% {
    transform: rotateY(180deg) translateZ(1px);
  }
  56% {
    transform: rotateY(180deg) translateZ(1px);
  }
  72% {
    transform: rotateY(0deg) translateZ(1px);
  }
  100% {
    transform: rotateY(0deg) translateZ(1px);
  }
}

@keyframes handCardDrawFlipBack {
  0% {
    transform: rotateY(0deg) translateZ(2px);
  }
  56% {
    transform: rotateY(0deg) translateZ(2px);
  }
  72% {
    transform: rotateY(180deg) translateZ(2px);
  }
  100% {
    transform: rotateY(180deg) translateZ(2px);
  }
}

@keyframes handCardDrawSheen {
  0% {
    opacity: 0;
    transform: translateX(68%) skewX(-18deg);
  }
  28% {
    opacity: 0;
  }
  46% {
    opacity: 1;
  }
  82% {
    opacity: 0.42;
    transform: translateX(-8%) skewX(-18deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-22%) skewX(-18deg);
  }
}


@keyframes handCardEpicPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(206, 132, 255, 0.2),
      0 0 9px rgba(187, 96, 255, 0.16),
      0 0 15px rgba(187, 96, 255, 0.05),
      0 8px 16px rgba(32, 14, 58, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(222, 166, 255, 0.24),
      0 0 14px rgba(187, 96, 255, 0.22),
      0 0 22px rgba(187, 96, 255, 0.08),
      0 11px 22px rgba(32, 14, 58, 0.24);
  }
}

@keyframes handCardMythicPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(187, 238, 255, 0.28),
      0 0 10px rgba(255, 208, 97, 0.12),
      0 0 28px rgba(118, 216, 255, 0.24),
      0 12px 26px rgba(63, 39, 4, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(205, 244, 255, 0.34),
      0 0 14px rgba(255, 208, 97, 0.2),
      0 0 38px rgba(118, 216, 255, 0.32),
      0 16px 32px rgba(63, 39, 4, 0.32);
  }
}

@keyframes handCardAuraFloat {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.68; }
  50% { transform: scale(1.04) translateY(-3px); opacity: 0.86; }
}

@keyframes hiddenDrawSigilPulse {
  0%, 100% {
    opacity: 0.56;
    transform: scale(0.96);
    filter: brightness(0.98);
  }
  50% {
    opacity: 0.94;
    transform: scale(1.04);
    filter: brightness(1.08);
  }
}

@keyframes hiddenDrawVeilDrift {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 36px 0, 0 0;
  }
}

@keyframes storeBackSheen {
  0% {
    transform: translateX(-10%) rotate(18deg);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translateX(170%) rotate(18deg);
    opacity: 0;
  }
}

.hand-card-glow-epic:not(.hand-card-draw-enter) {
  border-color: rgba(193, 112, 255, 0.7);
  animation: handCardEpicPulse 1.8s ease-in-out infinite;
}

.hand-card-glow-epic .hand-card-art-wrap {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(211, 132, 255, 0.3), rgba(21, 23, 49, 0.96));
}

.hand-card-glow-epic:not(.hand-card-draw-enter)::after,
.hand-card-glow-mythic:not(.hand-card-draw-enter)::after {
  content: "";
  position: absolute;
  inset: -11%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.48;
  animation: handCardAuraFloat 2.2s ease-in-out infinite;
}

.hand-card-glow-epic:not(.hand-card-draw-enter)::after {
  opacity: 0.38;
  background:
    radial-gradient(circle, rgba(220, 148, 255, 0.22) 0%, rgba(210, 134, 255, 0.07) 34%, transparent 72%);
}

.hand-card-glow-mythic:not(.hand-card-draw-enter) {
  border-color: rgba(255, 224, 154, 0.84);
  animation: handCardMythicPulse 2.6s ease-in-out infinite;
}

.hand-card-glow-mythic .hand-card-art-wrap {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(155, 236, 255, 0.2), rgba(17, 24, 36, 0.98));
}

.hand-card-glow-mythic:not(.hand-card-draw-enter)::after {
  background:
    radial-gradient(circle, rgba(136, 225, 255, 0.3) 0%, rgba(255, 233, 166, 0.1) 34%, transparent 72%);
}

.hand-card-finish-shiny {
  isolation: isolate;
  background:
    radial-gradient(circle at 16% 10%, rgba(112, 229, 255, 0.24), transparent 36%),
    radial-gradient(circle at 84% 88%, rgba(255, 206, 96, 0.2), transparent 38%),
    linear-gradient(150deg, rgba(16, 56, 88, 0.97) 0%, rgba(18, 32, 57, 0.98) 36%, rgba(58, 40, 16, 0.95) 68%, rgba(13, 86, 108, 0.96) 100%),
    linear-gradient(100deg, rgba(157, 233, 255, 0.86) 0%, rgba(255, 217, 132, 0.92) 35%, rgba(132, 221, 255, 0.86) 70%, rgba(255, 221, 146, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(225, 251, 255, 0.22),
    inset 0 -14px 26px rgba(5, 10, 18, 0.3);
}

.hand-card-finish-shiny .hand-card-art-wrap {
  background:
    radial-gradient(circle at 22% 14%, rgba(217, 252, 255, 0.26), transparent 40%),
    radial-gradient(circle at 82% 84%, rgba(255, 231, 156, 0.2), transparent 42%),
    linear-gradient(162deg, rgba(50, 184, 226, 0.48) 0%, rgba(16, 34, 58, 0.97) 36%, rgba(156, 111, 34, 0.44) 72%, rgba(33, 152, 188, 0.48) 100%),
    linear-gradient(102deg, rgba(216, 252, 255, 0.26) 0%, rgba(0, 0, 0, 0) 30%, rgba(255, 236, 168, 0.2) 74%, rgba(0, 0, 0, 0) 100%);
}

.hand-card-finish-shiny .hand-card-content {
  background:
    radial-gradient(circle at 12% 4%, rgba(172, 240, 255, 0.16), transparent 30%),
    linear-gradient(152deg, rgba(17, 63, 92, 0.93) 0%, rgba(14, 30, 48, 0.96) 42%, rgba(68, 48, 18, 0.92) 74%, rgba(14, 80, 106, 0.94) 100%),
    linear-gradient(112deg, rgba(214, 251, 255, 0.14) 0%, rgba(0, 0, 0, 0) 34%, rgba(255, 228, 145, 0.11) 69%, rgba(0, 0, 0, 0) 100%);
  border-top-color: rgba(209, 246, 255, 0.3);
}

.board-card {
  border: 1px solid rgba(114, 195, 252, 0.26);
  border-radius: 999px;
  background: rgba(17, 35, 63, 0.34);
  padding: 4px;
  user-select: none;
  -webkit-user-select: none;
  text-align: left;
  color: #eff8ff;
  font-weight: 600;
  font-size: 12px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 10px 18px rgba(5, 10, 18, 0.2),
    inset 0 1px 0 rgba(233, 243, 255, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hand-card {
  z-index: 2;
}

.hand-card-hidden-draw {
  border-color: rgba(141, 104, 58, 0.56);
  background:
    linear-gradient(148deg, rgba(60, 40, 20, 0.99) 0%, rgba(18, 12, 8, 0.99) 44%, rgba(42, 28, 15, 0.99) 100%);
  box-shadow:
    0 12px 26px rgba(10, 7, 4, 0.32),
    inset 0 1px 0 rgba(240, 205, 156, 0.1),
    inset 0 0 0 1px rgba(191, 144, 86, 0.05);
}

.hand-card-hidden-draw::after {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(214, 169, 105, 0.14) 0%, rgba(214, 169, 105, 0.05) 34%, transparent 72%);
  opacity: 0.5;
  animation: handCardAuraFloat 2.4s ease-in-out infinite;
}

.hand-grid.hand-drag-active .hand-card:not(.hand-card-dragging) {
  opacity: 0.38;
  filter: saturate(0.82) brightness(0.86);
  transition: opacity 120ms ease, filter 120ms ease;
}

.hand-card-drag-placeholder {
  width: var(--hand-card-width);
  flex: 0 0 var(--hand-card-width);
  min-height: var(--hand-card-height);
  border: 0;
  background: transparent;
}

.hand-card-dragging {
  position: fixed;
  margin: 0;
  z-index: 2000;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: 0 22px 40px rgba(6, 14, 29, 0.42);
  transform-origin: top left;
  transition: opacity 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  animation: none !important;
}

.hand-card-dragging::after {
  animation: none !important;
  opacity: 0;
}

.hand-card-dragging.hand-card-glow-epic,
.hand-card-dragging.hand-card-glow-mythic {
  animation: none !important;
}

.hand-card-dragging.hand-card-over-preview {
  opacity: 0.18;
}

.hand-card-dragging.hand-card-target-lock-hidden {
  opacity: 0;
  filter: none;
  box-shadow: none;
}

.hand-card-dragging.hand-card-target-lock-hidden::after {
  opacity: 0;
}

.hand-card-dragging.hand-card-over-cast {
  opacity: 1;
  filter: brightness(1.04) saturate(1.08);
  outline: 4px solid rgba(114, 234, 157, 0.98);
  outline-offset: -2px;
  box-shadow:
    0 18px 34px rgba(6, 14, 29, 0.42),
    0 0 0 3px rgba(86, 208, 132, 0.92),
    0 0 24px rgba(72, 194, 116, 0.42);
}

.hand-card-dragging.hand-card-over-disenchant {
  opacity: 0.74;
  filter: sepia(0.28) saturate(0.82) brightness(0.9);
  box-shadow: 0 10px 18px rgba(28, 14, 6, 0.34), 0 0 22px rgba(214, 152, 67, 0.26);
}

.hand-card-dragging.hand-card-disenchant-commit {
  filter: sepia(0.42) saturate(0.72) brightness(0.84);
  box-shadow: 0 6px 12px rgba(28, 14, 6, 0.28), 0 0 26px rgba(242, 192, 109, 0.32);
}

.hand-card-returning {
  transition: left 180ms ease, top 180ms ease, width 180ms ease, height 180ms ease, transform 180ms ease;
}

.hand-card-commit-hide {
  opacity: 0;
}

.hand-card-art-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  border-bottom: 1px solid rgba(180, 205, 244, 0.1);
  background: rgba(14, 25, 45, 0.84);
  pointer-events: none;
}

.hand-card-hidden-draw-art {
  display: grid;
  place-items: center;
  align-content: start;
  padding-top: 32px;
  border-bottom-color: rgba(183, 139, 82, 0.14);
  background:
    radial-gradient(circle at top, rgba(214, 150, 75, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(60, 40, 21, 0.99) 0%, rgba(18, 12, 8, 0.99) 100%);
  animation: hiddenDrawVeilDrift 3.6s linear infinite;
}

.hand-card-hidden-draw-art::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(208, 167, 108, 0.14) 0%, transparent 66%);
}

.hand-card-hidden-draw-art::after {
  content: "";
  position: absolute;
  inset: -20% 60% -20% -35%;
  z-index: 2;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent 0%, rgba(245, 218, 170, 0.14) 50%, transparent 100%);
  animation: storeBackSheen 2.2s linear infinite;
}

.hand-card-hidden-draw-logo {
  position: relative;
  z-index: 3;
  width: 88px;
  max-height: 42px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.38));
}

.hand-card-hidden-draw-art .hand-card-art-fallback {
  display: none;
}

.hand-card-art-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(233, 241, 255, 0.42);
  font-size: 28px;
  font-weight: 900;
  background: radial-gradient(circle at 30% 30%, rgba(76, 112, 180, 0.32), rgba(16, 26, 45, 0.94));
}

.hand-card-art-wrap:not(.hand-card-art-wrap-missing) .hand-card-art-fallback {
  display: none;
}

.hand-card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
  pointer-events: none;
}

.hand-card-art-wrap-minion .hand-card-art,
.hand-card-art-wrap-minion .hand-card-art-fallback {
  filter: saturate(1.02);
}

.hand-card-stat-badge {
  position: absolute;
  bottom: -18px;
  z-index: 3;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.hand-card-stat-attack {
  left: -10px;
}

.hand-card-stat-health {
  right: -10px;
}

.hand-card-stat-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.hand-card-stat-attack .hand-card-stat-icon {
  transform: scale(0.9);
}

.hand-card-stat-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f4f8ff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
}

.hand-card-stat-value.stat-value-buffed,
.board-minion-bubble-value.stat-value-buffed {
  color: #7dff8e;
}

.hand-card-stat-value.stat-value-debuffed,
.board-minion-bubble-value.stat-value-debuffed {
  color: #a40014;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.96);
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.88),
    0 1px 1px rgba(255, 255, 255, 0.72);
}

.hand-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 8px 10px 40px;
  background: linear-gradient(180deg, rgba(9, 16, 29, 0.96) 0%, rgba(7, 13, 24, 0.99) 100%);
  border-top: 1px solid rgba(180, 205, 244, 0.16);
  border-radius: 0 0 24px 24px;
  pointer-events: none;
}
.hand-card-shiny-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  width: 27px;
  height: 27px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  filter:
    drop-shadow(0 2px 4px rgba(4, 8, 14, 0.52))
    drop-shadow(0 0 8px rgba(112, 229, 255, 0.34))
    drop-shadow(0 0 12px rgba(255, 212, 118, 0.24));
}

.hand-card-hidden-draw .hand-card-content {
  background:
    linear-gradient(180deg, rgba(15, 25, 44, 0.82) 0%, rgba(10, 12, 18, 0.96) 100%);
  border-top-color: rgba(155, 188, 239, 0.14);
}

.hand-card-cost {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 9px 2px 5px;
  background: rgba(6, 13, 24, 0.9);
  border: 1px solid rgba(180, 205, 244, 0.24);
  box-shadow: 0 5px 11px rgba(4, 10, 22, 0.28);
  color: #f3f8ff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.hand-card-cost-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: translateY(1px);
}

.hand-card-cost-value {
  display: inline-block;
  transform: translateY(-1px);
  font-size: 17px;
  line-height: 1;
}

.hand-card-hidden-draw .hand-card-cost {
  background:
    linear-gradient(180deg, rgba(18, 31, 52, 0.94) 0%, rgba(12, 16, 24, 0.98) 100%);
  border-color: rgba(157, 190, 239, 0.22);
  color: #edf5ff;
}

.hand-card-cost-value-unplayable {
  color: #ff4d4d;
}

.hand-card-cost-value-discounted {
  color: #71f1b6;
  text-shadow: 0 0 10px rgba(113, 241, 182, 0.38);
}

.hand-card-archetype-badge {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  min-width: 76px;
  max-width: calc(100% - 72px);
  padding: 4px 14px 3px;
  border-radius: 999px;
  border: 1px solid var(--archetype-border, rgba(230, 208, 166, 0.34));
  background: var(--archetype-bg, linear-gradient(180deg, rgba(18, 28, 47, 0.96) 0%, rgba(10, 16, 28, 0.98) 100%));
  box-shadow: 0 8px 14px rgba(4, 10, 22, 0.24);
  color: var(--archetype-fg, #f7dfb1);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  pointer-events: none;
}

.board-slot {
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease, filter 120ms ease;
}

.board-slot-empty {
  position: relative;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d8f0ff;
  font-weight: 700;
  font-size: 11px;
  box-shadow: none;
}

.board-slot-filled {
  border-radius: 999px;
  align-items: stretch;
  justify-content: stretch;
  text-align: center;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  overflow: visible;
}

.board-minion-core {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
}

.board-slot-previewing {
  color: transparent;
  border-style: solid;
  transform: scale(1.02);
  box-shadow: 0 0 0 1px rgba(117, 169, 243, 0.16);
  filter: brightness(1.03);
}

.board-slot-preview {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(14, 38, 70, 0.86);
  box-shadow: 0 0 0 1px rgba(132, 220, 255, 0.4), 0 12px 22px rgba(8, 18, 36, 0.32);
  opacity: 0;
  transform: scale(0.9);
  animation: board-slot-preview-in 140ms ease forwards;
  pointer-events: none;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.board-slot-preview .board-minion-art-wrap {
  opacity: 0.88;
}

.board-slot-preview .board-minion-meta,
.board-slot-preview .board-minion-bubble {
  opacity: 0.92;
}

.board-slot-committing .board-slot-preview {
  opacity: 1;
  transform: scale(1);
  animation: none;
  box-shadow: 0 0 0 1px rgba(129, 177, 245, 0.4), 0 14px 28px rgba(8, 18, 36, 0.28);
}

.board-slot-committing.board-slot-empty {
  border-color: transparent;
  background: transparent;
}

.board-slot-empty.drop-active {
  transform: scale(1.035);
  border-color: rgba(224, 178, 92, 0.82);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 231, 174, 0.18), rgba(255, 231, 174, 0) 36%),
    linear-gradient(180deg, rgba(92, 61, 24, 0.94) 0%, rgba(52, 33, 14, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(236, 198, 120, 0.26),
    0 0 24px rgba(220, 164, 73, 0.26);
  filter: brightness(1.05);
}

.board-drag-slot-glow .board-slot-empty {
  border-color: rgba(176, 132, 74, 0.52);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 232, 184, 0.12), rgba(255, 232, 184, 0) 38%),
    linear-gradient(180deg, rgba(59, 39, 20, 0.78) 0%, rgba(31, 21, 12, 0.86) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 208, 0.08),
    0 10px 20px rgba(20, 12, 5, 0.14);
}

.board-drag-slot-glow .board-slot-empty.drop-active {
  animation: none;
}

.board-drag-slot-glow .board-slot-empty::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 3px solid rgba(231, 191, 109, 0.62);
  box-shadow:
    0 0 0 1px rgba(244, 214, 156, 0.24),
    0 0 10px rgba(223, 170, 82, 0.22);
  animation: board-empty-ring-pulse 900ms ease-in-out infinite;
  pointer-events: none;
}

.board-drag-slot-glow .board-slot-empty.drop-active::after {
  animation: none;
}

.board-slot-empty.drop-active .board-slot-preview {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px rgba(234, 197, 126, 0.22);
}

.summon-settle {
  position: relative;
  overflow: visible;
  animation: summon-settle-opponent 620ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.summon-settle::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  pointer-events: none;
  border: 3px solid rgba(255, 214, 122, 0.88);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 226, 156, 0.44),
    0 0 18px rgba(255, 190, 86, 0.34);
  z-index: 13;
  animation: summon-settle-opponent-ring 560ms cubic-bezier(0.14, 0.8, 0.28, 1) both;
}

.summon-settle .board-minion-art-wrap {
  animation: summon-settle-opponent-art 660ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

.summon-settle-opponent {
  position: relative;
  animation: summon-settle-opponent 480ms cubic-bezier(0.18, 0.82, 0.24, 1);
}

.summon-settle-opponent::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 3px solid rgba(255, 214, 122, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 226, 156, 0.44),
    0 0 18px rgba(255, 190, 86, 0.34);
  pointer-events: none;
  z-index: 13;
  animation: summon-settle-opponent-ring 420ms cubic-bezier(0.14, 0.8, 0.28, 1);
}

.summon-settle-opponent .board-minion-art-wrap {
  animation: summon-settle-opponent-art 520ms cubic-bezier(0.18, 0.82, 0.24, 1);
}

.board-slot-visual-summon .board-minion-art-wrap {
  border-color: rgba(255, 208, 118, 0.84);
  box-shadow:
    0 0 0 3px rgba(255, 198, 92, 0.28),
    0 0 18px rgba(255, 182, 78, 0.24);
}

.board-minion-name,
.board-minion-hint {
  margin: 0;
  line-height: 1.2;
}

.board-minion-art-wrap {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(58, 98, 142, 0.88);
  background: rgba(14, 25, 45, 0.84);
  box-shadow:
    0 10px 18px rgba(5, 10, 18, 0.22),
    inset 0 1px 0 rgba(233, 243, 255, 0.06);
  flex: 0 0 auto;
  pointer-events: none;
}

.board-slot-stealthed .board-minion-art-wrap {
  opacity: 0.42;
  border-color: rgba(140, 228, 255, 0.92);
  box-shadow:
    0 0 0 3px rgba(96, 210, 255, 0.28),
    0 10px 18px rgba(5, 10, 18, 0.22),
    0 0 28px rgba(64, 193, 255, 0.34),
    inset 0 0 38px rgba(118, 220, 255, 0.2);
}

.board-slot-frozen .board-minion-art-wrap {
  position: relative;
  overflow: visible;
  border-color: rgba(184, 234, 255, 0.98);
  background:
    radial-gradient(circle at 30% 30%, rgba(180, 235, 255, 0.28), rgba(14, 25, 45, 0.9)),
    rgba(14, 25, 45, 0.84);
  box-shadow:
    0 0 0 4px rgba(134, 216, 255, 0.22),
    0 0 24px rgba(111, 208, 255, 0.28),
    0 10px 18px rgba(5, 10, 18, 0.22),
    inset 0 0 32px rgba(188, 240, 255, 0.2);
}

.board-slot-frozen .board-minion-art-wrap::before,
.board-slot-frozen .board-minion-art-wrap::after {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
}

.board-slot-frozen .board-minion-art-wrap::before {
  inset: -12px;
  clip-path: polygon(0% 34%, 6% 14%, 14% 24%, 23% 4%, 34% 18%, 45% 2%, 55% 18%, 66% 6%, 77% 24%, 88% 10%, 100% 30%, 94% 48%, 100% 68%, 90% 88%, 80% 74%, 70% 96%, 58% 80%, 47% 98%, 35% 80%, 24% 92%, 14% 74%, 4% 84%, 0% 64%, 7% 50%);
  background:
    linear-gradient(180deg, rgba(236, 251, 255, 0.96) 0%, rgba(171, 228, 255, 0.46) 54%, rgba(125, 205, 255, 0.18) 100%);
  box-shadow:
    0 0 0 1px rgba(226, 249, 255, 0.72),
    0 0 14px rgba(162, 225, 255, 0.62);
  filter: blur(1px);
  opacity: 0.98;
  z-index: 2;
}

.board-slot-frozen .board-minion-art-wrap::after {
  inset: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(128, 210, 255, 0.34) 0%, rgba(95, 182, 255, 0.28) 100%),
    linear-gradient(135deg, rgba(226, 249, 255, 0.46) 0%, rgba(226, 249, 255, 0.08) 36%, rgba(168, 224, 255, 0.24) 100%);
  box-shadow:
    inset 0 0 34px rgba(214, 246, 255, 0.38),
    inset 0 0 90px rgba(74, 162, 255, 0.28);
  mix-blend-mode: screen;
  z-index: 3;
}

.board-slot-frozen .board-minion-art,
.board-slot-frozen .board-minion-art-fallback {
  filter: saturate(0.72) brightness(1.08) hue-rotate(-14deg);
}

.board-slot-frozen::before,
.board-slot-frozen::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 122px;
  height: 34px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 18;
  opacity: 0.96;
}

.board-slot-frozen::before {
  top: -12px;
  clip-path: polygon(0% 100%, 8% 40%, 16% 88%, 24% 12%, 34% 78%, 45% 0%, 54% 70%, 65% 10%, 74% 82%, 84% 16%, 92% 86%, 100% 30%, 100% 100%);
  background: linear-gradient(180deg, rgba(236, 250, 255, 0.94) 0%, rgba(150, 223, 255, 0.46) 100%);
  filter: drop-shadow(0 3px 6px rgba(121, 205, 255, 0.38));
  z-index: 18;
}

.board-slot-frozen::after {
  bottom: -14px;
  clip-path: polygon(0% 0%, 8% 62%, 18% 12%, 29% 86%, 39% 22%, 49% 100%, 58% 24%, 70% 86%, 80% 8%, 90% 70%, 100% 18%, 100% 0%);
  background: linear-gradient(180deg, rgba(160, 229, 255, 0.54) 0%, rgba(236, 250, 255, 0.96) 100%);
  filter: drop-shadow(0 -2px 6px rgba(121, 205, 255, 0.32));
  z-index: 18;
}

.board-slot-frozen .board-minion-meta {
  border-top-color: rgba(176, 228, 255, 0.62);
  border-bottom-color: rgba(176, 228, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(198, 237, 255, 0.18) 0%, rgba(198, 237, 255, 0) 28%),
    linear-gradient(180deg, rgba(9, 22, 40, 0.92) 0%, rgba(8, 17, 31, 0.98) 100%);
}

.board-minion-art-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fae9cf;
  font-size: 38px;
  font-weight: 900;
  background: radial-gradient(circle at 30% 30%, rgba(64, 99, 163, 0.52), rgba(14, 25, 45, 0.96));
  pointer-events: none;
}

.board-minion-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.board-slot-stealthed .board-minion-art,
.board-slot-stealthed .board-minion-art-fallback {
  filter: saturate(0.78) brightness(1.02);
}

.board-stealth-particles {
  position: absolute;
  inset: 8px;
  z-index: 2;
  pointer-events: none;
}

.board-stealth-particles::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 62%, rgba(168, 234, 255, 0.4) 0%, rgba(168, 234, 255, 0.24) 36%, rgba(168, 234, 255, 0.08) 62%, rgba(168, 234, 255, 0) 82%);
  filter: blur(14px);
  opacity: 1;
}

.board-stealth-particle {
  position: absolute;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  --stealth-rotate: 0deg;
  --stealth-x-start: -6px;
  --stealth-x-mid: 8px;
  --stealth-x-end: 18px;
  --stealth-y-start: 12px;
  --stealth-y-mid: -6px;
  --stealth-y-end: -32px;
  --stealth-scale-start: 0.88;
  --stealth-scale-mid: 1.04;
  --stealth-scale-end: 1.3;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(220, 248, 255, 0.58) 0%, rgba(172, 230, 250, 0.42) 32%, rgba(103, 174, 205, 0.22) 62%, rgba(103, 174, 205, 0) 100%);
  filter: blur(11px);
  opacity: 0;
  mix-blend-mode: screen;
  animation: board-stealth-particle-float 3.4s ease-in-out infinite;
}

.board-stealth-particle-1 {
  left: 8%;
  bottom: 14%;
  --stealth-rotate: -8deg;
  --stealth-x-start: -12px;
  --stealth-x-mid: 10px;
  --stealth-x-end: 24px;
  --stealth-y-end: -36px;
  animation-delay: 0s;
}

.board-stealth-particle-2 {
  left: 58%;
  bottom: 20%;
  width: 44px;
  height: 26px;
  --stealth-rotate: 14deg;
  --stealth-x-start: 10px;
  --stealth-x-mid: -8px;
  --stealth-x-end: -18px;
  --stealth-y-mid: -10px;
  --stealth-y-end: -34px;
  animation-delay: 0.55s;
}

.board-stealth-particle-3 {
  left: 30%;
  bottom: 6%;
  width: 40px;
  height: 22px;
  --stealth-rotate: -14deg;
  --stealth-x-start: -8px;
  --stealth-x-mid: 14px;
  --stealth-x-end: 28px;
  --stealth-y-mid: -8px;
  --stealth-y-end: -40px;
  animation-delay: 1.1s;
}

.board-stealth-particle-4 {
  left: 14%;
  bottom: 46%;
  width: 48px;
  height: 28px;
  --stealth-rotate: 10deg;
  --stealth-x-start: 8px;
  --stealth-x-mid: -12px;
  --stealth-x-end: -26px;
  --stealth-y-mid: -12px;
  --stealth-y-end: -42px;
  animation-delay: 0.25s;
  animation-duration: 3.8s;
}

.board-stealth-particle-5 {
  left: 66%;
  bottom: 42%;
  width: 56px;
  height: 32px;
  --stealth-rotate: -12deg;
  --stealth-x-start: -10px;
  --stealth-x-mid: 16px;
  --stealth-x-end: 32px;
  --stealth-y-mid: -14px;
  --stealth-y-end: -44px;
  animation-delay: 0.7s;
  animation-duration: 3.1s;
}

.board-stealth-particle-6 {
  left: 48%;
  bottom: 0%;
  width: 36px;
  height: 20px;
  --stealth-rotate: 18deg;
  --stealth-x-start: 6px;
  --stealth-x-mid: -14px;
  --stealth-x-end: -22px;
  --stealth-y-mid: -10px;
  --stealth-y-end: -38px;
  animation-delay: 1.35s;
  animation-duration: 4.1s;
}

.board-stealth-particle-7 {
  left: 4%;
  bottom: 28%;
  width: 42px;
  height: 24px;
  --stealth-rotate: -18deg;
  --stealth-x-start: -14px;
  --stealth-x-mid: 12px;
  --stealth-x-end: 26px;
  --stealth-y-mid: -9px;
  --stealth-y-end: -36px;
  animation-delay: 1.75s;
  animation-duration: 3.5s;
}

@keyframes board-stealth-particle-float {
  0% {
    transform: translate3d(var(--stealth-x-start), var(--stealth-y-start), 0) rotate(var(--stealth-rotate)) scale(var(--stealth-scale-start));
    opacity: 0;
  }
  18% {
    opacity: 0.46;
  }
  42% {
    transform: translate3d(var(--stealth-x-mid), var(--stealth-y-mid), 0) rotate(calc(var(--stealth-rotate) * 0.65)) scale(var(--stealth-scale-mid));
  }
  48% {
    opacity: 0.74;
  }
  78% {
    opacity: 0.36;
  }
  100% {
    transform: translate3d(var(--stealth-x-end), var(--stealth-y-end), 0) rotate(calc(var(--stealth-rotate) * 1.15)) scale(var(--stealth-scale-end));
    opacity: 0;
  }
}

.board-minion-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 2;
  min-height: 30px;
  border-radius: 0;
  padding: 5px 12px 6px;
  background:
    linear-gradient(180deg, rgba(168, 214, 255, 0.16) 0%, rgba(168, 214, 255, 0) 30%),
    linear-gradient(180deg, rgba(8, 16, 30, 0.9) 0%, rgba(6, 12, 22, 0.96) 100%);
  border-top: 1px solid rgba(126, 214, 255, 0.32);
  border-bottom: 1px solid rgba(126, 214, 255, 0.32);
  border-left: 0;
  border-right: 0;
  box-shadow:
    inset 0 1px 0 rgba(214, 236, 255, 0.1),
    0 4px 10px rgba(4, 10, 22, 0.28);
  pointer-events: none;
}

.board-minion-meta-target {
  background: linear-gradient(180deg, rgba(7, 15, 28, 0.64) 0%, rgba(7, 15, 28, 0.94) 100%);
}

.board-slot-buffed .board-minion-meta {
  border-top-color: rgba(126, 255, 182, 0.5);
  border-bottom-color: rgba(126, 255, 182, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(214, 255, 231, 0.16),
    0 0 14px rgba(76, 204, 136, 0.16),
    0 4px 10px rgba(4, 10, 22, 0.28);
}

.board-minion-name {
  margin: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
  color: #fff4e0;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.board-minion-hint {
  font-size: 11px;
  letter-spacing: 0.01em;
  color: #def1ff;
  line-height: 1.1;
}

.board-minion-bubble {
  position: absolute;
  bottom: -8px;
  z-index: 30;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

#opponent-profile-image.enemy-profile-avatar,
#opponent-profile-fallback.enemy-profile-avatar {
  pointer-events: auto;
  --hero-avatar-translate-x: var(--opponent-avatar-offset-x);
  --hero-avatar-translate-y: var(--opponent-avatar-offset-y);
}

.board-minion-bubble-attack {
  left: 6px;
}

.board-minion-bubble-health {
  right: 6px;
}

.board-minion-bubble-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
  position: relative;
  z-index: 31;
}

.board-minion-bubble-attack .board-minion-bubble-icon {
  transform: scale(0.9);
}

.board-minion-bubble-value {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  color: #f4f8ff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
}

.board-slot-no-art .board-minion-name {
  margin-top: 0;
}

.board-slot-no-art .board-minion-meta {
  position: static;
  inset: auto;
  margin: auto 10px 10px;
  background: none;
  padding: 0;
}

.hero-target {
  margin-bottom: 10px;
  width: var(--board-tray-width);
  max-width: none;
  background: linear-gradient(180deg, rgba(43, 104, 160, 0.94) 0%, rgba(27, 75, 123, 0.94) 100%);
  border-color: rgba(255, 146, 114, 0.85);
  box-shadow: 0 0 0 1px rgba(94, 41, 25, 0.65);
  overflow: hidden;
  isolation: isolate;
  display: block;
  height: 42px;
  --enemy-hero-health-pct: 100%;
  --enemy-hero-health-ratio: 1;
  --enemy-hero-fill-start: rgba(168, 24, 36, 0.98);
  --enemy-hero-fill-end: rgba(96, 11, 18, 0.98);
}

#opponent-hero-target {
  position: absolute;
  inset: auto;
  left: var(--opponent-avatar-offset-x);
  top: var(--opponent-avatar-target-top);
  width: var(--hero-avatar-hit-size);
  height: var(--hero-avatar-hit-size);
  margin: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  z-index: 3;
  border-radius: 999px;
  transform: none;
}

#opponent-hero-target::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

.hero-target-line {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(6, 10, 18, 0.78);
  pointer-events: none;
}

.hero-target.board-card-clickable {
  border-color: rgba(255, 146, 114, 0.85);
  box-shadow: 0 0 0 1px rgba(94, 41, 25, 0.65);
}

.board-card-ready {
  background: rgba(20, 33, 56, 0.28);
  border-color: rgba(95, 133, 194, 0.2);
  box-shadow: none;
}

.board-card-ready .board-minion-art-wrap {
  border-width: 6px;
  border-color: #5fbf8b;
  box-shadow:
    0 0 0 4px rgba(79, 170, 119, 0.8),
    0 0 18px rgba(73, 198, 132, 0.54),
    0 0 34px rgba(73, 198, 132, 0.28);
}

.board-card-ready-active .board-minion-art-wrap {
  border-color: #6eb9ff;
  box-shadow:
    0 0 0 4px rgba(87, 167, 255, 0.72),
    0 0 18px rgba(101, 177, 255, 0.48),
    0 0 34px rgba(101, 177, 255, 0.24);
}

.board-card-ready::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  border: 3px solid #5fbf8b;
  box-shadow:
    0 0 0 2px rgba(79, 170, 119, 0.62),
    0 0 16px rgba(73, 198, 132, 0.46),
    0 0 30px rgba(73, 198, 132, 0.2);
  pointer-events: none;
  z-index: 5;
}

.board-card-ready-active::after {
  border-color: #6eb9ff;
  box-shadow:
    0 0 0 2px rgba(87, 167, 255, 0.62),
    0 0 16px rgba(101, 177, 255, 0.44),
    0 0 30px rgba(101, 177, 255, 0.2);
  z-index: 3;
}

.board-slot-opponent-hover {
  position: relative;
  z-index: 13;
  outline: 4px solid #ff2a2a;
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px rgba(255, 94, 94, 0.82),
    0 0 24px rgba(255, 54, 54, 0.5);
}

.board-slot-opponent-hover::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 4px solid #ff3232;
  box-shadow:
    0 0 0 2px rgba(255, 118, 118, 0.92),
    0 0 20px rgba(255, 52, 52, 0.7),
    inset 0 0 16px rgba(255, 70, 70, 0.34);
  animation: board-empty-ring-pulse 820ms ease-in-out infinite;
  pointer-events: none;
  z-index: 14;
}

.board-slot-opponent-hover .board-minion-art-wrap {
  border-color: #ff6b6b !important;
  border-width: 6px !important;
  box-shadow:
    0 0 0 4px rgba(255, 112, 112, 0.82),
    0 0 30px rgba(255, 68, 68, 0.72),
    inset 0 0 22px rgba(255, 116, 116, 0.26) !important;
}

.hero-target-opponent-hover {
  border-color: #ff5b5b !important;
  box-shadow:
    0 0 0 2px rgba(255, 90, 90, 0.46),
    0 0 24px rgba(255, 58, 58, 0.38) !important;
  outline: 3px solid rgba(255, 126, 126, 0.92);
  outline-offset: 1px;
}

.hero-target-opponent-hover::before {
  background:
    radial-gradient(circle at center, rgba(255, 92, 92, 0.2) 0%, rgba(255, 92, 92, 0.08) 44%, rgba(255, 92, 92, 0) 70%);
  box-shadow:
    inset 0 0 0 3px rgba(255, 118, 118, 0.92),
    0 0 22px rgba(255, 64, 64, 0.5);
  animation: board-empty-ring-pulse 820ms ease-in-out infinite;
}

.board-card-clickable {
  cursor: pointer;
}

.target-valid {
  border-color: #66cbff;
  box-shadow: 0 0 0 2px rgba(82, 196, 255, 0.26);
}

.hero-target.target-valid {
  border-color: #66cbff;
  box-shadow: 0 0 0 2px rgba(82, 196, 255, 0.42), 0 0 20px rgba(72, 194, 255, 0.38);
  outline: 2px solid rgba(130, 223, 255, 0.8);
  outline-offset: 1px;
}

.target-invalid {
  border-color: #a06e7a;
  background: rgba(83, 45, 57, 0.62);
  color: #f0c4cb;
  box-shadow: 0 0 0 1px rgba(160, 110, 122, 0.18);
}

.board-card-draggable {
  cursor: grab;
}

.board-card-draggable:hover {
  z-index: 12;
  transform: translateY(-3px);
  filter: brightness(1.04) saturate(1.03);
  box-shadow: none;
}

.board-card-draggable:active,
.board-card-draggable[draggable="true"] {
  z-index: 14;
}

.active-attacker {
  z-index: 16;
  border-color: #ffe27a !important;
  background: rgba(55, 38, 10, 0.72) !important;
  box-shadow:
    inset 0 0 0 4px rgba(255, 226, 122, 0.98),
    inset 0 0 0 8px rgba(255, 189, 64, 0.58),
    0 0 28px rgba(255, 218, 105, 0.72),
    0 0 46px rgba(255, 187, 64, 0.44),
    0 18px 34px rgba(12, 10, 9, 0.52) !important;
  animation: active-attacker-pulse 900ms ease-in-out infinite;
  outline: 4px solid rgba(255, 230, 140, 0.98) !important;
  outline-offset: 2px;
  transform: translateY(-3px);
}

.active-attacker:hover {
  box-shadow:
    inset 0 0 0 4px rgba(255, 226, 122, 0.98),
    inset 0 0 0 8px rgba(255, 189, 64, 0.58),
    0 0 28px rgba(255, 218, 105, 0.72),
    0 0 46px rgba(255, 187, 64, 0.44),
    0 18px 34px rgba(12, 10, 9, 0.52);
}

.active-attacker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 4px solid rgba(255, 236, 160, 0.98);
  box-shadow:
    0 0 0 2px rgba(255, 203, 90, 0.95),
    0 0 20px rgba(255, 220, 110, 0.95),
    inset 0 0 18px rgba(255, 214, 96, 0.5);
  pointer-events: none;
  z-index: 4;
  animation: active-attacker-ring 900ms ease-in-out infinite;
}

.board-card-ready.active-attacker .board-minion-art-wrap,
.active-attacker .board-minion-art-wrap {
  border-color: rgba(255, 230, 142, 1);
  box-shadow:
    0 0 0 3px rgba(255, 211, 96, 0.74),
    0 0 24px rgba(255, 214, 104, 0.68) !important;
  border-width: 5px !important;
  border-color: rgba(255, 231, 148, 1) !important;
}

.attack-lunge {
  animation: attack-lunge 660ms cubic-bezier(0.18, 0.75, 0.3, 1);
}

.attack-source-hidden {
  opacity: 0 !important;
}

.attack-travel-clone {
  position: fixed;
  margin: 0;
  z-index: 2200;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform, left, top, opacity;
}

.unit-pointer-drag-clone {
  position: fixed;
  margin: 0;
  z-index: 2150;
  pointer-events: none;
  transform-origin: top left;
  will-change: left, top, transform, opacity;
  cursor: grabbing;
  box-shadow: 0 18px 32px rgba(6, 14, 30, 0.34);
  transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.unit-pointer-drag-clone.unit-pointer-drag-commit-hover {
  opacity: 0.04;
  transform: scale(0.86) !important;
  filter: saturate(0.9) brightness(0.92);
}

.board-unit-source-hidden {
  opacity: 0 !important;
}

.mobile-hand-preview-card {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 3400;
  width: min(34vw, 214px) !important;
  min-height: min(54vw, 310px) !important;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 1 !important;
  background: linear-gradient(180deg, rgba(36, 56, 92, 0.98) 0%, rgba(19, 31, 54, 0.99) 100%);
  box-shadow: 0 28px 56px rgba(4, 10, 22, 0.62);
}

.mobile-hand-preview-card.hand-card-minion {
  background: linear-gradient(180deg, rgba(44, 68, 110, 0.98) 0%, rgba(20, 34, 60, 0.99) 100%);
}

.mobile-hand-preview-card.hand-card-spell {
  background: linear-gradient(180deg, rgba(54, 56, 108, 0.98) 0%, rgba(42, 44, 95, 0.99) 100%);
}

.mobile-hand-preview-card .hand-card-art-wrap {
  min-height: 58%;
}

.mobile-hand-preview-card .hand-card-content {
  gap: 4px;
  margin-top: -8px;
  padding: 6px 10px 28px;
  align-content: start;
}

.mobile-hand-preview-card.hand-card-minion .hand-card-content {
  padding-bottom: 36px;
}

.mobile-hand-preview-card.hand-card-spell .hand-card-content {
  padding-bottom: 10px;
}

.mobile-hand-preview-card .hand-minion-header,
.mobile-hand-preview-card .hand-spell-header {
  font-size: 13px;
  line-height: 1.15;
}

.mobile-hand-preview-card .hand-minion-hint,
.mobile-hand-preview-card .hand-spell-hint,
.mobile-hand-preview-card .hand-spell-stats {
  font-size: 10px;
  line-height: 1.3;
  -webkit-line-clamp: 4;
}

.mobile-hand-preview-card .hand-card-stat-badge {
  width: 42px !important;
  height: 42px !important;
  bottom: -8px !important;
}

.mobile-hand-preview-card .hand-card-stat-value {
  font-size: 16px !important;
}

.unit-hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2400;
  display: flex;
  align-items: stretch;
  gap: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transform-origin: center center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.unit-hover-preview-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.unit-hover-preview-card {
  width: var(--unit-hover-preview-card-width, 180px) !important;
  height: var(--unit-hover-preview-card-height, 252px) !important;
  min-height: var(--unit-hover-preview-card-height, 252px) !important;
  max-height: var(--unit-hover-preview-card-height, 252px) !important;
  flex: 0 0 var(--unit-hover-preview-card-width, 180px) !important;
  min-width: var(--unit-hover-preview-card-width, 180px) !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  align-self: flex-start;
  filter: saturate(0.96);
}

.unit-hover-preview-card .hand-card-art-wrap {
  min-height: 0;
  opacity: 1;
}

.unit-hover-preview-card .hand-card-content {
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 16, 29, 0.92) 0%, rgba(7, 13, 24, 0.98) 100%);
  border-top-color: rgba(180, 205, 244, 0.16);
}

.unit-hover-preview-card .hand-minion-hint,
.unit-hover-preview-card .hand-spell-hint {
  -webkit-line-clamp: 6;
}

.unit-hover-preview-card.unit-hover-preview-card-has-effects-panel .hand-minion-active-effects-label,
.unit-hover-preview-card.unit-hover-preview-card-has-effects-panel .hand-minion-active-effects {
  display: none;
}

.unit-hover-preview-effects {
  width: fit-content;
  min-width: 112px;
  max-width: 156px;
  max-height: var(--unit-hover-preview-card-height, 252px);
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(226, 196, 140, 0.26);
  background:
    linear-gradient(180deg, rgba(25, 33, 50, 0.96), rgba(16, 22, 35, 0.98));
  box-shadow:
    0 8px 18px rgba(5, 10, 19, 0.24),
    inset 0 1px 0 rgba(255, 240, 214, 0.08);
  overflow: auto;
  align-self: flex-start;
}

.unit-hover-preview-effects-title {
  margin: 0 0 6px;
  color: #f7dfb1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.unit-hover-preview-effects-list {
  margin: 0;
  padding-left: 16px;
  color: #d8e7ff;
  font-size: 11px;
  line-height: 1.3;
}

.unit-hover-preview-effects-list li + li {
  margin-top: 3px;
}

.attack-impact {
  animation: attack-impact 420ms ease-out;
}

.hit-stun {
  animation: hit-stun 660ms ease-out;
}

.enemy-profile-avatar.attack-impact {
  animation: attack-impact-avatar 420ms ease-out;
}

.enemy-profile-avatar.hit-stun {
  animation: hit-stun-avatar 660ms ease-out;
}

.death-fade {
  animation: death-fade 1260ms cubic-bezier(0.22, 0.72, 0.24, 0.99) forwards;
}

.damage-pop {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(0.82);
  z-index: 2300;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: #ff5757;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 1.4px rgba(48, 6, 6, 0.92);
  paint-order: stroke fill;
  text-shadow:
    0 0 10px rgba(255, 98, 98, 0.5),
    0 4px 16px rgba(62, 8, 8, 0.72),
    0 0 24px rgba(120, 14, 14, 0.38);
  filter: drop-shadow(0 3px 10px rgba(22, 5, 5, 0.58));
  pointer-events: none;
  animation: damage-pop 2800ms cubic-bezier(0.19, 0.75, 0.22, 1) forwards;
}

.heal-pop {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(0.82);
  z-index: 2300;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: #6cf0ae;
  font-size: 37px;
  font-weight: 900;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 1.4px rgba(5, 42, 24, 0.92);
  paint-order: stroke fill;
  text-shadow:
    0 0 12px rgba(134, 255, 194, 0.52),
    0 4px 16px rgba(7, 48, 28, 0.7),
    0 0 26px rgba(44, 156, 98, 0.34);
  filter: drop-shadow(0 3px 10px rgba(4, 28, 16, 0.54));
  pointer-events: none;
  animation: heal-pop 2500ms cubic-bezier(0.19, 0.75, 0.22, 1) forwards;
}

.buff-pop {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 2300;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  color: #ffd24a;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-text-stroke: 1.6px rgba(79, 39, 0, 0.98);
  paint-order: stroke fill;
  text-shadow:
    0 0 12px rgba(255, 214, 90, 0.9),
    0 0 26px rgba(255, 186, 34, 0.72),
    0 5px 20px rgba(74, 35, 0, 0.84);
  filter: drop-shadow(0 4px 12px rgba(58, 29, 0, 0.58));
  pointer-events: none;
  animation: buff-pop 2300ms cubic-bezier(0.16, 0.82, 0.2, 1) forwards;
}

.buff-pop-silence {
  color: #c98cff;
  -webkit-text-stroke: 1.6px rgba(43, 12, 67, 0.98);
  text-shadow:
    0 0 12px rgba(206, 138, 255, 0.92),
    0 0 26px rgba(164, 72, 255, 0.78),
    0 5px 20px rgba(44, 11, 70, 0.86);
  filter: drop-shadow(0 4px 12px rgba(42, 9, 68, 0.62));
}

.heal-link {
  position: fixed;
  height: 6px;
  margin-top: -3px;
  transform-origin: left center;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2180;
  background: linear-gradient(90deg, rgba(113, 241, 182, 0.1) 0%, rgba(113, 241, 182, 0.95) 38%, rgba(216, 255, 235, 0.95) 62%, rgba(113, 241, 182, 0.08) 100%);
  box-shadow: 0 0 12px rgba(113, 241, 182, 0.42), 0 0 24px rgba(113, 241, 182, 0.22);
  animation: heal-link 620ms ease-out forwards;
}

.heal-cast {
  animation: heal-cast 760ms cubic-bezier(0.18, 0.75, 0.3, 1);
}

.heal-blessing {
  animation: heal-blessing 920ms ease-out;
}

.buff-blessing {
  animation: buff-blessing 1120ms cubic-bezier(0.18, 0.78, 0.24, 1);
}

.buff-blessing .board-minion-art-wrap {
  border-color: rgba(255, 223, 86, 1) !important;
  box-shadow:
    0 0 0 4px rgba(255, 211, 67, 0.68),
    0 0 34px rgba(255, 207, 56, 0.92),
    0 0 82px rgba(255, 241, 153, 0.56) !important;
}

.buff-blessing .board-minion-meta {
  border-top-color: rgba(255, 227, 115, 0.96);
  border-bottom-color: rgba(255, 227, 115, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 214, 0.42),
    0 0 24px rgba(255, 210, 64, 0.54),
    0 4px 10px rgba(4, 10, 22, 0.28);
}

.buff-blessing::before,
.buff-blessing::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.buff-blessing::before {
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 5px solid rgba(255, 226, 99, 1);
  box-shadow:
    0 0 30px rgba(255, 204, 48, 0.96),
    0 0 74px rgba(255, 232, 123, 0.72),
    inset 0 0 24px rgba(255, 245, 182, 0.46);
  animation: buff-blessing-ring 1120ms ease-out;
}

.buff-blessing::after {
  width: 176px;
  height: 176px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 248, 219, 1) 0 5px, transparent 6px),
    radial-gradient(circle at 24% 34%, rgba(255, 218, 96, 1) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 32%, rgba(255, 237, 158, 1) 0 4px, transparent 5px),
    radial-gradient(circle at 18% 72%, rgba(255, 199, 54, 0.98) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 74%, rgba(255, 241, 168, 1) 0 4px, transparent 5px),
    radial-gradient(circle at 52% 88%, rgba(255, 208, 62, 0.98) 0 4px, transparent 5px);
  filter: drop-shadow(0 0 12px rgba(255, 208, 62, 0.9));
  animation: buff-blessing-particles 1120ms ease-out;
}

.silence-curse {
  animation: silence-curse 980ms cubic-bezier(0.18, 0.78, 0.24, 1);
}

.silence-curse .board-minion-art-wrap {
  border-color: rgba(198, 122, 255, 1) !important;
  box-shadow:
    0 0 0 4px rgba(174, 89, 255, 0.62),
    0 0 30px rgba(164, 72, 255, 0.84),
    0 0 72px rgba(224, 188, 255, 0.42) !important;
}

.silence-curse .board-minion-meta {
  border-top-color: rgba(214, 156, 255, 0.92);
  border-bottom-color: rgba(214, 156, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(246, 229, 255, 0.22),
    0 0 22px rgba(157, 70, 248, 0.42),
    0 4px 10px rgba(18, 8, 28, 0.42);
}

.silence-curse::before,
.silence-curse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.silence-curse::before {
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 5px solid rgba(190, 104, 255, 0.96);
  box-shadow:
    0 0 28px rgba(164, 72, 255, 0.88),
    0 0 70px rgba(207, 150, 255, 0.56),
    inset 0 0 22px rgba(234, 210, 255, 0.26);
  animation: silence-curse-ring 980ms ease-out;
}

.silence-curse::after {
  width: 176px;
  height: 176px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 14%, rgba(249, 235, 255, 0.96) 0 5px, transparent 6px),
    radial-gradient(circle at 24% 34%, rgba(203, 126, 255, 0.98) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 32%, rgba(224, 174, 255, 0.94) 0 4px, transparent 5px),
    radial-gradient(circle at 18% 72%, rgba(164, 72, 255, 0.96) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 74%, rgba(234, 204, 255, 0.96) 0 4px, transparent 5px),
    radial-gradient(circle at 52% 88%, rgba(188, 96, 255, 0.96) 0 4px, transparent 5px);
  filter: drop-shadow(0 0 12px rgba(170, 76, 255, 0.88));
  animation: silence-curse-particles 980ms ease-out;
}

.freeze-impact {
  animation: freeze-impact 860ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.freeze-impact .board-minion-art-wrap {
  border-color: rgba(132, 208, 255, 0.96) !important;
  box-shadow:
    0 0 0 3px rgba(112, 196, 255, 0.48),
    0 0 24px rgba(118, 205, 255, 0.64),
    0 0 58px rgba(201, 239, 255, 0.34) !important;
}

.freeze-impact::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 156px;
  height: 156px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 4px solid rgba(158, 221, 255, 0.86);
  box-shadow:
    0 0 0 0 rgba(134, 204, 255, 0.26),
    0 0 24px rgba(129, 207, 255, 0.52),
    inset 0 0 16px rgba(224, 245, 255, 0.26);
  pointer-events: none;
  animation: freeze-impact-ring 860ms ease-out;
}

.hero-heal-blessing .enemy-profile-avatar {
  animation: hero-heal-avatar-pulse 920ms ease-out;
}

.hero-heal-blessing .enemy-profile-strip {
  position: relative;
}

.hero-heal-blessing .enemy-profile-strip::after {
  content: "";
  position: absolute;
  left: 48px;
  top: 48px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.86);
  border: 3px solid rgba(142, 248, 192, 0.88);
  box-shadow:
    0 0 0 0 rgba(120, 236, 180, 0.32),
    0 0 24px rgba(92, 228, 160, 0.64),
    inset 0 0 16px rgba(176, 255, 219, 0.34);
  pointer-events: none;
  animation: hero-heal-ring 920ms ease-out;
}

.tank-link {
  position: fixed;
  height: 6px;
  margin-top: -3px;
  transform-origin: left center;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2180;
  background: linear-gradient(90deg, rgba(125, 192, 255, 0.08) 0%, rgba(125, 192, 255, 0.9) 38%, rgba(212, 236, 255, 0.95) 62%, rgba(125, 192, 255, 0.08) 100%);
  box-shadow: 0 0 12px rgba(125, 192, 255, 0.35), 0 0 24px rgba(125, 192, 255, 0.2);
  animation: tank-link 620ms ease-out forwards;
}

.hand-target-link {
  position: fixed;
  height: 11px;
  margin-top: -5.5px;
  transform-origin: left center;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2205;
  background:
    linear-gradient(90deg, rgba(255, 199, 126, 0.02) 0%, rgba(255, 94, 72, 0.94) 24%, rgba(255, 154, 112, 0.98) 52%, rgba(255, 233, 176, 1) 74%, rgba(255, 199, 126, 0.04) 100%);
  box-shadow:
    0 0 0 2px rgba(255, 158, 124, 0.42),
    0 0 18px rgba(255, 106, 78, 0.72),
    0 0 34px rgba(255, 154, 112, 0.48);
}

.hand-target-link::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border-top: 5px solid rgba(255, 233, 190, 0.98);
  border-right: 5px solid rgba(255, 233, 190, 0.98);
  transform: translateY(-50%) rotate(45deg);
  box-shadow:
    0 0 0 1px rgba(255, 187, 146, 0.22),
    0 0 16px rgba(255, 187, 126, 0.56),
    0 0 28px rgba(255, 132, 96, 0.38);
}

.hand-target-link-heal {
  background:
    linear-gradient(90deg, rgba(113, 241, 182, 0.02) 0%, rgba(66, 238, 154, 0.96) 24%, rgba(130, 248, 189, 0.98) 52%, rgba(226, 255, 238, 1) 74%, rgba(113, 241, 182, 0.04) 100%);
  box-shadow:
    0 0 0 2px rgba(130, 245, 187, 0.42),
    0 0 18px rgba(82, 240, 160, 0.74),
    0 0 34px rgba(113, 241, 182, 0.48);
}

.hand-target-link-heal::after {
  border-top-color: rgba(231, 255, 240, 1);
  border-right-color: rgba(231, 255, 240, 1);
  box-shadow:
    0 0 0 1px rgba(170, 255, 210, 0.22),
    0 0 16px rgba(140, 248, 196, 0.6),
    0 0 28px rgba(94, 244, 172, 0.4);
}

.projectile-bolt {
  position: fixed;
  height: 13px;
  margin-top: -6.5px;
  transform-origin: left center;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2190;
  opacity: 0;
  filter: saturate(1.45) brightness(1.18);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    color-mix(in srgb, var(--projectile-color, #a5c7ff) 96%, #fffaf2 4%) 12%,
    color-mix(in srgb, #ffffff 75%, var(--projectile-color, #a5c7ff) 25%) 34%,
    color-mix(in srgb, var(--projectile-color, #a5c7ff) 82%, #fffaf2 18%) 62%,
    rgba(255, 255, 255, 0.03) 100%
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--projectile-color, #a5c7ff) 78%, #fffaf2 22%),
    0 0 16px color-mix(in srgb, var(--projectile-color, #a5c7ff) 90%, #fffaf2 10%),
    0 0 34px color-mix(in srgb, var(--projectile-color, #a5c7ff) 66%, #fffaf2 34%),
    0 0 54px color-mix(in srgb, var(--projectile-color, #a5c7ff) 44%, #fffaf2 56%);
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.2, 0.75, 0.2, 1);
}

.projectile-bolt-live {
  opacity: 1;
}

.tank-cast {
  animation: tank-cast 760ms cubic-bezier(0.18, 0.75, 0.3, 1);
}

.tank-guarded {
  animation: tank-guarded 920ms ease-out;
}

.board-slot-empty.drop-target {
  border-style: dashed;
}

.drop-active {
  z-index: 10;
  border-color: #75a9f3;
  background: rgba(46, 74, 122, 0.92);
}

.battlefield-targeting .board-slot-filled[data-unit-drop-kind="enemy"].drop-active,
.battlefield-targeting .board-slot-filled[data-unit-drop-kind="neutral"].drop-active {
  border-color: #ff6a6a;
  background: rgba(95, 28, 34, 0.82);
  box-shadow: inset 0 0 0 3px rgba(255, 115, 115, 0.72), 0 0 24px rgba(255, 90, 90, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.battlefield-targeting .board-slot-filled[data-unit-drop-kind="ally"].drop-active {
  border-color: #84efb9;
  background: rgba(22, 94, 60, 0.92);
  box-shadow: inset 0 0 0 4px rgba(150, 246, 195, 0.84), 0 0 30px rgba(92, 228, 160, 0.66);
  animation: heal-target-pulse 760ms ease-in-out infinite;
}

.battlefield-targeting .board-slot-filled[data-unit-drop-kind="ally"].drop-active .board-minion-art-wrap {
  border-color: rgba(188, 255, 220, 1);
  border-width: 6px;
  box-shadow:
    0 0 0 4px rgba(148, 240, 190, 0.76),
    0 0 34px rgba(92, 228, 160, 0.72),
    inset 0 0 22px rgba(170, 250, 210, 0.3);
}

.board-slot-filled.drop-active.spell-target-damage {
  border-color: #ff5252;
  background:
    radial-gradient(circle at center, rgba(255, 98, 98, 0.24) 0%, rgba(129, 24, 24, 0.34) 58%, rgba(79, 13, 13, 0.9) 100%),
    rgba(95, 28, 34, 0.92);
  box-shadow:
    inset 0 0 0 4px rgba(255, 130, 130, 0.96),
    0 0 0 2px rgba(255, 74, 74, 0.9),
    0 0 34px rgba(255, 64, 64, 0.9),
    0 0 58px rgba(255, 38, 38, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.board-slot-filled.drop-active.spell-target-damage .board-minion-art-wrap {
  border-color: rgba(255, 186, 186, 1);
  border-width: 6px;
  box-shadow:
    0 0 0 4px rgba(255, 112, 112, 0.88),
    0 0 30px rgba(255, 86, 86, 0.9),
    0 0 48px rgba(255, 62, 62, 0.42),
    inset 0 0 24px rgba(255, 128, 128, 0.28);
}

.board-slot-filled.drop-active.spell-target-heal {
  border-color: #4ff39b;
  background:
    radial-gradient(circle at center, rgba(123, 255, 184, 0.22) 0%, rgba(28, 120, 74, 0.34) 58%, rgba(12, 72, 43, 0.92) 100%),
    rgba(22, 94, 60, 0.94);
  box-shadow:
    inset 0 0 0 4px rgba(174, 255, 214, 0.98),
    0 0 0 2px rgba(84, 247, 163, 0.9),
    0 0 34px rgba(74, 244, 154, 0.9),
    0 0 56px rgba(46, 226, 136, 0.42);
  animation: heal-target-pulse 760ms ease-in-out infinite;
}

.board-slot-filled.drop-active.spell-target-heal .board-minion-art-wrap {
  border-color: rgba(188, 255, 220, 1);
  border-width: 6px;
  box-shadow:
    0 0 0 4px rgba(148, 240, 190, 0.92),
    0 0 34px rgba(92, 228, 160, 0.92),
    0 0 48px rgba(70, 224, 146, 0.4),
    inset 0 0 24px rgba(170, 250, 210, 0.34);
}

.hero-target.drop-active.spell-target-damage {
  border-color: #ff6a6a;
  background: linear-gradient(180deg, rgba(112, 34, 43, 0.92) 0%, rgba(84, 23, 32, 0.92) 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 116, 116, 0.74), 0 0 24px rgba(255, 90, 90, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.battlefield-targeting .hero-target.drop-active {
  border-color: #ff6a6a;
  background: linear-gradient(180deg, rgba(112, 34, 43, 0.92) 0%, rgba(84, 23, 32, 0.92) 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 116, 116, 0.74), 0 0 24px rgba(255, 90, 90, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.hero-target.hero-drop-active {
  border-color: #ff6a6a;
  background: linear-gradient(180deg, rgba(112, 34, 43, 0.92) 0%, rgba(84, 23, 32, 0.92) 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 116, 116, 0.74), 0 0 24px rgba(255, 90, 90, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.hero-target.hero-drop-active.target-valid {
  border-color: #ff6a6a;
  box-shadow: inset 0 0 0 3px rgba(255, 116, 116, 0.74), 0 0 24px rgba(255, 90, 90, 0.46);
  outline: none;
}

.enemy-profile-avatar.hero-drop-active {
  border-color: #ff6a6a;
  box-shadow:
    0 0 0 3px rgba(255, 118, 118, 0.74),
    0 0 24px rgba(255, 90, 90, 0.46);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

#opponent-hero-target.hero-drop-active ~ #opponent-stats .hero-stat-medallion-enemy,
#opponent-hero-target.drop-active ~ #opponent-stats .hero-stat-medallion-enemy,
.battlefield-targeting #opponent-hero-target.drop-active ~ #opponent-stats .hero-stat-medallion-enemy {
  border-color: #ff6a6a;
  box-shadow:
    0 0 0 3px rgba(255, 118, 118, 0.74),
    0 0 24px rgba(255, 90, 90, 0.46),
    inset 0 1px 0 rgba(255, 214, 202, 0.16),
    inset 0 -4px 8px rgba(43, 12, 8, 0.24);
  animation: attack-target-pulse 760ms ease-in-out infinite;
}

.battlefield-targeting .board-slot-filled[data-unit-drop-kind="enemy"].drop-active .board-minion-art-wrap,
.battlefield-targeting .board-slot-filled[data-unit-drop-kind="neutral"].drop-active .board-minion-art-wrap {
  border-color: rgba(255, 146, 146, 1);
  border-width: 5px;
  box-shadow:
    0 0 0 3px rgba(255, 111, 111, 0.7),
    0 0 28px rgba(255, 96, 96, 0.58),
    inset 0 0 18px rgba(255, 120, 120, 0.2);
}

@keyframes board-slot-preview-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes board-empty-slot-glow {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.12);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes board-empty-ring-pulse {
  0% {
    border-color: rgba(167, 208, 255, 0.52);
    box-shadow:
      0 0 0 1px rgba(126, 191, 255, 0.22),
      0 0 8px rgba(117, 186, 255, 0.18);
  }
  50% {
    border-color: rgba(184, 217, 255, 0.74);
    box-shadow:
      0 0 0 1px rgba(145, 200, 255, 0.34),
      0 0 12px rgba(132, 196, 255, 0.26);
  }
  100% {
    border-color: rgba(167, 208, 255, 0.52);
    box-shadow:
      0 0 0 1px rgba(126, 191, 255, 0.22),
      0 0 8px rgba(117, 186, 255, 0.18);
  }
}

@keyframes summon-settle {
  0% {
    transform: translateY(34px) scale(0.58);
    filter: brightness(1.36) saturate(1.28);
  }
  24% {
    transform: translateY(10px) scale(0.86);
    filter: brightness(1.28) saturate(1.2);
  }
  48% {
    transform: translateY(-10px) scale(1.13);
    filter: brightness(1.2) saturate(1.16);
  }
  74% {
    transform: translateY(4px) scale(0.985);
    filter: brightness(1.06) saturate(1.05);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes summon-settle-art {
  0% {
    transform: scale(0.72);
    filter: saturate(1.32) brightness(1.26);
  }
  26% {
    transform: scale(0.92);
    filter: saturate(1.26) brightness(1.18);
  }
  52% {
    transform: scale(1.12);
    filter: saturate(1.14) brightness(1.12);
  }
  78% {
    transform: scale(0.99);
    filter: saturate(1.04) brightness(1.02);
  }
  100% {
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes summon-settle-ring {
  0% {
    opacity: 0;
    transform: scale(0.42);
  }
  22% {
    opacity: 1;
    transform: scale(0.82);
  }
  58% {
    opacity: 0.72;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes summon-settle-opponent {
  0% {
    transform: scale(0.82);
    filter: brightness(1.18);
    box-shadow: 0 0 0 0 rgba(255, 219, 120, 0.0);
  }
  35% {
    transform: scale(1.08);
    filter: brightness(1.18);
    box-shadow:
      0 0 0 6px rgba(255, 210, 110, 0.34),
      0 0 24px rgba(255, 186, 82, 0.28);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow: none;
  }
}

@keyframes summon-settle-opponent-art {
  0% {
    transform: scale(0.9);
    filter: saturate(1.18) brightness(1.18);
  }
  42% {
    transform: scale(1.06);
    filter: saturate(1.1) brightness(1.12);
  }
  100% {
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes summon-settle-opponent-ring {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  18% {
    opacity: 1;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

.board-card:disabled {
  opacity: 0.65;
  cursor: default;
}

.hand-card p {
  margin: 0;
  color: #d9e7ff;
  font-size: 12px;
  position: relative;
  z-index: 3;
}

.hand-card-empty-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(154, 181, 228, 0.42);
  background: linear-gradient(180deg, rgba(15, 25, 45, 0.78) 0%, rgba(9, 17, 33, 0.9) 100%);
  opacity: 0.5;
  pointer-events: none;
}

.hand-card-draw-enter .hand-card-archetype-badge {
  opacity: 0;
}

.hand-empty-text {
  margin: 0;
  padding: 0 14px;
  text-align: center;
  color: #b8cdee;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.hand-card-minion {
  border-color: rgba(95, 133, 194, 0.55);
}

.hand-minion-header {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.15;
  color: #f1f6ff;
}

.hand-minion-hint {
  color: #c3d7f7;
  font-size: 11px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.hand-minion-active-effects-label {
  margin: 4px 0 0;
  color: #f7dfb1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hand-minion-active-effects {
  margin: 3px 0 0;
  padding-left: 14px;
  color: #d8e7ff;
  font-size: 9px;
  line-height: 1.25;
}

.hand-minion-active-effects li + li {
  margin-top: 2px;
}

.hand-card-spell {
  border-color: rgba(143, 129, 232, 0.72);
  background: linear-gradient(180deg, rgba(54, 56, 108, 0.92) 0%, rgba(42, 44, 95, 0.9) 100%);
  box-shadow: inset 0 0 0 1px rgba(171, 157, 255, 0.14);
}

.hand-spell-header {
  font-weight: 700;
  color: #efe7ff;
  font-size: 13px;
  line-height: 1.15;
}

.hand-spell-stats {
  color: #d8cbff;
  font-size: 12px;
  font-weight: 800;
}

.hand-spell-hint {
  color: #ddd0ff;
  font-size: 11px;
  line-height: 1.3;
  margin: 2px 0 4px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

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

.spell-cast-btn {
  width: auto;
  min-width: 54px;
  margin-left: auto;
  border: 1px solid rgba(160, 205, 255, 0.72);
  border-radius: 10px;
  padding: 4px 8px;
  background: linear-gradient(180deg, rgba(93, 183, 252, 0.98) 0%, rgba(52, 125, 225, 0.98) 100%);
  color: #eff8ff;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.spell-cast-btn:hover:not(:disabled) {
  filter: brightness(1.12) saturate(1.14);
  transform: translateY(-1px);
}

.spell-cast-btn:disabled {
  opacity: 0.56;
  cursor: default;
}

@media (min-width: 761px) {
  .hand-card-spell .hand-card-content {
    padding-bottom: 18px;
  }
}

.disenchant-target {
  flex: 0 0 154px;
  width: 154px;
  min-height: 118px;
  display: grid;
  align-content: center;
  border: 1px dashed rgba(255, 201, 112, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(190, 141, 45, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(54, 39, 16, 0.86) 0%, rgba(34, 25, 11, 0.92) 100%);
  color: #ffe8b9;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  padding: 12px 10px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.disenchant-target-label,
.disenchant-target-value,
.disenchant-target-meta {
  display: block;
}

.disenchant-target-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff5df;
}

.disenchant-target-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 22px;
}

.disenchant-target-icon {
  width: 47px;
  height: 47px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.disenchant-target-value-number {
  line-height: 1;
}

.disenchant-target-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #f4d59a;
}

.disenchant-target.board-card-clickable {
  cursor: pointer;
}

.disenchant-target.drop-active {
  border-color: #ffd381;
  background:
    radial-gradient(circle at top, rgba(231, 186, 92, 0.24), transparent 58%),
    linear-gradient(180deg, rgba(74, 53, 20, 0.92) 0%, rgba(45, 32, 14, 0.96) 100%);
  box-shadow: 0 0 0 1px rgba(255, 210, 124, 0.18), 0 14px 30px rgba(40, 25, 8, 0.22);
  transform: translateY(-1px) scale(1.04);
  animation: disenchant-target-pulse 720ms ease-in-out infinite;
}

.disenchant-target.disenchant-target-consuming {
  border-color: #ffe3a1;
  box-shadow: 0 0 0 1px rgba(255, 224, 159, 0.28), 0 0 26px rgba(250, 201, 111, 0.42), 0 16px 34px rgba(40, 25, 8, 0.28);
  transform: scale(1.1);
}

.disenchant-spark {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--spark-size, 8px);
  height: var(--spark-size, 8px);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2050;
  background: radial-gradient(circle, rgba(255, 237, 182, 0.98) 0%, rgba(247, 189, 98, 0.9) 48%, rgba(247, 189, 98, 0) 74%);
  transform: translate(-50%, -50%);
  animation: disenchant-spark-burst 420ms cubic-bezier(0.18, 0.76, 0.3, 1) forwards;
}

.disenchant-target-disabled {
  opacity: 0.62;
  border-color: rgba(189, 169, 124, 0.22);
  background:
    linear-gradient(180deg, rgba(35, 30, 24, 0.78) 0%, rgba(25, 21, 18, 0.84) 100%);
  color: #d3c2a2;
}

.cycle-action-btn {
  width: 154px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(123, 173, 221, 0.76);
  background:
    linear-gradient(180deg, rgba(107, 158, 214, 0.18) 0%, rgba(107, 158, 214, 0) 20%),
    linear-gradient(180deg, rgba(40, 87, 148, 0.98) 0%, rgba(20, 51, 100, 0.98) 100%);
  color: #f4fbff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    0 10px 18px rgba(8, 19, 41, 0.32),
    0 0 0 1px rgba(10, 27, 58, 0.24),
    inset 0 1px 0 rgba(218, 240, 255, 0.32),
    inset 0 -3px 6px rgba(8, 25, 48, 0.28);
}

.cycle-action-btn:hover:not(:disabled) {
  border-color: rgba(150, 197, 240, 0.92);
  background:
    linear-gradient(180deg, rgba(145, 193, 240, 0.24) 0%, rgba(145, 193, 240, 0) 24%),
    linear-gradient(180deg, rgba(51, 109, 181, 0.98) 0%, rgba(24, 62, 116, 0.98) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 14px 24px rgba(8, 19, 41, 0.36),
    0 0 0 1px rgba(10, 27, 58, 0.24),
    inset 0 1px 0 rgba(233, 246, 255, 0.4),
    inset 0 -3px 6px rgba(8, 25, 48, 0.32);
}

.cycle-action-btn:disabled {
  opacity: 0.54;
  transform: none;
}

.admin-add-card-overlay {
  position: fixed;
  right: 0;
  top: 138px;
  z-index: 3407;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.admin-add-card-toggle {
  pointer-events: auto;
  width: 30px;
  min-height: 62px;
  border-radius: 10px 0 0 10px;
  border: 1px solid rgba(192, 154, 84, 0.72);
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(255, 214, 140, 0.2) 0%, rgba(255, 214, 140, 0) 28%),
    linear-gradient(180deg, rgba(123, 82, 31, 0.98) 0%, rgba(79, 48, 16, 0.98) 100%);
  color: #fff6e1;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 10px 18px rgba(14, 9, 4, 0.22),
    inset 0 1px 0 rgba(255, 236, 201, 0.18),
    inset 0 -3px 6px rgba(30, 18, 8, 0.22);
}

.admin-add-card-panel {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 182px;
  padding: 10px;
  border-radius: 0 0 0 12px;
  border: 1px solid rgba(192, 154, 84, 0.72);
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(255, 214, 140, 0.12) 0%, rgba(255, 214, 140, 0) 24%),
    linear-gradient(180deg, rgba(44, 30, 14, 0.98) 0%, rgba(23, 15, 8, 0.98) 100%);
  box-shadow:
    0 14px 26px rgba(8, 5, 2, 0.42),
    inset 0 1px 0 rgba(255, 236, 201, 0.12);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.admin-add-card-overlay.admin-add-card-collapsed .admin-add-card-panel {
  display: none;
}

.admin-add-card-overlay.admin-add-card-collapsed .admin-add-card-toggle {
  border-right: 1px solid rgba(192, 154, 84, 0.72);
  border-radius: 10px 0 0 10px;
}

.admin-add-card-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 169, 89, 0.4);
  background: rgba(27, 18, 10, 0.92);
  color: #f7e7c7;
  font-size: 13px;
  font-weight: 700;
}

.admin-add-card-input::placeholder {
  color: rgba(247, 231, 199, 0.56);
}

.admin-add-card-btn {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(192, 154, 84, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 214, 140, 0.16) 0%, rgba(255, 214, 140, 0) 24%),
    linear-gradient(180deg, rgba(123, 82, 31, 0.98) 0%, rgba(79, 48, 16, 0.98) 100%);
  color: #fff6e1;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 10px 18px rgba(14, 9, 4, 0.22),
    inset 0 1px 0 rgba(255, 236, 201, 0.18),
    inset 0 -3px 6px rgba(30, 18, 8, 0.22);
}

.admin-add-card-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.admin-add-card-btn:disabled {
  opacity: 0.54;
  transform: none;
}

.mulligan-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--hand-card-width));
  justify-content: center;
  justify-items: center;
  gap: 14px;
  margin: 18px 0;
}

.flow-card {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  border-radius: 22px;
  transition: box-shadow 120ms ease;
  box-shadow: none;
}

.flow-card:hover:not(:disabled) {
  box-shadow:
    0 0 0 2px rgba(255, 192, 88, 0.92),
    0 0 0 5px rgba(255, 214, 122, 0.2);
}

.flow-card .hand-card {
  width: var(--hand-card-width);
  min-height: var(--hand-card-height);
  flex: 0 0 var(--hand-card-width);
}

.flow-card-selected {
  position: relative;
  box-shadow:
    0 0 0 2px rgba(255, 211, 120, 0.8),
    0 0 0 5px rgba(255, 197, 92, 0.18);
}

.flow-card-selected::after {
  content: "Replacing";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 188, 0.72);
  background: linear-gradient(180deg, rgba(255, 214, 120, 0.98), rgba(255, 168, 66, 0.98));
  color: #3f2200;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(52, 30, 5, 0.28);
  z-index: 3;
}

.flow-card-loading {
  cursor: wait;
}

.flow-card-loading:not(:disabled) {
  box-shadow: none;
}

.flow-card-loading .hand-card {
  filter: saturate(0.96) brightness(1.02);
}

#turn-action-overlay {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 45;
  pointer-events: auto;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transform: none;
}

#turn-action-overlay::before {
  content: none;
  position: absolute;
  inset: 6px;
  border-radius: 18px;
  border: 1px solid rgba(210, 163, 84, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 230, 184, 0.06) 0%, rgba(255, 230, 184, 0) 32%),
    linear-gradient(90deg, rgba(96, 62, 28, 0.22) 0%, rgba(96, 62, 28, 0) 18%, rgba(96, 62, 28, 0) 82%, rgba(96, 62, 28, 0.22) 100%);
  pointer-events: none;
}

#turn-action-overlay > * {
  position: relative;
  z-index: 1;
}

#opponent-lane .board-grid,
#player-lane .board-grid {
  margin-top: 0;
  overflow: visible;
}

.draw-stack-preview {
  position: absolute;
  left: calc(100% - 24px);
  top: 50%;
  transform: translateY(-50%);
  width: 185px;
  height: 182px;
  pointer-events: none;
  z-index: 3403;
  opacity: 1;
}

#player-lane .draw-stack-preview {
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
}

.draw-stack-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 118px;
  height: 163px;
  border-radius: 14px;
  border: 1px solid rgba(162, 120, 72, 0.56);
  background:
    radial-gradient(circle at top, rgba(214, 150, 75, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(60, 40, 21, 0.99) 0%, rgba(18, 12, 8, 0.99) 100%);
  box-shadow: 0 6px 12px rgba(10, 7, 4, 0.18);
  overflow: visible;
}

.draw-stack-card::before {
  content: none;
}

.draw-stack-card::after {
  content: none;
}

.draw-stack-card-logo {
  position: absolute;
  left: 50%;
  top: 27px;
  transform: translateX(-50%);
  z-index: 3;
  width: 74px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.38));
}

.draw-stack-card:last-child .draw-stack-card-logo {
  top: 35px;
}

.draw-stack-card-back-1,
.draw-stack-card-back-2,
.draw-stack-card-back-3,
.draw-stack-card-back-4 {
  opacity: 1;
}

#player-lane .hand-row {
  position: relative;
  z-index: 1;
}

#end-turn-btn {
  min-width: 176px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 16px;
  color: #fff6e1;
  border: 1px solid rgba(255, 208, 110, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 229, 145, 0.26) 0%, rgba(255, 229, 145, 0) 24%),
    linear-gradient(180deg, rgba(236, 165, 57, 0.98) 0%, rgba(170, 94, 23, 0.98) 100%);
  box-shadow:
    0 14px 26px rgba(79, 36, 6, 0.34),
    0 0 0 1px rgba(99, 49, 8, 0.28),
    inset 0 1px 0 rgba(255, 238, 191, 0.48),
    inset 0 -4px 7px rgba(115, 53, 9, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 900;
  transform: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

#end-turn-btn.end-turn-state-your {
  border-color: rgba(146, 247, 171, 0.98);
  box-shadow:
    0 14px 26px rgba(26, 74, 34, 0.32),
    0 0 0 6px rgba(126, 246, 157, 0.58),
    0 0 30px rgba(122, 245, 160, 0.46),
    inset 0 1px 0 rgba(220, 255, 225, 0.42),
    inset 0 -4px 7px rgba(27, 72, 33, 0.26);
}

#end-turn-btn.end-turn-state-your:hover:not(:disabled) {
  border-color: rgba(146, 247, 171, 0.98);
  transform: none;
  box-shadow:
    0 14px 26px rgba(26, 74, 34, 0.32),
    0 0 0 6px rgba(126, 246, 157, 0.58),
    0 0 30px rgba(122, 245, 160, 0.46),
    inset 0 1px 0 rgba(220, 255, 225, 0.42),
    inset 0 -4px 7px rgba(27, 72, 33, 0.26);
}

#end-turn-btn:hover:not(:disabled) {
  transform: none !important;
}

#end-turn-btn.end-turn-state-opp,
#end-turn-btn.end-turn-state-opp:disabled {
  color: #ffeceb;
  border-color: rgba(206, 98, 98, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 181, 181, 0.11) 0%, rgba(255, 181, 181, 0) 24%),
    linear-gradient(180deg, rgba(133, 45, 45, 0.52) 0%, rgba(84, 26, 26, 0.62) 100%);
  box-shadow:
    0 10px 18px rgba(54, 14, 14, 0.24),
    0 0 0 1px rgba(76, 21, 21, 0.18),
    inset 0 1px 0 rgba(255, 212, 212, 0.12),
    inset 0 -3px 6px rgba(44, 12, 12, 0.22);
  opacity: 1;
}

#end-turn-btn:disabled {
  color: #f0d8b0;
  border-color: rgba(233, 168, 80, 0.42);
  background: linear-gradient(180deg, rgba(118, 82, 42, 0.52) 0%, rgba(88, 58, 29, 0.68) 100%);
  cursor: not-allowed;
  box-shadow:
    0 10px 18px rgba(36, 20, 8, 0.18),
    inset 0 1px 0 rgba(255, 225, 174, 0.12);
}

#concede-btn {
  min-width: 120px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  color: #ffece8;
  border-color: rgba(179, 98, 76, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 173, 149, 0.1) 0%, rgba(255, 173, 149, 0) 24%),
    linear-gradient(180deg, rgba(114, 47, 36, 0.94) 0%, rgba(75, 28, 22, 0.96) 100%);
  box-shadow:
    0 10px 20px rgba(36, 11, 9, 0.28),
    0 0 0 1px rgba(53, 18, 14, 0.22),
    inset 0 1px 0 rgba(255, 198, 182, 0.18),
    inset 0 -3px 6px rgba(39, 12, 9, 0.34);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 900;
}

#concede-btn:hover:not(:disabled) {
  border-color: rgba(206, 123, 100, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 187, 164, 0.14) 0%, rgba(255, 187, 164, 0) 24%),
    linear-gradient(180deg, rgba(131, 55, 42, 0.96) 0%, rgba(86, 33, 26, 0.98) 100%);
  color: #fff0ee;
  transform: translateY(-1px);
}

#concede-btn:disabled {
  opacity: 0.56;
  transform: none;
}

.log-list {
  display: grid;
  gap: 6px;
  height: clamp(180px, 32vh, 320px);
  overflow-y: auto;
}

.match-log-zone {
  position: absolute;
  left: calc(100% + var(--match-side-panel-gap));
  top: 10px;
  width: var(--match-side-panel-width);
  max-width: var(--match-side-panel-width);
}

.log-item {
  margin: 0;
  font-size: 13px;
  color: #d7ebff;
  border-bottom: 1px solid rgba(115, 196, 252, 0.3);
  padding-bottom: 5px;
}

.end-turn-urgent {
  animation: end-turn-pulse 750ms ease-in-out infinite;
}

@keyframes attack-lunge {
  0% {
    transform: translate(0, 0) scale(1);
  }
  45% {
    transform: translate(
      calc(var(--attack-travel-x, 0px) * 0.82),
      calc(var(--attack-travel-y, -10px) * 0.82)
    ) scale(1.06);
  }
  70% {
    transform: translate(
      calc(var(--attack-travel-x, 0px) * -0.08),
      calc(var(--attack-travel-y, -10px) * -0.08)
    ) scale(1);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes attack-impact {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 82, 82, 0), inset 0 0 0 0 rgba(255, 94, 94, 0);
    background: #fff2df;
  }
  28% {
    box-shadow: 0 0 0 6px rgba(217, 82, 82, 0.27), inset 0 0 22px rgba(255, 92, 92, 0.18);
    background: #ffdede;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 82, 82, 0), inset 0 0 0 rgba(255, 92, 92, 0);
    background: #fff2df;
  }
}

@keyframes death-fade {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1);
  }
  100% {
    opacity: 0;
    transform: translateY(8px) scale(0.8);
    filter: saturate(0.35) grayscale(0.25);
  }
}

@keyframes damage-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -16%) scale(0.56) rotate(-4deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.16) rotate(2deg);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.03) rotate(-1deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -116%) scale(0.92);
  }
}

@keyframes hit-stun {
  0% {
    transform: translateX(0) scale(1);
  }
  28% {
    transform: translateX(-4px) scale(1.02);
  }
  58% {
    transform: translateX(3px) scale(0.99);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes attack-impact-avatar {
  0% {
    transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(var(--hero-avatar-scale));
    box-shadow: 0 0 0 0 rgba(217, 82, 82, 0), inset 0 0 0 0 rgba(255, 94, 94, 0);
    filter: brightness(1);
  }
  28% {
    transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(calc(var(--hero-avatar-scale) * 1.03));
    box-shadow: 0 0 0 6px rgba(217, 82, 82, 0.27), inset 0 0 22px rgba(255, 92, 92, 0.18);
    filter: brightness(1.07);
  }
  100% {
    transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(var(--hero-avatar-scale));
    box-shadow: 0 0 0 0 rgba(217, 82, 82, 0), inset 0 0 0 rgba(255, 92, 92, 0);
    filter: brightness(1);
  }
}

@keyframes hit-stun-avatar {
  0% {
    transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(var(--hero-avatar-scale));
  }
  28% {
    transform: translate(calc(var(--hero-avatar-translate-x) - 4px), var(--hero-avatar-translate-y)) scale(calc(var(--hero-avatar-scale) * 1.02));
  }
  58% {
    transform: translate(calc(var(--hero-avatar-translate-x) + 3px), var(--hero-avatar-translate-y)) scale(calc(var(--hero-avatar-scale) * 0.99));
  }
  100% {
    transform: translate(var(--hero-avatar-translate-x), var(--hero-avatar-translate-y)) scale(var(--hero-avatar-scale));
  }
}

@keyframes heal-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.48);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -56%) scale(1.08);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -110%) scale(0.94);
  }
}

@keyframes ready-ring-pulse {
  0% {
    box-shadow:
      0 0 0 3px rgba(120, 255, 184, 0.78),
      0 0 22px rgba(86, 243, 156, 0.62),
      0 0 0 0 rgba(120, 255, 184, 0.44);
  }
  65% {
    box-shadow:
      0 0 0 3px rgba(120, 255, 184, 0.78),
      0 0 22px rgba(86, 243, 156, 0.62),
      0 0 0 10px rgba(120, 255, 184, 0.2),
      0 0 34px rgba(86, 243, 156, 0.52);
  }
  100% {
    box-shadow:
      0 0 0 3px rgba(120, 255, 184, 0.78),
      0 0 22px rgba(86, 243, 156, 0.62),
      0 0 0 16px rgba(120, 255, 184, 0),
      0 0 44px rgba(86, 243, 156, 0);
  }
}

@keyframes heal-link {
  0% {
    opacity: 0;
    filter: brightness(0.92);
  }
  20% {
    opacity: 1;
    filter: brightness(1.16);
  }
  100% {
    opacity: 0;
    filter: brightness(1);
  }
}

@keyframes tank-link {
  0% {
    opacity: 0;
    filter: brightness(0.92);
  }
  20% {
    opacity: 1;
    filter: brightness(1.16);
  }
  100% {
    opacity: 0;
    filter: brightness(1);
  }
}

@keyframes heal-cast {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.14) saturate(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes tank-cast {
  0% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  40% {
    transform: translateY(-4px) scale(1.04);
    filter: saturate(1.12);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
}

@keyframes heal-blessing {
  0% {
    box-shadow: 0 0 0 0 rgba(85, 226, 155, 0), inset 0 0 0 0 rgba(165, 255, 209, 0);
    filter: brightness(1);
  }
  28% {
    box-shadow: 0 0 0 6px rgba(85, 226, 155, 0.22), inset 0 0 26px rgba(165, 255, 209, 0.16);
    filter: brightness(1.08) saturate(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(85, 226, 155, 0), inset 0 0 0 rgba(165, 255, 209, 0);
    filter: brightness(1);
  }
}

@keyframes buff-blessing {
  0% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
  28% {
    filter: brightness(1.18) saturate(1.28);
    transform: scale(1.026);
  }
  62% {
    filter: brightness(1.12) saturate(1.16);
    transform: scale(1.018);
  }
  100% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
}

@keyframes buff-blessing-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  54% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.28);
  }
}

@keyframes buff-blessing-particles {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74) rotate(0deg);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06) rotate(12deg);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18) rotate(-10deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.34) rotate(18deg);
  }
}

@keyframes silence-curse {
  0% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
  28% {
    filter: brightness(1.12) saturate(1.22) hue-rotate(18deg);
    transform: scale(1.028);
  }
  62% {
    filter: brightness(1.08) saturate(1.14) hue-rotate(10deg);
    transform: scale(1.018);
  }
  100% {
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
}

@keyframes silence-curse-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  54% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.26);
  }
}

@keyframes silence-curse-particles {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74) rotate(0deg);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04) rotate(-12deg);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.32) rotate(-18deg);
  }
}

@keyframes buff-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.68);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -56%) scale(1.06);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -74%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -112%) scale(0.92);
  }
}

@keyframes hero-heal-avatar-pulse {
  0% {
    filter: brightness(1);
    box-shadow: 0 0 0 0 rgba(92, 228, 160, 0);
  }
  30% {
    filter: brightness(1.14) saturate(1.08);
    box-shadow:
      0 0 0 3px rgba(132, 241, 185, 0.36),
      0 0 22px rgba(92, 228, 160, 0.58);
  }
  100% {
    filter: brightness(1);
    box-shadow: 0 0 0 0 rgba(92, 228, 160, 0);
  }
}

@keyframes hero-heal-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes tank-guarded {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 194, 255, 0);
    filter: saturate(1);
  }
  40% {
    box-shadow: 0 0 0 6px rgba(126, 194, 255, 0.26), inset 0 0 16px rgba(126, 194, 255, 0.18);
    filter: saturate(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 194, 255, 0);
    filter: saturate(1);
  }
}

@keyframes battlefield-shake {
  0% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-7px);
  }
  60% {
    transform: translateX(6px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes attack-target-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 3px rgba(255, 115, 115, 0.66), 0 0 20px rgba(255, 90, 90, 0.38);
    filter: brightness(1);
  }
  50% {
    box-shadow: inset 0 0 0 4px rgba(255, 138, 138, 0.94), 0 0 34px rgba(255, 98, 98, 0.68);
    filter: brightness(1.08);
  }
}

@keyframes heal-target-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 4px rgba(150, 246, 195, 0.76), 0 0 24px rgba(92, 228, 160, 0.54);
    filter: brightness(1);
  }
  50% {
    box-shadow: inset 0 0 0 5px rgba(186, 255, 222, 0.98), 0 0 44px rgba(110, 238, 172, 0.82);
    filter: brightness(1.1);
  }
}

@keyframes lane-urgent-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(242, 201, 76, 0.44), 0 0 20px rgba(255, 219, 87, 0.34), 0 10px 18px rgba(95, 70, 18, 0.2);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 225, 120, 0.72), 0 0 30px rgba(255, 232, 140, 0.58), 0 10px 24px rgba(127, 93, 21, 0.24);
  }
}

@keyframes active-attacker-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 4px rgba(255, 226, 122, 0.98),
      inset 0 0 0 8px rgba(255, 189, 64, 0.5),
      0 0 26px rgba(255, 218, 105, 0.66),
      0 0 42px rgba(255, 187, 64, 0.38),
      0 18px 34px rgba(12, 10, 9, 0.52);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 235, 150, 1),
      inset 0 0 0 10px rgba(255, 202, 92, 0.78),
      0 0 34px rgba(255, 226, 132, 0.92),
      0 0 56px rgba(255, 190, 64, 0.58),
      0 20px 38px rgba(12, 10, 9, 0.56);
    filter: brightness(1.12);
  }
}

@keyframes active-attacker-ring {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes end-turn-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes disenchant-target-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(255, 210, 124, 0.18), 0 14px 30px rgba(40, 25, 8, 0.22);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(255, 224, 159, 0.34), 0 0 22px rgba(241, 188, 94, 0.3), 0 16px 34px rgba(40, 25, 8, 0.26);
    filter: brightness(1.08);
  }
}

@keyframes disenchant-spark-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-x, 0px)), calc(-50% + var(--spark-y, 0px))) scale(0.72);
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 1180px) {
  .battlefield {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .battlefield-main {
    width: 100%;
    min-width: 0;
  }

  .roguelike-modifiers-panel {
    top: 72px;
    right: 12px;
    width: min(280px, 38vw);
  }

  .player-board-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  }

  .match-log-zone {
    position: static;
  }

  .log-list {
    height: 220px;
  }

  .battlefield.side-panel-collapsed .battlefield-main {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (hover: none) and (pointer: coarse) {
  body.match-page {
    overflow: hidden;
  }

  .match-content,
  .overlay-controls {
    visibility: hidden;
    pointer-events: none;
  }

  .match-mobile-rotate {
    display: grid;
  }
}

@media (hover: none) and (pointer: coarse) and (max-height: 560px) and (orientation: landscape) {
  #opponent-hero-name,
  #your-hero-name {
    display: none;
  }

  .container-match {
    margin: 0;
    padding: 0;
  }

  .match-shell {
    width: 100vw;
    height: 100dvh;
    height: 100%;
    min-height: 100%;
    --board-row-width: calc(100vw - var(--mobile-hero-rail, 60px) - (2 * max(5px, calc(var(--mobile-panel-padding, 8px) - 2px))) - 12px);
    --board-tray-width: var(--board-row-width);
  }

  .match-content {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .battlefield-fit {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
  }

  .battlefield-scale {
    width: 100%;
    height: 100%;
  }

  .battlefield {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    justify-content: stretch;
    align-items: stretch;
    width: 100%;
    margin: 0;
  }

  .battlefield-main {
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding-top: 0;
    padding-bottom: 1px;
    margin: 0;
  }

  .match-zone {
    padding: max(5px, calc(var(--mobile-panel-padding, 8px) - 2px));
    width: 100%;
    min-width: 0;
  }

  .match-log-zone,
  #match-side-toggle {
    display: none !important;
  }

  .player-board-row {
    grid-template-columns: var(--mobile-hero-rail, 60px) minmax(0, 1fr);
    gap: 4px;
    width: 100%;
    align-items: center;
    margin-top: 4px;
    padding-left: 0;
  }

  #player-lane > .player-board-row {
    margin-top: -8px;
  }

  .player-hero-side,
  .player-board-side {
    width: 100%;
    min-width: 0;
  }

  .player-board-side > h4,
  .player-board-side > .hand-instructions {
    display: none;
  }

  .player-hero-side {
    position: static;
    left: auto;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: center;
  }

  .player-hero-side > h3 {
    display: none;
  }

  .player-hero-side .hero-panel {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    width: 100%;
    margin: 0;
  }

  .enemy-profile-strip {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
  }

  .enemy-profile-avatar {
    transform: translateX(0) scale(var(--hero-avatar-scale));
  }

  .your-profile-strip {
    --hero-avatar-translate-x: 0px;
    --hero-avatar-translate-y: 0px;
  }

  .match-shell {
    --your-avatar-offset-x: 0px;
    --your-avatar-offset-y: 0px;
  }

  .opponent-portrait-wrap {
    --hero-avatar-translate-x: 0px;
    --hero-avatar-translate-y: 0px;
  }

  .your-profile-strip {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin-bottom: 0;
  }

  .opponent-portrait-wrap {
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .hero-panel .hero-stats {
    margin: 0;
    font-size: 11px;
    line-height: 1;
    display: flex;
    justify-content: center;
  }

  #your-stats.hero-stats {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: normal;
  }

  #opponent-stats.hero-stats {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: normal;
  }

  .hero-stat-medallion {
    width: 48px;
    height: 48px;
  }

  .hero-stat-medallion-icon {
    font-size: 18px;
  }

  .hero-stat-medallion-value {
    margin-top: 2px;
    font-size: 18px;
  }

  .board-scroll-wrap {
    width: 100%;
    min-width: 0;
    padding: 4px 4px 8px;
  }

  .board-scroll-wrap::before,
.board-scroll-wrap::after {
    border-radius: 22px;
  }

  .hero-target {
    width: auto;
    height: auto;
    min-height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .hero-target-line {
    font-size: 9px;
  }

  .hero-target::before,
  .hero-target::after,
  .hero-target-line {
    display: none;
  }

  .hero-stat-medallion-enemy {
    border-color: rgba(255, 146, 114, 0.88);
    box-shadow:
      0 8px 16px rgba(36, 11, 9, 0.24),
      inset 0 1px 0 rgba(255, 214, 202, 0.16),
      inset 0 -4px 8px rgba(43, 12, 8, 0.24);
  }

  .hero-stat-medallion-enemy .hero-stat-medallion-icon,
  .hero-stat-medallion-enemy .hero-stat-medallion-value {
    color: #ffb4a6;
  }

  #opponent-hero-target {
    inset: auto;
    left: var(--opponent-avatar-offset-x);
    top: var(--opponent-avatar-target-top);
    margin: 0;
    width: var(--hero-avatar-hit-size);
    max-width: none;
    min-width: var(--hero-avatar-hit-size);
    height: var(--hero-avatar-hit-size);
    min-height: var(--hero-avatar-hit-size);
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    overflow: visible;
  }

  .board-minion-meta {
    bottom: 28px;
    min-height: 18px;
    padding: 2px 6px 3px;
  }

  .board-minion-name,
  .board-minion-hint {
    font-size: 10px;
  }

  .board-minion-bubble {
    bottom: -4px;
    width: 40px;
    height: 40px;
  }

  .board-minion-bubble-value {
    font-size: 16px;
  }

  #player-lane {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "board board board"
      "actions hand controls";
    align-items: end;
    column-gap: 6px;
  }

  #player-lane > .player-board-row {
    grid-area: board;
  }

  .hand-row {
    display: contents;
  }

  .hand-action-stack {
    grid-area: actions;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    align-self: start;
    width: auto;
    min-width: 112px;
    margin: 2px 0 2px 16px;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 14px;
    border: 1px solid rgba(134, 96, 50, 0.54);
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 214, 146, 0.12) 0%, rgba(255, 214, 146, 0) 42%),
      linear-gradient(180deg, rgba(46, 30, 14, 0.84) 0%, rgba(25, 16, 9, 0.92) 100%);
    box-shadow:
      0 18px 30px rgba(8, 5, 2, 0.28),
      inset 0 1px 0 rgba(255, 224, 173, 0.12),
      inset 0 0 0 1px rgba(255, 198, 105, 0.06);
    border-radius: 14px;
    overflow: hidden;
  }

  .hand-action-stack::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 10px;
    border: 1px solid rgba(210, 163, 84, 0.16);
    background:
      linear-gradient(180deg, rgba(255, 230, 184, 0.06) 0%, rgba(255, 230, 184, 0) 32%),
      linear-gradient(90deg, rgba(96, 62, 28, 0.22) 0%, rgba(96, 62, 28, 0) 18%, rgba(96, 62, 28, 0) 82%, rgba(96, 62, 28, 0.22) 100%);
    pointer-events: none;
  }

  .hand-action-stack > * {
    position: relative;
    z-index: 1;
  }

  .your-coins-badge,
  .disenchant-target,
  .cycle-action-btn {
    width: 100%;
  }

  .your-coins-badge {
    min-height: 30px;
    gap: 4px;
    padding: 4px 8px;
  }

  .your-coins-badge-value {
    font-size: 10px;
  }

  .disenchant-target {
    flex-basis: auto;
    min-height: 46px;
    padding: 6px 4px;
  }

  .disenchant-target-value {
    gap: 3px;
    font-size: 12px;
  }

  .disenchant-target-icon {
    width: 26px;
    height: 26px;
  }

  .disenchant-target-label,
  .disenchant-target-meta {
    font-size: 8px;
  }

  .cycle-action-btn {
    min-height: 32px;
    font-size: 10px;
  }

  .hand-cards-wrap {
    grid-area: hand;
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    justify-self: center;
    align-self: end;
  }

  .hand-grid {
    gap: 4px;
    padding: 6px 8px 10px;
    margin-top: 0;
    width: 100%;
    justify-content: center;
  }

  .hand-grid .hand-card {
    height: var(--hand-card-height);
    min-height: var(--hand-card-height);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .hand-grid .hand-card-content,
  .unit-hover-preview-card .hand-card-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    margin-top: 0;
    padding: 5px 12px;
    border-radius: 0;
    background: rgba(10, 14, 24, 0.96);
    text-align: center;
    pointer-events: none;
  }

  .hand-deck-count,
  .hero-hand {
    display: none;
  }

  .hand-card-content {
    gap: 2px;
    padding: 4px 6px 10px;
  }

  .hand-minion-header,
  .hand-spell-header {
    font-size: 11px;
  }

  .hand-grid .hand-minion-header,
  .hand-grid .hand-spell-header,
  .unit-hover-preview-card .hand-minion-header,
  .unit-hover-preview-card .hand-spell-header {
    display: block;
    margin: 0;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(7, 10, 18, 0.8);
  }

  .hand-card-dragging .hand-minion-header,
  .hand-card-dragging .hand-spell-header {
    display: block;
    margin: 0;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(7, 10, 18, 0.8);
  }

  .hand-grid .hand-card-spell .hand-card-content,
  .unit-hover-preview-card.hand-card-spell .hand-card-content {
    left: 0;
    right: 0;
    padding: 0;
    gap: 8px;
    background: transparent;
    flex-direction: column;
  }

  .hand-card-dragging.hand-card-spell .hand-card-content {
    left: 0;
    right: 0;
    padding: 0;
    gap: 8px;
    background: transparent;
    flex-direction: column;
  }

  .hand-grid .hand-card-spell .hand-spell-header,
  .unit-hover-preview-card.hand-card-spell .hand-spell-header {
    width: 100%;
    padding: 5px 12px;
    background: rgba(10, 14, 24, 0.96);
  }

  .hand-card-dragging.hand-card-spell .hand-spell-header {
    width: 100%;
    padding: 5px 12px;
    background: rgba(10, 14, 24, 0.96);
  }

  .hand-grid .hand-card-spell .hand-spell-meta-row,
  .unit-hover-preview-card.hand-card-spell .hand-spell-meta-row {
    width: 100%;
    justify-content: center;
    gap: 0;
  }

  .hand-grid .hand-card-spell .spell-cast-btn {
    min-width: 56px;
    margin: 0;
    padding: 3px 10px;
    border: 1px solid rgba(160, 205, 255, 0.72);
    background: linear-gradient(180deg, rgba(93, 183, 252, 0.98) 0%, rgba(52, 125, 225, 0.98) 100%);
    box-shadow: 0 4px 10px rgba(15, 45, 94, 0.28);
  }

  .hand-grid .hand-card-spell .hand-spell-meta-row,
  .unit-hover-preview-card.hand-card-spell .hand-spell-meta-row {
    display: none;
  }

  .hand-card-dragging.hand-card-spell .hand-spell-meta-row {
    display: none;
  }

  .hand-minion-hint,
  .hand-minion-active-effects-label,
  .hand-minion-active-effects,
  .hand-spell-hint,
  .hand-spell-stats {
    font-size: 8px;
  }

  .hand-grid .hand-minion-hint,
  .hand-grid .hand-minion-active-effects-label,
  .hand-grid .hand-minion-active-effects,
  .hand-grid .hand-spell-hint,
  .hand-grid .hand-spell-stats,
  .unit-hover-preview-card .hand-minion-hint,
  .unit-hover-preview-card .hand-minion-active-effects-label,
  .unit-hover-preview-card .hand-minion-active-effects,
  .unit-hover-preview-card .hand-spell-hint,
  .unit-hover-preview-card .hand-spell-stats {
    display: none;
  }

  .hand-card-dragging .hand-minion-hint,
  .hand-card-dragging .hand-minion-active-effects-label,
  .hand-card-dragging .hand-minion-active-effects,
  .hand-card-dragging .hand-spell-hint,
  .hand-card-dragging .hand-spell-stats {
    display: none;
  }

  .hand-card-dragging .hand-card-content {
    padding-bottom: 34px;
  }

  .hand-card-cost {
    top: 6px;
    left: 6px;
    gap: 5px;
    padding: 2px 6px;
    font-size: 14px;
  }

  .hand-card-stat-badge {
    bottom: -4px;
    width: 34px;
    height: 34px;
  }

  .hand-card-stat-attack {
    left: -2px;
  }

  .hand-card-stat-health {
    right: -2px;
  }

  .hand-card-stat-value {
    font-size: 14px;
  }

  #player-lane .button-row {
    grid-area: controls;
    width: auto;
    min-width: 96px;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    align-self: start;
    margin: 8px 0 2px;
    padding: 2px 4px;
    gap: 4px;
    border-radius: 14px;
  }

  .turn-hud-fixed {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 4px 8px;
  }

  .turn-hud-fixed .turn-indicator {
    font-size: 10px;
  }

  #end-turn-btn {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  #concede-btn {
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
  }

  .board-corner-controls {
    top: calc(var(--scene-base-top-pad) + 40px);
    left: 10px;
    padding: 6px;
    border-radius: 14px;
  }

  .overlay-controls {
    display: none;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    gap: 6px;
  }

  .incoming-spell-preview {
    min-width: min(92vw, 560px);
    max-width: min(94vw, 640px);
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 16px;
  }

  .incoming-spell-preview-text-only {
    min-width: min(92vw, 560px);
  }

  .incoming-spell-preview-art {
    width: 96px;
    height: 96px;
  }

  .incoming-spell-preview-text {
    font-size: 18px;
  }

  .incoming-spell-preview-detail {
    font-size: 14px;
  }

  .overlay-toggle-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .board-grid {
    width: var(--board-row-width);
    max-width: 100%;
    min-width: 0;
    gap: 4px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    justify-content: stretch;
    align-items: stretch;
  }

  .board-slot {
    aspect-ratio: 1 / 0.93;
  }

  .incoming-spell-preview {
    top: 12%;
    min-width: 0;
    max-width: min(78vw, 420px);
    grid-template-columns: 72px auto;
    gap: 12px;
    padding: 12px 14px;
  }

  .incoming-spell-preview-art {
    width: 72px;
    height: 72px;
  }

  .incoming-spell-preview-text {
    font-size: 15px;
  }

  .incoming-spell-preview-detail {
    font-size: 13px;
  }

  .incoming-spell-preview.incoming-spell-preview-text-only {
    max-width: min(90vw, 560px);
    width: min(90vw, 560px);
    padding-left: 18px;
    padding-right: 18px;
  }

  .unit-hover-preview,
  .unit-hover-preview-card {
    display: none !important;
  }

  .board-card-draggable,
  .hand-card,
  .disenchant-target,
  .hero-target {
    touch-action: none;
  }

  .hand-grid {
    touch-action: none;
  }

  .match-flow-panel,
  .match-end-panel {
    width: min(94vw, 720px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 18px;
  }

  .mulligan-card-grid {
    gap: 10px;
    margin: 14px 0 34px;
  }

  #mulligan-overlay {
    padding: 6px;
  }

  #mulligan-overlay .match-flow-panel {
    width: min(98vw, 620px);
    max-height: calc(100dvh - 12px);
    overflow: hidden;
    padding: 6px 10px 12px;
  }

  #mulligan-overlay .eyebrow {
    min-height: 24px;
    padding: 0 10px;
    font-size: 10px;
  }

  #mulligan-overlay .match-flow-panel {
    align-items: center;
    text-align: center;
  }

  #mulligan-overlay h3 {
    width: 100%;
    margin: 8px 0 6px;
    font-size: clamp(34px, 5.8vw, 46px);
    line-height: 1;
    text-align: center;
  }

  #mulligan-overlay h3 {
    margin: 6px 0 0;
    font-size: 24px;
  }

  #mulligan-overlay .match-flow-panel h3::after {
    margin-top: 8px;
  }

  #mulligan-timer {
    position: absolute !important;
    top: 8px !important;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0 !important;
    padding: 4px 12px;
    border: 1px solid rgba(236, 204, 144, 0.22);
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(255, 241, 214, 0.06), rgba(255, 241, 214, 0) 20%),
      linear-gradient(145deg, rgba(19, 27, 42, 0.08), rgba(7, 12, 20, 0.18));
    box-shadow:
      inset 0 0 0 10px rgba(10, 15, 23, 0.14),
      inset 0 1px 0 rgba(255, 240, 214, 0.08),
      inset 0 -10px 12px rgba(0, 0, 0, 0.16),
      0 0 0 1px rgba(120, 74, 39, 0.18);
    transform: translateX(-50%);
    font-size: 12px;
    line-height: 1.3;
    z-index: 3;
  }

  #mulligan-overlay .mulligan-card-grid {
    grid-template-columns: repeat(3, max-content);
    gap: 0;
    margin: 2px 0 26px;
    justify-content: center;
  }

  #mulligan-overlay .flow-card,
  #mulligan-overlay .flow-card:hover:not(:disabled),
  #mulligan-overlay .flow-card:focus,
  #mulligan-overlay .flow-card:focus-visible {
    outline: none;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    color: inherit !important;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
  }

  #mulligan-overlay .flow-card .hand-card {
    width: 116px;
    height: 158px;
    min-height: 158px;
    flex-basis: 116px;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    animation: none;
  }

  #mulligan-overlay .flow-card .hand-card::after,
  #mulligan-overlay .flow-card .hand-card-glow-epic::after,
  #mulligan-overlay .flow-card .hand-card-glow-mythic::after {
    display: none;
    content: none;
  }

  #mulligan-overlay .flow-card .hand-card-glow-epic,
  #mulligan-overlay .flow-card .hand-card-glow-mythic,
  #mulligan-overlay .flow-card .hand-card-finish-shiny {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    animation: none;
  }

  #mulligan-overlay .flow-card .hand-card-art-wrap,
  #mulligan-overlay .flow-card .hand-card-glow-epic .hand-card-art-wrap,
  #mulligan-overlay .flow-card .hand-card-glow-mythic .hand-card-art-wrap,
  #mulligan-overlay .flow-card .hand-card-finish-shiny .hand-card-art-wrap,
  #mulligan-overlay .flow-card .hand-card-finish-shiny .hand-card-content {
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  #mulligan-overlay .hand-card-content {
    margin-top: -16px;
    padding: 2px 8px 22px;
    border-top: 0 !important;
    box-shadow: none !important;
  }

  #mulligan-overlay .hand-card-cost {
    border: 0 !important;
    box-shadow: none !important;
  }

  #mulligan-overlay .hand-minion-header,
  #mulligan-overlay .hand-spell-header {
    font-size: 10px;
  }

  #mulligan-overlay .hand-minion-hint,
  #mulligan-overlay .hand-spell-hint,
  #mulligan-overlay .hand-spell-stats {
    font-size: 8px;
  }

  #mulligan-overlay .hand-card-stat-badge {
    width: 32px;
    height: 32px;
    bottom: -6px;
  }

  #mulligan-overlay .hand-card-stat-value {
    font-size: 13px;
  }

  #mulligan-overlay .flow-card-selected::after {
    top: 6px;
    right: 6px;
    padding: 4px 6px;
    font-size: 9px;
  }

  #mulligan-overlay .button-row {
    margin-top: 8px;
  }

  #mulligan-overlay .mulligan-confirm-btn {
    min-width: 176px;
    min-height: 42px;
    padding: 0 18px;
    font-size: 12px;
  }

  #cycle-overlay {
    padding: 6px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) {
    width: min(98vw, 620px);
    max-height: calc(100dvh - 12px);
    overflow: hidden;
    padding: 10px 10px 12px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .eyebrow {
    min-height: 24px;
    padding: 0 10px;
    font-size: 10px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) h3 {
    margin: 6px 0 0;
    font-size: 24px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) h3::after {
    margin-top: 8px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .match-flow-copy {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) #cycle-selection {
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
    margin: 8px 0 10px;
    padding: 8px 6px;
    justify-content: center;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .flow-card .hand-card {
    width: 116px;
    height: 158px;
    min-height: 158px;
    flex-basis: 116px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-card-content {
    margin-top: -16px;
    padding: 2px 8px 22px;
    display: grid;
    gap: 2px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-minion-header,
  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-spell-header {
    font-size: 10px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-minion-hint,
  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-spell-hint,
  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-spell-stats {
    font-size: 8px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-card-stat-badge {
    width: 32px;
    height: 32px;
    bottom: -6px;
  }

  #cycle-overlay .cycle-flow-panel:has(#cycle-selection.cycle-selection-pick) .hand-card-stat-value {
    font-size: 13px;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 760px) {
  .match-shell {
    --board-slot-size: clamp(80px, min(20.8vw, 14.3vh), 144px);
    --hand-card-width: clamp(126px, min(29vw, 25.4vh), 166px);
    --hand-card-height: calc(var(--hand-card-width) * 7 / 5);
  }

  .player-board-row {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .player-hero-side {
    position: static;
    left: auto;
    top: auto;
  }
}

@keyframes freeze-impact {
  0% {
    filter: brightness(1) saturate(1);
  }
  40% {
    filter: brightness(1.14) saturate(1.22) hue-rotate(18deg);
  }
  100% {
    filter: brightness(1) saturate(1);
  }
}

@keyframes freeze-impact-ring {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74);
    box-shadow:
      0 0 0 0 rgba(134, 204, 255, 0.0),
      0 0 0 rgba(129, 207, 255, 0.0),
      inset 0 0 0 rgba(224, 245, 255, 0.0);
  }
  34% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      0 0 0 6px rgba(134, 204, 255, 0.24),
      0 0 28px rgba(129, 207, 255, 0.58),
      inset 0 0 18px rgba(224, 245, 255, 0.24);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.16);
    box-shadow:
      0 0 0 0 rgba(134, 204, 255, 0.0),
      0 0 0 rgba(129, 207, 255, 0.0),
      inset 0 0 0 rgba(224, 245, 255, 0.0);
  }
}

#opponent-lane .player-board-row,
#player-lane .player-board-row {
  margin-bottom: -2px;
}

@media (hover: none) and (pointer: coarse) and (max-width: 560px) {
  .match-shell {
    --board-slot-size: clamp(64px, min(22.8vw, 12.4vh), 112px);
    --hand-card-width: clamp(110px, min(30vw, 20.8vh), 136px);
    --hand-card-height: calc(var(--hand-card-width) * 7 / 5);
    --board-hand-gap: 8px;
  }

  .board-grid,
  .hand-grid {
    gap: var(--board-hand-gap);
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 920px) {
  #player-lane .button-row {
    width: 100%;
    justify-content: center;
    margin-right: 0;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 680px) {
  .hand-action-stack {
    margin-top: 16px;
    padding: 12px;
  }

  .turn-hud-fixed {
    min-width: 0;
    min-height: 48px;
    padding: 0 12px;
  }

  #player-lane .button-row {
    padding: 12px;
  }

  #end-turn-btn {
    min-width: 148px;
    min-height: 48px;
    padding: 0 22px;
  }

  #concede-btn {
    min-width: 108px;
    min-height: 48px;
  }
}
