/* Command-center lobby shell. Match setup and deck builder keep their existing components. */
.game.is-command-shell {
  width: 100%;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
}

.command-shell {
  --command-cyan: #55d6ff;
  --command-cyan-soft: #b8efff;
  --command-gold: #f2bd53;
  --command-green: #7ee58e;
  --command-danger: #ff655e;
  position: relative;
  width: 100%;
  min-height: 100dvh;
  color: #e8f7ff;
  background:
    linear-gradient(180deg, rgba(2, 8, 15, 0.24), rgba(2, 7, 13, 0.84)),
    radial-gradient(circle at 50% 0, rgba(45, 154, 205, 0.12), transparent 44%);
}

.command-shell-content {
  width: min(1180px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 18px 20px 24px;
}

.has-command-dock .command-shell-content {
  padding-bottom: calc(102px + env(safe-area-inset-bottom));
}

.command-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.command-topbar {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) minmax(260px, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(85, 214, 255, 0.42);
  background: rgba(2, 12, 22, 0.62);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.command-brand,
.command-player,
.command-text-button,
.command-icon-button,
.command-primary,
.command-secondary,
.command-quick-action,
.command-dock button {
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.command-icon {
  display: block;
  width: 1em;
  height: 1em;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.command-brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  clip-path: circle(48% at 50% 50%);
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(85, 214, 255, 0.52));
}

.command-brand > span,
.command-page-title,
.command-player-copy,
.command-panel-heading > span,
.command-active-deck > span:last-child,
.command-deck-row-main > span:last-child,
.command-quick-action > span:nth-child(2),
.command-training-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.command-brand strong {
  color: #f4fbff;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.command-brand small {
  color: #91b4c6;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.command-page-title {
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.command-page-title > span,
.command-section-heading > span,
.command-panel-heading small,
.command-training-card small,
.command-locked-page > small {
  color: #84b5c9;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.command-page-title h1 {
  margin: 0;
  color: var(--command-cyan-soft);
  font-size: 1.35rem;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(85, 214, 255, 0.34);
}

.command-page-title h1:focus {
  outline: 0;
}

.command-player-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.command-player {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(85, 214, 255, 0.28);
  background: rgba(3, 20, 33, 0.68);
  text-align: left;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.command-player-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border: 1px solid rgba(85, 214, 255, 0.5);
  border-radius: 50%;
  color: var(--command-cyan-soft);
  background: #061725;
  font-weight: 900;
}

.command-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.command-player-copy {
  gap: 1px;
}

.command-player-copy small {
  color: #789bad;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.command-player-copy strong {
  overflow: hidden;
  color: #f1fbff;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-player-copy em {
  overflow: hidden;
  color: var(--command-gold);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-auth-slot {
  min-width: 0;
}

.command-auth-slot .lobby-account {
  width: auto;
  min-width: 0;
  padding: 4px 6px;
}

.command-auth-slot .lobby-account-copy strong {
  font-size: 0.78rem;
}

.command-player-slot .lobby-install-button {
  min-height: 38px;
  padding-inline: 10px;
}

.command-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.command-panel {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(85, 214, 255, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(7, 31, 48, 0.94), rgba(2, 10, 18, 0.96) 62%),
    radial-gradient(circle at 12% 20%, rgba(85, 214, 255, 0.14), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(184, 239, 255, 0.04), 0 16px 34px rgba(0, 0, 0, 0.28);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

.command-panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-top: 1px solid rgba(85, 214, 255, 0.16);
  border-left: 1px solid rgba(85, 214, 255, 0.1);
  pointer-events: none;
  clip-path: inherit;
}

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

.command-panel-heading,
.command-action-row,
.command-context-strip,
.command-active-deck,
.command-deck-row,
.command-deck-row-main,
.command-deck-row-actions,
.command-training-card,
.command-training-actions,
.command-rank-core,
.command-progress-block > span {
  display: flex;
  align-items: center;
}

.command-panel-heading {
  justify-content: space-between;
  gap: 12px;
}

.command-panel-heading h2,
.command-section-heading h2,
.command-training-card h2,
.command-locked-page h2 {
  margin: 2px 0 0;
  color: #e8f8ff;
  font-size: 1.18rem;
  line-height: 1.08;
  text-transform: uppercase;
}

.command-panel-heading > em {
  max-width: 48%;
  color: #8db6c8;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.command-panel-heading > em.is-ready {
  color: var(--command-green);
}

.command-panel-heading > em.is-warning {
  color: var(--command-danger);
}
