/* =====================================================================
   Plinko (Orbis) — the board. Shared by both themes; the town skin
   (buttons, panels) lives in each theme's stylesheet.

   Clean & modern: Orbis's real sky (maple-orbis.jpg) with its clouds
   drifting past under a dark sheet, plain white pegs (the sheet, pegs and
   marbles are drawn on the canvas), the sky station's winged gem the marbles
   fall from, and bold flat slots from yellow (small) to red (big).
   Set by plinko.js from the stage size: --travel (stage width), --gem-y,
   --gem-w.
   ===================================================================== */

.stage-plinko .stage-inner { padding: 0; }
.seg.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.seg-x4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg.seg-x4 button { padding-left: 2px; padding-right: 2px; }

.plinko {
  --travel: 800px; --gem-y: 10px; --gem-w: 100px;
  position: relative; align-self: stretch; flex: 1; width: 100%; min-height: 0; overflow: hidden;
  user-select: none; -webkit-user-select: none;
  background: #1b3a9c url("/static/img/maple-orbis.jpg") center 35% / cover;
}
.plinko-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }

/* the sky station's clouds sailing by behind the board */
.plinko-clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.plinko-cloud {
  position: absolute; left: 0; height: auto; opacity: 0.85;
  animation: plinko-cloud var(--secs, 100s) linear infinite;
  filter: drop-shadow(0 6px 8px rgba(10, 30, 90, 0.25));
}
@keyframes plinko-cloud { from { transform: translateX(-100%); } to { transform: translateX(var(--travel)); } }

/* the winged gem the marbles fall from */
.plinko-dropper {
  position: absolute; z-index: 3; left: 50%; top: var(--gem-y); width: var(--gem-w); height: auto;
  transform: translate(-50%, -78%); pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 226, 140, 0.55)) drop-shadow(0 4px 4px rgba(10, 30, 90, 0.4));
  animation: gem-float 3.2s ease-in-out infinite;
}
@keyframes gem-float { 50% { translate: 0 -4px; } }

/* the slots: bold flat blocks, yellow for the small ones warming through orange to red for the big ones */
.plinko-slots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.plinko-slot {
  position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 4px;
  font-family: "Barlow Condensed", var(--cond, system-ui), sans-serif; font-weight: 800; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1;
  color: #2a1300; background: #ffc93c; box-shadow: 0 3px 0 #b88a14;
}
.plinko-slot.t2 { background: #ffa53a; box-shadow: 0 3px 0 #b8701a; }
.plinko-slot.t3 { background: #ff7a33; box-shadow: 0 3px 0 #b44c14; }
.plinko-slot.t4 { background: #ff4d4d; box-shadow: 0 3px 0 #a82424; }
.plinko-slot.t5 { background: #ff2e63; box-shadow: 0 3px 0 #9a1238; }
.plinko-slot span { display: block; white-space: nowrap; }
.plinko-slot.vert span { transform: rotate(-90deg); } /* narrow slots (phones, 16 rows): labels stand on end */

/* the last few drops, newest on top */
.plinko-recent {
  position: absolute; z-index: 4; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 5px;
  pointer-events: none;
}
.plinko-chip {
  min-width: 52px; padding: 4px 8px; border-radius: 4px; text-align: center;
  font: 800 14px / 1.1 "Barlow Condensed", var(--cond, system-ui), sans-serif; font-variant-numeric: tabular-nums;
  color: #2a1300; background: #ffc93c; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  animation: chip-in 0.25s ease-out;
}
.plinko-chip.t2 { background: #ffa53a; }
.plinko-chip.t3 { background: #ff7a33; }
.plinko-chip.t4 { background: #ff4d4d; }
.plinko-chip.t5 { background: #ff2e63; }
@keyframes chip-in { from { transform: translateX(14px); opacity: 0; } }

/* ---- lobby card art ---- */
.art-plinko { position: relative; overflow: hidden; background: #1b3a9c url("/static/img/maple-orbis.jpg") center 40% / cover; }
.art-plinko::before { content: ""; position: absolute; inset: 0; background: rgba(8, 14, 40, 0.55); }
.art-plinko .mini-pegs {
  /* a little triangle of white pegs */
  position: absolute; left: 50%; top: 18%; width: 190px; height: 58%; transform: translateX(-50%);
  background: radial-gradient(circle, #f2f5ff 0 2.6px, transparent 3.2px) 0 0 / 21px 19px;
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}
.art-plinko .mini-marble { position: absolute; width: 26px; image-rendering: auto; }
.art-plinko .m1 { left: calc(50% - 30px); top: 30%; }
.art-plinko .m2 { left: calc(50% + 12px); top: 50%; }
.art-plinko .m3 { left: calc(50% - 46px); top: 62%; }
.art-plinko .mini-slots { position: absolute; left: 50%; bottom: 8%; display: flex; gap: 3px; transform: translateX(-50%); }
.art-plinko .mini-slots span {
  padding: 2px 5px; border-radius: 3px; font: 800 12px / 1.1 "Barlow Condensed", system-ui, sans-serif; color: #2a1300;
  background: #ffc93c; box-shadow: 0 2px 0 #b88a14;
}
.art-plinko .mini-slots .t2 { background: #ffa53a; box-shadow: 0 2px 0 #b8701a; }
.art-plinko .mini-slots .t3 { background: #ff7a33; box-shadow: 0 2px 0 #b44c14; }
.art-plinko .mini-slots .t4 { background: #ff4d4d; box-shadow: 0 2px 0 #a82424; }

@media (max-width: 760px) {
  .plinko-recent { top: 8px; right: 8px; gap: 3px; }
  .plinko-chip { min-width: 40px; font-size: 12px; padding: 3px 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .plinko-cloud, .plinko-dropper { animation: none !important; }
}
