/* 2.2 quiz / casual shells — keep docks and answers above the host badge. */
.quiz-shell, .casual-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  gap: .35rem;
}
body.in-game .play-wrap:has(.quiz-shell),
body.in-game .play-wrap:has(.casual-shell) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.in-game .play-wrap:has(.quiz-shell) .game-mount,
body.in-game .play-wrap:has(.casual-shell) .game-mount {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.quiz-shell > .puzzle-toolbar,
.casual-shell > .puzzle-toolbar,
.quiz-shell > .game-status,
.casual-shell > .game-status,
.quiz-hud {
  flex: 0 0 auto;
  width: 100%;
}
.quiz-stage, .casual-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.quiz-dock, .casual-dock {
  flex: 0 0 auto;
  width: 100%;
  z-index: 8;
  padding: .3rem .2rem .35rem;
  background: linear-gradient(180deg, transparent, rgba(8, 18, 14, .94) 22%);
}
.quiz-q {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  padding: .4rem .6rem;
  text-align: center;
}
.quiz-sub { opacity: .85; font-size: .9rem; text-align: center; padding: 0 .6rem .3rem; }
.quiz-answers, .quiz-dock .quiz-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}
.quiz-answer, .quiz-dock [data-act] {
  min-height: var(--tap, 2.6rem);
  padding: .45rem .6rem;
  text-align: start;
  font-weight: 650;
  white-space: normal;
}
.quiz-answers.cols-1 { grid-template-columns: 1fr; }
.quiz-ladder {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  max-width: 16rem;
  margin: .2rem auto;
  font-size: .75rem;
}
.quiz-ladder span { display: block; padding: .15rem .4rem; border-radius: 6px; border: 1px solid var(--line, #c9a22744); text-align: center; }
.quiz-ladder span.on { background: rgba(232, 200, 106, .25); font-weight: 700; }
.quiz-ladder span.got { opacity: .45; text-decoration: line-through; }
.quiz-board {
  display: grid;
  gap: .3rem;
  padding: .3rem;
}
.quiz-board button { min-height: 2.4rem; }
.tune-staff { display: flex; justify-content: center; gap: .35rem; padding: .6rem; font-size: 1.4rem; letter-spacing: .1em; }
.casual-grid {
  display: grid;
  gap: 3px;
  margin: 0 auto;
  width: max-content;
  max-width: 100%;
}
.casual-cell, .vial, .bin-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  touch-action: manipulation;
  font-weight: 800;
}
.casual-cell { width: var(--cs-cell, 2rem); height: var(--cs-cell, 2rem); border-radius: 6px; background: #f7f1e4; color: #1b2a41; }
.casual-cell.on, .casual-cell.selected, .vial.selected { outline: 2px solid #e8c86a; }
.casual-cell.gone { visibility: hidden; pointer-events: none; }
.vial-row { display: flex; gap: .4rem; justify-content: center; align-items: flex-end; flex-wrap: wrap; padding: .3rem; }
.vial {
  flex-direction: column-reverse;
  width: 2rem;
  min-height: 8rem;
  border: 2px solid #e8d48b;
  border-radius: 0 0 10px 10px;
  padding: 2px;
  gap: 2px;
  background: rgba(255,255,255,.06);
}
.vial.on { outline: 2px solid #e8c86a; }
.vial i { display: block; width: 100%; height: 1.05rem; border-radius: 3px; }
.scene-field { position: relative; width: 100%; min-height: 14rem; }
.scene-item { position: absolute; min-width: 1.8rem; min-height: 1.8rem; font-size: 1.2rem; background: transparent; border: 0; cursor: pointer; }
.spot-list { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; padding: .2rem; }
.spot-list span.got { text-decoration: line-through; opacity: .5; }
@media (max-width: 430px) {
  .quiz-q { font-size: .98rem; padding: .3rem .45rem; }
  .quiz-answers { gap: .3rem; }
}

.tune-staff { font-size: 2rem; letter-spacing: .35em; text-align: center; margin: .4rem 0; }
.tune-hint { text-align: center; margin: .35rem 0 .5rem; }
.quiz-stage [data-act="playtune"] { display: block; width: min(100%, 20rem); margin: .4rem auto .8rem; font-size: 1.05rem; padding: .7rem 1rem; }
