.dat-editor{display:grid;gap:18px}.dat-editor__hero,.dat-editor__panel{border:1px solid rgba(255,255,255,var(--bdA));border-radius:var(--radius-panel);background:rgba(255,255,255,.045);box-shadow:0 18px 45px rgba(0,0,0,.18)}.dat-editor__hero{position:relative;display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:22px;overflow:hidden}.dat-editor__intro{min-width:0}.dat-editor__hero h3{margin:3px 0 7px;font-size:clamp(24px,3vw,36px)}.dat-editor__hero p,.dat-editor__meta{margin:0;color:var(--mu)}.dat-editor__meta{margin-top:8px!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}.dat-editor__eyebrow{color:var(--ac);font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.dat-editor__actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;position:relative;z-index:2}.dat-editor__drop-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:rgba(8,14,26,.94);border:2px dashed var(--ac);opacity:0;pointer-events:none;transition:opacity .14s ease;z-index:5}.dat-editor__drop-overlay strong{font-size:20px}.dat-editor__drop-overlay span{color:var(--mu)}.dat-editor__hero.is-dragging .dat-editor__drop-overlay{opacity:1}.dat-editor__panel{overflow:hidden}.dat-editor__toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.08)}.dat-editor__toolbar-group{display:flex;gap:7px;align-items:end;min-width:0}.dat-editor__edit-actions{margin-left:auto}.dat-editor__field{display:grid;gap:4px;min-width:0}.dat-editor__field span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--mu);font-weight:800}.dat-editor__field input{width:160px;height:36px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(3,8,18,.72);color:var(--tx);padding:0 10px;outline:none;font:12px ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}.dat-editor__find input{width:210px}.dat-editor__field input:focus{border-color:var(--ac);box-shadow:0 0 0 2px color-mix(in srgb,var(--ac) 22%,transparent)}.dat-editor__toolbtn{height:36px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(255,255,255,.055);color:var(--tx);padding:0 11px;font-weight:750;cursor:pointer}.dat-editor__toolbtn:hover:not(:disabled){border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.09)}.dat-editor__toolbtn:disabled{opacity:.42;cursor:not-allowed}.dat-editor__workspace{display:grid;grid-template-columns:minmax(0,1fr) 220px;min-height:520px}.dat-editor__hex-shell{min-width:0;border-right:1px solid rgba(255,255,255,.08);background:#07101d}.dat-editor__hex-header{display:grid;grid-template-columns:88px minmax(560px,1fr) 160px;align-items:center;height:36px;border-bottom:1px solid rgba(255,255,255,.1);background:#0b1626;color:#8da0b8;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-weight:800;position:relative;z-index:3}.dat-editor__offset-head{padding-left:14px}.dat-editor__byte-heads{display:grid;grid-template-columns:repeat(16,minmax(28px,1fr));column-gap:2px;padding:0 8px}.dat-editor__byte-heads span{text-align:center}.dat-editor__ascii-head{padding-left:12px;border-left:1px solid rgba(255,255,255,.08)}.dat-editor__viewport{height:520px;overflow:auto;position:relative;outline:none;background:#07101d}.dat-editor__viewport:focus-visible{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--ac) 60%,transparent)}.dat-editor__empty{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;color:var(--mu);z-index:2}.dat-editor__empty strong{color:var(--tx);font-size:18px}.dat-editor__spacer{width:1px;opacity:0;pointer-events:none}.dat-editor__rows{position:absolute;inset:0 0 auto 0;pointer-events:none}.dat-editor__row{position:absolute;left:0;right:0;height:28px;display:grid;grid-template-columns:88px minmax(560px,1fr) 160px;align-items:center;font:12px/1 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;pointer-events:auto}.dat-editor__row:nth-child(odd){background:rgba(255,255,255,.012)}.dat-editor__offset{padding-left:14px;color:#71849b;user-select:none}.dat-editor__bytes{display:grid;grid-template-columns:repeat(16,minmax(28px,1fr));column-gap:2px;padding:0 8px}.dat-editor__byte,.dat-editor__ascii-byte{appearance:none;border:0;background:transparent;color:#d7e4f3;font:inherit;height:24px;border-radius:5px;padding:0;cursor:pointer;outline:none}.dat-editor__byte:hover,.dat-editor__ascii-byte:hover{background:rgba(255,255,255,.07)}.dat-editor__byte:focus-visible{box-shadow:inset 0 0 0 1px var(--ac)}.dat-editor__byte.is-selected,.dat-editor__ascii-byte.is-selected{background:var(--ac);color:#07101d;font-weight:900}.dat-editor__byte--blank,.dat-editor__ascii-byte--blank{pointer-events:none}.dat-editor__ascii{display:grid;grid-template-columns:repeat(16,1fr);padding:0 8px;border-left:1px solid rgba(255,255,255,.07)}.dat-editor__ascii-byte{min-width:0}.dat-editor__inspector{padding:16px;background:rgba(255,255,255,.025)}.dat-editor__inspector h4{margin:0 0 12px;font-size:14px}.dat-editor__inspector dl{display:grid;gap:0;margin:0}.dat-editor__inspector dl div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06)}.dat-editor__inspector dt{color:var(--mu);font-size:12px}.dat-editor__inspector dd{margin:0;color:var(--tx);font:12px ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;text-align:right;overflow-wrap:anywhere}.dat-editor__inspector-help{display:grid;gap:6px;margin-top:18px;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(0,0,0,.12)}.dat-editor__inspector-help strong{font-size:12px}.dat-editor__inspector-help span{color:var(--mu);font-size:11px;line-height:1.55}.dat-editor__statusbar{display:flex;justify-content:space-between;gap:16px;padding:10px 14px;border-top:1px solid rgba(255,255,255,.08);color:var(--mu);font-size:12px;background:rgba(0,0,0,.08)}#dat-status[data-error=true]{color:#ff9b9b}#dat-position{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;text-align:right}@media(max-width:980px){.dat-editor__workspace{grid-template-columns:1fr}.dat-editor__hex-shell{border-right:0}.dat-editor__inspector{border-top:1px solid rgba(255,255,255,.08)}.dat-editor__inspector dl{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.dat-editor__inspector dl div{display:grid;justify-content:start;border:0;padding:6px}.dat-editor__inspector dd{text-align:left}.dat-editor__inspector-help{margin-top:10px}.dat-editor__edit-actions{margin-left:0}}@media(max-width:760px){.dat-editor__hero{flex-direction:column}.dat-editor__actions{justify-content:flex-start}.dat-editor__toolbar{align-items:stretch}.dat-editor__toolbar-group{width:100%;align-items:end}.dat-editor__field{flex:1}.dat-editor__field input,.dat-editor__find input{width:100%}.dat-editor__edit-actions{display:grid;grid-template-columns:1fr 1fr}.dat-editor__workspace{min-height:430px}.dat-editor__viewport{height:430px}.dat-editor__hex-shell{overflow-x:auto}.dat-editor__hex-header,.dat-editor__row{min-width:808px}.dat-editor__inspector dl{grid-template-columns:repeat(2,minmax(0,1fr))}.dat-editor__statusbar{flex-direction:column;gap:5px}#dat-position{text-align:left}}

.dat-editor__empty[hidden]{display:none!important}

/* Hex editor v2: history, selection, bookmarks, inspector, replace */
.dat-editor__workspace{grid-template-columns:minmax(0,1fr) 290px}
.dat-editor__search-group{flex:1;flex-wrap:wrap}
.dat-editor__replace input{width:180px}
.dat-editor__bookmark-actions{align-items:end}
.dat-editor__bookmark-field select,.dat-editor__inspector select{height:36px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(3,8,18,.72);color:var(--tx);padding:0 10px;outline:none;font:12px ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}
.dat-editor__bookmark-field select{min-width:145px}
.dat-editor__bookmark-field select:focus,.dat-editor__inspector select:focus{border-color:var(--ac);box-shadow:0 0 0 2px color-mix(in srgb,var(--ac) 22%,transparent)}
.dat-editor__byte.is-range,.dat-editor__ascii-byte.is-range{background:color-mix(in srgb,var(--ac) 24%,transparent)}
.dat-editor__byte.is-selected,.dat-editor__ascii-byte.is-selected{background:var(--ac);color:#07101d;font-weight:900}
.dat-editor__byte.is-bookmarked,.dat-editor__ascii-byte.is-bookmarked{box-shadow:inset 0 2px 0 #f6c85f}
.dat-editor__byte.is-selected.is-bookmarked,.dat-editor__ascii-byte.is-selected.is-bookmarked{box-shadow:inset 0 2px 0 #07101d}
.dat-editor__inspector{min-width:0}
.dat-editor__inspector-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.dat-editor__inspector-head h4{margin:0}
.dat-editor__inspector-head select{height:32px;max-width:145px;padding:0 8px}
.dat-editor__inspector dl div{align-items:flex-start}
.dat-editor__inspector dd{max-width:170px}
.dat-editor__inspector-help #dat-mode{color:var(--ac)}
@media(max-width:1180px){
  .dat-editor__search-group{order:3;width:100%}
  .dat-editor__edit-actions{margin-left:0}
}
@media(max-width:980px){
  .dat-editor__workspace{grid-template-columns:1fr}
  .dat-editor__inspector dl{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dat-editor__inspector dd{max-width:none}
}
@media(max-width:760px){
  .dat-editor__search-group{display:grid;grid-template-columns:1fr 1fr}
  .dat-editor__search-group .dat-editor__field{grid-column:span 1}
  .dat-editor__search-group .dat-editor__toolbtn{min-width:0}
  .dat-editor__bookmark-actions{display:grid;grid-template-columns:1fr 1fr}
  .dat-editor__bookmark-field select{width:100%}
  .dat-editor__inspector dl{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:520px){
  .dat-editor__search-group{grid-template-columns:1fr}
  .dat-editor__inspector dl{grid-template-columns:1fr}
  .dat-editor__inspector-head{align-items:flex-start;flex-direction:column}
  .dat-editor__inspector-head select{max-width:none;width:100%}
}
