/* Единая постоянная оболочка /app и серверных страниц: подключается после остальных стилей. */
:root {
  --paper: #F4F7FB; --surface: #FFFFFF; --ink: #14213D; --ink-2: #3A4A66; --muted: #66758C;
  --line: #DCE3EC; --line-strong: #B8C3D2; --marker: #F28C1B; --marker-soft: #FFE6CC; --brand: #1B2D5B;
  --action: #2459E0; --action-hover: #1A47C2; --action-soft: #E6EEFF; --action-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
  --sans: "Golos Text", "Golos Fallback", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0E1522; --surface: #172131; --ink: #E7EDF4; --ink-2: #BAC6D6; --muted: #8796AB;
  --line: #253349; --line-strong: #3A4B64; --marker: #FF9F3D; --marker-soft: #4A2E10; --brand: #E7EDF4;
  --action: #7EA2FF; --action-hover: #A3BEFF; --action-ink: #0E1522;
} }
:root[data-theme="dark"] {
  --paper: #0E1522; --surface: #172131; --ink: #E7EDF4; --ink-2: #BAC6D6; --muted: #8796AB;
  --line: #253349; --line-strong: #3A4B64; --marker: #FF9F3D; --marker-soft: #4A2E10; --brand: #E7EDF4;
  --action: #7EA2FF; --action-hover: #A3BEFF; --action-ink: #0E1522;
}
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--sans); font-feature-settings: "tnum" 1; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 1920px; margin: 0 auto; padding: 18px 20px 6px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; text-decoration: none; color: inherit; border-radius: 12px; }
.brand > div { min-width: 0; display: grid; }
.brand > div > .brand-meta { grid-area: 2 / 1; }
.brand > div > .brand-meta[hidden] { display: block; visibility: hidden; }
.logo-img { width: 38px; height: 38px; flex: none; }
.wordmark { font-weight: 800; letter-spacing: -.02em; color: var(--brand); text-decoration: none; }
.wordmark span { color: var(--marker); }
.brand-name { font-size: 19px; line-height: 1.15; font-weight: 700; }
.brand-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top #shellMeta { display: block; visibility: visible; }
.tabs { display: flex; gap: 2px; margin-left: auto; margin-right: 8px; padding: 4px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.tab { padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); text-decoration: none; font: 500 14.5px var(--sans); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); background: var(--paper); }
.tab.on { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .tab.on { color: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab.on { color: var(--paper); } }
.beta { display: inline-block; font: 700 11px/16px var(--sans); font-style: normal; padding: 0 5px; border-radius: 6px; background: var(--marker-soft); color: #A0520A; vertical-align: 1px; }
.tab.on .beta { background: var(--marker); color: #fff; }
.tab-n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--marker); color: #14213D; font: 600 12px/18px var(--sans); text-align: center; }
.tab-n[hidden] { display: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); box-shadow: var(--shadow); border-color: transparent; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn { height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.btn-main, .btn.btn-main { background: var(--action); border-color: var(--action); color: var(--action-ink); font-weight: 600; }
.tour-open { display: inline-flex; align-items: center; gap: 5px; }
.app-guest-auth { display: inline-flex; gap: 6px; align-items: center; }
.app-guest-auth[hidden] { display: none; }
.view[hidden] { display: none !important; }
@media (max-width: 1100px) and (min-width: 721px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top .tabs { order: 10; flex-basis: 100%; justify-content: center; margin: 0; }
  .top .brand { margin-right: auto; }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; row-gap: 10px; padding: 12px 16px 6px; }
  .brand { flex: 1; min-width: 0; }
  .brand-meta { overflow-wrap: anywhere; }
  .tabs { order: 3; width: 100%; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
  .tab { min-width: 0; flex: 1; text-align: center; padding: 8px 4px; font-size: 13px; }
  .app-guest-auth .btn { padding: 7px 9px; font-size: 12px; }
}
@media (max-width: 700px) { .tour-open span { display: none; } }
