/* стартовая страница-хаб */
body.hubpage{height:auto;min-height:100%}
.hub{max-width:980px;margin:0 auto;padding:max(16px,env(safe-area-inset-top)) 16px 32px}
.hub-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 22px}
.hub header.hub-top,.hub footer.hub-foot{background:none;border:0;padding-left:0;padding-right:0}
.hub-title{display:flex;align-items:baseline;gap:12px;font-size:24px}
.hub-title .dim{font-size:14px}
.hub-pills{display:flex;gap:8px;flex-wrap:wrap}
.pill{font-size:13px;padding:3px 10px;border:1px solid var(--line);border-radius:999px;background:var(--panel)}
.pill.ok{color:var(--ok);border-color:var(--ok)}
.hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.tile{position:relative;display:flex;flex-direction:column;gap:6px;padding:18px 16px;min-height:132px;text-decoration:none;color:var(--text);
  background:var(--panel);border:1px solid var(--line);border-radius:16px;
  opacity:0;transform:translateY(10px);animation:tile-in .45s ease forwards;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.tile:hover:not(.soon){transform:translateY(-3px);border-color:var(--accent);box-shadow:0 8px 22px rgba(0,0,0,.28)}
.tile:active:not(.soon){transform:translateY(-1px)}
.tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tile .ic{font-size:30px;line-height:1}
.tile .tt{font-weight:600;font-size:17px}
.tile .dd{color:var(--dim);font-size:13px;line-height:1.35}
.tile .st{position:absolute;top:14px;right:14px;width:10px;height:10px;border-radius:50%;background:var(--line)}
.tile .st.ok{background:var(--ok);box-shadow:0 0 8px var(--ok)}
.tile .st.bad{background:var(--bad);box-shadow:0 0 8px var(--bad)}
.tile .ext{position:absolute;bottom:12px;right:14px;color:var(--dim);font-size:13px}
.tile.soon{opacity:.55!important;cursor:default}
.tile .badge{position:absolute;bottom:12px;right:14px;font-size:12px;color:var(--dim);border:1px solid var(--line);border-radius:999px;padding:0 8px}
@keyframes tile-in{to{opacity:1;transform:none}}
.tile.soon{animation-name:tile-in-soon}
@keyframes tile-in-soon{to{opacity:.55;transform:none}}
@media (prefers-reduced-motion:reduce){.tile{animation:none;opacity:1;transform:none}.tile.soon{opacity:.55}}
.hub-foot{margin-top:28px;text-align:center}
.hub-foot a{color:var(--accent)}
@media (max-width:520px){.hub-grid{grid-template-columns:repeat(2,1fr);gap:10px}.tile{min-height:112px;padding:14px 12px}.hub-title{font-size:20px}}
.tile[data-act]{cursor:pointer}
.tile .badge#hubNotesN{position:absolute;top:12px;right:12px;bottom:auto;left:auto;height:20px;min-width:20px;text-align:center;background:var(--accent);color:#fff;border-radius:10px;padding:0 6px;font-size:12px;line-height:20px}
.tile .badge#hubNotesN[hidden]{display:none}

/* виджеты, режим настройки, галерея */
.hub{max-width:1180px}
.hub-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hub-widgets{display:grid;grid-template-columns:repeat(var(--cols,4),minmax(0,1fr));grid-auto-rows:minmax(118px,auto);gap:12px;margin:0 0 22px;position:relative}
.hub-widgets.editing{background:repeating-linear-gradient(90deg,transparent 0,transparent calc(100% / var(--cols,4) - 1px),color-mix(in srgb,var(--line) 70%,transparent) calc(100% / var(--cols,4) - 1px),color-mix(in srgb,var(--line) 70%,transparent) calc(100% / var(--cols,4)));border-radius:10px}
.hw.over{outline:2px solid var(--accent)!important}.hw.dragging{opacity:.45}
.hw-spare{grid-column:1/-1;min-height:56px;border:1px dashed var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;color:var(--dim);font-size:12px}
.hw{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 14px;min-width:0;display:flex;flex-direction:column;gap:6px}
.hw>header{display:flex;align-items:center;gap:8px;margin:0 0 2px;padding:0!important;background:none!important;border:0!important}
.hw>header b{flex:1;font-weight:600;font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hw .wi{font-size:17px;line-height:1}
.hw .big{font-size:24px;font-weight:600;line-height:1.15}.hw .big small{font-size:12px;font-weight:400;color:var(--dim)}
.hw .kv{display:flex;align-items:center;gap:6px;font-size:13px;min-width:0}.hw .kv span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim)}.hw .kv b{font-weight:500;white-space:nowrap}
.hw .line{font-size:12.5px;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hw .err{color:var(--bad);font-size:13px}
.hw .two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.hw .two small{color:var(--dim)}
.hw .chipsw{display:flex;flex-wrap:wrap;gap:6px}.hw .chw{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;border:1px solid var(--line);border-radius:999px;padding:1px 9px;background:var(--panel2)}
.hw i.hd{display:inline-block;width:8px;height:8px;min-width:8px;max-width:8px;border-radius:50%;background:var(--dim);flex:none;font-style:normal;padding:0;margin:0;border:0}
.hw i.hd-ok{background:var(--ok);box-shadow:0 0 6px var(--ok)}.hw i.hd-bad{background:var(--bad);box-shadow:0 0 6px var(--bad)}.hw i.hd-warn{background:var(--warn)}
.hw .bar{height:6px;border-radius:3px;background:var(--panel2);overflow:hidden}.hw .bar i{display:block;height:100%;background:var(--ok)}.hw .bar i.w{background:var(--warn)}.hw .bar i.c{background:var(--bad)}
.hw .spark{width:100%;height:34px}.hw .spark path{fill:none;stroke:var(--accent);stroke-width:1.6;vector-effect:non-scaling-stroke}
.hw .sp-empty{font-size:11px;color:var(--dim);height:34px;display:flex;align-items:center}
.hw button.small{align-self:flex-start;font-size:12px;padding:3px 10px;margin-top:4px}
.editing.hub-widgets .hw,.editing.hub-grid .tile{outline:1px dashed var(--line);outline-offset:3px;cursor:grab}
.hw .ctl,.tile .ctl{display:inline-flex;gap:4px}.tile .ctl{position:absolute;left:10px;bottom:8px;z-index:2}
.hw .ctl button,.tile .ctl button{padding:0 7px;font-size:12px;line-height:20px;border-radius:6px}
.hub-gal{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:12px 14px;margin:0 0 18px}
.hub-gal .gh{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:2px 0 8px}.hub-gal .gh b{font-size:15px}.hub-gal .gh .dim{flex:1;min-width:200px}
.hub-gal .gl{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px;margin-bottom:10px}
.hub-gal .gi{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--panel2)}
.hub-gal .gi>div{flex:1;min-width:0}.hub-gal .ic2{font-size:20px}.hub-gal .gi .dim{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* наведение: иконка ярлыка крупнее */
.tile .ic{display:inline-block;transition:transform .18s ease}
.tile:hover:not(.soon) .ic{transform:scale(1.28) translateY(-1px)}
.tile:hover:not(.soon){transform:translateY(-3px) scale(1.03)}
.editing.hub-grid .tile:hover .ic{transform:none}
@media (prefers-reduced-motion:reduce){.tile .ic{transition:none}.tile:hover:not(.soon) .ic{transform:none}}

/* мгновенная подсказка с никами TeamSpeak (обычный title появляется с задержкой) */
.pill.tsp{position:relative;cursor:default;outline:0}
.pill.tsp:hover::after,.pill.tsp:focus::after{content:attr(data-tip);position:absolute;top:calc(100% + 6px);right:0;z-index:30;min-width:120px;max-width:260px;white-space:pre-line;text-align:left;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);box-shadow:0 6px 20px rgba(0,0,0,.35);font-size:14px;line-height:1.5}

/* v3.91: сетка с размерами, перетаскивание, буфер, SVG-иконки, новые виджеты */
.ico{width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.15em;flex:none}
[data-theme=hacker] .ico{stroke-linecap:square;stroke-linejoin:miter;filter:drop-shadow(0 0 2px rgba(61,255,110,.45))}
.tile .ic{font-size:30px;color:var(--accent);line-height:1}
.hw .wi{color:var(--accent);font-size:17px;display:inline-flex}
.hub-gal .ic2{color:var(--accent);font-size:22px;display:inline-flex}
.hub-widgets{--rowh:132px;grid-template-columns:repeat(var(--cols,4),minmax(0,1fr));grid-auto-rows:var(--rowh)}
.hw{overflow:hidden;-webkit-touch-callout:none;transition:box-shadow .15s ease}
.hw .hb{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:6px}
.hw.small{padding:10px 12px}.hw.small>header b{font-size:13px}.hw.small .big{font-size:21px}
.hw .spark.tall{height:64px}
.hw .two{gap:12px;min-width:0}.hw .two>div{min-width:0;display:flex;flex-direction:column;gap:5px}
.hw small.up{color:var(--ok)}.hw small.dn{color:var(--bad)}
.hw a.btnl{align-self:flex-start;font-size:12px;padding:3px 10px;margin-top:auto;border:1px solid var(--line);border-radius:8px;color:var(--text);text-decoration:none;background:var(--panel2)}
.hw button.small{margin-top:auto}
.hw .wx{display:flex;align-items:center;gap:10px}.hw .wxi{color:var(--accent);display:inline-flex}.hw .wxi .ico{width:36px;height:36px}
.hw .wxd span{display:inline-flex;align-items:center;gap:6px}.hw .wxd .ico{width:15px;height:15px;color:var(--accent)}
.hw .globe{position:relative;flex:1;min-height:0;margin:-2px -4px -4px}
.hw .globe canvas{display:block;position:absolute;inset:0;image-rendering:pixelated}
.hw .globe-cap{position:absolute;left:4px;bottom:2px;font:11px ui-monospace,Consolas,monospace;color:var(--dim);pointer-events:none}
/* режим настройки */
.editing.hub-widgets .hw,.editing.hub-grid .tile,.tray-it,.hub-gal .gi[data-gw]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.editing.hub-widgets .hw{animation:hw-wig .5s ease-in-out infinite alternate}
.editing.hub-widgets .hw:nth-child(2n){animation-delay:-.25s}
@keyframes hw-wig{from{transform:rotate(-.25deg)}to{transform:rotate(.25deg)}}
@media (prefers-reduced-motion:reduce){.editing.hub-widgets .hw{animation:none}}
.hub-gal .gi[data-gw]{cursor:grab}
.hw.dragging,.tile.dragging,.tray-it.dragging,.gi.dragging{opacity:.28}
.hw-ph{border:2px dashed var(--accent);border-radius:14px;background:color-mix(in srgb,var(--accent) 10%,transparent);pointer-events:none}
.tile.tile-ph{border:2px dashed var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent);opacity:1!important;animation:none;transform:none}
.hub-ghost{position:fixed!important;z-index:200;pointer-events:none;margin:0!important;opacity:.93;transform:scale(1.03) rotate(.8deg)!important;box-shadow:0 16px 36px rgba(0,0,0,.5);animation:none!important}
body.hub-dragging,body.hub-dragging *{cursor:grabbing!important;-webkit-user-select:none;user-select:none}
body.hub-editing .hub{padding-bottom:150px}
.hub-tray{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;align-items:center;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  background:var(--panel);border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(0,0,0,.3);transition:background .15s,border-color .15s}
.hub-tray.over{border-top:2px solid var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}
.hub-tray .tray-l{flex:1;min-width:0}.hub-tray .tray-l>b{font-size:13px}
.hub-tray .tray-items{display:flex;gap:8px;overflow-x:auto;min-height:40px;align-items:center;margin-top:4px;padding:2px 2px 4px}
.hub-tray .tray-items .dim{font-size:12.5px}
.hub-tray .tray-it{display:inline-flex;align-items:center;gap:7px;border:1px dashed var(--accent);border-radius:10px;padding:6px 11px;background:var(--panel2);white-space:nowrap;cursor:grab;font-size:13px}
.hub-tray .tray-it .ico{color:var(--accent);width:16px;height:16px}
.hub-tray .tray-btns{display:flex;gap:8px;flex:none}
.hub-szm{position:fixed;z-index:120;display:flex;flex-wrap:wrap;gap:6px;max-width:250px;padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.4)}
.hub-szm button{display:inline-flex;align-items:center;gap:7px;font-size:13px;padding:5px 10px}
.hub-szm button i{display:inline-block;width:calc(var(--a) * 7px);height:calc(var(--b) * 7px);border:1.5px solid currentColor;border-radius:2px}
.hub-dlg{position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.hub-dlg-b{max-width:440px;width:100%;background:var(--panel);border:1px solid var(--warn);border-radius:14px;padding:16px 18px;box-shadow:0 20px 50px rgba(0,0,0,.5)}
.hub-dlg-b>b{color:var(--warn);font-size:16px}.hub-dlg-b p{margin:10px 0 14px;line-height:1.5}
.hub-dlg-a{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
@media (max-width:520px){.hub-widgets{--rowh:118px;gap:10px}.hw{padding:10px 11px}.hw .big{font-size:21px}.hub-tray{flex-wrap:wrap}.hub-tray .tray-btns{width:100%;justify-content:flex-end}}
.hub-gal details.gd{margin:0 0 6px}.hub-gal details.gd>summary{cursor:pointer;font-weight:600;font-size:14px;padding:6px 0;list-style:none}
.hub-gal details.gd>summary::-webkit-details-marker{display:none}.hub-gal details.gd[open]>summary{margin-bottom:6px}
.hub-gal .gl{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px}
.hub-gal .gi{padding:6px 8px;gap:8px}.hub-gal .gi b{font-size:13px;font-weight:600}.hub-gal .gi .dim{font-size:11.5px}
.hub-gal .gi button{padding:2px 10px;font-size:15px;line-height:22px}
.hw .chipsw.one{flex-wrap:nowrap;overflow:hidden;mask-image:linear-gradient(90deg,#000 85%,transparent)}
.editing.hub-grid .tile .ctl{left:auto;right:8px;top:8px;bottom:auto}
.editing.hub-grid .tile .st,.editing.hub-grid .tile .ext,.editing.hub-grid .tile .badge{display:none}
.hw[data-w=mining] .dim{font-size:12px}
.hw .hb{gap:4px}.hw>header{margin-bottom:0}
.hw .globe canvas{width:100%!important;height:100%!important}
.hw[data-w=net] .big{font-size:19px}.hw.small[data-w=net] .big{font-size:16px}
@media (max-width:520px){.hub-widgets{--rowh:124px}}
/* v3.92: виджет - ссылка на свой раздел, подробная подсказка при наведении */
.hw.go{cursor:pointer}.hw.go:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));box-shadow:0 6px 18px rgba(0,0,0,.22)}
.hw .htip:hover::after,.hw .htip:focus::after{display:none}
.hub-tip{position:fixed;z-index:150;max-width:360px;padding:10px 13px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);
  box-shadow:0 10px 28px rgba(0,0,0,.45);font-size:12.5px;line-height:1.5;pointer-events:none;animation:tip-in .12s ease}
.hub-tip>b{display:block;font-size:13px;margin-bottom:4px;color:var(--accent)}
.hub-tip div{white-space:pre-wrap;overflow-wrap:anywhere}.hub-tip i.sep{display:block;height:6px}
@keyframes tip-in{from{opacity:0;transform:translateY(3px)}}
[data-theme=hacker] .hub-tip{border-color:var(--accent);box-shadow:0 0 0 1px rgba(61,255,110,.15),0 10px 28px rgba(0,0,0,.6)}
.hw .ur{display:flex;align-items:center;gap:6px;font-size:13px;min-width:0;margin:2px 0}.hw .ur>span{flex:0 1 auto;min-width:60px;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim)}.hw .ur>b{font-weight:500;white-space:nowrap;margin-left:auto}.hw .ur b.u0{color:var(--ok)}.hw .ur b.u1{color:var(--warn)}.hw .ur b.u2,.hw .ur b.u3{color:var(--bad)}.hw .ustrip{display:flex;gap:1px;height:12px;flex:1;min-width:40px}.hw .ustrip i{flex:1;min-width:1px;border-radius:1px;background:var(--line)}.hw .ustrip i.u0{background:var(--ok)}.hw .ustrip i.u1{background:var(--warn)}.hw .ustrip i.u2{background:color-mix(in srgb,var(--warn) 50%,var(--bad))}.hw .ustrip i.u3{background:var(--bad)}
