.shell{min-height:100vh;display:grid;grid-template-columns:76px minmax(0,1fr)}
.sidebar{position:fixed;z-index:40;inset:0 auto 0 0;width:76px;display:flex;flex-direction:column;gap:14px;padding:18px 12px 14px;background:var(--ink);color:#fff;overflow:hidden;transition:width .18s ease,box-shadow .18s ease}
.sidebar:hover,.sidebar:has(:focus-visible){width:256px;box-shadow:12px 0 40px rgba(17,21,28,.28)}
.brand{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 4px;text-decoration:none;white-space:nowrap}
.mark{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--yellow)}
.mark i{display:block;width:18px;height:18px;border-radius:5px 5px 5px 0;background:var(--ink)}
.brand span{display:grid;line-height:1.2}.brand strong{font-size:17px;font-weight:800}.brand small{font-size:11px;color:var(--ink-muted)}
.nav{flex:1;display:grid;align-content:start;gap:2px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;margin:0 -4px;padding:0 4px}
.nav::-webkit-scrollbar{display:none}
.nav a,.sheet nav a{display:flex;align-items:center;gap:14px;min-height:42px;padding:0 13px;border-radius:12px;color:var(--ink-tab);text-decoration:none;font-weight:700;font-size:14px;white-space:nowrap}
.nav a i,.sheet nav a i,.mobileNav i{flex:none;display:grid;place-items:center;width:24px;height:24px}
.nav svg,.sheet svg,.mobileNav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mobileNav button svg circle{fill:currentColor;stroke:none}
.nav a:hover{background:var(--ink-2);color:#fff}
.brand span,.nav a span,.user span,.user button{opacity:0;transition:opacity .12s}
.sidebar:hover :is(.brand span,.nav a span,.user span,.user button),.sidebar:has(:focus-visible) :is(.brand span,.nav a span,.user span,.user button){opacity:1}
.nav a.active,.sheet nav a.active{background:var(--yellow);color:var(--ink)}
.navPinned{flex:none;padding-top:8px;border-top:1px solid var(--ink-line)}
.settingsButton{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#fff;color:var(--ink);box-shadow:var(--shadow);text-decoration:none}
.settingsButton svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.settingsButton:hover,.settingsButtonOn{background:var(--yellow)}
.user{display:flex;align-items:center;gap:10px;padding:12px 4px 0;border-top:1px solid var(--ink-line);white-space:nowrap}
.user>b{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#fff;color:var(--ink);font-size:13px;font-weight:800}
.user span{display:grid;min-width:0;flex:1}.user strong{font-size:13px;overflow:hidden;text-overflow:ellipsis}.user small{font-size:11px;color:var(--ink-muted);overflow:hidden;text-overflow:ellipsis}
.user button{flex:none;width:36px;height:36px;border:0;border-radius:10px;background:var(--ink-2);color:#fff;cursor:pointer}
.main{grid-column:2;min-width:0;padding:10px 28px 40px}
.topline{display:flex;justify-content:space-between;gap:12px;min-height:64px;align-items:center;margin-bottom:6px}
.classic{flex:none;font-size:12px;font-weight:700;color:var(--faint);text-decoration:none;white-space:nowrap}.classic:hover{color:var(--ink)}
.notice{display:grid;justify-items:start;gap:8px;padding:28px;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow)}
.notice strong{font-size:18px}.notice span{color:var(--muted)}
.notice button{min-height:44px;padding:0 18px;border:0;border-radius:12px;background:var(--yellow);font-weight:800;cursor:pointer}
.skeleton{height:260px;border-radius:22px;background:linear-gradient(90deg,#e4e7ec,#f3f4f7,#e4e7ec);background-size:200% 100%;animation:pulse 1.4s infinite}
@keyframes pulse{to{background-position:-200% 0}}
.readOnly :is(form button[type=submit],[data-write]){display:none!important}
.mobileNav{display:none}
.sheetBackdrop{position:fixed;z-index:80;inset:0;background:rgba(17,21,28,.55);display:flex;align-items:flex-end}
.sheet{width:100%;max-height:80vh;overflow:auto;background:var(--ink);color:#fff;border-radius:22px 22px 0 0;padding:16px}
.sheet header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.sheet header strong{font-size:18px}
.sheet header button{width:44px;height:44px;border:0;border-radius:12px;background:var(--ink-2);color:#fff;font-size:22px;cursor:pointer}
.sheetClassic{display:block;margin-bottom:10px;padding:12px;border-radius:12px;background:var(--ink-2);color:var(--yellow);font-weight:800;text-decoration:none}
.sheet nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.sheet nav a{white-space:normal;line-height:1.2;padding:8px 12px}
@media(max-width:760px){
  .shell{display:block}
  .sidebar{display:none}
  .main{padding:8px 12px 96px}
  .classic{display:none}
  .topline{min-height:56px}
  .mobileNav{position:fixed;z-index:50;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:var(--ink)}
  .mobileNav a,.mobileNav button{display:grid;justify-items:center;gap:2px;min-width:0;min-height:52px;padding:6px 2px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border:0;border-radius:12px;background:transparent;color:var(--ink-tab);text-decoration:none;font-size:11px;font-weight:700;cursor:pointer}
  .mobileNav .active{background:var(--yellow);color:var(--ink)}
}

/* Верхняя строка (поиск, уведомления) — часть тёмной полосы шапки. */
.main{padding-top:0}
.topline{margin:0 -28px;padding:22px 32px 0;min-height:0;background:var(--ink)}
@media(max-width:760px){.topline{margin:0 -12px;padding:12px 16px 0}}
.settingsButton{background:#1d232d;color:#fff;box-shadow:none;border:1px solid #2c3440}
.settingsButton:hover,.settingsButtonOn{background:var(--yellow);color:var(--ink);border-color:var(--yellow)}
/* Группы меню: в свёрнутом виде — тонкий разделитель, в раскрытом — подпись группы. */
.nav{gap:0}
.navGroup{display:grid;gap:2px}
.navGroup+.navGroup{margin-top:8px;padding-top:8px;border-top:1px solid #262d38}
.navGroupTitle{height:0;overflow:hidden;opacity:0;padding:0 13px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6b7480;white-space:nowrap;transition:opacity .12s}
.sidebar:hover .navGroupTitle,.sidebar:has(:focus-visible) .navGroupTitle{height:auto;opacity:1;padding:4px 13px 4px}
.sidebar:hover .navGroup+.navGroup,.sidebar:has(:focus-visible) .navGroup+.navGroup{border-top-color:transparent;padding-top:2px}
.nav a.active{box-shadow:0 6px 18px rgba(255,204,0,.25)}
