/* Mobile layout overrides — keeps DJ Mixes dark theme, maximizes video list area */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.mobile {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

body.mobile.chrome-immersive .mobile-shell-bar,
body.mobile.chrome-immersive .mobile-panel {
  display: none !important;
}

body.mobile.chrome-immersive main {
  flex: 1 1 auto;
}

.mobile-shell-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  background: #141821;
  border-bottom: 1px solid #222837;
  z-index: 25;
}

.mobile-shell-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
}

.mobile-shell-brand {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f2f4f8;
  line-height: 1.2;
}

.mobile-shell-meta {
  font-size: 0.68rem;
  color: #8f98a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mobile-shell-btn {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-width: 2.6rem;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  border: 1px solid #2c3448;
  background: #1a1f2b;
  color: #b5bcc9;
  font-size: 0.62rem;
  cursor: pointer;
}

.mobile-shell-btn.is-open {
  border-color: #5b7cfa;
  color: #c8d4ff;
  background: #1e2640;
}

.mobile-shell-btn.is-open .mobile-shell-icon {
  color: #5b7cfa;
}

.mobile-shell-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.mobile-shell-btn-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-chrome-hint {
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.68rem;
  text-align: center;
  color: #8f98a6;
  background: rgba(20, 24, 33, 0.92);
  border-bottom: 1px solid #222837;
}

.mobile-panel {
  flex-shrink: 0;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #222837;
  background: #141821;
}

.mobile-bottom-panel {
  border-bottom: none;
  border-top: 1px solid #222837;
  max-height: min(28vh, 200px);
}

.mobile-panel.is-collapsed {
  display: none;
}

.mobile .page-header.mobile-header {
  padding: 0.45rem 0.65rem;
  gap: 0.35rem;
}

.mobile .page-header.mobile-header h1 {
  font-size: 0.95rem;
}

.mobile .mobile-footer {
  padding: 0.45rem 0.65rem;
  gap: 0.35rem;
}

.mobile .counts {
  font-size: 0.72rem;
}

.mobile-toolbar-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

.mobile-toolbar-scroll::-webkit-scrollbar {
  display: none;
}

.mobile .toolbar.mobile-toolbar-scroll .btn,
.mobile .header-top-actions .btn,
.mobile .filter-item-nav .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.28rem 0.5rem;
  font-size: 0.68rem;
}

.mobile .filter-bar.mobile-filter {
  padding: 0.4rem 0.65rem;
  gap: 0.4rem;
}

.mobile .filter-item {
  font-size: 0.72rem;
}

.mobile-download-activity-wrap {
  flex-shrink: 0;
  margin: 0 0.5rem 0.35rem;
  padding: 0 0.15rem;
}

.mobile-download-activity-wrap .download-activity-header {
  margin-bottom: 0.25rem;
}

.mobile-download-activity {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
}

body.mobile main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body.mobile .list {
  padding: 0.45rem 0.55rem 0.75rem;
  gap: 0.65rem;
}

.mobile-card {
  border-radius: 12px;
  overflow: hidden;
  align-items: center;
}

.mobile-thumb-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.4rem 0 0.2rem;
  background: #141821;
  box-sizing: border-box;
}

/* Beat styles.css .mobile-card .thumb { 96px × 72px } — use viewport width */
body.mobile .mobile-card .thumb.mobile-thumb,
body.mobile .mobile-card a.mobile-thumb {
  display: block;
  position: relative;
  flex: none !important;
  width: 80vw !important;
  max-width: 80vw !important;
  min-width: 0;
  height: auto !important;
  min-height: 0;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0c10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

body.mobile .mobile-card .thumb.mobile-thumb img,
body.mobile .mobile-card a.mobile-thumb img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center;
}

.mobile-thumb .status {
  bottom: 0.4rem;
  left: 0.4rem;
  font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
}

.mobile-thumb-checkbox {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  margin: 0;
  padding: 0.25rem 0.35rem;
  border-radius: 8px;
  background: rgba(15, 17, 21, 0.78);
  backdrop-filter: blur(4px);
}

.mobile-thumb-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
}

.mobile-card-body {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem 0.65rem;
  gap: 0.35rem;
}

.mobile-card-body h2 {
  font-size: 0.88rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mobile-card-body .meta {
  font-size: 0.72rem;
}

.mobile-actions-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 0.25rem;
  padding-bottom: 0.1rem;
}

.mobile-actions-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-actions-scroll .btn {
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
}

/* Hide legacy chrome bar if present */
.mobile-chrome-bar {
  display: none !important;
}

.mobile-row {
  display: contents;
}

.mobile-download-activity .download-activity-row {
  font-size: 0.72rem;
}

#dl-started,
#dl-eta {
  font-variant-numeric: tabular-nums;
}
