/* 工具站公共样式：兼容 Bootstrap 3，不依赖外部字体或图标。 */
.tool-nav { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.tool-nav-intro { margin: 0 12px 12px; color: #68758a; font-size: 13px; line-height: 1.7; }
.tool-sidebar-heading { padding: 14px 16px !important; background: linear-gradient(120deg, #285c9e, #3f7fc4) !important; border: 0 !important; font-size: 16px !important; }
.tool-sidebar-heading span { display: block; margin-top: 2px; color: #dceafa; font-size: 11px; font-weight: 400; }
.tool-group { margin: 0 0 12px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; overflow: hidden; }
.tool-group summary { position: relative; padding: 12px 38px 12px 14px; color: #243b5a; background: #f5f8fc; font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; min-height: 44px; box-sizing: border-box; }
.tool-group summary::-webkit-details-marker { display: none; }
.tool-group summary::after { content: "+"; position: absolute; right: 15px; top: 11px; color: #5276ad; font-size: 20px; font-weight: 400; }
.tool-group[open] summary::after { content: "−"; }
.tool-group summary:focus-visible, .tool-link:focus-visible { outline: 3px solid #78a7f0; outline-offset: -3px; }
.tool-count { float: right; margin-right: 8px; padding: 1px 7px; border-radius: 10px; background: #e5edf8; color: #62799d; font-size: 11px; font-weight: 400; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.tool-link { display: flex; flex-direction: column; justify-content: center; min-height: 70px; padding: 10px; border: 1px solid #e4eaf2; border-radius: 8px; color: #2d4669; text-decoration: none; box-sizing: border-box; transition: border-color .15s, background .15s, transform .15s; }
.tool-link strong { font-size: 13px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.tool-link small { margin-top: 3px; color: #8491a4; font-size: 11px; line-height: 1.5; }
.tool-link:hover, .tool-link:focus { border-color: #80a9dd; background: #f2f7fd; text-decoration: none; transform: translateY(-1px); }

/* 工具内容页 */
body.tool-page { background: #f3f6fa; color: #26364b; overflow-x: hidden; }
.tool-page .container { width: 100%; max-width: 1180px; padding: 0 16px; box-sizing: border-box; }
.tool-page #content { width: 100%; max-width: 960px; margin: 22px auto 32px; }
.tool-page .Middem, .tool-workspace { width: 100%; margin: 0 auto; }
.tool-page .toolBox, .tool-workspace { border: 1px solid #dfe6ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(35, 61, 94, .07); overflow: hidden; }
.tool-page .toolBox > h1, .tool-workspace > h1 { margin: 0; padding: 22px 26px 17px; border-bottom: 1px solid #e8edf4; background: linear-gradient(120deg, #f8fbff, #fff); }
.tool-page .toolBox .titleft, .tool-workspace > h1 { color: #1f3d67; font-size: 24px; line-height: 1.4; font-weight: 700; }
.tool-page .toolBoxContent, .tool-workspace-body { padding: 24px 26px; overflow-wrap: anywhere; }
.tool-description { margin: 0 0 20px; color: #65748a; font-size: 14px; line-height: 1.8; }
.tool-back { display: inline-block; margin: 0 0 15px; color: #5274a7; font-size: 13px; text-decoration: none; }
.tool-back:hover { color: #245ba8; text-decoration: underline; }
.tool-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0; }
.tool-field { flex: 1 1 240px; min-width: 0; }
.tool-field label { display: block; margin-bottom: 7px; color: #43546c; font-size: 14px; font-weight: 600; }
.tool-page input[type="text"], .tool-page input[type="url"], .tool-page input[type="number"], .tool-page input[type="email"], .tool-page input[type="password"], .tool-page input[type="tel"], .tool-page input[type="search"], .tool-page select, .tool-page textarea, .tool-local input[type="text"], .tool-local input[type="url"], .tool-local input[type="number"], .tool-local select, .tool-local textarea { display: block; width: 100% !important; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd6e3; border-radius: 8px; background: #fff; color: #26364b; font-size: 16px; line-height: 1.5; box-sizing: border-box; }
.tool-page textarea, .tool-local textarea { min-height: 180px; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 14px; }
.tool-page input:focus, .tool-page select:focus, .tool-page textarea:focus, .tool-local input:focus, .tool-local select:focus, .tool-local textarea:focus { border-color: #5e91d3; outline: 3px solid rgba(94, 145, 211, .16); }
.tool-page input[type="button"], .tool-page input[type="submit"], .tool-page button, .tool-page .buttoncss, .tool-page .btn, .tool-local input[type="button"], .tool-local input[type="submit"], .tool-local button, .tool-local .btn { min-height: 44px; margin: 3px 6px 3px 0; padding: 10px 18px; border: 1px solid #356eb6; border-radius: 8px; background: #356eb6; color: #fff; font-size: 14px; line-height: 1.5; cursor: pointer; box-sizing: border-box; }
.tool-page input[type="button"]:hover, .tool-page input[type="submit"]:hover, .tool-page button:hover, .tool-page .btn:hover, .tool-local input[type="button"]:hover, .tool-local input[type="submit"]:hover, .tool-local button:hover, .tool-local .btn:hover { background: #285c9e; }
.tool-page .btn-default, .tool-local .btn-default { border-color: #b9c7d8; background: #fff; color: #3f5776; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0; }
.tool-result { margin-top: 18px; padding: 16px; border: 1px solid #d9e5f2; border-radius: 10px; background: #f7faff; color: #304c70; line-height: 1.8; overflow-wrap: anywhere; }
.tool-result:empty { display: none; }
.tool-result strong { color: #1f4f86; }
.tool-result.error { border-color: #f0c7c7; background: #fff7f7; color: #9e3434; }
.tool-result.success { border-color: #bfe2cc; background: #f3fbf6; color: #28643c; }
.tool-notice { margin: 14px 0; padding: 12px 15px; border-left: 4px solid #6d97cc; border-radius: 4px; background: #edf4fc; color: #526b8b; font-size: 13px; line-height: 1.8; }
.tool-warning { border-left-color: #d39b3f; background: #fff9ed; color: #805e24; }
.tool-table-wrap { max-width: 100%; overflow-x: auto; }
.tool-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tool-table th, .tool-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.tool-table th { background: #edf3fa; color: #3c5778; }
.tool-local { max-width: 100%; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
.tool-local, .tool-local * { box-sizing: border-box; }
.tool-local table[width] { width: 100% !important; max-width: 100%; }
.tool-local td { overflow-wrap: anywhere; }
.tool-local .knr { width: 100%; max-width: 100%; padding: 0; }
.tool-local .inpText { width: 100% !important; max-width: 100% !important; min-height: 240px !important; padding: 12px; border: 1px solid #cbd6e3; border-radius: 8px; font-size: 14px; resize: vertical; }
.tool-local .status { margin: 10px 0; color: #526b8b; }
.tool-local fieldset { min-width: 0; margin: 14px 0; padding: 10px 14px 14px; border: 1px solid #d9e3ef; border-radius: 8px; }
.tool-local legend { padding: 0 6px; color: #3e5879; font-weight: 600; }
.tool-local fieldset label { display: block; min-height: 44px; padding: 10px 0; line-height: 1.6; }
.tool-local input[type="checkbox"], .tool-local input[type="radio"] { width: 18px; height: 18px; margin: 0 8px 0 0; vertical-align: -3px; }
.tool-preview { width: 100%; min-height: 210px; margin-top: 12px; padding: 20px; border: 1px solid #ccd7e5; border-radius: 8px; background: #fff; }
.word-preview { overflow-x: auto; line-height: 1.8; }
.word-preview img { max-width: 100%; height: auto; }
.word-preview table { width: 100%; border-collapse: collapse; }
.word-preview th, .word-preview td { padding: 6px; border: 1px solid #ccd7e5; }
.effect-preview h2 { margin-top: 0; color: #1f3d67; }
.tool-local .calendar { width: 100%; table-layout: fixed; }
.tool-local .calendar td { width: auto !important; min-width: 0; padding: 2px 1px; overflow-wrap: anywhere; }
.tool-local .calendar td strong { font-size: 20px; line-height: 1.3; }
.tool-local .calendar select { display: inline-block; width: auto !important; min-height: 44px; font-size: 16px; }
.tool-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
.tool-swatch { width: 110px; border: 1px solid #d5dfeb; border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; color: #40536c; font-size: 12px; text-align: center; }
.tool-swatch span { display: block; height: 65px; }
.tool-swatch b { display: block; padding: 8px 2px 2px; }
.tool-swatch small { display: block; padding-bottom: 8px; }
.tool-checklist { padding-left: 22px; line-height: 2; }
.tool-checklist a { color: #285f9f; overflow-wrap: anywhere; }
.ipcalc-local #main, .ipcalc-local ul, .ipcalc-local .pingl { max-width: 100%; }
.ipcalc-local li { max-width: 100%; }
.tool-local #wrap { position: relative; }
.tool-local #YMBG { left: 0; max-width: 100%; }

@media (min-width: 992px) {
    #sidebar .tool-grid { grid-template-columns: 1fr; }
    #sidebar .tool-link { min-height: 57px; }
}
@media (max-width: 767px) {
    .tool-page .container { padding: 0 12px; }
    .tool-page #content { margin: 14px auto 24px; }
    .tool-page .toolBox > h1, .tool-workspace > h1 { padding: 17px 16px 14px; }
    .tool-page .toolBox .titleft, .tool-workspace > h1 { font-size: 21px; }
    .tool-page .toolBoxContent, .tool-workspace-body { padding: 17px 15px; }
    .tool-page input[type="button"], .tool-page input[type="submit"], .tool-page button, .tool-page .buttoncss, .tool-page .btn, .tool-local input[type="button"], .tool-local input[type="submit"], .tool-local button, .tool-local .btn { width: 100%; margin-right: 0; }
    .tool-field { flex-basis: 100%; }
    .tool-grid { gap: 7px; padding: 8px; }
    .tool-link { min-height: 76px; padding: 9px; }
    .tool-link strong { font-size: 13px; }
    .tool-link small { font-size: 11px; }
    .tool-table th, .tool-table td { padding: 9px 8px; font-size: 13px; }
    .ipcalc-local #main, .ipcalc-local ul { width: 100%; max-width: 100%; }
    .ipcalc-local li { width: auto; max-width: 100%; margin: 0 0 12px; padding: 14px 10px; }
    .ipcalc-local table { width: 100% !important; max-width: 100%; table-layout: fixed; }
    .ipcalc-local td { width: auto !important; overflow-wrap: anywhere; }
    .ipcalc-local h2 { font-size: 20px; line-height: 1.5; }
    .tool-page.ipcalc-local input[type="text"], .tool-page.ipcalc-local input.in { display: inline-block; width: 64px; min-height: 44px; margin: 3px 2px; padding: 8px 6px; font-size: 16px; }
    .tool-page.ipcalc-local input[size="7"], .tool-page.ipcalc-local input[size="10"], .tool-page.ipcalc-local input[size="14"] { width: 100%; }
    .tool-page.ipcalc-local input[size="8"] { width: 150px; max-width: 100%; }
    .ipcalc-local select, .ipcalc-local input[type="button"] { width: 100%; min-height: 44px; margin: 5px 0; font-size: 16px; }
}
@media (max-width: 350px) {
    .tool-grid { grid-template-columns: 1fr; }
    .tool-page .toolBoxContent, .tool-workspace-body { padding: 15px 12px; }
}
@media print {
    .tool-nav, .tool-back, .tool-actions { display: none; }
    .tool-page .toolBox, .tool-workspace { border: 0; box-shadow: none; }
}
