* { box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; margin: 0; }
body { font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif; font-size: 13px; color: #182225; background: #f5f7f8; }
button, input, select { font: inherit; } button { cursor: pointer; }
.app-shell { min-width: 1320px; min-height: 100vh; display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.app-menu-row { position: relative; }.bar-container { height: 60px; border: 1px solid #dce4e6; border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 10px; padding: 10px; }
.home-menu-button, .tool-tab-button, .close-all-button, .export-button { height: 40px; padding: 0 18px; border-radius: 8px; font-weight: 700; transition: 160ms ease; }
.home-menu-button { min-width: 92px; border: 1px solid #bfe4e1; color: #005f61; background: #e4f5f4; }.home-menu-button:hover { border-color: #008a8c; background: #d5eeee; transform: translateY(-1px); }
.tool-tab-button { min-width: 150px; border: 1px solid #c9ddf7; color: #214c7d; background: #e9f2ff; }.tool-tab-button:hover { border-color: #2773c8; background: #dbeaff; transform: translateY(-1px); }.tool-tab-button.active { border: 2px solid #2773c8; color: #123f70; background: #cfe2ff; }
.close-all-button { min-width: 126px; border: 1px solid #ffc9c4; color: #9f1c12; background: #fff0ef; }.close-all-button:hover { border-color: #d92d20; background: #ffe1de; transform: translateY(-1px); }.menu-spacer { flex: 1; }
.tab-context-menu { position: fixed; z-index: 20; min-width: 170px; padding: 6px; border: 1px solid #dce4e6; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(24, 34, 37, 0.12); }.tab-context-menu button { width: 100%; height: 34px; border: 0; border-radius: 6px; background: transparent; text-align: left; padding: 0 12px; }.tab-context-menu button:hover { color: #005f61; background: #e4f5f4; }
.home-page { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 0 10px; }.home-header { width: 1624px; margin: 14px 0 24px; }.home-header h1 { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.25; }.home-header p { margin: 6px 0 0; color: #617176; font-size: 15px; }
.tool-grid { width: 1624px; display: grid; grid-template-columns: repeat(4, 404px); gap: 22px 20px; }.tool-card { width: 404px; height: 344px; padding: 2px; border: 0; border-radius: 8px; background: #fff; transition: 160ms ease; overflow: hidden; }.tool-card:hover { outline: 2px solid #008a8c; outline-offset: -2px; background: #f9fbfb; transform: translateY(-1px); }.tool-image-placeholder { width: 400px; height: 300px; display: grid; place-items: center; border-bottom: 1px solid #dce4e6; background: #fff; color: #617176; font-weight: 700; }.tool-image-placeholder img { width: 100%; height: 100%; object-fit: cover; }.tool-title { width: 400px; height: 40px; display: grid; place-items: center; background: #fff; font-size: 15px; font-weight: 700; }
.tool-page { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }.tool-bar { justify-content: flex-start; }.export-button { min-width: 104px; border: 1px solid #bfe4e1; color: #fff; background: #008a8c; }.export-button:hover { border-color: #006d70; background: #007779; transform: translateY(-1px); }.tool-content { flex: 1; min-height: 0; display: flex; gap: 10px; }.panel { border: 1px solid #dce4e6; border-radius: 8px; background: #fff; padding: 10px; }.inputs-panel { width: 450px; flex: 0 0 450px; display: flex; flex-direction: column; gap: 10px; }.chart-panel { flex: 1; min-width: 520px; display: flex; flex-direction: column; gap: 10px; }.result-panel { width: 280px; flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; }
.parameter-table { width: 430px; border-collapse: separate; border-spacing: 0; table-layout: fixed; border: 1px solid #dce4e6; border-radius: 8px; overflow: hidden; text-align: center; }.parameter-table th { height: 34px; color: #617176; background: #f9fbfb; font-weight: 700; border-right: 1px solid #dce4e6; border-bottom: 1px solid #dce4e6; }.parameter-table td { height: 40px; border-right: 1px solid #dce4e6; border-bottom: 1px solid #dce4e6; padding: 0 8px; }.parameter-table th:last-child, .parameter-table td:last-child { border-right: 0; }.parameter-table tbody tr:last-child td { border-bottom: 0; }.col-index { width: 40px; }.col-name { width: 180px; }.col-value { width: 120px; }.col-unit { width: 80px; }.parameter-table input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; text-align: center; }.parameter-table input:focus { background: #f4fbfb; }
.parameter-actions { width: 430px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }.parameter-actions button { height: 36px; border: 1px solid #dce4e6; border-radius: 8px; color: #005f61; background: #fff; font-weight: 700; }.parameter-actions button:hover { border-color: #008a8c; background: #f4fbfb; }
.ring-preview { width: 430px; height: 300px; border: 1px solid #dce4e6; border-radius: 8px; background: #fff; display: grid; place-items: center; }.ring-preview svg { width: 100%; height: 100%; }.ring-line { fill: none; stroke: #263b42; stroke-width: 1.4; }.ring-hidden { fill: none; stroke: #9aa8ac; stroke-width: 1; stroke-dasharray: 5 4; }.dimension-lines { stroke: #1f6feb; fill: #1f6feb; stroke-width: 1.2; font-size: 13px; font-weight: 700; }.dimension-lines text { stroke: none; }
.note-box, .formula-box, .status-box { border: 1px solid #dce4e6; border-radius: 8px; padding: 12px; color: #617176; background: #f9fbfb; line-height: 1.65; }.note-box { display: flex; flex-direction: column; gap: 6px; }.chart-options { min-height: 32px; display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 15px; font-weight: 700; }.chart-options label { display: inline-flex; align-items: center; gap: 8px; }.chart-options input { width: 16px; height: 16px; accent-color: #008a8c; }.stress-chart { width: 100%; min-height: 380px; flex: 1; border: 0; }
.metric-card { min-height: 96px; border: 1px solid #dce4e6; border-radius: 8px; padding: 12px; }.metric-amber { background: #fff2df; border-color: #f3d7ad; }.metric-teal { background: #e4f5f4; border-color: #bfe4e1; }.metric-blue { background: #e9f2ff; border-color: #c9ddf7; }.metric-violet { background: #f0edff; border-color: #d8d2fa; }.metric-green { background: #e8f5ec; border-color: #c9e3d0; }.metric-title { color: #617176; font-size: 12px; }.metric-value { margin-top: 6px; font-size: 22px; font-weight: 800; }.metric-note { margin-top: 4px; color: #617176; font-size: 12px; }.status-box.warning { color: #b42318; border-color: #ffc9c4; background: #fff0ef; }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(24, 34, 37, 0.18); }.unit-modal { width: 380px; border: 1px solid #dce4e6; border-radius: 10px; padding: 16px; background: #fff; box-shadow: 0 22px 48px rgba(24, 34, 37, 0.18); }.unit-modal h2 { margin: 0 0 12px; font-size: 18px; }.unit-grid { display: grid; gap: 8px; }.unit-row { display: grid; grid-template-columns: 1fr 128px; align-items: center; gap: 14px; }.unit-row select { height: 32px; padding: 2px 8px; border: 1px solid #dce4e6; border-radius: 6px; background: #fff; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }.modal-actions button { height: 36px; border: 1px solid #dce4e6; border-radius: 8px; background: #fff; padding: 0 18px; }.modal-actions .primary-action { color: #fff; border-color: #008a8c; background: #008a8c; }
@media (max-width: 1380px) { .app-shell { min-width: 1180px; }.home-header, .tool-grid { width: 1180px; }.tool-grid { grid-template-columns: repeat(4, 280px); }.tool-card { width: 280px; }.tool-image-placeholder, .tool-title { width: 276px; } }.force-content h2 { font-size: 17px; margin: 2px 0 12px; }
.force-field { display: grid; grid-template-columns: 1fr 110px; gap: 6px; align-items: center; padding: 9px 0; border-bottom: 1px solid #edf1f2; }
.force-field input { width: 110px; padding: 7px; border: 1px solid #c9dddf; border-radius: 5px; }
.force-field small { grid-column: 1 / -1; color: #617176; }
.force-table-wrap { max-height: 640px; overflow: auto; }
.force-table { width: 100%; border-collapse: collapse; text-align: center; }
.force-table th { position: sticky; top: 0; background: #e4f5f4; }
.force-table th, .force-table td { padding: 10px 5px; border-bottom: 1px solid #dce4e6; }
.force-highlight { background: #fff2df; }
.force-content .result-panel { max-height: 850px; overflow: auto; }
.force-winding { display: flex; flex-direction: column; gap: 8px; line-height: 1.6; }
.force-winding textarea { width: 100%; resize: vertical; border: 1px solid #c9dddf; border-radius: 6px; padding: 8px; }
.force-field select { max-width: 130px; }
.force-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.force-controls button, .force-controls select { padding: 6px; }
button:disabled { cursor: not-allowed; opacity: .45; }
/* Native static application: responsive overrides. */
.app-shell{min-width:0}.home-header,.tool-grid{width:min(1624px,100%)}.tool-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tool-card,.tool-title,.tool-image-placeholder{width:100%}.tool-image-placeholder{font-size:96px;color:#008a8c;background:linear-gradient(145deg,#e4f5f4,#e9f2ff)}.tool-content{display:grid;grid-template-columns:350px minmax(380px,1fr) 260px}.inputs-panel,.chart-panel,.result-panel{width:auto;min-width:0}.parameter-table,.parameter-actions,.ring-preview{width:100%}.parameter-actions{grid-template-columns:repeat(2,1fr)}.parameter-table td:first-child{width:46%}.parameter-table td:nth-child(2){width:32%}.stress-chart{height:440px;flex:none}.menu-container{height:auto;min-height:60px;flex-wrap:wrap}#page{flex:1}.tool-page{gap:10px}.bar-container{margin-bottom:10px}.force-winding[hidden]{display:none}dialog::backdrop{background:#18222555}.unit-modal{max-width:95vw}.force-table{min-width:600px}.note-box{overflow-wrap:anywhere}input:focus-visible,button:focus-visible,select:focus-visible{outline:2px solid #008a8c;outline-offset:2px}
@media(max-width:1100px){.tool-content{grid-template-columns:320px minmax(0,1fr)}.result-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr)}.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.tool-content{grid-template-columns:1fr}.result-panel{grid-template-columns:1fr}.home-header h1{font-size:26px}.tool-grid{gap:12px}.tool-card{height:220px}.tool-image-placeholder{height:170px}.tool-title{font-size:13px;height:45px}.chart-options{font-size:12px;gap:10px}.tool-tab-button{min-width:0}.stress-chart{height:380px}.app-shell{padding:8px}}
#tool-shell{display:flex;flex-direction:column;gap:10px;flex:1}#root:has(#fpv-host:not([hidden])) #tool-shell{flex:none}#fpv-host{flex:1;min-height:750px}.fpv-frame{width:100%;height:calc(100vh - 110px);min-height:750px;border:0;border-radius:10px;background:#eef3f6}.fpv-frame[hidden],#fpv-host[hidden]{display:none}
/* Tool covers use repository-local images and CSS cropping. */
.tool-image-placeholder:has(.tool-cover){background:#fff;overflow:hidden}.tool-image-placeholder .tool-cover{display:block;width:100%;height:100%;object-fit:cover;object-position:center}.tool-image-placeholder .tool-cover-1{object-fit:contain}.tool-image-placeholder .tool-cover-2{object-position:52% 50%}
body{padding-bottom:110px}.maintainer-contact{position:fixed;right:16px;bottom:12px;z-index:15;padding:12px 16px;border:1px solid #dce4e6;border-radius:10px;background:rgba(255,255,255,.97);box-shadow:0 4px 18px #1822250d;font-size:12px;line-height:1.8;color:#617176}.maintainer-contact strong{display:block;color:#182225;margin-bottom:3px}.maintainer-contact div{display:flex;gap:14px;justify-content:space-between}.maintainer-contact a{color:#006d70;text-decoration:none}.maintainer-contact a:hover{text-decoration:underline}.app-shell{min-height:calc(100vh - 110px)}
@media(max-width:650px){.maintainer-contact{right:8px;bottom:8px;max-width:calc(100vw - 16px);padding:8px 12px;font-size:11px}.maintainer-contact div{gap:12px}}
@media print{.maintainer-contact{display:none}body{padding-bottom:0}}
.tool-card{display:flex;flex-direction:column;justify-content:flex-start}.tool-image-placeholder{display:block;flex:1;min-height:0;height:auto}.tool-title{flex:0 0 40px}.tool-image-placeholder .tool-cover{min-width:0;min-height:0}.tool-image-placeholder .tool-cover-1{object-fit:cover}
@media(max-width:650px){.tool-title{flex-basis:45px}}
.cloud-menu-button{height:40px;padding:0 16px;border:1px solid #b8cffa;border-radius:8px;color:#245ddd;background:#edf3ff;font-weight:700}.cloud-dialog{width:min(770px,calc(100vw - 24px));max-height:90vh;overflow:auto;border:1px solid #dce4e6;border-radius:18px;padding:22px;background:white;color:#182225}.cloud-dialog::backdrop{background:#18222566}.cloud-dialog header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #ddd;margin-bottom:20px;padding-bottom:16px}.cloud-dialog h2{font-size:19px;margin:0}.cloud-dialog header p{margin:4px 0 0;color:#666}.cloud-dialog button{border:0;border-radius:8px;padding:10px 14px;background:#f2f3f5}.cloud-dialog form>label{display:block;margin:14px 0;color:#666}.cloud-dialog input{display:block;width:100%;margin-top:9px;border:1px solid #ddd;border-radius:8px;padding:12px;font:inherit;background:white}.token-field{display:flex;align-items:center;gap:8px}.token-field input{flex:1;min-width:0}.cloud-actions{display:flex;gap:12px}.cloud-actions button{flex:1;font-weight:700}#cloud-save{background:#2861eb;color:white}#cloud-test.success{background:#16864a;color:white}#cloud-test.failure{background:#c93636;color:white}#cloud-status{min-height:22px;color:#167345}#cloud-status.error{color:#bd2929}.cloud-help{color:#666;font-size:12px;line-height:1.7}.cloud-files{border-top:1px solid #ddd;padding-top:14px;display:grid;gap:8px}#cloud-file-list{display:grid;gap:6px}.cloud-dialog #cloud-file[hidden]{display:none}
.cloud-menu-button.configured{background:#e1f5e8;border-color:#16864a;color:#126438}.data-manager{width:min(1150px,calc(100vw - 24px))}.manager-connection{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#617176}.connected{color:#16864a}.manager-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:16px 0}.manager-stats>div{background:#f7f9fa;padding:14px;border-radius:10px;color:#617176}.manager-stats strong{display:block;font-size:23px;color:#182225;margin-top:5px}.manager-filters{display:flex;gap:10px;align-items:center}.manager-filters input{margin:0;flex:1;min-width:120px}.manager-filters select{max-width:230px;padding:10px;border:1px solid #ddd;border-radius:8px;background:white}.manager-toolbar,.manager-path{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0}.manager-table-wrap{overflow:auto;max-height:55vh}.manager-table{width:100%;border-collapse:collapse;min-width:780px;text-align:left}.manager-table th,.manager-table td{padding:10px 8px;border-bottom:1px solid #e5eaed;overflow-wrap:anywhere;max-width:270px}.manager-table th{position:sticky;top:0;background:#f7fafb}.manager-table input[type=checkbox]{width:16px;height:16px;margin:0}.file-actions{white-space:nowrap}.file-actions button{padding:6px!important;margin:2px;font-size:12px}.cloud-dialog .danger{color:#bd2929;background:#fff0ef}#manager-status{white-space:pre-wrap;overflow-wrap:anywhere;color:#167345}#manager-status.error,.manager-connection .error{color:#bd2929}#manager-file[hidden]{display:none}.json-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto;background:#f7f9fa;padding:16px}#manager-directory{overflow-wrap:anywhere;min-width:0}
@media(max-width:650px){.data-manager{padding:14px}.manager-stats{gap:6px}.manager-stats>div{padding:9px;font-size:11px}.manager-stats strong{font-size:19px}.manager-filters{flex-wrap:wrap}.manager-filters input{flex-basis:100%}.manager-filters select{flex:1;min-width:0;font-size:12px}.manager-toolbar button{font-size:12px;padding:8px}.manager-connection{font-size:12px}.manager-table-wrap{max-height:45vh}}
