.mobile-shell{min-height:100vh;background:#f7f8fa;padding-bottom:76px}
.m-topbar{position:sticky;top:0;z-index:100;background:#fff;padding:14px 16px;text-align:center;font-size:16px;font-weight:600;border-bottom:1px solid #f2f3f5}
.m-topbar .back{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:22px;color:#4e5969;cursor:pointer;display:none;padding:4px 8px}
.m-topbar.has-back .back{display:block}
.m-topbar .right{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:18px;cursor:pointer;color:#4e5969}
.m-page{display:none;padding:16px}
.m-page.show{display:block;animation:fade .25s ease}

/* Hero */
.m-hero{background:linear-gradient(135deg,#1677ff,#4b94ff);border-radius:16px;padding:20px;color:#fff;position:relative;overflow:hidden;box-shadow:0 8px 24px rgba(22,119,255,.25);margin-bottom:16px}
.m-hero::after{content:'';position:absolute;top:-30px;right:-30px;width:120px;height:120px;background:rgba(255,255,255,.08);border-radius:50%}
.m-hero-title{font-size:15px;font-weight:600;margin-bottom:14px;position:relative;z-index:1}
.m-input{width:100%;padding:13px 15px;border-radius:10px;border:none;outline:none;font-size:15px;background:rgba(255,255,255,.95);margin-bottom:10px;position:relative;z-index:1;color:var(--text)}
.m-input::placeholder{color:#c9cdd4}
.m-hint{font-size:11px;color:rgba(255,255,255,.78);margin-bottom:10px;position:relative;z-index:1;line-height:1.6}
.m-state-row{display:flex;gap:6px;margin-bottom:12px;position:relative;z-index:1}
.m-state{flex:1;text-align:center;padding:8px 4px;font-size:12px;border-radius:8px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.25);cursor:pointer;user-select:none;transition:.15s}
.m-state.active{background:rgba(255,255,255,.95);color:#1677ff;font-weight:600;border-color:#fff}
.m-row{display:flex;gap:10px;margin-bottom:12px;position:relative;z-index:1}
.m-row .m-input{margin-bottom:0;flex:1;padding:10px 12px;font-size:13px}
.m-temp-row{display:flex;gap:6px;margin-bottom:10px;position:relative;z-index:1}
.m-temp{flex:1;text-align:center;padding:7px 4px;font-size:11px;border-radius:8px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.25);cursor:pointer;user-select:none}
.m-temp.active{background:rgba(255,255,255,.95);color:#1677ff;font-weight:600;border-color:#fff}
.m-btn-main{width:100%;padding:14px;border-radius:10px;background:rgba(255,255,255,.95);color:#1677ff;font-size:16px;font-weight:700;position:relative;z-index:1;transition:.15s}
.m-btn-main:active{transform:scale(.98)}
.m-btn-main:disabled{opacity:.7;cursor:not-allowed}
.m-hero-sub{display:flex;justify-content:space-around;margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.2);position:relative;z-index:1}
.m-hero-sub div{text-align:center;font-size:11px;opacity:.92;cursor:pointer}
.m-hero-sub .ic{display:block;font-size:18px;margin-bottom:4px}

/* 结果卡 */
.m-card{background:#fff;border-radius:14px;padding:20px;margin-bottom:14px;box-shadow:0 2px 12px rgba(0,0,0,.04);animation:fade .3s}
.m-result-label{font-size:12px;color:var(--muted);text-align:center;margin-bottom:6px}
.m-result-value{font-size:42px;font-weight:700;color:var(--primary);font-family:'Courier New',monospace;text-align:center;line-height:1.1;margin-bottom:10px;letter-spacing:-1px}
.m-result-value.err{color:var(--danger);font-size:32px}
.m-result-value.warn{color:var(--warning);font-size:36px}
.m-tag{display:inline-block;padding:3px 10px;border-radius:10px;font-size:11px;font-weight:600}
.m-tag-exact{background:#e8fff3;color:var(--success)}
.m-tag-est{background:#fff7e6;color:var(--warning)}
.m-tag-err{background:#fff1f0;color:var(--danger)}
.m-tag-info{background:var(--primary-light);color:var(--primary)}
.m-result-msg{font-size:12px;color:#4e5969;text-align:center;padding:10px;background:#f7f8fa;border-radius:8px;line-height:1.6;margin-top:10px;white-space:pre-wrap}
.m-result-msg.err{background:#fff1f0;color:var(--danger);text-align:left}
.m-corr{margin-top:10px;padding:10px 12px;background:#f0f7ff;border-radius:8px;font-size:11.5px;line-height:1.8;color:#4e5969}
.m-corr .row{display:flex;justify-content:space-between;gap:8px}
.m-corr .lbl{color:var(--muted)}
.m-corr .val{font-family:'Courier New',monospace;font-weight:600}
.m-corr .val.pos{color:var(--success)}
.m-corr .val.neg{color:var(--danger)}
.m-warn{margin-top:10px;padding:10px 12px;background:#fff7e6;border-radius:8px;font-size:11.5px;line-height:1.7;color:#ad6800}
.m-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.m-actions button{flex:1;padding:10px;border-radius:8px;font-size:13px;font-weight:600;transition:.15s}
.m-actions button:active{transform:scale(.97)}
.m-act-blue{background:var(--primary-light);color:var(--primary)}
.m-act-green{background:#f0fdf4;color:var(--success)}
.m-act-purple{background:#f5f0ff;color:#722ed1;flex-basis:100%!important}

/* 混合入口 */
.m-mix-entry{background:linear-gradient(135deg,#f0fdf4,#e8fff3);border:1px solid #b7ebcf;border-radius:12px;padding:16px;display:flex;align-items:center;gap:12px;margin-bottom:16px;cursor:pointer;transition:.15s}
.m-mix-entry:active{transform:scale(.99)}
.m-mix-icon{width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#00b96b,#4dd39a);display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.m-mix-title{font-size:14px;font-weight:600;margin-bottom:3px}
.m-mix-desc{font-size:12px;color:var(--muted)}
.m-arrow{margin-left:auto;color:#c9cdd4;font-size:20px}

.m-section-title{font-size:15px;font-weight:600;margin:16px 0 12px;display:flex;justify-content:space-between;align-items:center}
.m-section-title .sub{font-size:12px;color:var(--muted);font-weight:400}

/* 工具网格 */
.m-tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.m-tool{background:#fff;border:1px solid #f2f3f5;border-radius:12px;padding:14px 12px;cursor:pointer;position:relative;transition:.15s}
.m-tool:active{transform:scale(.97)}
.m-tool-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:10px;background:#f0f7ff}
.m-tool-name{font-size:13.5px;font-weight:600;margin-bottom:4px;display:block}
.m-tool-desc{font-size:11px;color:var(--muted);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 汇总卡 */
.m-summary{background:linear-gradient(135deg,#1677ff,#4b94ff);border-radius:14px;padding:18px;color:#fff;margin-bottom:14px;position:relative;overflow:hidden;box-shadow:0 6px 20px rgba(22,119,255,.25)}
.m-summary::after{content:'';position:absolute;top:-20px;right:-20px;width:100px;height:100px;background:rgba(255,255,255,.1);border-radius:50%}
.m-summary-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;position:relative;z-index:1}
.m-summary-title{font-size:15px;font-weight:600}
.m-summary-badge{font-size:11px;padding:3px 8px;background:rgba(255,255,255,.2);border-radius:10px}
.m-summary-stats{display:flex;gap:16px;margin-bottom:14px;position:relative;z-index:1}
.m-stat{flex:1}
.m-stat .v{font-size:26px;font-weight:700;font-family:'Courier New',monospace;line-height:1.1}
.m-stat .v .u{font-size:13px;opacity:.85;margin-left:2px}
.m-stat .c{font-size:11px;opacity:.85;margin-top:4px;display:block}
.m-summary-btn{width:100%;padding:10px;border-radius:8px;background:rgba(255,255,255,.95);color:#1677ff;font-size:13px;font-weight:600;position:relative;z-index:1}

/* 历史 / 材料 */
.m-history{background:#fff;border-radius:12px;padding:14px;margin-bottom:10px;box-shadow:0 2px 8px rgba(0,0,0,.02);cursor:pointer;transition:.15s}
.m-history:active{transform:scale(.99)}
.m-history-top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px;gap:10px}
.m-history-name{font-size:15px;font-weight:600;word-break:break-all}
.m-history-val{font-size:18px;font-weight:700;color:var(--primary);font-family:'Courier New',monospace;flex-shrink:0}
.m-history-meta{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);flex-wrap:wrap}
.m-history-time{margin-left:auto;font-family:'Courier New',monospace}
.m-history-del{color:var(--danger);cursor:pointer;font-size:11px}

/* 信息墙 */
.m-feed-hero{background:linear-gradient(135deg,#ff6b6b,#ffa06b);border-radius:16px;padding:22px 20px;color:#fff;margin-bottom:14px;position:relative;overflow:hidden;cursor:pointer}
.m-feed-hero::after{content:'';position:absolute;top:-30px;right:-30px;width:120px;height:120px;background:rgba(255,255,255,.1);border-radius:50%}
.m-feed-tag{display:inline-block;font-size:11px;padding:3px 10px;background:rgba(255,255,255,.25);border-radius:10px;margin-bottom:10px;font-weight:600;position:relative;z-index:1}
.m-feed-title{font-size:18px;font-weight:700;line-height:1.4;margin-bottom:8px;position:relative;z-index:1}
.m-feed-desc{font-size:12px;opacity:.9;line-height:1.6;position:relative;z-index:1}
.m-filters{display:flex;gap:6px;margin-bottom:14px;overflow-x:auto;padding-bottom:4px}
.m-filters::-webkit-scrollbar{display:none}
.m-filter{flex-shrink:0;padding:6px 14px;font-size:12px;background:#fff;color:#4e5969;border-radius:14px;border:1px solid #f2f3f5;cursor:pointer}
.m-filter.active{background:var(--primary);color:#fff;border-color:var(--primary);font-weight:500}
.m-feed-item{background:#fff;border:1px solid #f2f3f5;border-radius:12px;padding:14px;margin-bottom:10px;cursor:pointer}
.m-feed-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.m-feed-type{font-size:10px;font-weight:600;padding:2px 8px;border-radius:6px}
.m-feed-time{font-size:11px;color:#c9cdd4;margin-left:auto;font-family:'Courier New',monospace}
.m-feed-name{font-size:15px;font-weight:600;line-height:1.4;margin-bottom:6px}
.m-feed-text{font-size:12px;color:var(--muted);line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 我的 */
.m-profile{background:#fff;border-radius:14px;padding:20px;margin-bottom:14px;display:flex;align-items:center;gap:14px}
.m-avatar{width:60px;height:60px;border-radius:50%;background:#e8f3ff;display:flex;align-items:center;justify-content:center;font-size:30px;flex-shrink:0}
.m-profile-name{font-size:18px;font-weight:600;margin-bottom:4px}
.m-profile-role{font-size:13px;color:var(--muted)}
.m-profile-btn{margin-left:auto;background:var(--primary);color:#fff;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600}
.m-coop{background:linear-gradient(135deg,#0a1d3f,#1e3a8a);border-radius:14px;padding:20px 16px;margin-bottom:14px;color:#fff;position:relative;overflow:hidden}
.m-coop-tag{position:absolute;top:12px;right:12px;background:#fde047;color:#0a1d3f;font-size:11px;font-weight:700;padding:3px 8px;border-radius:10px}
.m-coop-title{font-size:18px;font-weight:600;display:block;margin-bottom:10px}
.m-coop-desc{font-size:12.5px;opacity:.85;display:block;margin-bottom:14px;line-height:1.7}
.m-coop-item{display:flex;gap:8px;font-size:12.5px;line-height:1.7;opacity:.9;margin-bottom:8px}
.m-coop-dot{width:5px;height:5px;border-radius:50%;background:#fde047;margin-top:8px;flex-shrink:0}
.m-menu{background:#fff;border-radius:14px;overflow:hidden;margin-bottom:14px}
.m-menu-item{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #f2f3f5;font-size:15px;cursor:pointer}
.m-menu-item:last-child{border-bottom:none}
.m-menu-item:active{background:#f7f8fa}
.m-menu-arrow{color:#c9cdd4;font-size:18px}
.m-footer{text-align:center;padding:16px;font-size:11px;color:#a9aeb8;line-height:1.8}

/* TabBar */
.m-tabbar{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #f2f3f5;display:flex;padding:6px 0 max(6px,env(safe-area-inset-bottom));z-index:1000;box-shadow:0 -2px 12px rgba(0,0,0,.03)}
.m-tab{flex:1;text-align:center;padding:6px 0;cursor:pointer;user-select:none}
.m-tab .ic{font-size:20px;display:block;line-height:1;margin-bottom:2px}
.m-tab .tx{font-size:11px;color:var(--muted)}
.m-tab.active .tx{color:var(--primary);font-weight:600}

/* 工具详情通用 */
.m-tool-detail .card{background:#fff;border-radius:12px;padding:16px;margin-bottom:14px}
.m-tool-detail .result-box{background:#f0f7ff;border-radius:12px;padding:18px;margin-top:14px;text-align:center}
.m-tool-detail .result-box .val{font-size:36px;font-weight:700;color:var(--primary);font-family:'Courier New',monospace;line-height:1.1}
.m-tool-detail .result-box .unit{font-size:14px;font-weight:500}
.m-tool-detail .result-box .lbl{font-size:12px;color:#4e5969;margin-bottom:6px}
.m-tool-detail .result-box .sub{font-size:12px;color:#4e5969;margin-top:8px}
.m-metal-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:8px}
.m-metal-btn{padding:8px 0;text-align:center;font-size:13px;font-weight:600;background:#f7f8fa;color:#4e5969;border-radius:8px;cursor:pointer;font-family:'Courier New',monospace;transition:.15s}
.m-metal-btn.active{background:var(--primary);color:#fff}
.m-wv-units{display:flex;gap:6px;margin-top:6px}
.m-wv-unit{padding:5px 12px;font-size:12px;background:#f7f8fa;color:#4e5969;border-radius:14px;cursor:pointer;transition:.15s}
.m-wv-unit.active{background:var(--primary-light);color:var(--primary);font-weight:600}
.m-mix-comp{margin-bottom:12px;padding:12px;background:#f7f8fa;border-radius:10px}
.m-mix-comp-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.m-mix-comp-title{font-size:13px;font-weight:600}
.m-mix-comp-del{color:var(--danger);font-size:12px;cursor:pointer}
.m-mix-sum{font-size:12px;color:var(--muted);text-align:right;margin:4px 4px 10px}
.m-mix-detail{margin-top:12px;background:#fff;border:1px solid #f2f3f5;border-radius:10px;padding:10px 14px;font-size:12px}
.m-mix-detail .row{display:flex;justify-content:space-between;padding:4px 0;border-top:1px dashed #f2f3f5}
.m-mix-detail .row:first-child{border-top:none}
@media (max-width: 768px) {
  .d-layout-2col { grid-template-columns: 1fr !important; }
  .d-card { padding: 16px !important; width: 100% !important; }
  .d-form-row { flex-direction: column; gap: 10px; }
  .d-form-row .d-form-group { width: 100%; }
}