/* 保留各工具配色，统一同组控件的字号、密度与对齐。 */
button,input,select,textarea{font-family:inherit;line-height:1.45}
button,a,input,select,textarea{box-sizing:border-box}

body[data-ui="home"]{font-size:14px;line-height:1.65}
body[data-ui="home"] h1{font-size:24px;margin:0 0 18px}
body[data-ui="home"] h2{font-size:20px;margin:0 0 12px}
body[data-ui="home"] h3{font-size:16px}
body[data-ui="home"] #mainTabs{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
body[data-ui="home"] button,body[data-ui="home"] section a,body[data-ui="home"] select{font-size:14px;line-height:1.45;padding:7px 12px;min-height:36px}
body[data-ui="home"] #mainTabs button{margin:0}
body[data-ui="home"] .capture-choice b{font-size:14px}
body[data-ui="home"] .capture-choice small{font-size:13px;line-height:1.6}
body[data-ui="home"] .capture-choice button{padding:6px 12px;min-height:34px;font-size:14px}
body[data-ui="home"] .connection-choice{gap:8px}
body[data-ui="home"] .query-status pre{font-size:14px}
body[data-ui="home"] .library-actions :is(button,select,a){min-height:36px;padding:7px 12px;font-size:14px}
body[data-ui="home"] #tools>a{margin:4px 8px 4px 0}

.assistant-log-dialog,.environment-dialog{font-size:14px;line-height:1.6}
.assistant-log-dialog header,.environment-dialog header{padding:0;margin:0;gap:8px}
.assistant-log-dialog :is(button,select,a),.environment-dialog button{font-size:14px;line-height:1.45;min-height:34px;padding:6px 10px;margin:0}
.assistant-log-toolbar label{display:inline-flex;align-items:center;gap:6px;font-size:14px}
.assistant-log-meta{align-items:center}
.assistant-log-meta time,.assistant-log-meta span{font-size:12px}

body[data-ui="entry"]{height:100dvh;display:flex;flex-direction:column}
body[data-ui="entry"] .toolbar{padding:10px 14px;gap:10px;min-height:58px;flex:none}
body[data-ui="entry"] .toolbar h1{font-size:18px;margin:0 8px 0 0}
body[data-ui="entry"] .toolbar :is(select,button){font-size:14px;height:36px;padding:6px 10px}
body[data-ui="entry"] #source{min-width:0;max-width:none}
body[data-ui="entry"] #load{white-space:nowrap;flex:none}
body[data-ui="entry"] iframe{flex:1;min-height:0;height:0}
.assistant-log-floating{font:13px/1.45 "Microsoft YaHei",sans-serif;min-height:34px;padding:6px 10px}

/* 跑船：同排结果值和对比行采用相同字号。 */
body[data-ui="sailing"] .summary-grid .metric strong{font-size:26px}
body[data-ui="sailing"] .batch-row strong{font-size:inherit}
body[data-ui="sailing"] .header-actions .header-button{font-size:13px;height:48px;min-height:48px}
body[data-ui="sailing"] .trip-stat :is(b,small){line-height:1.5}

body[data-ui="scores"] #scoreWizard{font-size:13px;line-height:1.55}
body[data-ui="scores"] #scoreWizard :is(.sw-note,.sw-source,.sw-tools,.sw-footer,.sw-tabs,.sw-steps){font-size:13px}
body[data-ui="scores"] #scoreWizard :is(button,input,select,.sw-file){font-size:13px;line-height:1.45;min-height:32px;padding:5px 8px}
body[data-ui="scores"] #scoreWizard input[type=checkbox]{min-height:0;width:16px;height:16px;padding:0;vertical-align:middle}
body[data-ui="scores"] #scoreWizard :is(th,td){font-size:13px}
body[data-ui="scores"] #scoreWizard .sw-summaries>section{min-width:0;overflow-x:auto}
body[data-ui="scores"] #scoreWizard [data-second-grid]{min-width:400px}
body[data-ui="scores"] #scoreWizard [data-third-grid]{min-width:560px}
body[data-ui="scores"] #scoreWizard .sw-summary :is(th,td){word-break:normal;overflow-wrap:normal}
body[data-ui="scores"] #scoreWizard .sw-summary th{white-space:nowrap}
body[data-ui="scores"] .base-table-wrap{padding:0}
body[data-ui="scores"] .base-table-wrap>summary{font-size:14px;padding:10px 14px}
body[data-ui="scores"] .base-table-wrap[open]{padding:12px 14px}
body[data-ui="scores"] .base-table-wrap[open]>summary{padding:0 0 10px}

body[data-ui="battlefield"] .top-actions button{font-size:13px;min-height:34px;padding:6px 10px}
body[data-ui="battlefield"] .map-tools{align-items:center}
body[data-ui="battlefield"] .map-tools :is(button,select,input[type=search],label){font-size:13px;line-height:1.45;min-height:34px;padding:6px 8px}
body[data-ui="battlefield"] .map-tools label{display:inline-flex;align-items:center;gap:4px}
body[data-ui="battlefield"] .map-tools input[type=checkbox]{width:14px;height:14px;margin:0}
body[data-ui="battlefield"] .map-tools .icon{width:34px;padding:4px}
body[data-ui="battlefield"] .page-heading button,body[data-ui="battlefield"] .content-page :is(input,select){font-size:13px}

body[data-ui="qi"] .toolbar .btn{font-size:13px;line-height:1.45;min-height:32px;padding:6px 10px}
body[data-ui="qi"] .settings .inline,body[data-ui="qi"] .settings :is(input,select){font-size:13px}
body[data-ui="qi"] .field :is(label,input,select){font-size:13px}

/* 磨血：选择项不继承普通字段标签的伸展宽度，表格局部滚动。 */
body[data-ui="damage"] .layout{grid-template-columns:360px minmax(0,1fr) 320px}
body[data-ui="damage"] .layout>*{min-width:0}
body[data-ui="damage"] .radio-group{display:flex;gap:6px;flex:1 1 260px}
body[data-ui="damage"] .radio-group label{flex:0 0 auto;min-height:32px;padding:5px 10px;border-radius:6px;font-size:13px}
body[data-ui="damage"] .row{gap:8px;margin-bottom:10px}
body[data-ui="damage"] .row>label{font-size:14px}
body[data-ui="damage"] .row input[type=number]{font:14px/1.45 "Microsoft YaHei",sans-serif;min-width:0;max-width:100%;padding:6px 9px;height:34px}
body[data-ui="damage"] .row>.hint{flex-basis:100%;font-size:12px}
body[data-ui="damage"] .ref-section{overflow-x:auto}
body[data-ui="damage"] .result-line b{font-size:24px}
body[data-ui="damage"] .result-line .unit{font-size:14px}
body[data-ui="damage"] #calcBtn{font-size:14px;min-height:36px;padding:8px 12px;border-radius:7px}

@media(max-width:1100px){body[data-ui="damage"] .layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){
 body[data-ui="home"]{margin:18px auto}
 body[data-ui="home"] section{padding:14px}
 body[data-ui="home"] #mainTabs{gap:6px}
 body[data-ui="home"] #mainTabs button{font-size:13px;padding:6px 10px;min-height:34px}
 body[data-ui="home"] .connection-choice select{max-width:100%}
 body[data-ui="home"] .library-actions select{min-width:0;width:100%}
 .assistant-log-dialog,.environment-dialog{padding:14px}
 .assistant-log-dialog header h2,.environment-dialog header h2{font-size:18px;flex-basis:100%}
 .assistant-log-dialog :is(button,select,a),.environment-dialog button{font-size:13px;min-height:32px;padding:5px 8px}
 body[data-ui="entry"] .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:8px 12px}
 body[data-ui="entry"] .toolbar h1{grid-column:1/-1;font-size:16px}
 body[data-ui="entry"] .toolbar :is(select,button){font-size:13px;height:34px;max-width:100%}
 body[data-ui="sailing"] .summary-grid .metric strong{font-size:24px}
 body[data-ui="scores"] #scoreWizard .sw-note{font-size:13px}
 body[data-ui="scores"] #scoreWizard .sw-note input{width:100%}
 body[data-ui="scores"] #scoreWizard :is(th,td){font-size:12px}
 body[data-ui="qi"] header{align-items:flex-start;flex-wrap:wrap;gap:10px}
 body[data-ui="damage"] .card{padding:18px 14px}
 body[data-ui="damage"] .row>label{flex-basis:130px}
 body[data-ui="damage"] .radio-group{flex-basis:100%}
 body[data-ui="damage"] .radio-group label{flex:1 1 auto;justify-content:center}
 body[data-ui="battlefield"] .top-actions button{font-size:12px;padding:5px 8px;min-height:32px}
 body[data-ui="battlefield"] .map-tools{gap:5px}
 body[data-ui="battlefield"] .map-tools input[type=search]{width:100%;flex-basis:100%;height:34px}
 body[data-ui="battlefield"] .map-tools :is(label,select,.spacer){display:none}
 body[data-ui="battlefield"] .map-tools button{font-size:12px;padding:5px 7px}
 body[data-ui="battlefield"] .route-panel{top:90px;max-height:calc(100% - 104px)}
}

.sailing-check-message{padding:10px 12px;border-radius:6px;font-size:14px}.sailing-check-message.complete{background:#e8f6ed;color:#24613d}.sailing-check-message.incomplete{background:#fff3d9;color:#805d15}.sailing-check-counts{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.sailing-check-table{max-width:100%;overflow-x:auto}.sailing-check-table table{min-width:680px;font-size:13px}.sailing-check-table th,.sailing-check-table td{padding:9px 12px;vertical-align:top}.sailing-check-missing{background:#fff3d9;color:#805d15}.sailing-check-table+details{margin-top:14px}

.activity-valid-data{max-height:560px;overflow:auto}.activity-valid-data th{position:sticky;top:0;background:#f0f6fd;z-index:1}.activity-check-table{max-width:100%;overflow-x:auto;margin-top:16px}.activity-check-table table{font-size:13px}.activity-check-table th,.activity-check-table td{padding:9px 12px;vertical-align:top}
