/* FaithWords v14 — movable board, grouped levels, cleaner level labels */
#themeLabel { display: none !important; }
.scene-copy { top: 14px !important; }
.scene-copy .level-label { display: inline-block; }

/* Keep crossword boards behind the controls and give every level a generous one-finger pan area. */
.crossword-viewport {
  position: relative;
  z-index: 0;
  width: 100%;
  min-width: 0;
  height: clamp(190px, 29dvh, 320px);
  min-height: 190px;
  overflow: hidden;
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  cursor: grab;
  border-radius: 16px;
}
.crossword-viewport.panning { cursor: grabbing; }
.crossword-viewport .crossword {
  width: max-content;
  min-width: max-content;
  min-height: max-content !important;
  padding: 12px;
  margin: 0;
  will-change: transform;
  transform: translate3d(0,0,0);
}
.puzzle-toolbar,
.word-readout-wrap,
.wheel-zone { position: relative; z-index: 2; }
.word-readout-wrap{min-height:38px!important}

/* Level drawer: five independently colored 10-level groups inside one scrollable sheet. */
.level-drawer {
  display: flex !important;
  flex-direction: column;
  height: min(86dvh, 760px) !important;
  max-height: 86dvh !important;
  overflow: hidden !important;
  padding-bottom: max(18px, env(safe-area-inset-bottom)) !important;
}
.drawer-header { flex: 0 0 auto; }
.level-grid {
  display: block !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 3px 22px 0;
  scrollbar-width: thin;
}
.level-group {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(68,58,53,.10);
}
.level-group h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.2;
  color: #4c433e;
}
.level-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
}
.level-group .level-button {
  min-height: 66px;
  padding: 6px;
  background: rgba(255,255,255,.78);
}
.level-group .level-button strong { font-size: 1.14rem; }
.level-group .level-button span { font-family: inherit; font-size: .86rem !important; font-weight: 850; }
.level-group .level-button small { display: none; }
.level-group-1 { background: #f7ded2; }
.level-group-2 { background: #dcebd8; }
.level-group-3 { background: #f1d59f; }
.level-group-4 { background: #cfe7ee; }
.level-group-5 { background: #ddd5ea; }
.level-group-1 h3 { color: #8a4f42; }
.level-group-2 h3 { color: #456345; }
.level-group-3 h3 { color: #7b5526; }
.level-group-4 h3 { color: #315f70; }
.level-group-5 h3 { color: #57476e; }

/* Google progress row follows the existing menu visual language. */
.account-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0 4px;
  margin-top: 5px;
  border-top: 1px solid rgba(68,58,53,.10);
}
.account-copy { min-width: 0; }
.account-copy strong {
  display: block;
  color: #514843;
  font-size: 1rem;
  line-height: 1.2;
}
.account-copy span {
  display: block;
  margin-top: 3px;
  color: #7b6f68;
  font-size: .88rem;
  line-height: 1.35;
}
.google-auth-button {
  min-width: 86px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  background: #fff;
  color: #4d4642;
  box-shadow: inset 0 0 0 1px rgba(68,58,53,.14), 0 4px 12px rgba(60,50,45,.08);
  font-weight: 900;
  cursor: pointer;
}
.google-auth-button.connected { background: #e4eee2; color: #456047; }
.google-auth-button:disabled { opacity: .62; cursor: default; }

@media(max-height:720px){.crossword-viewport{height:180px;min-height:180px}.word-readout-wrap{min-height:28px!important}}
@media (max-width: 365px) {
  .level-group-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .account-row { grid-template-columns: 1fr; }
  .google-auth-button { width: 100%; }
}
