@layer systems {
.energy-panel,
.combat-panel {
  display: grid;
  gap: 0.55rem;
}

.energy-overdrive-btn,
.hud-inline-value,
.energy-battery-value,
.health-ring-value,
.data-card-count,
.fragment-card-header,
.system-module.fx-system-module-gain-badge::after,
.mastery-level-popup,
.system-module-value,
.queue-key-hotkey,
.queue-key-hint kbd {
  font-family: var(--font-mono);
}

.energy-cell-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  gap: 0.6rem;
  align-items: center;
}

.energy-panel,
.combat-panel,
.card-panel {
  --system-module-title-color: rgba(163, 226, 246, 0.86);
}

.energy-rate-box {
  position: relative;
  border: 1px solid rgba(88, 165, 215, 0.5);
  background:
    linear-gradient(180deg, rgba(11, 25, 36, 0.88), rgba(6, 14, 21, 0.94)),
    linear-gradient(180deg, rgba(255, 233, 118, 0.04), transparent 60%);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.12rem;
  min-height: 58px;
  padding: 0.32rem 0.65rem;
  box-shadow: inset 0 0 0 1px rgba(4, 10, 15, 0.42), inset 0 1px 0 rgba(185, 241, 255, 0.04);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.energy-rate-box[data-overdrive-unlocked="true"] {
  padding-bottom: 0.7rem;
}

.energy-rate-box[data-overdrive-state="active"] {
  border-color: rgba(255, 234, 133, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 234, 133, 0.18), 0 0 14px rgba(255, 224, 111, 0.2);
}

.energy-overdrive-btn {
  --button-border-color: rgba(88, 165, 215, 0.48);
  --button-background: rgba(7, 18, 27, 0.88);
  --button-text-color: #9fe8ff;
  --button-hover-border-color: rgba(126, 228, 255, 0.82);
  --button-hover-text-color: #d9fbff;
  --button-hover-shadow: 0 0 10px rgba(82, 214, 255, 0.2);
  position: absolute;
  left: 50%;
  bottom: -0.5rem;
  transform: translateX(-50%);
  width: calc(100% - 1rem);
  border-radius: var(--radius-pill);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.2rem 0.42rem;
}

.energy-overdrive-btn:disabled {
  opacity: 0.62;
  cursor: default;
}

.energy-overdrive-btn[data-overdrive-state="active"] {
  --button-border-color: rgba(255, 234, 133, 0.8);
  --button-background: rgba(42, 34, 8, 0.88);
  --button-text-color: #fff3a8;
  --button-hover-border-color: rgba(255, 234, 133, 0.8);
  --button-hover-text-color: #fff3a8;
  --button-hover-shadow: 0 0 10px rgba(255, 224, 111, 0.22);
}

.energy-rate-bolt {
  color: #ffe87a;
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
  text-shadow: 0 0 10px rgba(255, 232, 110, 0.45);
  filter: drop-shadow(0 0 8px rgba(255, 232, 110, 0.45));
}

.hud-inline-value {
  color: var(--accent);
  font-size: 0.82rem;
}

.energy-battery {
  --energy-hue-a: 188;
  --energy-hue-b: 208;
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}

.energy-battery-cap {
  width: 7px;
  height: 34px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(98, 154, 192, 0.6);
  background: rgba(31, 56, 77, 0.8);
}

.energy-battery-shell {
  position: relative;
  height: 58px;
  flex: 1;
  border: 1px solid rgba(98, 154, 192, 0.7);
  background:
    linear-gradient(180deg, rgba(8, 17, 25, 0.96), rgba(4, 10, 16, 0.98)),
    linear-gradient(90deg, rgba(69, 208, 255, 0.05), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(4, 10, 15, 0.42), inset 0 1px 0 rgba(185, 241, 255, 0.04);
  overflow: hidden;
}

.energy-battery-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(
    90deg,
    hsl(var(--energy-hue-a), 100%, 63%),
    hsl(var(--energy-hue-b), 100%, 56%)
  );
  box-shadow: 0 0 16px hsla(var(--energy-hue-a), 100%, 62%, 0.48);
  transition: background 180ms linear, box-shadow 180ms linear;
}

.energy-battery-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 45%,
    transparent 72%
  );
  transform: translateX(-140%);
  animation: energy-fill-shimmer 4.6s linear infinite;
}

.energy-battery-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

.energy-battery-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: 0.9rem;
  color: #eaffff;
  text-shadow: 0 0 8px rgba(103, 226, 255, 0.5);
}

.health-ring {
  --health-pct: 0%;
  width: 88px;
  height: 88px;
  margin: 0;
  position: relative;
}

.health-ring-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-circle);
  background: conic-gradient(from 210deg, #ff4e79 var(--health-pct), rgba(33, 55, 78, 0.78) 0);
  box-shadow: 0 0 15px rgba(255, 68, 114, 0.23);
}

.health-ring.health-critical .health-ring-track {
  animation: health-critical-pulse 1s ease-in-out infinite;
}

.health-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: var(--radius-circle);
  background: rgba(6, 12, 18, 0.95);
  border: 1px solid rgba(68, 112, 145, 0.65);
}

.health-ring-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}

.health-ring-value {
  font-size: 0.84rem;
  color: #ffd2de;
  text-shadow: 0 0 10px rgba(255, 103, 148, 0.35);
}

.combat-system-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.68rem;
  align-items: stretch;
}

.combat-readout-module {
  position: relative;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 0.72rem;
  overflow: hidden;
}

.combat-readout-module::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(122, 217, 246, 0), rgba(122, 217, 246, 0.18), rgba(122, 217, 246, 0));
  pointer-events: none;
}

.combat-stat-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: min(84%, 100%);
  min-height: 34px;
  padding: 0.26rem 0.4rem 0.26rem 0.7rem;
  background: linear-gradient(90deg, rgba(91, 214, 247, 0.08), rgba(91, 214, 247, 0.02) 42%, transparent 72%);
}

.combat-stat-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.combat-stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.combat-stat-label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9cf5ff;
  filter: drop-shadow(0 0 7px rgba(96, 238, 255, 0.28));
}

.combat-stat-label-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.combat-stat-text-label {
  color: rgba(191, 233, 244, 0.82);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.combat-stat-value {
  color: var(--color-text-bright);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  margin-left: auto;
  text-shadow: 0 0 8px rgba(99, 224, 255, 0.14);
}

.combat-stat-attack {
  align-self: flex-start;
}

.combat-stat-block-defend {
  align-self: flex-end;
  padding-left: 0.4rem;
  padding-right: 0.7rem;
  text-align: right;
  background: linear-gradient(270deg, rgba(91, 214, 247, 0.08), rgba(91, 214, 247, 0.02) 42%, transparent 72%);
}

.combat-stat-block-defend .combat-stat-heading,
.combat-stat-block-defend .combat-stat-text-label,
.combat-stat-block-defend .combat-stat-value {
  text-align: right;
}

.combat-stat-block::before {
  content: "";
  flex: 0 0 2px;
  align-self: stretch;
  background: linear-gradient(180deg, rgba(122, 217, 246, 0.58), rgba(122, 217, 246, 0.12));
}

.combat-stat-block-defend::before {
  order: 3;
}

.card-panel {
  display: grid;
  gap: 0.58rem;
}

.card-subtitle-row {
  margin-top: 0.2rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(72, 133, 174, 0.32);
}

.stats-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding-bottom: 0.36rem;
  border-bottom: 1px solid rgba(77, 144, 183, 0.24);
}

.stats-title-row-plain {
  padding-bottom: 0;
  border-bottom: 0;
}

.stats-title-row h2 {
  margin: 0;
  color: var(--system-module-title-color);
  font-size: 0.83rem;
  letter-spacing: 0.14em;
}

.stats-sp {
  color: var(--muted);
  font-size: 0.83rem;
}

.data-card-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: center;
}

.data-card-stack-wrap {
  --data-card-wrap-border-color: rgba(70, 132, 175, 0.45);
  --data-card-wrap-box-shadow: none;
  position: relative;
  height: 66px;
  border: 1px solid var(--data-card-wrap-border-color);
  background: rgba(7, 15, 23, 0.75);
  box-shadow: var(--data-card-wrap-box-shadow);
  overflow: hidden;
}

.data-card-stack-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(195, 248, 255, 0) 12%, rgba(195, 248, 255, 0.82) 46%, rgba(195, 248, 255, 0) 76%),
    linear-gradient(180deg, rgba(120, 232, 255, 0.26), rgba(120, 232, 255, 0));
  mix-blend-mode: screen;
}

.data-card-stack-wrap.has-data-cards {
  --data-card-wrap-border-color: rgba(138, 228, 248, 0.72);
  --data-card-wrap-box-shadow:
    0 0 0 1px rgba(176, 243, 255, 0.18),
    0 0 18px rgba(73, 215, 255, 0.16),
    inset 0 0 14px rgba(111, 233, 255, 0.1);
}

.data-card-stack-wrap.fx-data-card-gain {
  animation: data-card-border-pulse 420ms ease-out;
}

.data-card-stack-wrap.fx-data-card-gain::after {
  animation: data-card-gain-flash 440ms ease-out;
}

.data-cards-stack {
  position: absolute;
  inset: 0;
}

.data-card-stack-cluster {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 36px;
  transform: translate(calc(-50% + var(--stack-shift, 0px)), calc(-50% + var(--stack-drop, 0px)));
}

.data-card-stack-wrap.has-data-cards-overflow .data-card-stack-cluster {
  transform: translate(calc(-50% + var(--stack-shift, 0px) - 5px), calc(-50% + var(--stack-drop, 0px)));
}

.data-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 62px;
  height: 36px;
  border: 1px solid rgba(126, 238, 255, 0.68);
  background:
    linear-gradient(135deg, rgba(174, 247, 255, 0.18), rgba(91, 220, 255, 0.09) 42%, rgba(9, 18, 28, 0) 42%),
    linear-gradient(90deg, rgba(58, 202, 255, 0.2), rgba(27, 114, 189, 0.08)),
    rgba(10, 25, 39, 0.96);
  transform: translateX(calc(var(--card-i) * 2px)) translateY(calc(var(--card-i) * -2px));
  box-shadow:
    0 0 16px rgba(56, 217, 255, 0.2),
    inset 0 0 0 1px rgba(193, 246, 255, 0.05);
  clip-path: polygon(10px 0, 100% 0, 100% 26px, calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.data-card::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 10px;
  top: 8px;
  height: 3px;
  background: rgba(188, 247, 255, 0.92);
  box-shadow: 0 0 10px rgba(128, 230, 255, 0.32);
}

.data-card::before {
  content: "";
  position: absolute;
  inset: 12px 8px 6px 8px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(181, 244, 255, 0.46) 0,
      rgba(181, 244, 255, 0.46) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(180deg, rgba(175, 243, 255, 0.08), rgba(175, 243, 255, 0));
  clip-path: polygon(8px 0, 100% 0, 100% 18px, calc(100% - 8px) 100%, 0 100%, 0 8px);
  opacity: 0.5;
  pointer-events: none;
}

.data-card-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.data-card-count {
  position: absolute;
  right: 8px;
  bottom: 5px;
  z-index: 20;
  color: #9defff;
  font-size: 0.82rem;
  transition:
    color 160ms ease,
    text-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.data-card-count.is-overflow {
  padding: 0.12rem 0.38rem;
  border: 1px solid rgba(159, 237, 255, 0.54);
  background: rgba(7, 18, 28, 0.78);
  color: #dbfaff;
  text-shadow: 0 0 10px rgba(120, 232, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(159, 237, 255, 0.14),
    0 0 18px rgba(73, 215, 255, 0.16);
  transform: translateY(-1px);
}

.fragment-card {
  display: grid;
  gap: 0.36rem;
}

.fragment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.fragment-card-shell {
  position: relative;
  height: 36px;
  border: 1px solid rgba(84, 154, 201, 0.65);
  background: rgba(6, 14, 21, 0.92);
  overflow: hidden;
}

.fragment-card-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #8d67ff, #49d8ff);
  box-shadow: 0 0 18px rgba(94, 177, 255, 0.35);
}

.fragment-card-fill::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 14px;
  right: -16px;
  background: linear-gradient(90deg, rgba(141, 103, 255, 0), rgba(201, 245, 255, 0.95), rgba(73, 216, 255, 0));
  opacity: 0;
  filter: blur(0.4px);
}

.fragment-card-shell.fx-fragment-gain .fragment-card-fill::after {
  animation: fragment-edge-spark 360ms ease-out;
}

.fragment-card-noise {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.04) 45%, transparent 80%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 6px);
  animation: fragment-scan 5.2s linear infinite;
}

@keyframes fragment-scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fragment-edge-spark {
  0% { opacity: 0; transform: translateX(-12px); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateX(0); }
}

@keyframes data-card-gain-flash {
  0% { opacity: 0; transform: translateX(-34%) scaleX(0.92); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateX(22%) scaleX(1.08); }
}

@keyframes data-card-border-pulse {
  0% {
    border-color: var(--data-card-wrap-border-color);
    box-shadow: var(--data-card-wrap-box-shadow);
  }
  18% {
    border-color: rgba(176, 243, 255, 0.98);
    box-shadow:
      0 0 0 1px rgba(176, 243, 255, 0.7),
      0 0 22px rgba(73, 215, 255, 0.38),
      inset 0 0 18px rgba(111, 233, 255, 0.18);
  }
  100% {
    border-color: var(--data-card-wrap-border-color);
    box-shadow: var(--data-card-wrap-box-shadow);
  }
}

@keyframes system-module-gain-badge-float {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(1); }
}

@keyframes health-critical-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 68, 114, 0.23); }
  50% { transform: scale(1.02); box-shadow: 0 0 22px rgba(255, 97, 134, 0.5); }
}

@keyframes energy-fill-shimmer {
  0% { transform: translateX(-140%); opacity: 0; }
  14% { opacity: 1; }
  100% { transform: translateX(180%); opacity: 0; }
}

.system-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.system-module {
  --system-module-shell-stroke: rgba(92, 176, 219, 0.56);
  --system-module-shell-stroke-inner: rgba(67, 118, 149, 0.42);
  --system-module-shell-top-rail: rgba(138, 229, 255, 0.94);
  --system-module-shell-bottom-rail: rgba(93, 170, 210, 0.96);
  --system-module-shell-side-rail: rgba(111, 202, 232, 0.8);
  position: relative;
  min-height: 72px;
  padding: 0.62rem 0.42rem 0.58rem;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.25rem;
  overflow: visible;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.system-module-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(73, 215, 255, 0.07));
}

.system-module-shell-fill {
  fill: rgba(7, 15, 23, 0.92);
}

.system-module-shell-outline {
  fill: none;
  stroke: var(--system-module-shell-stroke);
  stroke-width: 1.6;
}

.system-module-shell-inline {
  fill: none;
  stroke: var(--system-module-shell-stroke-inner);
  stroke-width: 1;
}

.system-module-rail {
  fill: none;
  stroke-linecap: round;
}

.system-module-rail-top {
  stroke: var(--system-module-shell-top-rail);
  stroke-width: 2.1;
  filter: drop-shadow(0 0 4px rgba(115, 213, 248, 0.4));
}

.system-module-rail-bottom {
  stroke: var(--system-module-shell-bottom-rail);
  stroke-width: 1.8;
}

.system-module-rail-side {
  stroke: var(--system-module-shell-side-rail);
  stroke-width: 1.8;
  opacity: 0.9;
}

.system-module-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.25rem;
}

.system-module.fx-system-module-gain {
  --system-module-shell-stroke: rgba(140, 247, 255, 0.96);
  --system-module-shell-stroke-inner: rgba(112, 220, 248, 0.62);
  --system-module-shell-top-rail: rgba(184, 248, 255, 1);
  --system-module-shell-bottom-rail: rgba(138, 229, 255, 0.98);
  --system-module-shell-side-rail: rgba(148, 232, 255, 0.92);
  transform: translateY(-1px);
}

.system-module.fx-system-module-gain .system-module-shell {
  filter: drop-shadow(0 0 14px rgba(84, 235, 255, 0.24));
}

.system-module.fx-system-module-gain-badge::after {
  content: attr(data-stat-gain);
  position: absolute;
  right: 8px;
  top: 4px;
  font-size: 0.7rem;
  color: #97f2ff;
  text-shadow: 0 0 8px rgba(87, 233, 255, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) scale(1);
  animation: system-module-gain-badge-float 520ms ease-out;
  animation-fill-mode: forwards;
}

.mastery-level-popup-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.mastery-level-popup {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  color: #72ff6a;
  text-shadow:
    0 0 10px rgba(114, 255, 106, 0.7),
    0 0 2px rgba(2, 10, 17, 0.95),
    0 0 1px rgba(2, 10, 17, 0.95);
  will-change: transform, opacity;
  white-space: nowrap;
}

.system-module-label {
  color: rgba(180, 220, 233, 0.74);
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-module-value {
  color: #d8f6ff;
  font-size: 1.02rem;
}

.queue-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  padding: 0;
}

.queue-controls-panel {
  flex: 0 0 auto;
}

.queue-controls-panel h2 {
  margin-bottom: 0.45rem;
}

.queue-hotkeys {
  padding: 0;
  border: none;
  background: none;
}

.queue-hotkeys h2 {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: rgba(154, 214, 232, 0.68);
  padding: 0.5rem;
  padding-bottom: 0;
}

.queue-key-cluster {
  position: relative;
  min-width: 0;
}

.queue-key-cluster-composite {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.queue-key-cluster-move {
  position: absolute;
  width: 220px;
  height: 220px;
  left: 23px;
  top: 23px;
  z-index: 2;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  pointer-events: none;
}

.queue-key-cluster-move .queue-key-btn {
  pointer-events: auto;
}

.queue-key-btn {
  --queue-key-accent: rgba(122, 217, 246, 0.74);
  --button-border-color: rgba(93, 157, 198, 0.58);
  --button-background:
    linear-gradient(180deg, rgba(14, 29, 42, 0.94), rgba(8, 16, 25, 0.97));
  --button-text-color: #d8f4ff;
  --button-hover-border-color: rgba(166, 235, 255, 0.98);
  --button-hover-text-color: #f6fdff;
  --button-hover-shadow:
    0 0 18px rgba(56, 211, 255, 0.18),
    inset 0 0 14px rgba(56, 211, 255, 0.14);
  --button-active-border-color: rgba(166, 235, 255, 0.98);
  --button-active-text-color: #f6fdff;
  --button-active-shadow:
    0 0 20px rgba(56, 211, 255, 0.24),
    inset 0 0 14px rgba(56, 211, 255, 0.18);
  margin-top: 0;
  width: auto;
  min-width: 0;
  min-height: 54px;
  height: 54px;
  position: relative;
  overflow: hidden;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.5rem 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: var(--queue-key-transform, translateZ(0));
  box-shadow:
    inset 0 0 0 1px rgba(4, 10, 15, 0.46),
    inset 0 1px 0 rgba(189, 241, 255, 0.04);
}

.queue-key-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  filter: saturate(0.56) brightness(0.8);
}

.queue-key-btn:disabled > i {
  color: rgba(171, 195, 208, 0.62);
}

.queue-key-btn:disabled .queue-key-shell-fill,
.queue-key-btn:disabled .queue-command-shell-fill {
  fill: rgba(9, 17, 25, 0.92);
}

.queue-key-btn:disabled .queue-key-shell-outline,
.queue-key-btn:disabled .queue-command-shell-outline {
  stroke: rgba(90, 120, 137, 0.6);
}

.queue-key-btn:disabled .queue-key-shell-inline,
.queue-key-btn:disabled .queue-command-shell-inline {
  stroke: rgba(125, 154, 170, 0.12);
}

.queue-key-btn:disabled .queue-command-shell-accent {
  stroke: rgba(119, 150, 166, 0.4);
  filter: none;
}

.queue-key-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), var(--queue-key-accent));
  opacity: 0.9;
}

.queue-key-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.38;
  pointer-events: none;
}

.queue-key-hotkey {
  position: absolute;
  top: 0.34rem;
  right: 0.38rem;
  z-index: 1;
  min-width: 1.3rem;
  padding: 0.05rem 0.26rem;
  border: 1px solid rgba(126, 203, 233, 0.48);
  background: rgba(5, 14, 22, 0.82);
  box-shadow: inset 0 0 8px rgba(73, 215, 255, 0.08);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  color: rgba(207, 243, 255, 0.9);
  pointer-events: none;
}

.queue-key-btn:is(.is-active, .active) {
  transform: var(--queue-key-transform, translateZ(0)) translateY(1px);
}

.queue-command-btn {
  --queue-command-accent: rgba(122, 217, 246, 0.78);
  position: absolute;
  width: 140px;
  height: 140px;
  padding: 0;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.queue-command-btn::before,
.queue-command-btn::after {
  display: none;
}

.queue-command-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 10px rgba(73, 215, 255, 0.07));
}

.queue-command-shell-rot-tl {
  transform: none;
}

.queue-command-shell-rot-tr {
  transform: scaleX(-1);
}

.queue-command-shell-rot-bl {
  transform: scaleY(-1);
}

.queue-command-shell-rot-br {
  transform: scale(-1);
}

.queue-command-shell-fill {
  fill: rgba(8, 16, 25, 0.96);
}

.queue-command-shell-outline {
  fill: none;
  stroke: rgba(94, 156, 198, 0.68);
  stroke-width: 1.55;
}

.queue-command-shell-inline {
  fill: none;
  stroke: rgba(154, 220, 244, 0.16);
  stroke-width: 1;
}

.queue-command-shell-accent {
  fill: none;
  stroke: var(--queue-command-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--queue-command-accent) 48%, transparent));
}

.queue-command-btn:hover .queue-command-shell-outline,
.queue-command-btn:focus-visible .queue-command-shell-outline,
.queue-command-btn:is(.is-active, .active) .queue-command-shell-outline {
  stroke: rgba(168, 235, 255, 0.96);
}

.queue-command-btn:hover .queue-command-shell,
.queue-command-btn:focus-visible .queue-command-shell,
.queue-command-btn:is(.is-active, .active) .queue-command-shell {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--queue-command-accent) 24%, rgba(73, 215, 255, 0.1)));
}

.queue-command-btn > :not(.queue-command-shell) {
  position: relative;
  z-index: 1;
}

.queue-key-menu-btn {
  --queue-key-transform: translateZ(0);
  clip-path: polygon(16.07% 7.14%, 92.86% 7.14%, 92.86% 31.25%, 31.25% 92.86%, 7.14% 92.86%, 7.14% 16.07%);
  left: 0;
  top: 0;
}

.queue-key-action-interact {
  --queue-key-transform: translateZ(0);
  --queue-command-accent: rgba(84, 255, 193, 0.9);
  clip-path: polygon(7.14% 7.14%, 83.93% 7.14%, 92.86% 16.07%, 92.86% 92.86%, 68.75% 92.86%, 7.14% 31.25%);
  right: 0;
  top: 0;
}

.queue-key-action-speak {
  --queue-key-transform: translateZ(0);
  --queue-command-accent: rgba(255, 196, 108, 0.88);
  clip-path: polygon(7.14% 7.14%, 31.25% 7.14%, 92.86% 68.75%, 92.86% 92.86%, 16.07% 92.86%, 7.14% 83.93%);
  left: 0;
  bottom: 0;
}

.queue-key-action-fight {
  --queue-key-transform: translateZ(0);
  --queue-command-accent: rgba(255, 107, 135, 0.92);
  clip-path: polygon(92.86% 7.14%, 92.86% 83.93%, 83.93% 92.86%, 7.14% 92.86%, 7.14% 68.75%, 68.75% 7.14%);
  right: 0;
  bottom: 0;
}

.dpad-btn {
  aspect-ratio: 1 / 1;
  padding: 0;
}

.queue-key-cluster-move .queue-key-btn {
  position: absolute;
  width: 93px;
  height: 93px;
  padding: 0;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.queue-key-cluster-move .queue-key-btn::before,
.queue-key-cluster-move .queue-key-btn::after {
  display: none;
}

.queue-key-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(73, 215, 255, 0.08));
  transform-origin: 50% 50%;
}

.queue-key-shell-rot-0 {
  transform: rotate(0deg);
}

.queue-key-shell-rot-left {
  transform: rotate(-90deg);
}

.queue-key-shell-rot-180 {
  transform: rotate(180deg);
}

.queue-key-shell-rot-right {
  transform: rotate(90deg);
}

.queue-key-shell-fill {
  fill: rgba(10, 19, 28, 0.96);
}

.queue-key-shell-outline {
  fill: none;
  stroke: rgba(93, 157, 198, 0.72);
  stroke-width: 1.55;
}

.queue-key-shell-inline {
  fill: none;
  stroke: rgba(156, 222, 245, 0.18);
  stroke-width: 1;
}

.queue-key-cluster-move .queue-key-btn:hover .queue-key-shell-outline,
.queue-key-cluster-move .queue-key-btn:focus-visible .queue-key-shell-outline,
.queue-key-cluster-move .queue-key-btn:is(.is-active, .active) .queue-key-shell-outline {
  stroke: rgba(166, 235, 255, 0.98);
}

.queue-key-cluster-move .queue-key-btn:hover .queue-key-shell,
.queue-key-cluster-move .queue-key-btn:focus-visible .queue-key-shell,
.queue-key-cluster-move .queue-key-btn:is(.is-active, .active) .queue-key-shell {
  filter: drop-shadow(0 0 14px rgba(56, 211, 255, 0.18));
}

.dpad-btn > :is(i, svg):not(.queue-key-shell) {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  stroke-width: 2.45;
}

.action-key-btn > :is(i, svg):not(.queue-command-shell) {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.queue-key-menu-btn > :is(i, svg):not(.queue-command-shell) {
  width: 28px;
  height: 28px;
  stroke-width: 2.15;
  transform: translate(-10px, -8px);
}

.queue-key-action-interact > :is(i, svg):not(.queue-command-shell) {
  transform: translate(10px, -8px);
}

.queue-key-action-speak > :is(i, svg):not(.queue-command-shell) {
  transform: translate(-10px, 8px);
}

.queue-key-action-fight > :is(i, svg):not(.queue-command-shell) {
  transform: translate(10px, 8px);
}

.queue-key-move-up {
  --queue-key-transform: translateX(-50%);
  clip-path: polygon(38.89% 18.52%, 61.11% 18.52%, 92.59% 50%, 50% 92.59%, 7.41% 50%);
  left: 50%;
  top: 20px;
}

.queue-key-move-left {
  --queue-key-transform: translateY(-50%);
  clip-path: polygon(18.52% 38.89%, 18.52% 61.11%, 50% 92.59%, 92.59% 50%, 50% 7.41%);
  left: 20px;
  top: 50%;
}

.queue-key-move-down {
  --queue-key-transform: translateX(-50%);
  clip-path: polygon(61.11% 81.48%, 38.89% 81.48%, 7.41% 50%, 50% 7.41%, 92.59% 50%);
  left: 50%;
  bottom: 20px;
}

.queue-key-move-right {
  --queue-key-transform: translateY(-50%);
  clip-path: polygon(81.48% 61.11%, 81.48% 38.89%, 50% 7.41%, 7.41% 50%, 50% 92.59%);
  right: 20px;
  top: 50%;
}

.queue-key-hint kbd {
  --kbd-border-color: rgba(102, 168, 211, 0.55);
  --kbd-background: rgba(13, 29, 43, 0.82);
  --kbd-text-color: #c8f2ff;
  display: inline-block;
  min-width: 1.7em;
  padding: 0.03rem 0.34rem;
  font-size: 0.74rem;
  text-align: center;
}

.queue-key-hint {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
}
