/* 三条粥解析器 — single component system; no legacy sidebar stylesheet. */
:root{
  --ui-0:#070b10;
  --ui-1:#0d141d;
  --ui-2:#121c27;
  --ui-3:#192635;
  --ui-line:rgba(164,196,220,.16);
  --ui-line-strong:rgba(164,196,220,.28);
  --ui-text:#edf5fb;
  --ui-muted:#8fa4b4;
  --ui-faint:#607483;
  --ui-accent:#2fc6f4;
  --ui-accent-strong:#13a9df;
  --ui-accent-soft:rgba(47,198,244,.13);
  --ui-good:#4ee5a1;
  --ui-warn:#ffd166;
  --ui-danger:#ff5f73;
  --ui-radius:14px;
  --ui-radius-sm:10px;
  --ui-control-h:42px;
  --ui-gap:10px;
  --ui-panel-shadow:0 18px 48px rgba(0,0,0,.42),0 1px 0 rgba(255,255,255,.04) inset;
  --tools-w:430px;
  --roster-w:344px;
  --txt:var(--ui-text);--txt-2:var(--ui-muted);--txt-3:var(--ui-faint);
  --hair:var(--ui-line);--hair-2:var(--ui-line-strong);--accent:var(--ui-accent);
}

body.panels-light{
  --txt:var(--ui-text);--txt-2:var(--ui-muted);--txt-3:var(--ui-faint);
  --hair:var(--ui-line);--hair-2:var(--ui-line-strong);--accent:var(--ui-accent);
  --ui-0:#e8f0f4;
  --ui-1:#f6fafc;
  --ui-2:#eaf2f6;
  --ui-3:#dce9ef;
  --ui-line:rgba(45,83,105,.18);
  --ui-line-strong:rgba(45,83,105,.32);
  --ui-text:#173142;
  --ui-muted:#587182;
  --ui-faint:#78909d;
  --ui-accent:#078fbe;
  --ui-accent-strong:#006f9a;
  --ui-accent-soft:rgba(7,143,190,.12);
  --ui-good:#138b63;
  --ui-warn:#bb7500;
  --ui-danger:#cf3450;
  --ui-panel-shadow:0 18px 48px rgba(23,49,66,.18),0 1px 0 rgba(255,255,255,.9) inset;
}

html,body{
  color:var(--ui-text);
  background:var(--ui-0);
  font-family:"Microsoft YaHei UI","PingFang SC","HarmonyOS Sans SC",Inter,system-ui,sans-serif;
}
button,input{font:inherit}
button{outline:none}
button:focus-visible,input:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.glass{
  background:color-mix(in srgb,var(--ui-1) 91%,transparent)!important;
  border:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius)!important;
  box-shadow:var(--ui-panel-shadow)!important;
  backdrop-filter:blur(20px) saturate(1.3)!important;
  -webkit-backdrop-filter:blur(20px) saturate(1.3)!important;
}

/* Top command bar */
#commandbar{
  position:fixed;
  z-index:920;
  top:12px;
  left:12px;
  right:12px;
  height:56px;
  display:grid;
  grid-template-columns:auto minmax(330px,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:6px 8px 6px 10px;
  box-sizing:border-box;
}
.command-brand{display:flex;align-items:center;gap:10px;min-width:220px;height:44px}
.command-logo,.dock-brand-mark{
  display:grid;place-items:center;flex:0 0 auto;
  width:34px;height:34px;border-radius:10px;
  color:#03141b;background:linear-gradient(145deg,#68dcff,#20b9e8 64%,#0c91c2);
  box-shadow:0 8px 22px rgba(26,176,222,.26);
  font:900 16px/1 system-ui;
}
.command-copy,.dock-brand-copy,.intel-title{display:flex;min-width:0;flex-direction:column;gap:2px}
.command-copy b,.dock-brand-copy b,.intel-title b{font-size:13px;line-height:1.2;letter-spacing:.2px}
.command-copy small,.dock-brand-copy .sub,.intel-title small{display:flex;align-items:center;gap:5px;color:var(--ui-muted);font-size:10px;line-height:1.2}
.command-copy small i{width:6px;height:6px;border-radius:50%;background:var(--ui-good);box-shadow:0 0 8px color-mix(in srgb,var(--ui-good) 70%,transparent)}

#island{
  position:static!important;
  transform:none!important;
  justify-self:center;
  min-width:0!important;
  width:auto!important;
  max-width:100%;
  cursor:default!important;
  overflow:visible!important;
  border:0!important;
  border-radius:10px!important;
  background:var(--ui-2)!important;
  box-shadow:none!important;
}
#isl-main{height:38px!important;padding:0 10px!important;gap:5px!important;box-sizing:border-box!important}
#island .compact-extra{display:inline-flex!important}
#isl-dot{width:6px!important;height:6px!important;margin-right:3px}
.isl-stat{height:28px;padding:0 9px;border-right:1px solid var(--ui-line);gap:5px!important;align-items:center!important}
.isl-stat i,#isl-near i{font-size:9px!important;color:var(--ui-muted)!important;font-style:normal;text-transform:uppercase;letter-spacing:.5px}
.isl-stat b{font-size:13px!important;color:var(--ui-text)!important}
#isl-sep{display:none!important}
#isl-near{display:flex!important;height:28px;align-items:center;gap:6px;padding:0 8px;font-size:11px!important;color:var(--ui-muted)!important}
#isl-near b{font-size:13px;color:var(--ui-danger)!important}
#isl-ext,#isl-foot{display:none!important}

#viewswitch{position:static!important;inset:auto!important;transform:none!important;border:0!important;background:none!important;box-shadow:none!important}
.vs-seg{
  display:grid!important;
  grid-auto-flow:column;
  grid-auto-columns:minmax(0,1fr);
  gap:3px!important;
  min-height:34px;
  padding:3px!important;
  border:1px solid var(--ui-line)!important;
  border-radius:10px!important;
  background:var(--ui-0)!important;
  box-sizing:border-box;
}
.vs-seg button,.vs-seg .vs{
  min-height:28px!important;
  padding:0 10px!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--ui-muted)!important;
  font-size:11px!important;
  font-weight:650!important;
  white-space:nowrap;
  box-shadow:none!important;
}
.vs-seg button:hover{color:var(--ui-text)!important;background:var(--ui-2)!important}
.vs-seg button.on{color:#05151c!important;background:var(--ui-accent)!important;box-shadow:0 4px 12px color-mix(in srgb,var(--ui-accent) 25%,transparent)!important}
body.panels-light .vs-seg button.on{color:#fff!important}

.command-actions{display:flex;align-items:center;gap:4px}
.command-actions button,.icon-btn{
  display:grid;place-items:center;
  width:36px;height:36px;padding:0;
  border:1px solid transparent;border-radius:9px;
  color:var(--ui-muted);background:transparent;
  cursor:pointer;
}
.command-actions button:hover,.command-actions button.on,.icon-btn:hover{color:var(--ui-accent);background:var(--ui-accent-soft);border-color:var(--ui-line)}
.command-actions svg,.icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* Main panels */
#dock,#roster{
  top:80px!important;
  bottom:14px!important;
  height:auto!important;
  border-radius:var(--ui-radius)!important;
  overflow:hidden!important;
}
#dock{left:14px!important;width:var(--tools-w)!important;display:flex!important;flex-direction:column!important}
#roster{right:14px!important;width:var(--roster-w)!important;display:flex!important;flex-direction:column!important}
#dock.hide{transform:translateX(calc(-100% - 28px))!important;opacity:0!important;pointer-events:none!important}
#roster.hide{transform:translateX(calc(100% + 28px))!important;opacity:0!important;pointer-events:none!important}
.pan-head{
  flex:0 0 58px!important;
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 12px!important;
  border-bottom:1px solid var(--ui-line)!important;
  background:transparent!important;
}
.pan-title{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;flex:1!important;font-size:13px!important}
#btn-dock-close,#btn-roster-close{margin-left:auto!important}

.dock-layout{display:grid;grid-template-columns:78px minmax(0,1fr);min-height:0;flex:1;overflow:hidden}
.dock-tabs{
  width:auto;min-width:0;box-sizing:border-box;
  display:flex;flex-direction:column;gap:5px;
  padding:10px 8px;
  border-right:1px solid var(--ui-line);
  background:color-mix(in srgb,var(--ui-0) 64%,transparent);
  overflow:auto;
}
.dock-tabs button{
  display:flex;min-height:56px;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  padding:6px 3px;border:1px solid transparent;border-radius:10px;
  color:var(--ui-muted);background:transparent;cursor:pointer;
  font-size:10px;font-weight:650;
}
.dock-tabs button:hover{color:var(--ui-text);background:var(--ui-2)}
.dock-tabs button.on{color:var(--ui-accent);border-color:color-mix(in srgb,var(--ui-accent) 28%,transparent);background:var(--ui-accent-soft)}
.dock-tab-icon{display:grid;place-items:center;width:25px;height:25px}
.dock-tab-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.dock-content{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ui-line-strong) transparent}
.dock-page{padding:14px;min-height:100%;box-sizing:border-box}
.dock-page[hidden]{display:none!important}
.dock-page-head{margin:0 0 14px;padding:2px 2px 12px;border-bottom:1px solid var(--ui-line)}
.dock-page-head>span{display:block;margin-bottom:4px;color:var(--ui-accent);font-size:9px;font-weight:800;letter-spacing:1.3px}
.dock-page-head h2{margin:0;color:var(--ui-text);font-size:19px;line-height:1.25;letter-spacing:-.3px}
.dock-page-head p{margin:5px 0 0;color:var(--ui-muted);font-size:11px;line-height:1.55}

.ui-module{margin:0 0 12px;padding:10px;border:1px solid var(--ui-line);border-radius:12px;background:color-mix(in srgb,var(--ui-2) 78%,transparent)}
.ui-module-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;padding:0 2px}
.ui-module-head h3{margin:0;color:var(--ui-muted);font-size:10px;font-weight:750;letter-spacing:.6px}
.ui-module-head span{color:var(--ui-faint);font:700 9px/1 ui-monospace,"Cascadia Mono",monospace}
.ui-control-stack{display:flex;flex-direction:column;gap:7px}
.ui-control-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}

.ui-control.row,.ui-control.sld,.ui-control.pick{
  min-width:0!important;
  min-height:var(--ui-control-h)!important;
  margin:0!important;
  border:1px solid var(--ui-line)!important;
  border-radius:var(--ui-radius-sm)!important;
  background:var(--ui-1)!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
.ui-control.row{display:flex!important;align-items:center!important;gap:10px!important;height:60px!important;min-height:60px!important;padding:8px 10px!important;overflow:hidden!important}
.ui-control.row:hover{border-color:var(--ui-line-strong)!important;background:var(--ui-2)!important}
.ui-control-grid .ui-control.row{height:60px!important;min-height:60px!important}
.row-col{min-width:0!important;flex:1!important}
.row-t{color:var(--ui-text)!important;font-size:11.5px!important;font-weight:650!important;line-height:1.3!important}
.row-s{display:-webkit-box!important;margin-top:2px!important;overflow:hidden!important;color:var(--ui-muted)!important;font-size:9.5px!important;line-height:1.3!important;white-space:normal!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important}
.row-btn{width:100%!important;text-align:left!important;cursor:pointer!important}
.row-go{display:grid!important;place-items:center!important;width:25px!important;height:25px!important;border-radius:7px!important;color:var(--ui-accent)!important;background:var(--ui-accent-soft)!important}

.sw{
  position:relative!important;display:block!important;flex:0 0 auto!important;
  width:38px!important;height:22px!important;padding:0!important;
  border:1px solid var(--ui-line-strong)!important;border-radius:999px!important;
  background:var(--ui-3)!important;box-shadow:none!important;cursor:pointer!important;
}
.sw::after{content:""!important;position:absolute!important;left:3px!important;top:3px!important;width:14px!important;height:14px!important;border-radius:50%!important;background:var(--ui-muted)!important;transform:none!important;transition:transform .18s ease,background .18s ease!important}
.sw.on{border-color:color-mix(in srgb,var(--ui-accent) 65%,transparent)!important;background:var(--ui-accent-soft)!important}
.sw.on::after{transform:translateX(16px)!important;background:var(--ui-accent)!important}

.ui-control.sld{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:9px!important;
  padding:9px 10px!important;
}
.ui-control.sld>span:first-child{min-width:0;color:var(--ui-text)!important;font-size:10.5px!important;line-height:1.35!important;white-space:normal!important}
.ui-control.sld>.v{grid-column:2;grid-row:1;justify-self:end;min-width:38px;color:var(--ui-accent)!important;font:700 11px/1 ui-monospace,"Cascadia Mono",monospace!important;text-align:right}
.ui-control.sld>input[type="range"]{grid-column:1/-1;grid-row:2;min-width:0;width:100%}
input[type="range"]{
  width:100%;height:20px;margin:0;appearance:none;-webkit-appearance:none;background:transparent;cursor:pointer;
}
input[type="range"]::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:linear-gradient(90deg,var(--ui-accent),var(--ui-accent)) 0/var(--range-fill,0%) 100% no-repeat,#ffffffd9}
input[type="range"]::-webkit-slider-thumb{width:14px;height:14px;margin-top:-5px;border:2px solid var(--ui-1);border-radius:50%;appearance:none;-webkit-appearance:none;background:var(--ui-accent);box-shadow:0 1px 6px rgba(0,0,0,.32)}
input[type="range"]::-moz-range-track{height:4px;border-radius:999px;background:#ffffffd9}
input[type="range"]::-moz-range-progress{height:4px;border-radius:999px;background:var(--ui-accent)}
input[type="range"]::-moz-range-thumb{width:12px;height:12px;border:2px solid var(--ui-1);border-radius:50%;background:var(--ui-accent)}

.ui-control.sld:has(.vs-seg){grid-template-columns:minmax(0,1fr)!important}
.ui-control.sld:has(.vs-seg)>.vs-seg{grid-column:1 / -1;grid-row:2;width:100%;grid-auto-flow:unset;grid-template-columns:repeat(2,minmax(0,1fr))}
.ui-control.pick{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;padding:6px!important}
.ui-control.pick button{
  min-height:32px;padding:0 8px;border:1px solid var(--ui-line);border-radius:8px;
  color:var(--ui-muted);background:var(--ui-2);font-size:10px;font-weight:650;cursor:pointer;
}
.ui-control.pick button:first-child{grid-column:1 / -1}
.ui-control.pick button:hover{color:var(--ui-text);border-color:var(--ui-line-strong)}
.ui-control.pick button.on{color:#06151c;background:var(--ui-accent);border-color:var(--ui-accent)}
body.panels-light .ui-control.pick button.on{color:#fff}
.color-swatch{min-width:86px!important;height:32px!important;border-color:var(--ui-line)!important;background:var(--ui-2)!important}

#dock #gateway-diagnostics{
  position:static!important;left:auto!important;right:auto!important;bottom:auto!important;top:auto!important;
  flex:0 0 auto!important;max-width:none!important;margin:0!important;padding:7px 12px!important;
  border:0!important;border-top:1px solid var(--ui-line)!important;border-radius:0!important;
  color:var(--ui-muted)!important;background:var(--ui-0)!important;box-shadow:none!important;font-size:10px!important;
}

/* Intelligence drawer */
#roster .pan-head{padding-left:14px!important}
.intel-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;flex:0 0 auto;padding:8px 10px;border-bottom:1px solid var(--ui-line);background:var(--ui-0)}
.intel-tabs button{height:34px;border:1px solid transparent;border-radius:9px;color:var(--ui-muted);background:transparent;font-size:11px;font-weight:700;cursor:pointer}
.intel-tabs button i{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;padding:0 4px;border-radius:999px;color:inherit;background:var(--ui-2);font:700 9px/1 ui-monospace,monospace}
.intel-tabs button:hover{color:var(--ui-text);background:var(--ui-2)}
.intel-tabs button.on{color:var(--ui-accent);border-color:color-mix(in srgb,var(--ui-accent) 28%,transparent);background:var(--ui-accent-soft)}
.pan-split{display:block!important;min-height:0!important;flex:1!important;overflow:hidden!important}
.pan-sec{display:none!important;height:100%!important;min-height:0!important;grid-template-rows:auto minmax(0,1fr)!important;border:0!important}
.pan-sec.active{display:grid!important}
.sec-head{min-height:42px!important;padding:0 10px!important;border-bottom:1px solid var(--ui-line)!important;background:var(--ui-1)!important}
.sec-t{font-size:10px!important;color:var(--ui-muted)!important}
.sortbar{gap:4px!important}
.mini-tab,.sortbar button{height:27px!important;padding:0 8px!important;border:1px solid transparent!important;border-radius:7px!important;color:var(--ui-muted)!important;background:transparent!important;font-size:9px!important}
.mini-tab.on,.sortbar button.on{color:var(--ui-accent)!important;border-color:var(--ui-line)!important;background:var(--ui-accent-soft)!important}
.pan-body{min-height:0!important;padding:8px!important;overflow-y:auto!important;background:transparent!important}
.op,.loot-row{margin-bottom:6px!important;border:1px solid var(--ui-line)!important;border-radius:10px!important;background:var(--ui-1)!important;box-shadow:none!important}
.op:hover,.loot-row:hover{border-color:var(--ui-line-strong)!important;background:var(--ui-2)!important}

#dock-handle,#roster-handle{
  display:grid!important;place-items:center!important;position:fixed!important;z-index:910!important;
  top:50%!important;width:30px!important;height:56px!important;padding:0!important;
  border:1px solid var(--ui-line)!important;border-radius:10px!important;
  color:var(--ui-muted)!important;background:var(--ui-1)!important;box-shadow:var(--ui-panel-shadow)!important;
}
#dock-handle{left:8px!important;transform:translateY(-50%)!important}
#roster-handle{left:auto!important;right:8px!important;transform:translateY(-50%)!important}
#dock:not(.hide)+#dock-handle{left:calc(var(--tools-w) + 18px)!important}
#roster:not(.hide)+#roster-handle{right:calc(var(--roster-w) + 18px)!important}
#dock-handle svg,#roster-handle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}

/* 3D HUD controls and sharper labels */
#info3d{
  display:none;position:fixed;z-index:880;left:50%;bottom:16px;transform:translateX(-50%);
  width:min(580px,calc(100vw - 40px));min-height:58px;padding:8px 10px;box-sizing:border-box;
  grid-template-columns:auto minmax(0,1fr) 140px;align-items:center;gap:10px;
}
body.mode3d #info3d{display:grid}
.info3d-head{display:flex;align-items:center;gap:8px;padding-right:10px;border-right:1px solid var(--ui-line)}
.info3d-head>span{display:flex;flex-direction:column;gap:2px;white-space:nowrap}
.info3d-head b{font-size:11px}.info3d-head small{color:var(--ui-muted);font-size:8px;letter-spacing:1px}
.info3d-head output{color:var(--ui-accent);font-size:10px;font-weight:750}
.info3d-toggles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.info3d-toggles button{height:32px;padding:0 6px;border:1px solid var(--ui-line);border-radius:8px;color:var(--ui-muted);background:var(--ui-2);font-size:10px;font-weight:650;cursor:pointer}
.info3d-toggles button:hover{color:var(--ui-text);border-color:var(--ui-line-strong)}
.info3d-toggles button.on{color:#06151c;border-color:var(--ui-accent);background:var(--ui-accent)}
body.panels-light .info3d-toggles button.on{color:#fff}
.info3d-scale{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;color:var(--ui-muted);font-size:9px}
#camseg{top:80px!important;bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;padding:4px!important;border-radius:11px!important}
#camseg button{min-height:28px!important;padding:0 10px!important;border-radius:7px!important;font-size:10px!important}

.r3-native-label{
  --label-scale:1;
  position:absolute!important;left:0;top:0;z-index:30;display:none;
  min-width:72px;padding:4px 7px 5px;border:1px solid rgba(174,219,241,.3);border-radius:7px;
  color:#f7fbff;background:rgba(4,10,16,.78);box-shadow:0 3px 12px rgba(0,0,0,.48);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  transform-origin:50% 100%;will-change:transform;contain:layout paint;
  font-family:"Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;
  font-synthesis:none;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision;
  white-space:nowrap;pointer-events:none;
}
.r3-native-label .main{display:flex;align-items:center;justify-content:center;gap:6px;min-height:16px;font-size:calc(12px * var(--label-scale));font-weight:750;line-height:1.25;letter-spacing:.05px}
.r3-native-label .name{max-width:190px;overflow:hidden;text-overflow:ellipsis}
.r3-native-label .distance{padding-left:6px;border-left:1px solid rgba(255,255,255,.22);color:#fff;font:750 calc(10px * var(--label-scale))/1.2 "Cascadia Mono",ui-monospace,monospace}
.r3-native-label .detail{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:3px;padding-top:3px;border-top:1px solid rgba(255,255,255,.14);color:#dfeaf1;font-size:calc(9.5px * var(--label-scale));font-weight:650;line-height:1.2}
.r3-native-label .detail:empty{display:none}
.r3-native-label .hp{color:#6cf0ac!important}.r3-native-label .gear{font-weight:780}.r3-native-label.dim{opacity:.66;filter:saturate(.7)}
.r3-native-label,.r3-native-label *{text-shadow:0 1px 2px #000!important}

/* Sheets and auxiliary controls */
.sheet{top:80px!important;left:50%!important;transform:translateX(-50%) scale(.98)!important;width:min(680px,calc(100vw - 40px))!important;max-height:calc(100vh - 100px)!important;border-radius:var(--ui-radius)!important}
.sheet.on{transform:translateX(-50%) scale(1)!important}
.sheet:not(.on){opacity:0!important;pointer-events:none!important;visibility:hidden!important}
.sheet.on{opacity:1!important;pointer-events:auto!important;visibility:visible!important;bottom:auto!important}
.maps{gap:9px!important;padding:10px!important}
.mcard{border-radius:11px!important;border-color:var(--ui-line)!important;background:var(--ui-1)!important}
#quick{display:none!important}
#playbar{bottom:86px!important;border-radius:12px!important}
#toast{bottom:88px!important}

body.panels-light #commandbar,body.panels-light #dock,body.panels-light #roster,body.panels-light #info3d,body.panels-light .sheet{
  color:var(--ui-text)!important;background:color-mix(in srgb,var(--ui-1) 94%,transparent)!important;
}
body.panels-light .row-t,body.panels-light .dock-page-head h2,body.panels-light .command-copy b{color:var(--ui-text)!important}
body.panels-light .row-s,body.panels-light .dock-page-head p{color:var(--ui-muted)!important}

@media(max-width:1280px){
  :root{--tools-w:360px;--roster-w:316px}
  #commandbar{grid-template-columns:auto minmax(300px,1fr) auto auto}
  .command-brand{min-width:180px}
  .command-copy small{display:none}
  .ui-control-grid{grid-template-columns:1fr}
}

@media(max-width:820px){
  #commandbar{left:8px;right:8px;top:8px;grid-template-columns:auto minmax(0,1fr) auto;height:52px}
  .command-brand{min-width:auto}.command-copy{display:none}
  #island{position:fixed!important;left:50%!important;top:66px!important;transform:translateX(-50%)!important;z-index:919;width:max-content!important}
  #viewswitch{justify-self:center}.command-actions{justify-self:end}
  #top-intel,#top-settings{display:none}
  #dock,#roster{top:auto!important;left:8px!important;right:8px!important;bottom:68px!important;width:auto!important;max-height:72vh!important;border-radius:16px!important}
  #dock.hide{transform:translateY(calc(100% + 90px))!important}
  #roster.hide{transform:translateY(calc(100% + 90px))!important}
  #dock-handle,#roster-handle{display:none!important}
  #quick{display:grid!important;left:8px!important;right:8px!important;bottom:8px!important;height:52px!important;border-radius:13px!important}
  .dock-layout{grid-template-columns:64px minmax(0,1fr)}
  .dock-tabs{padding:8px 6px}.dock-tabs button{min-height:50px;font-size:9px}
  .dock-page{padding:10px}
  #info3d{bottom:68px;width:calc(100vw - 16px);grid-template-columns:auto 1fr}
  .info3d-scale{grid-column:1 / -1}
  #camseg{top:120px!important}
}

@media(max-width:560px){
  #island .compact-extra{display:none!important}
  #isl-main{padding:0 7px!important}.isl-stat{padding:0 6px}
  #viewswitch .vs-seg button{padding:0 7px!important}
  #top-map{display:none}
  .info3d-head{display:none}.info3d-toggles{grid-template-columns:repeat(5,1fr);grid-column:1 / -1}
  .ui-control.sld{grid-template-columns:minmax(0,1fr) auto!important}
  .maps{grid-template-columns:1fr 1fr!important}
}

/* 1.4.1 compact radar layout ------------------------------------------------ */
#commandbar{
  top:8px!important;left:8px!important;right:8px!important;height:46px!important;
  display:flex!important;justify-content:flex-end!important;gap:8px!important;padding:0!important;
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;pointer-events:none!important;
}
#commandbar>*{pointer-events:auto}
#island{
  position:absolute!important;left:50%!important;top:0!important;transform:translateX(-50%)!important;
  width:auto!important;background:color-mix(in srgb,var(--ui-1) 88%,transparent)!important;
  border:1px solid var(--ui-line)!important;box-shadow:0 8px 24px rgba(0,0,0,.2)!important;
}
#isl-main{height:40px!important;padding:0 5px!important}
#isl-dot{margin-left:5px!important}
.isl-stat{padding:0 10px!important}.isl-stat:last-of-type{border-right:0!important}
#viewswitch{margin-left:auto!important}
.command-actions{margin-right:0!important}
body.panels-light #commandbar{background:transparent!important;border:0!important;box-shadow:none!important}

#dock,#roster{top:64px!important;bottom:12px!important}
#roster{width:320px!important}
#roster .pan-split{display:block!important}
#roster .pan-sec.ops{display:grid!important;height:100%!important}
#roster .pan-sec.loot,.intel-tabs{display:none!important}

#loot-drawer{
  position:fixed;z-index:605;left:14px;top:64px;width:300px;
  height:min(520px,calc(100vh - 82px));display:flex;flex-direction:column;overflow:hidden;
  transition:transform .32s var(--spring),opacity .22s var(--ease);
}
#loot-drawer.hide{transform:translateX(calc(-100% - 28px));opacity:0;pointer-events:none}
#loot-drawer .pan-head{flex:0 0 54px!important;min-height:54px!important}
.loot-drawer-title{display:flex;flex-direction:column;gap:2px}
.loot-drawer-title b{font-size:13px}.loot-drawer-title small{color:var(--ui-muted);font-size:9px}
#loot-drawer .pan-sec{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;min-height:0;flex:1}
#loot-drawer .sec-head{align-items:center!important;flex-wrap:wrap!important;height:auto!important;min-height:66px!important;padding:7px 9px!important}
#loot-drawer .sortbar{width:100%!important;justify-content:stretch!important}
#loot-drawer .sortbar button{flex:1!important}
#loot-drawer .pan-body{padding:6px!important}

#loot-handle{
  display:grid;place-items:center;position:fixed;z-index:910;left:8px;top:calc(50% + 34px);
  width:30px;height:56px;padding:0;border:1px solid var(--ui-line);border-radius:10px;
  color:var(--ui-muted);background:var(--ui-1);box-shadow:var(--ui-panel-shadow);cursor:pointer;
}
#loot-handle:hover,#loot-handle.on{color:var(--ui-accent);background:var(--ui-accent-soft)}
#loot-handle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#loot-drawer:not(.hide)+#loot-handle{left:324px}
#dock-handle{top:calc(50% - 34px)!important}

#camseg{
  top:64px!important;display:grid!important;grid-template-columns:auto auto!important;align-items:stretch!important;
  gap:3px!important;padding:3px!important;background:color-mix(in srgb,var(--ui-1) 90%,transparent)!important;
}
#camseg .cam-row{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:3px}
#camseg .cam-follow{padding-left:3px;border-left:1px solid var(--ui-line)}
#camseg button{min-width:64px!important}

.r3-native-label.far{
  min-width:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
.r3-native-label.far .main{gap:5px!important}
.r3-native-label.far .distance{border-left:0!important;padding-left:0!important}
.r3-native-label.far,.r3-native-label.far *{
  text-shadow:-1px -1px 0 #071018,1px -1px 0 #071018,-1px 1px 0 #071018,1px 1px 0 #071018,0 1px 4px #000!important;
}

@media(max-width:820px){
  #commandbar{top:6px!important;left:6px!important;right:6px!important}
  #island{top:0!important}
  #dock,#roster,#loot-drawer{top:auto!important;left:8px!important;right:8px!important;bottom:68px!important;width:auto!important;height:auto!important;max-height:72vh!important}
  #loot-drawer.hide{transform:translateY(calc(100% + 90px))!important}
  #loot-handle{left:8px;top:auto;bottom:72px;width:46px;height:36px}
  #loot-drawer:not(.hide)+#loot-handle{left:8px}
  #camseg{top:58px!important}
}

/* Shared spacing, clear typography and compact map overlays. */
#dock *,#loot-drawer *{box-sizing:border-box}
#dock:not(.hide),#roster:not(.hide){transform:none!important;opacity:1!important}
#viewswitch{display:flex!important}
#dock .dock-layout{grid-template-columns:72px minmax(0,1fr)}
#dock .dock-tabs{padding:12px 7px;gap:8px}
#dock .dock-tabs button{min-width:0;min-height:62px;font-size:11px}
#dock .dock-page{padding:20px 18px 24px}
#dock .dock-page-head{padding:0 2px 16px;margin-bottom:18px}
#dock .ui-module{padding:12px;margin-bottom:16px}
#dock .ui-module-head{padding:0 2px;margin-bottom:12px}
#dock .ui-module-head h3{font-size:11px;line-height:1.5}
#dock .ui-control-stack{gap:10px}
#dock .ui-control.row{height:auto!important;min-height:66px!important;padding:12px 14px!important;gap:14px!important}
#dock .row-t{font-size:12px!important;line-height:1.5!important}
#dock .row-s{font-size:10.5px!important;line-height:1.6!important;margin-top:4px!important;-webkit-line-clamp:3!important}
#dock .ui-control.sld{padding:12px 14px!important;gap:10px!important}
#dock .ui-control.sld>span:first-child{font-size:11.5px!important;line-height:1.5!important}
.color-swatch{display:flex;flex:0 0 auto;align-items:center;gap:7px;padding:4px;border-radius:8px;color:var(--ui-accent);font:10px/1 ui-monospace,monospace}
.color-swatch input{width:30px;min-width:30px;height:26px;padding:2px;border:1px solid var(--ui-line-strong);border-radius:6px;background:var(--ui-2);cursor:pointer}
.color-swatch input::-webkit-color-swatch-wrapper{padding:0}
.color-swatch input::-webkit-color-swatch{border:0;border-radius:3px}
.white-model-group{display:none}
body.mapstyle-white .white-model-group{display:block}
#island{border-radius:999px!important}
#isl-main{height:32px!important;padding:0 8px!important;gap:0!important}
.isl-stat{height:22px;padding:0 9px!important}
#isl-dot{display:none!important}
#viewswitch .vs-seg,.command-actions{height:36px;min-height:36px;padding:3px!important;border:1px solid var(--ui-line)!important;border-radius:999px!important;background:var(--ui-1)!important;box-shadow:0 3px 12px #0002}
#viewswitch .vs-seg button{min-height:28px!important;border-radius:999px!important}
.command-actions{gap:3px}
.command-actions button{width:30px;height:28px;border-radius:999px;color:var(--ui-muted)!important;background:transparent!important}
.command-actions button:hover,.command-actions button.on{color:var(--ui-accent)!important;background:var(--ui-accent-soft)!important}
.command-actions svg{width:17px;height:17px}
#camseg{top:auto!important;bottom:calc(var(--sab) + 14px)!important;display:none!important;grid-template-columns:1fr!important;gap:4px!important;padding:5px!important;border-radius:18px!important;width:min(352px,calc(100vw - 32px));}
#camseg.on{display:grid!important}
#camseg .cam-row{gap:4px}
#camseg .cam-follow{padding:0;border:0}
#camseg button{min-width:0!important;min-height:28px!important;border-radius:999px!important;color:var(--ui-muted)!important;background:transparent!important}
#camseg button.on{color:var(--ui-text)!important;background:var(--ui-accent-soft)!important;box-shadow:inset 0 0 0 1px var(--ui-line-strong)!important}
#loot-drawer.glass{width:286px;height:min(420px,calc(100vh - 86px));background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:#f6f9fc!important;text-shadow:0 1px 3px #000,0 0 4px #000}
#loot-drawer .pan-head,#loot-drawer .sec-head,#loot-drawer .pan-sec,#loot-drawer .pan-body,#loot-drawer .loot-row{background:transparent!important;border:0!important;box-shadow:none!important}
#loot-drawer .pan-head{padding:8px 12px!important;min-height:46px!important;flex-basis:46px!important}
#loot-drawer .loot-drawer-title small,#loot-drawer .sec-t,#loot-drawer .loot-m,#loot-drawer .loot-d,#loot-drawer .loot-d small,#loot-drawer .empty{color:#d1dee9!important}
#loot-drawer .sortbar button{color:#e8f4ff!important;text-shadow:0 1px 3px #000}
#loot-drawer .sortbar button.on{color:#74dfff!important;background:#10233055!important}
#loot-drawer .loot-row{margin:0 0 7px!important;padding:9px 10px!important}
#loot-drawer .loot-row:hover,#loot-drawer .loot-row.sel{background:#101e2c55!important}
#loot-drawer .loot-thumb{background:transparent!important;border:0!important}
#loot-drawer .icon-btn{color:#e5f4ff;background:#10233066;border-color:#a4c4dc55}
#loot-drawer:not(.hide)+#loot-handle{left:306px}
.tag:not(.p),.tag.ai{background:transparent!important;border:0!important;box-shadow:none!important;text-shadow:0 1px 3px #000,0 0 3px #000}
.r3-native-label{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;text-shadow:-1px -1px 0 #071018,1px -1px 0 #071018,-1px 1px 0 #071018,1px 1px 0 #071018}
@media(max-width:1280px){:root{--tools-w:410px}}
@media(max-width:900px){
  #dock{width:min(410px,calc(100vw - 48px))!important;max-width:calc(100vw - 48px)!important}
  #dock:not(.hide)+#dock-handle{left:calc(min(410px,100vw - 48px) + 18px)!important}
  #island{left:8px!important;transform:none!important}
}
@media(max-width:820px){
  #dock,#roster{left:8px!important;right:auto!important;top:60px!important;bottom:68px!important;height:auto!important;max-height:none!important}
  #quick{transform:none!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));box-sizing:border-box!important;height:52px!important;padding:4px!important}
  #quick .qk{width:auto;min-width:0;height:42px;color:var(--ui-muted)}
  #quick .qk.on{color:var(--ui-accent);background:var(--ui-accent-soft)}
  #roster{left:auto!important;right:8px!important;width:min(320px,calc(100vw - 48px))!important}
  #dock .dock-layout{grid-template-columns:62px minmax(0,1fr)}
  #dock .dock-page{padding:16px 12px 22px}
  #dock .ui-module{padding:10px}
  #camseg{bottom:calc(var(--sab) + 70px)!important}
  #top-intel,#top-settings,#top-map{display:grid!important}
  #loot-drawer.glass{top:60px!important;bottom:auto!important;right:auto!important;left:8px!important;width:min(286px,calc(100vw - 48px))!important;height:min(420px,calc(100vh - 136px))!important;max-height:none!important}
  #loot-drawer:not(.hide)+#loot-handle{left:8px}
}
@media(max-width:540px){
  #commandbar{height:76px!important;align-items:flex-start!important;padding-top:2px!important}
  #island{left:50%!important;top:42px!important;transform:translateX(-50%)!important}
  #dock,#roster,#loot-drawer.glass{top:90px!important}
  #dock .dock-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  #dock .dock-tabs{flex-direction:row;padding:6px;border-right:0;border-bottom:1px solid var(--ui-line);overflow:hidden}
  #dock .dock-tabs button{flex:1;min-height:46px;gap:2px}
  #dock .dock-tab-icon{width:20px;height:20px}
}
