/* FILES-10SERVER. Native Copyparty structure and behaviour; monochrome
   actions, blue underlined destinations. Palette variables use !important
   to beat saved themes; narrow mobile exceptions beat native inline geometry. Browser rules use its real root ID, not html.z,
   because native html.<theme> selectors otherwise defeat later declarations. */
html:root {
  color-scheme:dark;
  --font-main:'JetBrainsMono Nerd Font','JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace !important;
  --font-mono:var(--font-main) !important; --font-serif:var(--font-main) !important;
  --fg:#e4e4e4 !important; --fg-max:#fff !important; --fg2-max:#fff !important; --fg-weak:#aaa !important;
  --bg:#000 !important; --bgg:#000 !important; --bg-max:#000 !important;
  --bg-u1:#0a0a0a !important; --bg-u2:#111 !important; --bg-u3:#161616 !important;
  --bg-u4:#222 !important; --bg-u5:#333 !important; --bg-u6:#444 !important;
  --bg-d1:#111 !important; --bg-d2:#0a0a0a !important; --bg-d3:#000 !important;
  --row-alt:#0a0a0a !important; --tree-bg:#0a0a0a !important; --scroll:#808080 !important;
  --a:#e4e4e4 !important; --a-b:#aaa !important; --a-hil:#fff !important;
  --itx-link:#8ac6ff; --itx-link-hover:#b9ddff;
  --a-dark:#e4e4e4 !important; --a-gray:#aaa !important; --a-h-bg:transparent !important;
  --tab-alt:#ccc !important; --sel-fg:#000 !important; --sel-bg:#fff !important;
  --sort-1:#fff !important; --sort-2:#aaa !important;
  --sz-b:#aaa !important; --sz-k:#aaa !important; --sz-m:#ccc !important;
  --sz-g:#e4e4e4 !important; --sz-t:#fff !important; --sz-p:#fff !important;
  --srv-1:#aaa !important; --srv-2:#aaa !important; --srv-3:#fff !important; --srv-3b:#808080 !important;
  --btn-fg:#e4e4e4 !important; --btn-bg:#111 !important; --btn-h-fg:#fff !important; --btn-h-bg:#262626 !important;
  --btn-1-fg:#e4e4e4 !important; --btn-1-bg:#2c2c2c !important; --btn-1h-fg:#fff !important; --btn-1h-bg:#383838 !important;
  --btn-bs:none !important; --btn-bb:0 !important; --btn-h-bs:none !important; --btn-h-bb:0 !important;
  --btn-1-bs:none !important; --btn-1-bb:0 !important; --btn-1h-bs:none !important; --btn-1h-bb:0 !important;
  --chk-fg:#ccc !important; --txt-sh:transparent !important; --txt-bg:#111 !important;
  --op-aa-fg:var(--btn-1-fg) !important; --op-aa-bg:var(--btn-1-bg) !important; --op-aa-sh:none !important; --op-a-sh:transparent !important;
  --u2-btn-b1:#808080 !important; --u2-sbtn-b1:#fff !important; --u2-txt-bg:#111 !important;
  --u2-tab-bg:#111 !important; --u2-tab-b1:#555 !important;
  --u2-tab-1-fg:var(--btn-1-fg) !important; --u2-tab-1-bg:var(--btn-1-bg) !important;
  --u2-tab-1-b1:#777 !important; --u2-tab-1-b2:#777 !important; --u2-tab-1-sh:transparent !important;
  --u2-b-fg:#fff !important; --u2-b1-bg:#222 !important; --u2-b2-bg:#333 !important;
  --u2-inf-bg:#161616 !important; --u2-inf-b1:#808080 !important;
  --u2-ok-bg:#222 !important; --u2-ok-b1:#ccc !important;
  --u2-err-bg:#111 !important; --u2-err-b1:#fff !important; --ud-b1:#aaa !important;
  --g-play-bg:#333 !important; --g-play-b1:#fff !important; --g-play-b2:#fff !important; --g-play-sh:transparent !important;
  --g-sel-fg:#fff !important; --g-sel-bg:#292929 !important; --g-sel-b1:#fff !important; --g-sel-sh:transparent !important;
  --g-fsel-bg:#383838 !important; --g-fsel-b1:#fff !important; --g-fsel-ts:transparent !important;
  --g-dfg:#e4e4e4 !important; --g-fg:#e4e4e4 !important;
  --g-bg:#0a0a0a !important; --g-b1:#333 !important; --g-b2:#333 !important;
  --g-g1:#0a0a0a !important; --g-g2:#222 !important;
  --g-f-bg:#161616 !important; --g-f-b1:#aaa !important; --g-f-fg:#fff !important; --g-sh:transparent !important;
  --f-h-b1:#444 !important; --f-play-bg:#333 !important; --f-play-fg:#fff !important;
  --f-sel-sh:#fff !important; --f-gray:#aaa !important; --fm-off:#aaa !important;
  --mp-sh:#000 !important; --mp-b-bg:#161616 !important;
  --err-fg:#fff !important; --err-bg:#222 !important; --err-b1:#fff !important; --err-ts:transparent !important;
  --itx-target:36px; --itx-control-font:.875rem; --itx-gutter:.75rem;
  --itx-player-height:112px; --itx-strip-height:56px;
  --itx-bottom-space:calc(var(--itx-strip-height) + env(safe-area-inset-bottom));
}
html:root { background:#000; color:#e4e4e4; text-shadow:none; font-weight:400; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
input, button, select, textarea { font:inherit; color:inherit; accent-color:#fff; }
/* Native actions are also anchors: opt destinations into blue, not all anchors. */
html:root a { color:var(--fg); text-decoration:none; }
html:root a:where([href]:not([href^="#"]):not([href^="javascript:"]):not(.btn):not(.itx-control):not([role=button])) {
  color:var(--itx-link); text-decoration:underline; text-underline-offset:.18em;
}
html:root a:where([href]:not([href^="#"]):not([href^="javascript:"]):not(.btn):not(.itx-control):not([role=button])):hover { color:var(--itx-link-hover); }
input::placeholder, textarea::placeholder { color:#999; opacity:1; }
input[type=file]::file-selector-button {
  min-height:var(--itx-target); margin:0 .5rem 0 0; padding:.4em .6em;
  font:inherit; font-size:var(--itx-control-font); color:#e4e4e4; background:#111;
  border:1px solid #555; border-radius:3px; cursor:pointer;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  box-sizing:border-box; max-width:100%; min-width:0; min-height:var(--itx-target); padding:.45em .5em;
  color:#e4e4e4; background:#111; border:1px solid #666; border-radius:3px;
}
html#ht_brw :focus, html#ht_brw :focus+label, html:root #modalb a:focus {
  outline:2px solid #fff; outline-offset:2px; box-shadow:none;
}
html#ht_brw #files tr:focus { outline:2px solid #fff; outline-offset:-2px; }
/* Native IDs cover delayed/absent theme JS. Never blank fallback text. */
html#ht_brw .btn, html#ht_brw button, html#ht_brw input[type=submit], html#ht_brw input[type=button],
html#ht_brw .itx-control, html#ht_brw #ops a, html#ht_brw #wtoggle a, html#ht_brw #pctl a,
html#ht_brw #entree, html#ht_brw #detree, html#ht_brw #visdir, html#ht_brw #u2cards a,
html#ht_brw #u2conf a.b, html#ht_brw #treeh a, html#ht_brw #ghead a, html#ht_brw a.eq_step, html#ht_brw #rcm>a, html:root #modalb a {
  display:inline-flex; align-items:center; justify-content:center; gap:.4em;
  box-sizing:border-box; max-width:100%; min-width:var(--itx-target); min-height:var(--itx-target); padding:.4em .6em;
  margin:2px; top:auto; vertical-align:middle; font-size:var(--itx-control-font); line-height:1.3;
  white-space:nowrap; color:#e4e4e4; background:#111; border:1px solid #555;
  border-radius:3px; text-decoration:none; text-shadow:none; box-shadow:none; cursor:pointer;
}
html#ht_brw .btn:hover, html#ht_brw button:hover, html#ht_brw .itx-control:hover,
html#ht_brw #ops a:hover, html#ht_brw #wtoggle a:hover, html#ht_brw #pctl a:hover,
html#ht_brw #u2cards a:hover, html#ht_brw #treeh a:hover, html#ht_brw #u2conf a.b:hover, html:root #modalb a:hover {
  color:#fff; background:#262626; border-color:#aaa;
}
html#ht_brw .tgl.btn.on, html#ht_brw #ops a.act, html#ht_brw #u2cards a.act,
html#ht_brw .itx-control[aria-pressed=true], html#ht_brw #wtoggle a.on, html#ht_brw #treeh a.on {
  color:var(--btn-1-fg); background:var(--btn-1-bg); border-color:#777; box-shadow:none;
}
html#ht_brw .tgl.btn.on:hover, html#ht_brw #u2conf input[type=checkbox]:checked+label:hover {
  color:var(--btn-1h-fg); background:var(--btn-1h-bg); border-color:#999;
}
html#ht_brw #wfm a:not(.en), html#ht_brw :disabled, html#ht_brw [aria-disabled=true] {
  opacity:1; color:#aaa; background:#0a0a0a; border-color:#333; cursor:default;
}
svg.ti, html#ht_brw #ops a svg.ti {
  display:inline-block; flex:none; width:20px; height:20px; margin:0;
  vertical-align:middle; stroke:currentColor; pointer-events:none;
}
.itx-label { line-height:1.25; }
html#ht_brw .itx-icon-only { padding:7px; }
/* Desktop wraps whole actions. Phones get one scrollable row, not five. */
html#ht_brw #ops {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px; max-width:none;
  height:auto; margin:3.25rem var(--itx-gutter) .5rem; padding:.35rem 0;
  white-space:normal; background:#000; border:0; border-bottom:1px solid #333;
  border-radius:0; box-shadow:none;
}
html#ht_brw #ops a { flex:none; order:1; margin:0; aspect-ratio:auto; height:auto; }
html#ht_brw #ops #opa_srch, html#ht_brw #ops #opa_up { order:0; }
html#ht_brw #ops #opa_x { order:-1; }
html#ht_brw:not(.op_open) #ops #opa_x { display:none; }
html#ht_brw #ops>a[data-dest=new_md], html#ht_brw #ops>a[data-dest=msg] { display:inline-flex; }
html#ht_brw #path {
  display:block; box-sizing:border-box; width:auto; max-width:100%; margin:.5rem var(--itx-gutter); padding:0;
  font-size:1rem; line-height:1.5; background:none; border:0; border-radius:0;
  box-shadow:none; text-shadow:none; overflow-wrap:anywhere;
}
html#ht_brw #path a { display:inline-block; margin:0; padding:.35em; }
html#ht_brw #path #entree { display:inline-flex; margin:0 .35em 0 0; }
html#ht_brw #path i { background:none; border-color:#555; }
html#ht_brw #path a:hover { background:#161616; }
#itx-io { color:#fff; }
html#ht_brw #acc_info { display:flex; align-items:center; gap:.5rem; top:.25rem; right:.75rem; max-width:40%; font-size:.75rem; white-space:nowrap; }
html#ht_brw #acc_info>span:not([id]) { min-width:0; overflow:hidden; text-overflow:ellipsis; }
html#ht_brw #acc_info form { flex:none; }
html#ht_brw #srv_info { top:.5rem; left:.75rem; max-width:calc(60% - 1.5rem); font-size:.75rem; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
/* Keep the real shared header/body table and column preferences. Only filenames
   wrap; arbitrary tags must never dictate a many-hundred-pixel row height. */
html#ht_brw #wrap {
  box-sizing:border-box; max-width:none; min-width:0; margin:.75rem var(--itx-gutter) 0; padding-bottom:1rem;
  transform:none; overflow-x:auto; overscroll-behavior-x:contain;
}
html#ht_brw #files { width:100%; top:0; border-spacing:0; table-layout:auto; }
html#ht_brw #files th { color:#aaa; background:#0a0a0a; text-align:left; padding:.75em .5em; }
html#ht_brw #files td {
  padding:.4em .5em; max-width:none; white-space:nowrap; overflow-wrap:normal;
  word-wrap:normal; word-break:normal; box-shadow:none; border-bottom:1px solid #222;
}
html#ht_brw #files td:not(:nth-child(2)) * { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
html#ht_brw #files td:nth-child(2), html#ht_brw #files th[name=href] {
  min-width:clamp(16rem,42vw,48rem); max-width:48rem; width:46%; white-space:normal;
}
html#ht_brw #files td:first-child { min-width:var(--itx-target); }
html#ht_brw #files td:first-child, html#ht_brw #files td:last-child { border-radius:0; }
html#ht_brw #files td:nth-child(3) { min-width:5rem; }
html#ht_brw #files tbody a { box-sizing:border-box; min-height:var(--itx-target); padding:.45em .15em; margin:0; }
html#ht_brw #files td:nth-child(2)>a { overflow-wrap:anywhere; }
html#ht_brw #files a.itx-video-audio { font-size:0; }
html#ht_brw #files td:first-child>a {
  display:inline-flex; align-items:center; justify-content:center; min-width:var(--itx-target); min-height:var(--itx-target);
  box-sizing:border-box; margin:0; padding:.4em; color:#e4e4e4; text-decoration:none;
  background:#111; border:1px solid #555; border-radius:3px;
}
html#ht_brw #files tbody tr:hover td { background:#161616; box-shadow:none; }
html#ht_brw #files tbody tr.sel td { background:#292929; box-shadow:none; }
html#ht_brw #files tbody tr.play td { background:#333; color:#fff; }
html#ht_brw #files tr.sel td:first-child, html#ht_brw #files tr.play td:first-child { box-shadow:3px 0 #fff inset; }
html#ht_brw #files td:nth-child(2)>a { color:var(--itx-link); text-decoration:underline; text-underline-offset:.18em; }
html#ht_brw #files td:nth-child(2)>a:hover { color:var(--itx-link-hover); }
html#ht_brw #ggrid { max-width:100%; }
html#ht_brw #ggrid>a { box-sizing:border-box; text-decoration:underline; text-underline-offset:.18em; }
html#ht_brw #ggrid>a[tt] { background:#0a0a0a; }
html#ht_brw #ggrid>a:before { background:none; text-shadow:none; }
html#ht_brw #ggrid>a.dir:before, html#ht_brw #ggrid>a.au:before {
  content:""; width:24px; height:24px; padding:0; margin:4px; border-radius:0;
  background:#e4e4e4; mask:var(--itx-tile-icon) center / contain no-repeat;
}
html#ht_brw #ggrid>a.dir { --itx-tile-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 6h7l2 3h9v12H3z'/%3E%3C/svg%3E"); }
html#ht_brw #ggrid>a.au { --itx-tile-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m7 4 13 8-13 8z'/%3E%3C/svg%3E"); }
html#ht_brw #ggrid>a.sel { background:#292929; }
html#ht_brw #ggrid>a.play { background:#333; }
/* Panels retain native .act/permission visibility. Contain advanced tables. */
html#ht_brw .opview {
  box-sizing:border-box; min-width:0; max-width:calc(100% - 2 * var(--itx-gutter));
  margin:.75rem var(--itx-gutter); padding:0; background:#000; border:0; border-radius:0; box-shadow:none;
}
html#ht_brw .opwide>div {
  box-sizing:border-box; min-width:0; max-width:100%; overflow-x:auto;
  margin:.5rem 1rem .5rem 0; padding:.65rem 0; border:0; border-top:1px solid #333;
}
html#ht_brw .opwide>div>h3 { color:#aaa; margin:0 0 .5em; padding:0; border:0; font-size:1rem; font-weight:400; }
html#ht_brw .opwide .btn { max-width:100%; white-space:normal; text-align:left; justify-content:flex-start; }
html#ht_brw #op_cfg>div>div>span { max-width:100%; box-sizing:border-box; }
html#ht_brw :is(#op_bup,#op_mkdir,#op_new_md,#op_msg) form { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; padding:.5rem 0; }
html#ht_brw :is(#op_bup,#op_mkdir,#op_new_md,#op_msg) form>input { margin:0; }
html#ht_brw :is(#op_mkdir,#op_new_md,#op_msg) input.i { flex:1 1 16rem; width:auto; }
html#ht_brw #op_bup input[type=file] { flex:1 1 16rem; }
html#ht_brw #op_bup form>br { display:none; }
html#ht_brw #op_msg input[type=submit] { white-space:normal; }
html#ht_brw .opwide div>span>input+label { display:inline-block; padding:.65em .35em; line-height:1.4; }
html#ht_brw #op_cfg input[type=text] { top:auto; min-width:5rem; }
html#ht_brw .opview select, html#ht_brw .opview input[type=text] { color:#e4e4e4; background:#111; border:1px solid #666; box-shadow:none; }
html#ht_brw .opview input.i { width:min(100%,28rem); }
html#ht_brw .opview input.err, html#ht_brw #u2conf .txtbox.err { color:#fff; background:#222; border:3px double #fff; }
html#ht_brw #audio_eq, html#ht_brw #audio_drc, html#ht_brw #audio_ss { max-width:100%; overflow-x:auto; }
html#ht_brw #audio_eq td, html#ht_brw #audio_drc td, html#ht_brw #audio_ss td { min-width:4.5rem; padding:.25rem; }
html#ht_brw input.drc_v, html#ht_brw input.eq_gain, html#ht_brw input.ssconf_v { margin:.2rem 0; width:4rem; }
html#ht_brw #au_ss.on { width:auto; height:auto; overflow:visible; }
html#ht_brw #srch_form { box-sizing:border-box; max-width:100%; margin:0; padding:.5rem 0; background:none; border:0; border-radius:0; box-shadow:none; }
html#ht_brw #srch_form table { max-width:100%; }
html#ht_brw #srch_form td { padding:.4rem; }
html#ht_brw #srch_form label { display:inline-block; padding:.4em .15em; }
html#ht_brw #srch_q { white-space:pre-wrap; overflow-wrap:anywhere; margin:.5rem 0; }
html#ht_brw #tq_raw { width:100%; margin:.5rem 0 0; }
/* The configuration table is a layout widget, not tabular data. Flatten its
   two rows into wrapping native input/label blocks, including native JS's
   relocated wide-layout dropzone/status cells. No DOM reparenting required. */
html#ht_brw #op_up2k { overflow-x:auto; }
html#ht_brw #u2conf { display:block; width:100%; max-width:100%; margin:.75rem 0; font-size:var(--itx-control-font); }
html#ht_brw #u2conf>tbody { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
html#ht_brw #u2conf tr { display:contents; }
html#ht_brw #u2conf td { display:block; box-sizing:border-box; min-width:0; max-width:100%; margin:0; padding:0; }
html#ht_brw #u2conf tr:first-child>.c:first-child { order:-2; flex-basis:100%; text-align:left; }
html#ht_brw #u2conf tr:nth-child(2)>.c { order:-1; display:flex; align-items:center; gap:4px; flex-basis:100%; }
html#ht_brw #u2conf .c>br { display:none; }
html#ht_brw #u2conf input[type=checkbox]+label {
  display:flex; align-items:center; justify-content:center; gap:.4em;
  box-sizing:border-box; width:auto; min-width:var(--itx-target); height:auto; min-height:var(--itx-target);
  margin:0; padding:.45em .6em; font-size:var(--itx-control-font); line-height:1.3; white-space:normal;
  color:#e4e4e4; background:#111; border:1px solid #666; border-radius:3px;
  text-shadow:none; box-shadow:none;
}
html#ht_brw #u2conf input[type=checkbox] { position:absolute; width:1px; height:1px; min-height:0; opacity:0; }
html#ht_brw #u2conf input[type=checkbox]:checked+label { background:var(--btn-1-bg); color:var(--btn-1-fg); border-color:#777; text-shadow:none; box-shadow:none; }
html#ht_brw #u2conf .txtbox { box-sizing:border-box; width:3.5rem; height:var(--itx-target); min-height:var(--itx-target); padding:.25em; border:1px solid #666; }
html#ht_brw #u2conf a.b { flex:none; width:var(--itx-target); height:var(--itx-target); bottom:auto; margin:0; }
html#ht_brw #u2conf #u2btn_cw, html#ht_brw #u2conf #u2c3w { flex-basis:100%; width:100%; text-align:left; }
html#ht_brw #u2conf #u2btn_cw { order:1; }
html#ht_brw #u2conf #u2c3w { order:2; }
html#ht_brw #u2btn_ct, html#ht_brw #u2c3t { clear:both; }
html#ht_brw #u2btn, html#ht_brw #u2conf #u2btn {
  display:block; box-sizing:border-box; width:100%; max-width:32rem; min-height:80px;
  margin:.75rem auto; padding:.75rem; transform:none; color:#fff; background:#111;
  border:1px dashed #aaa; font-size:1rem; line-height:1.5; text-shadow:none; box-shadow:none;
}
html#ht_brw #u2cards { display:flex; flex-wrap:wrap; gap:4px; width:auto; min-width:0; margin:.5rem 0; padding:.5rem 0; overflow:visible; white-space:normal; }
html#ht_brw #u2cards a { margin:0; }
html#ht_brw #u2cards a.act { padding:.4em .6em; }
html#ht_brw #u2cards span { color:inherit; }
html#ht_brw #u2etaw, html#ht_brw #u2etas { display:block; box-sizing:border-box; width:auto; max-width:100%; margin:.5rem 0; white-space:normal; }
html#ht_brw #u2tabw { overflow-x:auto; }
html#ht_brw #u2tab { min-width:32rem; width:100%; font-size:1rem; }
html#ht_brw #u2life div { white-space:normal; margin:.5rem; }
html#ht_brw #u2foot { font-size:1rem; font-style:normal; }
html#ht_brw #u2foot .warn { margin:1rem 0; padding:.5rem; font-size:1rem; }
html#ht_brw #u2notbtn { background:#111; border:1px solid #333; border-radius:3px; padding:1rem .5rem; }
html#ht_brw .dropdesc { color:#fff; background:#161616; border-color:#808080; text-shadow:none; box-shadow:none; font-size:clamp(1.25rem,4vw,3rem); }
html#ht_brw .dropdesc.hl.ok { background:#222; border-color:#fff; box-shadow:0 0 0 2px #fff; }
html#ht_brw .dropdesc.hl.err { background:#111; border-color:#fff; border-style:double; box-shadow:none; }
html#ht_brw .dropdesc span { color:#fff; background:#222; border-color:#aaa; text-shadow:none; }
html#ht_brw .dropdesc.err span { background:#111; border-color:#fff; }
/* Native JS still owns tree width, top, fixed/absolute mode and docked-parent
   top. Shared box sizing keeps its painted backdrop within those measurements. */
html#ht_brw #tree, html#ht_brw #treeh, html#ht_brw #treepar { box-sizing:border-box; background:#0a0a0a; border-color:#444; border-radius:0; box-shadow:none; }
html#ht_brw #tree { padding:0 0 var(--itx-bottom-space); }
html#ht_brw #treeh { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; width:100%; height:auto; min-height:48px; padding:6px; line-height:1.25; }
html#ht_brw #treeh a { width:100%; min-width:0; margin:0; white-space:normal; overflow-wrap:anywhere; }
html#ht_brw #treeh #detree, html#ht_brw #treeh #visdir { grid-column:1 / -1; }
html#ht_brw #treeh #wraptree.on+#hovertree { display:none; }
html#ht_brw #treepar { left:0; width:calc(var(--nav-sz) - var(--sbw)); margin-left:0; }
html#ht_brw #treeul { left:0; width:auto; margin-left:0; border-left:0; }
html#ht_brw #tree ul { border-color:#444; }
html#ht_brw #tree ul a+a { color:var(--itx-link); text-decoration:underline; text-underline-offset:.18em; }
html#ht_brw #tree ul a { min-height:44px; box-sizing:border-box; padding:.6em .3em; line-height:1.4; }
html#ht_brw .ntree a:first-child { display:inline-flex; align-items:center; justify-content:center; min-width:44px; color:#e4e4e4; text-decoration:none; }
html#ht_brw .ntree a+a { width:calc(100% - 3rem); vertical-align:middle; }
html#ht_brw #tree ul a.sel, html#ht_brw #tree ul a.hl { color:#fff; background:#222; text-decoration:none; box-shadow:3px 0 #fff inset; }
html#ht_brw #tree ul a:first-child { color:#e4e4e4; text-decoration:none; }
/* One scrollable action shelf. Flex ordering moves view toggles first without
   reparenting nodes or disturbing native group/sibling visibility selectors. */
html#ht_brw.np_open { --itx-bottom-space:calc(var(--itx-strip-height) + var(--itx-player-height) + env(safe-area-inset-bottom)); }
html#ht_brw body { padding-bottom:var(--itx-bottom-space); }
html#ht_brw #widget {
  box-sizing:border-box; height:calc(var(--itx-player-height) + env(safe-area-inset-bottom));
  bottom:calc(-1 * (var(--itx-player-height) + env(safe-area-inset-bottom)));
  font-size:1rem; background:#0a0a0a; border:0; box-shadow:none; touch-action:auto;
}
html#ht_brw #widget.open { bottom:0; }
html#ht_brw #wtoggle {
  box-sizing:border-box; display:flex; align-items:center; justify-content:flex-start;
  top:calc(-1 * var(--itx-strip-height)); right:0; width:100%; height:var(--itx-strip-height);
  padding:4px .5rem; overflow-x:auto; overflow-y:hidden; white-space:nowrap; text-align:left;
  font-size:1rem; line-height:1; background:#0a0a0a; border-top:1px solid #555;
  box-shadow:none; border-radius:0; touch-action:pan-x;
}
html#ht_brw #widget:not(.open) #wtoggle { top:calc(-1 * (var(--itx-strip-height) + env(safe-area-inset-bottom))); padding-bottom:calc(4px + env(safe-area-inset-bottom)); height:calc(var(--itx-strip-height) + env(safe-area-inset-bottom)); }
html#ht_brw #wtoggle>* { flex:none; }
html#ht_brw #wtoggle #wtgrid { order:-3; }
html#ht_brw #wtoggle #wtico { order:-2; }
html#ht_brw #wtoggle #wfs { order:-1; max-width:12rem; padding:0 .5rem; font-size:.85rem; white-space:normal; }
html#ht_brw #wtoggle a { flex:none; margin:0 2px; font-size:var(--itx-control-font); top:auto; }
html#ht_brw #wtoggle span:not(.itx-label) { line-height:1.25; }
html#ht_brw #wtoggle a span { display:inline; padding:0; font-size:inherit; color:inherit; }
html#ht_brw #wtoggle #wfm, html#ht_brw #wtoggle #wzip, html#ht_brw #wtoggle #wnp, html#ht_brw #wtoggle #wm3u { margin:0; padding:0 .25rem; border-color:#555; }
html#ht_brw #wtoggle.sel .l1 { top:auto; padding:.4em .6em; }
html#ht_brw #widget.cmp #wtgrid, html#ht_brw #widget.cmp #fshr { display:inline-flex; }
/* Native operation gates must beat the decorated-control display rule. */
html#ht_brw #wfm a.hide, html#ht_brw #rcm>.hide { display:none; }
html#ht_brw #widget #widgeti { box-sizing:border-box; height:100%; background:#0a0a0a; padding-bottom:env(safe-area-inset-bottom); }
html#ht_brw #widget #pctl { top:8px; left:8px; display:flex; gap:4px; font-size:1rem; }
html#ht_brw #widget #pctl a { width:44px; height:44px; margin:0; }
html#ht_brw #widget #pvol { top:8px; right:8px; width:calc(100% - 168px); max-width:144px; height:44px; border-radius:3px; }
html#ht_brw #widget #barpos, html#ht_brw #widget #barbuf { top:auto; bottom:calc(8px + env(safe-area-inset-bottom)); left:8px; width:calc(100% - 16px); height:44px; border-radius:3px; box-shadow:none; }
html#ht_brw #widget #pvol, html#ht_brw #widget #barbuf { background:#161616; }
html#ht_brw:has(#widget.cmp) { --itx-player-height:60px; }
html#ht_brw #widget.cmp #pvol { width:88px; }
html#ht_brw #widget.cmp #barpos, html#ht_brw #widget.cmp #barbuf { top:8px; bottom:auto; left:156px; width:calc(100% - 260px); }
html#ht_brw #barpos, html#ht_brw #barbuf, html#ht_brw #pvol { filter:grayscale(1); touch-action:none; }
/* Common dialogs and documents are shared with the separate splash page. */
html:root #modal { background:rgba(0,0,0,.8); }
html:root #modalc { box-sizing:border-box; min-width:0; max-width:min(52rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); margin:1rem; padding:.85rem; background:#0a0a0a; color:#e4e4e4; border:1px solid #808080; border-radius:4px; box-shadow:none; overflow-wrap:anywhere; }
html:root #modalc h6 { margin:0 0 .5em; padding:0 0 .5em; border-color:#555; font-size:1rem; }
html:root #modalc li { margin:.4em 0; }
html:root #modalb { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem; background:#0a0a0a; }
html:root #modalb a { margin:0; white-space:normal; }
html:root #modali { box-sizing:border-box; width:100%; margin:1rem 0 0; color:#fff; background:#111; border:1px solid #808080; }
html#ht_brw #shui, html#ht_brw #rui {
  box-sizing:border-box; inset:.5rem .5rem auto; width:auto; max-height:calc(100dvh - 1rem);
  padding:.65rem; background:#0a0a0a; border:1px solid #555; border-radius:3px; box-shadow:0 8px 24px #000;
}
html#ht_brw #shui td, html#ht_brw #rui td { padding:.3em; vertical-align:top; }
html#ht_brw #shui div+div, html#ht_brw #rui div+div { margin-top:.5rem; }
html#ht_brw #shui button, html#ht_brw #rui button { margin:2px; }
html#ht_brw #rui h1 { font-size:1.1rem; }
html#ht_brw #rui>div:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
html#ht_brw #rui input[readonly] { background:#161616; }
html#ht_brw #rcm { max-width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem); overflow-y:auto; padding:4px; background:#0a0a0a; border:1px solid #555; box-shadow:none; }
html#ht_brw #rcm>a { display:flex; margin:0; padding:.25em .5em; min-height:32px; justify-content:flex-start; white-space:normal; background:none; border:0; }
html#ht_brw #rcm>a:hover { background:#262626; }
html#ht_brw #rcm>a>* { pointer-events:none; }
html#ht_brw #rcm>.sep { margin:4px; border-color:#333; }
html:root #hkhelp { box-sizing:border-box; padding:.5rem; color:#e4e4e4; background:#0a0a0a; }
html:root #hkhelp table { margin:.5rem; font-size:.875rem; }
html:root #hkhelp tr+tr th { border-top-width:.6em; }
html:root #hkhelp b { text-shadow:none; }
html:root #toast, html:root #tt, html:root #tth { color:#e4e4e4; background:#111; border-color:#808080; text-shadow:none; }
html:root #toast.inf, html:root #toast.ok, html:root #toast.warn, html:root #toast.err { color:#fff; background:#111; border-color:#aaa; }
html:root #toast.warn, html:root #toast.err { border-style:double; }
html:root #toast #toastc, html:root #toast #toastt { background:#ccc; color:#000; }
html:root #tt em { color:#fff; }
html:root #tt.show, html:root #tt.show.b { padding:.6rem .75rem; border-width:1px; border-radius:3px; box-shadow:none; font-size:.875rem; }
html:root #toast { padding:.6rem .75rem; border-width:1px 0; border-radius:3px; box-shadow:none; font-size:.875rem; }
html:root #toast.vis { right:.75rem; }
html#ht_brw #bbox-overlay button { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:.35em; min-width:36px; min-height:36px; padding:5px; margin:0; font-size:var(--itx-control-font); line-height:1; color:#fff; background:rgba(10,10,10,.9); border:1px solid #666; border-radius:3px; }
/* Native gallery selection writes inline pink fills and shadows. */
html#ht_brw #bbox-overlay button { box-shadow:none !important; text-shadow:none !important; }
html#ht_brw #bbox-overlay button[aria-pressed=true] { background:var(--btn-1-bg) !important; color:var(--btn-1-fg) !important; border-color:#777; }
html#ht_brw #bbox-overlay:has(#bbox-tsel[aria-pressed=true]) { background:rgba(20,20,20,.95) !important; }
html#ht_brw #bbox-btns { box-sizing:border-box; display:flex; align-items:center; gap:4px; max-width:calc(100% - 12px); overflow-x:auto; padding:3px; background:#0a0a0a; }
html#ht_brw #bbox-btns #bbox-close { order:-1; }
html#ht_brw #bbox-halp { max-width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem); overflow:auto; font-size:.875rem; }
html:root .mdo { max-width:65rem; }
html:root .mdo h1, html:root .mdo h2, html:root .mdo h3 { color:#fff; background:none; border:0; border-bottom:1px solid #444; padding:0 0 .25em; margin:1.5em 0 .5em; text-align:left; border-radius:0; font-weight:400; }
html:root .mdo a { color:inherit; background:none; border:0; padding:0; margin:0; }
html:root .mdo a[href] { color:var(--itx-link); text-decoration:underline; }
html:root .mdo pre, html:root .mdo code, html:root #modalc code, html:root #tt code, pre, code { color:#e4e4e4; background:#111; border-color:#444; }
html:root .mdo pre code:hover { color:#e4e4e4; background:#111; }
html:root .mdo blockquote { color:#ccc; background:#0a0a0a; border:0; border-left:2px solid #808080; padding:.5em 1em; }
html:root .mdo strong { color:#fff; }
html:root .mdo p>em, html:root .mdo li>em, html:root .mdo td>em { color:#e4e4e4; border:0; }
html:root .mdo th, html:root .mdo td { border-color:#555; }
html#ht_brw .ghead {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px; box-sizing:border-box;
  max-width:100%; margin:0 0 .75rem; padding:.35rem; top:0; line-height:1.4;
  background:#0a0a0a; border:0; border-bottom:1px solid #444; border-radius:0; box-shadow:none;
}
html#ht_brw .ghead>span { min-width:0; padding:0 .25em; white-space:normal; overflow-wrap:anywhere; }
html#ht_brw #doc { box-sizing:border-box; max-width:100%; margin:0 0 .5rem; overflow-x:auto; background:#000; border-radius:0; box-shadow:none; }
html#ht_brw #doc .line-highlight { background:#161616; border-radius:0; box-shadow:none; }
html:root .logue.raw { white-space:pre-wrap; overflow-wrap:anywhere; }
html:root .mdo img { max-width:100%; height:auto; }
/* Splash-only: never the old cross-page html.z a reset. */
html:not(#ht_brw) #wrap { max-width:60rem; margin:2rem auto; padding:0 1rem 1rem; }
html:not(#ht_brw) h1 { color:#fff; border-bottom:1px solid #555; }
html:not(#ht_brw) .btns a, html:not(#ht_brw) .agr a, html:not(#ht_brw) #lo { display:inline-flex; align-items:center; min-height:44px; margin:.25em; padding:.4em .7em; color:#e4e4e4; background:#111; border:1px solid #555; text-decoration:none; }
html:not(#ht_brw) pre { white-space:pre-wrap; overflow-wrap:anywhere; }
@media (pointer:coarse), (max-width:600px) {
  html:root { --itx-target:44px; }
}
@media (min-width:700px) {
  html:root { --itx-player-height:60px; }
  html#ht_brw #widget #barpos, html#ht_brw #widget #barbuf { top:8px; bottom:auto; left:160px; width:calc(100% - 328px); }
}
@media (max-width:600px) {
  html:root { font-size:14px; --itx-gutter:.5rem; --itx-target:36px; --itx-strip-height:46px; --itx-player-height:88px; }
  html#ht_brw svg.ti, html#ht_brw #ops a svg.ti { width:18px; height:18px; }
  /* Keep text entry at 16px: smaller inputs trigger Safari's automatic zoom. */
  html:root :is(input[type=text],input[type=password],input[type=search],input[type=number],input[type=email],input[type=url],textarea,select) { font-size:16px; }
  html#ht_brw #treeh a, html#ht_brw #tree ul a { min-height:36px; }
  html#ht_brw #tree ul a { padding:.35em .3em; }
  html#ht_brw .ntree a:first-child { min-width:36px; }
  /* Cap oversized saved zoom to fit two phone columns; smaller zoom still works. */
  html#ht_brw #ggrid { margin:0; gap:8px; grid-template-columns:repeat(auto-fit,minmax(min(var(--grid-sz),calc((100vw - 2rem) / 2)),1fr)); }
  html#ht_brw #ggrid>a { width:auto; margin:0; }
  html#ht_brw #ggrid>a img { max-width:100%; max-height:calc((100vw - 2rem) / 2.5); }
  html#ht_brw #ggrid.nocrop>a img { max-height:none; }
  html#ht_brw #widget #pctl { top:6px; left:6px; }
  html#ht_brw #widget #pctl a { width:36px; height:36px; }
  html#ht_brw #widget #pvol { top:6px; right:6px; height:36px; max-width:120px; }
  html#ht_brw #widget #barpos, html#ht_brw #widget #barbuf { bottom:calc(6px + env(safe-area-inset-bottom)); left:6px; width:calc(100% - 12px); height:28px; }
  html#ht_brw:has(#widget.cmp) { --itx-player-height:48px; }
  html#ht_brw #widget.cmp #pvol { width:76px; }
  html#ht_brw #widget.cmp #barpos, html#ht_brw #widget.cmp #barbuf { top:6px; left:128px; width:calc(100% - 216px); }
  html:root #modalc { max-width:calc(100vw - 1rem); margin:.5rem; padding:.65rem; }
  html:root #modalc table { max-width:100%; }
  html#ht_brw #rui #rn_f:not(.m) tr { display:flex; }
  html#ht_brw #rui #rn_f:not(.m) td:first-child { flex:0 0 3rem; }
  html#ht_brw #rui #rn_f:not(.m) td+td { flex:1; min-width:0; }
  html#ht_brw #shui td.exs { line-height:1.6; }
  html#ht_brw #shui td.exs input[type=text] { width:4.5rem; line-height:1.25; margin:.15em .1em .15em 0; }
  html:root #toast { max-width:calc(100vw - 3rem); margin-left:0; }
  html#ht_brw #ops { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; margin-top:5.25rem; white-space:nowrap; }
  html#ht_brw #srv_info { max-width:calc(100% - 1.5rem); }
  html#ht_brw #acc_info { top:2rem; left:var(--itx-gutter); right:var(--itx-gutter); max-width:none; justify-content:space-between; }
  /* Native tree resize writes an inline left margin. On phones the tree is a
     temporary overlay instead of leaving a 50px-wide file-table viewport. */
  html#ht_brw #wrap { margin-left:var(--itx-gutter) !important; margin-right:var(--itx-gutter); }
  html#ht_brw #tree { z-index:2; max-width:calc(100vw - 1rem); border-right:1px solid #555; }
  html#ht_brw #treepar { max-width:calc(100vw - 1rem - var(--sbw)); }
  html#ht_brw #treeh a { font-size:.8125rem; }
  html#ht_brw #srch_form table, html#ht_brw #srch_form tbody { display:block; width:100%; }
  html#ht_brw #srch_form tr { display:flex; flex-wrap:wrap; }
  html#ht_brw #srch_form td { display:block; box-sizing:border-box; min-width:0; }
  html#ht_brw #srch_form td:first-child { width:100%; padding-bottom:0; text-align:left; }
  html#ht_brw #srch_form td:first-child>br { display:none; }
  html#ht_brw #srch_form td+td { flex:1 1 9rem; }
  html#ht_brw #srch_form input[type=text] { width:100% !important; }
  html#ht_brw #tq_raw td+td { flex-basis:100%; }
  html#ht_brw #files td:nth-child(2), html#ht_brw #files th[name=href] { min-width:calc(100vw - 8rem); max-width:calc(100vw - 8rem); }
  html#ht_brw .opwide>div { display:block; margin-right:0; }
  html#ht_brw .ghead { flex-wrap:nowrap; overflow-x:auto; }
  html#ht_brw .ghead>* { flex:none; }
  html#ht_brw .ghead>span { white-space:nowrap; }
  html#ht_brw #srv_info { left:var(--itx-gutter); }
  html#ht_brw #hkhelp table { float:none; margin:1rem .5rem; }
}
@media (prefers-reduced-motion:reduce) {
  html#ht_brw #widget.anim, html:root #toast, html:root #tt { transition:none; }
}
