/* =========================================================================
   slotpickfa.com — slot table skin ("friendly demo").
   Light, rounded, soft-shadowed: the game is a try-before-you-choose step in
   the decision flow rather than the main event, so the chrome stays quiet.
   ========================================================================= */

.sg-root { --cell: 66px; max-width: 780px; 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 { background: var(--mint); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.3rem; text-align: center; }
.sg-menu-title { margin: 0 0 0.25rem; font-size: var(--fs-h3); }
.sg-menu-sub { color: var(--dim); font-size: var(--fs-s); max-width: 50ch; margin-inline: auto; }
.sg-menu-grid { display: grid; gap: 0.7rem; margin-top: 1.1rem; }
@media (min-width: 700px) { .sg-menu-grid { grid-template-columns: repeat(2, 1fr); } }
.sg-mode { display: grid; gap: 0.3rem; text-align: start; cursor: pointer; font: inherit; background: #fff; border: 2px solid var(--line); border-radius: var(--r-m); padding: 1rem; color: var(--ink); box-shadow: var(--shadow-s); }
.sg-mode:hover { border-color: var(--green); }
.sg-mode-tag { font-size: var(--fs-xs); color: var(--coral); font-weight: 800; }
.sg-mode-name { font-size: 1.05rem; font-weight: 800; }
.sg-mode-desc { font-size: var(--fs-s); color: var(--ink-2); line-height: 1.7; }

/* ------------------------------------------------------------------ status */
.sg-status { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 0.8rem; }
@media (min-width: 640px) { .sg-status { grid-template-columns: repeat(4, 1fr); } }
.sg-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 0.55rem 0.7rem; text-align: center; box-shadow: var(--shadow-s); }
.sg-stat-l { display: block; font-size: var(--fs-xs); color: var(--dim); }
.sg-stat-v { display: block; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sg-stat[data-k="balance"] .sg-stat-v { color: var(--green-d); }
.sg-stat[data-k="win"] .sg-stat-v { color: var(--coral); }
.sg-stat[data-k="fs"] .sg-stat-v { color: var(--amber); }

/* ----------------------------------------------------------------- cabinet */
.sg-stage { display: grid; gap: 1rem; }
.sg-cabinet { background: var(--mint); border: 2px solid var(--line); border-radius: var(--r-l); padding: 0.8rem; }
.sg-reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.sg-reel { position: relative; height: calc(3 * var(--cell)); overflow: hidden; border-radius: var(--r-m); background: #fff; border: 1px solid var(--line); }
.sg-track { display: flex; flex-direction: column; }
.sg-track.is-spinning { animation: sg-scroll 0.28s 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; transition: opacity 0.2s; }
.sg-cell.is-dim { opacity: 0.28; }
.sg-cell.is-win .sg-symbol { box-shadow: 0 0 0 3px var(--green); }
.sg-symbol { width: 84%; height: 84%; border-radius: 12px; display: grid; place-items: center; font-size: clamp(1.1rem, 5vw, 1.75rem); font-weight: 800; border: 1px solid var(--line); background: var(--mint) !important; }
.sg-glyph-txt { font-size: 0.52em; font-weight: 800; }

.sg-msg { text-align: center; margin: 0.7rem 0 0.1rem; min-height: 1.6em; font-size: var(--fs-s); display: grid; gap: 0.2rem; }
.sg-coach { color: var(--green-d); font-weight: 600; }
.sg-note { color: var(--dim); }
.sg-note.is-win { color: var(--green-d); font-weight: 800; }

/* ---------------------------------------------------------------- controls */
.sg-controls { display: grid; gap: 0.6rem; margin-top: 0.9rem; align-items: center; }
@media (min-width: 640px) { .sg-controls { grid-template-columns: auto 1fr auto; } }
.sg-bet { display: flex; align-items: center; gap: 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem; }
.sg-betbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--mint); color: var(--ink); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.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-size: 1.02rem; font-variant-numeric: tabular-nums; }
.sg-spin { font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: 0.9rem 1.5rem; min-height: 54px; box-shadow: var(--shadow); }
.sg-spin:hover { background: var(--green-d); }
.sg-spin:disabled { background: var(--line-2); box-shadow: none; cursor: progress; }
.sg-auto { display: flex; justify-content: center; }
.sg-autobtn { font: inherit; font-size: var(--fs-s); font-weight: 700; cursor: pointer; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.6rem 1.1rem; min-height: 44px; }
.sg-autobtn.is-on { border-color: var(--coral); color: var(--coral); }
.sg-autobtn:disabled { opacity: 0.4; }

/* ----------------------------------------------------------------- toolbar */
.sg-toolbar { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 0.9rem; }
.sg-tool { font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; min-height: 38px; }
.sg-tool:hover { border-color: var(--green); color: var(--green-d); }
.sg-tool[aria-pressed="true"] { background: var(--mint-2); border-color: var(--green); color: var(--green-d); }

/* ------------------------------------------------------------------ panels */
.sg-panel { margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 1.1rem; box-shadow: var(--shadow-s); }
.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 auto 0; font: inherit; font-weight: 700; font-size: var(--fs-s); background: var(--mint); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1.3rem; cursor: pointer; min-height: 42px; }
.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.45rem 0.55rem; border-bottom: 1px solid var(--line); text-align: center; }
.sg-pt th[scope="row"] { display: flex; align-items: center; gap: 0.5rem; text-align: start; font-weight: 700; }
.sg-pt-sym .sg-symbol { width: 32px; height: 32px; font-size: 1rem; }
.sg-pt small { color: var(--dim); font-size: 0.7rem; }
.sg-pos { color: var(--green-d); font-weight: 800; }
.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: 2px; background: var(--mint); padding: 3px; border-radius: 8px; }
.sg-linegrid i { aspect-ratio: 1; border-radius: 3px; background: #fff; }
.sg-linegrid i.on { background: var(--green); }
.sg-line figcaption { font-size: 0.7rem; color: var(--dim); margin-top: 0.25rem; }

.sg-side { display: none; }

/* ------------------------------------------------------------------ modals */
.sg-modal-layer { position: fixed; inset: 0; z-index: 90; background: rgba(11, 42, 32, 0.5); display: grid; place-items: center; padding: 1rem; }
.sg-modal { background: #fff; border-radius: var(--r-l); max-width: 440px; width: 100%; box-shadow: var(--shadow); max-height: 86vh; overflow-y: auto; }
.sg-modal-body { padding: 1.3rem; }
.sg-modal-title { margin-top: 0; color: var(--green-d); font-size: var(--fs-h3); }
.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: 1rem; }
.sg-btn-primary, .sg-btn-ghost { font: inherit; font-weight: 800; font-size: var(--fs-s); border-radius: 999px; padding: 0.6rem 1.2rem; cursor: pointer; min-height: 44px; }
.sg-btn-primary { background: var(--green); color: #fff; border: 0; }
.sg-btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.sg-auto-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 0.8rem 0; }
.sg-auto-opt { font: inherit; font-weight: 700; cursor: pointer; background: var(--mint); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-s); padding: 0.7rem; min-height: 46px; }
.sg-auto-opt:hover { border-color: var(--green); }
.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; border-bottom: 1px dashed var(--line); padding: 0.3rem 0; }
.sg-sum span { color: var(--dim); }
.sg-sum strong { 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(--coral); color: #fff; font-weight: 800; border-radius: 999px; padding: 0.7rem 1.2rem; margin-top: 0.8rem; text-decoration: none; }
.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.4rem 0 0; }
