.header-project-identity{
  min-width:0;
  display:none;
  align-items:center;
  gap:9px;
}

.header-project-icon{
  width:56px;
  height:56px;
  flex:0 0 56px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:10px;
  padding:0;
  border:0;
  color:#fff;
  pointer-events:none;
}

.header-project-icon.visual-horizontal{
  width:240px;
  max-width:24vw;
  height:auto;
  aspect-ratio:500/118;
  flex:0 1 240px;
}

.header-project-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.header-project-identity>b{
  max-width:min(34vw,520px);
  overflow:hidden;
  font-size:clamp(16px,2vw,24px);
  line-height:1.2;
  padding-bottom:.06em;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Reserva espacio para los descendentes (g, j, p, q, y) del nombre. */
.fb-project-header .title-line{
  overflow:visible;
}

.fb-project-header #project-title{
  line-height:1.16;
  padding-bottom:.08em;
}

/* El acceso a configuración comparte la superficie clara de las pestañas. */
.fb-project-header #project-settings-button .project-title-action-icon{
  width:34px;
  height:34px;
  border-radius:10px;
  background:color-mix(in srgb,var(--accent) 7%,var(--paper));
  color:#111827;
}

html[data-theme="dark"] .fb-project-header #project-settings-button .project-title-action-icon{
  background:color-mix(in srgb,#fff 92%,var(--accent));
  color:#111827;
}

.header-project-settings{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:10px;
  background:color-mix(in srgb,var(--accent) 7%,var(--paper));
  color:var(--ink);
}

.header-project-settings:hover,
.header-project-settings:focus-visible{
  border-color:var(--accent);
  background:color-mix(in srgb,var(--accent) 14%,var(--paper));
  outline:0;
}

html[data-theme="dark"] .header-project-settings{
  border-color:color-mix(in srgb,var(--accent) 24%,#dfe5e8);
  background:color-mix(in srgb,#fff 92%,var(--accent));
  color:#111827;
}

html[data-theme="dark"] .header-project-settings:hover,
html[data-theme="dark"] .header-project-settings:focus-visible{
  border-color:var(--accent);
  background:color-mix(in srgb,#fff 84%,var(--accent));
}

.header-project-settings span,
.header-project-settings svg{
  width:25px;
  height:25px;
  display:block;
}

.project-head-toggle{
  width:38px;
  height:38px;
  margin-left:auto;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:10px;
  background:color-mix(in srgb,var(--accent) var(--ui-icon-tint,7%),var(--ui-icon-base,var(--paper)));
  color:var(--ui-icon-ink,#17212b);
  box-shadow:none;
}

.project-head-toggle+.theme-toggle{
  margin-left:0;
}

.project-head-toggle:hover,
.project-head-toggle:focus-visible{
  background:color-mix(in srgb,var(--accent) 14%,var(--ui-icon-base,var(--paper)));
  outline:0;
}

.project-head-toggle i{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
}

.project-head-toggle svg{
  width:100%;
  height:100%;
}

.project-head-toggle-expand,
.project-head-compact .project-head-toggle-compact{
  display:none!important;
}

.project-head-compact .project-head-toggle-expand,
.project-head-compact .header-project-identity{
  display:flex!important;
}

.project-head-compact .fb-project-header{
  display:none!important;
}

@media(min-width:761px){
  .project-head-compact .fb-project-main>.project-view-tabs{
    gap:18px;
    min-height:42px;
  }

  .project-head-compact .fb-project-main>.project-view-tabs>.tab{
    flex:0 0 auto;
    justify-content:flex-start;
    min-width:max-content;
  }

  .project-head-compact .fb-project-main>.project-view-tabs>.project-qr-trigger{
    margin-left:auto;
  }
}

.fb-project-main>.project-view-tabs>.project-qr-trigger{
  min-height:40px;
  margin:0 0 2px auto;
  flex:0 0 auto;
}

.fb-app-shell.admin-mode .project-head-toggle,
.fb-app-shell.admin-mode .header-project-identity,
.fb-app-shell.admin-mode .project-view-tabs>.project-qr-trigger{
  display:none!important;
}

.fb-app-shell.admin-mode .page>header>.theme-toggle{
  margin-left:auto;
}

@media(max-width:760px){
  .page>header .global-company-brand{display:none}
  .project-head-toggle{display:none!important}
  .project-head-compact .header-project-identity{width:0;min-width:0;flex:1 1 0}
  .header-project-identity>b{min-width:0;max-width:none;flex:1 1 auto;font-size:18px}
  .header-project-icon{width:44px;height:44px;flex-basis:44px;pointer-events:auto}
  .header-project-icon:hover,.header-project-icon:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  .header-project-settings{display:none}
  .header-project-icon.visual-horizontal{width:120px;max-width:30vw;flex-basis:120px}
  .fb-project-main>.project-view-tabs>.project-qr-trigger{min-width:40px;width:40px;height:40px;padding:7px}
  .fb-project-main>.project-view-tabs>.project-qr-trigger span{display:none}

  /* Una regla heredada mostraba Calendario como bloque y bajaba su texto. */
  .fb-project-main>.project-view-tabs>.tab,
  .fb-project-main>.project-view-tabs>.tab:nth-child(3){
    display:inline-flex;
    align-items:center;
  }

  .fb-project-main>.project-view-tabs>.tab>b,
  .fb-project-main>.project-view-tabs>.tab>span{
    align-self:center;
    line-height:1.15;
  }

  .fb-project-main>.project-view-tabs{
    position:relative;
    z-index:3;
    min-height:50px;
    background:var(--canvas);
  }
}
