*{box-sizing:border-box}html{color-scheme:dark}html[data-theme=light]{color-scheme:light}body{margin:0;background:#0d141b;color:#e9f1f8;font:14px/1.5 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}.app{max-width:1320px;margin:auto;padding:26px 28px 18px}.intro{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.intro h1{font:700 28px/1.2 system-ui;margin:0 0 6px}.intro p{margin:0;color:#8fb2cc;font-family:system-ui}.local{border:1px solid #294052;border-radius:20px;padding:8px 12px;color:#86b5d4;font-family:system-ui}.menubar{display:flex;border:1px solid #2b3d4d;border-bottom:0;background:#101922;position:relative;z-index:20}.menu{position:relative}.menu-title,.menu-item{border:0;background:transparent;color:inherit;font:inherit}.menu-title{padding:7px 14px;cursor:pointer}.menu:hover>.menu-title,.menu.open>.menu-title{background:#213242}.menu-pop{display:none;position:absolute;left:0;top:100%;min-width:230px;padding:5px;background:#14202a;border:1px solid #3a5265;box-shadow:0 10px 28px #0008}.menu.open>.menu-pop,.menu:hover>.menu-pop{display:block}.menu-item{display:flex;width:100%;align-items:center;justify-content:space-between;gap:22px;text-align:left;padding:7px 10px;white-space:nowrap;cursor:pointer}.menu-item:hover:not(:disabled){background:#1c7eb8;color:white}.menu-item:disabled{opacity:.4;cursor:default}.menu-item kbd{font:12px inherit;color:#89a1b5}.sep{height:1px;background:#334655;margin:4px}.submenu{position:relative}.submenu>.menu-pop{left:100%;top:-5px}.toolbar{height:46px;display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid #2b3d4d;background:#0f1820}.tool-btn,.primary,.dialog button,.pager button{border:1px solid #395166;border-radius:4px;background:#16232d;color:inherit;padding:6px 11px;cursor:pointer;font:inherit}.tool-btn:hover:not(:disabled),.dialog button:hover,.pager button:hover{background:#203442}.tool-btn:disabled{opacity:.45;cursor:default}.primary{background:#087caf!important;border-color:#0c9bd5!important;color:white!important}.tool-sep{height:24px;width:1px;background:#314454}.file-meta{margin-left:auto;color:#8fa8bb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hex-shell{border:1px solid #2b3d4d;border-top:0;background:#0b1117;min-height:440px}.hex-scroll{overflow:auto;max-height:650px}.hex-head,.hex-row{display:grid;grid-template-columns:105px 505px minmax(150px,1fr);align-items:center;min-width:800px}.hex-head{position:sticky;top:0;z-index:4;background:#15212b;color:#91b7d2;border-bottom:1px solid #314454;padding:7px 8px}.hex-cols{word-spacing:5px}.hex-row{min-height:25px;padding:0 8px}.hex-row:nth-child(even){background:#0e171f}.offset{color:#698aa3;user-select:none}.bytes,.ascii{display:flex;white-space:pre}.byte,.achar{display:inline-flex;align-items:center;justify-content:center;height:25px;cursor:default;user-select:none}.byte{width:31px;color:#dbe8f1}.achar{width:9px;color:#b9cad7}.byte.sel,.achar.sel{background:#167db6;color:#fff}.byte.cursor{outline:1px solid #7cd8ff;outline-offset:-1px}.welcome{height:430px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:#7893a7;font-family:system-ui}.welcome strong{font-size:18px;color:#b8cbd9}.welcome span{max-width:540px;text-align:center}.status{display:flex;gap:28px;border:1px solid #2b3d4d;border-top:0;background:#101922;color:#8ea5b7;padding:5px 9px;font-size:12px}.pager{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:12px}.dialog{padding:0;border:1px solid #4a6172;background:transparent;color:inherit;box-shadow:0 18px 55px #000b;max-width:calc(100vw - 24px)}.dialog::backdrop{background:#0008}.dialog-card{background:#111b24;min-width:560px}.dialog-title{display:flex;justify-content:space-between;align-items:center;padding:9px 12px;border-bottom:1px solid #344a5b;font-weight:700}.x{border:0!important;background:transparent!important;font-size:20px!important;padding:0 4px!important}.dialog-body{padding:12px}.checksum-body{display:grid;grid-template-columns:1fr 220px;gap:16px}.checksum-body section>strong{display:block;margin-bottom:6px}.checksum-body select{width:100%;background:#0d161e;color:inherit;border:1px solid #41586a;padding:4px}.checksum-body select option{padding:3px}.checksum-body section>button{margin-top:8px}.checksum-side fieldset{border:1px solid #344a5b}.checksum-side fieldset label{display:block;margin:6px}.compare{display:block;margin:18px 0 6px}.checksum-side>input{width:100%;background:#0c151c;border:1px solid #3a5265;color:inherit;padding:7px}.crc-result{display:grid;grid-template-columns:90px 1fr;gap:8px;padding:0 12px 12px}.crc-result output{border:1px solid #3a5265;background:#0b131a;padding:7px;color:#74d3ff}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;border-top:1px solid #344a5b}.small-dialog .dialog-card{min-width:390px}.custom-grid{display:grid;grid-template-columns:110px 1fr;gap:9px 12px;align-items:center;padding:16px}.custom-grid input:not([type=radio]):not([type=checkbox]){background:#0b131a;color:inherit;border:1px solid #41586a;padding:6px;text-align:right}.radio-row{display:flex;justify-content:space-between}.merge-card{min-width:650px}.hint{color:#8ca4b7;padding:0 12px}.drop{display:block;margin:12px;border:1px dashed #3c6b88;padding:20px;text-align:center;cursor:pointer}.merge-list{margin:12px;max-height:300px;overflow:auto;border:1px solid #304554}.merge-row{display:grid;grid-template-columns:1fr 100px 105px auto;gap:8px;align-items:center;padding:7px 8px;border-bottom:1px solid #263b4b}.merge-row:last-child{border:0}.merge-row .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty{text-align:center;color:#71899b;padding:30px}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#203442;border:1px solid #4b687c;padding:8px 14px;border-radius:5px;transition:.2s;z-index:99}.toast.show{opacity:1;transform:translate(-50%,0)}
html[data-theme=light] body{background:#fff;color:#16212a}html[data-theme=light] .menubar,html[data-theme=light] .toolbar,html[data-theme=light] .status,html[data-theme=light] .dialog-card{background:#f5f7f9}html[data-theme=light] .menu-pop{background:#fff;box-shadow:0 10px 28px #0002}html[data-theme=light] .hex-shell{background:#fff}html[data-theme=light] .hex-head{background:#edf2f5}html[data-theme=light] .hex-row:nth-child(even){background:#f7f9fa}html[data-theme=light] .byte{color:#1d3444}html[data-theme=light] .achar{color:#344b5a}html[data-theme=light] .custom-grid input:not([type=radio]):not([type=checkbox]),html[data-theme=light] .checksum-side>input{background:white;color:#16212a}
@media(max-width:760px){.app{padding:16px 10px}.intro{gap:10px}.local{display:none}.hex-head,.hex-row{grid-template-columns:90px 505px 150px}.hex-scroll{max-height:560px}.status{gap:12px;overflow:auto}.checksum-body{grid-template-columns:1fr}.dialog-card,.merge-card,.small-dialog .dialog-card{min-width:min(94vw,560px)}.toolbar .file-meta{display:none}}
/* Whole-page file drop feedback */
body::after{content:'拖入文件以打开';position:fixed;inset:12px;z-index:1000;display:flex;align-items:center;justify-content:center;border:2px dashed #55bce9;border-radius:10px;background:#071018e8;color:#dff5ff;font:700 22px/1.4 system-ui;letter-spacing:.04em;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,visibility .12s ease}body.file-dragging::after{opacity:1;visibility:visible}html[data-theme=light] body::after{background:#f4fbffeF;color:#155879;border-color:#2798c8}


/* v3 flat editor workspace: structure is separated by spacing / hairlines, not nested boxes. */
.app{max-width:none;margin:0;padding:22px 32px 14px}
.intro{margin-bottom:14px;padding:0}
.local{border:0;border-radius:0;padding:5px 0;background:transparent;opacity:.78}
.menubar{border:0;border-bottom:1px solid #25333e;background:transparent}
.menu-title{padding:7px 14px 8px}
.toolbar{height:46px;padding:6px 8px;border:0;border-bottom:1px solid #25333e;background:transparent}
.hex-shell{border:0;background:transparent;min-height:440px}
.hex-head{border-bottom:1px solid #2b3b48;background:#111c25}
.status{border:0;border-top:1px solid #25333e;background:transparent}
html[data-theme=light] .menubar,html[data-theme=light] .toolbar,html[data-theme=light] .status{background:transparent}
html[data-theme=light] .hex-shell{background:transparent}
html[data-theme=light] .hex-head{background:#f3f6f8}
@media(max-width:760px){.app{padding:14px 10px 10px}.intro{margin-bottom:10px}}

/* v4: the host page is the only vertical scroller. */
html,body{height:auto;min-height:0;overflow:visible}
.hex-shell{min-height:0}
.hex-scroll{overflow-x:auto;overflow-y:visible;max-height:none}
/* Keep the standard 16-byte header on one line and aligned with byte cells. */
.hex-cols{display:grid;grid-template-columns:repeat(16,31px);word-spacing:normal;white-space:nowrap}
.hex-cols>span{display:block;text-align:center}


/* v5 workstation layout: the HEX pane is the only vertical scroller.
   Keeping the iframe viewport bounded also makes native <dialog> modals
   open in the visible workspace instead of being centered far below it. */
html,body{height:100%;min-height:0;overflow:hidden}
body{min-width:0}
.app{
  width:100%;max-width:1320px;height:100%;min-height:0;margin:0 auto;
  padding:20px 28px 12px;display:flex;flex-direction:column;overflow:hidden;
}
.intro{flex:0 0 auto;margin-bottom:12px}
.menubar,.toolbar,.status,.pager{flex:0 0 auto}
.hex-shell{
  flex:1 1 0;min-height:220px;overflow:hidden;border-left:0;border-right:0;
}
.hex-scroll{height:100%;max-height:none;overflow:auto;overscroll-behavior:contain}
.hex-head{top:0}
.status{border-left:0;border-right:0}
.pager{margin:8px 0 0}
.dialog{
  position:fixed;inset:0;margin:auto;max-height:calc(100% - 32px);overflow:auto;
}
.dialog-card{max-height:calc(100vh - 34px);overflow:auto}
.local{border:0;padding:4px 0;border-radius:0}
.menubar{border-left:0;border-right:0;border-top:0}
.toolbar{border-left:0;border-right:0}
@media(max-width:760px){
  .app{padding:14px 10px 8px}
  .intro{margin-bottom:8px}
  .hex-scroll{max-height:none}
  .dialog{max-height:calc(100% - 16px)}
  .dialog-card{max-height:calc(100vh - 18px)}
}


/* HxD-like checksum result pane. */
.checksum-panel{flex:0 0 auto;border-top:1px solid #314454;background:#0c141b;min-height:112px;max-height:220px;overflow:hidden}
.checksum-panel-tabs{height:30px;display:flex;align-items:flex-end;border-bottom:1px solid #314454;padding-left:8px}
.checksum-panel-tab{height:30px;padding:0 13px;border:0;border-bottom:2px solid #3aa9df;background:transparent;color:inherit;font:inherit}




.checksum-table-wrap{max-height:126px;overflow:auto}
.checksum-table{width:100%;border-collapse:collapse;table-layout:fixed;font-family:Consolas,'Courier New',monospace}
.checksum-table th,.checksum-table td{padding:6px 12px;text-align:left;border-right:1px solid #243744}
.checksum-table th{font-family:system-ui;background:#101c25;font-weight:600}
.checksum-table th:nth-child(1){width:150px}.checksum-table th:nth-child(2){width:220px}.checksum-table th:last-child,.checksum-table td:last-child{border-right:0}
html[data-theme=light] .checksum-panel{background:#fff;border-color:#cfd9df}
html[data-theme=light] .checksum-panel-tabs,html[data-theme=light] 
html[data-theme=light] 
html[data-theme=light] 
html[data-theme=light] .checksum-table th{background:#f2f5f7}
@media(max-width:760px){.checksum-table th:nth-child(1){width:125px}.checksum-table th:nth-child(2){width:160px}.checksum-panel{max-height:190px}}


/* v10: continuous virtual HEX scrolling, no page buttons. */
.pager{display:none!important}
.hex-editor{position:relative;min-width:800px}
.hex-row.virtual{position:absolute;left:0;right:0;height:25px}
.hex-row.virtual.even-row{background:#0e171f}
.hex-row.virtual.odd-row{background:transparent}
html[data-theme=light] .hex-row.virtual.even-row{background:#f7f9fa}
.checksum-panel{flex:0 0 auto;min-height:0;max-height:156px}
.checksum-panel-tabs{height:28px}
.checksum-panel-tab{height:28px}

.checksum-table-wrap{max-height:72px}
.app:has(.checksum-panel:not([hidden])) .hex-shell{min-height:120px}
@media(max-width:760px){.checksum-panel{max-height:150px}.app:has(.checksum-panel:not([hidden])) .hex-shell{min-height:100px}}

/* v11: keep checksum result columns on one line and give algorithm name more room. */
.checksum-table th:nth-child(1),
.checksum-table td:nth-child(1){width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.checksum-table th:nth-child(2),
.checksum-table td:nth-child(2){width:220px;white-space:nowrap}
.checksum-table th:nth-child(3),
.checksum-table td:nth-child(3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.checksum-table th,.checksum-table td{line-height:1.35}
@media(max-width:760px){
  .checksum-table{min-width:700px}
  .checksum-table th:nth-child(1),.checksum-table td:nth-child(1){width:230px}
  .checksum-table th:nth-child(2),.checksum-table td:nth-child(2){width:190px}
}

/* v13: HxD-like block selection + right-click menu. */
.context-menu{position:fixed;z-index:120;min-width:190px;padding:4px;background:#14202a;border:1px solid #3a5265;box-shadow:0 10px 28px #0009}
.context-menu[hidden]{display:none}
.context-menu button{display:flex;width:100%;border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:7px 10px;cursor:pointer}
.context-menu button:hover{background:#1c7eb8;color:#fff}
.context-menu button:disabled{opacity:.38;cursor:default}
.context-menu button:disabled:hover{background:transparent;color:inherit}
.context-menu .sep{height:1px;margin:4px 3px;background:#344a5b}
html[data-theme=light] .context-menu .sep{background:#d5dde3}
.select-grid{display:grid;grid-template-columns:145px 1fr;gap:10px 12px;align-items:center;padding:16px 16px 10px}
.select-grid input[type=text],.select-grid>input{width:100%;background:#0b131a;color:inherit;border:1px solid #41586a;padding:6px 8px;text-align:right;font:inherit}
.select-mode{white-space:nowrap}
.base-row{display:flex;gap:24px;padding:10px 16px 14px;border-top:1px solid #344a5b}
html[data-theme=light] .context-menu{background:#fff;border-color:#b8c7d1;box-shadow:0 10px 28px #0002}
html[data-theme=light] .select-grid input[type=text],html[data-theme=light] .select-grid>input{background:#fff;color:#16212a}

.checksum-panel{max-height:132px}
.checksum-table-wrap{max-height:92px}
@media(max-width:760px){.checksum-panel{max-height:132px}.checksum-table-wrap{max-height:92px}}

/* v16: checksum result pane contains only the tab and result table. */
.checksum-panel-toolbar,.checksum-source,.checksum-panel-close,#checksum-update,#checksum-close{display:none!important}

/* v23: address-aware merge + merge-first drag/drop. */
.merge-card{min-width:min(920px,calc(100vw - 28px))}
.merge-drop-main{min-height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-family:system-ui}
.merge-drop-main strong{font-size:18px;color:#dff4ff}
.merge-drop-main span{font-size:13px;color:#86a7bd}
.merge-row{grid-template-columns:minmax(180px,1fr) 155px 90px 160px auto;min-width:780px}
.merge-address{display:flex;align-items:center;gap:2px;white-space:nowrap;color:#8fb2cc}
.merge-address input{width:112px;background:#0b131a;color:#e9f1f8;border:1px solid #41586a;padding:5px 7px;font:inherit;text-transform:uppercase}
.merge-end{white-space:nowrap;color:#86a0b3}
body.merge-mode::after{content:'拖入文件以加入合并';font-size:25px;background:#071018f2}
html[data-theme=light] .merge-drop-main strong{color:#164d69}
html[data-theme=light] .merge-address input{background:#fff;color:#17222a}

/* v24: merge list supports direct left-button drag reordering. */
.merge-row{grid-template-columns:28px minmax(180px,1fr) 170px 92px 170px 64px;position:relative;cursor:grab}
.merge-row:active{cursor:grabbing}
.merge-row.dragging{opacity:.45}
.merge-row.drop-before::before,.merge-row.drop-after::after{content:'';position:absolute;left:4px;right:4px;height:2px;background:#32b8ff;z-index:3}
.merge-row.drop-before::before{top:-1px}.merge-row.drop-after::after{bottom:-1px}
.merge-drag{font:700 18px/1 system-ui;color:#6f93aa;text-align:center;cursor:grab;user-select:none;letter-spacing:-4px;padding-right:4px}
.merge-address{justify-self:start}
.merge-address input{width:105px}
.merge-size,.merge-end{white-space:nowrap}
.merge-delete{padding:5px 9px!important;white-space:nowrap}
.merge-row input,.merge-row button{cursor:auto}
@media(max-width:760px){.merge-row{min-width:860px}}

/* Dynamic menu visibility: hidden must override component display rules. */
[hidden]{display:none!important}

/* v25: light theme controls + mobile workspace height.
   On phones the outer page may grow, while the HEX area keeps its own useful
   editing height. This avoids the iframe height-report loop collapsing the
   workspace to only a few rows. */
html[data-theme=light] .intro p{color:#68889f}
html[data-theme=light] .menu-title,
html[data-theme=light] .menu-item{color:#17232c}
html[data-theme=light] .menu:hover>.menu-title,
html[data-theme=light] .menu.open>.menu-title{background:#e7eef3}
html[data-theme=light] .menu-item kbd{color:#687d8d}
html[data-theme=light] .sep{background:#d2dde4}
html[data-theme=light] .tool-btn,
html[data-theme=light] .dialog button,
html[data-theme=light] .pager button{
  background:#f5f8fa;
  color:#1b2a34;
  border-color:#aebfca;
}
html[data-theme=light] .tool-btn:hover:not(:disabled),
html[data-theme=light] .dialog button:hover,
html[data-theme=light] .pager button:hover{background:#e7eff4}
html[data-theme=light] .tool-sep{background:#c7d4dc}
html[data-theme=light] .file-meta,
html[data-theme=light] .status{color:#60798a}
html[data-theme=light] .menubar,
html[data-theme=light] .toolbar,
html[data-theme=light] .status{border-color:#c8d4dc}
html[data-theme=light] .hex-head{color:#67899f;border-color:#c7d4dc}
html[data-theme=light] .offset{color:#6d8799}
html[data-theme=light] .welcome{color:#718999}
html[data-theme=light] .welcome strong{color:#344b5b}
html[data-theme=light] .dialog{border-color:#aebfca;box-shadow:0 18px 55px #0003}
html[data-theme=light] .dialog-title,
html[data-theme=light] .dialog-actions,
html[data-theme=light] .base-row{border-color:#c9d5dd}
html[data-theme=light] .checksum-body select{background:#fff;color:#17232c;border-color:#aebfca}
html[data-theme=light] .checksum-side fieldset{border-color:#c9d5dd}
html[data-theme=light] .crc-result output{background:#f7fbfd;color:#176a91;border-color:#aec6d4}
html[data-theme=light] .merge-list{border-color:#c6d3dc}
html[data-theme=light] .merge-row{border-color:#d7e0e6}
html[data-theme=light] .drop{border-color:#78a9c4}

@media(max-width:760px){
  /* Natural mobile document height: no 100%-height feedback loop with the
     parent's content-height bridge. */
  html,body{height:auto;min-height:0;overflow:visible}
  .app{
    height:auto;
    min-height:0;
    overflow:visible;
    padding:14px 10px 10px;
  }
  .intro{margin-bottom:12px}
  .intro h1{font-size:27px}
  .intro p{font-size:14px;line-height:1.65}
  .menubar{overflow:visible}
  .menu{flex:1 1 25%;min-width:0}
  .menu-title{width:100%;padding:8px 4px;text-align:center;white-space:normal;line-height:1.45}
  .toolbar{height:auto;min-height:48px;flex-wrap:wrap;padding:7px 8px}
  .tool-btn{min-height:38px;padding:7px 11px}
  .tool-sep{height:30px}
  .hex-shell{
    flex:none;
    height:440px;
    min-height:440px;
    overflow:hidden;
  }
  .hex-scroll{height:100%;max-height:none;overflow:auto}
  .status{min-height:32px;white-space:nowrap}
}

@media(max-width:420px){
  .app{padding-left:8px;padding-right:8px}
  .intro h1{font-size:26px}
  .menu-title{font-size:13px;padding-left:2px;padding-right:2px}
  .hex-shell{height:420px;min-height:420px}
}

/* v26: mobile empty-state must use the visible viewport width, not the
   800px HEX canvas width. Otherwise the centered open-file prompt sits
   hundreds of pixels to the right and is clipped on phones. */
.hex-editor:has(>.welcome){min-width:0;width:100%;height:100%}
@media(max-width:760px){
  .hex-editor:has(>.welcome){min-width:0;width:100%;height:calc(100% - 38px)}
  .hex-editor:has(>.welcome) .welcome{
    width:100%;height:100%;min-height:330px;padding:24px 18px;
    justify-content:center;align-items:center;text-align:center;
  }
  .hex-editor:has(>.welcome) .welcome strong,
  .hex-editor:has(>.welcome) .welcome span,
  .hex-editor:has(>.welcome) .welcome .primary{max-width:100%}
}

/* Remove obsolete toolbar separator after "Copy as C" */
.tool-sep{display:none!important}

/* v28: phone menus/dialogs/touch layout cleanup. */
@media(max-width:760px){
  .menubar{position:relative;overflow:visible;z-index:40}
  .menubar>.menu{position:static}
  .menubar>.menu>.menu-pop{left:0;right:0;top:100%;width:100%;min-width:0;max-width:none;padding:6px;border-left:1px solid #3a5265;border-right:1px solid #3a5265}
  .menubar>.menu:not(.open)>.menu-pop{display:none!important}
  .menubar>.menu.open>.menu-pop{display:block!important}
  .menu-item{min-height:42px;padding:9px 11px;gap:10px;white-space:normal;line-height:1.35}
  .menu-item kbd{flex:0 0 auto;margin-left:auto;white-space:nowrap}
  .submenu{position:relative}
  .submenu>.menu-pop{position:static;left:auto;top:auto;width:100%;min-width:0;margin:3px 0 2px;padding:3px 0 3px 14px;border:0;border-left:2px solid #314454;box-shadow:none;background:transparent}
  .submenu:not(.open)>.menu-pop{display:none!important}
  .submenu.open>.menu-pop{display:block!important}
  .submenu>.menu-pop .menu-item{min-height:38px;padding-top:7px;padding-bottom:7px}
  .toolbar{gap:7px}
  .tool-btn{min-height:40px;max-width:calc(50% - 4px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dialog{width:calc(100vw - 18px);max-width:calc(100vw - 18px);max-height:calc(100dvh - 18px);overflow:auto;margin:auto}
  .dialog-card,.merge-card,.small-dialog .dialog-card{width:100%;min-width:0!important;max-width:100%}
  .dialog-title{position:sticky;top:0;z-index:3;background:#111b24}
  .dialog-actions{position:sticky;bottom:0;z-index:3;flex-wrap:wrap;background:#111b24}
  .dialog-actions button{min-height:40px}
  .checksum-body{grid-template-columns:1fr;gap:12px}
  .checksum-body select{min-height:190px}
  .crc-result{grid-template-columns:72px minmax(0,1fr)}
  .crc-result output{min-width:0;overflow-wrap:anywhere}
  .custom-grid{grid-template-columns:96px minmax(0,1fr);gap:10px;padding:14px 12px}
  .radio-row{gap:10px;flex-wrap:wrap}
  .select-grid{grid-template-columns:116px minmax(0,1fr);gap:10px;padding:14px 12px 10px}
  .select-mode{white-space:normal}
  .base-row{gap:14px;flex-wrap:wrap;padding-left:12px;padding-right:12px}
  .merge-drop-main{min-height:92px;margin:10px;padding:14px 10px}
  .merge-drop-main strong{font-size:16px}
  .merge-drop-main span{text-align:center}
  .merge-list{margin:10px;max-width:calc(100% - 20px)}
  .context-menu{min-width:180px;width:min(240px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto}
  .context-menu button{min-height:42px;padding:9px 11px}
  .toast{width:max-content;max-width:calc(100vw - 24px);text-align:center;white-space:normal}
}
@media(max-width:420px){
  .menu-title{font-size:12px;line-height:1.35}
  .tool-btn{font-size:13px}
  .intro p{font-size:13px}
  .custom-grid,.select-grid{grid-template-columns:104px minmax(0,1fr)}
}
html[data-theme=light] .dialog-title,html[data-theme=light] .dialog-actions{background:#f5f7f9}
html[data-theme=light] .submenu>.menu-pop{border-left-color:#cbd7df}

