*{margin:0;padding:0;box-sizing:border-box;}
html{-webkit-tap-highlight-color:transparent;}
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:#f5f6f8;color:#222;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;}
a{color:#1a5f7a;text-decoration:none;}
img{display:block;max-width:100%;}

/* ===== Header ===== */
.m-top{position:fixed;top:0;left:0;right:0;z-index:1000;background:linear-gradient(135deg,#1a5f7a,#2a7a99);box-shadow:0 2px 8px rgba(26,95,122,.25);overflow:visible;}
.m-header{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;flex-shrink:0;}
.m-header .logo{font-size:18px;font-weight:700;color:#fff;letter-spacing:.5px;}
.m-header .logo a{color:#fff;}
.m-header .logo .dot{color:#ff7a00;margin-right:1px;}
.m-header .actions{display:flex;gap:6px;align-items:center;}
.m-header .actions .btn-publish{background:rgba(255,255,255,.18);color:#fff;font-weight:600;font-size:12px;padding:5px 12px;border-radius:16px;backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,.15);}
.m-header .actions .user-name{color:#fff;font-size:13px;font-weight:500;padding:5px 8px;}
.m-header .actions .btn-logout{color:rgba(255,255,255,.6);font-size:11px;padding:5px 4px;}

/* ===== Search Bar ===== */
.m-search{padding:6px 12px 8px;background:linear-gradient(135deg,#1a5f7a,#2a7a99);flex-shrink:0;}
.m-search form{display:flex;gap:8px;}
.m-search input{flex:1;height:34px;border:none;border-radius:17px;padding:0 16px 0 36px;font-size:13px;background:rgba(255,255,255,.95);outline:none;box-shadow:0 2px 6px rgba(0,0,0,.08);min-width:0;}
.m-search .search-icon{position:relative;flex:1;display:flex;min-width:0;}
.m-search .search-icon::before{content:'🔍';position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:13px;z-index:1;opacity:.4;pointer-events:none;}
.m-search button{width:56px;height:34px;border:none;border-radius:17px;background:#ff7a00;color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 2px 6px rgba(255,122,0,.3);flex-shrink:0;}
.m-search button:active{background:#e66f00;}

/* ===== Category Nav ===== */
.m-cat-nav{background:#fff;display:flex;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:0 8px 0 8px;border-bottom:1px solid #f0f0f0;height:38px;align-items:center;flex-shrink:0;scroll-padding-right:20px;}
.m-cat-nav::-webkit-scrollbar{display:none;}
.m-cat-nav a{flex-shrink:0;padding:0 11px;font-size:13px;color:#888;white-space:nowrap;line-height:38px;transition:color .2s;}
.m-cat-nav a:last-child{padding-right:20px;}
.m-cat-nav a.active{color:#1a5f7a;font-weight:600;font-size:14px;border-bottom:2px solid #1a5f7a;}
.m-cat-nav a:first-child{font-weight:700;}

/* ===== Section ===== */
.m-section{background:#fff;margin-bottom:10px;overflow:hidden;}
.m-section-hd{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 8px;}
.m-section-hd h2{font-size:17px;font-weight:700;color:#222;display:flex;align-items:center;gap:6px;}
.m-section-hd h2::before{content:'';width:3px;height:16px;background:#1a5f7a;border-radius:2px;display:inline-block;}
.m-section-hd .more{font-size:12px;color:#999;padding:2px 8px;border-radius:10px;background:#f5f5f5;}
.m-section-hd .subtitle{font-size:12px;color:#aaa;font-weight:400;margin-left:4px;}

/* ===== Feed Cards ===== */
.m-feed{padding:0 14px;}
.m-feed-item{display:flex;gap:10px;padding:13px 0;border-bottom:1px solid #f5f5f5;}
.m-feed-item:last-child{border-bottom:none;}
.m-feed-item .content{flex:1;display:flex;flex-direction:column;justify-content:space-between;min-width:0;}
.m-feed-item .title{font-size:16px;font-weight:600;color:#222;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.m-feed-item .desc{font-size:13px;color:#999;line-height:1.5;margin-top:5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.m-feed-item .meta{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;color:#bbb;}
.m-feed-item .meta .author{color:#1a5f7a;}
.m-feed-item .meta .cat-badge{background:#e8f3f8;color:#1a5f7a;padding:2px 7px;border-radius:3px;font-size:11px;font-weight:500;}
.m-feed-item .meta .views::before{content:'👀 ';}
.m-feed-item .meta .comments::before{content:'💬 ';}
.m-feed-item .thumb{flex-shrink:0;width:116px;height:78px;border-radius:6px;overflow:hidden;background:#f0f0f0;}
.m-feed-item .thumb img{width:100%;height:100%;object-fit:cover;}

.m-feed-item.large{flex-direction:column;padding:13px 0;}
.m-feed-item.large .thumb{width:100%;height:190px;margin-bottom:10px;border-radius:8px;}
.m-feed-item.large .title{font-size:18px;line-height:1.35;}
.m-feed-item.large .desc{font-size:14px;}

.m-feed-item.multi .thumb-group{display:flex;gap:4px;margin-top:8px;}
.m-feed-item.multi .thumb-group img{flex:1;height:78px;object-fit:cover;border-radius:4px;}
.m-feed-item.multi .content{flex-direction:column;}

/* ===== Banner ===== */
.m-banner{width:100%;height:170px;overflow:hidden;position:relative;background:#1a5f7a;}
.m-banner img{width:100%;height:100%;object-fit:cover;opacity:.85;}
.m-banner .overlay{position:absolute;bottom:0;left:0;right:0;padding:20px 14px 14px;background:linear-gradient(transparent,rgba(0,0,0,.6));}
.m-banner .overlay h2{color:#fff;font-size:20px;font-weight:700;text-shadow:0 1px 4px rgba(0,0,0,.4);letter-spacing:.5px;}
.m-banner .overlay p{color:rgba(255,255,255,.8);font-size:12px;margin-top:2px;}

/* ===== Grid ===== */
.m-grid{display:flex;flex-wrap:wrap;padding:8px 10px 12px;gap:8px;}
.m-grid .grid-item{width:calc(50% - 4px);border-radius:8px;overflow:hidden;position:relative;background:#f0f0f0;box-shadow:0 1px 4px rgba(0,0,0,.06);}
.m-grid .grid-item .pic{width:100%;height:105px;overflow:hidden;}
.m-grid .grid-item .pic img{width:100%;height:100%;object-fit:cover;transition:transform .3s;}
.m-grid .grid-item .txt{padding:8px 10px;font-size:13px;color:#333;background:#fff;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;font-weight:500;}
.m-grid .grid-item.large{width:100%;}
.m-grid .grid-item.large .pic{height:170px;}

/* ===== Bar list ===== */
.m-bar-list{padding:0 14px;}
.m-bar-item{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #f5f5f5;}
.m-bar-item:last-child{border-bottom:none;}
.m-bar-item .avatar{width:46px;height:46px;border-radius:8px;overflow:hidden;flex-shrink:0;background:#f0f0f0;}
.m-bar-item .avatar img{width:100%;height:100%;object-fit:cover;}
.m-bar-item .info{flex:1;min-width:0;}
.m-bar-item .info .name{font-size:15px;font-weight:600;color:#222;}
.m-bar-item .info .stats{font-size:12px;color:#bbb;margin-top:3px;}
.m-bar-item .info .stats .red{color:#e8893a;font-weight:500;}
.m-bar-item .arrow{color:#ddd;font-size:18px;}

/* ===== Footer ===== */
.m-footer{padding:24px 14px 20px;text-align:center;font-size:12px;color:#bbb;background:#fff;margin-top:10px;}
.m-footer p{margin-bottom:4px;line-height:1.8;}
.m-footer .links{display:flex;justify-content:center;gap:16px;margin-bottom:10px;}
.m-footer .links a{color:#1a5f7a;font-size:13px;}

/* ===== Bottom Tab Bar ===== */
.m-tabbar{position:fixed;bottom:0;left:0;right:0;height:56px;background:#fff;display:flex;border-top:1px solid #eee;z-index:1000;box-shadow:0 -1px 8px rgba(0,0,0,.04);}
.m-tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;color:#999;gap:3px;position:relative;transition:color .2s;}
.m-tabbar a.active{color:#1a5f7a;}
.m-tabbar a .icon{font-size:22px;line-height:1;}
.m-tabbar a .label{font-size:11px;}
.m-tabbar a .publish-btn{width:42px;height:42px;background:#ff7a00;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:22px;box-shadow:0 3px 8px rgba(255,122,0,.35);margin-top:-18px;}

/* ===== Content body ===== */
.m-content{padding-bottom:64px;min-height:100vh;padding-top:130px;}

/* ===== Section title colors ===== */
.bg-blue{background:linear-gradient(135deg,#1a5f7a,#2a7a99);color:#fff;}
.bg-yellow{background:linear-gradient(135deg,#daa520,#e8b530);color:#fff;}
.bg-pink{background:linear-gradient(135deg,#d4649a,#e07ab0);color:#fff;}
.bg-green{background:linear-gradient(135deg,#5a9e3e,#6db84f);color:#fff;}

.m-section-title-card{padding:10px 14px;border-radius:8px;margin:8px 14px;display:flex;align-items:center;gap:10px;box-shadow:0 2px 6px rgba(0,0,0,.08);}
.m-section-title-card h2{font-size:15px;font-weight:700;}
.m-section-title-card p{font-size:11px;opacity:.85;}

/* ===== Pager ===== */
.m-pager{display:flex;justify-content:center;gap:6px;padding:14px;}
.m-pager a,.m-pager span{padding:6px 14px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;background:#fff;color:#666;}
.m-pager .current{background:#1a5f7a;color:#fff;border-color:#1a5f7a;}
.m-pager .disabled{color:#ccc;}

/* ===== Empty state ===== */
.m-empty{padding:50px 14px;text-align:center;color:#bbb;font-size:14px;}
.m-empty .icon{font-size:40px;margin-bottom:10px;opacity:.5;}

/* ===== Post detail ===== */
.m-post-detail{background:#fff;padding:14px;}
.m-post-detail h1{font-size:21px;font-weight:700;color:#222;margin-bottom:10px;line-height:1.4;}
.m-post-detail .post-meta{display:flex;gap:8px;font-size:12px;color:#999;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid #f5f5f5;flex-wrap:wrap;align-items:center;}
.m-post-detail .post-meta .avatar{width:30px;height:30px;border-radius:50%;overflow:hidden;}
.m-post-detail .post-meta .avatar img{width:100%;height:100%;object-fit:cover;}
.m-post-detail .post-meta .author{color:#1a5f7a;font-weight:600;}
.m-post-detail .post-meta .badge{padding:2px 7px;border-radius:3px;font-size:11px;}
.m-post-detail .post-content{font-size:15px;line-height:1.8;color:#333;}
.m-post-detail .post-content p{margin-bottom:12px;}
.m-post-detail .post-content img{max-width:100%;border-radius:8px;margin:8px 0;}
.m-post-detail .post-content .img-center{text-align:center;}

/* ===== Breadcrumb ===== */
.m-crumb{padding:10px 14px;font-size:12px;color:#bbb;background:#fff;border-bottom:1px solid #f5f5f5;}
.m-crumb a{color:#1a5f7a;}
.m-crumb .sep{margin:0 4px;color:#ddd;}

/* ===== Comments ===== */
.m-comments{background:#fff;margin-top:10px;padding:14px;}
.m-comments h3{font-size:15px;font-weight:700;margin-bottom:14px;display:flex;align-items:center;gap:6px;}
.m-comments h3::before{content:'';width:3px;height:15px;background:#1a5f7a;border-radius:2px;}
.m-comment-item{display:flex;gap:8px;padding:10px 0;border-bottom:1px solid #f5f5f5;}
.m-comment-item:last-child{border-bottom:none;}
.m-comment-item .avatar{width:34px;height:34px;border-radius:50%;overflow:hidden;flex-shrink:0;background:#f0f0f0;}
.m-comment-item .avatar img{width:100%;height:100%;object-fit:cover;}
.m-comment-item .body{flex:1;min-width:0;}
.m-comment-item .name{font-size:13px;color:#1a5f7a;font-weight:600;}
.m-comment-item .text{font-size:14px;color:#333;margin-top:3px;line-height:1.5;}
.m-comment-item .time{font-size:11px;color:#ccc;margin-top:3px;}

/* ===== Form ===== */
.m-form{padding:14px;background:#fff;}
.m-form .form-group{margin-bottom:14px;}
.m-form label{display:block;font-size:13px;color:#666;margin-bottom:5px;font-weight:500;}
.m-form input,.m-form textarea,.m-form select{width:100%;padding:11px 12px;border:1px solid #e0e0e0;border-radius:8px;font-size:14px;background:#fafafa;transition:border-color .2s,background .2s;}
.m-form input:focus,.m-form textarea:focus,.m-form select:focus{border-color:#1a5f7a;background:#fff;outline:none;}
.m-form textarea{min-height:100px;resize:vertical;}
.m-form .btn-submit{width:100%;padding:13px;background:linear-gradient(135deg,#1a5f7a,#2a7a99);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;box-shadow:0 3px 8px rgba(26,95,122,.25);}
.m-form .btn-submit:active{opacity:.9;}
.m-form .captcha-box{display:flex;gap:8px;align-items:center;}
.m-form .captcha-box img{height:38px;border-radius:4px;cursor:pointer;}

/* ===== Publish modal ===== */
.m-publish-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:2000;justify-content:center;align-items:flex-end;}
.m-publish-overlay.show{display:flex;}
.m-publish-modal{background:#fff;width:100%;border-radius:14px 14px 0 0;padding:14px;max-height:80vh;overflow-y:auto;animation:slideUp .25s ease;}
@keyframes slideUp{from{transform:translateY(100%);}to{transform:translateY(0);}}
.m-publish-modal h3{font-size:16px;font-weight:700;margin-bottom:14px;text-align:center;color:#222;}
.m-publish-modal .close{float:right;font-size:22px;color:#ccc;line-height:1;}
.m-editor{min-height:120px;border:1px solid #e0e0e0;border-radius:8px;padding:12px;font-size:14px;outline:none;background:#fafafa;}
.m-editor:empty::before{content:attr(data-placeholder);color:#ccc;}
.m-title-input{width:100%;border:1px solid #e0e0e0;border-radius:8px;padding:10px 12px;font-size:14px;outline:none;background:#fafafa;margin-bottom:10px;}
.m-title-input:focus{border-color:#1a5f7a;background:#fff;}
.m-cat-select{width:100%;border:1px solid #e0e0e0;border-radius:8px;padding:8px 12px;font-size:13px;outline:none;background:#fafafa;margin-bottom:10px;color:#333;}
.m-editor:focus{border-color:#1a5f7a;background:#fff;}
.m-editor-tools{display:flex;gap:8px;padding:10px 0;flex-wrap:wrap;}
.m-editor-tools button{padding:6px 10px;border:1px solid #e0e0e0;border-radius:6px;background:#fff;font-size:13px;cursor:pointer;color:#666;transition:all .2s;}
.m-editor-tools button:active{background:#f0f0f0;}
.m-img-preview{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
.m-img-preview .img-item{position:relative;width:72px;height:72px;border-radius:6px;overflow:hidden;}
.m-img-preview .img-item img{width:100%;height:100%;object-fit:cover;}
.m-img-preview .img-item .del{position:absolute;top:2px;right:2px;width:18px;height:18px;background:rgba(255,77,79,.9);color:#fff;border-radius:50%;font-size:12px;text-align:center;line-height:18px;cursor:pointer;}
.m-publish-modal .btn-publish{width:100%;padding:12px;background:linear-gradient(135deg,#ff7a00,#ff9020);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;margin-top:10px;box-shadow:0 3px 8px rgba(255,122,0,.25);}
.m-publish-modal .btn-publish:active{opacity:.9;}
.m-village-bar{display:flex;align-items:center;gap:8px;background:#e8f3f8;padding:8px 12px;border-radius:8px;margin-bottom:8px;}
.m-village-bar .name{flex:1;font-size:13px;color:#1a5f7a;font-weight:600;}
.m-village-bar .change{font-size:12px;color:#ff7a00;cursor:pointer;}
.m-village-search input{width:100%;padding:9px 12px;border:1px solid #e0e0e0;border-radius:8px;font-size:13px;background:#fafafa;}
.m-village-search .results{max-height:200px;overflow-y:auto;margin-top:4px;}
.m-village-search .results .item{padding:9px 12px;border-bottom:1px solid #f5f5f5;font-size:13px;cursor:pointer;}
.m-village-search .results .item:hover{background:#f5f5f5;}

/* ===== User Center ===== */
.m-user-card{background:linear-gradient(135deg,#1a5f7a,#2a7a99);padding:24px 14px 20px;text-align:center;}
.m-user-card .avatar{width:64px;height:64px;border-radius:50%;margin:0 auto 8px;overflow:hidden;border:3px solid rgba(255,255,255,.3);}
.m-user-card .avatar img{width:100%;height:100%;object-fit:cover;}
.m-user-card .name{color:#fff;font-size:18px;font-weight:700;}
.m-user-card .bio{color:rgba(255,255,255,.7);font-size:12px;margin-top:4px;}
.m-user-card .village{color:rgba(255,255,255,.8);font-size:13px;margin-top:2px;}
.m-user-stats{display:flex;background:#fff;padding:14px 0;border-bottom:1px solid #f0f0f0;}
.m-user-stats .stat{flex:1;text-align:center;}
.m-user-stats .stat .num{font-size:20px;font-weight:700;color:#1a5f7a;}
.m-user-stats .stat .label{font-size:12px;color:#999;margin-top:2px;}
.m-user-stats .stat+.stat{border-left:1px solid #f0f0f0;}

/* ===== Login/Register ===== */
.m-auth-page{padding:30px 20px;background:#fff;min-height:calc(100vh - 114px);}
.m-auth-page h2{font-size:24px;font-weight:700;text-align:center;margin-bottom:6px;color:#1a5f7a;}
.m-auth-page .subtitle{text-align:center;font-size:13px;color:#999;margin-bottom:28px;}
