/* Match — match-3 with specials (Candy Crush / Bejeweled style) */
.mt-shell {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.75rem 1rem 1.75rem;
  color: #e8ecef;
}

.mt-top h2 {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
  color: #f0c8e0;
}

.mt-hint {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(210, 190, 210, 0.88);
  max-width: 40rem;
}

.mt-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.mt-hud strong {
  color: #ffd0ef;
  font-variant-numeric: tabular-nums;
}

.mt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.mt-actions button {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  border: 1px solid rgba(200, 120, 180, 0.45);
  background: rgba(40, 20, 36, 0.95);
  color: #f0e4ec;
  cursor: pointer;
}

.mt-actions button.accent {
  background: linear-gradient(180deg, #6b2a5a, #401a38);
  border-color: rgba(240, 140, 200, 0.55);
  font-weight: 700;
}

.mt-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mt-board-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 0.75rem;
}

#mt-canvas {
  display: block;
  width: min(100%, 440px);
  height: auto;
  border-radius: 14px;
  border: 2px solid rgba(220, 140, 190, 0.4);
  background: #1a1220;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), 0 8px 28px rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: pointer;
}

.mt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  font-size: 0.72rem;
  color: rgba(200, 180, 200, 0.8);
  margin-bottom: 0.5rem;
}

.mt-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mt-status {
  font-size: 0.8rem;
  min-height: 1.2em;
  color: #e0b0d8;
  margin: 0.25rem 0 0;
}

.mt-status.ok {
  color: #9dffc0;
}

.mt-status.err {
  color: #ffb0a8;
}

.mt-muted {
  font-size: 0.74rem;
  color: rgba(180, 160, 180, 0.75);
  line-height: 1.35;
  margin: 0.4rem 0 0;
}

.mt-name-label {
  font-size: 0.75rem;
  color: rgba(200, 180, 200, 0.85);
}

.mt-player-name {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(200, 120, 180, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #f0e4ec;
  max-width: 9rem;
}

.mt-play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-start;
  justify-content: center;
}

.mt-network {
  flex: 1 1 12rem;
  max-width: 16rem;
  min-width: 11rem;
  border-radius: 12px;
  border: 1px solid rgba(200, 120, 180, 0.3);
  background: rgba(20, 12, 22, 0.9);
  padding: 0.65rem 0.75rem;
}

.mt-network h3 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: #f0c8e0;
}

.mt-net-hint {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(190, 170, 190, 0.8);
}

.mt-network-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 16rem;
  overflow: auto;
  font-size: 0.78rem;
}

.mt-network-list li {
  display: grid;
  grid-template-columns: 1.6rem 0.55rem 1fr auto;
  gap: 0.3rem 0.35rem;
  align-items: center;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mt-net-rank {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(200, 170, 200, 0.7);
  font-variant-numeric: tabular-nums;
}

.mt-net-banner {
  font-size: 0.72rem;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: #d8c0d4;
  line-height: 1.35;
}

.mt-net-banner.ok {
  color: #9dffc0;
  border: 1px solid rgba(100, 200, 140, 0.35);
}

.mt-net-banner.err {
  color: #ffc0b0;
  border: 1px solid rgba(220, 100, 80, 0.4);
}

.mt-net-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #666;
}

.mt-net-on .mt-net-dot {
  background: #6dff9a;
  box-shadow: 0 0 6px rgba(100, 255, 150, 0.6);
}

.mt-net-off .mt-net-dot {
  background: #666;
}

.mt-net-you {
  background: rgba(80, 40, 70, 0.35);
  border-radius: 6px;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.mt-net-name {
  font-weight: 600;
  color: #f0e0ec;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-net-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffd0ef;
}

.mt-net-state {
  font-size: 0.68rem;
  color: rgba(180, 160, 180, 0.75);
}

.mt-net-muted {
  display: block !important;
  grid-template-columns: 1fr !important;
  color: rgba(180, 160, 180, 0.75);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mt-net-muted code {
  font-size: 0.85em;
}
