/* =========================================================================
   slotlabfa.com — slot table skin ("instrument panel").
   The same engine as the other sites, presented as laboratory apparatus:
   light surface, hairline borders, monospace readouts, live statistics rail.
   ========================================================================= */

.sg-root { --cell: 68px; max-width: 1080px; margin-inline: auto; }
@media (max-width: 520px) { .sg-root { --cell: 54px; } }
@media (max-width: 360px) { .sg-root { --cell: 47px; } }

.sg-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------- mode select */
.sg-menu { border: 1px solid var(--rule-2); background: var(--paper-2); padding: 1.2rem; }
.sg-menu-title { margin: 0 0 0.25rem; font-size: 1.1rem; }
.sg-menu-sub { color: var(--dim); font-size: var(--fs-s); margin-bottom: 1rem; }
.sg-menu-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 720px) { .sg-menu-grid { grid-template-columns: repeat(2, 1fr); } }
.sg-mode { display: grid; gap: 0.3rem; text-align: start; cursor: pointer; font: inherit; background: var(--paper-2); border: 0; padding: 1rem; color: var(--ink); }
.sg-mode:hover { background: var(--indigo-soft); }
.sg-mode-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; color: var(--teal); }
.sg-mode-name { font-size: 1.02rem; font-weight: 700; }
.sg-mode-desc { font-size: var(--fs-s); color: var(--dim); line-height: 1.7; }

/* ---------------------------------------------------------------- readouts */
.sg-status { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 0.8rem; }
@media (min-width: 640px) { .sg-status { grid-template-columns: repeat(4, 1fr); } }
.sg-stat { background: var(--paper-2); padding: 0.5rem 0.7rem; }
.sg-stat-l { display: block; font-size: var(--fs-xs); color: var(--dim); }
.sg-stat-v { display: block; font-family: var(--mono); font-size: 1.12rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-stat[data-k="balance"] .sg-stat-v { color: var(--indigo); }
.sg-stat[data-k="win"] .sg-stat-v { color: var(--teal); }
.sg-stat[data-k="fs"] .sg-stat-v { color: var(--amber); }

/* ------------------------------------------------------------------- stage */
.sg-stage { display: grid; gap: 1rem; }
@media (min-width: 940px) { .sg-stage { grid-template-columns: 1fr 268px; align-items: start; } }

.sg-cabinet { background: var(--paper-2); border: 1px solid var(--rule-2); padding: 0.7rem; position: relative; }
.sg-reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; background: var(--rule); border: 1px solid var(--rule); padding: 3px; }
.sg-reel { position: relative; height: calc(3 * var(--cell)); overflow: hidden; background: var(--paper); }
.sg-track { display: flex; flex-direction: column; }
.sg-track.is-spinning { animation: sg-scroll 0.26s linear infinite; will-change: transform; }
@keyframes sg-scroll { from { transform: translateY(0); } to { transform: translateY(calc(-1 * var(--cell))); } }
@media (prefers-reduced-motion: reduce) { .sg-track.is-spinning { animation: none; opacity: 0.5; } }

.sg-cell { height: var(--cell); display: grid; place-items: center; border-bottom: 1px solid var(--paper-3); transition: background 0.15s; }
.sg-cell.is-dim { opacity: 0.32; }
.sg-cell.is-win { background: var(--indigo-soft); box-shadow: inset 0 0 0 2px var(--indigo); }
.sg-symbol { width: 86%; height: 86%; display: grid; place-items: center; border-radius: 3px; font-size: clamp(1.1rem, 5vw, 1.75rem); font-weight: 700; border: 1px solid var(--rule); background: var(--paper-2) !important; }
.sg-glyph-txt { font-size: 0.5em; font-weight: 700; font-family: var(--font); }

.sg-msg { margin: 0.6rem 0 0; min-height: 1.5em; font-size: var(--fs-s); display: grid; gap: 0.15rem; }
.sg-coach { color: var(--teal); }
.sg-note { color: var(--dim); font-family: var(--mono); font-size: var(--fs-xs); }
.sg-note.is-win { color: var(--indigo); font-weight: 700; }

/* ---------------------------------------------------------------- controls */
.sg-controls { display: grid; gap: 0.6rem; margin-top: 0.8rem; }
@media (min-width: 640px) { .sg-controls { grid-template-columns: auto 1fr auto; align-items: center; } }
.sg-bet { display: flex; align-items: center; gap: 0.3rem; border: 1px solid var(--rule-2); background: var(--paper-2); padding: 0.25rem; }
.sg-betbtn { width: 40px; height: 40px; border: 1px solid var(--rule); background: var(--paper-3); font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.sg-betbtn:disabled { opacity: 0.35; cursor: not-allowed; }
.sg-betval { display: grid; text-align: center; min-width: 92px; line-height: 1.2; }
.sg-betval-l { font-size: var(--fs-xs); color: var(--dim); }
.sg-betval strong { font-family: var(--mono); font-size: 1rem; }
.sg-spin { font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; background: var(--indigo); color: #fff; border: 0; border-radius: var(--r-s); padding: 0.85rem 1.4rem; min-height: 52px; }
.sg-spin:hover { background: #3b3bc4; }
.sg-spin:disabled { background: var(--rule-2); cursor: progress; }
.sg-auto { display: flex; justify-content: center; }
.sg-autobtn { font: inherit; font-size: var(--fs-s); cursor: pointer; background: var(--paper-2); border: 1px solid var(--rule-2); padding: 0.55rem 1rem; min-height: 44px; color: var(--ink); border-radius: var(--r-s); }
.sg-autobtn.is-on { border-color: var(--red); color: var(--red); }
.sg-autobtn:disabled { opacity: 0.4; }

/* ----------------------------------------------------------------- toolbar */
.sg-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.8rem; }
.sg-tool { font: inherit; font-size: var(--fs-xs); cursor: pointer; background: var(--paper-2); border: 1px solid var(--rule); padding: 0.4rem 0.7rem; min-height: 36px; color: var(--ink); border-radius: var(--r-s); }
.sg-tool:hover { border-color: var(--indigo); color: var(--indigo); }
.sg-tool[aria-pressed="true"] { background: var(--indigo-soft); border-color: var(--indigo); color: var(--indigo); }

/* ------------------------------------------------------------------ panels */
.sg-panel { margin-top: 0.9rem; background: var(--paper-2); border: 1px solid var(--rule-2); padding: 1rem; }
.sg-panel-title { margin-top: 0; font-size: var(--fs-h3); }
.sg-panel-note { font-size: var(--fs-xs); color: var(--dim); }
.sg-panel-close { display: block; margin: 0.8rem 0 0; font: inherit; font-size: var(--fs-s); background: var(--paper-3); border: 1px solid var(--rule-2); padding: 0.45rem 1.1rem; cursor: pointer; min-height: 40px; border-radius: var(--r-s); }
.sg-tablewrap { overflow-x: auto; }
.sg-pt, .sg-hist { font-size: var(--fs-s); min-width: 420px; }
.sg-pt th, .sg-pt td, .sg-hist th, .sg-hist td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--paper-3); text-align: center; font-family: var(--mono); }
.sg-pt th[scope="row"] { display: flex; align-items: center; gap: 0.45rem; text-align: start; font-family: var(--font); font-weight: 600; }
.sg-pt-sym .sg-symbol { width: 30px; height: 30px; font-size: 0.95rem; }
.sg-pt small { color: var(--dim); font-size: 0.68rem; }
.sg-pos { color: var(--teal); font-weight: 700; }
.sg-rules { font-size: var(--fs-s); color: var(--ink-2); }

.sg-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
.sg-line { margin: 0; text-align: center; }
.sg-linegrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); padding: 1px; }
.sg-linegrid i { aspect-ratio: 1; background: var(--paper-2); }
.sg-linegrid i.on { background: var(--indigo); }
.sg-line figcaption { font-family: var(--mono); font-size: 0.66rem; color: var(--dim); margin-top: 0.2rem; }

/* ------------------------------------------------------------ live sidebar */
.sg-side { background: var(--paper-2); border: 1px solid var(--rule-2); padding: 0.9rem; }
.sg-side-title { margin-top: 0; font-size: var(--fs-s); text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.sg-side-list { margin: 0; display: grid; font-size: var(--fs-xs); }
.sg-side-list > div { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.22rem 0; border-bottom: 1px dotted var(--rule); }
.sg-side-list dt { color: var(--dim); margin: 0; }
.sg-side-list dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.sg-side-meter { margin-top: 0.8rem; }
.sg-side-meter-head { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--dim); margin-bottom: 0.25rem; }
.sg-side-meter-head strong { font-family: var(--mono); color: var(--indigo); }
.sg-meter { position: relative; height: 10px; background: var(--paper-3); border: 1px solid var(--rule); }
.sg-meter span { display: block; height: 100%; background: var(--indigo); opacity: 0.8; }
.sg-meter i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--red); }
.sg-side-hint { font-size: 0.68rem; color: var(--dim); margin: 0.5rem 0 0; line-height: 1.6; }

/* ------------------------------------------------------------------ modals */
.sg-modal-layer { position: fixed; inset: 0; z-index: 90; background: rgba(18, 22, 28, 0.55); display: grid; place-items: center; padding: 1rem; }
.sg-modal { background: var(--paper-2); border: 1px solid var(--rule-2); max-width: 440px; width: 100%; max-height: 86vh; overflow-y: auto; }
.sg-modal-body { padding: 1.2rem; }
.sg-modal-title { margin-top: 0; font-size: var(--fs-h3); color: var(--indigo); }
.sg-modal p { font-size: var(--fs-s); color: var(--ink-2); }
.sg-modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.sg-btn-primary, .sg-btn-ghost { font: inherit; font-size: var(--fs-s); font-weight: 600; border-radius: var(--r-s); padding: 0.55rem 1.1rem; cursor: pointer; min-height: 42px; }
.sg-btn-primary { background: var(--indigo); color: #fff; border: 0; }
.sg-btn-ghost { background: var(--paper-2); border: 1px solid var(--rule-2); color: var(--ink); }
.sg-auto-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0.8rem 0; }
.sg-auto-opt { font: inherit; font-family: var(--mono); cursor: pointer; background: var(--paper-2); border: 0; padding: 0.7rem; min-height: 46px; color: var(--ink); }
.sg-auto-opt:hover { background: var(--indigo-soft); }
.sg-sum { list-style: none; padding: 0; margin: 0.6rem 0; font-size: var(--fs-s); }
.sg-sum li { display: flex; justify-content: space-between; padding: 0.28rem 0; border-bottom: 1px dotted var(--rule); }
.sg-sum span { color: var(--dim); }
.sg-sum strong { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sg-sum-note { font-size: var(--fs-xs); color: var(--dim); }
.sg-cta { display: block; text-align: center; background: var(--teal); color: #fff; font-weight: 700; padding: 0.65rem 1.1rem; margin-top: 0.7rem; text-decoration: none; border-radius: var(--r-s); font-size: var(--fs-s); }
.sg-cta:hover { filter: brightness(0.94); text-decoration: none; }
.sg-cta-note { font-size: var(--fs-xs); color: var(--dim); text-align: center; margin: 0.35rem 0 0; }
