/* ==========================================================================
 * MONORAIL (单轨铁路) — Illuminated Architectural Rail Blueprint Arena
 * ========================================================================== */

.mr-arena {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 300px;
  gap: 18px;
  align-items: start;
  padding: 4px 4px 20px;
}

@media (max-width: 900px) {
  .mr-arena {
    grid-template-columns: 1fr;
  }
}

/* Proof Challenge Siren Banner */
.mr-proof-banner {
  grid-column: 1 / -1;
  padding: 13px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(217, 27, 58, 0.3), rgba(245, 158, 11, 0.25), rgba(217, 27, 58, 0.3));
  border: 1.5px solid #ff4769;
  color: #fff3d4;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 32px rgba(217, 27, 58, 0.38);
  animation: mr-siren 1.1s ease-in-out infinite;
}

@keyframes mr-siren {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 46, 84, 0.35); border-color: #ff4769; }
  50% { box-shadow: 0 0 38px rgba(245, 158, 11, 0.65); border-color: #fff0c2; }
}

.mr-loop-banner {
  grid-column: 1 / -1;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(228, 185, 91, 0.28), rgba(34, 197, 94, 0.22));
  border: 1.5px solid #e4b95b;
  color: #fff6d9;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 0 28px rgba(228, 185, 91, 0.35);
}

/* Blueprint Viewport */
.mr-blueprint-wrap {
  position: relative;
  border-radius: 18px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(228, 185, 91, 0.08), transparent 65%),
    linear-gradient(160deg, #101422 0%, #090b13 100%);
  border: 1.5px solid var(--tg-border-strong);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.72),
    inset 0 0 44px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.mr-blueprint-wrap.is-proof {
  border-color: #ff4769;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.75),
    0 0 32px rgba(217, 27, 58, 0.25),
    inset 0 0 44px rgba(122, 9, 30, 0.35);
}

.mr-svg {
  width: 100%;
  height: auto;
  max-height: 540px;
  display: block;
  user-select: none;
}

.mr-ghost-cell {
  cursor: pointer;
  transition: opacity 0.16s, fill 0.16s;
}

.mr-ghost-cell:hover rect {
  fill: rgba(34, 211, 238, 0.22);
  stroke: #67e8f9;
  stroke-width: 2.2;
}

.mr-staged-tile {
  cursor: pointer;
}

.mr-staged-tile:hover .mr-tile-bg {
  stroke: #ffffff;
}

/* Animated Train Pulse */
.mr-train-glow {
  filter: drop-shadow(0 0 8px #ff2e54) drop-shadow(0 0 14px #fff0c2);
}

/* Right Engineering Console */
.mr-console {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mr-card {
  padding: 15px 16px;
  border-radius: var(--tg-radius-md);
  background: var(--tg-glass);
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-card);
}

.mr-card-title {
  margin: 0 0 10px;
  font-family: var(--tg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tg-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mr-supply-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mr-supply-num {
  font-family: var(--tg-font-mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--tg-gold-bright);
  line-height: 1;
  text-shadow: 0 0 18px var(--tg-gold-glow);
}

.mr-supply-pips {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.mr-supply-pip {
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, #fff0c2, #c9922c);
  box-shadow: 0 0 8px rgba(228, 185, 91, 0.35);
}

.mr-supply-pip.is-staged {
  background: linear-gradient(135deg, #67e8f9, #0891b2);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

.mr-supply-pip.is-used {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* Shape Brush Palette */
.mr-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.mr-brush-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(18, 22, 36, 0.92);
  border: 1.5px solid var(--tg-border);
  color: var(--tg-ink-muted);
  font-size: 11px;
  font-weight: 700;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.mr-brush-btn:hover {
  border-color: var(--tg-gold);
  color: var(--tg-ink);
}

.mr-brush-btn.is-active {
  border-color: var(--tg-cyan);
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25);
}

.mr-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mr-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mr-impossible-btn {
  width: 100%;
  min-height: 46px;
  font-family: var(--tg-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mr-hint-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--tg-ink-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
