/* ═══════════════════════════════════════════════════════════════════════════
   mobile.css — Full-Screen Focused Reader Layout (Notes & Practice are 1-click windows)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 3D Containers (always hidden — 3D mode disabled) ────────────────────── */
#webgl-container,
#css3d-container {
  display: none !important;
}

/* ── Main 2D Reader Container ────────────────────────────────────────────── */
#lite-2d-container,
#main-content {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  display: flex !important;
  justify-content: center;
  padding-top: calc(var(--header-h, 48px) + 4px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(0.6rem + env(safe-area-inset-left, 0px));
  padding-right: calc(0.6rem + env(safe-area-inset-right, 0px));
}

/* Left & Right slots are no longer used — both live in 1-click popup windows */
#lite-left-slot,
#lite-right-slot {
  display: none !important;
}

/* Center Reader fills full comfortable reading width */
#lite-center-slot {
  width: 100%;
  max-width: 980px;
  height: 100%;
  overflow: hidden;
  display: flex;
  min-width: 0;
}

#lite-center-slot > .eco-3d-panel {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}

/* Mobile spacing (no mobile-tabs bar needed since top header & dock open both windows in 1 click) */
@media (max-width: 767px) {
  #lite-2d-container,
  #main-content {
    padding-top: calc(var(--header-h, 44px) + 3px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

/* ── Panel base sizing ───────────────────────────────────────────────────── */
#left-panel-dom,
#center-panel-dom,
#right-panel-dom {
  width: 100%;
  height: 100%;
  min-width: 0;
  flex: 1;
}

/* ── Posts list in Syllabus & Practice popup windows ─────────────────────── */
#left-posts-list,
#right-practice-list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ── Center Reader Body ──────────────────────────────────────────────────── */
#center-reader-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
  #center-reader-body {
    padding: 0.85rem 0.85rem;
  }
}

/* ── Left tag cloud height constraints (horizontal single-row scroll) ───── */
#left-tag-cloud {
  max-height: none;
}
@media (max-width: 767px) {
  #left-tag-cloud {
    max-height: none;
  }
}

/* ── Hidden legacy elements ──────────────────────────────────────────────── */
#camera-controls-bar,
#mobile-tabs,
.swipe-hint {
  display: none !important;
}

/* ── Smooth scrolling & touch scrolling ─────────────────────────────────── */
.panel-scroll {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* ── No-scrollbar utility ────────────────────────────────────────────────── */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ── Touch tap highlight removal ─────────────────────────────────────────── */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* ── Global score badge responsive ──────────────────────────────────────── */
.score-pill-hud { display: none; }
@media (min-width: 1180px) {
  .score-pill-hud { display: flex; }
}

/* ── Blogger button text responsive ─────────────────────────────────────── */
.blogger-btn-text { display: none; }
@media (min-width: 768px) { .blogger-btn-text { display: inline; } }

/* ── ECO Panel internal layout ───────────────────────────────────────────── */
.eco-3d-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
