/* Personal presentation never grants access or hides account/recovery controls. */
:root[data-workspace-accent="blue"] { --cyan: #72b7ff; --cyan-bright: #cae5ff; --blue: #468eff; }
:root[data-workspace-accent="violet"] { --cyan: #bd9aff; --cyan-bright: #e9dcff; --blue: #9065ed; }
:root[data-workspace-accent="green"] { --cyan: #61e6b2; --cyan-bright: #c1ffe8; --blue: #199d87; }
:root[data-workspace-bitrix-card="hide"] #leftSidebar { display: none !important; }
:root[data-workspace-brain-size="compact"] .orb-zone .herman-head-stage { transform: scale(.64); }
:root[data-workspace-brain-size="balanced"] .orb-zone .herman-head-stage { transform: scale(.82); }
.account-dialog:has(#integrationStudioPanel:not([hidden])) { width: min(1120px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
#personalLayoutOpen, #integrationStudioOpen { margin-top: 10px; }
@media (min-width: 1100px) {
  :root[data-workspace-dialogue="beside"] .center-stage {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 42%);
    grid-template-rows: minmax(0, 1fr);
  }
  :root[data-workspace-dialogue="beside"] .chat-shell { height: 100%; max-height: none; min-height: 0; }
  :root[data-workspace-dialogue="beside"] .chat-toolbar { flex-wrap: wrap; }
  :root[data-workspace-dialogue="beside"] .reference-shell-active .center-stage {
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, .85fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  :root[data-workspace-dialogue="beside"] .reference-shell-active .reference-hero-heading { grid-column: 1 / -1; grid-row: 1; }
  :root[data-workspace-dialogue="beside"] .reference-shell-active .chat-shell { grid-column: 1; grid-row: 2; }
  :root[data-workspace-dialogue="beside"] .reference-shell-active .orb-zone {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    height: clamp(240px, 42dvh, 430px);
  }
}

/* Saved in this browser per account; does not change the shared layout schema. */
:root[data-chat-sized] .reference-shell-active .center-stage{grid-template-rows:auto minmax(0,1fr) var(--personal-chat-height)}
:root[data-chat-sized] .reference-shell-active .chat-shell{height:var(--personal-chat-height);min-height:240px;max-height:none}
@media(min-width:1100px){
 :root[data-workspace-dialogue="beside"][data-chat-sized] .reference-shell-active .center-stage{grid-template-rows:auto minmax(0,1fr)}
 :root[data-workspace-dialogue="beside"][data-chat-sized] .reference-shell-active .chat-shell{align-self:end;grid-row:2}
}
@media(max-width:760px){
 :root[data-chat-sized] .reference-shell-active .center-stage{grid-template-rows:auto clamp(120px,25svh,240px) var(--personal-chat-height)}
 :root[data-chat-sized] .reference-shell-active .chat-shell{min-height:320px}
 :root[data-chat-sized] .reference-shell-active .messages{max-height:none}
}
/* Full chat wins over either standard dialogue arrangement. */
:root[data-chat-full] .reference-shell-active .center-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
:root[data-chat-full] .reference-shell-active .chat-shell{grid-column:1;grid-row:2;align-self:stretch;height:100%;min-height:0}
