/* PureCore — каркас сайта «Пульт»: боковое меню на ПК, нижние вкладки на телефоне (site.js) */
html.ps-wait body { visibility: hidden; }
html.ps-on, html.ps-on body { height: auto; min-height: 100%; }

.ps { display: flex; min-height: 100vh; min-height: 100dvh; }
.ps-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-main { flex: 1; min-width: 0; }

/* ---------- боковое меню (ПК) ---------- */
.ps-side {
  width: 236px; flex: none; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 14px;
  background: #060e1f; border-right: 1px solid var(--line);
}
.ps-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.ps-brand .logo { width: 28px; height: 28px; border-radius: 8px; }
.ps-group { display: flex; flex-direction: column; gap: 2px; }
.ps-nav {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 550; font-size: 14.5px; background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer;
}
.ps-nav:hover { background: var(--surface); color: var(--text); }
.ps-nav.on { background: var(--surface2); color: var(--cyan); }
.ps-nav .end { margin-left: auto; }
.ps-label { margin: 16px 12px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ps-sp { flex: 1; min-height: 16px; }
.ps-me { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ps-me-l { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); }
.ps-me-t { display: flex; flex-direction: column; min-width: 0; }
.ps-me-t b { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-me-t small { color: var(--muted); font-size: 12px; }
.ps-out { width: 36px; height: 36px; flex: none; border-radius: 9px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.ps-out:hover { background: var(--surface2); color: var(--bad); }
.ps-ava { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; background: var(--surface2); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--text); }
.ps-guest { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ps-legal { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 10px 0; font-size: 12px; }
.ps-legal a { color: var(--muted); } .ps-legal a:hover { color: var(--text); }

/* ---------- телефон: верхняя строка и нижние вкладки ---------- */
.ps-top, .ps-tabs { display: none; }
@media (max-width: 899px) {
  .ps-side { display: none; }
  .ps-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #060e1f; }
  .ps-top .ps-brand { padding: 0; }
  .ps-top .sp { flex: 1; }
  .ps-main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }
  .ps-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: #071122ee; backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .ps-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 550; position: relative; }
  .ps-tab.on { color: var(--cyan); }
  .ps-tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
}

/* ---------- общие куски страниц внутри каркаса ---------- */
.ps-page { max-width: 1040px; margin: 0 auto; padding: 28px 28px 48px; }
.ps-h1 { margin: 0 0 22px; font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.ps-sec { margin: 26px 2px 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.ps-sec a { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 550; }
.ps-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ps-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
a.ps-card { color: var(--text); transition: border-color .15s; } a.ps-card:hover { border-color: #2f7bff88; }
.ps-card h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.ps-card h2 .r { margin-left: auto; font-size: 13px; font-weight: 550; color: var(--muted); }
.ps-card .s { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.ps-card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.ps-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid #12264a; min-width: 0; color: var(--text); }
.ps-row:first-of-type { border-top: 0; }
.ps-row .tx { flex: 1; min-width: 0; } .ps-row .t { font-weight: 600; } .ps-row .s { color: var(--muted); font-size: 13px; }
.ps-row .end { color: var(--muted); font-size: 13px; text-align: right; flex: none; }
.ps-addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ps-addr code { flex: 1; min-width: 170px; padding: 10px 13px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); color: var(--cyan); font: 650 15px ui-monospace, Consolas, monospace; }
.ps-pj { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #04122b; flex: none; }
@media (max-width: 899px) { .ps-page { padding: 16px 12px 28px; } .ps-h1 { font-size: 23px; margin-bottom: 14px; } }

/* старые кнопки «на главную» и дубли меню на страницах: в каркасе их заменяет меню */
html.ps-on .ps-hide { display: none !important; }
@media (min-width: 900px) { html.ps-on .ps-mobile { display: none !important; } }
