/* =====================================================================
   MastersCash — MOBILE APP SHELL (m3). Only active when <body class="m3">
   (preview cookie mc_m3=1, or app_settings mobile_v3=1) AND viewport <= 820px.
   Desktop is untouched. Built from the approved mobile mockup.
   ===================================================================== */
.m3-brand,.m3-search{display:none}

@media (max-width: 820px) {
  html body.theme-v2.m3{background:#000}

  /* ---------- APP HEADER ---------- */
  html body.m3 .topbar.topbar-merged{
    position:sticky;top:0;z-index:300;height:64px;box-sizing:border-box;padding:0 12px!important;gap:8px!important;
    background:rgba(0,0,0,.92)!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
    border-bottom:1px solid #1a1a1a!important;display:flex;align-items:center;
  }
  html body.m3.chat-page .topbar.topbar-merged{position:fixed;left:0;right:0}
  html body.m3 .topmenu-inline{display:none!important}
  html body.m3 .search.search-sm{display:none!important}
  html body.m3 .hamburger{
    display:flex!important;width:40px;height:40px;border-radius:12px;border:1px solid #222;background:#0f0f0f;
    align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:0;margin:0;flex:none;
  }
  html body.m3 .hamburger span{display:block;width:18px;height:2px;border-radius:2px;background:#e8e8ea}
  html body.m3 .hamburger span:last-child{width:12px;align-self:flex-start;margin-left:11px}
  html body.m3 .m3-brand{
    display:flex;align-items:center;gap:7px;flex:1;min-width:0;text-decoration:none;
    font-family:var(--font-display),'Outfit',system-ui,sans-serif;font-weight:800;font-size:19px;letter-spacing:-.01em;color:#fff;
  }
  html body.m3 .m3-brand svg{width:22px;height:22px;color:var(--gold,#c9a961);flex:none}
  html body.m3 .m3-brand b{color:var(--gold-2,#e2c784);font-weight:800}
  html body.m3 .topbar-right{margin-left:auto;display:flex;align-items:center;gap:8px}
  html body.m3 .topnav{display:flex;align-items:center;gap:8px}
  html body.m3 .topnav .nav-ico,html body.m3 .m3-search{
    display:flex!important;width:40px;height:40px;border-radius:12px;border:1px solid #222;background:#0f0f0f;color:#e8e8ea!important;
    align-items:center;justify-content:center;font-size:17px;line-height:1;position:relative;padding:0;text-decoration:none;
  }
  html body.m3 .m3-search svg{width:18px;height:18px}
  html body.m3 .nav-badge{
    position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;border-radius:9px;background:var(--gold,#c9a961);color:#111;
    font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px;box-sizing:border-box;border:0;
  }
  html body.m3 .topuser{width:40px;height:40px;padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:center}
  html body.m3 .topuser-av{width:40px;height:40px;border-radius:50%;border:2px solid var(--gold,#c9a961);box-sizing:border-box}
  html body.m3 .topuser-name,html body.m3 .topuser-caret{display:none!important}
  html body.m3 .acctmenu{position:fixed;top:72px;right:12px;left:12px;min-width:0;border-radius:16px;z-index:320}
  html body.m3 .notif-dropdown{position:fixed;top:72px;right:12px;left:12px;border-radius:16px;z-index:320}
  html body.m3 .chat-count-tab{display:none!important}
  html body.m3 .imp-banner{font-size:12px}

  /* ---------- CONTENT ---------- */
  html body.m3 .content{padding:0 0 100px!important}
  html body.m3 .zone-header,html body.m3 .zone-footer{padding:0 12px}
  html body.m3 .sitefooter{padding:10px 16px 20px;font-size:12px}

  /* ---------- BOTTOM TAB BAR ---------- */
  html body.m3 .mobile-tabs{
    display:flex!important;position:fixed;left:0;right:0;bottom:0;z-index:330;height:auto!important;box-sizing:border-box;
    padding:10px 8px calc(10px + env(safe-area-inset-bottom))!important;background:rgba(8,8,10,.96)!important;
    backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid #1f1f1f!important;align-items:flex-start;justify-content:space-around;
  }
  html body.m3 .mtab{
    flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;color:#8a8a92!important;font-size:10.5px;font-weight:600;
    text-decoration:none;position:relative;padding:0;margin:0;
  }
  html body.m3 .mtab span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  html body.m3 .mtab-ico{font-size:22px;line-height:1;height:26px;display:flex;align-items:center;justify-content:center}
  html body.m3 .mtab-ico i,html body.m3 .mtab-ico svg{width:24px;height:24px}
  html body.m3 .mtab.active,html body.m3 .mtab.m3-current{color:var(--gold-2,#e2c784)!important}
  html body.m3 .mtab.active .mtab-ico svg,html body.m3 .mtab.m3-current .mtab-ico svg{color:var(--gold-2,#e2c784)}
  html body.m3 .mtab-badge{
    position:absolute;top:-4px;left:50%;margin:0 0 0 6px;right:auto;min-width:17px;height:17px;border-radius:9px;background:var(--gold,#c9a961);
    color:#111;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px;box-sizing:border-box;border:2px solid #080808;
  }
  html body.m3 .mtab.m3-live::after{content:"";position:absolute;top:-2px;left:50%;margin-left:9px;width:9px;height:9px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 2px #080808}
  html body.m3 .mtab-center{flex:0 0 72px!important;margin-top:-30px!important}
  html body.m3 .mtab-center .mtab-ico{
    width:58px!important;height:58px!important;border-radius:50%;background:linear-gradient(135deg,var(--gold-2,#e2c784),var(--gold,#c9a961))!important;
    box-shadow:0 8px 24px rgba(201,169,97,.35),0 0 0 6px #000!important;color:#111!important;border:0!important;
  }
  html body.m3 .mtab-center .mtab-ico i,html body.m3 .mtab-center .mtab-ico svg{width:28px!important;height:28px!important;color:#111!important;stroke-width:2.6}
  html body.m3 .mtab-center span:last-child{display:none}
  html body.m3.chat-page .chat-frame-wrap{top:64px!important;bottom:calc(74px + env(safe-area-inset-bottom))!important}

  /* ---------- MENU: bottom sheet with tile grid ---------- */
  html body.m3 .rail{
    display:flex!important;flex-direction:column;position:fixed;left:0!important;right:0;top:auto!important;bottom:0;width:100%!important;height:auto!important;
    max-height:88vh;max-height:88dvh;transform:translateY(106%);transition:transform .28s cubic-bezier(.2,.8,.2,1);z-index:400;
    background:#0a0a0a!important;border:1px solid #1f1f1f;border-bottom:0;border-radius:22px 22px 0 0;box-shadow:0 -20px 60px rgba(0,0,0,.6);
    overflow-y:auto;overscroll-behavior:contain;padding:0 0 calc(24px + env(safe-area-inset-bottom))!important;margin:0!important;box-sizing:border-box;
  }
  html body.m3.menu-open .rail{transform:none;left:0!important}
  html body.m3.menu-open::after{z-index:390;background:rgba(0,0,0,.6)}
  html body.m3 .rail::before{content:"";display:block;width:40px;height:4px;border-radius:2px;background:#2a2a2a;margin:10px auto 0}
  html body.m3 .rail-top{display:flex;align-items:center;padding:8px 16px 6px!important;border:0!important}
  html body.m3 .rail-brand{font-family:var(--font-display),'Outfit',system-ui,sans-serif;font-weight:800;font-size:20px;color:#fff;display:flex;align-items:center;gap:8px}
  html body.m3 .rail-brand svg{width:22px;height:22px;color:var(--gold,#c9a961)}
  html body.m3 .rail-toggle{display:none!important}
  html body.m3 .rail-group{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:8px 16px!important;margin:0!important;border:0!important;
  }
  html body.m3 .rail-label{grid-column:1 / -1;font-size:10.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#6f6f76;padding:8px 2px 0!important;margin:0!important}
  html body.m3 .rail-item{
    display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:84px;padding:12px 6px!important;margin:0!important;
    background:#0f0f0f!important;border:1px solid #1f1f1f!important;border-radius:14px!important;color:#e8e8ea!important;text-decoration:none;
    font-size:12px!important;font-weight:600;text-align:center;width:auto!important;
  }
  html body.m3 .rail-item.active{border-color:var(--gold,#c9a961)!important;background:rgba(201,169,97,.1)!important;color:var(--gold-2,#e2c784)!important}
  html body.m3 .rail-item .ri-ico{width:auto;height:auto;margin:0;display:flex;color:var(--gold,#c9a961)}
  html body.m3 .rail-item .ri-ico i,html body.m3 .rail-item .ri-ico svg{width:22px;height:22px}
  html body.m3 .rail-item .ri-text{display:block!important;opacity:1!important;width:auto;white-space:normal;line-height:1.2}
  html body.m3 .rail-item[data-label*="pgrade"],html body.m3 .rail-item[data-label*="embership"]{
    grid-column:1 / -1;flex-direction:row;justify-content:flex-start;min-height:0;padding:14px!important;gap:12px;
    background:linear-gradient(135deg,rgba(226,199,132,.18),rgba(201,169,97,.06))!important;border-color:rgba(201,169,97,.5)!important;
  }
  html body.m3 .rail-item[data-label*="pgrade"] .ri-ico,html body.m3 .rail-item[data-label*="embership"] .ri-ico{
    width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,var(--gold-2,#e2c784),var(--gold,#c9a961));color:#111;align-items:center;justify-content:center;flex:none;
  }
  html body.m3 .rail-item[data-label*="pgrade"] .ri-text,html body.m3 .rail-item[data-label*="embership"] .ri-text{font-size:15px!important;color:#fff;text-align:left}
  html body.m3 .rail-bottom{padding:6px 16px 0!important;margin:0!important;border:0!important}
  html body.m3 .rail-bottom .rail-item{flex-direction:row;justify-content:flex-start;min-height:0;padding:14px!important;gap:12px;font-size:15px!important;color:#ff8a8a!important}
  html body.m3 .rail-bottom .rail-item .ri-ico{color:#ff8a8a}

  /* ---------- HOME ---------- */
  html body.m3 .hv{padding:0!important}
  html body.m3 .hv-grid,html body.m3 .hv-main,html body.m3 .hv-cols{display:flex!important;flex-direction:column;gap:14px;padding:0!important;margin:0!important}
  html body.m3 .hv-feedcol{order:2;padding:0!important}
  html body.m3 .hv-midcol{order:3;padding:0 16px!important}
  html body.m3 .hv-right{order:4;padding:0 16px!important;position:static!important;max-height:none!important;overflow:visible!important;display:flex!important;flex-direction:column;gap:14px}
  html body.m3 .hv-right .zblock,html body.m3 .hv-right .card{margin:0!important}
  html body.m3 .hv-composer{display:none!important}           /* the gold + button opens the composer */
  html body.m3 .hv-tabs{display:flex;gap:8px;padding:0 16px;margin:0!important;border:0!important;background:none!important}
  html body.m3 .hv-tab{
    height:34px;padding:0 14px!important;border-radius:999px!important;border:1px solid #222!important;background:#0f0f0f!important;color:#c7c7cc!important;
    font-weight:600;font-size:13px;margin:0!important;flex:none;
  }
  html body.m3 .hv-tab.active{border-color:var(--gold,#c9a961)!important;background:rgba(201,169,97,.14)!important;color:var(--gold-2,#e2c784)!important}
  html body.m3 #feed{display:flex;flex-direction:column;gap:12px;padding:12px 16px 0}
  html body.m3 .post,html body.m3 #feed > .act{
    margin:0!important;border-radius:18px!important;border:1px solid #1f1f1f!important;background:#0b0b0b!important;overflow:hidden;width:auto!important;
  }
  html body.m3 .post .post-images img,html body.m3 .post .post-images video{border-radius:12px}
  html body.m3 .feed-more-wrap{padding:14px 16px 4px}
  html body.m3 .hv-extras,html body.m3 .hv-midextras{padding:0!important}
  html body.m3 .card{border-radius:16px!important;border:1px solid #1f1f1f!important;border-left:1px solid #1f1f1f!important;border-right:1px solid #1f1f1f!important}

  /* ---------- GENERIC v2 PAGES (mv shell: photos, blog, members, points, …) ---------- */
  html body.m3 .mv{padding:0!important}
  html body.m3 .mv-grid{display:flex!important;flex-direction:column;gap:14px;padding:0 16px!important}
  html body.m3 .mv-head{padding:14px 0 0!important;margin:0!important;display:flex;align-items:center;justify-content:space-between;gap:10px}
  html body.m3 .mv-head h1{font-size:24px!important;margin:0!important}
  html body.m3 .mv-head p{display:none!important}
  html body.m3 .mv-headright .btn{height:40px;padding:0 14px!important;border-radius:12px!important;font-size:13px}
  html body.m3 .mv-tabs{
    display:flex!important;gap:6px;overflow-x:auto;scrollbar-width:none;padding:0 0 2px!important;margin:0!important;border:0!important;background:none!important;flex-wrap:nowrap!important;
  }
  html body.m3 .mv-tabs::-webkit-scrollbar{display:none}
  html body.m3 .mv-tabs a{
    flex:none;height:34px;display:inline-flex;align-items:center;padding:0 14px!important;border-radius:999px!important;border:1px solid #222!important;background:#0f0f0f!important;
    color:#c7c7cc!important;font-weight:600;font-size:13px;white-space:nowrap;text-decoration:none;
  }
  html body.m3 .mv-tabs a.active{border-color:var(--gold,#c9a961)!important;background:rgba(201,169,97,.14)!important;color:var(--gold-2,#e2c784)!important}
  html body.m3 .mv-side{order:9;padding:0!important;display:flex;flex-direction:column;gap:14px}
  html body.m3 .mv-side > *{margin:0!important}
  html body.m3 .mv-cards.mv-grid,html body.m3 .pv2-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:0!important}
  html body.m3 .pv2-card,html body.m3 .mv-card{border-radius:16px!important;overflow:hidden}

  /* ---------- PROFILE ---------- */
  html body.m3 .pv .ph-cover{height:190px!important;border-radius:0!important}
  html body.m3 .pv .ph-body{padding:0 16px!important}
  html body.m3 .pv .ph-toprow{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:-52px!important}
  html body.m3 .pv .ph-avatar{width:104px!important;height:104px!important;border:3px solid var(--gold,#c9a961)!important;box-shadow:0 0 0 4px #000}
  html body.m3 .pv .ph-actions{display:flex;gap:8px;padding-bottom:6px;flex-wrap:nowrap}
  html body.m3 .pv .ph-actions .ph-btn{height:44px;padding:0 16px;border-radius:12px!important;font-size:14px;white-space:nowrap}
  html body.m3 .pv .ph-actions .ph-btn-icon{width:44px;padding:0}
  html body.m3 .pv-tabs{display:flex;margin:14px 16px 0!important;border-bottom:1px solid #1f1f1f;background:none!important;padding:0!important;gap:0!important;overflow-x:auto;scrollbar-width:none}
  html body.m3 .pv-tab{
    flex:1 0 auto;height:42px;background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;
    color:#9a9aa2!important;font-weight:600;font-size:14px;padding:0 10px!important;margin:0!important;
  }
  html body.m3 .pv-tab.active{border-bottom-color:var(--gold,#c9a961)!important;color:var(--gold-2,#e2c784)!important}
  html body.m3 .pv-cols{display:flex!important;flex-direction:column;gap:14px;padding:12px 16px 0!important}
  html body.m3 .pv-feed,html body.m3 .pv-mid,html body.m3 .pv-right{padding:0!important;width:auto!important}
  html body.m3 .pv-right{display:flex;flex-direction:column;gap:14px}

  /* ---------- small bits ---------- */
  html body.m3 .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
  html body.m3 #fc-root .fc-bubble,html body.m3 .fc-launcher{bottom:calc(92px + env(safe-area-inset-bottom))!important}
}

/* menu grid: no orphans */
@media (max-width: 820px) {
  html body.m3 .rail-group .rail-item:last-of-type:nth-of-type(3n+1){grid-column:1 / -1;flex-direction:row;justify-content:flex-start;min-height:0;padding:14px!important;gap:12px}
  html body.m3 .rail-group .rail-item:last-of-type:nth-of-type(3n+1) .ri-text{font-size:14px!important}
  html body.m3 .rail-group .rail-item:last-of-type:nth-of-type(3n+2){grid-column:span 2}
}
/* home: feed first */
@media (max-width: 820px) {
  html body.m3 .hv-feedcol{order:0!important}
  html body.m3 .hv-midcol{display:contents}
  html body.m3 .hv-midcol > *{order:3!important}
  html body.m3 .hv-right{order:4!important}
}
/* mv-head: one row */
@media (max-width: 820px) {
  html body.m3 .mv-head{flex-direction:row!important;align-items:center!important;justify-content:space-between!important;text-align:left!important;gap:10px!important}
  html body.m3 .mv-head > div:first-child{flex:1;min-width:0;text-align:left!important}
  html body.m3 .mv-headright{margin:0!important;display:flex;justify-content:flex-end}
  html body.m3 .mv-headright .btn{height:40px!important;padding:0 14px!important;border-radius:12px!important;font-size:13px!important;white-space:nowrap}
}

/* profile: verify thumb + toprow */
@media (max-width: 820px) {
  html body.m3 .pv .ph-body{text-align:left!important;align-items:flex-start!important}
  html body.m3 .pv .ph-toprow{display:flex!important;flex-direction:row!important;align-items:flex-end!important;justify-content:space-between!important;gap:10px;margin-top:-52px!important}
  html body.m3 .pv .ph-avatar{margin:0!important;flex:none}
  html body.m3 .pv .ph-actions{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;margin:0!important;padding-bottom:4px;flex-wrap:nowrap!important}
  html body.m3 .pv .ph-actions .ph-btn{height:42px!important;padding:0 14px!important;font-size:13px!important}
  html body.m3 .pv .ph-actions .ph-btn-icon{width:42px!important;padding:0!important}
  html body.m3 .pv .ph-verify-inline{position:static!important;margin:0!important;width:42px;height:42px;flex:none;display:block}
  html body.m3 .pv .ph-verify-inline .cv-stat-thumb{width:42px!important;height:42px!important;min-width:0!important;border-radius:12px!important;overflow:hidden;display:block;padding:0!important}
  html body.m3 .pv .ph-verify-inline .ph-vbadge{display:none!important}
  html body.m3 .pv .ph-namerow{justify-content:flex-start!important;text-align:left!important}
  html body.m3 .pv .ph-name{font-size:26px!important}
}

/* profile: toprow below cover */
@media (max-width: 820px) {
  html body.m3 .pv .ph-hero{overflow:visible!important}
  html body.m3 .pv .ph-cover{height:170px!important;margin:0!important}
  html body.m3 .pv .ph-body{margin:0!important;padding:0 16px 4px!important;position:relative;transform:none!important;top:auto!important}
  html body.m3 .pv .ph-toprow{margin:-44px 0 0!important;padding:0!important;align-items:flex-end!important;min-height:0!important}
  html body.m3 .pv .ph-avatar{width:88px!important;height:88px!important;margin:0!important;transform:none!important;position:static!important}
  html body.m3 .pv .ph-actions{padding-bottom:0!important;align-self:flex-end;transform:none!important;position:static!important;margin:0!important}
  html body.m3 .pv .ph-actions .ph-btn{height:36px!important;padding:0 12px!important;font-size:12.5px!important;border-radius:10px!important}
  html body.m3 .pv .ph-actions .ph-btn-icon{width:36px!important}
  html body.m3 .pv .ph-verify-inline,html body.m3 .pv .ph-verify-inline .cv-stat-thumb{width:36px!important;height:36px!important;border-radius:10px!important}
  html body.m3 .pv .ph-namerow{margin-top:10px!important}
}

/* link cards: banner height */
@media (max-width: 820px) {
  html body.m3 .post .link-card,html body.m3 .post .lc,html body.m3 .post .post-link{margin:8px 0 0!important;border-radius:14px!important;overflow:hidden}
  html body.m3 .post .link-card img,html body.m3 .post .lc img,html body.m3 .post .post-link img,html body.m3 .post .link-card .lc-img,html body.m3 .post .link-card [class*="img"]{
    width:100%!important;height:auto!important;max-height:170px!important;aspect-ratio:16/9;object-fit:cover!important;display:block;
  }
  html body.m3 .post .link-card > div,html body.m3 .post .lc-body{padding:10px 12px!important}
  html body.m3 .post .link-card h3,html body.m3 .post .link-card h4,html body.m3 .post .link-card b{font-size:15px!important;margin:4px 0!important}
  html body.m3 .post .link-card p{font-size:13px!important;margin:0 0 6px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  html body.m3 .post .post-images img,html body.m3 .post .post-images video,html body.m3 .post .act-photo-img{max-height:420px!important;object-fit:cover}
}

/* flat feed: full-bleed posts */
@media (max-width: 820px) {
  html body.m3 #feed,html body.m3 .zblock-profile_feed #feed,html body.m3 .pv-feed #feed{display:flex;flex-direction:column;gap:8px!important;padding:8px 0 0!important;margin:0!important}
  html body.m3 .post,html body.m3 #feed > .act{
    border-radius:0!important;border-left:0!important;border-right:0!important;border-top:0!important;border-bottom:1px solid #161616!important;
    margin:0!important;padding:12px 14px 10px!important;background:#000!important;width:auto!important;box-shadow:none!important;
  }
  html body.m3 .post > *{margin-left:0!important;margin-right:0!important}
  html body.m3 .post .post-head,html body.m3 .post header{padding:0!important;margin-bottom:8px!important}
  html body.m3 .post .post-body,html body.m3 .post p{padding:0!important;margin:0 0 8px!important}
  html body.m3 .post .post-images,html body.m3 .post .link-card{margin:0 -14px!important;border-radius:0!important;border-left:0!important;border-right:0!important;width:auto!important}
  html body.m3 .post .post-images img,html body.m3 .post .post-images video{border-radius:0!important}
  html body.m3 .post .post-actions,html body.m3 .post .actions,html body.m3 .post footer{padding:8px 0 0!important;margin:0!important;border-top:0!important;gap:14px!important}
  html body.m3 .post .comments,html body.m3 .post .cmt-list,html body.m3 .post .comment-list{padding:0!important;margin:8px 0 0!important}
  html body.m3 .post .cmt,html body.m3 .post .comment{margin:0 0 6px!important;padding:8px 10px!important;border-radius:12px!important;width:auto!important}
  html body.m3 .post .cmt .cmt,html body.m3 .post .comment .comment{margin-left:28px!important}
  html body.m3 .post .comment-form{padding:6px 0 0!important;margin:0!important}
  html body.m3 .post .view-all,html body.m3 .post .cmt-more{padding:0!important;margin:6px 0 0!important}
  /* profile feed wrapper: no card around the feed */
  html body.m3 .pv-cols{padding:12px 0 0!important}
  html body.m3 .pv-mid,html body.m3 .pv-right{padding:0 16px!important}
  html body.m3 .zblock-profile_feed{padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important}
  html body.m3 .zblock-profile_feed > .block-title{display:none!important}
  html body.m3 .zblock-profile_feed .composer,html body.m3 .pv-feed .composer{margin:0 14px 4px!important}
  /* home feed: same, edge to edge */
  html body.m3 .hv-feedcol #feed{padding:12px 0 0!important}
  html body.m3 .feed-more-wrap{padding:14px 16px 4px!important}
}

/* contained media cards */
@media (max-width: 820px) {
  html body.m3 .post .link-card,html body.m3 .post .post-images{margin:4px 0 0!important;width:auto!important;border-radius:14px!important;overflow:hidden}
  html body.m3 .post .link-card{border:1px solid #1f1f1f!important;background:#0b0b0b!important}
  html body.m3 .post .link-card img{border-radius:0!important;border:0!important;margin:0!important}
  html body.m3 .post .post-images img,html body.m3 .post .post-images video{border-radius:14px!important}
}

/* profile: actions on their own row */
@media (max-width: 820px) {
  html body.m3 .pv .ph-toprow{flex-wrap:wrap!important;align-items:flex-end!important;row-gap:10px}
  html body.m3 .pv .ph-actions{flex:1 0 100%!important;width:100%!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;overflow:visible}
  html body.m3 .pv .ph-actions > .ph-btn:not(.ph-btn-icon),html body.m3 .pv .ph-actions > a.ph-btn:not(.ph-btn-icon),html body.m3 .pv .ph-actions > button.ph-btn:not(.ph-btn-icon){flex:1 1 0!important;min-width:0;justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.m3 .pv .ph-actions .ph-btn{height:40px!important;font-size:13px!important}
  html body.m3 .pv .ph-actions .ph-btn-icon,html body.m3 .pv .ph-more{flex:0 0 40px!important;width:40px!important;height:40px!important}
  html body.m3 .pv .ph-more .ph-btn-icon{width:40px!important;height:40px!important}
  html body.m3 .pv .ph-verify-inline,html body.m3 .pv .ph-verify-inline .cv-stat-thumb{flex:0 0 40px!important;width:40px!important;height:40px!important}
  html body.m3 .pv .ph-more-menu{right:0;left:auto}
}

/* profile: align icon buttons */
@media (max-width: 820px) {
  html body.m3 .pv .ph-actions > *{margin:0!important;align-self:center!important;vertical-align:middle}
  html body.m3 .pv .ph-more{display:flex!important;align-items:center;position:relative;top:0!important;transform:none!important}
  html body.m3 .pv .ph-more .ph-btn-icon{margin:0!important;display:inline-flex;align-items:center;justify-content:center}
  html body.m3 .pv .ph-verify-inline{display:flex!important;align-items:center;top:0!important;transform:none!important}
  html body.m3 .pv .ph-verify-inline .cv-stat-thumb{margin:0!important;display:block}
}

/* dm: hide empty pane on the list view */
@media (max-width: 820px) {
  html body.m3:not(.dm-open) .dm-conv{display:none!important}
  html body.m3:not(.dm-open) .dm-wrap{height:auto!important;min-height:calc(100vh - 170px)}
  html body.m3.dm-open .dm-wrap{height:calc(100vh - 64px - 84px)!important;height:calc(100dvh - 64px - 84px)!important}
  html body.m3 .dm-list{padding-bottom:12px}
}

/* header: fixed */
@media (max-width: 820px) {
  html body.m3 .topbar.topbar-merged{position:fixed!important;top:0;left:0;right:0;transform:none!important}
  html body.m3 .main{padding-top:64px!important}
  html body.m3 .imp-banner{margin-top:64px}
}
