.hosted-workspace{--header-control-height:43px}
.auth-dialog{border:1px solid var(--line);border-radius:18px;padding:8px;width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 36px);color:var(--ink);background:#fff;box-shadow:0 24px 90px #132d3433}
.auth-dialog::backdrop{background:#14272455;backdrop-filter:blur(3px)}
.auth-dialog .login-form-wrap{padding:18px 24px 24px}.auth-dialog .login-form-content{max-width:365px}.auth-dialog .login-form-content h2{font-size:25px;margin:4px 0 10px}.auth-dialog .form-stack{margin-top:20px;gap:14px}.auth-close{display:flex;margin-left:auto;font-size:24px;line-height:1}
.topbar-right #session-button{min-width:76px}.hosted-workspace .topbar-right{display:flex;align-items:center}
.hosted-workspace:not(.selection-window) .topbar{display:flex;position:fixed;top:0;right:0;min-height:0;height:62px;padding:0 12px;border:0;background:transparent;z-index:30}
.hosted-workspace .topbar .breadcrumb{display:none}.hosted-workspace .topbar .topbar-right{display:flex}
.hosted-workspace .sidebar{padding-right:110px}
.hosted-workspace .brand small{margin-top:2px}
.brand-title-compact{display:none}
@media(max-width:1180px){.hosted-workspace .brand-title-full{display:none}.hosted-workspace .brand-title-compact{display:inline}}
.hosted-workspace #session-button{background:var(--green);border-color:var(--green);color:#fff;text-transform:lowercase;padding:10px 12px;gap:6px;height:var(--header-control-height);white-space:nowrap}
.hosted-workspace #session-button:hover{background:var(--green-dark)}
.hosted-workspace .sidebar .new-chat,.hosted-workspace #session-button{font-size:calc(12px + 1pt);height:var(--header-control-height);min-height:var(--header-control-height);max-height:var(--header-control-height);padding-top:0;padding-bottom:0}
@media(max-width:560px){.auth-dialog .login-form-wrap{padding:12px 16px 18px}.auth-dialog .login-form-content h2{font-size:23px}}

/* Align sign-in with the new-dialog button in the desktop header. */
@media(min-width:768px){.hosted-workspace:not(.selection-window) .topbar{height:75px}.hosted-workspace #session-button{height:var(--header-control-height)}}

/* Mobile header stays on one row; the mark opens settings there. */
@media(max-width:767px){
  .hosted-workspace{--header-control-height:30px}
  .hosted-workspace .sidebar{height:62px;min-height:62px;flex-wrap:nowrap;padding:10px 80px 10px 10px;gap:8px;overflow:visible}
  .hosted-workspace .sidebar>.brand{flex:1;min-width:0;padding-right:0;gap:6px;font-size:20px}
  .hosted-workspace .sidebar>.brand .brand-mark{--brand-size:30px;width:30px;height:30px;min-width:30px;min-height:30px}
  .hosted-workspace .sidebar>.brand>span:last-child{display:block;white-space:nowrap}
  .hosted-workspace .sidebar>.brand small{font-size:7px;letter-spacing:.6px}
  .hosted-workspace .sidebar .new-chat{padding:0 9px;gap:4px;height:var(--header-control-height)}
  .hosted-workspace .sidebar .new-chat span{font-size:18px}
  .hosted-workspace #main-nav,.hosted-workspace .sidebar-bottom{display:none}
  .hosted-workspace:not(.selection-window) .topbar{height:62px;padding:0 10px}
  .hosted-workspace #session-button{min-width:60px;height:var(--header-control-height);padding:0 9px}
}

.hosted-workspace .mobile-history-link{display:none}
@media(max-width:767px){.hosted-workspace .mobile-history-link{display:inline-flex}}

/* One compact gap for every dialogue message, regardless of author. */
.hosted-workspace #messages>.message{margin-top:0;margin-bottom:8px}
.hosted-workspace #messages>.message:last-child{margin-bottom:0}

/* Account history stays beside New, before the separate Exit control. */
.hosted-workspace .sidebar .header-history{flex-shrink:0;white-space:nowrap;text-transform:lowercase;font-size:calc(12px + 1pt);height:var(--header-control-height);min-height:var(--header-control-height);padding:0 12px}
@media(max-width:767px){.hosted-workspace .sidebar .header-history{padding:0 9px}}

/* Personal logout lives in the settings opened by the A mark. */
.hosted-workspace.personal-account .topbar{display:none}
.hosted-workspace.personal-account .sidebar{padding-right:12px}
.hosted-workspace .account-menu-logout{display:block;margin-top:12px}
@media(max-width:767px){.hosted-workspace.personal-account .sidebar{padding-right:10px}.hosted-workspace.personal-account .sidebar>.brand{margin-right:auto}.hosted-workspace.personal-account .sidebar .new-chat,.hosted-workspace.personal-account .sidebar .header-history{flex-shrink:0}}

@media(max-width:767px){.hosted-workspace.personal-account #app-shell #sidebar{width:100%;padding-right:10px}}

/* Whole-ruble account balance, same height as History. */
.hosted-workspace.personal-account .topbar{display:flex;pointer-events:none}
.hosted-workspace.personal-account .topbar-right{pointer-events:auto}
.hosted-workspace #balance-button{height:var(--header-control-height);min-height:var(--header-control-height);min-width:64px;padding:0 12px;font-size:calc(12px + 1pt)}
.hosted-workspace.personal-account .sidebar{padding-right:90px}

.hosted-workspace #balance-button{width:77px}
@media(max-width:767px){.hosted-workspace #balance-button{width:71px}.hosted-workspace.personal-account #app-shell #sidebar{padding-right:94px}}

/* Compact personal header: full brand stays visible before New and History. */
@media(max-width:767px){
 .hosted-workspace.personal-account #app-shell #sidebar{display:grid;grid-template-columns:minmax(94px,130px) 62px 64px;justify-content:start;align-items:center;gap:6px;width:100%;padding:8px 76px 8px 8px}
 .hosted-workspace.personal-account #app-shell #sidebar>.brand{margin:0;min-width:0;gap:4px;font-size:17px;flex:none}
 .hosted-workspace.personal-account #sidebar>.brand .brand-mark{--brand-size:26px;width:26px;height:26px;min-width:26px;min-height:26px}
 .hosted-workspace.personal-account #sidebar>.brand small{font-size:6px;letter-spacing:.3px;white-space:nowrap}
 .hosted-workspace.personal-account #sidebar .new-chat,.hosted-workspace.personal-account #sidebar .header-history{width:100%;min-width:0;padding:0 4px;font-size:11px;gap:2px}
 .hosted-workspace.personal-account #balance-button{width:58px;min-width:58px;padding:0 4px;font-size:11px}
}

@media(max-width:767px){.hosted-workspace.personal-account #sidebar .new-chat span{font-size:13px;line-height:1;flex-shrink:0}.hosted-workspace.personal-account #sidebar .new-chat{white-space:nowrap}}

/* Owner: title +1pt, tagline +2pt. */
.hosted-workspace .sidebar>.brand{font-size:calc(24px + 1pt)}
.hosted-workspace .sidebar>.brand small{font-size:calc(8px + 1pt)}
@media(max-width:767px){
.hosted-workspace.personal-account #app-shell #sidebar>.brand{font-size:calc(17px + 1pt)}
.hosted-workspace.personal-account #sidebar>.brand small{font-size:calc(6px + 1pt)}
}

.hosted-workspace .sidebar>.brand .brand-title-full,.hosted-workspace .sidebar>.brand .brand-title-compact{position:relative;top:2px}

.feedback-list{display:grid;gap:10px}.feedback-item{border:1px solid var(--line);border-radius:10px;padding:12px}.feedback-item time,.feedback-item small{font-size:11px;color:var(--muted)}.feedback-item p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0}.feedback-list .feedback-item p{color:var(--ink)}#feedback-form{margin-top:0}#feedback-form .section-note{margin:0}

/* One exact control box and centered row on desktop and mobile. */
.hosted-workspace #sidebar>.brand{height:var(--header-control-height);min-height:var(--header-control-height);align-items:center}
.hosted-workspace #sidebar>.brand .brand-mark{width:var(--header-control-height);height:var(--header-control-height);min-width:var(--header-control-height);min-height:var(--header-control-height)}
@media(max-width:767px){
 .hosted-workspace.personal-account #app-shell #sidebar{grid-template-rows:var(--header-control-height);align-content:center}
 .hosted-workspace.personal-account #app-shell #sidebar>.brand{height:var(--header-control-height);min-height:var(--header-control-height)}
 .hosted-workspace.personal-account #sidebar>.brand .brand-mark{--brand-size:var(--header-control-height);width:var(--header-control-height);height:var(--header-control-height);min-width:var(--header-control-height);min-height:var(--header-control-height)}
}

@media(max-width:767px){.hosted-workspace:not(.selection-window) .topbar{box-sizing:border-box;border-bottom:1px solid transparent}}
