/* ============================================================
   MWS Coffee — адаптив для телефона и планшета (ширина < 900px).
   На ТВ/десктопе (≥900px) не действует — там пиксель-точная сцена 1920×1080.
   fitStage() на <900px ставит transform:none, дальше рулит этот файл.
   ============================================================ */
@media (max-width: 899px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; background: #eef0f3; -webkit-text-size-adjust: 100%; }

  /* фон-кубы — фиксированным «ковром», приглушённо, чтобы не мешал тексту */
  .bg { position: fixed !important; inset: 0; width: 100vw !important; height: 100vh !important; object-fit: cover; opacity: .45; z-index: 0; }

  /* сцена/экран — обычный поток, во всю ширину, со скроллом */
  #stage, .stage { position: static !important; display: block !important; width: 100% !important; height: auto !important; min-height: 100vh; place-items: initial !important; background: transparent !important; }
  #screen { width: 100% !important; height: auto !important; min-height: 100vh; transform: none !important; display: block !important; overflow: visible !important; }

  /* логотип — компактный, фиксирован в правом верхнем углу */
  .logo { position: fixed !important; top: 0 !important; right: 0 !important; width: 64px !important; height: 64px !important; z-index: 30; }

  /* ===== ВКЛАДКИ (меню / заказ / статистика) ===== */
  .tabs { position: static !important; width: 100% !important; height: auto !important; padding: 16px 70px 10px 14px !important; justify-content: flex-start !important; }
  .tablist { flex-wrap: wrap; gap: 8px !important; }
  .tab { font-size: 17px !important; line-height: 1 !important; padding: 9px 16px !important; letter-spacing: 0 !important; border-radius: 999px !important; }

  /* ===== ХАБ ===== */
  .hub { position: static !important; padding: 80px 16px 32px !important; min-height: 100vh; justify-content: center !important; }
  .new-wrap { width: 100% !important; }
  .new-row { grid-template-columns: 1fr !important; max-width: none !important; gap: 14px !important; margin: 0 !important; }
  .new-row .new-card { min-height: 110px !important; padding: 22px !important; }
  .new-row .new-card .nc-t { font-size: 40px !important; }

  /* ===== МЕНЮ — вертикальный список карточек ===== */
  .grid { position: static !important; display: block !important; width: 100% !important; height: auto !important; padding: 6px 14px 28px !important; gap: 0 !important; transform: none !important; opacity: 1 !important; }
  .mcat { font-family: var(--f); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 22px 4px 8px; }
  .mcard { height: auto !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 16px !important; padding: 14px 4px !important; border-bottom: 1px solid rgba(19,25,36,.08); }
  .mphoto { padding: 0 !important; flex: 0 0 96px !important; }
  .mphoto img { height: 96px !important; filter: drop-shadow(0 10px 16px rgba(60,30,30,.16)) !important; }
  .mname { align-items: flex-start !important; text-align: left !important; gap: 5px !important; flex: 1 1 auto; max-width: none !important; min-width: 0; }
  .mname .nm { font-size: 24px !important; line-height: 1.1 !important; white-space: normal !important; }
  .mname .desc { font-size: 14px !important; line-height: 1.3 !important; max-width: none !important; -webkit-line-clamp: 3; }
  .pager { display: none !important; }
  .mempty { font-size: 22px !important; padding: 60px 16px !important; }

  /* ===== ОЧЕРЕДЬ — две секции стопкой ===== */
  .board { position: static !important; display: block !important; width: 100% !important; height: auto !important; padding: 70px 14px 8px !important; gap: 0 !important; }
  .qcard { height: auto !important; gap: 12px !important; overflow: visible !important; margin-bottom: 26px; }
  .qtitle { font-size: 26px !important; }
  .qlist { gap: 10px !important; }
  .qrow { height: auto !important; gap: 12px !important; }
  .qnum { width: 60px !important; min-height: 54px; border-radius: 12px !important; }
  .qnum p { font-size: 28px !important; line-height: 1 !important; }
  .qname { font-size: 21px !important; }
  .qrole { font-size: 16px !important; }
  .empty { font-size: 18px !important; }
  .qr-foot { position: static !important; width: 100% !important; padding: 14px !important; gap: 16px !important; }
  .qbox { width: 92px !important; height: 92px !important; padding: 8px !important; }
  .qfoot-txt { font-size: 18px !important; }

  /* ===== ДАШБОРД — карточки стопкой ===== */
  .row-top { display: block !important; height: auto !important; }
  .col-left { display: block !important; }
  .kpi-row { display: flex !important; height: auto !important; gap: 12px !important; }
  .scard { padding: 18px !important; border-radius: 20px !important; margin-bottom: 12px; }
  .kpi .num { font-size: 52px !important; line-height: 1 !important; letter-spacing: -1px !important; }
  .lbl { font-size: 14px !important; line-height: 1.2 !important; }
  .r { padding: 10px 14px !important; }
  .r .rk { font-size: 20px !important; width: 28px !important; }
  .r .pic { width: 40px !important; height: 40px !important; }
  .r .pic img { width: 34px !important; height: 34px !important; }
  .r .nm { font-size: 18px !important; }
  .r .cnt b { font-size: 20px !important; }
  .r .cnt span { font-size: 12px !important; }
  .chartcard { height: 320px !important; }
  .chart { padding-top: 28px !important; padding-bottom: 28px !important; }
  .bhour, .bval { font-size: 13px !important; }
  .bhour { bottom: -22px !important; }
  .srow { flex-wrap: wrap !important; gap: 16px !important; }
  .smetric { flex: 1 0 42% !important; gap: 14px !important; }
  .gauge-img { width: 84px !important; height: 50px !important; }
  .stext .val { font-size: 30px !important; line-height: 1 !important; }
  .stext .t { font-size: 15px !important; }
  .vdiv { display: none !important; }

  /* ===== ОНЛАЙН ЗАКАЗ ===== */
  .qr-title p { font-size: 30px !important; line-height: 1.25 !important; }
  .qr-box { width: 78vw !important; height: 78vw !important; max-width: 420px !important; max-height: 420px !important; padding: 16px !important; border-radius: 20px !important; }
}

/* Узкий телефон — ещё компактнее */
@media (max-width: 420px) {
  .new-row .new-card .nc-t { font-size: 34px !important; }
  .tab { font-size: 15px !important; padding: 8px 13px !important; }
  .mname .nm { font-size: 21px !important; }
  .qname { font-size: 19px !important; }
  .kpi .num { font-size: 44px !important; }
}
