/* ============================================================
   02-select-chrome.css — Card-selection phase: fixed chrome and scroll areas
   ============================================================ */

body.in-select {
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

body.in-select #tab-home {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100dvh - var(--nav-h, 58px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - var(--nav-h, 58px) - env(safe-area-inset-bottom, 0px)) !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

body.in-select .header,
body.in-select .select-chrome {
  flex: 0 0 auto !important;
  position: relative !important;
  top: auto !important;
  background: var(--bg);
  z-index: 20;
}

body.in-select .select-chrome {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* Scrollable middle: numbers only */
body.in-select #phase-select {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  display: block !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body.in-select .board-wrap {
  padding: 8px 6px 16px !important;
  overflow: visible !important;
  height: auto !important;
  min-height: auto !important;
}

/* Card docked under the scroll area, always visible */
body.in-select #card-preview.card-preview {
  flex: 0 0 auto !important;
  order: 0;
  margin: 0 !important;
  padding: 8px 0 !important;
  width: 100% !important;
  max-height: min(36vh, 260px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg) !important;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 14px rgba(0,0,0,.35);
  z-index: 16;
}

body.in-select #card-preview.card-preview.show { display: block !important; }

body.in-select #card-preview.card-preview:not(.show) {
  display: none !important;
  max-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Share CTA + select footer hidden per product request */
body.in-select #select-footer,
#select-footer {
  display: none !important;
}

body.in-select #card-preview.show ~ #select-footer .select-hint { display: none; }

body.in-select #phase-game { display: none !important; }

body.in-game .select-chrome { display: none; }

body.in-game #card-preview,
body.in-game #select-footer {
  display: none !important;
}
