/* ==========================================================================
   MMO11 — KOŞU PAGE (hub view #hubViewRunner) — its own layout on the EventPage base: the 3D track (the event's
   own scene) with the score and the two gate buttons over it, the tree / ranking beside it.
   ========================================================================== */

.rn-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.rn-stage-card { position: relative; padding: 0; overflow: hidden; min-height: 470px; background: linear-gradient(180deg, #8cc2f2 0%, #2f7d43 60%, #14532d 100%); }
.rn-stage { position: absolute; inset: 0; }
.rn-stage canvas { width: 100%; height: 100%; display: block; }
.rn-load {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-weight: 800;
  color: #1d6fb0;
  z-index: 3;
}

.rn-board {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
  font-size: 14px;
  color: #64748b;
}
.rn-board b { font-size: 28px; font-weight: 900; color: #1f2937; }
.rn-rival { font-weight: 700; }

.rn-flash {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.rn-flash.trap { color: #fecaca; }
.rn-flash.on { animation: rn-flash 1.3s ease forwards; }
@keyframes rn-flash { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

.rn-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; z-index: 2; display: flex; justify-content: center; }
.rn-controls > div { width: 100%; max-width: 560px; }
.rn-turn { text-align: center; font-size: 17px; font-weight: 800; color: #ffffff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); margin-bottom: 8px; }
.rn-gates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rn-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 3px solid #22c55e;
  background: #f0fdf4;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.rn-gate small { font-size: 12px; font-weight: 800; color: #64748b; text-transform: uppercase; }
.rn-gate b { font-size: 22px; font-weight: 900; color: #15803d; }
.rn-gate.token { border-color: #f5b301; background: #fffbeb; }
.rn-gate.token b { color: #b45309; }
.rn-gate.trap { border-color: #ef4444; background: #fef2f2; }
.rn-gate.trap b { color: #b91c1c; }
.rn-gate:disabled { opacity: 0.6; cursor: default; }
.rn-start, .rn-result { background: rgba(255, 255, 255, 0.95); border-radius: 18px; padding: 14px 16px; text-align: center; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.rn-start p { margin: 0 0 10px; font-size: 15px; color: #475569; }
.rn-result b { display: block; font-size: 30px; font-weight: 900; color: #1f2937; }
.rn-result.won b { color: #16a34a; }
.rn-result.lost b { color: #dc2626; }
.rn-result span { display: block; font-size: 16px; color: #475569; margin: 4px 0 8px; }
.rn-won { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 10px; }

.rn-side-card { display: flex; flex-direction: column; }

@media (max-width: 980px) {
  .rn-body { grid-template-columns: minmax(0, 1fr) 270px; gap: 10px; }
  .rn-stage-card { min-height: 330px; }
  .rn-gate b { font-size: 18px; }
  .rn-flash { font-size: 30px; }
}
@media (max-width: 640px) {
  .rn-body { grid-template-columns: minmax(0, 1fr); }
}
