/* =====================================================================
   Game satu layar
   Aturan agar soal muat satu layar tanpa scroll.
   ===================================================================== */

/* ===== layar game satu halaman: tanpa scroll, portrait & landscape ===== */

body.in-game {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overscroll-behavior: none;
}

body.in-game .top,
body.in-game .bottom {
  display: none;
}

body.in-game main.wrap {
  padding: 0;
  max-width: none;
}

body.in-game .toast-box {
  bottom: auto;
  top: calc(52px + env(safe-area-inset-top,0px));
}

#v-game.view {
  padding: 0;
}

#v-game:not(.hidden) {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  background-color: var(--sky);
  background-image: var(--pat);
  display: block;
}

.gshell {
  height: 100%;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(6px + env(safe-area-inset-top,0px)) 10px calc(6px + env(safe-area-inset-bottom,0px));
}

.ghead {
  grid-template-columns: auto minmax(0,1fr) auto auto auto;
  gap: 6px;
  margin-bottom: 4px;
}

.ghead .btn {
  min-height: 36px;
  padding: 3px 10px;
  font-size: .88rem;
  border-bottom-width: 4px;
}

.ghead h2 {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghead small {
  font-size: .7rem;
  line-height: 1.2;
}

.ghead .score {
  padding: 2px 10px;
  font-size: .92rem;
}

.ghead .icon-btn {
  width: 34px;
  height: 34px;
  font-size: 1rem;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--night);
}

.icon-btn.on {
  background: var(--mint)!important;
  border-color: var(--mint-d)!important;
  color: #fff!important;
}

.bsm {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.5;
}

.prog {
  margin-bottom: 5px;
  gap: 4px;
}

.prog i {
  height: 8px;
}

#g-timer .timer {
  height: 8px;
  margin-bottom: 5px;
}

#gmain {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#garea {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: auto;
  padding: 18px 2px 4px;
  scrollbar-width: thin;
}

#gfit {
  position: relative;
  margin: auto;
  flex: none;
  width: 100%;
}

#gfit>.stage {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  transform-origin: 0 0;
  padding: 16px 14px;
  gap: 12px;
}

#fb {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 10px calc(8px + env(safe-area-inset-bottom,0px));
  max-height: 46vh;
  max-height: 46dvh;
  pointer-events: none;
}

#fb .fb {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  max-height: 46vh;
  max-height: 46dvh;
  overflow: auto;
  box-shadow: 0 -4px 22px rgba(0,0,0,.28);
}

#fb:empty {
  display: none;
}

#fb .fb {
  padding: 8px 12px;
  gap: 6px;
  border-width: 3px;
  border-radius: 18px;
}

#fb .fb h3 {
  font-size: 1.05rem;
}

#fb .vrow {
  padding: 5px 10px;
}

#fb .vrow .ar {
  font-size: calc(1.25rem*var(--ar-s2,1));
  line-height: 1.8;
}

#fb .vrow .tr {
  font-size: .8rem;
}

#fb .btn-block {
  min-height: 42px;
  padding: 6px 12px;
  font-size: 1rem;
}

.stage .gA,
.stage .gB {
  display: contents;
}

.mcard {
  height: clamp(84px,15vh,132px);
}

.mgrid.n10 {
  grid-template-columns: repeat(4,1fr);
}

.sn-wrap {
  max-width: min(340px,100%);
}
