*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;font-family:PingFang SC,Microsoft YaHei,Segoe UI,sans-serif;background:linear-gradient(180deg,#eef4ff,#f7f9fc 28%,#f3f5f8);color:#1e293b;overflow-x:hidden}button,input{font:inherit}button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}.shell{width:100%;max-width:560px;min-height:100vh;min-height:100dvh;padding:18px 14px calc(40px + env(safe-area-inset-bottom));margin:auto}.top-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.page-title{margin:0;font-size:34px;line-height:1.1;font-weight:800;color:#0f172a}.page-subtitle{margin:8px 0 0;font-size:14px;color:#64748b}.update-time{font-size:13px;color:#94a3b8;white-space:nowrap;padding-top:8px}.header-main{min-width:0;flex:1}.db-select-wrap{display:flex;align-items:center;gap:8px;margin-top:10px}.db-select-label{font-size:13px;color:#475569;font-weight:600;flex-shrink:0}.db-select{flex:1;min-width:0;max-width:240px;height:34px;padding:0 10px;border:1px solid #dbeafe;border-radius:10px;background:#fff;color:#0f172a;font-size:13px}.db-select:disabled{opacity:.7;background:#f8fafc}.search-card,.empty-card,.team-card{background:#fff;border-radius:18px;box-shadow:0 8px 24px #0f172a0f}.search-card{padding:18px}.search-box-wrap{position:relative}.search-box{display:flex;align-items:center;gap:10px;padding:0 14px;height:52px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.search-icon{color:#94a3b8;font-size:18px}.search-input{flex:1;border:none;outline:none;font-size:16px;background:transparent}.search-btn{border:none;border-radius:10px;background:#2563eb;color:#fff;padding:0 14px;height:36px;font-size:14px;cursor:pointer;flex-shrink:0}.search-btn:disabled{opacity:.6;cursor:not-allowed}.clear-btn{border:none;background:transparent;color:#94a3b8;font-size:22px;cursor:pointer;line-height:1}.suggest-dropdown{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:20;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 12px 32px #0f172a1f;max-height:280px;overflow-y:auto}.suggest-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:10px;cursor:pointer}.suggest-item:hover,.suggest-item.active{background:#eff6ff}.suggest-name{font-size:14px;font-weight:600;color:#0f172a}.suggest-union{font-size:12px;color:#64748b;flex-shrink:0}.suggest-message{padding:12px 14px;font-size:13px;color:#64748b}.filter-row,.toolbar-row,.advanced-row{margin-top:14px}.filter-row,.toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.filter-group{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.filter-label{font-size:14px;color:#475569;font-weight:600}.pill-group{display:flex;gap:8px;flex-wrap:wrap}.pill-group.small .pill{min-width:64px;padding:6px 12px;font-size:13px}.pill{border:none;background:#f1f5f9;color:#64748b;border-radius:999px;padding:8px 16px;font-size:14px;cursor:pointer;transition:all .15s ease;min-height:36px}.pill.outline{background:#fff;border:1px solid #dbeafe}.pill.active{background:#2563eb;color:#fff;box-shadow:0 4px 12px #2563eb40}.pill.outline.active{background:#eff6ff;color:#2563eb;border-color:#93c5fd;box-shadow:none}.link-btn{border:none;background:transparent;color:#475569;font-size:14px;cursor:pointer}.toggle-groups{display:flex;gap:10px;flex-wrap:wrap}.advanced-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.advanced-row input{width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;font-size:14px}.primary-btn{border:none;border-radius:10px;background:#2563eb;color:#fff;font-size:14px;cursor:pointer;min-height:44px}.primary-btn:disabled{opacity:.6;cursor:not-allowed}.status{margin-top:12px;font-size:13px;color:#64748b}.status.error{color:#dc2626}.status.warn{color:#d97706}.empty-card{margin-top:18px;padding:56px 24px;text-align:center}.empty-title{font-size:20px;font-weight:700;color:#0f172a}.empty-desc{margin-top:8px;font-size:14px;color:#64748b}.results-section{margin-top:18px}.result-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:0 4px}.result-title{font-size:18px;font-weight:700;color:#0f172a}.result-count{font-size:14px;color:#64748b}.player-section{display:flex;flex-direction:column;gap:14px}.team-card{overflow:hidden;border:1px solid #e8edf3}.team-card-inner{display:flex}.team-accent{width:5px;background:linear-gradient(180deg,#2563eb,#60a5fa);flex-shrink:0}.team-main{flex:1;padding:16px 18px 14px}.team-top-left{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.team-player{font-size:18px;font-weight:800;color:#0f172a}.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600}.badge.blue{background:#dbeafe;color:#1d4ed8}.badge.green{background:#dcfce7;color:#15803d}.badge.gray{background:#f1f5f9;color:#64748b}.team-body{display:grid;grid-template-columns:1fr 92px;gap:12px;margin-top:14px;align-items:start}.hero-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-width:0}.hero-col{min-width:0}.hero-level-row{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:13px;color:#475569;margin-bottom:10px}.stars{display:inline-flex;gap:1px}.star{font-style:normal;font-size:12px}.star.filled{color:#ef4444}.star.empty{color:#fecaca}.hero-info-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:10px}.type-badge,.country-badge{display:inline-grid;place-items:center;border-radius:8px;font-size:13px;font-weight:700;color:#fff;flex-shrink:0}.type-badge{width:28px;height:28px}.country-badge{width:24px;height:24px;font-size:12px}.type-badge.cavalry{background:#2563eb}.type-badge.infantry{background:#eab308;color:#422006}.type-badge.archer{background:#dc2626}.type-badge.default{background:#94a3b8}.country-badge.wei{background:#2563eb}.country-badge.shu{background:#16a34a}.country-badge.wu{background:#dc2626}.country-badge.qun{background:#ca8a04}.country-badge.han{background:#64748b}.country-badge.jin{background:#7c3aed}.country-badge.default{background:#94a3b8}.hero-name{font-size:14px;font-weight:700;color:#0f172a;line-height:1.3}.skill-pills{display:flex;flex-direction:column;gap:6px}.skill-pill{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-radius:8px;background:#f3f4f6;border:1px solid #e5e7eb;min-width:0}.skill-grade{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border-radius:4px;font-size:11px;font-weight:800;flex-shrink:0}.skill-grade.s{background:#fef3c7;color:#b45309}.skill-grade.a{background:#dbeafe;color:#1d4ed8}.skill-grade.b{background:#dcfce7;color:#15803d}.skill-grade.c{background:#f1f5f9;color:#64748b}.skill-grade.d{background:#fee2e2;color:#b91c1c}.skill-grade.default{background:#f1f5f9;color:#64748b}.skill-name{flex:1;min-width:0;font-size:12px;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-lv{font-size:11px;color:#64748b;font-weight:600;flex-shrink:0}.side-stat{border:2px solid #86efac;background:#f0fdf4;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:120px;padding:10px 8px}.side-stat-label{font-size:13px;color:#64748b;margin-bottom:8px}.side-stat-value{font-size:28px;line-height:1;font-weight:800}.side-stat-meta{margin-top:6px;font-size:11px;color:#94a3b8}.side-stat.rank-1{border:2px solid transparent;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(160deg,#fb923c,#4ade80,#38bdf8,#fde047) border-box}.side-stat.rank-1 .side-stat-value{background:linear-gradient(180deg,#9333ea,#ec4899 45%,#facc15);-webkit-background-clip:text;background-clip:text;color:transparent}.side-stat.rank-2{border-color:#fbbf24;background:linear-gradient(180deg,#fffbeb,#fef3c7)}.side-stat.rank-2 .side-stat-value{color:#92400e}.side-stat.rank-3{border-color:#cbd5e1;background:linear-gradient(180deg,#f8fafc,#eef2f7)}.side-stat.rank-3 .side-stat-value{color:#475569}.side-stat.rank-default{border-color:#d6d3d1;background:#fafaf9}.side-stat.rank-default .side-stat-value{color:#78716c}.team-accent.rank-1{background:linear-gradient(180deg,#9333ea,#ec4899,#facc15)}.team-accent.rank-2{background:linear-gradient(180deg,#f59e0b,#fbbf24)}.team-accent.rank-3{background:linear-gradient(180deg,#94a3b8,#cbd5e1)}.team-accent.rank-default{background:linear-gradient(180deg,#a8a29e,#d6d3d1)}.team-footer{margin-top:8px;padding-top:8px;border-top:1px solid #f1f5f9;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.detail-btn{padding:6px 12px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#2563eb;font-size:12px;font-weight:600;cursor:pointer}.detail-btn.active{background:#2563eb;color:#fff;border-color:#2563eb}.battle-detail-panel{margin-top:12px;padding:12px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0}.battle-detail-loading,.battle-detail-empty,.battle-detail-error{font-size:13px;color:#64748b;text-align:center;padding:12px 0}.battle-detail-error{color:#dc2626}.battle-summary{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px;font-size:12px;color:#475569}.battle-summary .win{color:#16a34a;font-weight:600}.battle-summary .loss{color:#dc2626;font-weight:600}.battle-summary .draw{color:#d97706;font-weight:600}.battle-row{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px;margin-bottom:8px}.battle-row-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}.outcome-tag{padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700}.outcome-tag.win{background:#dcfce7;color:#15803d}.outcome-tag.loss{background:#fee2e2;color:#b91c1c}.outcome-tag.draw{background:#fef3c7;color:#b45309}.outcome-tag.other{background:#f1f5f9;color:#64748b}.role-tag,.battle-time,.battle-place{font-size:12px;color:#64748b}.battle-versus{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:stretch}.battle-vs-mark{display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#94a3b8;padding:0 2px}.battle-side{padding:10px;border-radius:10px;background:#fff;border:1px solid #e2e8f0;min-width:0}.battle-side--our{border-color:#bfdbfe;background:#f8fbff}.battle-side--opp{border-color:#fecaca;background:snow}.battle-side-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:8px}.battle-side-tag{padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700}.battle-side-tag.our{background:#dbeafe;color:#1d4ed8}.battle-side-tag.opp{background:#fee2e2;color:#b91c1c}.battle-side-name{font-size:13px;font-weight:700;color:#0f172a}.battle-side-union,.battle-side-meta{font-size:11px;color:#64748b}.battle-side-heroes{display:grid;grid-template-columns:1fr;gap:6px;margin-bottom:10px}.battle-side-hero{padding:6px 8px;border-radius:8px;background:#fffc;border:1px solid #e2e8f0}.battle-hero-name{font-size:12px;font-weight:600;color:#1e293b}.battle-hero-meta{margin-top:2px;font-size:11px;color:#64748b}.hp-panel-stats{display:flex;flex-wrap:wrap;gap:6px 8px;margin-bottom:6px;font-size:11px;color:#475569}.hp-panel-stats .alive{color:#16a34a;font-weight:600}.hp-panel-stats .wounded{color:#d97706;font-weight:600}.hp-panel-stats .dead{color:#dc2626;font-weight:600}.hp-bar{display:flex;width:100%;height:10px;border-radius:999px;overflow:hidden;background:#e2e8f0}.hp-bar-alive,.hp-bar-wounded,.hp-bar-dead{height:100%;transition:width .2s ease}.hp-bar-alive{background:linear-gradient(90deg,#22c55e,#16a34a)}.hp-bar-wounded{background:linear-gradient(90deg,#fbbf24,#f59e0b)}.hp-bar-dead{background:linear-gradient(90deg,#f87171,#dc2626)}@media (max-width: 520px){.battle-versus{grid-template-columns:1fr}.battle-vs-mark{padding:4px 0}}.battle-pager{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:10px}.battle-pager button{padding:6px 12px;border:1px solid #dbeafe;border-radius:8px;background:#fff;color:#2563eb;font-size:12px}.battle-pager button:disabled{opacity:.45;cursor:not-allowed}.battle-pager span{font-size:12px;color:#64748b}.footer-tags{display:flex;gap:8px;flex-wrap:wrap}.footer-tag{padding:4px 10px;border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12px;color:#64748b}.pager{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:18px}.pager button{padding:10px 16px;min-height:44px;border:1px solid #dbeafe;border-radius:10px;background:#fff;color:#2563eb;cursor:pointer}.pager button:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 820px){.page-title{font-size:28px}.page-subtitle{font-size:13px}.advanced-row{grid-template-columns:1fr 1fr}.team-body{grid-template-columns:1fr}.side-stat{min-height:72px;flex-direction:row;justify-content:space-between;padding:12px 16px}.side-stat-label{margin-bottom:0}}@media (max-width: 640px){.shell{padding:10px 10px calc(24px + env(safe-area-inset-bottom))}.top-header{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.page-title{font-size:22px}.page-subtitle{display:none}.db-select-wrap{margin-top:6px;gap:6px}.db-select-label{font-size:12px}.db-select{max-width:none;height:32px;font-size:12px}.update-time{padding-top:0;font-size:11px;white-space:nowrap;text-align:right}.search-card,.empty-card,.team-card{border-radius:12px;box-shadow:0 4px 14px #0f172a0d}.search-card{padding:10px}.search-box{height:40px;min-height:40px;flex-wrap:nowrap;padding:0 8px;gap:6px;border-radius:10px}.search-input{flex:1;min-width:0;font-size:16px}.search-btn{flex:0 0 auto;width:auto;height:32px;padding:0 10px;font-size:13px}.clear-btn{width:28px;height:28px;font-size:18px}.suggest-dropdown{max-height:min(220px,36dvh);padding:4px;border-radius:10px}.suggest-item{padding:8px 10px}.filter-row,.toolbar-row,.advanced-row{margin-top:8px}.filter-row,.toolbar-row{flex-direction:row;align-items:center;gap:6px}.filter-group{flex-direction:row;align-items:center;gap:6px;flex:1;min-width:0}.filter-label{font-size:12px;flex-shrink:0}.filter-group .pill-group{gap:4px}.toolbar-row{flex-wrap:wrap}.link-btn{font-size:12px;flex-shrink:0}.toggle-groups{flex:1;flex-direction:row;gap:6px;min-width:0}.toggle-groups .pill-group{gap:4px}.pill{padding:4px 10px;font-size:12px;min-height:28px}.pill-group.small .pill{min-width:44px;padding:4px 8px;font-size:11px}.advanced-row input{padding:8px 10px;font-size:14px}.primary-btn{min-height:38px}.advanced-row{grid-template-columns:1fr;gap:6px}.status{margin-top:8px;font-size:12px}.results-section{margin-top:10px}.result-head{flex-direction:row;align-items:center;margin-bottom:8px;padding:0}.result-title{font-size:15px}.result-count{font-size:12px}.player-section{gap:8px}.team-accent{width:3px}.team-main{padding:8px 10px}.team-top-left{gap:6px}.team-player{font-size:14px}.badge{font-size:10px;padding:2px 6px}.team-body{display:flex;flex-direction:column;gap:6px;margin-top:8px}.side-stat{order:-1;width:100%;min-height:44px;padding:6px 12px;border-radius:8px;border-width:1px}.side-stat-label{font-size:12px}.side-stat-value{font-size:20px}.hero-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;overflow:visible;padding-bottom:0}.hero-col{padding:4px 2px;border:none;border-radius:0;background:transparent;border-right:1px solid #eef2f7}.hero-col:last-child{border-right:none}.hero-level-row{font-size:11px;margin-bottom:4px;gap:2px}.star{font-size:10px}.hero-info-row{gap:3px;margin-bottom:4px}.type-badge{width:22px;height:22px;font-size:11px;border-radius:6px}.country-badge{width:20px;height:20px;font-size:10px;border-radius:5px}.hero-name{font-size:12px}.skill-pills{gap:3px}.skill-pill{padding:4px 5px;gap:4px;border-radius:6px}.skill-name,.skill-lv{font-size:10px}.team-footer{flex-direction:row;align-items:center;gap:6px;margin-top:8px;padding-top:8px}.footer-tags{flex:1;gap:4px}.footer-tag{padding:2px 6px;font-size:10px}.empty-card{margin-top:10px;padding:28px 14px}.empty-title{font-size:16px}.empty-desc{font-size:12px;margin-top:6px}.pager{margin-top:12px;gap:6px}.pager span{width:auto;order:0;font-size:12px}.pager button{flex:0 1 auto;min-height:36px;padding:6px 12px;font-size:13px}}@media (max-width: 380px){.page-title{font-size:20px}.update-time{font-size:10px}.search-icon{display:none}.hero-name{font-size:11px}.skill-name,.skill-lv{font-size:9px}.badge{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
