/* ═══════════════════════════════════════════════════════════════════
   Олимп и Стардаст. Приставка gs-, тема задаётся классом на контейнере.

   Сетка строится через grid с одинаковыми долями, а не фиксированной
   шириной ячеек: на узком телефоне поле сжимается целиком, а не вылезает
   за край. Символы масштабируются через clamp по ширине экрана.
   ═══════════════════════════════════════════════════════════════════ */

.gs { --gs-glow: rgba(232, 182, 76, .5); }
.gs-olympus { --gs-glow: rgba(120, 190, 255, .55); --gs-tint: rgba(90, 150, 230, .1); }
.gs-stardust { --gs-glow: rgba(190, 130, 255, .55); --gs-tint: rgba(140, 90, 220, .12); }

.gs-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.gs-sub { font-size: 12.5px; color: var(--text-dim); overflow-wrap: anywhere; }
.gs-rtp {
  font-size: 11.5px; font-weight: 750; letter-spacing: .05em;
  color: var(--gold); white-space: nowrap;
}

.gs-board {
  position: relative; padding: 12px; border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--gs-tint), transparent 70%),
    linear-gradient(168deg, var(--surface-hi), var(--surface));
}

.gs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.gs-cell {
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-size: clamp(15px, 5.2vw, 26px);
  line-height: 1;
  border-radius: 9px;
  background: var(--bg-deep);
  box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 0 0 1px var(--edge);
  animation: gsDrop .32s var(--ease-out) backwards;
  animation-delay: var(--d, 0ms);
  will-change: transform, opacity;
  transform: translateZ(0);
}

@keyframes gsDrop {
  from { transform: translateY(-16px) scale(.9); opacity: 0 }
}

.gs-cell.gs-hit {
  background: linear-gradient(165deg, var(--surface-hi), var(--surface));
  box-shadow: inset 0 0 0 1px var(--gs-glow), 0 0 14px -2px var(--gs-glow);
  animation: gsPulse .5s ease-in-out infinite alternate;
}
@keyframes gsPulse { to { transform: scale(1.06) } }

.gs-cell.gs-boom {
  animation: gsBoom .34s var(--ease-out) forwards;
}
@keyframes gsBoom {
  to { transform: scale(.2) rotate(18deg); opacity: 0 }
}

.gs-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  font-size: clamp(19px, 6vw, 28px); font-weight: 800; letter-spacing: -.02em;
  color: var(--text);
  background: rgba(8, 10, 14, .72);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease-out);
  padding: 16px; overflow-wrap: anywhere;
}
.gs-overlay.show { opacity: 1; }
.gs-overlay small { display: block; font-size: 14px; font-weight: 600;
  color: var(--text-dim); margin-top: 6px; }
.gs-overlay.gs-mult { color: var(--gold); }
.gs-overlay.gs-big { color: var(--gold); text-shadow: 0 0 24px var(--gs-glow); }

.gs-status {
  margin: 12px 2px 0; font-size: 13.5px; line-height: 1.5;
  color: var(--text-dim); min-height: 40px; overflow-wrap: anywhere;
}

/* ── Панель «турбо + авто», общая для всех слотов ── */

.sp-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

.sp-tool {
  flex: 0 0 auto; border: 0; font: inherit; font-size: 13px; font-weight: 650;
  color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: color .2s, box-shadow .2s, transform .2s var(--ease-spring);
}
.sp-tool:active { transform: scale(.94); }
.sp-tool.on {
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(232, 182, 76, .55), 0 0 14px -6px var(--gold);
}
.sp-tool-ic { font-size: 14px; }

.sp-auto-badge {
  font-size: 12px; font-weight: 750; letter-spacing: .05em;
  color: var(--gold); white-space: nowrap; opacity: 0;
  transition: opacity .2s;
}
.sp-auto-badge.on { opacity: 1; }

.sp-auto-sheet {
  position: fixed; inset: 0; z-index: 950;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 8, 12, .6);
  padding: 0 12px calc(16px + env(safe-area-inset-bottom));
}
.sp-auto-inner {
  width: 100%; max-width: 420px; padding: 20px;
  border-radius: var(--r-lg);
  animation: gsUp .3s var(--ease-out);
}
@keyframes gsUp { from { transform: translateY(24px); opacity: 0 } }
.sp-auto-inner h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }

.sp-auto-counts { display: flex; gap: 8px; margin: 14px 0; }
.sp-auto-counts button {
  flex: 1 1 0; min-width: 0; border: 0; font: inherit;
  font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer;
  padding: 13px 4px; border-radius: var(--r-md);
  background: linear-gradient(168deg, var(--surface-hi), var(--surface));
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: transform .2s var(--ease-spring);
}
.sp-auto-counts button:active { transform: scale(.95); }

.sp-auto-field {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 12px; font-size: 14px; color: var(--text-dim);
}
.sp-auto-field span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sp-auto-field select,
.sp-auto-field input {
  flex: 0 0 auto; width: 46%; min-width: 0;
  font: inherit; font-size: 14px; color: var(--text);
  padding: 10px 12px; border: 0; border-radius: var(--r-sm);
  background: var(--bg-deep);
  box-shadow: inset 0 2px 8px var(--shadow-dark), inset 0 0 0 1px var(--edge);
}
