/* Оболочка (этап 27, макет): левое меню | экран | правая панель. Телефон (< 760px): выдвижное меню, нижняя панель */

.shell {
  --left-w: 222px;
  --right-w: 320px;
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr);
  /* Строка – ровно в высоту экрана: середина (.main) прокручивается сама. Без этого строка росла по содержимому,
     и длинная страница без меню (регистрация, вход) обрезалась без прокрутки – пожелание 2026-10-04 */
  grid-template-rows: minmax(0, 1fr);
  height: calc(100vh / var(--zoom, 1));
  height: calc(100dvh / var(--zoom, 1));
  overflow: hidden;
}
.shell.right-docked { grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w); }
.shell.left-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.shell.left-hidden.right-docked { grid-template-columns: 0 minmax(0, 1fr) var(--right-w); }
.shell.left-hidden .sidebar { visibility: hidden; padding: 0; border: 0; }

/* ---------- Левое меню ---------- */
.sidebar {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: calc(var(--safe-top) + 14px) 10px 24px calc(var(--safe-left) + 10px);
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar > * { flex-shrink: 0; }

.side-profile { display: flex; align-items: center; gap: 2px; }
.side-account {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 6px;
  border: 0; border-radius: var(--radius-sm); background: none; cursor: pointer; text-align: left;
}
.side-account:hover { background: var(--surface-2); }
.side-avatar {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: 600;
}
.side-avatar .icon svg { width: 14px; height: 14px; }
.side-account-text { min-width: 0; display: flex; flex-direction: column; }
.side-account-name { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-account-sync { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-account-sync.is-accent { color: var(--accent); }
.side-account-sync.is-danger { color: var(--danger); }
.side-tool {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.side-tool svg { width: 14px; height: 14px; stroke-width: 2; }
.side-tool:hover { background: var(--surface-2); color: var(--text); }
.side-tool.is-spinning svg { animation: spin 1s linear infinite; }
.side-tool.is-error { color: var(--danger); }

.side-quick { display: flex; gap: 6px; }
.side-write {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 0; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-weight: 500; cursor: pointer; white-space: nowrap;
}
.side-write:hover { background: var(--accent-hover); }
/* Поиск рядом с «Записать» – заметный: заливка и значок в цвет акцента (пожелание 2026-10-03) */
.side-search {
  flex: none; display: grid; place-items: center; width: 34px; padding: 0; cursor: pointer;
  border: 1px solid var(--accent-line); border-radius: 7px; background: var(--accent-soft); color: var(--accent);
}
.side-search svg { width: 16px; height: 16px; stroke-width: 2.2; }
.side-search:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 22%, var(--accent-soft)); color: var(--accent-ink); }

.side-system, .side-list, .side-hidden { display: flex; flex-direction: column; gap: 1px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 9px;
  border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none;
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link[aria-current="page"] { background: var(--surface-2); }
.side-link.is-dragging { opacity: 0.4; }
.is-drop { box-shadow: inset 0 2px 0 var(--accent); }
.side-icon { flex: none; display: grid; place-items: center; width: 16px; height: 16px; color: var(--text-2); }
.side-icon svg { width: 15px; height: 15px; }
.side-link[aria-current="page"] .side-icon { color: var(--accent); }
.side-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-count { flex: none; font-family: var(--mono); font-size: var(--fs-xs); color: var(--label); }
.side-count.is-accent { color: var(--accent); }
.side-count.is-danger { color: var(--danger); }
.side-hidden { padding-top: 4px; border-top: 1px dashed var(--divider); }
.side-hidden-head { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border: 0; background: none; cursor: pointer; text-align: left; }
.side-chev { font-size: 8px; }
.is-hidden-item { color: var(--text-2); }
.is-hidden-item .side-icon { opacity: 0.6; }
.side-unhide { flex: none; padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: var(--fs-xs); cursor: pointer; }

.side-sec { display: flex; flex-direction: column; gap: 1px; border-radius: var(--radius-sm); }
.side-sec-head { display: flex; align-items: center; gap: 6px; padding: 0 6px 6px 9px; cursor: grab; }
.side-sec-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.side-plus {
  flex: none; display: grid; place-items: center; width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
}
.side-plus:hover { background: var(--control); color: var(--text); }
.side-link .side-plus { opacity: 0; }
.side-link:hover .side-plus, .side-link .side-plus:focus-visible { opacity: 1; }
.side-grip { font-size: var(--fs-2xs); letter-spacing: -1px; color: var(--control); }
.side-subhead { margin: 0; padding: 10px 9px 4px; }
.side-empty { margin: 0; padding: 4px 9px; color: var(--muted); font-size: var(--fs-sm); }
.side-subhead.is-drop-only { display: none; }
body.is-dragging-project .side-subhead.is-drop-only { display: block; }
.side-emoji { flex: none; width: 16px; font-size: 13px; line-height: 1; text-align: center; }
.side-square { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--ok); }
.side-square.is-must { background: var(--danger); }
.side-sphere .side-label { font-weight: 500; }
.side-project { padding-left: 26px; gap: 8px; }
.side-project .side-label { color: var(--text-2); }
.side-project.is-paused .side-label { color: var(--muted); }
.side-ring { flex: none; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ok); }
.side-ring.is-must { border-color: var(--danger); }
.side-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--muted)); }
.side-glyph { flex: none; display: grid; place-items: center; width: 14px; font-size: var(--fs-xs); color: var(--text-2); }
.side-glyph svg { width: 14px; height: 14px; }
.side-pin.is-deep { padding-left: 9px; }
.side-pin .side-label { color: var(--text-2); }
.side-pin.is-done .side-label { text-decoration: line-through; color: var(--muted); }
.side-x { flex: none; padding: 0 3px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; opacity: 0; }
.side-pin:hover .side-x, .side-x:focus-visible { opacity: 1; }
.side-folder .side-chev { color: var(--label); }

/* ---------- Экран ---------- */
.main { grid-column: 2; grid-row: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; flex: none;
  display: flex; align-items: center; gap: 10px; height: calc(42px + var(--safe-top));
  padding: var(--safe-top) clamp(14px, 2.4vw, 24px) 0;
  border-bottom: 1px solid var(--border); background: var(--bg);
  font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted);
}
.top-btn {
  flex: none; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.top-btn svg { width: 16px; height: 16px; }
.top-btn:hover { background: var(--surface-2); color: var(--text); }
.top-left { margin-left: -6px; }
.top-crumb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-crumb-link { color: inherit; text-decoration: none; border-radius: 4px; }
.top-crumb-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.top-crumb-here { color: var(--text-2); }
.top-extra { flex: none; display: flex; align-items: center; gap: 4px; }
.top-extra:empty { display: none; }
.focus-pill {
  flex: 0 1 auto; min-width: 0; max-width: min(45%, 280px); overflow: hidden;
  display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-ink);
  font-family: var(--font); font-size: var(--fs-sm);
}
.focus-pill:hover { color: var(--accent-ink); filter: brightness(1.1); }
.focus-pill[hidden] { display: none; }
.fp-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.fp-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-time { flex: none; font-family: var(--mono); font-size: var(--fs-xs); }
.fp-go { flex: none; font-weight: 600; }

.view {
  flex: 1;
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 30px clamp(16px, 3vw, 40px) 80px;
}
.view:focus { outline: none; }
.view > * + * { margin-top: 14px; }
.shell.is-full .view { max-width: none; }

/* ---------- Правая панель ---------- */
.sidepanel {
  grid-column: 3; grid-row: 1; display: none; min-width: 0;
  background: var(--panel); border-left: 1px solid var(--border);
  overflow-y: auto; overflow-x: hidden;
}
.shell.right-docked .sidepanel { display: block; }
.side-body { display: flex; flex-direction: column; gap: 14px; padding: calc(var(--safe-top) + 10px) 16px 24px; }
.side-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.side-head .caps { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-head-btn {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--accent); font-size: var(--fs-sm);
}
.side-head-btn:hover { border-color: var(--accent-line); }
.side-head-star { font-size: var(--fs-xs); }
.side-head-close { display: none; flex: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.side-head-close { font-size: 22px; line-height: 1; }

.frame-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.frame-row, .frame-now { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 8px; }
.frame-time { padding-top: 10px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--label); }
.frame-card {
  display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; padding: 9px 10px;
  border: 1px solid transparent; border-radius: var(--radius-row); background: var(--surface); color: var(--text);
  font: inherit; text-align: left;
}
button.frame-card { cursor: pointer; }
button.frame-card:hover { filter: brightness(1.08); }
.frame-title { overflow-wrap: anywhere; }
.frame-sub { color: var(--muted); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.frame-card.is-busy { background: var(--surface); border-left: 3px solid var(--control); }
.frame-card.is-meeting { background: var(--meet-soft); border-left: 3px solid var(--meet); }
.frame-card.is-deed { background: var(--deed-soft); border-left: 3px solid var(--deed); }
.frame-card.is-task { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.frame-card.is-free { display: block; background: none; border: 1px dashed var(--control); color: var(--text-2); }
.frame-now .frame-time { padding-top: 0; color: var(--danger); }
.frame-now-line { align-self: center; height: 1px; background: var(--danger); }
.frame-hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }

/* ---------- Ресайз ---------- */
.resize-handle { position: fixed; top: 0; bottom: 0; z-index: 30; width: 7px; cursor: col-resize; touch-action: none; }
.resize-handle:hover { background: oklch(0.55 0.12 250 / 0.35); }
.resize-handle.is-left { left: calc(var(--left-w) - 4px); }
.resize-handle.is-right { right: calc(var(--right-w) - 4px); display: none; }
.shell.right-docked .resize-handle.is-right { display: block; }
.shell.left-hidden .resize-handle.is-left { display: none; }

/* ---------- Узкий экран: панель выезжает поверх справа ---------- */
.scrim { display: none; }
@media (max-width: 1099px) {
  .shell.sheet-open .sidepanel {
    display: block; position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(var(--right-w), 92vw);
    box-shadow: var(--shadow-modal); animation: slide-left 0.2s ease-out;
  }
  .shell.sheet-open .scrim { display: block; position: fixed; inset: 0; z-index: 69; background: var(--overlay); }
  .shell.sheet-open .side-head-close { display: grid; }
  .shell.sheet-open .side-head-btn { order: -1; }
}
@keyframes slide-left { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slide-right { from { transform: translateX(-100%); } to { transform: none; } }

/* ---------- Телефон ---------- */
.tabbar { display: none; }
@media (max-width: 759px) {
  .shell, .shell.right-docked, .shell.left-hidden { grid-template-columns: minmax(0, 1fr); }
  .main { grid-column: 1; padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; width: min(320px, 86vw);
    transform: translateX(-100%); transition: transform 0.22s ease; visibility: hidden;
  }
  .shell.drawer-open .sidebar { transform: none; visibility: visible; box-shadow: 8px 0 30px oklch(0 0 0 / 0.4); }
  .shell.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 79; background: oklch(0.1 0.005 260 / 0.55); }
  .shell.sheet-open .sidepanel { width: 100%; box-shadow: none; animation: slide-up 0.2s ease-out; }
  .resize-handle { display: none !important; }
  .view { padding: 20px 16px 40px; }
  .fp-title, .fp-go { display: none; }
  .topbar:has(.top-extra:not(:empty)) .top-crumb { display: none; }
  .topbar:has(.top-extra:not(:empty)) .top-extra { margin-left: auto; }
  .side-link, .side-account { min-height: 40px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 76;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
    height: calc(var(--tabbar-h) + var(--safe-bottom)); padding: 0 calc(var(--safe-right) + 6px) var(--safe-bottom) calc(var(--safe-left) + 6px);
    background: var(--panel); border-top: 1px solid var(--border);
  }
  .shell.is-bare .tabbar { display: none; }
}
@keyframes slide-up { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; min-height: 52px; padding: 0 2px; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 10.5px; cursor: pointer; text-decoration: none;
}
.tab .icon { position: relative; display: grid; }
.tab .icon svg { width: 21px; height: 21px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-badge { position: absolute; top: -4px; right: -10px; min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); line-height: 16px; text-align: center; }
.tab-plus-circle {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 26px; line-height: 1;
  box-shadow: 0 6px 18px oklch(0.4 0.12 250 / 0.45);
}
.top-right span { margin-left: 5px; font-family: var(--font); font-size: 11.5px; }
.top-right:has(span) { display: flex; padding: 0 6px; }

/* ---------- Экраны без навигации (вход, фокус, мастер) ---------- */
.shell.is-bare { grid-template-columns: minmax(0, 1fr); }
.shell.is-bare .sidebar, .shell.is-bare .sidepanel, .shell.is-bare .topbar, .shell.is-bare .resize-handle, .shell.is-bare .tabbar { display: none; }
.shell.is-bare .main { grid-column: 1; padding-bottom: 0; }

/* Переход между экранами – мягко */
.view.is-entering { animation: view-in 0.16s ease-out; }
@keyframes view-in { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.is-entering, .sidebar, .sidepanel { animation: none; transition: none; } }

/* ---------- Общие кнопки ---------- */
.icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn[aria-current="page"] { color: var(--accent); }
html.is-touch .icon-btn { width: 44px; height: 44px; }

/* 9.1: всё в экран. Элементы сеток и флексов могут сжиматься, длинные слова переносятся */
.view, .card, .stack, .field, .actions, .toolbar, .task-head, .task-body, .task-head-row, .meta-chips, .hints { min-width: 0; }
.card, .task-head, .task-body { grid-template-columns: minmax(0, 1fr); }
.card, .hints li, .task-meta, .note-row-title, .note-row-meta, .md, .kanban-title, .kanban-meta, .tip, .notice, .field-hint { overflow-wrap: anywhere; }
.toolbar { flex-wrap: wrap; }
.meta-chip { max-width: 100%; }
.meta-chip-text { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.data-table { display: block; max-width: 100%; overflow-x: auto; }
.shell.is-full .kanban { grid-auto-columns: minmax(240px, 1fr); }
.shell.is-full .kanban-board, .shell.is-full .wk-layout, .shell.is-full .card { max-width: none; }

/* Меню аккаунта */
.account-menu .popover-body { display: grid; gap: 4px; min-width: 260px; }
.account-name { margin: 0; font-weight: 600; font-size: var(--fs-lg); }
.account-status { margin: 4px 0; }
.account-status.is-warn { color: var(--danger); }
.account-menu .sheet-item.account-item { display: flex; align-items: center; gap: 12px; text-align: left; }
.account-menu .account-item .icon { display: grid; place-items: center; flex: none; }
.account-item .icon svg { width: 18px; height: 18px; }
.account-item.is-danger { color: var(--danger); }
.account-item-text { display: grid; gap: 1px; min-width: 0; }
.account-item-sub { color: var(--muted); font-size: var(--fs-xs); }
.account-item.is-warn .account-item-sub { color: var(--danger); }
.account-sub { margin: 8px 0 0; padding: 6px 10px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-2xs); letter-spacing: 0.04em; }
.account-menu .account-item.is-compact { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
.account-menu .account-item.is-compact .icon svg { width: 15px; height: 15px; }
.account-menu .popover-body { max-height: min(80vh, 640px); overflow-y: auto; }

/* Карточка задачи в правой панели (этап 27) */
.sidepanel.is-card .side-body { gap: 10px; }
/* Чат в панели – на всю высоту, без отступов: шапка сверху, поле снизу */
.side-body:has(> .side-chat) { height: 100%; padding: var(--safe-top) 0 0; gap: 0; }
.sidepanel:has(.side-chat) { overflow: hidden; }
.side-card-head { position: sticky; top: calc(-10px - var(--safe-top)); z-index: 2; display: flex; align-items: center; gap: 6px; margin: -10px -16px 0; padding: 10px 16px 8px; background: var(--panel); border-bottom: 1px solid var(--divider); }
.side-card-head .caps { flex: 1; }
.side-card-open, .side-card-close { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.side-card-open { font-size: 14px; }
.side-card-open:hover, .side-card-close:hover { background: var(--surface-2); color: var(--text); }
.side-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side-card .card { padding: 12px; }
.side-card .action-bar { flex-wrap: wrap; }
.side-card .task-head .title-input { font-size: var(--fs-xl); }
.side-card .title-input { font-size: 17px; font-weight: 600; line-height: 1.3; }
.side-head-btn { background: none; font: inherit; font-size: var(--fs-sm); cursor: pointer; }

/* Выдвижная панель (карточка задачи, рамка дня) – над нижней панелью телефона (этап 33.1): раньше нижнее меню
   (z-index 76) лежало поверх карточки (70) и закрывало её низ – чек-лист и «+ пункт» было не докрутить */
@media (max-width: 1099px) {
  .shell.sheet-open .sidepanel { z-index: 78; padding-bottom: var(--safe-bottom, 0px); }
  .shell.sheet-open .scrim { z-index: 77; }
}

/* Группы разделов и свёрнутые сферы (этап 33.7) */
.side-group-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer; }
.side-group-head:hover { background: var(--surface-2); color: var(--text); }
.side-group-head .side-chev { width: 10px; color: var(--muted); }
/* Вложенное в папку – с отступом и линией слева, как проекты в сфере (2026-10-19, ROADMAP 41.3) */
.side-group-items, .side-folder-items { display: flex; flex-direction: column; gap: 1px; margin: 1px 0 3px 17px; padding-left: 6px; border-left: 1px solid var(--divider); }
.side-sphere-chev { flex: none; width: 16px; height: 20px; margin-left: -4px; border: 0; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.side-sphere-chev.is-empty { cursor: default; }

/* Плавно выезжающие боковые панели (этап 35.10): в сетке всегда три колонки, скрытая панель – шириной 0,
   ширина колонок меняется плавно; содержимое прячется после того, как панель уехала. Телефон – свои выезды выше */
@media (min-width: 760px) {
  .shell { grid-template-columns: var(--left-w) minmax(0, 1fr) 0; transition: grid-template-columns 0.2s ease-out; }
  .shell.left-hidden { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .shell.right-docked { grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w); }
  .shell.left-hidden.right-docked { grid-template-columns: 0 minmax(0, 1fr) var(--right-w); }
  .shell.is-bare { grid-template-columns: minmax(0, 1fr); transition: none; }
  .sidebar { transition: visibility 0s; }
  .shell.left-hidden .sidebar { transition: visibility 0s linear 0.2s; }
  .sidepanel { display: block; visibility: hidden; transition: visibility 0s linear 0.2s; }
  .shell.right-docked .sidepanel { visibility: visible; transition: visibility 0s; }
  .shell.is-bare .sidepanel { display: none; }
  .shell.is-resizing { transition: none; } /* тянем край мышью – без задержки */
}
@media (min-width: 760px) and (max-width: 1099px) {
  .shell.sheet-open .sidepanel { visibility: visible; transition: none; }
}
@media (prefers-reduced-motion: reduce) { .shell { transition: none !important; } }

/* Проекты внутри сферы – вложенно, с линией слева (2026-10-14) */
.side-sphere-children { margin-left: 17px; padding-left: 4px; border-left: 1px solid var(--divider); }
.side-sphere-children .side-project { padding-left: 12px; }
.frame-card.is-event { background: none; border: 1px dashed var(--control); border-left: 3px solid var(--control); }
