:root {
  --bg: #090818;
  --bg-top: #191232;
  --bg-mid: #0c1130;
  --bg-bottom: #060912;
  --panel: rgba(16, 18, 40, 0.9);
  --panel-alt: rgba(19, 26, 57, 0.82);
  --panel-border: rgba(112, 158, 255, 0.22);
  --panel-border-strong: rgba(119, 185, 255, 0.38);
  --panel-glow: rgba(100, 116, 255, 0.12);
  --text: #ecf2ff;
  --text-strong: #ffffff;
  --accent: #6ff6d8;
  --accent-cyan: #58c9ff;
  --accent-violet: #8c6dff;
  --accent-pink: #ff6fd8;
  --accent-gold: #ffbe57;
  --accent-teal: #72f3c8;
  --danger: #ff728f;
  --muted: #a7b4d8;
  --glow-cyan-soft: rgba(88, 201, 255, 0.12);
  --glow-cyan-strong: rgba(88, 201, 255, 0.26);
  --glow-violet-soft: rgba(140, 109, 255, 0.14);
  --glow-pink-soft: rgba(255, 111, 216, 0.14);
  --glow-gold-soft: rgba(255, 190, 87, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 111, 216, 0.16), transparent 22%),
    radial-gradient(circle at 78% 18%, rgba(88, 201, 255, 0.16), transparent 24%),
    radial-gradient(circle at 50% 82%, rgba(140, 109, 255, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
}

body.mobile-nav-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(88, 201, 255, 0.09), transparent 18%),
    radial-gradient(circle at 82% 20%, rgba(255, 111, 216, 0.08), transparent 16%),
    radial-gradient(circle at 46% 72%, rgba(140, 109, 255, 0.08), transparent 24%);
  filter: blur(18px);
  opacity: 0.95;
}

body::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.018) 48%, transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.38;
}

.combat-fx-line {
  position: fixed;
  height: 3px;
  transform-origin: left center;
  border-radius: 999px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: combatFxLine 460ms ease-out forwards;
}

.combat-fx-line .combat-fx-bolt {
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  box-shadow: 0 0 12px currentColor;
  animation: combatFxBolt 460ms ease-out forwards;
}

.combat-fx-line.projectile {
  height: 2px;
  background: transparent;
  box-shadow: none;
}

.combat-fx-line .combat-fx-trail {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  opacity: 0.45;
  filter: blur(0.3px);
}

.combat-fx-line .combat-fx-projectile {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor, 0 0 20px color-mix(in srgb, currentColor 55%, transparent);
}

.combat-fx-line.outgoing {
  color: #5ac8ff;
}

.combat-fx-line.crit-out {
  color: #ffbc56;
}

.combat-fx-line.incoming {
  color: #ffffff;
}

.combat-fx-line.pvp-out {
  color: #71b5ff;
}

.combat-fx-line.pvp-in {
  color: #ffffff;
}

.combat-fx-line.tone-ion .combat-fx-trail {
  background: linear-gradient(90deg, rgba(90, 200, 255, 0.95), rgba(90, 200, 255, 0));
}

.combat-fx-line.tone-ion .combat-fx-projectile {
  background: radial-gradient(circle at 35% 35%, #dff8ff, #5ac8ff 45%, #147fd5 78%);
  color: #5ac8ff;
}

.combat-fx-line.tone-plasma .combat-fx-trail {
  background: linear-gradient(90deg, rgba(255, 122, 214, 0.95), rgba(169, 105, 255, 0.78), rgba(169, 105, 255, 0));
}

.combat-fx-line.tone-plasma .combat-fx-projectile {
  background: radial-gradient(circle at 35% 35%, #ffe4fa, #ff7ad6 42%, #8f5fff 78%);
  color: #ff7ad6;
}

.combat-fx-line.tone-antimatter .combat-fx-trail {
  background: linear-gradient(90deg, rgba(188, 108, 255, 0.95), rgba(88, 42, 160, 0));
}

.combat-fx-line.tone-antimatter .combat-fx-projectile {
  background: radial-gradient(circle at 35% 35%, #f3deff, #bc6cff 38%, #4e2389 80%);
  color: #bc6cff;
}

.combat-fx-line.tone-void .combat-fx-trail {
  background: linear-gradient(90deg, rgba(224, 203, 255, 0.95), rgba(76, 52, 128, 0.55), rgba(76, 52, 128, 0));
}

.combat-fx-line.tone-void .combat-fx-projectile {
  background: radial-gradient(circle at 35% 35%, #ffffff, #d6b7ff 36%, #3c246f 82%);
  color: #efe1ff;
}

.combat-fx-line.crit-out .combat-fx-trail {
  background: linear-gradient(90deg, rgba(255, 188, 86, 1), rgba(255, 188, 86, 0));
  height: 3px;
}

.combat-fx-line.crit-out .combat-fx-projectile {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #ffbc56 40%, #d67116 82%);
  color: #ffbc56;
}

.combat-fx-line.incoming .combat-fx-trail,
.combat-fx-line.pvp-in .combat-fx-trail {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 157, 196, 0.66), rgba(255, 157, 196, 0));
}

.combat-fx-line.incoming .combat-fx-projectile,
.combat-fx-line.pvp-in .combat-fx-projectile {
  background: radial-gradient(circle at 35% 35%, #ffffff, #ffd7ea 40%, #ff8fc0 78%);
  color: #fff7fb;
}

@keyframes combatFxLine {
  0% {
    opacity: 0;
    filter: blur(1px);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    filter: blur(0);
  }
}

@keyframes combatFxBolt {
  0% {
    left: 0%;
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.8);
  }
  70% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

.combat-impact-flash {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  animation: combatImpactFlash 280ms ease-out forwards;
}

.combat-impact-flash::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  animation: combatImpactPulse 280ms ease-out forwards;
}

.combat-impact-flash.outgoing,
.combat-impact-flash.pvp-out {
  box-shadow: 0 0 0 1px rgba(90, 200, 255, 0.65) inset, 0 0 24px rgba(90, 200, 255, 0.35);
  background: radial-gradient(circle at 50% 50%, rgba(90, 200, 255, 0.16), rgba(90, 200, 255, 0) 72%);
}

.combat-impact-flash.outgoing::before,
.combat-impact-flash.pvp-out::before {
  box-shadow: 0 0 0 2px rgba(90, 200, 255, 0.55) inset, 0 0 20px rgba(90, 200, 255, 0.4);
  background: radial-gradient(circle at 50% 50%, rgba(160, 232, 255, 0.28), rgba(90, 200, 255, 0) 72%);
}

.combat-impact-flash.crit-out {
  box-shadow: 0 0 0 1px rgba(255, 188, 86, 0.75) inset, 0 0 28px rgba(255, 188, 86, 0.45);
  background: radial-gradient(circle at 50% 50%, rgba(255, 188, 86, 0.22), rgba(255, 188, 86, 0) 72%);
}

.combat-impact-flash.crit-out::before {
  box-shadow: 0 0 0 2px rgba(255, 188, 86, 0.65) inset, 0 0 22px rgba(255, 188, 86, 0.5);
  background: radial-gradient(circle at 50% 50%, rgba(255, 233, 180, 0.35), rgba(255, 188, 86, 0) 72%);
}

.combat-impact-flash.incoming,
.combat-impact-flash.pvp-in {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 0 0 24px rgba(255, 145, 186, 0.34);
  background: radial-gradient(circle at 50% 50%, rgba(255, 145, 186, 0.18), rgba(255, 145, 186, 0) 72%);
}

.combat-impact-flash.incoming::before,
.combat-impact-flash.pvp-in::before {
  box-shadow: 0 0 0 2px rgba(255, 200, 227, 0.55) inset, 0 0 20px rgba(255, 145, 186, 0.4);
  background: radial-gradient(circle at 50% 50%, rgba(255, 230, 243, 0.28), rgba(255, 145, 186, 0) 72%);
}

@keyframes combatImpactFlash {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  25% {
    opacity: 1;
    transform: scale(1.01);
  }
  100% {
    opacity: 0;
    transform: scale(1.015);
  }
}

@keyframes combatImpactPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4);
  }
}

.npc,
.arena-player {
  position: relative;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(22, 23, 51, 0.94), rgba(11, 15, 31, 0.96)),
    var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow:
    inset 0 1px 0 rgba(201, 220, 255, 0.04),
    0 0 0 1px rgba(121, 100, 255, 0.05),
    0 18px 40px rgba(3, 6, 18, 0.34),
    0 0 24px rgba(88, 201, 255, 0.04),
    0 0 36px rgba(140, 109, 255, 0.05);
  backdrop-filter: blur(8px);
}

.panel::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(88, 201, 255, 0.5) 18%, rgba(255, 111, 216, 0.4) 52%, rgba(111, 246, 216, 0.45) 84%, transparent 100%);
  opacity: 0.9;
}

.panel::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 74px;
  height: 16px;
  border: 1px solid rgba(126, 185, 255, 0.18);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 10px 0 0;
  opacity: 0.7;
  pointer-events: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  color: var(--text-strong);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(88, 201, 255, 0.12),
    0 0 24px rgba(140, 109, 255, 0.08);
}

.panel-toggle-btn {
  background: rgba(25, 31, 63, 0.92);
  border-color: var(--panel-border-strong);
  padding: 6px 10px;
  font-size: 13px;
  box-shadow: 0 0 12px rgba(88, 201, 255, 0.06);
}

.sector-nav-bar {
  display: block;
  padding-top: 12px;
  padding-bottom: 12px;
}

.arena-jump-bar {
  margin-top: 14px;
  margin-bottom: 12px;
}

.sector-nav-toggle {
  width: 100%;
  min-height: 46px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 30px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(111, 246, 216, 0.18),
    0 0 28px rgba(88, 201, 255, 0.08);
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.connection-status {
  margin: -2px 0 12px;
  border: 1px solid var(--panel-border);
  background: rgba(18, 21, 44, 0.88);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  box-shadow: 0 0 18px rgba(88, 201, 255, 0.04);
}

.connection-status.hidden {
  display: none;
}

.connection-status.warn {
  border-color: rgba(255, 126, 167, 0.35);
  background: rgba(58, 18, 31, 0.35);
  color: #ffd0dd;
}

.connection-status.info {
  border-color: rgba(88, 201, 255, 0.38);
  background: rgba(15, 48, 78, 0.3);
  color: #cceeff;
}

.connection-status.success {
  border-color: rgba(103, 226, 173, 0.36);
  background: rgba(14, 54, 35, 0.34);
  color: #d7ffe9;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-install-row {
  margin-top: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.auth-mode-tabs {
  margin-bottom: 12px;
}

.auth-row-single {
  grid-template-columns: 1fr !important;
}

#loginPanel label {
  display: block;
  margin: 10px 0 6px;
}

#loginPanel .auth-row {
  margin-bottom: 8px;
}

.login-actions-row {
  margin-top: 10px;
  gap: 12px;
}

.login-install-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

input,
select,
textarea {
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  font-size: 16px;
}

input,
select {
  background: rgba(9, 14, 31, 0.92);
  color: var(--text);
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(193, 216, 255, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(115, 195, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(115, 195, 255, 0.14),
    0 0 18px rgba(88, 201, 255, 0.12);
}

button {
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  font-size: 15px;
  background: linear-gradient(180deg, rgba(39, 70, 132, 0.95), rgba(23, 47, 96, 0.95));
  color: var(--text-strong);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(221, 235, 255, 0.08),
    0 0 0 1px rgba(88, 201, 255, 0.06),
    0 0 16px rgba(88, 201, 255, 0.05);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:hover {
  background: linear-gradient(180deg, rgba(58, 97, 178, 0.96), rgba(29, 60, 117, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(221, 235, 255, 0.08),
    0 0 0 1px rgba(88, 201, 255, 0.08),
    0 0 24px rgba(88, 201, 255, 0.1),
    0 0 32px rgba(140, 109, 255, 0.08);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.actions {
  margin-top: 12px;
  flex-wrap: wrap;
}

.auth-reset-copy {
  margin: 0 0 18px;
}

.auth-reset-field {
  margin-bottom: 14px;
}

.auth-reset-field label {
  display: block;
  margin: 0 0 8px;
}

.auth-reset-actions {
  margin-top: 16px;
  align-items: center;
  gap: 12px;
}

.auth-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  color: var(--text);
  text-decoration: none;
  background: rgba(24, 31, 61, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(221, 235, 255, 0.05),
    0 0 0 1px rgba(88, 201, 255, 0.04);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.auth-secondary-btn:hover {
  border-color: rgba(115, 195, 255, 0.5);
  background: rgba(36, 48, 92, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(221, 235, 255, 0.07),
    0 0 0 1px rgba(88, 201, 255, 0.08),
    0 0 20px rgba(88, 201, 255, 0.08);
  transform: translateY(-1px);
}

.panel h3 {
  margin: 14px 0 8px;
  font-size: 16px;
  color: var(--muted);
}

.loadout-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 10px;
  align-items: center;
}

.loadout-grid label {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

#craftingBlueprintsBox,
#craftingUpgradesBox {
  display: grid;
  gap: 10px;
}

.craft-recommend-card {
  border: 1px solid rgba(112, 158, 255, 0.4);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(34, 35, 78, 0.78), rgba(11, 14, 31, 0.96));
  box-shadow:
    0 14px 32px rgba(7, 10, 26, 0.24),
    0 0 20px rgba(88, 201, 255, 0.05),
    inset 0 1px 0 rgba(220, 231, 255, 0.04);
}

.craft-recommend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.craft-impact-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.craft-impact-row-secondary {
  margin-top: 10px;
}

.craft-impact-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(112, 158, 255, 0.26);
  background: rgba(28, 35, 73, 0.84);
  color: #d7e7ff;
}

.craft-impact-pill.tone-good {
  border-color: rgba(114, 243, 183, 0.35);
  background: rgba(17, 62, 48, 0.82);
  color: #bdf8de;
}

.craft-impact-pill.tone-accent {
  border-color: rgba(88, 201, 255, 0.38);
  background: rgba(20, 42, 79, 0.82);
  color: #d7e7ff;
}

.craft-impact-pill.tone-neutral {
  border-color: rgba(125, 141, 170, 0.35);
  background: rgba(28, 35, 49, 0.82);
  color: #d8dfec;
}

.craft-impact-text {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.craft-recommend-title {
  margin-top: 10px;
  color: #f7fbff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(88, 201, 255, 0.1),
    0 0 24px rgba(140, 109, 255, 0.08);
}

.craft-item {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(15, 19, 42, 0.98), rgba(10, 14, 29, 0.98));
}

.craft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.craft-meta,
.craft-cost {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.craft-summary {
  margin-top: 8px;
  width: 100%;
  display: block;
  border: 1px solid rgba(92, 118, 186, 0.38);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(13, 19, 41, 0.82);
}

.craft-summary.compact {
  margin-top: 6px;
}

.craft-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid rgba(34, 49, 74, 0.8);
}

.craft-summary-row:first-child {
  border-top: 0;
}

.craft-summary-label {
  color: #9fb3cf;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28px;
}

.craft-summary-value {
  color: #edf5ff;
  font-size: 14px;
  text-align: right;
}

.craft-summary.compact .craft-summary-row {
  padding: 6px 8px;
}

.craft-summary.compact .craft-summary-label {
  font-size: 11px;
}

.craft-summary.compact .craft-summary-value {
  font-size: 13px;
}

.mastery-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.mastery-progress-block {
  width: min(100%, 420px);
  border: 1px solid rgba(86, 108, 156, 0.42);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 28, 57, 0.88), rgba(12, 19, 39, 0.82));
  padding: 10px 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.mastery-progress-block.claimed {
  border-color: rgba(77, 175, 133, 0.46);
  background: linear-gradient(180deg, rgba(18, 39, 33, 0.62), rgba(11, 22, 24, 0.78));
}

.mastery-progress-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mastery-progress-copy {
  margin-top: 8px;
  color: #b7c8e4;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: right;
}

.mastery-progress-rewards {
  margin-top: 8px;
  justify-content: flex-end;
}

.craft-summary.economy-track-currency {
  border-color: rgba(70, 141, 234, 0.7);
  background: linear-gradient(180deg, rgba(20, 38, 68, 0.9), rgba(12, 22, 38, 0.82));
  box-shadow: inset 0 0 0 1px rgba(70, 141, 234, 0.08);
}

.craft-summary.economy-track-material {
  border-color: rgba(210, 154, 72, 0.72);
  background: linear-gradient(180deg, rgba(45, 32, 14, 0.72), rgba(12, 22, 38, 0.82));
  box-shadow: inset 0 0 0 1px rgba(210, 154, 72, 0.08);
}

.craft-summary.economy-track-currency .craft-summary-label {
  color: #a9c8f6;
}

.craft-summary.economy-track-material .craft-summary-label {
  color: #e0bf8c;
}

.craft-btn {
  margin-top: 8px;
}

.craft-status {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.craft-status.owned {
  background: rgba(123, 243, 200, 0.18);
  color: #9ff9dc;
}

.craft-status.craftable {
  background: rgba(111, 160, 255, 0.22);
  color: #bed7ff;
}

.craft-status.missing {
  background: rgba(255, 108, 138, 0.2);
  color: #ffb6c5;
}

.craft-breakdown {
  margin-top: 8px;
  border: 1px solid rgba(92, 118, 186, 0.34);
  border-radius: 10px;
  overflow: hidden;
}

.craft-breakdown-head,
.craft-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.8fr));
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}

.craft-breakdown-head {
  background: rgba(22, 26, 56, 0.92);
  color: #c9def9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.craft-breakdown-row {
  border-top: 1px solid rgba(34, 49, 74, 0.8);
  color: #c2d2e7;
  font-size: 13px;
}

.craft-breakdown-row.ready {
  background: rgba(10, 40, 36, 0.32);
}

.craft-breakdown-row.missing {
  background: rgba(58, 20, 41, 0.26);
}

.craft-breakdown-name {
  font-weight: 700;
  color: #edf5ff;
}

.craft-breakdown-stat {
  text-align: right;
}

.craft-breakdown-stat strong {
  color: #ffffff;
}

.arena-jump-controls {
  margin-top: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.arena-controls {
  margin-top: 12px;
  justify-content: center;
}

.arena-controls button {
  min-width: 130px;
}

.cooldown-wrap {
  margin-top: 10px;
}

.cooldown-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #1c2a3f;
}

.cooldown-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #4bc1ff, #7bf3c8);
}

.cooldown-wrap #attackCooldownText {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ship-panel {
  grid-column: span 1;
  min-width: 0;
}

.arena-panel {
  grid-column: span 1;
  min-width: 0;
}

.arena-ammo-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.arena-currency-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.arena-currency-card {
  border: 1px solid rgba(92, 118, 186, 0.36);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 19, 41, 0.78);
  display: grid;
  gap: 2px;
  box-shadow: inset 0 1px 0 rgba(208, 223, 255, 0.03), 0 0 14px rgba(88, 201, 255, 0.04);
}

.arena-currency-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.arena-currency-card strong {
  font-size: 16px;
  color: #eaf3ff;
}

.action-bar-wrap {
  margin-bottom: 10px;
}

.action-bar-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.action-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.action-slot {
  border: 1px solid rgba(91, 119, 182, 0.32);
  border-radius: 10px;
  background: rgba(12, 17, 36, 0.82);
  padding: 6px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(212, 227, 255, 0.03);
}

.action-slot.empty {
  opacity: 0.75;
}

.action-slot.active {
  border-color: rgba(255, 210, 107, 0.45);
  background: rgba(255, 210, 107, 0.08);
}

.action-slot.cooldown {
  border-color: rgba(111, 160, 255, 0.35);
}

.action-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.action-slot-label {
  font-size: 11px;
  color: #a9bfdd;
  font-weight: 700;
}

.action-slot-clear {
  border-radius: 6px;
  padding: 1px 6px;
  min-height: auto;
  line-height: 1.1;
  font-size: 11px;
  background: rgba(255, 95, 127, 0.08);
  border-color: rgba(255, 95, 127, 0.3);
  color: #ffbfd0;
}

.action-slot-btn {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.15;
}

.action-slot-btn.active {
  border-color: rgba(255, 210, 107, 0.5);
  background: rgba(255, 210, 107, 0.14);
  color: #ffe3a8;
}

.action-slot-btn.cooldown {
  border-color: rgba(111, 160, 255, 0.45);
}

.action-slot-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #9fb6d5;
  text-align: center;
  min-height: 14px;
}

.arena-ammo-warning {
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 13px;
}

.arena-ammo-warning.danger {
  color: #ffd3dc;
  border: 1px solid rgba(255, 108, 138, 0.7);
  background: rgba(255, 108, 138, 0.14);
}

.arena-ammo-warning.warn {
  color: #ffe1a5;
  border: 1px solid rgba(255, 208, 109, 0.65);
  background: rgba(255, 208, 109, 0.12);
}

.arena-ammo-btn {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(89, 124, 198, 0.36);
  background: rgba(19, 28, 60, 0.92);
  color: #d8e3f5;
  font-size: 12px;
}

.arena-ammo-btn.active {
  border-color: #59f2c3;
  background: rgba(89, 242, 195, 0.2);
  color: #bfffe8;
}

.arena-chip {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(111, 160, 255, 0.18);
  color: #bed7ff;
}

.shieldbar {
  width: 100%;
  background: rgba(18, 20, 44, 0.95);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.shieldbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
}

.log-panel {
  grid-column: span 2;
}

.grid.ship-collapsed .ship-panel,
.grid.log-collapsed .log-panel {
  grid-column: span 2;
}

.grid.ship-collapsed .arena-panel {
  grid-column: span 2;
}

.ship-panel.collapsed,
.log-panel.collapsed {
  padding-bottom: 12px;
}

.ship-panel.collapsed > :not(.ship-head),
.log-panel.collapsed > :not(.panel-head) {
  display: none !important;
}

.ship-panel.collapsed .ship-head,
.log-panel.collapsed .panel-head {
  margin-bottom: 0;
}

.ship-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ship-head h2 {
  margin: 0;
  color: var(--text-strong);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(88, 201, 255, 0.12),
    0 0 22px rgba(140, 109, 255, 0.08);
}

.ship-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ship-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.ship-tabs button {
  background: rgba(20, 24, 53, 0.94);
  border-color: rgba(92, 118, 186, 0.42);
  position: relative;
  overflow: hidden;
}

.ship-tabs button.active {
  background: linear-gradient(180deg, rgba(57, 91, 170, 0.95), rgba(37, 59, 118, 0.95));
  border-color: rgba(126, 185, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(111, 246, 216, 0.08),
    0 0 18px rgba(88, 201, 255, 0.08),
    0 0 30px rgba(140, 109, 255, 0.08);
}

.ship-tabs button::before,
.ship-subtabs button::before,
.equip-tabs button::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 201, 255, 0.9), rgba(140, 109, 255, 0.8), rgba(111, 246, 216, 0.9));
  opacity: 0;
  transition: opacity 160ms ease;
}

.ship-tabs button.active::before,
.ship-subtabs button.active::before,
.equip-tabs button.active::before {
  opacity: 1;
}

.ship-subtabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.ship-subtabs.compact {
  gap: 6px;
  margin-top: -2px;
}

.ship-subtabs.hidden {
  display: none;
}

.ship-subtabs button {
  background: rgba(16, 20, 44, 0.94);
  border-color: rgba(80, 103, 166, 0.42);
  position: relative;
  overflow: hidden;
}

.ship-subtabs button.active {
  background: linear-gradient(180deg, rgba(49, 80, 149, 0.95), rgba(29, 48, 94, 0.95));
  border-color: rgba(126, 185, 255, 0.56);
  box-shadow:
    0 0 0 1px rgba(111, 246, 216, 0.06),
    0 0 16px rgba(88, 201, 255, 0.08);
}

.ship-tab {
  display: none;
  min-width: 0;
}

.ship-tab.active {
  display: block;
}

.ship-subtab-panel {
  display: none;
}

.ship-subtab-panel.active {
  display: block;
  min-width: 0;
}

.mission-subpanel {
  display: none;
}

.mission-subpanel.active {
  display: block;
}

#shipStatsBox {
  overflow-x: auto;
}

#sessionEconomyBox {
  margin-bottom: 8px;
  overflow-x: auto;
}

.stats-empty-cell {
  color: #8fa8c8;
  text-align: center;
  font-style: italic;
}

.stats-value {
  display: inline-block;
}

.stats-value.numeric {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}

.stats-value.key {
  font-weight: 800;
  color: #f8fbff;
  text-shadow: 0 0 16px rgba(100, 116, 255, 0.14);
}

.stats-value.tone-good {
  color: #bffce6;
}

.stats-value.tone-danger {
  color: #ffd0d9;
}

.stats-value.tone-warning {
  color: #ffe2ae;
}

.stats-value.tone-accent {
  color: #d9ebff;
}

.stats-badge,
.stats-impact {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-right: 4px;
  white-space: nowrap;
}

.stats-badge.threat,
.stats-badge.priority,
.stats-impact.neutral {
  color: #d6e5ff;
  background: rgba(88, 129, 228, 0.16);
  border: 1px solid rgba(103, 151, 255, 0.34);
}

.stats-badge.danger,
.stats-impact.warning {
  color: #ffb6c5;
  background: rgba(255, 78, 116, 0.18);
  border: 1px solid rgba(255, 78, 116, 0.35);
}

.stats-badge.dead {
  color: #ffd5de;
  background: rgba(216, 90, 117, 0.18);
  border: 1px solid rgba(216, 90, 117, 0.45);
}

.stats-badge.stable,
.stats-impact.good {
  color: #cbffea;
  background: rgba(111, 246, 216, 0.12);
  border: 1px solid rgba(111, 246, 216, 0.34);
}

.stats-impact.accent {
  color: #d9ebff;
  background: rgba(111, 160, 255, 0.12);
  border: 1px solid rgba(111, 160, 255, 0.35);
}

.footer-stats-panel h2 {
  margin: 0 0 10px;
}

.footer-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.footer-stat-card {
  border: 1px solid rgba(92, 118, 186, 0.36);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(15, 19, 41, 0.78);
  display: grid;
  gap: 4px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(208, 223, 255, 0.03), 0 0 16px rgba(140, 109, 255, 0.05);
}

.footer-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-stat-value {
  color: #eaf3ff;
  font-size: 1.2rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

#shipVisualBox {
  margin: 4px 0 10px;
}

.ship-visual-wrap {
  border: 1px solid rgba(92, 118, 186, 0.34);
  border-radius: 12px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 12%, rgba(140, 109, 255, 0.2), transparent 28%),
    radial-gradient(circle at 20% 76%, rgba(88, 201, 255, 0.16), transparent 24%),
    radial-gradient(circle at 82% 32%, rgba(255, 111, 216, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(21, 23, 49, 0.96), rgba(10, 14, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(214, 226, 255, 0.04),
    0 0 26px rgba(88, 201, 255, 0.06),
    0 0 34px rgba(140, 109, 255, 0.07);
}

.ship-visual-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ship-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.ship-hull {
  fill: #394e7d;
  stroke: #93b0eb;
  stroke-width: 2;
}

.ship-cockpit {
  fill: #6fb7ff;
  opacity: 0.92;
  filter: drop-shadow(0 0 8px rgba(88, 201, 255, 0.35));
}

.ship-shield-ring {
  fill: none;
  stroke: rgba(111, 115, 255, 0.34);
  stroke-width: 6;
}

.ship-engine-core {
  fill: #3a5a82;
}

.ship-engine-glow {
  fill: rgba(111, 246, 216, 0.18);
  filter: drop-shadow(0 0 12px rgba(111, 246, 216, 0.3));
}

.ship-weapon-left,
.ship-weapon-right {
  fill: #4772a8;
}

.tier-1 {
  filter: saturate(0.85);
}

.tier-2 {
  filter: saturate(1);
}

.tier-3 {
  filter: saturate(1.1) brightness(1.05);
}

.tier-4 {
  filter: saturate(1.2) brightness(1.08);
}

.tier-5 {
  filter: saturate(1.3) brightness(1.13);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(76, 93, 145, 0.52);
}

.stats-table td:first-child {
  width: 34%;
  color: #a9bfdd;
}

.stats-table th:nth-child(2),
.stats-table td:nth-child(2) {
  width: 46%;
}

.stats-table th:nth-child(3),
.stats-table td:nth-child(3) {
  width: 20%;
}

.stats-table th:last-child,
.stats-table td:last-child {
  text-align: right;
}

.stats-table th {
  color: #f0f6ff;
  background: rgba(21, 26, 56, 0.95);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
}

.line-source-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #3a5378;
  background: #122033;
  color: #dcecff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.line-source-chip.tone-standard {
  border-color: #5879a6;
  background: rgba(84, 122, 174, 0.22);
  color: #cfe4ff;
}

.line-source-chip.tone-quest {
  border-color: #3f9a78;
  background: rgba(48, 135, 98, 0.24);
  color: #c7ffe5;
}

.line-source-chip.tone-event {
  border-color: #8f66d7;
  background: rgba(113, 73, 188, 0.24);
  color: #ead9ff;
}

.line-source-chip.tone-boss {
  border-color: #d38a3d;
  background: rgba(161, 92, 28, 0.24);
  color: #ffe0b8;
}

.line-passive-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.line-passive-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(72, 93, 124, 0.62);
  background: rgba(20, 31, 49, 0.88);
  color: #dce8f8;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.line-passive-chip.tone-label {
  border-color: #5e7aa8;
  background: rgba(71, 104, 154, 0.22);
  color: #d5e7ff;
}

.line-passive-chip.tone-stable {
  border-color: rgba(128, 149, 182, 0.42);
  background: rgba(54, 70, 95, 0.26);
  color: #dce6f4;
}

.line-passive-chip.tone-tempo {
  border-color: rgba(111, 170, 255, 0.42);
  background: rgba(36, 69, 118, 0.24);
  color: #d7e8ff;
}

.line-passive-chip.tone-crit {
  border-color: rgba(255, 122, 160, 0.42);
  background: rgba(117, 38, 65, 0.24);
  color: #ffd8e4;
}

.line-passive-chip.tone-burst {
  border-color: rgba(255, 173, 102, 0.42);
  background: rgba(120, 66, 24, 0.24);
  color: #ffe0bf;
}

.line-passive-chip.tone-control {
  border-color: rgba(136, 111, 255, 0.42);
  background: rgba(63, 45, 126, 0.24);
  color: #e2d8ff;
}

.line-passive-chip.tone-hp {
  border-color: rgba(89, 242, 195, 0.45);
  background: rgba(31, 112, 91, 0.22);
  color: #bff8e6;
}

.line-passive-chip.tone-dr {
  border-color: rgba(255, 179, 102, 0.42);
  background: rgba(120, 74, 28, 0.24);
  color: #ffe0b7;
}

.line-passive-chip.tone-regen {
  border-color: rgba(117, 226, 169, 0.42);
  background: rgba(35, 101, 67, 0.24);
  color: #d2ffe5;
}

.line-passive-chip.tone-reload {
  border-color: rgba(110, 170, 255, 0.42);
  background: rgba(36, 69, 118, 0.24);
  color: #d7e8ff;
}

.line-passive-chip.tone-neutral {
  border-color: rgba(140, 157, 186, 0.4);
  background: rgba(42, 57, 83, 0.24);
  color: #dbe7f6;
}

.ship-stats-grid {
  display: grid;
  gap: 16px;
}

.faq-topic {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 18, 38, 0.9), rgba(18, 24, 48, 0.82));
  box-shadow: 0 0 0 1px rgba(111, 246, 216, 0.03), 0 18px 34px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.faq-topic[open] {
  border-color: var(--panel-border-strong);
  box-shadow: 0 0 0 1px rgba(88, 201, 255, 0.06), 0 0 22px rgba(88, 201, 255, 0.08), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.faq-topic-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
}

.faq-topic-summary::-webkit-details-marker {
  display: none;
}

.faq-topic-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.faq-topic-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 14px rgba(88, 201, 255, 0.35);
}

.faq-topic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.faq-topic-toggle::before {
  content: "+";
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.faq-topic[open] .faq-topic-toggle::before {
  content: "−";
}

.faq-topic[open] .faq-topic-toggle {
  color: var(--text);
}

.faq-topic-body {
  padding: 0 18px 18px;
}

.faq-topic-body .ship-stats-category {
  margin: 0;
}

@media (max-width: 720px) {
  .stats-table th,
  .stats-table td {
    padding: 7px 8px;
    font-size: 13px;
  }

  .stats-table td:first-child {
    width: 30%;
  }

  .stats-table th:nth-child(2),
  .stats-table td:nth-child(2) {
    width: 48%;
  }

  .stats-table th:nth-child(3),
  .stats-table td:nth-child(3) {
    width: 22%;
  }

  .stats-badge,
  .stats-impact {
    padding: 2px 6px;
    font-size: 10px;
    margin-right: 2px;
  }
}

.ship-stats-category {
  display: grid;
  gap: 8px;
  position: relative;
  padding-top: 2px;
}

.ship-stats-category h4 {
  margin: 0 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f4f8ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
}

.ship-stats-category h4::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  box-shadow:
    0 0 10px rgba(88, 201, 255, 0.25),
    0 0 16px rgba(140, 109, 255, 0.18);
}

.ship-stats-subgrid {
  display: grid;
  gap: 10px;
}

.mission-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.mission-summary-chip {
  border: 1px solid rgba(55, 84, 122, 0.72);
  border-radius: 14px;
  background: rgba(9, 16, 28, 0.52);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  box-shadow: inset 0 1px 0 rgba(213, 226, 255, 0.03);
}

.mission-summary-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8fa8c8;
}

.mission-summary-value {
  color: #eef6ff;
  font-size: 1rem;
  font-weight: 800;
}

.mission-empty {
  border: 1px solid rgba(55, 84, 122, 0.55);
  border-radius: 14px;
  background: rgba(9, 16, 28, 0.34);
  padding: 14px;
  color: #9ab0cb;
  font-style: italic;
}

.compact-panel {
  padding: 10px 12px;
}

.mission-guide {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(55, 84, 122, 0.55);
  border-radius: 12px;
  background: rgba(9, 16, 28, 0.28);
  color: #a9bdd8;
  line-height: 1.45;
}

.admin-tool-card {
  padding: 12px 14px;
  border: 1px solid rgba(55, 84, 122, 0.72);
  border-radius: 16px;
  background: rgba(9, 16, 28, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(214, 226, 255, 0.03),
    0 0 20px rgba(88, 201, 255, 0.04);
}

.admin-tool-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-tool-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.admin-tool-form input {
  width: 100%;
  min-width: 0;
}

.admin-tool-form textarea,
.admin-tool-form select {
  width: 100%;
  min-width: 0;
}

.admin-tool-form button {
  white-space: nowrap;
}

.admin-tool-form-stack {
  grid-template-columns: 1fr;
}

.admin-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dce7f7;
}

.admin-check-row input {
  width: auto;
}

.admin-list-card {
  padding: 10px 12px;
}

.admin-list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(55, 84, 122, 0.35);
}

.admin-list-row:last-child {
  border-bottom: 0;
}

.admin-list-meta {
  color: #9ab0cb;
  margin-top: 4px;
  line-height: 1.4;
}

.admin-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-field-block {
  display: grid;
  gap: 6px;
}

.admin-field-block span {
  color: #9ab0cb;
  font-size: 0.92rem;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  .admin-tool-form,
  .admin-tool-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-layout {
  max-width: 1480px;
}

.admin-hero {
  margin-bottom: 14px;
}

.admin-login-panel {
  max-width: 860px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-main-panel {
  display: grid;
  gap: 14px;
}

.admin-head-actions {
  align-items: center;
}

.admin-identity {
  color: #9ab0cb;
  font-size: 0.95rem;
}

.admin-subtabs {
  margin-top: 6px;
}

.mission-card {
  position: relative;
  border: 1px solid rgba(55, 84, 122, 0.72);
  border-radius: 16px;
  background: rgba(9, 16, 28, 0.42);
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.mission-card.compact {
  gap: 8px;
}

.mission-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mission-card-head h4 {
  margin: 0;
}

.mission-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mission-card-goal {
  color: #d7e6fb;
  line-height: 1.35;
}

.mission-progress-row,
.mission-card-foot,
.mission-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mission-progress-row strong {
  color: #eef6ff;
}

.mission-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(34, 50, 76, 0.92);
  border: 1px solid rgba(76, 111, 163, 0.5);
}

.mission-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #58baff, #7ef0b7);
}

.mission-reward {
  color: #bffce6;
  font-weight: 700;
}

.mission-status-label {
  color: #8fa8c8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quest-level-group {
  border: 1px solid rgba(55, 84, 122, 0.75);
  border-radius: 16px;
  background: rgba(9, 16, 28, 0.36);
  padding: 10px 12px;
}

.quest-level-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 800;
  color: #9dc4ff;
}

.quest-level-summary::after {
  content: "+";
  font-size: 1rem;
  color: #dbe9ff;
}

.quest-level-group.open .quest-level-summary::after {
  content: "-";
}

.quest-level-summary-meta {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8da5c7;
}

.quest-level-body {
  margin-top: 10px;
}

.quest-level-group .ship-stats-subgrid {
  margin-top: 10px;
}

.quest-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-accept-btn,
.quest-abandon-btn,
.quest-claim-btn {
  min-width: 144px;
}

.ship-stats-category h4 {
  margin: 0 0 2px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #f4f8ff;
  text-transform: uppercase;
}

.inv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid #223348;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #0b1321;
  min-width: 0;
}

.ammo-row {
  align-items: center;
  flex-wrap: wrap;
}

.ammo-buy-amount {
  width: 86px;
}

.shop-credits {
  margin: 0 0 10px;
  color: #bed7ff;
  font-weight: 700;
  background: rgba(111, 160, 255, 0.14);
  border: 1px solid #2a4f86;
  border-radius: 8px;
  padding: 8px 10px;
}

.shop-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.shop-tabs button.active {
  background: #2a4f86;
  border-color: #4f78b3;
}

.shop-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.shop-subtabs button.active {
  background: #2a4f86;
  border-color: #4f78b3;
}

.shop-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.shop-presets-label {
  color: #9fb6d5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.shop-preset-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.shop-preset-btn.active {
  background: #2a4f86;
  border-color: #4f78b3;
}

.shop-section {
  display: none;
}

.shop-section.active {
  display: block;
  min-width: 0;
}

.shop-item-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 19, 41, 0.98), rgba(10, 14, 29, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(214, 226, 255, 0.03),
    0 0 18px rgba(88, 201, 255, 0.04);
}

.shop-item-card.shop-afford {
  border-color: rgba(82, 148, 231, 0.42);
}

.shop-item-card.shop-nope {
  border-color: rgba(255, 95, 127, 0.35);
  background: linear-gradient(0deg, rgba(255, 95, 127, 0.05), rgba(255, 95, 127, 0.05)), #0b1321;
}

.shop-item-actions {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-price-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(111, 160, 255, 0.16);
  color: #cde2ff;
  border: 1px solid rgba(111, 160, 255, 0.28);
}

.shop-total-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(111, 160, 255, 0.2);
}

.shop-total-badge.afford {
  color: #bfe1ff;
  background: rgba(111, 160, 255, 0.12);
  border-color: rgba(111, 160, 255, 0.28);
}

.shop-total-badge.nope {
  color: #ffb0bf;
  background: rgba(255, 95, 127, 0.12);
  border-color: rgba(255, 95, 127, 0.28);
}

.shop-role-chip {
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.shop-role-chip.role-combat {
  background: rgba(255, 136, 105, 0.16);
  color: #ffc3b0;
}

.shop-role-chip.role-defense {
  background: rgba(111, 160, 255, 0.16);
  color: #c4dcff;
}

.shop-role-chip.role-farming {
  background: rgba(123, 243, 200, 0.14);
  color: #aef8e3;
}

.shop-item-submeta {
  font-size: 0.88rem;
  color: #90b4db;
}

.consumable-buy-amount {
  width: 72px;
}

.consumable-row {
  align-items: center;
  flex-wrap: wrap;
}

.hint-inline {
  color: #9fb6d5;
  font-size: 12px;
  margin-left: 6px;
}

.inventory-item-row {
  align-items: center;
  gap: 12px;
}

.inventory-item-main {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.resource-item-row {
  align-items: stretch;
}

.inventory-item-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

.inventory-item-meta {
  margin-top: 4px;
  color: #a9bfdd;
  font-size: 0.95rem;
}

.consumable-pin-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.consumable-pin-label {
  font-size: 12px;
  color: #9fb6d5;
  font-weight: 700;
}

.consumable-pin-btn {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  min-height: auto;
  line-height: 1.1;
  border: 1px solid #2b4567;
  background: rgba(72, 104, 160, 0.12);
}

.consumable-pin-btn.active {
  border-color: rgba(89, 242, 195, 0.45);
  background: rgba(89, 242, 195, 0.16);
  color: #bfffe8;
}

.consumable-pin-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #91e5ca;
}

.inventory-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inv-stock-panel {
  min-width: 88px;
  border-radius: 10px;
  border: 1px solid #29456a;
  background: rgba(74, 123, 194, 0.12);
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
}

.inv-stock-panel span {
  color: #9fb6d5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.inv-stock-panel strong {
  color: #e8f3ff;
  font-size: 1.2rem;
}

.inv-stock-panel.low {
  border-color: rgba(255, 210, 107, 0.4);
  background: rgba(255, 210, 107, 0.12);
}

.inv-stock-panel.low strong {
  color: #ffd88a;
}

.inv-stock-panel.zero {
  border-color: rgba(255, 95, 127, 0.45);
  background: rgba(255, 95, 127, 0.12);
}

.inv-stock-panel.zero strong {
  color: #ff9fb3;
}

.arena-consumable-effects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 2px;
}

.arena-consumable-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}

.arena-consumable-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2b4567;
  background: rgba(72, 104, 160, 0.14);
  color: #d5e7ff;
  font-size: 12px;
  font-weight: 700;
}

.arena-consumable-btn.active {
  border-color: rgba(255, 210, 107, 0.5);
  background: rgba(255, 210, 107, 0.14);
  color: #ffe4a8;
}

.arena-consumable-btn:disabled {
  opacity: 0.65;
}

.effect-chip {
  background: rgba(255, 210, 107, 0.16);
  color: #ffd88a;
  border: 1px solid rgba(255, 210, 107, 0.3);
}

.inv-module-group {
  margin-bottom: 10px;
}

.inv-module-group h4 {
  margin: 8px 0;
  color: #a9bfdd;
}

#equippedCardsBox {
  display: grid;
  gap: 10px;
}

.equip-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.equip-tabs button.active {
  background: linear-gradient(180deg, rgba(57, 91, 170, 0.95), rgba(37, 59, 118, 0.95));
  border-color: rgba(126, 185, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(111, 246, 216, 0.08),
    0 0 18px rgba(88, 201, 255, 0.08),
    0 0 30px rgba(140, 109, 255, 0.08);
}

.equip-card {
  position: relative;
  border: 1px solid #23364c;
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(15, 19, 41, 0.98), rgba(10, 14, 29, 0.98));
  margin-bottom: 10px;
  overflow: hidden;
}

.equip-card::before,
.loadout-summary-card::before,
.loadout-set-card::before,
.craft-item::before,
.mission-card::before,
.shop-item-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet), var(--accent-teal));
  opacity: 0.9;
}

.equip-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.equip-chip {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(111, 160, 255, 0.18);
  color: #bed7ff;
}

.equip-card-stats {
  color: #a9bfdd;
  margin: 8px 0;
}

.equip-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.equip-card-actions label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#loadoutInfo {
  display: grid;
  gap: 10px;
}

.loadout-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.loadout-summary-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(79, 120, 179, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 37, 65, 0.28), rgba(10, 18, 32, 0.88));
  overflow: hidden;
}

.loadout-summary-label {
  color: #d9ebff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loadout-summary-copy {
  color: var(--muted);
}

.build-archetype-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.build-archetype-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(72, 93, 124, 0.62);
  background: rgba(20, 31, 49, 0.88);
  color: #dce8f8;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(213, 226, 255, 0.03);
}

.build-archetype-chip.tone-balanced {
  border-color: rgba(140, 157, 186, 0.4);
  background: rgba(42, 57, 83, 0.24);
  color: #dbe7f6;
}

.build-archetype-chip.tone-aggro {
  border-color: rgba(255, 122, 160, 0.42);
  background: rgba(117, 38, 65, 0.24);
  color: #ffd8e4;
}

.build-archetype-chip.tone-boss {
  border-color: rgba(255, 179, 102, 0.42);
  background: rgba(120, 74, 28, 0.24);
  color: #ffe0b7;
}

.build-archetype-chip.tone-quest {
  border-color: #3f9a78;
  background: rgba(48, 135, 98, 0.24);
  color: #c7ffe5;
}

.build-archetype-chip.tone-event {
  border-color: #8f66d7;
  background: rgba(113, 73, 188, 0.24);
  color: #ead9ff;
}

.build-archetype-chip.tone-mixed,
.build-archetype-chip.tone-neutral {
  border-color: rgba(140, 157, 186, 0.4);
  background: rgba(42, 57, 83, 0.24);
  color: #dbe7f6;
}

.build-archetype-chip.tone-detail {
  border-color: rgba(93, 145, 225, 0.32);
  background: rgba(17, 37, 65, 0.84);
  color: #d7e7ff;
}

.loadout-set-card {
  position: relative;
  border: 1px solid rgba(79, 120, 179, 0.32);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(17, 37, 65, 0.38), rgba(10, 18, 32, 0.92));
  overflow: hidden;
}

.loadout-set-card.complete {
  border-color: rgba(114, 243, 183, 0.38);
  background: linear-gradient(180deg, rgba(17, 62, 48, 0.36), rgba(10, 18, 32, 0.94));
}

.loadout-set-card.pending {
  border-color: rgba(93, 145, 225, 0.34);
}

.loadout-set-card.idle {
  border-color: rgba(125, 141, 170, 0.25);
}

.loadout-set-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.loadout-set-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loadout-set-title {
  margin-top: 4px;
  color: #eff7ff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow:
    0 0 16px rgba(88, 201, 255, 0.08),
    0 0 26px rgba(140, 109, 255, 0.08);
}

.loadout-set-copy {
  margin-top: 6px;
  color: #c8d9ef;
  max-width: 720px;
}

.loadout-set-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(93, 145, 225, 0.32);
  background: rgba(17, 37, 65, 0.8);
  color: #d7e7ff;
}

.loadout-set-state.complete {
  border-color: rgba(114, 243, 183, 0.36);
  background: rgba(17, 62, 48, 0.86);
  color: #c8ffe3;
}

.loadout-set-state.pending {
  border-color: rgba(93, 145, 225, 0.36);
  background: rgba(17, 37, 65, 0.84);
  color: #d7e7ff;
}

.loadout-set-state.idle {
  border-color: rgba(125, 141, 170, 0.26);
  background: rgba(28, 35, 49, 0.84);
  color: #d8dfec;
}

.loadout-set-pill-row,
.loadout-set-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.loadout-set-pill,
.loadout-set-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.loadout-set-pill {
  border: 1px solid rgba(114, 243, 183, 0.26);
  background: rgba(17, 62, 48, 0.78);
  color: #c8ffe3;
}

.loadout-set-pill-row.inline {
  justify-content: flex-end;
}

.loadout-set-pill.tone-label {
  border-color: #5e7aa8;
  background: rgba(71, 104, 154, 0.22);
  color: #d5e7ff;
}

.loadout-set-pill.tone-atk {
  border-color: rgba(255, 122, 160, 0.42);
  background: rgba(117, 38, 65, 0.24);
  color: #ffd8e4;
}

.loadout-set-pill.tone-hp {
  border-color: rgba(89, 242, 195, 0.45);
  background: rgba(31, 112, 91, 0.22);
  color: #bff8e6;
}

.loadout-set-pill.tone-regen {
  border-color: rgba(117, 226, 169, 0.42);
  background: rgba(35, 101, 67, 0.24);
  color: #d2ffe5;
}

.loadout-set-pill.tone-reload {
  border-color: rgba(110, 170, 255, 0.42);
  background: rgba(36, 69, 118, 0.24);
  color: #d7e8ff;
}

.loadout-set-pill.tone-dr {
  border-color: rgba(255, 179, 102, 0.42);
  background: rgba(120, 74, 28, 0.24);
  color: #ffe0b7;
}

.loadout-set-pill.tone-neutral {
  border-color: rgba(140, 157, 186, 0.4);
  background: rgba(42, 57, 83, 0.24);
  color: #dbe7f6;
}

.loadout-set-pill.tone-good {
  border-color: rgba(104, 239, 177, 0.42);
  background: rgba(24, 87, 60, 0.24);
  color: #d4ffe8;
}

.loadout-set-pill.tone-warning {
  border-color: rgba(255, 191, 112, 0.42);
  background: rgba(110, 73, 27, 0.24);
  color: #ffe3bc;
}

.loadout-set-pill.tone-accent {
  border-color: rgba(125, 170, 255, 0.42);
  background: rgba(43, 69, 121, 0.24);
  color: #dce8ff;
}

.loadout-set-chip {
  border: 1px solid rgba(93, 145, 225, 0.3);
  background: rgba(17, 37, 65, 0.78);
  color: #d7e7ff;
}

.loadout-set-chip.matched {
  border-color: rgba(114, 243, 183, 0.24);
  background: rgba(17, 62, 48, 0.72);
  color: #c8ffe3;
}

.loadout-set-chip.missing {
  border-color: rgba(235, 127, 160, 0.28);
  background: rgba(61, 20, 33, 0.78);
  color: #ffd6e3;
}

.loadout-set-block {
  margin-top: 12px;
}

.loadout-set-block-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equip-amount-input {
  width: 90px;
}

@media (max-width: 720px) {
  .action-bar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#arenaBox {
  display: grid;
  gap: 10px;
}

.arena-battlefield {
  --arena-max-size: 760px;
  --planet-size: 66px;
  --player-core-size: 58px;
  position: relative;
  width: 100%;
  max-width: var(--arena-max-size);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 1px solid #243247;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(29, 52, 84, 0.4), rgba(6, 11, 18, 0) 48%),
    linear-gradient(180deg, rgba(6, 12, 22, 0.95), rgba(5, 9, 16, 0.98));
}

.arena-battlefield.crowd-medium {
  --planet-size: 58px;
  --player-core-size: 52px;
}

.arena-battlefield.crowd-heavy {
  --planet-size: 52px;
  --player-core-size: 48px;
}

.arena-battlefield::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px),
    radial-gradient(circle at 71% 12%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px),
    radial-gradient(circle at 63% 74%, rgba(255, 255, 255, 0.25) 0 1px, transparent 1px),
    radial-gradient(circle at 34% 83%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px);
  pointer-events: none;
}

.jump-charge-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 7;
  background:
    radial-gradient(circle at 50% 50%, rgba(72, 146, 255, 0.14), rgba(4, 8, 16, 0.03) 24%, rgba(4, 8, 16, 0.48) 100%);
}

.jump-charge-rings,
.jump-charge-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.jump-charge-rings {
  width: 122px;
  height: 122px;
  border: 2px solid rgba(108, 210, 255, 0.5);
  box-shadow:
    0 0 0 10px rgba(92, 174, 255, 0.06),
    0 0 28px rgba(69, 184, 255, 0.22);
  animation: jumpChargePulse 900ms ease-out infinite;
}

.jump-charge-rings::before,
.jump-charge-rings::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(122, 235, 255, 0.28);
  animation: jumpChargeRing 1600ms ease-out infinite;
}

.jump-charge-rings::after {
  inset: -24px;
  animation-delay: 280ms;
}

.jump-charge-core {
  width: 62px;
  height: 62px;
  background:
    radial-gradient(circle at 50% 45%, rgba(213, 246, 255, 0.95), rgba(103, 201, 255, 0.8) 28%, rgba(40, 88, 185, 0.85) 56%, rgba(11, 20, 45, 0.1) 100%);
  box-shadow:
    0 0 18px rgba(122, 215, 255, 0.52),
    0 0 44px rgba(49, 129, 255, 0.22);
  animation: jumpChargeCore 780ms ease-in-out infinite alternate;
}

.jump-charge-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 82px);
  transform: translateX(-50%);
  min-width: 180px;
  text-align: center;
  color: #e8f7ff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(102, 219, 255, 0.35);
}

.jump-charge-label span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #b4ddff;
  letter-spacing: 0.06em;
}

@keyframes jumpChargePulse {
  0% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.78; }
  100% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

@keyframes jumpChargeRing {
  0% { transform: scale(0.82); opacity: 0.1; }
  55% { opacity: 0.42; }
  100% { transform: scale(1.12); opacity: 0; }
}

@keyframes jumpChargeCore {
  0% { transform: translate(-50%, -50%) scale(0.92); filter: saturate(0.95); }
  100% { transform: translate(-50%, -50%) scale(1.04); filter: saturate(1.2); }
}

.arena-battlefield.empty {
  display: grid;
  place-items: center;
}

.arena-battlefield-empty {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(65, 94, 132, 0.8);
  border-radius: 10px;
  background: rgba(10, 18, 31, 0.8);
  color: #b9cce7;
  font-size: 13px;
  text-align: center;
}

.arena-player-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--player-core-size);
  height: var(--player-core-size);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #d6ecff;
  z-index: 2;
}

.arena-player-core::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(#78ec9a calc(var(--hp-pct, 0) * 1%), rgba(35, 58, 92, 0.82) 0);
  mask: radial-gradient(circle at center, transparent 63%, #000 67%);
  -webkit-mask: radial-gradient(circle at center, transparent 63%, #000 67%);
  z-index: -1;
}

.arena-player-core-icon {
  position: relative;
  width: 19px;
  height: 23px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(184, 236, 255, 0.42));
}

.arena-player-core-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0%, 72% 22%, 88% 58%, 66% 54%, 58% 100%, 42% 100%, 34% 54%, 12% 58%, 28% 22%);
  background: linear-gradient(180deg, #f2fbff 0%, #8fd3ff 38%, #4f8fe2 100%);
  border: 1px solid rgba(230, 247, 255, 0.65);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.22);
}

.arena-player-core-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 11px;
  height: 7px;
  transform: translateX(-50%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  background: linear-gradient(180deg, rgba(148, 235, 255, 0.95), rgba(89, 242, 195, 0.12));
  filter: blur(0.4px);
  opacity: 0.95;
}

.arena-player-core-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}

#arenaBox .npc {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--planet-size);
  height: var(--planet-size);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
  z-index: 3;
}

#arenaBox .npc:hover {
  transform: translate(-50%, -50%) scale(1.03);
}

#arenaBox .npc::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#78ec9a calc(var(--hp-pct, 0) * 1%), rgba(35, 58, 92, 0.82) 0);
  mask: radial-gradient(circle at center, transparent 62%, #000 66%);
  -webkit-mask: radial-gradient(circle at center, transparent 62%, #000 66%);
  z-index: 0;
}

.npc-planet-sprite {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(144, 177, 214, 0.4);
  background-image: var(--planet-bg, var(--planet-fallback));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

.npc.planet-passive .npc-planet-sprite {
  --planet-fallback: radial-gradient(circle at 30% 26%, #d6f4ff 0%, #66bad3 34%, #296a8b 74%);
}

.npc.planet-reactive .npc-planet-sprite {
  --planet-fallback: radial-gradient(circle at 30% 26%, #d9fff6 0%, #5fd9db 34%, #24728e 74%);
}

.npc.planet-aggressive .npc-planet-sprite {
  --planet-fallback: radial-gradient(circle at 30% 26%, #ffd8e0 0%, #ff7b97 36%, #8b2d4f 74%);
}

.npc.planet-rare .npc-planet-sprite {
  --planet-fallback: radial-gradient(circle at 30% 26%, #fff0ce 0%, #ffc674 34%, #8d5a1e 74%);
}

.npc-name-only {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  margin: 0;
  min-width: 58px;
  max-width: 96px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  color: #dbe9ff;
  text-align: center;
  line-height: 1.2;
  background: rgba(9, 16, 28, 0.8);
  border: 1px solid rgba(61, 91, 132, 0.7);
  z-index: 2;
}

.npc-inline-badge.elite {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  color: #ffe4a3;
  background: rgba(130, 80, 16, 0.85);
  border: 1px solid rgba(255, 211, 120, 0.55);
}

.npc-inline-badge.boss {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  color: #ffd5dc;
  background: rgba(116, 20, 44, 0.9);
  border: 1px solid rgba(255, 122, 151, 0.58);
}

#arenaBox .npc.selected {
  filter: drop-shadow(0 0 10px rgba(89, 242, 195, 0.6));
}

#arenaBox .npc.selected::before {
  background: conic-gradient(#59f2c3 calc(var(--hp-pct, 0) * 1%), rgba(35, 58, 92, 0.82) 0);
}

#arenaBox .npc.hostile-engaged .npc-planet-sprite {
  box-shadow: 0 0 0 1px rgba(216, 90, 117, 0.45), 0 0 12px rgba(216, 90, 117, 0.26);
}

#arenaBox .npc.attacker-now .npc-planet-sprite {
  box-shadow: 0 0 0 1px rgba(255, 78, 116, 0.55), 0 0 15px rgba(255, 78, 116, 0.34);
}

#arenaBox .npc.elite-objective .npc-planet-sprite {
  box-shadow:
    0 0 0 1px rgba(255, 214, 118, 0.7),
    0 0 16px rgba(255, 201, 92, 0.28),
    0 0 28px rgba(255, 155, 62, 0.14);
}

#arenaBox .npc.elite-objective::before {
  background: conic-gradient(#ffd36e calc(var(--hp-pct, 0) * 1%), rgba(54, 40, 15, 0.82) 0);
}

#arenaBox .npc.boss-objective .npc-planet-sprite {
  box-shadow:
    0 0 0 1px rgba(255, 132, 156, 0.78),
    0 0 18px rgba(255, 77, 112, 0.34),
    0 0 32px rgba(255, 62, 96, 0.18);
}

#arenaBox .npc.boss-objective::before {
  background: conic-gradient(#ff7b9c calc(var(--hp-pct, 0) * 1%), rgba(58, 18, 29, 0.88) 0);
}

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

.npc-badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.npc-badge.type-passive {
  background: rgba(89, 242, 195, 0.18);
  color: #71ffd8;
}

.npc-badge.type-aggressive {
  background: rgba(255, 108, 138, 0.2);
  color: #ff8ca5;
}

.npc-badge.type-rare {
  background: rgba(255, 208, 109, 0.2);
  color: #ffd77c;
}

.npc-badge.type-combat {
  background: rgba(255, 78, 116, 0.18);
  color: #ffb6c5;
}

.npc-badge.type-stable {
  background: rgba(89, 242, 195, 0.16);
  color: #bffce6;
}

.npc-badge.type-dead {
  background: rgba(216, 90, 117, 0.18);
  color: #ffd3dc;
}

.arena-player {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--player-core-size) + 24px);
  height: calc(var(--player-core-size) + 24px);
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #dbe9ff;
  text-align: center;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(89, 242, 195, 0.45);
  background: radial-gradient(circle at 35% 30%, rgba(171, 227, 255, 0.95), rgba(59, 121, 190, 0.8) 50%, rgba(27, 64, 112, 0.92));
  z-index: 4;
  transition: transform 120ms ease, filter 120ms ease;
}

.arena-player:hover {
  transform: translate(-50%, -50%) scale(1.03);
}

.arena-player::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(#78ec9a calc(var(--hp-pct, 0) * 1%), rgba(35, 58, 92, 0.82) 0);
  mask: radial-gradient(circle at center, transparent 62%, #000 66%);
  -webkit-mask: radial-gradient(circle at center, transparent 62%, #000 66%);
  z-index: -1;
}

.arena-player.selected {
  border-color: #59f2c3;
  box-shadow: 0 0 0 1px rgba(89, 242, 195, 0.28), inset 0 0 0 999px rgba(89, 242, 195, 0.05);
}

.arena-player.blocked {
  border-style: dashed;
  filter: saturate(0.7);
}

.arena-player .arena-player-core-ring {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(89, 242, 195, 0.6);
  border-radius: 50%;
  margin-bottom: 2px;
  background: #b8edff;
}

.arena-player-name-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.arena-player-name-line strong {
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-player-meta {
  font-size: 10px;
  color: #bfd2ea;
  line-height: 1.1;
  max-width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-player.state-combat {
  border-color: rgba(255, 108, 138, 0.65);
}

.arena-player.state-dead {
  border-color: rgba(216, 90, 117, 0.55);
  opacity: 0.7;
}

.arena-player-hpbar {
  margin-top: 5px;
  margin-bottom: 4px;
  width: 100%;
}

.arena-player.state-dead .arena-player-hpbar span {
  background: linear-gradient(90deg, #6e768f, #4f5568);
}

.arena-player-target-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.arena-player-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.npc-aggro-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #ffb7c5;
}

.npc-aggro-badge {
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: rgba(255, 78, 116, 0.18);
  color: #ffb6c5;
  border: 1px solid rgba(255, 78, 116, 0.35);
}

.float-layer {
  position: relative;
  height: 0;
  overflow: visible;
}

.float-text {
  position: absolute;
  right: 12px;
  bottom: 0;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(0, 0, 0, 0.6);
  -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.8);
  animation: floatUp 1800ms cubic-bezier(0.2, 0.78, 0.2, 1) forwards;
  pointer-events: none;
  z-index: 9999;
}

.float-text.world-float {
  position: fixed;
  right: auto;
  bottom: auto;
}

.float-text.dmg-out {
  color: #ff8ca5;
}

.float-text.crit-out {
  color: #ffd66e;
  font-size: 18px;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 186, 72, 0.75);
  animation-duration: 2000ms;
}

.float-text.dmg-in {
  color: #ffbe7b;
}

.float-text.loot {
  color: #7bf3c8;
  font-size: 17px;
  animation-duration: 2300ms;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.98);
  }
  72% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(-58px) scale(1.03);
  }
}

.hpbar {
  width: 100%;
  background: #1c2a3f;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}

.hpbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3fd27d, #c4ef59);
}

.xpbar {
  width: 100%;
  background: #1e233f;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
  margin-top: 5px;
}

.xpbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5aa8ff, #9f8cff);
}

#logList {
  margin: 0;
  padding-left: 18px;
  max-height: 240px;
  overflow: auto;
}

#logList li {
  margin-bottom: 6px;
  color: var(--muted);
}

.log-filters {
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.log-filters button {
  padding: 6px 10px;
  font-size: 13px;
}

.log-filters button.active {
  background: #2a4f86;
  border-color: #4f78b3;
}

.log-badge {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.log-badge.combat {
  background: rgba(255, 142, 121, 0.18);
  color: #ffb7a8;
}

.log-badge.reward {
  background: rgba(123, 243, 200, 0.18);
  color: #9ff9dc;
}

.log-badge.system {
  background: rgba(111, 160, 255, 0.18);
  color: #bed7ff;
}

.threat-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid rgba(216, 90, 117, 0.5);
  background: rgba(216, 90, 117, 0.12);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 7px;
}

.threat-name {
  font-weight: 700;
}

.threat-chip.top-priority {
  border-color: rgba(255, 197, 84, 0.75);
  background: rgba(255, 197, 84, 0.18);
}

.threat-priority {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(111, 160, 255, 0.22);
  color: #bed7ff;
}

.threat-live {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: rgba(255, 78, 116, 0.22);
  color: #ffb6c5;
}

.threat-type {
  font-size: 12px;
  color: #ff8ca5;
}

.threat-hp {
  margin-left: auto;
  font-size: 12px;
  color: #ffd2db;
}

.sector-player-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid rgba(85, 126, 194, 0.42);
  background: rgba(85, 126, 194, 0.1);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 7px;
}

.sector-player-chip.self {
  border-color: rgba(89, 242, 195, 0.55);
  background: rgba(89, 242, 195, 0.11);
}

.sector-player-name {
  font-weight: 700;
}

.sector-player-meta {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #bed7ff;
  background: rgba(111, 160, 255, 0.18);
}

.sector-player-state {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.sector-player-state.combat {
  color: #ffb6c5;
  background: rgba(255, 78, 116, 0.18);
  border: 1px solid rgba(255, 78, 116, 0.35);
}

.sector-player-state.dead {
  color: #ffd5de;
  background: rgba(216, 90, 117, 0.18);
  border: 1px solid rgba(216, 90, 117, 0.45);
}

.sector-player-state.stable {
  color: #bffce6;
  background: rgba(89, 242, 195, 0.12);
  border: 1px solid rgba(89, 242, 195, 0.35);
}

.hint {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
}

.combat-target-status {
  margin: 6px 0 6px;
  color: var(--muted);
  font-size: 13px;
  min-height: 18px;
}

#jumpInfo {
  color: var(--danger);
  font-size: 14px;
}

.boss-gate-status {
  grid-column: 1 / -1;
  margin: 0 0 14px;
}

.boss-gate-card {
  border: 1px solid rgba(48, 73, 109, 0.9);
  background: rgba(9, 15, 25, 0.92);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.boss-gate-card.state-ready {
  border-color: rgba(255, 206, 106, 0.52);
  background: linear-gradient(180deg, rgba(49, 36, 10, 0.55), rgba(13, 18, 28, 0.96));
}

.boss-gate-card.state-active {
  border-color: rgba(255, 118, 150, 0.52);
  background: linear-gradient(180deg, rgba(54, 14, 27, 0.62), rgba(13, 18, 28, 0.96));
}

.boss-gate-card.state-locked {
  border-color: rgba(91, 151, 226, 0.44);
}

.boss-gate-card.state-idle {
  border-color: rgba(86, 112, 152, 0.42);
}

.boss-gate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.boss-gate-head strong {
  color: #eef6ff;
  font-size: 0.95rem;
}

.boss-gate-pill {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.boss-gate-pill.ready {
  background: rgba(151, 95, 18, 0.55);
  color: #ffe4af;
}

.boss-gate-pill.active {
  background: rgba(132, 29, 59, 0.58);
  color: #ffd2dd;
}

.boss-gate-pill.locked {
  background: rgba(26, 56, 95, 0.58);
  color: #cae4ff;
}

.boss-gate-pill.idle {
  background: rgba(39, 54, 79, 0.62);
  color: #d6e4f7;
}

.boss-gate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #b4c7df;
  font-size: 13px;
}

.boss-gate-row strong {
  color: #f3f8ff;
  text-align: right;
}

.boss-gate-note {
  color: #b9cfe8;
  font-size: 12px;
  line-height: 1.45;
  padding-top: 2px;
}

.boss-gate-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(27, 40, 59, 0.85);
  border: 1px solid rgba(58, 83, 120, 0.72);
}

.boss-gate-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #59d3ff, #78f0c4);
}

.arena-controls {
  display: none !important;
}

#gamePanel {
  padding-bottom: 290px;
}

.sector-jump-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.sector-jump-bar #jumpInfo {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

.mobile-combat-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100vw - 32px));
  bottom: 16px;
  z-index: 1200;
  border: 1px solid rgba(55, 82, 119, 0.95);
  border-radius: 18px;
  padding: 12px;
  background: rgba(7, 12, 20, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.mobile-combat-bar.hidden {
  display: none !important;
}

.mobile-combat-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #a9bfdd;
}

.mobile-combat-sector {
  font-weight: 700;
  color: #dbe9ff;
}

.mobile-combat-jumpinfo {
  text-align: right;
  color: var(--muted);
}

.mobile-combat-grid {
  display: grid;
  gap: 8px;
}

.mobile-combat-grid.primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 8px;
}

.mobile-combat-grid.secondary {
  display: none;
}

.mobile-combat-grid button {
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 6px;
}

.mobile-icon-btn {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
}

.mobile-btn-icon {
  width: 14px;
  height: 14px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  opacity: 0.95;
}

.mobile-btn-label {
  display: block;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.icon-attack {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M2 8l12-5-3 5 3 5z'/%3E%3C/svg%3E");
}

.icon-abort {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M3 3l10 10M13 3L3 13' stroke='%23eaf3ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-repair {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M6 2h4v4h4v4h-4v4H6v-4H2V6h4z'/%3E%3C/svg%3E");
}

.icon-revive {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M8 2a6 6 0 106 6h-2.2A3.8 3.8 0 118 4.2V7l4-3-4-3z'/%3E%3C/svg%3E");
}

.icon-up {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M8 2l5 6H9v6H7V8H3z'/%3E%3C/svg%3E");
}

.icon-jump {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M3 8l5-5v3h5v4H8v3z'/%3E%3C/svg%3E");
}

.icon-down {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23eaf3ff' d='M8 14l-5-6h4V2h2v6h4z'/%3E%3C/svg%3E");
}

.mobile-ammo-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.mobile-ammo-strip::-webkit-scrollbar {
  display: none;
}

.mobile-consumable-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(110px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.mobile-consumable-strip::-webkit-scrollbar {
  display: none;
}

.mobile-ammo-btn {
  min-height: 48px;
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  background: rgba(18, 28, 43, 0.96);
  border-color: rgba(61, 91, 132, 0.9);
}

.mobile-ammo-btn.active {
  border-color: rgba(89, 242, 195, 0.65);
  background: rgba(89, 242, 195, 0.09);
}

.mobile-ammo-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
}

.mobile-ammo-stock {
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}

.mobile-consumable-btn {
  min-height: 52px;
  border-radius: 10px;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  background: rgba(18, 28, 43, 0.96);
  border-color: rgba(61, 91, 132, 0.9);
}

.mobile-consumable-btn.active {
  border-color: rgba(255, 208, 109, 0.55);
  background: rgba(255, 208, 109, 0.1);
}

.mobile-consumable-btn.cooldown {
  border-color: rgba(111, 160, 255, 0.5);
  background: rgba(111, 160, 255, 0.08);
}

.mobile-consumable-btn.empty,
.mobile-consumable-btn.missing {
  opacity: 0.7;
}

.mobile-consumable-slot {
  font-size: 10px;
  font-weight: 700;
  color: #a9bfdd;
  line-height: 1;
}

.mobile-consumable-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  text-align: left;
}

.mobile-consumable-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1;
}

.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  justify-items: start;
  align-items: stretch;
  padding: 0;
}

.mobile-nav-drawer.hidden {
  display: none !important;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(6px);
  animation: mobileNavBackdropIn 180ms ease-out;
}

.mobile-nav-sheet {
  position: relative;
  width: min(360px, 100vw);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: rgba(10, 18, 30, 0.98);
  border-right: 1px solid rgba(61, 91, 132, 0.9);
  border-radius: 0;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.42);
  padding: 18px 16px 24px;
  animation: mobileNavSheetIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left top;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mobile-nav-head h3 {
  margin: 0;
  font-size: 18px;
}

.mobile-nav-close {
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
}

.mobile-nav-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-nav-section:last-child {
  margin-bottom: 0;
}

.mobile-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fb0d7;
  padding-left: 2px;
}

.mobile-nav-link {
  width: 100%;
  justify-content: flex-start;
  min-height: 46px;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(17, 29, 45, 0.98);
  border-color: rgba(61, 91, 132, 0.92);
  font-weight: 700;
}

@keyframes mobileNavBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mobileNavSheetIn {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 800px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .mobile-combat-bar {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-combat-bar {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .layout {
    padding: 12px;
  }

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

  .hero {
    padding: 14px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.4;
  }

  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .panel-head,
  .ship-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-head h2,
  .ship-head h2 {
    margin-bottom: 2px;
  }

  .panel-toggle-btn {
    width: 100%;
  }

  .row {
    flex-wrap: wrap;
  }

  .sector-jump-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .sector-jump-bar button {
    min-height: 46px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.1;
    white-space: normal;
  }

  .sector-jump-bar #jumpInfo {
    grid-column: 1 / -1;
  }

  #loginPanel .row,
  .ship-head-actions,
  .arena-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  #loginPanel .row > input,
  #loginPanel .row > button,
  .ship-head-actions > button,
  .arena-controls > button {
    width: 100%;
    min-height: 46px;
  }

  #loginPanel .auth-row input,
  #loginPanel .auth-row button {
    grid-column: span 2;
  }

  #loginPanel .login-actions-row button {
    grid-column: span 1;
  }

  .login-install-row {
    display: flex;
  }

  .ship-tabs,
  .ship-subtabs,
  .shop-tabs,
  .shop-subtabs,
  .equip-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .ship-tabs::-webkit-scrollbar,
  .ship-subtabs::-webkit-scrollbar,
  .shop-tabs::-webkit-scrollbar,
  .shop-subtabs::-webkit-scrollbar,
  .equip-tabs::-webkit-scrollbar {
    display: none;
  }

  .ship-tabs button,
  .ship-subtabs button,
  .shop-tabs button,
  .shop-subtabs button,
  .equip-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 42px;
  }

  #repairBtn,
  #reviveBtn {
    display: none !important;
  }

  .ship-head-actions {
    display: flex;
    justify-content: flex-end;
  }

  .ship-panel,
  .ship-tab,
  .ship-subtab-panel,
  .shop-section,
  .shop-item-card,
  .inv-row,
  .inventory-item-row,
  .inventory-item-right,
  .shop-item-actions,
  .craft-item,
  .equip-card {
    min-width: 0;
  }

  .inventory-item-main,
  .inventory-item-title,
  .shop-item-card h4,
  .shop-item-card p,
  .shop-item-submeta {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .footer-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-stat-card {
    padding: 9px 10px;
  }

  .footer-stat-value {
    font-size: 1rem;
  }

  .arena-currency-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arena-ammo-switch,
  .action-bar-wrap {
    display: none !important;
  }

  .mobile-nav-drawer {
    justify-items: stretch;
    align-items: stretch;
    padding: 0;
  }

  .mobile-nav-sheet {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding-top: max(18px, env(safe-area-inset-top, 0px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .log-panel {
    grid-column: span 1;
  }

  .grid.ship-collapsed .ship-panel,
  .grid.ship-collapsed .arena-panel,
  .grid.log-collapsed .log-panel {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .layout {
    padding: 10px;
  }

  .panel {
    padding: 12px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .connection-status {
    padding: 10px 12px;
    font-size: 13px;
  }

  #loginPanel .row,
  .ship-head-actions,
  .arena-controls {
    grid-template-columns: 1fr;
  }

  #loginPanel .auth-row input,
  #loginPanel .auth-row button {
    grid-column: span 1;
  }

  .arena-currency-row,
  .session-econ-grid,
  .session-econ-panels {
    grid-template-columns: 1fr;
  }

  #gamePanel {
    padding-bottom: 340px;
  }

  .mobile-combat-bar {
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 8px;
  }

  .mobile-combat-meta {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .mobile-combat-jumpinfo {
    text-align: left;
  }

  .mobile-combat-grid.primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-ammo-strip {
    grid-auto-columns: minmax(84px, 1fr);
  }

  .mobile-consumable-strip {
    grid-auto-columns: minmax(84px, 1fr);
  }

  .arena-ammo-switch,
  .log-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .arena-ammo-switch button,
  .log-filters button {
    width: 100%;
    min-height: 42px;
  }

  .arena-player,
  .craft-item,
  .equip-card {
    padding: 12px;
  }

  .arena-battlefield {
    max-width: 100%;
  }

  #arenaBox .npc {
    width: var(--planet-size);
    height: var(--planet-size);
  }

  .craft-head,
  .npc-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
