/* ══════════════════════════════════════════════════════════════════════
   IW Mobile Sheet — bottom sheet, scroll-snap cards, container queries
   For heavy panels: studio, factory, modals
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

/* ── Bottom Sheet (Glass L3) ────────────────────────────────────────── */
.mob-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--mob-glass-l2, rgba(18,26,39,0.95));
  backdrop-filter: var(--mob-blur-lg, blur(24px));
  -webkit-backdrop-filter: var(--mob-blur-lg, blur(24px));
  border-top: 1px solid rgba(138,215,255,0.15);
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 -1px 0 rgba(138,215,255,0.1);
}

/* Drag handle */
.mob-sheet::before {
  content: ""; display: block;
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  margin: 12px auto 8px;
}

.mob-sheet-backdrop {
  position: fixed; inset: 0; z-index: 399;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
  transition: opacity var(--mob-dur-f, 180ms) ease;
}

@starting-style { .mob-sheet-backdrop { opacity: 0; } }

/* ── Horizontal scroll-snap cards ───────────────────────────────────── */
.mob-card-scroll {
  display: flex; gap: var(--mob-gap-sm, 10px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px var(--mob-gap-md, 16px);
  margin: 0 calc(-1 * var(--mob-gap-md, 16px));
}
.mob-card-scroll::-webkit-scrollbar { display: none; }
.mob-card-scroll > * { scroll-snap-align: start; flex-shrink: 0; width: min(280px, 75vw); }

/* ── Container queries for adaptive cards ───────────────────────────── */
.mob-card-cq { container-type: inline-size; container-name: mob-card; }

@container mob-card (max-width: 280px) {
  .mob-card-cq .card-meta,
  .mob-card-cq .card-actions { flex-direction: column; gap: 6px; }
  .mob-card-cq .card-title { font-size: var(--mob-font-sm, 13px); }
}

/* ── Studio/Factory full-screen sheet trigger ────────────────────────── */
.mob-factory-trigger {
  position: fixed; bottom: var(--mob-nav-total, 72px); right: 16px;
  right: calc(16px + env(safe-area-inset-right, 0px));
  z-index: 190;
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--eterna-gold, #f0b34a), #d4952a);
  border: none; cursor: pointer; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(240,179,74,0.35), 0 0 0 1px rgba(240,179,74,0.25);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform var(--mob-dur-f, 180ms) ease,
              box-shadow var(--mob-dur-f, 180ms) ease;
}
.mob-factory-trigger:active {
  transform: scale(0.94);
  box-shadow: 0 2px 10px rgba(240,179,74,0.2);
}

/* ── Padding for cards on mobile ─────────────────────────────────────── */
.card, [class*="-card"] { padding: var(--mob-gap-md, 16px); }

/* ── Horizontal scroll for tab strips ───────────────────────────────── */
.tab-strip, .msw {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  display: flex; flex-wrap: nowrap;
}
.tab-strip::-webkit-scrollbar, .msw::-webkit-scrollbar { display: none; }
.tab-strip > *, .msw > * { scroll-snap-align: start; flex-shrink: 0; }

/* ── Fullscreen sections on mobile ───────────────────────────────────── */
.hero-wrap { min-height: 100svh; }

/* ── Focus trap visual cue when drawer open ─────────────────────────── */
body.mob-drawer-open > *:not(.sb):not(.mob-drawer-backdrop) {
  pointer-events: none;
}

} /* end @media */
