/* ——— Lucky Gems ——— */
.game-shell.lg-mode {
  background: linear-gradient(180deg, #f0a020, #d47810 40%, #a05008);
}
.game-shell.lg-mode .game-top {
  background: linear-gradient(180deg, rgba(80,40,0,.9), rgba(40,18,0,.95));
  border-bottom: 1px solid rgba(255,200,80,.35);
}
.game-shell.lg-mode .game-stage {
  padding: 0; max-width: min(720px, 100%); margin: 0 auto; width: 100%;
}

.lg-screen { position: relative; min-height: 100%; color: #2a1608; overflow: hidden; }
.lg-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none; filter: saturate(1.05) brightness(.95);
}
.lg-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,200,80,.15), rgba(80,30,0,.25));
}
.lg-chrome {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 10px 12px; min-height: 100%;
}
.lg-title {
  text-align: center; font-weight: 900; font-size: 1.35rem; letter-spacing: .04em;
  background: linear-gradient(180deg, #fff8d0, #f0c040, #c87808);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #6a3008);
}

.lg-mult-track {
  background: rgba(255,255,255,.55);
  border: 2px solid #e0a020;
  border-radius: 12px;
  padding: 6px 8px 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.lg-mult-lbl {
  display: block; text-align: center; font-size: .58rem; font-weight: 900;
  letter-spacing: .08em; color: #6a3a08; margin-bottom: 4px;
}
.lg-mults { display: flex; gap: 4px; justify-content: center; }
.lg-vial {
  flex: 1; max-width: 52px; text-align: center;
  background: linear-gradient(180deg, #e8f4ff, #a8d0ef);
  border: 1.5px solid #6a9ab8; border-radius: 8px; padding: 4px 2px;
  font-size: .72rem; font-weight: 900; color: #1a4060;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.6);
  opacity: .65; transition: .15s ease;
}
.lg-vial.is-active {
  opacity: 1; transform: scale(1.08);
  background: linear-gradient(180deg, #fff6c8, #f0c040);
  border-color: #c87808; color: #5a3008;
  box-shadow: 0 0 12px rgba(255,180,40,.7);
}

.lg-board {
  display: grid;
  grid-template-columns: minmax(72px, 100px) minmax(0, 1fr) 72px;
  gap: 8px; align-items: stretch;
}
.lg-pay-side {
  background: rgba(255,255,255,.72);
  border-radius: 12px; border: 1.5px solid #e0a020;
  padding: 6px 4px; overflow: auto; max-height: 320px;
}
.lg-pay-row {
  display: grid; grid-template-columns: 28px 22px 1fr; gap: 2px; align-items: center;
  margin-bottom: 4px; font-size: .58rem; font-weight: 800; color: #4a2a08;
}
.lg-pay-row img { width: 26px; height: 26px; object-fit: cover; border-radius: 50%; }
.lg-pay-row b { text-align: right; color: #8a4a08; }

.lg-tubes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(200,140,40,.2));
  border: 3px solid #e8b923; border-radius: 16px; padding: 10px;
  box-shadow: 0 8px 20px rgba(80,40,0,.3), inset 0 2px 0 rgba(255,255,255,.5);
}
.lg-tube {
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, rgba(180,220,255,.35), rgba(120,160,200,.25));
  border: 2px solid rgba(120,160,200,.55); border-radius: 999px;
  padding: 8px 6px; box-shadow: inset 0 0 12px rgba(255,255,255,.45);
}
.lg-tube.is-spinning .lg-cell { animation: lg-bounce .28s ease infinite alternate; }
.lg-tube.is-spinning .lg-cell:nth-child(2) { animation-delay: .07s; }
@keyframes lg-bounce {
  from { transform: translateY(-4px); }
  to { transform: translateY(4px); }
}
.lg-cell {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #fff, #dce8f8);
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 3px 6px rgba(0,0,0,.2);
}
.lg-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-cell.is-win {
  box-shadow: 0 0 0 3px #ffe566, 0 0 16px rgba(255,180,40,.85);
  animation: lg-win .55s ease infinite alternate;
}
@keyframes lg-win {
  from { filter: brightness(1.05); }
  to { filter: brightness(1.25); }
}

.lg-controls-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.lg-spin {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid #fff3c4;
  background: radial-gradient(circle at 35% 28%, #ffe08a, #e0a020 55%, #a06810);
  box-shadow: 0 5px 0 #6a3e00, 0 0 16px rgba(255,180,40,.45);
  color: #3a2200; font-size: 1.6rem; font-weight: 900;
}
.lg-spin:active:not(:disabled) { transform: translateY(2px); }
.lg-spin:disabled { opacity: .55; }
.lg-side-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid #e0a020; background: rgba(255,255,255,.65);
  display: grid; place-items: center; padding: 0; overflow: hidden;
}
.lg-side-btn.on { box-shadow: 0 0 0 3px #ffe566; background: #fff6c8; }
.lg-side-btn .ui-ico { width: 28px; height: 28px; }

.lg-lines-lbl {
  text-align: center; font-weight: 800; font-size: .78rem; color: #5a3008;
}
.lg-lines-lbl b { color: #a05008; }

.lg-footer {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  background: rgba(40,18,0,.72); color: #fff8e0;
  border-radius: 12px; padding: 8px 10px;
  border: 1px solid rgba(255,200,80,.35);
}
.lg-stat small { display: block; font-size: .5rem; opacity: .75; font-weight: 700; letter-spacing: .04em; }
.lg-stat b { font-size: .85rem; }
.lg-stat b.win { color: #7dff9a; }
.lg-bet-ctrl { display: flex; align-items: center; gap: 4px; }
.lg-bet-ctrl button {
  width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: #f0c040; color: #3a2200; font-weight: 900;
}
.lg-tools { display: flex; gap: 6px; }
.lg-tools button {
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; overflow: hidden;
  display: grid; place-items: center; padding: 0;
}
.lg-tools .ui-ico-sound { width: 100%; height: 100%; }

.lg-paytable, .lg-hist-pop {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(10,8,20,.55);
  display: grid; place-items: center; padding: 16px;
}
.lg-pt-card, .lg-hist-card {
  position: relative;
  width: min(360px, 100%);
  background: #2a2a32; color: #fff;
  border-radius: 14px; padding: 14px 16px 18px;
  border: 1px solid rgba(255,200,80,.35);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.lg-pt-head {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px;
}
.lg-pt-head small { display: block; color: #f0c040; font-weight: 800; }
.lg-pt-head strong { font-size: .95rem; letter-spacing: .06em; }
.lg-pt-head button, .lg-hist-card .lg-pt-head button {
  width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: #444; color: #fff; font-weight: 900;
}
.lg-pt-body h3 { text-align: center; font-size: .95rem; margin: 0 0 10px; font-weight: 800; }
.lg-pt-body h3 em { color: #f0c040; font-style: normal; font-size: .8rem; }
.lg-pt-wild { text-align: center; }
.lg-pt-wild img { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; }
.lg-pt-wild p { margin: 8px 0 4px; font-size: .78rem; }
.lg-pt-wild b { color: #f0c040; }
.lg-pt-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.lg-pt-sym { text-align: center; font-size: .58rem; }
.lg-pt-sym img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.lg-pt-sym span { display: block; margin-top: 4px; color: #f0c040; font-weight: 800; }
.lg-pt-rules { padding-left: 18px; font-size: .78rem; line-height: 1.4; }
.lg-pt-rules li { margin-bottom: 6px; }
.lg-pt-sub { text-align: center; font-size: .72rem; opacity: .85; margin: 0 0 10px; }
.lg-pt-note { margin: 12px 0 0; font-size: .68rem; color: #ddd; }
.lg-pt-note::first-letter { color: #f0c040; }
.lg-pt-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: #555; color: #fff; font-size: 1.2rem; font-weight: 900;
}
.lg-pt-nav.left { left: -14px; }
.lg-pt-nav.right { right: -14px; }
.lg-pt-nav:disabled { opacity: .35; }
.lg-pt-lines { display: flex; flex-direction: column; gap: 8px; }
.lg-pt-line { display: flex; align-items: center; gap: 10px; font-size: .72rem; font-weight: 800; }
.lg-mini {
  display: grid; grid-template-columns: repeat(3, 14px); gap: 3px;
}
.lg-mini i {
  width: 14px; height: 14px; border-radius: 2px;
  background: #555; display: block;
}
.lg-mini i.on { background: #f0c040; }
.lg-hist-card ul { list-style: none; margin: 0; padding: 0; font-size: .78rem; }
.lg-hist-card li {
  padding: 8px; border-radius: 8px; background: rgba(255,255,255,.06);
  margin-bottom: 6px;
}

@media (max-width: 560px) {
  .lg-board { grid-template-columns: 64px minmax(0, 1fr) 56px; gap: 4px; }
  .lg-pay-side { max-height: 260px; padding: 4px 2px; }
  .lg-pay-row img { width: 20px; height: 20px; }
  .lg-spin { width: 52px; height: 52px; font-size: 1.3rem; }
  .lg-side-btn { width: 38px; height: 38px; }
  .lg-pt-grid { grid-template-columns: repeat(3, 1fr); }
}

