/* Общая рабочая область: публичные страницы сохраняют прежнюю компоновку. */
.risen-workspace { --workspace-width: 248px; --workspace-top: 56px; margin: 0; color: var(--text, var(--fg, #111)); background: var(--bg, #fff); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.risen-workspace [hidden] { display: none !important; }
.risen-workspace > [data-workspace-legacy-header] { display: none !important; }
.workspace-shell { display: grid; grid-template-columns: var(--workspace-width) minmax(0, 1fr); min-height: 100dvh; }
.workspace-sidebar { height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: max(16px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: var(--surface, #fafafa); border-right: 1px solid var(--line, #eaeaea); z-index: 30; }
.workspace-brand { min-height: 36px; display: flex; align-items: center; gap: 12px; padding: 0 8px; color: inherit; text-decoration: none; font-size: 17px; font-weight: 650; white-space: nowrap; }
.workspace-brand img { width: 32px; height: 32px; flex-shrink: 0; border-radius: 6px; }
.workspace-navigation { display: block; overflow: auto; flex: 1; min-height: 0; padding-top: 4px; scrollbar-width: thin; }
.workspace-nav-group { margin-bottom: 24px; }
.workspace-group-label { margin: 0 12px 8px; color: var(--muted, #666); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.workspace-link { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 42px; gap: 12px; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; color: inherit; text-align: left; text-decoration: none; font: inherit; font-size: 14px; font-weight: 450; cursor: pointer; }
.workspace-link:hover, .workspace-link[aria-current='page'] { background: var(--line, #eaeaea); color: inherit; }
.workspace-link[aria-current='page'] { font-weight: 650; }
.workspace-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.workspace-link-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account { position: relative; flex-shrink: 0; border-top: 1px solid var(--line, #eaeaea); padding-top: 10px; }
.workspace-account > summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 6px; cursor: pointer; font-size: 14px; list-style: none; }
.workspace-account > summary::-webkit-details-marker { display: none; }
.workspace-account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-account-links { position: absolute; left: 0; bottom: calc(100% + 8px); width: max(224px, 100%); border: 1px solid var(--line, #eaeaea); border-radius: 8px; padding: 6px; background: var(--bg, #fff); box-shadow: 0 8px 24px #0001; z-index: 40; }
.workspace-account:not([open]) > .workspace-account-links { display: none; }
.workspace-pane { min-width: 0; }
.workspace-header { position: sticky; top: 0; display: flex; align-items: center; gap: 14px; min-height: var(--workspace-top); padding: max(6px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 6px 16px; background: var(--bg, #fff); border-bottom: 1px solid var(--line, #eaeaea); z-index: 20; }
.workspace-toggle, .workspace-drawer-close, .workspace-retry { border: 1px solid var(--line, #eaeaea); border-radius: 6px; padding: 8px; min-height: 36px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.workspace-toggle { display: flex; justify-content: center; align-items: center; flex-shrink: 0; width: 36px; }
.workspace-page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.workspace-connection { margin-left: auto; font-size: 12px; color: var(--muted, #666); text-align: right; }
.workspace-drawer-close, .workspace-shade { display: none; }
.workspace-content { min-width: 0; }
.workspace-content > main:not(.container):not(#risen-boot-gate) { width: min(1200px, calc(100% - 48px)); margin: 32px auto; }
.workspace-content > .skip { position: absolute; top: -100px; }
.workspace-content > .skip:focus { top: 64px; left: 16px; z-index: 50; }
.workspace-content > .footer { font-size: 12px; padding-bottom: 24px; }
.workspace-collapsed { --workspace-width: 64px; }
.workspace-collapsed .workspace-sidebar { padding-left: 6px; padding-right: 6px; }
.workspace-collapsed .workspace-brand { padding: 0 10px; }
.workspace-collapsed .workspace-brand-label, .workspace-collapsed .workspace-group-label, .workspace-collapsed .workspace-account-label, .workspace-collapsed .workspace-navigation .workspace-link-label { display: none; }
.workspace-collapsed .workspace-nav-group { margin-bottom: 16px; }
.workspace-collapsed .workspace-link { justify-content: flex-start; }
.workspace-collapsed .workspace-account-links .workspace-link-label { display: inline; }
.workspace-shell :is(a, button, summary):focus-visible { outline: 3px solid var(--focus, #356dca); outline-offset: 2px; }
.workspace-coding .workspace-shell { height: 100dvh; overflow: hidden; }
.workspace-coding .workspace-pane { display: flex; flex-direction: column; height: 100dvh; }
.workspace-coding .workspace-header { flex-shrink: 0; }
.workspace-coding .workspace-content { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.workspace-coding #root { height: 100%; min-width: 0; }
.workspace-coding #root > div { max-height: 100%; }
.navigation-session-status { padding: 8px 10px; color: var(--muted, #666); font-size: 12px; }
@media (max-width: 760px) {
  .workspace-shell, .workspace-collapsed { --workspace-width: 0px; display: block; }
  .workspace-sidebar { position: fixed; inset: 0 auto 0 0; width: min(288px, calc(100vw - 48px)); transform: translateX(-101%); visibility: hidden; padding-left: max(12px, env(safe-area-inset-left)); padding-right: 12px; }
  .workspace-drawer-open .workspace-sidebar { transform: translateX(0); visibility: visible; }
  .workspace-drawer-open .workspace-shade { display: block; position: fixed; inset: 0; z-index: 25; padding: 0; margin: 0; border: 0; border-radius: 0; background: #0006; }
  .workspace-drawer-close { display: block; align-self: flex-start; margin-left: 8px; }
  .workspace-collapsed .workspace-brand-label, .workspace-collapsed .workspace-group-label, .workspace-collapsed .workspace-account-label, .workspace-collapsed .workspace-navigation .workspace-link-label { display: initial; }
  .workspace-collapsed .workspace-brand { padding: 0 8px; }
  .workspace-header { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); gap: 10px; }
  .workspace-connection { font-size: 11px; }
  .workspace-content > .container, .workspace-content > main:not(.container):not(#risen-boot-gate) { width: calc(100% - 32px); }
  .workspace-content > .container { padding-top: 24px; }
}
/* Нативный Harness не определяет переменные сайта, поэтому rail получает те же значения. */
.workspace-coding { --bg: #fff; --text: #111; --surface: #fafafa; --muted: #666; --line: #eaeaea; }
@media (prefers-color-scheme: dark) { .workspace-coding { --bg: #000; --text: #f5f5f5; --surface: #0a0a0a; --muted: #a1a1a1; --line: #2a2a2a; } }
:root[data-theme='light'] .workspace-coding { --bg: #fff; --text: #111; --surface: #fafafa; --muted: #666; --line: #eaeaea; }
:root[data-theme='dark'] .workspace-coding { --bg: #000; --text: #f5f5f5; --surface: #0a0a0a; --muted: #a1a1a1; --line: #2a2a2a; }

/* Общие размеры рабочей области; нативная область Harness не меняется. */
.risen-workspace { --workspace-width: 232px; --workspace-top: 52px; }
.workspace-collapsed { --workspace-width: 64px; }
.workspace-nav-group { margin-bottom: 20px; }
.workspace-content > main:not(.container):not(#risen-boot-gate) { width: min(1120px, calc(100% - 48px)); margin: 24px auto 40px; }
@media(max-width:760px){
  .workspace-shell,.workspace-collapsed{--workspace-width:0px}
  .workspace-content > .container,.workspace-content > main:not(.container):not(#risen-boot-gate){width:calc(100% - 32px)}
  .workspace-content > .container{padding-top:20px}
}

.workspace-count{margin-left:auto;min-width:20px;height:20px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:var(--fg,#111);color:var(--bg,#fff);font-size:11px;font-weight:600;line-height:1;flex-shrink:0}.workspace-collapsed .workspace-count{position:absolute;right:2px;top:2px;min-width:16px;height:16px;font-size:10px;padding:0 3px}.workspace-link{position:relative}

#account-settings{max-width:640px}#account-language-form{display:grid;gap:12px;max-width:420px;margin:24px 0}#account-language-form label{font-weight:600}#account-ui-language{width:100%;min-height:44px}#account-language-form .button{justify-self:start}#account-language-form p{margin:0}#account-language-status:empty{display:none}
