/* Emberlowe — game room: frame, stage, dock, big-win layer, demo banner. Engines style themselves. */

.is-room .qt-main { padding-top: var(--qt-s3); }
.qt-room { --qt-accent: var(--qt-ember); margin-bottom: var(--qt-s4); }
.qt-room__shell {
  position: relative; border-radius: var(--qt-r-lg); overflow: hidden; overflow: clip; background: #0b0518;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--qt-line-2), 0 0 60px -30px var(--qt-accent);
}
.qt-room__shell:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.qt-room__shell:fullscreen .qt-stage { flex: 1; min-height: 0; }
.qt-room__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--qt-s3); padding: 10px var(--qt-s3); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent), #140b2a; border-bottom: 1px solid var(--qt-line); }
.qt-room__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.qt-room__id > div { min-width: 0; }
.qt-room__id img { width: 38px; height: 50px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 2px var(--qt-accent); flex: none; }
.qt-room__name { font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.35rem); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-room__by { margin: 0; font-size: 0.78rem; color: var(--qt-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-room__tools { display: flex; gap: 6px; flex: none; }
.qt-room__tools .qt-roundbtn { width: 38px; height: 38px; }
.qt-room__tools .qt-roundbtn[data-sound][aria-pressed="true"] { color: var(--qt-ember); background: rgba(255, 166, 61, 0.14); }
@media (max-width: 480px) { .qt-room__tools [data-full] { display: none; } }

.qt-stage {
  position: relative; min-height: clamp(420px, 62vw, 640px); display: grid; place-items: stretch;
  background: radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.75), transparent 60%), var(--stage-art) center / cover no-repeat, #0b0518;
  isolation: isolate;
}
.qt-stage::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 5, 24, 0.35), rgba(11, 5, 24, 0.15) 30%, rgba(11, 5, 24, 0.55)); z-index: -1; }
.qt-stage__engine { position: relative; display: grid; place-items: center; padding: clamp(10px, 2vw, 22px); min-width: 0; }
.qt-stage__loading { display: flex; align-items: center; padding: 14px 20px; border-radius: 999px; background: var(--qt-panel); font-weight: 700; color: var(--qt-muted); }
.qt-stage__break { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--qt-s3); padding: var(--qt-s5); text-align: center; background: rgba(11, 5, 24, 0.86); }
.qt-stage__break p { max-width: 46ch; color: var(--qt-muted); margin: 0; }
.qt-stage__breaktitle { font-family: var(--qt-display); font-weight: 900; font-size: 1.6rem; color: var(--qt-ink) !important; }

.qt-bigwin { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; background: radial-gradient(circle, rgba(11, 5, 24, 0.55), rgba(11, 5, 24, 0.88)); opacity: 0; transition: opacity 220ms var(--qt-ease); cursor: pointer; }
.qt-bigwin.is-on { opacity: 1; }
.qt-bigwin__label { margin: 0; font-family: var(--qt-display); font-weight: 900; font-size: clamp(2.2rem, 1.4rem + 4vw, 4.4rem); text-transform: uppercase; letter-spacing: 0.04em; background: linear-gradient(180deg, #fff6c2, var(--qt-gold) 45%, #ff9f2e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #7a3b00) drop-shadow(0 18px 30px rgba(255, 159, 46, 0.5)); transform: scale(0.9); transition: transform 320ms cubic-bezier(0.2, 1.4, 0.4, 1); }
.qt-bigwin.is-on .qt-bigwin__label { transform: scale(1); }
.qt-bigwin__value { margin: 6px 0 0; font-family: var(--qt-display); font-weight: 900; font-size: clamp(1.8rem, 1.2rem + 3vw, 3.2rem); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); }

.qt-dock { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--qt-s2) var(--qt-s3); align-items: center; padding: 10px var(--qt-s3); background: linear-gradient(0deg, rgba(255, 255, 255, 0.04), transparent), #140b2a; border-top: 1px solid var(--qt-line); }
.qt-dock__label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--qt-faint); font-weight: 800; }
.qt-dock__value { font-family: var(--qt-display); font-weight: 900; font-size: clamp(0.92rem, 3.4vw, 1.12rem); color: var(--qt-gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qt-dock__win { grid-column: 1 / -1; margin: 0; min-height: 1.4em; text-align: center; font-weight: 900; color: var(--qt-ember); font-variant-numeric: tabular-nums; }
@media (min-width: 720px) { .qt-dock { grid-template-columns: 1fr auto 1fr; } .qt-dock__win { grid-column: auto; grid-row: 1; grid-column-start: 3; text-align: right; } .qt-stake { grid-column-start: 2; grid-row: 1; } }
.qt-stake { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: #0b0518; box-shadow: inset 0 0 0 1px var(--qt-line-2); }
.qt-stake__btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--qt-surface-2); color: var(--qt-ink); font-size: 1.3rem; font-weight: 900; cursor: pointer; transition: background-color 160ms, transform 120ms; }
.qt-stake__btn:hover:not(:disabled) { background: var(--qt-surface-3); }
.qt-stake__btn:active:not(:disabled) { transform: scale(0.92); }
.qt-stake__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qt-stake__box { display: grid; justify-items: center; min-width: 74px; }
.qt-stake__value { font-family: var(--qt-display); font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.qt-demo { display: grid; gap: var(--qt-s3); align-items: center; padding: var(--qt-s4) var(--qt-s5); margin-bottom: var(--qt-s5); border-radius: var(--qt-r); background: linear-gradient(90deg, rgba(255, 207, 74, 0.16), rgba(255, 79, 168, 0.1)), var(--qt-surface); box-shadow: inset 0 0 0 1px rgba(255, 207, 74, 0.45); }
.qt-demo h2 { font-size: 1.15rem; margin-bottom: 4px; color: var(--qt-gold); }
.qt-demo p { margin: 0; color: #e8e0fa; font-size: 0.93rem; }
.qt-demo__cta { display: flex; gap: var(--qt-s2); flex-wrap: wrap; }
@media (min-width: 800px) { .qt-demo { grid-template-columns: 1fr auto; } }

.qt-gameinfo { display: grid; gap: var(--qt-s5); margin: var(--qt-s5) 0; padding: var(--qt-s5); border-radius: var(--qt-r-lg); background: var(--qt-surface); box-shadow: inset 0 0 0 1px var(--qt-line); }
.qt-gameinfo__text p { color: var(--qt-muted); }
@media (min-width: 900px) { .qt-gameinfo { grid-template-columns: 1.6fr 1fr; } }

/* rules page */
.qt-rules { max-width: 980px; margin: 0 auto; }
.qt-rules__head { display: grid; grid-template-columns: auto 1fr; gap: var(--qt-s5); align-items: center; margin-bottom: var(--qt-s5); padding: var(--qt-s5); border-radius: var(--qt-r-lg); background: var(--qt-surface); box-shadow: inset 0 0 0 1px var(--qt-line), 0 0 60px -40px var(--qt-accent); }
.qt-rules__head img { width: 130px; border-radius: 14px; box-shadow: 0 0 0 3px var(--qt-accent); }
.qt-rules__head p { color: var(--qt-muted); }
@media (max-width: 600px) { .qt-rules__head { grid-template-columns: 1fr; } .qt-rules__head img { width: 110px; } }
.qt-rules .qt-prose { margin-bottom: var(--qt-s6); }
.qt-paytable { list-style: none; padding: 0; margin: 0 0 var(--qt-s4); display: grid; gap: 8px; }
@media (min-width: 760px) { .qt-paytable { grid-template-columns: 1fr 1fr; } }
.qt-paytable__row { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--qt-surface); box-shadow: inset 0 0 0 1px var(--qt-line); }
.qt-paytable__face { grid-row: 1 / 3; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 12px; background: radial-gradient(circle, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)); }
.qt-paytable__face img { width: 54px; height: 54px; object-fit: contain; }
.qt-paytable__letter { font-family: var(--qt-display); font-weight: 900; font-size: 1.7rem; background: linear-gradient(180deg, #fff, var(--qt-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qt-paytable__pays { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; color: var(--qt-ink) !important; }
.qt-paytable__pays b { color: var(--qt-accent); }
.qt-paytable__unit { font-size: 0.75rem; color: var(--qt-faint) !important; }
.qt-slots { font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.qt-slots__rows { display: inline-block; min-width: 70px; font-weight: 800; color: var(--qt-accent); }

@media (max-width: 420px) {
  .qt-stake__btn { width: 34px; height: 34px; }
  .qt-stake__box { min-width: 58px; }
  .qt-dock { padding: 8px 10px; }
}

/* keep the whole machine (play area + its buttons + dock) inside one desktop viewport */
@media (min-width: 900px) {
  .qt-stage { min-height: 0; }
  .qt-stage__engine > :first-child {
    width: 100%;
    max-width: min(980px, calc((100svh - 300px) * var(--qt-fit-ratio, 1.6)));
    margin-inline: auto;
  }
  .qt-eng-reels, .qt-eng-holdspin { --qt-fit-ratio: 1.1; }
  .qt-eng-classic { --qt-fit-ratio: 1.15; }
  .qt-eng-cascade { --qt-fit-ratio: 0.95; }
  .qt-eng-scratch { --qt-fit-ratio: 1.25; }
  .qt-eng-blackjack, .qt-eng-videopoker { --qt-fit-ratio: 1.35; }
}
.qt-stage:has(> .qt-stage__break) { min-height: 420px; }
