/* V4.71: 手机独立布局，桌面表格与业务权限保持共用。 */
.mobile-header,.mobile-nav-mask,.mobile-nav-close,.sched-mobile,.lf-mobile-title,.mobile-post-label{display:none;}
@media (min-width:901px) and (max-width:1180px){
  .sidebar{width:200px;}
  .main{margin-left:200px;padding:24px 22px 64px;}
}
@media (max-width:900px){
  html{scroll-padding-top:84px;}
  body{width:100%;}
  .layout{min-width:0;min-height:100dvh;}
  .main{margin-left:0;width:100%;padding:calc(76px + env(safe-area-inset-top)) 12px calc(28px + env(safe-area-inset-bottom));}
  .signed-in .mobile-header{display:flex;align-items:center;gap:10px;position:fixed;top:0;left:0;right:0;
    z-index:20;min-height:64px;padding:calc(8px + env(safe-area-inset-top)) 12px 8px;
    background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(16px);}
  .mobile-menu-btn,.mobile-nav-close{display:inline-flex;align-items:center;justify-content:center;
    border:1px solid var(--line);background:#f5f5f7;color:var(--tx);border-radius:12px;width:44px;height:44px;flex:none;cursor:pointer;}
  .mobile-menu-btn svg{width:22px;height:22px;}
  .mobile-heading{min-width:0;display:flex;flex-direction:column;line-height:1.4;}
  .mobile-heading>span{font-size:11px;color:var(--tx3);}
  .mobile-heading>strong{font-size:17px;letter-spacing:-.02em;}
  .sidebar{width:min(304px,86vw);z-index:45;transform:translateX(-100%);visibility:hidden;
    padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain;}
  .sidebar-hd{padding-top:20px;padding-right:54px;}
  .sidebar .brand{gap:8px;}
  .sidebar .brand-mark{width:34px;height:34px;}
  .sidebar .brand-tx b{font-size:14px;}
  .mobile-nav-close{position:absolute;right:10px;top:calc(16px + env(safe-area-inset-top));font-size:26px;}
  .mobile-nav-open .sidebar{visibility:visible;transform:translateX(0);box-shadow:12px 0 40px rgba(0,0,0,.12);}
  .mobile-nav-open .mobile-nav-mask{display:block;position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.35);border:0;width:100%;height:100%;}
  .sidebar .nav-item,.sidebar .nav-subitem,.sidebar .ft-nav{min-height:44px;font-size:15px;}
  .sidebar-ft{flex-shrink:0;}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px;}
  .kpi{min-width:0;border-radius:14px;padding:12px;}
  .kpi .lb{font-size:12px;overflow-wrap:anywhere;}
  .kpi .vl{font-size:26px;}
  .kpi .ft{font-size:11px;line-height:1.5;}
  .card{min-width:0;border-radius:16px;padding:16px 12px;margin-bottom:14px;}
  .card h2{align-items:flex-start;flex-wrap:wrap;gap:4px;margin-bottom:12px;}
  .card h2 .cnt{flex:1 0 100%;font-size:11px;line-height:1.6;}
  .btn,.btn.sm{min-height:44px;padding:10px 14px;font-size:14px;touch-action:manipulation;}
  .toolbar{gap:8px;align-items:center;margin-bottom:12px;}
  .toolbar>.sp{display:none;}
  .toolbar>.btn{flex:1;white-space:nowrap;}
  .toolbar>input{flex:1 0 100%;}
  .toolbar input:not([type=checkbox]):not([type=radio]){max-width:100%;min-width:0;width:100% !important;font-size:16px !important;min-height:44px;}
  #v-schedule .toolbar>span:first-child{flex:1 0 100%;min-width:0;}
  #v-schedule .toolbar>.cr-none{flex:1 0 100%;white-space:normal !important;}
  .stTabs{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;padding-bottom:2px;margin-bottom:14px;}
  .stTab{flex:none;min-height:44px;padding:10px 12px;gap:6px;font-size:12px;}
  .stTab b{font-size:15px;}
  .scroll{min-width:0;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
  .scroll>table{width:max-content;min-width:100%;}
  .sched-desktop{display:none;}
  .sched-mobile{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;}
  .m-order{min-width:0;border:1px solid var(--line);border-radius:14px;padding:14px;background:#fff;}
  .m-order-top{display:flex;align-items:center;justify-content:space-between;gap:8px;}
  .m-order-code{padding:0;min-height:36px;min-width:0;border:0;background:none;color:var(--blue);
    font-size:13px;font-weight:600;line-height:1.5;font-family:inherit;text-align:left;overflow-wrap:anywhere;cursor:pointer;}
  .m-order-code>span{padding-left:4px;font-size:20px;}
  .m-order-top>.tag{flex:none;font-size:11px;}
  .m-order-brand{font-size:17px;line-height:1.5;margin:3px 0 10px;overflow-wrap:anywhere;}
  .m-order-follower{display:flex;align-items:baseline;gap:12px;font-size:12px;}
  .m-order-follower>span{color:var(--tx3);flex:none;}
  .m-order-follower>b{font-weight:500;overflow-wrap:anywhere;}
  .m-order-posts{margin:12px 0;border-top:1px solid var(--line);padding-top:10px;display:grid;gap:12px;}
  .m-order-post{display:flex;align-items:center;gap:10px;min-width:0;}
  .m-order-post>.platform-logo{flex:none;}
  .m-post-info{min-width:0;flex:1;}
  .m-post-account{font-size:14px;overflow-wrap:anywhere;line-height:1.5;}
  .m-post-dates{display:flex;flex-wrap:wrap;column-gap:16px;font-size:11px;color:var(--tx3);line-height:1.8;margin-top:2px;}
  .m-published{color:var(--green);}
  .m-order-warning{font-size:11px;line-height:1.6;color:var(--amber);margin:6px 0;overflow-wrap:anywhere;}
  .m-order-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:2px;}
  .m-order-actions>.btn{flex:1;min-width:64px;white-space:nowrap;}
  .m-order-actions>.tag{margin-left:auto;}
  .pg{gap:8px;}
  .pg-b{margin-left:0;gap:6px;}
  .pg-b .btn.sm{min-width:40px;padding:8px;}
  .grid{grid-template-columns:minmax(0,1fr);gap:14px;}
  .grid>*{min-width:0;}
  .fld input,.fld select,.fld textarea,.posts-row input,.posts-row select{font-size:16px;min-height:46px;max-width:100%;}
  .fld label{font-size:13px;}
  .modal,#modal2.sheet{padding:8px;overscroll-behavior:contain;}
  .modal.on{top:var(--mobile-vtop,0px);height:var(--mobile-vh,100dvh);bottom:auto;}
  .modal .modal-box,.modal .modal-box.wide{width:100%;max-width:100%;max-height:calc(var(--mobile-vh,100dvh) - 16px);padding:18px 14px calc(12px + env(safe-area-inset-bottom));border-radius:16px;overscroll-behavior:contain;}
  .modal .modal-box.sheet{height:calc(var(--mobile-vh,100dvh) - 16px);max-height:calc(var(--mobile-vh,100dvh) - 16px);}
  .modal-box h3{font-size:17px;overflow-wrap:anywhere;}
  .modal-box>.acts{position:sticky;bottom:calc(-12px - env(safe-area-inset-bottom));background:#fff;padding:12px 0 calc(8px + env(safe-area-inset-bottom));
    margin-bottom:calc(-8px - env(safe-area-inset-bottom));border-top:1px solid var(--line);gap:8px;z-index:4;flex-wrap:wrap;}
  .modal-box>.acts>.btn{flex:1;}
  .posts-row,.posts-row.slim{grid-template-columns:minmax(0,1fr);gap:8px;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:10px;background:#fafafa;}
  .posts-row .pp-date{grid-column:auto;}
  .mobile-post-label{display:block;color:var(--tx2);font-size:12px;line-height:1.5;}
  .pp-head{display:none;}
  .posts-row>button{justify-self:end;}
  .posts-box{min-width:0;}
  .lf-panel{position:fixed;top:calc(76px + env(safe-area-inset-top));left:12px;right:12px;width:auto;max-width:none;
    max-height:calc(var(--mobile-vh,100dvh) - 100px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;padding:14px;z-index:42;}
  .lf-mobile-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px;}
  .lf-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;position:relative;padding:12px 36px 12px 10px;border:1px solid var(--line);border-radius:12px;}
  .lf-idx{display:none;}
  .lf-sel{width:100%;min-width:0;max-width:none !important;min-height:44px;font-size:16px;}
  .lf-row>.lf-ve,.lf-row>.lf-num,.lf-row>.lf-txt,.lf-row>.lf-chips{grid-column:1/-1;width:100%;min-width:0;}
  .lf-num,.lf-txt{max-width:100%;min-height:44px;font-size:16px;}
  .lf-ve{display:flex;min-width:0;}
  .lf-ve input{flex:1;width:0 !important;min-width:0;}
  .lf-del{position:absolute;right:0;top:10px;width:34px;height:44px;}
  .lf-chip,.lf-add{min-height:40px;}
  .lf-ops{flex-wrap:wrap;gap:10px;}
  .lf-foot{position:sticky;bottom:-14px;background:#fff;padding:10px 0;}
  .lf-foot .btn{flex:1;}
  .ympanel{position:fixed;left:12px;right:12px;top:calc(80px + env(safe-area-inset-top));max-width:360px;margin:0 auto;}
  .ymnavb,.ymcell{min-height:40px;}
  #syncBar{width:calc(100% - 24px);max-width:520px !important;flex-wrap:wrap;bottom:calc(12px + env(safe-area-inset-bottom)) !important;}
  #syncBarTxt{flex:1 0 100%;overflow-wrap:anywhere;}
  #syncBar .btn{min-height:40px;}
  #bootBar{max-width:calc(100vw - 24px);white-space:normal;}
  .toast{top:calc(76px + env(safe-area-inset-top));font-size:13px;}
  #ntc{padding:14px;}
  .ntc-box{max-height:calc(100dvh - 28px);padding:24px 18px 14px;}
  #loginScreen{padding:24px 18px;min-height:100dvh;overflow-y:auto;}
  .login-box{width:100%;max-width:380px;}
  .login-box .ipt{font-size:16px;min-height:48px;}
  .login-box .btn{min-height:48px;}
  .urow{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 0;}
  .urow.uhead{display:none;}
  .urow .uc5{grid-column:1/-1;display:flex;gap:6px;white-space:normal;flex-wrap:wrap;text-align:left;}
  .urow .uc5 .btn{margin-left:0;}
  .bd-mask,.bd-dmask{padding:8px;}
  .bd{max-height:calc(100dvh - 16px);}
  .bd-body{display:block;overflow-y:auto;}
  .bd-l,.bd-r,.bd-c{width:100%;border:0;overflow:visible;}
  .bd-hd{flex-wrap:wrap;padding:12px;}
  .bd-dbox{width:100%;max-height:calc(100dvh - 16px);}
  .bd-dbd{padding:0 12px 12px;}
  .bd-card .bd-rs{display:none;}
  .arow{grid-template-columns:1fr;}
  .crow,.ct-head{grid-template-columns:minmax(0,1fr);}
}
@media (min-width:640px) and (max-width:900px){
  .main{padding-left:20px;padding-right:20px;}
  .sched-mobile{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;}
}
