/* ShipperShop index.html CSS (non-critical) */

/* Skeleton loading */
.skeleton{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skeleton-text{height:14px;margin:6px 0;width:80%}
.skeleton-avatar{width:40px;height:40px;border-radius:50%}
.skeleton-img{width:100%;height:200px}
.skeleton-card{padding:12px;margin-bottom:8px;background:#fff;border-radius:8px}

body,input,button,select,textarea{font-family:'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
:root{--primary:#7C3AED;--primary-dark:#5B21B6;--orange-light:#EDE9FE;--up:#FF4500;--down:#7193FF;--bg:#DAE0E6;--card:#FFF;--border:#EDEFF1;--text:#1C1C1C;--muted:#878A8C;}
*{margin:0;padding:0;box-sizing:border-box;}
body{background:var(--bg);font-family:'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:var(--text);min-height:100vh;}
.s-tag{padding:8px 14px;border-radius:20px;border:1px solid #ddd;background:#fff;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:6px;transition:.15s;}.s-tag:hover{background:#f0f0f0;border-color:#999;}
.tab-bar{display:flex;background:#fff;position:fixed;top:58px;left:0;right:0;z-index:99;padding:0;border-bottom:1px solid #f0f0f0;}@media(min-width:769px){.tab-bar{border-bottom:1px solid #e4e6eb;}.tab-item{padding:8px 0;font-size:11px;gap:2px;}.tab-item i{font-size:18px;}body{padding-top:105px;}.main-layout{padding-top:10px;}}
.tab-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:6px 0;font-size:9px;color:var(--muted);text-decoration:none;border-bottom:3px solid transparent;transition:.15s;position:relative;}.tab-item span{display:none;}@media(min-width:769px){.tab-item span{display:block;}}
.tab-item.active{color:var(--primary);border-bottom-color:var(--primary);}
.tab-item:hover{background:#f8f8f8;}
.tab-item i{font-size:22px;}
.tab-item{position:relative;}
.tab-badge{position:absolute;top:2px;right:calc(50% - 18px);background:#7C3AED;color:#fff;font-size:9px;min-width:16px;height:16px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;padding:0 4px;}
.top-nav{background:#fff;position:fixed;top:0;left:0;right:0;z-index:100;padding:8px 10px;display:flex;align-items:center;gap:8px;}
.nav-logo{font-size:20px;font-weight:800;color:var(--primary);text-decoration:none;display:flex;align-items:center;white-space:nowrap;flex-shrink:0;}
.nav-search{flex:1;min-width:0;max-width:660px;position:relative;}
.nav-search input{width:100%;padding:8px 16px 8px 40px;border:1px solid var(--border);border-radius:20px;font-size:14px;background:#f6f7f8;outline:none;}
.nav-search input:focus{border-color:var(--primary);background:#fff;}
.nav-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);}
.nav-actions{display:flex;gap:8px;align-items:center;margin-left:auto;}
.nav-btn{padding:6px 16px;border-radius:20px;font-size:13px;font-weight:700;cursor:pointer;border:2px solid var(--primary);background:none;color:var(--primary);}
.nav-btn.filled{background:var(--primary);color:#fff;}
.nav-user-wrap{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;cursor:pointer;padding:6px 10px;border-radius:4px;}
.nav-user-wrap:hover{background:#f6f7f8;}
.main-layout{max-width:1200px;margin:0 auto;padding:20px 16px;display:grid;grid-template-columns:220px 1fr 310px;gap:24px;}
@media(max-width:1100px){.main-layout{grid-template-columns:1fr 300px;}.left-sidebar{display:none;}}.right-sidebar{overflow:hidden;max-width:310px;}
@media(max-width:768px){.main-layout{grid-template-columns:1fr;padding:0;gap:0;}.main-layout>*{min-width:0;}.right-sidebar{display:none;}.tab-bar{top:58px;}body{padding-top:100px;}.create-box{display:none;}}
.sidebar-card{background:var(--card);border:1px solid var(--border);border-radius:4px;overflow:hidden;margin-bottom:16px;}
.sidebar-title{padding:10px 12px;font-size:12px;font-weight:700;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border);}
.sidebar-item{display:flex;align-items:center;gap:10px;padding:9px 12px;font-size:14px;font-weight:500;cursor:pointer;text-decoration:none;color:var(--text);transition:.15s;}
.sidebar-item:hover,.sidebar-item.active{background:var(--border);}
.sidebar-item i{width:20px;text-align:center;font-size:16px;}
.province-search{padding:8px 12px;}
.province-search input{width:100%;padding:6px 10px;border:1px solid var(--border);border-radius:4px;font-size:13px;outline:none;}
.province-list{max-height:200px;overflow-y:auto;}
.province-item{padding:7px 12px;font-size:13px;cursor:pointer;}
.province-item:hover,.province-item.active{background:var(--orange-light);color:var(--primary);font-weight:600;}
.feed-header{background:var(--card);border:none;border-radius:0;padding:6px 0;display:flex;gap:0;align-items:center;margin-bottom:8px;flex-wrap:nowrap;border-bottom:1px solid #ececec;}
.sort-btn{display:flex;align-items:center;justify-content:center;gap:4px;padding:8px 0;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;border:none;background:none;color:var(--muted);flex:1;white-space:nowrap;}
.sort-btn:hover,.sort-btn.active{background:var(--border);color:var(--text);}
.create-box{display:none!important;}
.create-input{flex:1;padding:8px 12px;border:1px solid var(--border);border-radius:4px;font-size:14px;cursor:pointer;background:#f6f7f8;outline:none;}
.create-input:hover{border-color:var(--primary);}
.icon-btn{width:36px;height:36px;border:1px solid var(--border);border-radius:4px;background:none;cursor:pointer;font-size:16px;color:var(--muted);display:flex;align-items:center;justify-content:center;}
.icon-btn:hover{border-color:var(--primary);color:var(--primary);}

.post-card:hover{background:#fafafa;}
.vote-col{width:40px;background:#f8f9fa;display:flex;flex-direction:column;align-items:center;padding:8px 4px;gap:2px;flex-shrink:0;}
.vote-btn{width:24px;height:24px;border:none;background:none;cursor:pointer;border-radius:2px;display:flex;align-items:center;justify-content:center;font-size:18px;color:var(--muted);line-height:1;}
.vote-btn.voted-up{color:var(--up);}
.vote-btn.voted-down{color:var(--down);}
.vote-btn:hover{background:rgba(0,0,0,.05);}
.vote-score{font-size:12px;font-weight:700;color:var(--muted);}
.vote-score.pos{color:var(--up);}
.vote-score.neg{color:var(--down);}
.post-meta{padding:8px 12px 0;}.post-content,.post-content.full{padding:4px 12px;}
.post-meta{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-bottom:4px;flex-wrap:wrap;position:relative;}
.post-dots{background:none;border:none;color:var(--muted);cursor:pointer;font-size:16px;padding:4px 8px;margin-left:auto;border-radius:4px;}.post-dots:hover{background:var(--border);}
.post-menu{position:absolute;right:8px;top:36px;background:#fff;border-radius:8px;box-shadow:0 2px 12px rgba(0,0,0,.15);z-index:50;min-width:160px;padding:4px 0;}
.post-menu div{padding:10px 14px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:8px;}.post-menu div:hover{background:#f5f5f5;}
.post-meta{position:relative;}

.avatar-sm{width:20px;height:20px;border-radius:50%;object-fit:cover;background:var(--primary);color:#fff;font-size:10px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0;}
.post-author{font-weight:600;color:var(--text);cursor:pointer;}
.post-author:hover{text-decoration:underline;}
.province-badge{background:var(--orange-light);color:var(--primary);padding:1px 7px;border-radius:20px;font-size:11px;font-weight:600;cursor:pointer;}
.anon-badge{background:#f0f0f0;color:#555;padding:1px 7px;border-radius:20px;font-size:11px;}
.type-badge{padding:2px 8px;border-radius:20px;font-size:11px;font-weight:700;}
.b-confession{background:#FFE4E1;color:#DC143C;}
.b-review{background:#E3F2FD;color:#1565C0;}
.b-question{background:#E8F5E9;color:#2E7D32;}
.b-tip{background:#FFF8E1;color:#F57F17;}
.b-discussion{background:#F3E5F5;color:#6A1B9A;}
.post-title{font-size:18px;font-weight:700;margin-bottom:8px;line-height:1.3;}
.post-content{font-size:14px;line-height:1.6;color:#333;word-break:break-word;white-space:pre-wrap;max-height:300px;overflow:hidden;position:relative;}
.post-content.full{max-height:none;}
.post-content:not(.full)::after{content:'';position:absolute;bottom:0;left:0;right:0;height:60px;background:linear-gradient(transparent,#fff);}
.show-more{font-size:13px;color:var(--primary);cursor:pointer;font-weight:600;margin-top:2px;display:inline-block;}



.post-actions{display:flex;align-items:center;gap:4px;margin-top:8px;flex-wrap:wrap;}
.act-btn{display:flex;align-items:center;gap:5px;padding:6px 8px;border:none;background:none;cursor:pointer;font-size:12px;font-weight:700;color:var(--muted);border-radius:2px;}
.act-btn:hover{background:var(--border);color:var(--text);}
.act-btn.saved{color:var(--primary);}
.cmt-section{border-top:1px solid var(--border);padding:8px;margin-top:8px;display:none;}
.cmt-section.open{display:block;}
.cmt-form{display:flex;gap:8px;margin-bottom:12px;align-items:flex-start;}
.cmt-form textarea{flex:1;padding:8px;border:1px solid var(--border);border-radius:4px;font-size:13px;resize:vertical;min-height:60px;font-family:inherit;outline:none;}
.cmt-form textarea:focus{border-color:var(--primary);}
.cmt-send{padding:6px 14px;background:var(--primary);color:#fff;border:none;border-radius:4px;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;}
.cmt-item{display:flex;gap:8px;padding:4px 0;}
.cmt-body{flex:1;min-width:0;}
.cmt-bubble{background:#f0f2f5;border-radius:18px;padding:8px 12px;display:inline-block;max-width:100%;}
.cmt-author{font-weight:700;font-size:13px;}
.cmt-text{font-size:14px;line-height:1.4;margin-top:1px;}
.cmt-meta{display:flex;gap:12px;padding:2px 12px;font-size:12px;color:var(--muted);white-space:nowrap;}
.cmt-meta a{color:var(--muted);text-decoration:none;font-weight:600;cursor:pointer;margin-left:6px;}
.cmt-meta a:hover{text-decoration:underline;}
.cmt-meta a.liked{color:var(--primary);font-weight:700;}
.cmt-time{color:var(--muted);}
.replies{margin-top:4px;padding-left:12px;border-left:2px solid var(--border);}
.cmt-act:hover{color:var(--text);}
.load-more{width:100%;padding:10px;background:var(--border);border:none;border-radius:0;font-size:14px;font-weight:700;cursor:pointer;margin-top:4px;}
.community-banner{background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;padding:16px;border-radius:4px 4px 0 0;}
.community-banner h3{font-size:16px;font-weight:700;margin-bottom:4px;}
.community-banner p{font-size:13px;opacity:.9;}
.stats-grid{padding:12px;background:#fff;border:1px solid var(--border);border-top:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.stat{text-align:center;}
.stat-n{font-size:18px;font-weight:700;color:var(--primary);}
.stat-l{font-size:11px;color:var(--muted);margin-top:2px;}
.rules-box{background:#fff;border:1px solid var(--border);border-top:none;border-radius:0 0 4px 4px;}
.rule{padding:8px 12px;border-bottom:1px solid var(--border);font-size:13px;}
.rule:last-child{border:none;}
.trending-box{background:#fff;border:1px solid var(--border);border-radius:4px;margin-top:16px;}
.trend-item{padding:8px 12px;border-bottom:1px solid var(--border);cursor:pointer;}
.trend-item:hover{background:#f6f7f8;}
.trend-item:last-child{border:none;}
.trend-title{font-size:13px;font-weight:600;line-height:1.3;margin-bottom:3px;}
.trend-meta{font-size:11px;color:var(--muted);}
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1000;display:none;align-items:center;justify-content:center;padding:16px;}
.modal-overlay.open{display:flex;}
.modal{background:#fff;border-radius:8px;width:100%;max-width:700px;display:flex;flex-direction:column;max-height:90vh;}
.modal-head{background:var(--primary);color:#fff;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;border-radius:8px 8px 0 0;}
.modal-head h2{font-size:16px;font-weight:700;}
.modal-x{background:none;border:none;color:#fff;font-size:24px;cursor:pointer;line-height:1;}
.modal-body{padding:20px;overflow-y:auto;flex:1;min-height:0;-webkit-overflow-scrolling:touch;}
.type-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap;}
.type-tab{padding:7px 14px;border:2px solid var(--border);border-radius:20px;font-size:13px;font-weight:700;cursor:pointer;background:none;color:var(--muted);}
.type-tab.active{border-color:var(--primary);color:var(--primary);background:var(--orange-light);}
.f-row{margin-bottom:14px;}
.f-row label{display:block;font-size:13px;font-weight:700;margin-bottom:8px;color:var(--muted);}
.f-row input,.f-row textarea,.f-row select{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:4px;font-size:14px;font-family:inherit;outline:none;}
.f-row input:focus,.f-row textarea:focus,.f-row select:focus{border-color:var(--primary);}
.f-row textarea{min-height:140px;resize:vertical;}
.anon-check{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer;}
.anon-check input{width:16px;height:16px;accent-color:var(--primary);}
.sub-btn{width:100%;padding:12px;background:var(--primary);color:#fff;border:none;border-radius:4px;font-size:15px;font-weight:700;cursor:pointer;margin-top:8px;}
.sub-btn:hover{background:var(--primary-dark);}
.sub-btn:disabled{opacity:.6;cursor:not-allowed;}
.conf-note{background:#fff3cd;border-radius:4px;padding:10px;font-size:13px;margin-bottom:12px;display:none;}
.char-cnt{font-size:12px;color:var(--muted);text-align:right;margin-top:3px;}
.post-video{width:100%;border-radius:0;margin:0;max-height:600px;display:block;}.img-previews{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;}
.img-prev{width:72px;height:72px;object-fit:cover;border-radius:4px;}
/* lightbox handled by image-viewer.js */
.lb-close{position:absolute;top:16px;right:16px;background:none;border:none;color:#fff;font-size:32px;cursor:pointer;}
.share-drop{position:absolute;background:#fff;border:1px solid var(--border);border-radius:8px;padding:8px 0;z-index:200;box-shadow:0 4px 16px rgba(0,0,0,.15);min-width:200px;right:0;top:100%;}
.share-opt{display:flex;align-items:center;gap:10px;padding:9px 16px;font-size:13px;cursor:pointer;}
.share-opt:hover{background:#f6f7f8;}
.share-opt i{width:20px;text-align:center;}
.toast{position:fixed;bottom:20px;right:20px;background:#333;color:#fff;padding:12px 20px;border-radius:8px;font-size:14px;z-index:3000;transform:translateY(100px);opacity:0;transition:.3s;pointer-events:none;}
.toast.show{transform:none;opacity:1;}
.toast.success{background:#2E7D32;}
.toast.error{background:#C62828;}
.toast.warning{background:#E65100;}
.empty{text-align:center;padding:60px 20px;color:var(--muted);}
.empty i{font-size:48px;display:block;margin-bottom:12px;color:#ccc;}
.spin{animation:spin 1s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.no-wrap{white-space:nowrap;}
@media(max-width:768px){.modal-overlay{align-items:flex-end!important;padding:0!important;padding-bottom:60px!important;}.modal{max-height:calc(100vh - 120px);display:flex;flex-direction:column;border-radius:12px 12px 0 0!important;}.modal-head{flex-shrink:0;}.modal-body{flex:1;overflow-y:auto;padding:16px!important;-webkit-overflow-scrolling:touch;min-height:0;}.modal>div:last-child{flex-shrink:0;padding:12px 16px!important;background:#fff;border-top:1px solid #eee;}}


/* === POST CARD LAYOUT (Facebook-style) === */
.post-card{background:#fff;border:none;border-radius:0;margin-bottom:4px;display:flex;flex-direction:column;overflow:hidden;}
.post-body{padding:0;width:100%;}
.post-meta{padding:6px 12px 2px;}
.post-content,.post-content.full{padding:4px 12px 4px;}
.post-images{display:block;width:100%;margin:0;}
.post-images.multi-img{display:flex;gap:2px;flex-wrap:wrap;}
.post-img{width:100%;border-radius:0;display:block;}
.post-img.multi{width:calc(50% - 1px);max-height:400px;object-fit:cover;}
.pa3-stats{display:flex;padding:1px 4px;margin:0;width:100%;}.pa3-stats span{flex:1;text-align:center;font-size:10px;color:#65676B;padding:3px 1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;line-height:1.3;}
.post-actions-3{display:flex;border-top:1px solid #e4e6eb;background:#fff;}
.pa3-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:4px;padding:7px 4px;border:none;background:#fff;cursor:pointer;font-size:13px;font-weight:600;color:#65676B;border-right:1px solid #e4e6eb;transition:background .15s;overflow:hidden;white-space:nowrap;min-width:0;}
.pa3-btn:last-child{border-right:none;}
.pa3-btn:active,.pa3-btn.pa3-active{background:#EDE9FE;color:#7C3AED;}

video{width:100%;max-height:600px;display:block;background:#000;}

.loc-filter{background:#fff;padding:6px 12px;display:flex;align-items:center;gap:6px;border-bottom:1px solid #f0f0f0;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.loc-filter::-webkit-scrollbar{display:none;}
.loc-filter select{padding:6px 10px;border:1.5px solid #ddd;border-radius:20px;font-size:12px;background:#fff;color:#333;outline:none;min-width:0;max-width:150px;appearance:auto;cursor:pointer;}
.loc-filter select:focus{border-color:#1976d2;}
.loc-filter .loc-icon{color:#1976d2;font-size:14px;flex-shrink:0;}
.loc-filter .loc-clear{background:none;border:1px solid #ddd;border-radius:20px;padding:4px 10px;font-size:11px;cursor:pointer;color:#999;flex-shrink:0;}
@keyframes xpIn{from{transform:translateX(100px);opacity:0}to{transform:translateX(0);opacity:1}}

/* === Desktop sidebar enhancements === */
.sb-user-link{display:flex;align-items:center;gap:10px;padding:12px;text-decoration:none;color:var(--text);border-radius:4px;transition:.15s}
.sb-user-link:hover{background:var(--border)}
.sb-user-av{width:36px;height:36px;border-radius:50%;object-fit:cover;flex-shrink:0}
.sb-user-info{flex:1;min-width:0}
.sb-user-name{font-weight:700;font-size:14px}
.sb-user-sub{font-size:11px;color:var(--muted)}
.sidebar-item{text-decoration:none !important}
.sidebar-item i{width:22px;text-align:center}
.sb-footer{padding:12px;font-size:11px;color:var(--muted)}
.sb-footer a{color:var(--muted);text-decoration:none}
.sb-footer a:hover{text-decoration:underline}
.sb-see-all{display:block;text-align:center;padding:10px;font-size:13px;font-weight:600;color:var(--primary);text-decoration:none;border-top:1px solid var(--border)}
.sb-see-all:hover{background:var(--border)}
.sg-item{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;transition:.15s}
.sg-item:hover{background:#f5f5f5}
.sg-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:#fff;flex-shrink:0}
.sg-info{flex:1;min-width:0}
.sg-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-meta{font-size:11px;color:var(--muted)}
.sg-join{padding:4px 12px;border-radius:6px;border:none;font-size:12px;font-weight:600;cursor:pointer;background:var(--primary);color:#fff;flex-shrink:0}
.sg-join:hover{opacity:.9}
.sg-join.joined{background:#e4e6eb;color:#65676B}
.ol-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;cursor:pointer;border:2px solid #22c55e;transition:transform .15s}
.ol-avatar:hover{transform:scale(1.1)}
.ol-ph{width:32px;height:32px;border-radius:50%;background:#e4e6eb;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;border:2px solid #22c55e;cursor:pointer}
@media(min-width:769px){
  .left-sidebar{position:sticky;top:110px;max-height:calc(100vh - 120px);overflow-y:auto;scrollbar-width:thin}
  .left-sidebar::-webkit-scrollbar{width:4px}
  .left-sidebar::-webkit-scrollbar-thumb{background:#ccc;border-radius:2px}
  .right-sidebar{position:sticky;top:110px;max-height:calc(100vh - 120px);overflow-y:auto;scrollbar-width:thin}
  .right-sidebar::-webkit-scrollbar{width:4px}
  .right-sidebar::-webkit-scrollbar-thumb{background:#ccc;border-radius:2px}
  .main-layout{max-width:1280px;grid-template-columns:240px 1fr 320px;gap:20px}
}
@media(min-width:1400px){.main-layout{max-width:1400px;grid-template-columns:260px 1fr 340px}}



.mnav-fab-wrap{overflow:visible!important;position:relative!important;}
.mnav-fab{width:46px!important;height:46px!important;font-size:18px!important;margin-top:-16px!important;cursor:pointer!important;position:relative!important;z-index:1001!important;}

.post-sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1100;display:none;align-items:flex-end;justify-content:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);}
.post-sheet-overlay.open{display:flex;}
.post-sheet{background:#fff;width:100%;max-width:600px;max-height:92vh;border-radius:16px 16px 0 0;display:flex;flex-direction:column;transform:translateY(100%);transition:transform .3s cubic-bezier(.32,.72,0,1);overflow:hidden;}
.post-sheet-overlay.open .post-sheet{transform:translateY(0);}
.sheet-handle{width:36px;height:4px;background:#ddd;border-radius:2px;margin:10px auto 0;flex-shrink:0;}
.sheet-header{display:flex;align-items:center;padding:12px 16px 8px;border-bottom:1px solid #f0f0f0;flex-shrink:0;}
.sheet-header h3{flex:1;font-size:16px;font-weight:700;margin:0;}
.sheet-close{background:none;border:none;font-size:22px;color:#666;cursor:pointer;padding:4px 8px;border-radius:50%;}
.sheet-close:hover{background:#f0f0f0;}
.sheet-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:70px;}
.sheet-cmt-bar{position:absolute;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e4e6eb;padding:10px 16px;display:flex;align-items:center;gap:10px;z-index:10;}
.sheet-cmt-bar .cmt-placeholder{flex:1;padding:10px 16px;border-radius:24px;background:#f0f2f5;color:#65676B;font-size:14px;cursor:pointer;border:none;text-align:left;user-select:none;}
.sheet-cmt-bar .cmt-placeholder:active{background:#e4e6eb;}
.cmt-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:1200;display:none;align-items:center;justify-content:center;padding:16px;}
.cmt-modal-overlay.open{display:flex;}
.cmt-modal{background:#fff;width:100%;max-width:500px;border-radius:16px;overflow:hidden;transform:scale(.9);opacity:0;transition:all .2s ease;}
.cmt-modal-overlay.open .cmt-modal{transform:scale(1);opacity:1;}
.cmt-modal-head{display:flex;align-items:center;padding:14px 16px;border-bottom:1px solid #e4e6eb;}
.cmt-modal-head span{flex:1;font-size:15px;font-weight:700;}
.cmt-modal-x{background:none;border:none;width:32px;height:32px;border-radius:50%;background:#e4e6eb;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#333;}
.cmt-modal-x:hover{background:#d8dadf;}
.cmt-modal-body{padding:16px;}
.cmt-modal-reply{font-size:13px;color:#65676B;margin-bottom:8px;display:none;align-items:center;gap:6px;}
.cmt-modal-reply.show{display:flex;}
.cmt-modal-reply .cancel-rpl{background:none;border:none;color:#7C3AED;font-weight:700;cursor:pointer;font-size:12px;}
.cmt-modal-ta{width:100%;min-height:100px;max-height:200px;border:none;outline:none;font-size:15px;font-family:inherit;resize:none;line-height:1.5;color:#1C1C1C;}
.cmt-modal-ta::placeholder{color:#65676B;}
.cmt-modal-foot{display:flex;align-items:center;justify-content:flex-end;padding:10px 16px;border-top:1px solid #e4e6eb;}
.cmt-modal-send{background:#7C3AED;color:#fff;border:none;border-radius:20px;padding:8px 20px;font-size:14px;font-weight:700;cursor:pointer;}
.cmt-modal-send:disabled{opacity:.5;cursor:not-allowed;}
.cmt-modal-send:hover:not(:disabled){background:#5B21B6;}
.cmt-btn-big{font-weight:700!important;}
.sheet-post-content{padding:10px 16px;font-size:15px;line-height:1.7;white-space:pre-wrap;word-break:break-word;}
.sheet-post-stats{display:flex;padding:4px 12px;font-size:10px;color:#65676B;}.sheet-post-stats span{flex:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;padding:2px 1px;}




@media(max-width:768px){.post-sheet{max-height:95vh;}.cmt-modal{max-width:100%;margin:0 8px;border-radius:12px;}}





/* === POST CARD LAYOUT (Facebook-style) === */
.post-card{background:#fff;border:none;border-radius:0;margin-bottom:4px;display:flex;flex-direction:column;overflow:hidden;}
.post-body{padding:0;width:100%;}
.post-meta{padding:6px 12px 2px;}
.post-content,.post-content.full{padding:4px 12px 4px;}
.post-images{display:block;width:100%;margin:0;}
.post-images.multi-img{display:flex;gap:2px;flex-wrap:wrap;}
.post-img{width:100%;border-radius:0;display:block;}
.post-img.multi{width:calc(50% - 1px);max-height:400px;object-fit:cover;}


video{width:100%;max-height:600px;display:block;background:#000;}

.loc-filter{background:#fff;padding:6px 12px;display:flex;align-items:center;gap:6px;border-bottom:1px solid #f0f0f0;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.loc-filter::-webkit-scrollbar{display:none;}
.loc-filter select{padding:6px 10px;border:1.5px solid #ddd;border-radius:20px;font-size:12px;background:#fff;color:#333;outline:none;min-width:0;max-width:150px;appearance:auto;cursor:pointer;}
.loc-filter select:focus{border-color:#1976d2;}
.loc-filter .loc-icon{color:#1976d2;font-size:14px;flex-shrink:0;}
.loc-filter .loc-clear{background:none;border:1px solid #ddd;border-radius:20px;padding:4px 10px;font-size:11px;cursor:pointer;color:#999;flex-shrink:0;}
@keyframes xpIn{from{transform:translateX(100px);opacity:0}to{transform:translateX(0);opacity:1}}


body,input,button,select,textarea{font-family:'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
@keyframes slideUp{from{transform:translateY(100px);opacity:0;}to{transform:translateY(0);opacity:1;}}


/* === POST CARD LAYOUT (Facebook-style) === */
.post-card{background:#fff;border:none;border-radius:0;margin-bottom:4px;display:flex;flex-direction:column;overflow:hidden;}
.post-body{padding:0;width:100%;}
.post-meta{padding:6px 12px 2px;}
.post-content,.post-content.full{padding:4px 12px 4px;}
.post-images{display:block;width:100%;margin:0;}
.post-images.multi-img{display:flex;gap:2px;flex-wrap:wrap;}
.post-img{width:100%;border-radius:0;display:block;}
.post-img.multi{width:calc(50% - 1px);max-height:400px;object-fit:cover;}


video{width:100%;max-height:600px;display:block;background:#000;}

.loc-filter{background:#fff;padding:6px 12px;display:flex;align-items:center;gap:6px;border-bottom:1px solid #f0f0f0;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.loc-filter::-webkit-scrollbar{display:none;}
.loc-filter select{padding:6px 10px;border:1.5px solid #ddd;border-radius:20px;font-size:12px;background:#fff;color:#333;outline:none;min-width:0;max-width:150px;appearance:auto;cursor:pointer;}
.loc-filter select:focus{border-color:#1976d2;}
.loc-filter .loc-icon{color:#1976d2;font-size:14px;flex-shrink:0;}
.loc-filter .loc-clear{background:none;border:1px solid #ddd;border-radius:20px;padding:4px 10px;font-size:11px;cursor:pointer;color:#999;flex-shrink:0;}
@keyframes xpIn{from{transform:translateX(100px);opacity:0}to{transform:translateX(0);opacity:1}}

/* Slow connection optimizations */
.slow-connection video{display:none!important}
.slow-connection .post-images img{image-rendering:pixelated}

/* Content Warning / Spoiler */
.cw-wrap{position:relative;cursor:pointer}
.cw-wrap .cw-content{filter:blur(20px);transition:filter .3s}
.cw-wrap .cw-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:1;font-size:14px;font-weight:600;color:#666;gap:6px;background:rgba(255,255,255,.3);transition:opacity .3s}
.cw-wrap.cw-revealed .cw-content{filter:none}
.cw-wrap.cw-revealed .cw-label{opacity:0;pointer-events:none}

/* Type filter chips */
.type-chips{scrollbar-width:none}
.type-chips::-webkit-scrollbar{display:none}
.chip{padding:6px 14px;border:1px solid #e4e6eb;border-radius:20px;background:#fff;font-size:12px;white-space:nowrap;cursor:pointer;font-weight:500;color:#333}
.chip.active{background:#7C3AED;color:#fff;border-color:#7C3AED}

/* Skeleton loading */
@keyframes skeleton-pulse{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}
.skeleton-card{background:#fff;border-radius:8px;overflow:hidden;margin:8px 0}
.skeleton-line{height:12px;border-radius:6px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200px 100%;animation:skeleton-pulse 1.5s infinite}
.skeleton-circle{width:40px;height:40px;border-radius:50%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200px 100%;animation:skeleton-pulse 1.5s infinite}
.skeleton-img{width:100%;height:200px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200px 100%;animation:skeleton-pulse 1.5s infinite}

/* Mobile bottom sheet for post menu */
@media(max-width:768px){
  .post-menu{position:fixed!important;bottom:0!important;left:0!important;right:0!important;top:auto!important;border-radius:16px 16px 0 0!important;max-width:100%!important;z-index:2001!important;box-shadow:0 -4px 20px rgba(0,0,0,.15)!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .post-menu div{padding:14px 20px!important;font-size:15px!important}
  .post-menu-overlay{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:2000}
}

/* Sort bar smooth scroll */
.sort-bar{scroll-behavior:smooth;-webkit-overflow-scrolling:touch}
.sort-bar::-webkit-scrollbar{display:none}

@keyframes bounceIn{0%{transform:scale(0)}50%{transform:scale(1.2)}100%{transform:scale(1)}}

/* Long comment collapse */
.cmt-text-long{max-height:80px;overflow:hidden;position:relative}
.cmt-text-long::after{content:'...Xem thêm';position:absolute;bottom:0;right:0;background:linear-gradient(90deg,transparent,#fff 40%);padding:0 8px;color:#7C3AED;font-weight:600;font-size:12px;cursor:pointer}
.cmt-text-long.expanded{max-height:none}
.cmt-text-long.expanded::after{display:none}

/* Like button animation */
.pa3-btn.liked{transition:color .2s,background .2s}
.pa3-btn.like-bounce{animation:likeBounce .3s}
@keyframes likeBounce{0%{transform:scale(1)}50%{transform:scale(1.15)}100%{transform:scale(1)}}

/* Keyboard focus */
:focus-visible{outline:2px solid #7C3AED;outline-offset:2px;border-radius:4px}
button:focus:not(:focus-visible){outline:none}
a:focus:not(:focus-visible){outline:none}
/* Scroll margin for anchor links */
[id]{scroll-margin-top:60px}
/* Prevent overscroll bounce */
body{overscroll-behavior-y:contain}
/* Typography optimization */
body{text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased}
/* Smooth touch interactions */
.carousel{touch-action:pan-y}
.post-images{touch-action:pan-x pan-y}
/* GPU acceleration hints */
.post-card{will-change:transform}
.carousel-track{will-change:transform}
/* Color scheme hint */
:root{color-scheme:light dark}
/* ShipperShop v2.0 — 1000 commits milestone */
