/* Trader Space — phone layout (≤ 768 px). Everything is inside the media query, so desktop is unchanged. */
.nfm-top,.nfm-nav,.nfm-sheet,.nfm-ptr,.nfm-hbtn{display:none;}
@media (max-width:768px){
  /* account: the avatar opens the website's profile menu on every staff page (the old phone avatar menu is retired) */
  body.nftop-on .mobile-user-wrap{display:none !important;}
  body.nftop-on .nftop > .nft-wrap:has(#nftop-me){display:block !important;}
  body.nftop-on .nft-btn.nft-me .nft-chev{display:none;}
  #nftop-me-menu{position:fixed;top:62px;right:10px;left:auto;width:min(300px,calc(100vw - 20px));z-index:4002;}
  .nfm-modi{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;color:var(--nft-tx);font-size:13.5px;padding:10px;border-radius:9px;cursor:pointer;text-align:left;}
  .nfm-modi svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
  /* the sidebar widgets (Online / Events / Suggested / Group chat) are reached from the header icons + banner now */
  .nf-main:not(.nf-org) .nf-right{display:none;}
  body.nfm-lock{overflow:hidden;}
  body.nfm-lock .content,body.nfm-lock .nf-main{overflow:hidden!important;}   /* the Hub scrolls inside .content, not the body: freeze it while a pop-up is open */
  .nfm-sheet{touch-action:none;overscroll-behavior:contain;} .nfm-sh-b{min-height:0;flex:1 1 auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;}

  /* ── header: menu · logo · bell · messenger · online · suggested ── */
  body.nfm-on .topbar .nftop{gap:5px !important;margin:0;}
  body.nfm-on .nftop > #nftop-msg,body.nfm-on .nftop > .nfm-hbtn{display:inline-flex;}
  body.nfm-on .nftop .nft-btn,body.nfm-on .topbar.nf-head-on .nftop .nft-btn{width:34px !important;height:34px !important;min-height:0 !important;border-radius:50% !important;padding:0 !important;}
  body.nfm-on .topbar.nf-head-on{padding:7px 10px;}
  body.nfm-on .topbar.nf-head-on .nf-logo-wrap{flex:0 0 77px;width:77px;}
  body.nfm-on .topbar.nf-head-on .topbar-right{flex:0 1 auto;min-width:0;}
  body.nfm-on .nftop .nft-btn svg{width:18px;height:18px;}
  body.nfm-on .nftop .nft-me{width:34px !important;height:34px !important;}
  body.nfm-on .nftop .nft-me img,body.nfm-on .nftop .nft-me .nft-ini{width:30px !important;height:30px !important;border-radius:50%;font-size:12px;}
  body.nfm-on .nftop .nft-badge{top:-5px;right:-5px;}
  body.nfm-on .nfm-hdot{right:4px;top:5px;}
  .nfm-hbtn{position:relative;}
  .nfm-hdot{position:absolute;right:6px;top:9px;width:8px;height:8px;border-radius:50%;background:#22d67a;border:2px solid #061427;}
  .nft-badge{min-width:15px;height:15px;font-size:9px;padding:0 3px;line-height:15px;}
  #atm-panel{left:0 !important;top:0 !important;width:100vw !important;height:100dvh !important;max-height:none !important;border-radius:0 !important;z-index:4500;}

  /* ── compact composer ── */
  .nfm-top{display:block;}
  .nfm-top[hidden]{display:none;}
  .nfm-bar{margin:8px 0 8px;padding:10px 12px 6px;border-radius:16px;background:rgba(8,31,54,.58);border:1px solid rgba(56,164,226,.28);}
  .nfm-bar[hidden]{display:none;}
  .nfm-bar-top{display:flex;align-items:center;gap:10px;}
  .nfm-bar-in{flex:1;height:38px;border-radius:999px;border:1px solid rgba(56,164,226,.3);background:rgba(2,11,22,.5);color:#9db4cc;font:400 14.5px/1 Inter,system-ui,sans-serif;text-align:left;padding:0 14px;cursor:text;}
  .nfm-bar-acts{display:flex;margin-top:6px;border-top:1px solid rgba(110,161,201,.16);padding-top:2px;}
  .nfm-bar-acts button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;height:38px;border:0;background:none;color:#cfe0f2;font:600 12.5px Inter,system-ui,sans-serif;cursor:pointer;}
  .nfm-bar-acts button:nth-child(1) svg{color:#2fd37d;} .nfm-bar-acts button:nth-child(2) svg{color:#ff6b7f;} .nfm-bar-acts button:nth-child(3) svg{color:#24c7f4;}
  .nfm-av{border-radius:50%;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:700;flex:none;}
  .nfm-avw{position:relative;display:inline-flex;flex:none;}
  .nfm-dot{position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#22d67a;border:2px solid #0a223b;}

  /* the real composer is hidden until opened, then becomes the full-screen New Post */
  #nfc{display:none;}
  #nfc.nfm-full{display:flex;flex-direction:column;position:fixed;inset:0;z-index:3500;margin:0;border-radius:0;border:0;max-width:none !important;width:100% !important;height:100dvh;padding:0 0 env(safe-area-inset-bottom);background:#061427;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;}
  #nfc.nfm-full::before{display:none;}
  .nfm-fh,.nfm-who,.nfm-cap{display:none;}
  #nfc.nfm-full .nfm-fh{display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 8px;border-bottom:1px solid rgba(110,161,201,.18);flex:none;}
  .nfm-fh b{font-size:17px;color:#eaf4ff;}
  .nfm-fh span{width:40px;}
  .nfm-x{width:40px;height:40px;border:0;background:none;color:#cfe0f2;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%;}
  #nfc.nfm-full .nfm-who{display:flex;align-items:center;gap:10px;padding:12px 16px 4px;flex:none;}
  .nfm-who b{display:block;color:#eaf4ff;font-size:15px;}
  .nfm-who small{color:#7fb6e8;font-size:11.5px;text-transform:uppercase;letter-spacing:.4px;}
  #nfc.nfm-full #nfc-text{flex:1;min-height:120px;border:0;background:transparent;font-size:18px;line-height:1.45;padding:10px 16px;resize:none;outline:none;color:#eaf4ff;}
  #nfc.nfm-full .nfc-previews{padding:0 16px 8px;flex:none;max-height:34vh;overflow-y:auto;}
  #nfc.nfm-full .nfc-mn{left:12px;right:12px;}
  #nfc.nfm-full .nfm-cap{display:block;padding:6px 16px 4px;font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:#7f9bb8;flex:none;}
  #nfc.nfm-full .nfc-bar{flex:none;display:flex;flex-direction:column;gap:10px;padding:6px 14px 12px;border-top:1px solid rgba(110,161,201,.14);}
  #nfc.nfm-full .nfc-acts{display:flex;flex-wrap:wrap;gap:8px;}
  #nfc.nfm-full .nfc-post{width:100%;height:46px;font-size:16px;}
  #nfc.nfm-full .nfc-hint,#nfc.nfm-full .nfc-err{padding:0 16px;flex:none;}
  #nfc.nfm-full .nfc-prog{margin:0 16px;flex:none;}

  /* ── Business Promotions | Upcoming Events (one strip, both visible) ── */
  .nfm-strip{display:flex;gap:8px;height:194px;margin:0 0 8px;}
  .nfm-strip[hidden]{display:none;}
  .nfm-half{position:relative;flex:1 1 50%;min-width:0;border-radius:14px;overflow:hidden;border:1px solid rgba(56,164,226,.34);background:rgba(8,31,54,.78);}
  .nfm-bt{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;}
  .nfm-bt::-webkit-scrollbar{display:none;}
  /* one box per item: the picture on top (label at its upper left), the name, date and a small button below */
  .nfm-bs{flex:0 0 100%;scroll-snap-align:start;display:flex;flex-direction:column;color:#f4f8ff;min-width:0;}
  .nfm-img{position:relative;flex:none;height:104px;overflow:hidden;background:#06223f;}
  .nfm-img.noart{background:linear-gradient(135deg,#0b3a6b,#06223f);}
  .nfm-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
  .nfm-bl{position:absolute;left:6px;top:6px;font-size:8px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;padding:2px 6px;border-radius:999px;background:rgba(21,151,255,.92);color:#fff;}
  .nfm-bsb{flex:1;min-height:0;display:flex;flex-direction:column;gap:2px;padding:6px 8px 18px;}
  .nfm-bsb h4{margin:0;font-size:11.5px;line-height:1.25;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .nfm-bsb p{margin:0;font-size:10px;line-height:1.3;color:#9fb6cd;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;}
  .nfm-bd{display:flex;align-items:center;gap:4px;font-size:9.5px;color:#9fd2ff;white-space:nowrap;}
  .nfm-bd svg{flex:none;width:12px;height:12px;}
  .nfm-strip .nfm-bc{align-self:flex-start;margin-top:auto;height:22px !important;min-height:0 !important;padding:0 10px !important;font-size:10px !important;line-height:1 !important;width:auto !important;border-radius:999px !important;box-shadow:none !important;border:1px solid rgba(80,180,255,.7);background:rgba(21,151,255,.25);color:#fff;font-family:Inter,system-ui,sans-serif;font-weight:700;cursor:pointer;}
  .nfm-bdots{position:absolute;left:0;right:0;top:92px;display:flex;justify-content:center;gap:4px;pointer-events:none;}
  .nfm-bdots i{width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.45);transition:all .25s ease;}
  .nfm-bdots i.on{width:14px;border-radius:3px;background:#2f9bff;}

  /* ── category pills ── */
  .nfm-pills{display:flex;gap:8px;overflow-x:auto;margin:0 -12px 10px;padding:2px 12px;scrollbar-width:none;}
  .nfm-pills::-webkit-scrollbar{display:none;}
  .nfm-pills button{flex:none;height:34px;padding:0 14px;border-radius:999px;border:1px solid rgba(56,164,226,.26);background:rgba(8,31,54,.6);color:#b9cde2;font:600 13px Inter,system-ui,sans-serif;cursor:pointer;transition:background .2s,color .2s,border-color .2s;white-space:nowrap;}
  .nfm-pills button.on{background:#1d8bff;border-color:#4aa8ff;color:#fff;box-shadow:0 0 12px rgba(29,139,255,.45);}

  /* ── feed: tighter cards, no big gaps ── */
  body.nfm-on .nf-main{padding:0 10px;}
  body.nfm-on .nf-center .nfp{margin-bottom:10px;border-radius:14px;}
  body.nfm-on .nfp-media img,body.nfm-on .nfp-media video{max-width:100%;height:auto;}
  .nfm-ptr{display:block;height:0;overflow:hidden;text-align:center;font-size:12px;color:#7fb6e8;transition:height .15s;}
  .nfm-ptr span{display:block;padding-top:8px;opacity:.6;} .nfm-ptr.go span{opacity:1;}

  /* ── bottom navigation ── */
  body.nfm-on .content{padding-bottom:calc(68px + env(safe-area-inset-bottom));}
  body.nfm-on .nfm-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;height:calc(58px + env(safe-area-inset-bottom));padding:0 4px env(safe-area-inset-bottom);align-items:center;justify-content:space-around;background:rgba(5,17,34,.94);border-top:1px solid rgba(56,164,226,.26);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);}
  .nfm-nav button{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:50px;border:0;background:none;color:#8fa8c2;font:600 10px Inter,system-ui,sans-serif;cursor:pointer;}
  .nfm-nav button.on{color:#2f9bff;}
  .nfm-nav button.on svg{filter:drop-shadow(0 0 5px rgba(29,139,255,.55));}
  .nfm-nav .nfm-add{flex:none;width:48px;height:36px;border-radius:12px;background:linear-gradient(180deg,#2f9bff,#1269d3);color:#fff;box-shadow:0 0 14px rgba(29,139,255,.5);}
  .nfm-nav em{position:absolute;top:2px;left:calc(50% + 4px);min-width:15px;height:15px;border-radius:8px;background:#e5334f;color:#fff;font:700 9px/15px Inter,system-ui,sans-serif;text-align:center;padding:0 3px;font-style:normal;}
  .nfm-nav em[hidden]{display:none;}

  /* ── bottom sheets ── */
  .nfm-sheet{display:flex;position:fixed;inset:0;z-index:3600;background:rgba(1,8,18,.62);align-items:flex-end;}
  .nfm-sh-box{width:100%;max-height:78dvh;display:flex;flex-direction:column;background:linear-gradient(180deg,#0b2340,#061427);border:1px solid rgba(56,164,226,.3);border-bottom:0;border-radius:20px 20px 0 0;padding:6px 14px calc(14px + env(safe-area-inset-bottom));animation:nfmUp .22s ease-out both;}
  @keyframes nfmUp{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
  .nfm-sh-grip{width:38px;height:4px;border-radius:2px;background:rgba(255,255,255,.22);margin:2px auto 6px;}
  .nfm-sh-h{display:flex;align-items:center;justify-content:space-between;color:#eaf4ff;font-size:17px;}
  .nfm-sh-b{overflow-y:auto;overscroll-behavior:contain;padding-top:4px;}
  .nfm-sub{margin:0 0 6px;font-size:12px;color:#7fb6e8;}
  .nfm-list{list-style:none;margin:0;padding:0;}
  .nfm-list li{display:flex;align-items:center;gap:8px;}
  .nfm-row{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:8px 2px;border:0;background:none;color:#eaf4ff;text-align:left;cursor:pointer;font:600 14.5px Inter,system-ui,sans-serif;}
  .nfm-nm{display:flex;flex-direction:column;min-width:0;} .nfm-nm small{font-size:11px;color:#7fb6e8;font-weight:500;text-transform:uppercase;letter-spacing:.3px;}
  .nfm-fol{flex:none;height:32px;padding:0 14px;border-radius:999px;border:1px solid #2f9bff;background:#1d8bff;color:#fff;font:700 12.5px Inter,system-ui,sans-serif;cursor:pointer;}
  .nfm-fol.on{background:transparent;color:#9fd2ff;}
  .nfm-all{width:100%;height:42px;margin-top:8px;border-radius:12px;border:1px solid rgba(56,164,226,.4);background:rgba(21,151,255,.14);color:#cfe8ff;font:700 13.5px Inter,system-ui,sans-serif;cursor:pointer;}
  .nfm-ec-f{display:flex;gap:6px;margin:2px 0 6px;} .nfm-ec-f button{flex:1;height:32px;border-radius:999px;border:1px solid rgba(56,164,226,.3);background:rgba(14,43,70,.5);color:#9fc3e6;font:600 12.5px Inter,system-ui,sans-serif;} .nfm-ec-f button.on{background:rgba(21,151,255,.28);color:#fff;border-color:rgba(0,190,255,.55);}
  .nfm-ec{display:flex;gap:12px;align-items:center;padding:10px 12px;margin:8px 0;border-radius:14px;background:rgba(14,43,70,.55);border:1px solid rgba(56,164,226,.2);}
  .nfm-ec-d{flex:none;width:46px;padding:7px 0 5px;border-radius:10px;background:#031327;border-top:3px solid var(--c);text-align:center;color:#eaf4ff;} .nfm-ec-d small{display:block;font-size:10.5px;letter-spacing:.4px;color:#9fc3e6;} .nfm-ec-d b{font-size:20px;line-height:1.1;}
  .nfm-ec-m{min-width:0;display:flex;flex-direction:column;gap:5px;} .nfm-ec-m strong{color:#eaf4ff;font:700 15px/1.25 Inter,system-ui,sans-serif;}
  .nfm-ec-t{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;color:#8fb2d6;} .nfm-ec-t i{font-style:normal;padding:2px 9px;border-radius:999px;background:rgba(255,255,255,.08);color:var(--c);font-weight:700;} .nfm-ec-t em{font-style:normal;}
  .nfm-empty{margin:14px 0;text-align:center;color:#8fa8c2;font-size:13.5px;}
}
@media (prefers-reduced-motion:reduce){.nfm-sh-box{animation:none;}.nfm-bdots i,.nfm-pills button{transition:none;}}
